@reltio/remotes 1.4.1216 → 1.4.1219

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/2398.js CHANGED
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2398],{52374:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>js,PY2:()=>_n,Ng6:()=>He,YJ7:()=>En,NlI:()=>sn,Xt7:()=>We,wfT:()=>oi,EMD:()=>Qn,HAc:()=>Ye,PEf:()=>Sn,oA3:()=>Hn,$XE:()=>ut,eWf:()=>Rn,q7e:()=>Be,KVe:()=>si,WVQ:()=>xr,oZZ:()=>mi,bNA:()=>hi,Rjq:()=>bi,G39:()=>In,W0P:()=>Et,X1H:()=>Tt,yn8:()=>at,N0y:()=>it,dZX:()=>ct,bQt:()=>vi,oS0:()=>bt,lL_:()=>yn,Nsj:()=>hn,psV:()=>Tn,xPW:()=>An,pyR:()=>ei,p8l:()=>Jn,Wkf:()=>Ge,zHr:()=>Ve,NIO:()=>$e,$26:()=>WO,Esk:()=>Gn,s9T:()=>rt,MEy:()=>hu,j5E:()=>on,vAw:()=>qn,NMQ:()=>Bn,mNm:()=>zn,rwv:()=>Ti,s_5:()=>ti,RgZ:()=>Xn,unl:()=>Ei,Qy0:()=>Oi,pYu:()=>Vn,wIJ:()=>yv,GFH:()=>Ke,Ury:()=>Un,S91:()=>Cn,p3$:()=>Ni,wSh:()=>Z,BDP:()=>ji,pGS:()=>Zn,ARY:()=>Ot,XGc:()=>ai,fO_:()=>qr,wwy:()=>Ze,h_8:()=>Dn,_XL:()=>mn,j2V:()=>li,dMV:()=>ni,NBX:()=>c_,OXy:()=>vt,BXd:()=>ot,CJB:()=>pi,lXI:()=>yt,nqG:()=>_i,C68:()=>wn,yxQ:()=>gi,Yj_:()=>et,D25:()=>Xe,ZIY:()=>pt,Tl4:()=>Ov,lwr:()=>Pn,NkU:()=>ui,Rtp:()=>ii,YGx:()=>st,uTS:()=>ri,MCv:()=>qe,IYE:()=>Kn,PiC:()=>fi,MVv:()=>mt,h_m:()=>ft,tJI:()=>Qe,fDt:()=>Je,cNQ:()=>ci,SwE:()=>Wn,ZHR:()=>yi,lD1:()=>Ln,lVm:()=>lt,vnX:()=>fO,$x5:()=>TO,_R1:()=>dO,wUm:()=>yO,z7V:()=>Ai,dC6:()=>nt,MBD:()=>ze,GmF:()=>ya,cKm:()=>dt,iP_:()=>Nn,NVC:()=>tt,tPT:()=>ll,tZe:()=>Gp,kRE:()=>qy,psB:()=>Hy,X0$:()=>sl,zE1:()=>ml,Wm5:()=>Xs,vyX:()=>uc,wLZ:()=>ul,W4V:()=>se,EtK:()=>As,Wtd:()=>ol,asT:()=>__,kGs:()=>ge,ewt:()=>ST,O_f:()=>pu,sOy:()=>Bt,Tde:()=>hr,LMI:()=>qu,skb:()=>ug,sPt:()=>Fu,sH1:()=>Mu,RPM:()=>gE,h27:()=>rc,Uqd:()=>lc,xG:()=>gg,Z2f:()=>wb,fgW:()=>Wv,I69:()=>fg,ZxB:()=>Eg,mdt:()=>mE,Qbq:()=>cb,rny:()=>Ji,UEY:()=>Da,Q0T:()=>La,Lyr:()=>Va,sBn:()=>Ca,itK:()=>Sa,H9$:()=>Ua,KPc:()=>Ia,zos:()=>wa,ELQ:()=>Ga,dZs:()=>ha,Cz4:()=>ma,z_L:()=>xa,fGe:()=>Ea,iuF:()=>Ra,Wib:()=>Pa,Hn0:()=>$a,obS:()=>Wa,E$L:()=>ba,XUh:()=>Na,Qp_:()=>_a,_jk:()=>Oa,sKE:()=>va,WmG:()=>Aa,QKx:()=>Fa,Oik:()=>ka,s0A:()=>ga,o9m:()=>ja,MCd:()=>Ma,RsS:()=>nc,tGK:()=>$l,lIv:()=>hl,Vg3:()=>na,mkC:()=>Yi,xv5:()=>aa,a14:()=>qi,yv0:()=>ia,Zm0:()=>Bi,Nxd:()=>Wi,$mM:()=>ra,ifj:()=>Vr,NWi:()=>Qb,xr3:()=>Hb,wNf:()=>Jl,iJH:()=>Kb,d89:()=>$i,Edd:()=>Vi,Z5t:()=>Gi,uGe:()=>Fi,UoR:()=>ki,xvW:()=>qb,$qe:()=>Bb,yPM:()=>Ta,$cp:()=>El,vKJ:()=>fl,VtG:()=>Fc,AID:()=>Wf,B1H:()=>l_,b7X:()=>sb,$uE:()=>_e,keo:()=>ub,C_p:()=>am,G27:()=>ah,JA0:()=>jy,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ne,YYG:()=>Ae,f_2:()=>Fy,w3l:()=>Yg,QHB:()=>ih,Jso:()=>Xg,RXH:()=>Wm,Vr9:()=>yh,lMm:()=>tb,BlA:()=>L_,fmQ:()=>Es,yRD:()=>Lg,NcL:()=>pm,QK6:()=>de,ymd:()=>Np,JV_:()=>lf,XiW:()=>sT,Yrx:()=>gy,GPx:()=>al,gjI:()=>il,vlo:()=>qT,E_P:()=>dE,aAL:()=>dp,NBq:()=>ms,wp9:()=>EE,DsR:()=>op,MPc:()=>Qf,gWE:()=>Kf,DT_:()=>Jf,ipn:()=>zf,ORg:()=>Ci,_wz:()=>Xf,RYR:()=>_T,PP2:()=>Py,wS7:()=>kb,cBQ:()=>Bc,pBq:()=>Sf,DsO:()=>ee,X78:()=>cf,xZs:()=>nf,YFy:()=>Ay,Gmt:()=>Xy,K$w:()=>Jy,DSj:()=>yp,Mfr:()=>Ny,k9j:()=>Hc,ww$:()=>cl,WVU:()=>Ky,hxF:()=>Zs,nwO:()=>k_,Mzk:()=>$c,aFF:()=>Eb,HRH:()=>vu,EZK:()=>ed,Kxm:()=>Jp,Z9i:()=>$E,CrF:()=>Gy,DNd:()=>Ba,vUy:()=>S_,lJh:()=>Au,zHo:()=>Nu,sEJ:()=>d_,UO$:()=>Df,zeJ:()=>Ar,dLR:()=>Ss,JQy:()=>Ls,XtP:()=>Rs,Ug0:()=>rn,A1W:()=>lb,sw:()=>Zp,nv3:()=>nO,JgD:()=>rO,nve:()=>y_,SkP:()=>Ds,SAs:()=>If,PWK:()=>Yo,IM5:()=>Ps,Mfk:()=>ob,mB6:()=>Cb,p6d:()=>w,o0x:()=>U,ufS:()=>bb,k7L:()=>Ob,mrB:()=>I,ncP:()=>xt,Zmi:()=>Dt,hm5:()=>kt,ECL:()=>Yr,vPL:()=>nd,qmL:()=>cE,hPi:()=>Rf,hXd:()=>zi,OCS:()=>Zi,p2l:()=>Fs,qF1:()=>Rp,_X$:()=>Pp,yj2:()=>uv,bzh:()=>OE,k66:()=>es,kiP:()=>Eo,pSg:()=>ce,kz_:()=>Uy,H_U:()=>rs,t9e:()=>za,j2$:()=>Wp,PFL:()=>sr,aJ3:()=>DO,To9:()=>br,wpo:()=>_d,ADq:()=>jE,UUb:()=>LE,tQX:()=>DE,xy8:()=>pr,EUG:()=>Nr,AFK:()=>Xt,X3M:()=>_r,WN0:()=>ts,kDl:()=>ws,uDV:()=>uE,IhQ:()=>Us,R$r:()=>pE,w80:()=>Co,Pfu:()=>Ja,Gtj:()=>Ul,fyF:()=>Il,kkq:()=>Zo,u5q:()=>$t,O$n:()=>vd,ptG:()=>gd,f4_:()=>hm,uap:()=>mm,d7q:()=>vy,liG:()=>Sy,$oF:()=>Oy,avf:()=>kT,DiQ:()=>jT,cfX:()=>DT,vD3:()=>MT,Qrb:()=>LT,EJQ:()=>FT,HWy:()=>CT,gjS:()=>RT,y6v:()=>UT,JUW:()=>My,GtP:()=>Sm,_kX:()=>Ha,u1e:()=>Qa,sJj:()=>yb,CJp:()=>Rm,uKF:()=>db,wo0:()=>By,s5:()=>Ho,cwx:()=>qo,Y6b:()=>cy,TTx:()=>ef,UtR:()=>py,HaQ:()=>tf,E6I:()=>Vy,Won:()=>yy,vTU:()=>ly,Nsy:()=>pd,KMQ:()=>Tb,Do$:()=>Td,CSV:()=>$s,TMe:()=>dy,l1V:()=>Pu,VQ1:()=>Uu,z7d:()=>HT,Xaq:()=>as,Sj8:()=>U_,PJj:()=>Fl,k3T:()=>an,PjQ:()=>Di,s7l:()=>Cc,GGR:()=>GT,j5q:()=>$T,DnY:()=>wc,RY5:()=>nE,Px$:()=>AT,KPC:()=>a_,NIY:()=>Mc,HvW:()=>Dc,Fof:()=>Za,BTI:()=>md,uie:()=>od,ChB:()=>td,q27:()=>Nd,vrC:()=>Ah,fAQ:()=>ff,XkT:()=>Sc,lrH:()=>Tf,nt9:()=>Xr,XH8:()=>Od,XH2:()=>nn,jFi:()=>bd,qhs:()=>Uo,wwR:()=>Ed,Uk3:()=>zt,ev7:()=>u_,RB9:()=>Dy,iFp:()=>AE,e$p:()=>RE,PcX:()=>PE,SpP:()=>NE,R6_:()=>kO,CY1:()=>YO,Ajk:()=>Ac,Yiz:()=>_c,FK9:()=>mc,UOo:()=>vb,aTW:()=>Zy,uug:()=>Kl,P$2:()=>HO,XS2:()=>Vl,Hyb:()=>su,d3Y:()=>yc,Klp:()=>Tc,WxZ:()=>QO,Gzu:()=>Ru,ZOr:()=>Pc,uqV:()=>ay,Pm4:()=>re,hWO:()=>Qt,nVD:()=>aE,dED:()=>hy,P2h:()=>my,jrr:()=>po,mmY:()=>fo,T6O:()=>ns,h6J:()=>xp,hM2:()=>e_,XR6:()=>X,jmz:()=>lE,IHt:()=>sE,NZI:()=>xE,wdF:()=>df,kgP:()=>yf,ZYI:()=>vp,QXK:()=>Rl,efz:()=>Pl,Q5d:()=>Nl,Ysv:()=>Sl,UWq:()=>JT,ocC:()=>KT,io3:()=>en,Sbt:()=>Do,roS:()=>Lo,Ww1:()=>jo,QaS:()=>Vc,ERZ:()=>Gg,CL1:()=>t_,idV:()=>zp,nIW:()=>Ht,fjE:()=>FO,sG0:()=>Ab,tV7:()=>Ml,g8o:()=>hv,Qy:()=>mv,t2P:()=>LO,KbW:()=>vo,wId:()=>_o,LS0:()=>Ao,bFH:()=>qd,Rgl:()=>Qd,fW1:()=>dm,Ywp:()=>lO,pg:()=>wd,WSA:()=>Kd,fed:()=>zg,tT_:()=>Cs,KbL:()=>Uc,JBA:()=>tr,aNC:()=>tO,RFJ:()=>Op,Zeh:()=>Lf,OT5:()=>sO,mC3:()=>Ol,kR6:()=>C_,NVY:()=>fE,k6v:()=>Sp,FEC:()=>wp,Ob5:()=>Rd,KUV:()=>Pd,dvH:()=>yE,V3i:()=>Eh,VD3:()=>tn,mm2:()=>Iu,rou:()=>gf,izH:()=>Ka,DK$:()=>Xa,KMp:()=>pp,c31:()=>At,mbo:()=>FE,gT8:()=>Pt,CZ8:()=>fs,uGi:()=>Os,Poc:()=>gt,_9k:()=>_s,ZTM:()=>hs,bwT:()=>vs,tzW:()=>wt,tF$:()=>Rt,o96:()=>Ts,M4S:()=>gs,_vs:()=>ip,xF8:()=>PT,HQx:()=>mb,ATu:()=>kE,j1S:()=>Ii,V3K:()=>Si,Lmx:()=>wi,ZaZ:()=>_t,n_1:()=>sy,N6e:()=>lp,SxO:()=>yo,w3p:()=>TE,xU7:()=>pe,Y_p:()=>Mo,$k6:()=>Fo,Gdl:()=>Rb,U6P:()=>Nb,OwB:()=>jO,hTh:()=>oE,xqc:()=>Qo,JvE:()=>Ko,i29:()=>Xu,dzT:()=>Qi,uPS:()=>Yc,cZV:()=>Wc,n3B:()=>Jv,e6O:()=>Yv,s7j:()=>dv,j$Q:()=>xy,kW2:()=>Pm,tH7:()=>Bo,Yxg:()=>Bs,MaZ:()=>VT,nqN:()=>xT,jWj:()=>zT,o_J:()=>os,hgZ:()=>rd,yW4:()=>$p,uT0:()=>Fp,C82:()=>Mp,u9Z:()=>vf,zl1:()=>rf,J$m:()=>oy,j_Q:()=>bc,OaI:()=>Oc,wB1:()=>s_,SP6:()=>Sd,ZYr:()=>i_,IMU:()=>bp,FoU:()=>ky,DVz:()=>Ub,mxe:()=>Qv,FHr:()=>Uf,D1g:()=>_f,VO3:()=>bO,de5:()=>hO,Uw1:()=>Te,J6q:()=>ME,XCe:()=>lo,fbl:()=>uO,Ir:()=>bo,XQO:()=>Oo,QXb:()=>xd,P8_:()=>of,iiD:()=>cp,MOC:()=>$d,WF:()=>Md,xE1:()=>Li,idW:()=>v_,QWZ:()=>hb,YL3:()=>xc,Fn9:()=>T,j2U:()=>ks,MpE:()=>It,kQw:()=>ur,mfm:()=>lu,vZp:()=>Zt,E8K:()=>E_,VSb:()=>ds,vr_:()=>lr,Vmh:()=>P_,FgW:()=>Th,oDv:()=>ls,kuw:()=>cs,eHk:()=>XT,Tt2:()=>ss,T6Y:()=>Dr,_26:()=>iu,YkM:()=>mr,J6y:()=>Yl,njU:()=>zl,TBP:()=>us,IT0:()=>VE,x_:()=>fb,biM:()=>yd,TMl:()=>fd,Vkd:()=>tu,WiY:()=>VO,_zi:()=>ru,J6D:()=>wu,Lt4:()=>Sr,QEi:()=>vr,whI:()=>Qr,KIu:()=>Jr,JhM:()=>oe,C_0:()=>Fr,qIF:()=>Xv,O27:()=>E,aBi:()=>Ad,xOX:()=>Js,EdS:()=>Wt,WgC:()=>Gt,eEv:()=>ar,A4t:()=>Zl,YOQ:()=>er,Wos:()=>Cr,jWr:()=>Ya,Or$:()=>Er,lhE:()=>Zr,CwH:()=>Or,pzC:()=>Hs,ymH:()=>Xl,QZu:()=>fr,rYH:()=>$O,FVt:()=>Ur,Kn2:()=>ue,jgw:()=>uu,OXP:()=>ps,lS4:()=>gr,g5f:()=>GO,fp6:()=>Hl,Uty:()=>la,YkG:()=>Tr,xdS:()=>St,kMF:()=>Zf,$NE:()=>Yt,bC9:()=>Vt,Ian:()=>Ui,KVV:()=>pb,q9e:()=>ko,iIf:()=>Pb,ian:()=>el,m6e:()=>Mr,OFd:()=>Qs,kqr:()=>cr,fnZ:()=>Hr,VFZ:()=>tl,ZiX:()=>Ft,j5n:()=>wr,zkt:()=>_,Pcm:()=>o_,QDV:()=>qs,M5u:()=>xO,laD:()=>Kv,mtq:()=>ir,CtB:()=>Sb,CBv:()=>ae,I0t:()=>kr,u1G:()=>BT,gk1:()=>qv,Bgb:()=>Bv,uzs:()=>Kr,v0l:()=>Du,Zqp:()=>fy,j0k:()=>Wo,tCm:()=>Jt,gmx:()=>Gl,mOr:()=>bu,TwZ:()=>bv,GyU:()=>iO,zGm:()=>Cd,bMg:()=>Zd,EyD:()=>Wb,FQA:()=>Yb,fZN:()=>ry,xsF:()=>Vb,Lxg:()=>Gb,O3l:()=>Kc,Wni:()=>Qc,wRx:()=>Xb,OxG:()=>Wd,uJQ:()=>Gd,qWg:()=>Ib,i96:()=>Id,zhn:()=>Jb,G8q:()=>Ri,Jct:()=>hT,A9Y:()=>te,Y5F:()=>Dg,gxP:()=>le,c$P:()=>Wl,M7o:()=>sc,BBN:()=>co,ZBU:()=>J,UkJ:()=>No,xkv:()=>af,z$M:()=>g_,KAm:()=>Ly,lCl:()=>Yf,rkF:()=>om,IU6:()=>Qp,RGr:()=>h,aYu:()=>m,ije:()=>jl,Buf:()=>up,YLu:()=>Dl,ct9:()=>$o,XkY:()=>ey,T5R:()=>Ld,uQS:()=>ny,wcJ:()=>xo,d$I:()=>pl,rSp:()=>dd,Sx:()=>kc,Ilm:()=>bl,Ki6:()=>zs,VGk:()=>ap,sFD:()=>Ym,eWN:()=>A_,dWE:()=>pv,Lkd:()=>lT,aDL:()=>jf,yaA:()=>iy,lOh:()=>Nf,DBr:()=>IO,hK$:()=>xl,TZ_:()=>Hp,CMB:()=>zv,FU8:()=>jc,J$p:()=>xf,b5s:()=>Mf,h2W:()=>Kt,SL_:()=>hf,oUH:()=>Dp,ck9:()=>Dd,nL:()=>_b,k$p:()=>qm,Xs0:()=>Ll,u7I:()=>Af,rxg:()=>yu,bji:()=>fu,oCZ:()=>tm,MjG:()=>mO,FuV:()=>Lp,$ju:()=>kp,t6d:()=>jp,m5F:()=>fe,sx:()=>N_,rSc:()=>Lb,U10:()=>vc,L8n:()=>Qy,R9X:()=>uy,rj2:()=>uf,_C4:()=>Yp,tCj:()=>sf,uAg:()=>_y,wx9:()=>wT,KF3:()=>Bp,ax9:()=>qp,HH7:()=>sp,ufV:()=>Ry,_6y:()=>qc,XTh:()=>pO,AJo:()=>Gc,Ixr:()=>$y,P6Y:()=>F_,Bd_:()=>XE,xkB:()=>JE,W41:()=>Of,WkI:()=>bf,sSE:()=>KE,GMd:()=>Hu,Bxm:()=>ZE,FVh:()=>YE,U_T:()=>Jd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>_u,Ls5:()=>gu,$bd:()=>Eu});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:()=>P,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:()=>je,editRoles:()=>Ce,editStartDate:()=>De,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)},R=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),P=R("startOf"),S=R("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"),D=(0,l.equals)("9999"),j=(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")],[j,(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")],[D,(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.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 Re(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 Pe(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Re(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=Pe(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=Pe(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=Pe(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 De(e,t){e.startDate=t||""}function je(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.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))),Rt=Nt("configuration/relationTypes"),Pt=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.__,"/")]]),Dt=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,jt=e=>()=>Dt(e),kt=(e,t)=>{const r=Lt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Dt(n)},Ft=e=>e&&e.includes("uri$$"),Mt=jt("entities"),xt=jt("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=>5===e.split("/").length,tr=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},rr=e=>e.replace(/uri\$\$/g,Ut);function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ir=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Wt),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",bt.TYPE_STRING)]),ar=(0,l.has)("values"),or=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(bt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(bt.TYPE_LOOKUP)],[ar,(0,l.always)(bt.TYPE_ENUM)],[ir,(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")]]),sr=(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){nr(e,t,r[t])}))}return e}({},e,{type:or(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),lr=e=>!!e&&(!!e.autoGenerated&&e.type!==bt.TYPE_NESTED||!!e.parentAutoGenerated),ur=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),cr=(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),pr=e=>ur(e)?"analyticsAttributes":"attributes",dr=(0,l.propEq)("hidden",!0),yr=(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))),fr=yr(bt.TYPE_NESTED),Tr=yr(bt.TYPE_REFERENCE),Er=yr(bt.TYPE_IMAGE),mr=(0,l.either)(fr,Tr),hr=(e,t)=>{const r=ur(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(".")},br=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),Or=(0,l.pipe)(br,Boolean),vr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),gr=(0,l.both)(Or,(0,l.pipe)(br,("rdm",(0,l.pipe)(qt,(0,l.equals)("rdm")))));const _r=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=pr({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:[]},Ar=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=_r(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",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=>Ar(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],Pr=[bt.TYPE_ACTIVENESS_DATE,bt.TYPE_TIMESTAMP,bt.TYPE_LOCAL_DATE],Sr=e=>Rr.includes(e),wr=e=>Pr.includes(e),Ir=[bt.TYPE_INT,bt.TYPE_LONG,bt.TYPE_NUMBER,bt.TYPE_FLOAT,bt.TYPE_DOUBLE,bt.TYPE_COUNT],Ur=e=>Ir.includes(e),Cr=e=>[bt.TYPE_FLOAT,bt.TYPE_DOUBLE].includes(e),Lr=[bt.TYPE_BOOLEAN,bt.TYPE_BOOLEAN_RADIO,bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Dr=e=>Lr.includes(e),jr=[bt.TYPE_URL,bt.TYPE_BLOG_URL,bt.TYPE_IMAGE_URL],kr=e=>jr.includes(e),Fr=yr(bt.TYPE_EMAIL),Mr=e=>bt.TYPE_SSN===e;var xr,$r=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(xr||(xr={}));const Vr=(0,l.curry)(((e,t,r)=>{var n;const i=e===xr.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)))})),Gr=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Wr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Gr),Yr=(0,l.pipe)((0,l.reject)(E),Wr),Br=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("?")?"&":"?")+Gr(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}},qr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Hr=(0,l.equals)(qr.SUGGESTING),Qr=(0,l.equals)(qr.EDITING),Kr=(0,l.equals)(qr.VIEWING),Jr=(0,l.either)(Qr,Hr),Xr=(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)(Xr(e),(0,l.prop)("extendsTypeURI"))(t))),Zr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(zr(e,r)));return n(r)})),en=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=zr(e,n);return r})),tn=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?tn(e,Xr(e,t.extendsTypeURI),r):void 0,rn=(e,t)=>{const r=t.map(en(e));return(r.length?r.reduce(l.intersection):[])[0]},nn=(e,t)=>tn(e,(0,l.is)(Object,t)?t:Xr(e,t),"typeImage"),an=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Zr(e,t,n.uri)?r.concat(n.uri):r),[]),on={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"},sn={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},ln={[on.EQUALS]:"equals",[on.NOT_EQUALS]:"not",[on.STARTS_WITH]:"starts with",[on.MISSING_VALUE]:"missing value",[on.IN_RANGE]:"in range",[on.HAS_ALL]:"has all",[on.FULL_TEXT]:"full text",[on.EXISTS]:"exists",[on.COUNT_EQUALS]:"count equals",[on.COUNT_NOT_EQUALS]:"count not equal",[on.COUNT_LT]:"count less",[on.COUNT_LTE]:"count less or equal",[on.COUNT_GT]:"count greater",[on.COUNT_GTE]:"count greater or equal",[on.COUNT_RANGE]:"count in range",[on.LT]:"less than",[on.LTE]:"less than or equal",[on.GT]:"greater than",[on.GTE]:"greater than or equal",[on.IN_FILE]:"in file",[on.NOT_IN_FILE]:"not in file",[on.CONTAINS]:"contains",[on.ON]:"on",[on.BEFORE]:"before",[on.AFTER]:"after",[on.WITHIN]:"within"},un="in",cn="notIn",pn="not range",dn=e=>({[un]:on.EQUALS,[cn]:on.NOT_EQUALS}[e]||e),yn={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},fn={[yn.LAST_DAY]:"Last 24 hours",[yn.LAST_3DAYS]:"Last 3 days",[yn.LAST_WEEK]:"Last week",[yn.LAST_MONTH]:"Last month",[yn.LAST_YEAR]:"Last year",[yn.PICK_DATE]:"Pick date"},Tn={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},En={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},mn="<No label>",hn={IN:"in",OUT:"out"};var bn=r(87918),On=r.n(bn);function vn(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){gn(e,t,r[t])}))}return e}function gn(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={startDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return On().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return On().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},An=vn({id:{type:bt.TYPE_ENTITY_ID,get label(){return On().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},_n,{roles:{type:bt.TYPE_STRING,get label(){return On().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:bt.TYPE_STRING,get label(){return On().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),Nn={workflow:{type:bt.TYPE_STRING,get label(){return On().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:bt.TYPE_STRING,get label(){return On().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:bt.TYPE_STRING,get label(){return On().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Rn={commenter:{type:bt.TYPE_STRING,get label(){return On().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Pn={notResolved:{type:bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return On().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Sn={createdBy:{type:bt.TYPE_STRING,get label(){return On().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:bt.TYPE_STRING,get label(){return On().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},wn={matches:{type:bt.TYPE_COUNT,get label(){return On().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:bt.TYPE_COUNT,get label(){return On().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},In={sourceSystems:{type:bt.TYPE_STRING,get label(){return On().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:bt.TYPE_STRING,get label(){return On().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:bt.TYPE_INT,get label(){return On().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:bt.TYPE_STRING,get label(){return On().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:bt.TYPE_STRING,get label(){return On().text("Match Rules")},uri:Un.matchRules,name:Un.matchRules,faceted:!0,hideForDataTenant:!0},[Un.MLRecommendedMatch]:{type:bt.TYPE_STRING,get label(){return On().text("Match IQ")},uri:Un.MLRecommendedMatch,name:Un.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},Ln=vn({},An,Nn,Rn,Pn,Sn,wn,In,Cn,{type:{type:bt.TYPE_STRING,get label(){return On().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Dn="NOT_MATCH";var jn=r(13980),kn=r.n(jn);function Fn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Mn(e,t,r[t])}))}return e}function Mn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xn=kn().oneOf(["mobile","tablet","desktop"]),$n=kn().shape({deviceTypes:kn().oneOfType([xn,kn().arrayOf(xn)]),roles:kn().arrayOf(kn().string)}),Vn=kn().shape({value:kn().string,lookupCode:kn().string}),Gn=kn().shape({link:kn().string,filename:kn().string}),Wn=kn().shape({displayName:kn().string,parent:kn().string}),Yn=kn().oneOfType([kn().string,kn().number,kn().bool,Vn]),Bn=kn().oneOfType([Yn,kn().arrayOf(Yn)]),qn=kn().shape({fieldName:kn().string,values:kn().arrayOf(Bn),filter:kn().string,type:kn().string}),Hn=kn().shape({minValue:kn().number,maxValue:kn().number}),Qn=kn().shape({label:kn().string,name:kn().string,description:kn().string,type:kn().string,hidden:kn().bool,faceted:kn().bool,searchable:kn().bool,uri:kn().string,access:kn().arrayOf(kn().string),cardinality:Hn}),Kn=kn().shape({label:kn().string,uri:kn().string,typeColor:kn().string,direction:kn().string,startObject:kn().object,endObject:kn().object}),Jn=kn().shape({typeColor:kn().string,typeIcon:kn().string,typeImage:kn().string,label:kn().string,uri:kn().string,attributes:kn().arrayOf(Qn)}),Xn=kn().shape({uri:kn().string,label:kn().string,memberTypes:kn().array,extendsTypeUri:kn().string,attributes:kn().arrayOf(Qn)}),zn=kn().shape({uri:kn().string,label:kn().string,extendsTypeUri:kn().string,relationshipTypeURIs:kn().arrayOf(kn().string)}),Zn=kn().shape({uri:kn().string,description:kn().string,label:kn().string,schemaVersion:kn().string,entityTypes:kn().arrayOf(Jn),roles:kn().arrayOf(kn().object),groupTypes:kn().arrayOf(kn().object),relationTypes:kn().arrayOf(Kn),graphTypes:kn().arrayOf(zn),interactionTypes:kn().arrayOf(Xn),sources:kn().arrayOf(kn().object)}),ei=kn().shape({uri:kn().string,type:kn().string}),ti=kn().shape({uri:kn().string,attributes:kn().object,type:kn().string,timestamp:kn().number,members:kn().object}),ri=kn().shape({uri:kn().string,type:kn().string}),ni=kn().shape({value:kn().object,ov:kn().bool,type:kn().string,uri:kn().string}),ii=kn().shape({refEntity:kn().oneOfType([kn().array,kn().object]),refRelation:kn().oneOfType([kn().array,kn().object]),value:kn().object,ov:kn().bool,type:kn().string,uri:kn().string}),ai=kn().oneOf((0,l.values)(qr)),oi=kn().shape({type:kn().oneOf(Object.values($e)).isRequired,attributeTypeUri:kn().string.isRequired,parentUri:kn().string.isRequired,uri:kn().string,message:kn().string}),si={attributeType:Qn,showEmptyEditors:kn().bool,lazy:kn().bool,mode:ai,metadata:Zn,ownError:oi,errors:kn().arrayOf(oi),crosswalks:kn().array,onAddAttributes:kn().func,onAddOneMore:kn().func,onDeleteAttribute:kn().func,onChangeAttribute:kn().func,additionalControlsRenderer:kn().func,hideDeleteButton:kn().bool,showNonOv:kn().bool,state:kn().oneOf(["deleted","edited"]),expanded:kn().bool},li=Fn({attributeValue:ni},si),ui=Fn({attributeValue:ii},si),ci=kn().shape({value:kn().oneOfType([kn().string,kn().bool,kn().number]),ov:kn().bool,type:kn().string,uri:kn().string,lookupCode:kn().string,lookupRawValue:kn().string}),pi=kn().shape({totalOvValues:kn().number,totalValues:kn().number}),di=kn().shape({inRelations:kn().arrayOf(kn().oneOfType([kn().object,kn().string])),outRelations:kn().arrayOf(kn().oneOfType([kn().object,kn().string])),groups:kn().arrayOf(kn().string),entityTypes:kn().arrayOf(kn().string),nextEntry:kn().object}),yi=kn().oneOf(["asc","desc"]),fi=kn().shape({id:kn().string,content:di,allowOnlyCreateNew:kn().bool,sortColumn:kn().string,sortOrder:yi,"text-empty":kn().string,max:kn().number,icon:kn().string,caption:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n,editingEnabled:kn().bool}),Ti=kn().shape({id:kn().string,graph:kn().shape({type:kn().string,layout:kn().number,deep:kn().number,limit:kn().number,uri:kn().string,options:kn().shape({reverseRelations:kn().bool})}),sortBy:kn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:yi,max:kn().number,icon:kn().string,caption:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n}),Ei=kn().shape({id:kn().string,caption:kn().string,pageSize:kn().number,icon:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n,attributes:kn().object}),mi=kn().shape({entityUri:kn().string,entityType:kn().string,entityLabel:kn().string,object:ei}),hi=kn().shape({relationUri:kn().string,relationType:kn().string,relationLabel:kn().string,direction:kn().string,object:ri}),bi=kn().shape({entity:mi,relation:hi}),Oi=kn().shape({value:kn().string,isRawFilter:kn().bool}),vi=kn().shape({id:kn().string,label:kn().string,name:kn().string,availableEntityTypes:kn().array}),gi=kn().shape({id:kn().string,allowMergeAll:kn().bool,matchActions:kn().object,availableTabs:kn().arrayOf(kn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),_i=kn().shape({matchRules:kn().arrayOf(kn().string),object:ei,shortestTransitiveMatchPath:kn().arrayOf(kn().shape({matchRules:kn().arrayOf(kn().string),match:kn().string})),direct:kn().bool,matchScore:kn().number}),Ai=kn().arrayOf(_i),Ni=kn().arrayOf(kn().shape({uri:kn().string,label:kn().string})),Ri=[{label:On().text("And"),value:"and"},{label:On().text("Or"),value:"or"},{label:On().text("And not"),value:"and not"},{label:On().text("Or not"),value:"or not"}];function Pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Si=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),wi=(0,l.pipe)(Si,(0,l.propOr)("","label")),Ii=(0,l.curry)(((e,t)=>{const r=Si(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Ui=(0,l.curry)(((e,t,r)=>{const[n,i]=Ii(e,r);return Zr(e,n,t)||Zr(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){Pi(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Li=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?hn.OUT:hn.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(hn.IN),i=r(hn.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Di=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),ji={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},ki=(0,l.curry)(((e,t)=>e.every((e=>Fi(e,t))))),Fi=(0,l.curry)(((e,t)=>{const r=lr(t);return Mi(e,t)&&(e===ji.READ||!r)})),Mi=(e,t)=>!t||!t.access||t.access.includes(e),xi=(0,l.curry)(((e,t,r)=>Fi(ji.READ,r)&&(Hr(t)?Fi(ji.INITIATE_CHANGE_REQUEST,r):Fi(e,r)))),$i=xi(ji.CREATE),Vi=xi(ji.DELETE),Gi=xi(ji.UPDATE),Wi=ki([ji.CREATE,ji.MERGE,ji.READ,ji.UPDATE]),Yi=ki([ji.UPDATE,ji.READ,ji.CREATE]),Bi=ki([ji.UPDATE,ji.READ]),qi=ki([ji.DELETE,ji.UPDATE,ji.READ]),Hi=(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["*"])),Qi=(e,t,r)=>(0,l.pipe)((0,l.map)(Hi(e,t)),(0,l.filter)(l.identity))(r),Ki=(e,t,r)=>{const n=Qi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Fi(ji.MERGE,r)},Ji=(0,l.curry)(((e,t,r,n)=>{const i=Si(e,n),[a,o]=Ii(e,n);return i&&Fi(ji.CREATE,i)&&Zr(e,a,t.type)&&Zr(e,o,r.type)})),Xi=(e,t,r,n,i)=>{const a=Xr(e,n.type),o=Qi(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(Ji(e,n,i))||a.some(Ji(e,i,n))}))},zi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Xr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ki(o,i,a),canAddRelation:Xi(e,o,i,r,n),canMark:Fi(ji.UPDATE,a)&&Fi(ji.READ,a)}},Zi=(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),ea=ur,ta=(0,l.complement)(ea),ra=Fi(ji.READ),na=e=>{let{attributeType:t,mode:r}=e;return ta(t)&&$i(r,t)&&!dr(t)},ia=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=Ft(r.uri),o=Gi(n),s=$i(n);return(0,l.cond)([[ea,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},aa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=Ft(r.uri),s=Gi(n),u=Vi(n),c=sa(ji.UPDATE,n,a,r),p=sa(ji.DELETE,n,a,r);return(0,l.cond)([[ea,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)},oa=(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=>!Mi(e,n)||!oa(e,t,r[n.name],n)))))})),sa=(0,l.curry)(((e,t,r,n,i)=>Hr(t)?oa(ji.INITIATE_CHANGE_REQUEST,r,n,i):oa(e,r,n,i))),la=(0,l.both)((0,l.complement)(dr),ra),ua="SuperUser",ca="allTenants",pa=[ca,"allCustomers"],da=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===ua})).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===ua){const e=r?pa.concat(r.map((e=>`allTenants.${e}`))):pa,n=r&&t[0]===ca?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}))},ya={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"},fa={[ya.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[ya.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[ya.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[ya.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[ya.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[ya.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[ya.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[ya.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[ya.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[ya.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[ya.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[ya.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[ya.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[ya.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[ya.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[ya.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[ya.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[ya.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[ya.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[ya.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[ya.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[ya.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[ya.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[ya.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[ya.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Ta=(0,l.curry)(((e,t,r)=>da({allowedPermissionsNames:e,permissionsNames:ya,permissionsConfig:fa}).some((e=>e(t,{params:{tenant:r}}))))),Ea=Ta([ya.CAN_EXPORT]),ma=Ta([ya.CAN_EXPORT_ACTIVITIES]),ha=Ta([ya.CAN_IMPORT_ENTITIES_FROM_DT]),ba=Ta([ya.CAN_READ_ENTITIES_FROM_DT]),Oa=Ta([ya.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),va=Ta([ya.CAN_UPDATE_PROCESS_INSTANCE]),ga=Ta([ya.CAN_VIEW_WORKFLOW_DEFINITION]),_a=Ta([ya.CAN_CONFIG_ENVIRONMENT_REGISTER]),Aa=Ta([ya.CAN_UPDATE_WORKFLOW_DATA_TASK]),Na=Ta([ya.CAN_READ_WORKFLOW_DATA_TASK]),Ra=Ta([ya.CAN_MANAGE_WORKFLOW_DEFINITION]),Pa=Ta([ya.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),Sa=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),wa=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Ia=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ua=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Ca=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS]),La=Ta([ya.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Da=Ta([ya.CAN_CREATE_CONFIG_JAR]),ja=Ta([ya.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),ka=Ta([ya.CAN_VIEW_CONFIG_JAR]),Fa=Ta([ya.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Ma=Ta([ya.CAN_VIEW_WORKFLOW_JOBS]),xa=Ta([ya.CAN_MAKE_BULK_UPDATE]),$a=Ta([ya.CAN_OPEN_DATA_LOADER_EXECUTE,ya.CAN_OPEN_DATA_LOADER_READ]),Va=Ta([ya.CAN_BULK_DELETE_PROFILES]),Ga=Ta([ya.CAN_READ_MDM_DATA_ENTITIES]),Wa=Ta([ya.CAN_READ_DVF]),Ya=Ta([ya.IS_FREEMIUM_ADMIN]),Ba=(0,l.reject)(dr),qa=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),Ba,(0,l.filter)(e))(t),Ha=(0,l.curry)(((e,t)=>qa((t=>na({attributeType:t,mode:e})),t))),Qa=(0,l.curry)(((e,t)=>qa((t=>na({attributeType:t,mode:e})||la(t)),t))),Ka=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(la)),Ja=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ja(e)])))),Xa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(la),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Xa(e)])))),za=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...za(e)])))),Za=(0,l.pipe)(Xr,(0,l.converge)(l.concat,[Xa,za]));function eo(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){to(e,t,r[t])}))}return e}function to(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ro=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,ro(e)))},t))),no=e=>{var t;return eo({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},io=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),ao=(0,l.when)(io,(0,l.dissoc)("values")),oo=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return eo({},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})})),so=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},lo=(0,$r.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ja,t).concat((0,l.chain)(Ja,r)).some(so)})),uo=e=>{let t=!1;const r=ro((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?eo({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},co=e=>{const t=lo(e),r=(0,l.map)((e=>ro((0,l.pipe)(ao,(0,l.when)((0,l.always)(e),oo))))(t)),n=(0,l.map)(no),i=(0,l.map)(uo);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},po=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),yo=(0,l.prop)("relationshipTypeURIs"),fo=(0,l.curry)(((e,t)=>e.graphTypes.filter(To(e,t)))),To=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return n.some(Ui(e,t))},Eo=(e,t)=>(0,l.pipe)(po,(0,l.defaultTo)({}),yo,(0,l.defaultTo)([]),(0,l.chain)(Ii(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Xr(e)))(e,t),mo=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),ho=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),bo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ho((0,l.complement)(mo))(e)},Oo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ho(mo)(e)},vo=(0,l.pipe)(Xr,(0,l.propOr)([],"matchGroups")),go=(e,t,r)=>(0,l.pipe)(vo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),_o=(0,l.curry)(((e,t,r)=>(0,l.pipe)(go,(0,l.propOr)(r,"label"))(e,t,r))),Ao=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(vo,(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]})),No=e=>(0,l.partition)(mo,e),Ro=(0,l.includes)(l.__,["and","or","not"]),Po=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),So=(0,l.includes)(l.__,["equals","notEquals","in"]),wo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Ro(t)?wo(r):Po(t)?r.filter(Wt):So(t)?r.map((0,l.prop)("uri")).filter(Wt):[]})),l.uniq),Io=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(wo),l.uniq),Uo=(0,l.pipe)(vo,Io),Co=(0,l.pipe)(Ao,Io),Lo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Do=(0,l.pipe)(Lo,Xa),jo=(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||Zr(e,n,t)})(e,t))})(e,t)),ko=e=>!!e.required,Fo=(e,t,r)=>{const n=(0,l.cond)([[Wt,Xr(e)],[Yt,Si(e)]])(t);return Mo(e,n,r)},Mo=(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&&!lr(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=Fo(e,n,r).filter((e=>a.some(Bt(e.uri))))}else t.attributes&&(i=Mo(e,t,r));i&&n.push(...i)}return n})):t.type===bt.TYPE_REFERENCE?Fo(e,_t(t),r):[],xo=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),ko]),e.attributes||[])},$o=(e,t)=>{const r=Pt(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},Vo=(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)?On().text(n):n};return r(null,t)})),Go=["label","description","abbreviation","caption","toolTip"],Wo=e=>Vo(Go,e),Yo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Ht(t);return r.find((e=>{let{uri:t}=e;return Ht(t)===n}))})),Bo=(0,l.curry)(((e,t)=>{const r=Ht(t);return(0,l.pipe)(Yo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),qo=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"})},Ho=(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}))},Qo=(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)})),Ko=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Xr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Jo(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){Xo(e,t,r[t])}))}return e}function Xo(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 Zo(i,e,t,r,n)},Zo=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=zo(t,e,n,i);return r.length?Jo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(mr),(0,l.prop)("children"))).filter(la).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},es=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["attributes","analyticsAttributes"])},ts=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["attributes"])},rs=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["analyticsAttributes"])},ns=(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)})),is=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Ht(r)===e})))),as=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),is("LUD")),(0,l.defaultTo)(r))(t||[])},os=(e,t)=>{let{survivorshipStrategies:r}=e;return is(t,r)},ss=(0,l.allPass)([(0,l.complement)(l.isNil),Fi(ji.READ)]),ls=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Fi(ji.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)),Fi(ji.CREATE)]),cs=(0,l.curryN)(2,(0,l.pipe)(Xr,ls)),ps=e=>{let{ov:t}=e;return!1!==t},ds=(e,t)=>((e,t)=>kr(e.type)&&ae(t))(e,t)||((e,t)=>Fr(e.type)&&oe(t))(e,t),ys=(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))),fs=ys("refEntity"),Ts=ys("refRelation"),Es=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ms=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},hs=(0,l.prop)("objectURI"),bs=(0,l.prop)("objectURI"),Os=(0,l.prop)("type"),vs=(0,l.pipe)(fs,(0,l.defaultTo)({}),hs),gs=(0,l.pipe)(Ts,(0,l.defaultTo)({}),bs),_s=(0,l.pipe)(fs,(0,l.defaultTo)({}),Os),As=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Ns=(0,l.evolve)({refEntity:re,refRelation:re}),Rs=(e,t,r,n)=>{const i=_r(e,r),a=Xr(e,t.type)||Si(e,t.type);if(0===i.length)return null;const o=pr(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},Ps=(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?Ps(a.value,o):a},Ss=(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 Ps(e[r],i)})),ws=(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")]]),Is=(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.map)(ws),(0,l.when)((()=>i.length>0),(0,l.map)(Is(e,i))))(r)})),Us=Is(null),Cs=Is(ps),Ls=(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=Ss(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},Ds=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(vs,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),js=Object.values(_n),ks=(0,l.includes)(l.__,js),Fs=e=>js.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Ms(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 $s=(e,t)=>`${e}_${t}`,Vs=[Ln.matches.name,Ln.matchRules.name],Gs=(0,l.values)(Nn).map((e=>e.name)),Ws=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Gs)))),Ys=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Vs)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>$s(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),Bs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Ws(r),Ys(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith($s(`dtPotentialMatches.${t.name}`,"")))))(Ln)},qs=(0,l.propEq)("uri",Ln.type.uri),Hs=e=>(0,l.values)(Cn).some((0,l.propEq)("uri",null==e?void 0:e.uri)),Qs=(0,l.propEq)("uri",In.sourceSystems.uri),Ks=Object.values(An),Js=(0,l.includes)(l.__,Ks),Xs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ms({},t,{[r.uri]:void 0===n?r.defaultValue:n})},zs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},Zs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ms({},t,{[r.uri]:n})},el=(0,l.propEq)("uri",An.roles.uri),tl=(0,l.propEq)("uri",An.tags.uri);function rl(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){nl(e,t,r[t])}))}return e}function nl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const il=e=>{let{parentUri:t,attributeType:r}=e;return rl({uri:kt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[mr,(0,l.always)({value:{}})],[Or,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),Sr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},al=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ha(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),vr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=il({parentUri:r,attributeType:e});let s=Nr(n,e);s&&(e.type===bt.TYPE_REFERENCE&&(s=wt(s)),a.value=al({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(0,l.isEmpty)(a.value)&&!vr(e)||(o[t]=[a])}return o},ol=e=>{let{entity:t,metadata:r}=e;return Fo(r,t.type,!0).filter(vr).reduce(((e,t)=>{const n=t.name,i=tr(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:ll({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},sl=(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?rl({},e,{value:sl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return rl({},s(t),al({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),ll=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=il({parentUri:n,attributeType:r}),u=ws(l);return(0,xe.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},ul=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,ws(n),a,o,i)}))},cl=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)}))},pl=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)}))},dl=(0,l.either)((0,l.propSatisfies)((0,l.anyPass)([e=>""===e,l.isNil]),"value"),(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity"))),yl=(0,l.reject)(dl),fl=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=>fl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),yl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},Tl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return fl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Ns),deleteEmptyComplex:e})},El=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(Tl(e),(0,l.reject)(l.isEmpty))},ml=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return ks(r)?Xs({entity:e,attributeType:r}):ll({entity:e,attributeType:r,parentUri:n,index:i})}),e))),hl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return ks(r)?Zs({entity:e,attributeType:r,value:i}):cl({entity:e,attributeType:r,uri:n,value:i})})),bl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return ks(r)?zs({entity:e,attributeType:r}):pl({entity:e,attributeType:r,uri:n})})),Ol=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)},vl="UrlThumbnail",gl="CdnUrlThumbnail",_l=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(ps):(0,l.head)(n);return e&&e.value}return null})),Al=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>_l(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Nl=Al(["CdnUrl","Url"],!0),Rl=Al(["CdnUrlPreview","UrlPreview"],!0),Pl=Al([gl,vl],!0),Sl=Al([gl,vl]),wl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[cr,(0,l.always)(t)],[(0,l.both)(ur,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=cr(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(ks(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)}),[])},Il=(e,t,r)=>{const n=Ka(e),i=(0,l.any)(r?l.T:ps);return wl(n,t,i)},Ul=(e,t,r,n,i,a)=>{const o=Ft(null==r?void 0:r.uri)?Ha(t,e):Qa(t,e);return wl(o,r,((e,o)=>{const s=na({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:ps,e)||cr(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let Cl;const Ll=e=>{Cl=e};function Dl(e,t){return Cl(e,t)}const jl=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)})),kl=50,Fl=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=kl,offset:a=0}=e;return Dl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},Ml=(0,l.once)((()=>Dl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),xl=e=>Dl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),$l=(e,t)=>Dl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Vl=e=>Z.fromNull(ln[e]).map(On().text).orSome(""),Gl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Wl=(0,l.split)("_"),Yl=(0,l.includes)("_"),Bl=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),ql=(0,l.curry)(((e,t)=>e.some(Bl(t)))),Hl=ql([on.IN_RANGE,on.COUNT_RANGE,on.WITHIN]),Ql=ql([on.EXISTS,on.MISSING_VALUE]),Kl=(0,l.cond)([[Ql,(0,l.always)(0)],[Hl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Jl=(0,l.complement)(Ql),Xl=ql([on.HAS_ALL,on.EQUALS,on.NOT_EQUALS]),zl=ql([on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE]),Zl=ql([on.IN_FILE,on.NOT_IN_FILE]),eu=e=>{switch(e){case on.COUNT_EQUALS:return on.EQUALS;case on.COUNT_NOT_EQUALS:return on.NOT_EQUALS;case on.COUNT_LT:return on.LT;case on.COUNT_LTE:return on.LTE;case on.COUNT_GT:return on.GT;case on.COUNT_GTE:return on.GTE;case on.COUNT_RANGE:return on.IN_RANGE}},tu=ql([on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS]),ru=ql([on.WITHIN]),nu=[[on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE],[on.NOT_IN_FILE,on.IN_FILE],[on.EQUALS,on.NOT_EQUALS,on.HAS_ALL],[on.LT,on.LTE,on.GT,on.GTE],[on.MISSING_VALUE,on.EXISTS],[on.COUNT_RANGE],[on.IN_RANGE],[on.STARTS_WITH,on.CONTAINS],[on.FULL_TEXT],[on.ON,on.BEFORE,on.AFTER,on.NOT_EQUALS],[on.WITHIN]],iu=(e,t)=>nu.some((r=>r.includes(e)&&r.includes(t))),au=(0,l.pipe)(l.omit,l.values),ou={OPTIONS_FOR_STRING:au(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_DATE:[on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS,on.MISSING_VALUE,on.EXISTS,on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE,on.IN_FILE,on.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:au(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_BLOB:au(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_NUMBER:au(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_LOOKUP:au(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],on),OPTIONS_FOR_ENUM:au(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_ID:[on.EQUALS,on.NOT_EQUALS,on.IN_FILE,on.NOT_IN_FILE],OPTIONS_FOR_COUNT:[on.EQUALS,on.NOT_EQUALS,on.LT,on.LTE,on.GT,on.GTE,on.IN_RANGE],OPTIONS_FOR_COMPLEX:[on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE,on.EXISTS,on.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[on.EQUALS,on.NOT_EQUALS,on.EXISTS,on.MISSING_VALUE]},su=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 ou.OPTIONS_FOR_STRING;case bt.TYPE_LOOKUP:case bt.TYPE_DEPENDENT_LOOKUP:return ou.OPTIONS_FOR_LOOKUP;case bt.TYPE_ENUM:return ou.OPTIONS_FOR_ENUM;case bt.TYPE_DATE:case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_TIMESTAMP:case bt.TYPE_LOCAL_DATE:return ou.OPTIONS_FOR_DATE;case bt.TYPE_BOOLEAN:case bt.TYPE_BOOLEAN_RADIO:return ou.OPTIONS_FOR_BOOLEAN;case bt.TYPE_BLOB:return ou.OPTIONS_FOR_BLOB;case bt.TYPE_LONG:case bt.TYPE_INT:case bt.TYPE_FLOAT:case bt.TYPE_DOUBLE:case bt.TYPE_NUMBER:return ou.OPTIONS_FOR_NUMBER;case bt.TYPE_ENTITY_ID:return ou.OPTIONS_FOR_ID;case bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[on.EQUALS];case bt.TYPE_COUNT:return ou.OPTIONS_FOR_COUNT;case bt.TYPE_NESTED:case bt.TYPE_REFERENCE:case bt.TYPE_IMAGE:return ou.OPTIONS_FOR_COMPLEX;default:return ou.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(zl,n):n},lu=e=>[Qe.and,Qe.andNot].includes(e),uu=e=>[Qe.or,Qe.orNot].includes(e),cu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),uu)),pu=(du=[Qe.and],e=>e.slice(0,-1).every((e=>du.includes(e.operator))));var du;const yu=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),fu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),Tu=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},Eu=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)&&Tu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},mu="and",hu=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)(mu,n,e),o=(e=>[Qe.andNot,Qe.orNot].includes(e))(a)?Eu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},bu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Ou=e=>Array.isArray(e)?e.map(Ou).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),vu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),gu=e=>`'${e}'`,_u=e=>`"${e}"`,Au=(0,l.pipe)(Ou,vu),Nu=(0,l.pipe)(Au,gu),Ru=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Hl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),Pu=(e,t)=>zl(t)?{type:bt.TYPE_INT}:Zl(t)?{type:bt.TYPE_FILE}:tu(t)&&!ru(t)&&wr(e.type)?{type:bt.TYPE_LOCAL_DATE}:e,Su=Object.values(yn),wu=e=>Su.includes(e),Iu=e=>On().text(fn[e]),Uu=e=>{const t=f()();switch(e){case yn.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case yn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case yn.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case yn.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case yn.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Cu(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){Lu(e,t,r[t])}))}return e}function Lu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Du=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),ju=(0,l.curry)(((e,t,r)=>{const n=r.map(Hl(e)||t.endsWith(".count")?Au:Nu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),ku=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Fu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Kl(t);return(0,l.pipe)(ku(i),(0,l.map)(ju(t,r)),Du(" or "))(n)},Mu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Nu).join(",")})`},xu=e=>`*${e}*`,$u=e=>`URL:${e}`,Vu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Gu=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===on.IN_FILE?r:`not ${r}`},Wu=(e,t)=>[P(e,t),S(e,t)],Yu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Bu(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case on.ON:return Cu({},e,n?{filter:on.EQUALS}:{filter:on.IN_RANGE,values:[Wu(i,n)]});case on.BEFORE:return Cu({},e,{filter:on.LTE,values:[[S(i,n)]]});case on.AFTER:return Cu({},e,{filter:on.GTE,values:[[P(i,n)]]});case on.WITHIN:return Cu({},e,{filter:on.IN_RANGE,values:[Uu(i)]})}}return e}),Fu),Bu=(0,l.propSatisfies)(wr,"type"),qu=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",on.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Fu({filter:on.EQUALS,fieldName:t,values:[r]}))),new hu).build())),Du(" or "))(r)}],[(0,l.propEq)("filter",on.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Fu({fieldName:r,filter:t,values:n.map((0,l.pipe)(Ou,xu))})}],[(0,l.propEq)("filter",on.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Fu(Cu({},e,{values:(0,l.flatten)(r)})):Vu(r)?Mu(Cu({},e,{filter:"listEquals"})):Fu(e)}],[(0,l.propEq)("filter",on.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Kl(t);return(0,l.pipe)(ku(i),(0,l.map)(ju(t,r)),Du(" and "))(n)})(Cu({},e,{values:(0,l.flatten)(e.values)})):Bu(e)?(e=>{const{values:t}=e,r=!Bu(e),[n]=t;return(new hu).addClause(Fu(Cu({},e,{filter:on.LT,values:[P(n,r)]}))).addClause(Fu(Cu({},e,{filter:on.GT,values:[S(n,r)]}))).orBuild()})(e):Vu(t)?Mu(Cu({},e,{filter:"not listEquals"})):Fu(e)}],[(0,l.propSatisfies)(Zl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Fu({fieldName:r,filter:Gu(t,r),values:n.map((0,l.prop)("link")).map($u)})}],[(0,l.propSatisfies)(zl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Fu({fieldName:`${r}.count`,values:n,filter:eu(t)})}],[(0,l.propSatisfies)(tu,"filter"),Yu],[(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 ju(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return ju(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Fu]],Hu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Jl(e)||Ku(r))},Qu=e=>Array.isArray(e)?Ku(e):null!=e&&Ou(e).length>0,Ku=e=>e&&e.length>0&&e.every(Qu);function Ju(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xu=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},zu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Zu=(e,t,r)=>"children"===e?tc(r,[...t][0],!0):r,ec=(e,t,r)=>"values"===e?[...r,...t]:r,tc=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)(Zu,t),e);if(!r&&Xl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(ec,t),e)}return(0,l.append)(t,e)},rc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Xu(e),r=e=>e.fieldName===t?e:r({fieldName:zu(e),children:[e]});return r(e)})(t);return tc(e,r)}),[]),nc=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")),ic=e=>{let[t]=e;return t.children?ic(t.children):t.operator},ac=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=ic(t)===Qe.andNot,a=n(t,!1),o=i?`not ${Eu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${ic(r)||mu} ${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&&nc(i)&&!t?r(i):n(i,a)}],...e])(o))),new hu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},oc=(0,l.pipe)((0,l.propOr)("","filter"),Yl),sc=(0,l.map)((0,l.when)(oc,(e=>{const[t,r]=Wl(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){Ju(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),lc=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)(Hu),sc,rc,ac([...e,...qu],t))},uc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),cc=[on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS,on.MISSING_VALUE,on.EXISTS],pc=[on.EQUALS,on.NOT_EQUALS,on.STARTS_WITH,on.MISSING_VALUE,on.HAS_ALL,on.FULL_TEXT,on.EXISTS],dc=[on.EQUALS,on.NOT_EQUALS,on.LT,on.LTE,on.GT,on.GTE,on.IN_RANGE],yc=(e,t)=>{const r=sr(e);return(e=>{switch(e){case _n.startDate.name:case _n.endDate.name:case Nn.dueDate.name:case Sn.createdTime.name:case Sn.updatedTime.name:case In.reltioLoadDate.name:case In.createDate.name:case In.updateDate.name:case In.deleteDate.name:case In.publishDate.name:return cc;case wn.matches.name:case In.count.name:return dc;case Nn.workflow.name:case Nn.assignee.name:case Nn.step.name:case Rn.commenter.name:case Sn.createdBy.name:case Sn.updatedBy.name:case In.sourceSystems.name:case In.value.name:return pc;default:return null}})(t)||su(r)},fc=[on.EQUALS,on.NOT_EQUALS,on.CONTAINS,on.STARTS_WITH,on.MISSING_VALUE,on.HAS_ALL,on.IN_RANGE,on.WITHIN,on.EXISTS,on.ON],Tc=(0,l.pipe)(yc,(0,l.filter)((0,l.includes)(l.__,fc))),Ec=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),mc=e=>{let{query:t,body:r}=e;return t=Ec(t),Dl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},hc=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)(lc(),uc(t.globalFilter))(n),activeness:t.activityFilter||En.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Yr(i)}`},bc=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=hc(e,t,r);return Dl(n)},Oc=e=>Dl(`/entities/_total?${e}`),vc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(ls),(0,l.map)((0,l.prop)("uri")))(e),i={filter:on.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(lc(),uc(r.globalFilter))([i,a]),s=Yr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||En.ACTIVE_ONLY,max:4});return Dl("/entities/_typeAheadSearch"+s,{method:"GET"})},gc=(0,l.pipe)((0,l.reject)(l.isNil),Wr),_c=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)(lc(),uc(i))(r),p=gc({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return mc({query:p,body:d})},Ac=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return _c({fieldName:t,searchParams:i,options:n})},Nc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Rc=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)(lc(),uc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Nc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Yr(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=Rc(e,t,r);return Dl(n)},Sc=e=>Dc(e,{select:"secondaryLabel"}),wc=(e,t)=>{const{select:r=Nc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),Dl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Ic=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),Ft)),Uc=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=Ic(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=hr(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)(lc(),uc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),Dl(`${s}/api/${o}/${t}/_object`,m)},Cc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Lc={options:"sendHidden,addRefAttrUriToCrosswalk"},Dc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lc;return Dl(`/${e}${Yr(t)}`)},jc=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 Dl(n,r)},kc=e=>Dl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Fc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return Dl(`/${e}/_clone${Yr({executeLCA:!1,valuesToCopy:r})}`,n)},Mc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return Dl(`/entities/_events/_total${Wr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},xc=(e,t)=>Dl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),$c=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return Dl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},Vc=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 Dl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Wr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Gc=e=>{const t=new FormData;return t.append("file",e),Dl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,On().text("Can't upload file"));return Promise.reject(t)}))},Wc=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 Dl(`/personal/findSavedSearches${Wr({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"}})},Yc=e=>Dl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),Bc=e=>Dl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),qc=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return Dl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},Hc=e=>{let{uri:t}=e;return Dl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Qc=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),qc)(e),Kc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),qc)(e);function Jc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xc=["max","offset","filter"],zc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:zc(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){Jc(e,t,r[t])}))}return e}({},t,(0,l.pick)(Xc,e)))),Zc=(0,l.omit)(["activeness"]),ep=(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)(zc(e),(0,l.omit)(Xc))(e))),Zc,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Yr({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},tp=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),rp=(0,l.reject)(l.isNil),np=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),ip=e=>Dl(np(e),{method:"GET",headers:{"Content-Type":"application/json"}}),ap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,np);return Dl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},op=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?El()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(rp,ne,JSON.stringify);return Dl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},sp=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"),np,n),o=be(i(t),i(r)).concat(ve(t,r));return Dl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},lp=(e,t)=>{const{url:r,options:n}=ep(e,t);return Dl(r,n).then(tp)},up=(e,t)=>Dl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),cp=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===hn.IN?a.inRelations=[n]:a.outRelations=[n],Dl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},pp=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return Dl(`${t}/recentSearches${Yr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},dp=e=>Dl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),yp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return Dl(`/recentSearches${Yr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};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){Tp(e,t,r[t])}))}return e}function Tp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ep={select:"label,secondaryLabel,name,type,startDate,endDate"},mp=(0,l.reject)(l.isNil),hp=(0,l.pipe)(mp,Wr),bp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=fp({},Ep,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return Dl(`/${t}/_tree${hp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Op=e=>{let{uri:t,graphUri:r}=e;const n=fp({},Ep,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return Dl(`/${t}/_parents${hp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},vp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=fp({},Ep,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return Dl(`/${t}/_hops${hp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function gp(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 _p=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},Ap="/activities",Np=e=>{let{label:t,description:r}=e;return Dl(Ap,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:_p()}})},Rp=e=>{const t=Yr(e);return Dl(Ap+t,{method:"GET"})},Pp=e=>Dl(`/activities/_total${Yr(e)}`,{method:"GET"}),Sp=e=>{const{entityUri:t}=e,r=gp(e,["entityUri"]);return Dl(`/${t}/_activities${Yr(r)}`,{method:"GET"})},wp=e=>{const{entityUri:t}=e,r=gp(e,["entityUri"]);return Dl(`/${t}/_activities/_total${Yr(r)}`,{method:"GET"})};function Ip(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){Up(e,t,r[t])}))}return e}function Up(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Cp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Lp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return Dl(Cp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Dp=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=Cp({url:r,workflowPath:t,tenant:n})),Dl(s,{method:i||"GET",body:JSON.stringify(a),headers:Ip({"Content-Type":"application/json"},null!=o?o:{})})},jp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Cp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return Dl(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)},kp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Cp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Ip({},l,{comment:o}):l;return Dl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Fp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Cp({url:`/tasks${s?Yr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Ip({objectURIs:[i]},(0,l.reject)(E,a)))};return Dl(u,Ip({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Mp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return Dl(Cp({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})})},xp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return Dl(Cp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Ip({max:a,offset:o},i))})},$p=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return Dl(Cp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},Vp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return Dl(Cp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Gp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return Vp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Wp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return Dl(Cp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Yp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return Vp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},Bp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return Vp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},qp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return Vp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},Hp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return Dl(Cp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Qp=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return Dl(Cp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Kp=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(ps);return a&&a[0]&&(r=n.length>0&&a[0].value?Kp(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}}),""),Jp=(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=Kp(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},Xp=/[,\s]*$/,zp=e=>{const t=On().text(mn);if(!e)return t;const r=e.replace(Xp,"");return""===r.toString().trim()?t:r},Zp=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},ed=(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=Zp(e,r.referencedEntityTypeURI);if(n)return Jp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Jp({attributes:t||{}},r.dataLabelPattern);return""},td=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}`},rd=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)}`},nd=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",id=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),Pl,(0,l.prop)("value"))),ad=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),id),od=(e,t,r)=>{const n=ad(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Ss(e),id)))(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")])})(Xr(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,id))(r)})(e,r)||nn(e,r.type);return nd(t,n)};function sd(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){ld(e,t,r[t])}))}return e}function ld(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ud="DTSS/",cd=(0,l.replace)(new RegExp("^entities/"),""),pd=e=>ud+e.dataTenant+"/"+e.uri,dd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),yd=e=>!(!e||!e.dataTenant),fd=(0,l.startsWith)(ud),Td=(0,l.pipe)((0,l.ifElse)(fd,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),Ed=(0,l.ifElse)(yd,pd,(0,l.prop)("uri")),md=e=>e&&e.uri?e.dataTenant?pd(e):cd(e.uri):"",hd=(0,l.curry)(((e,t,r)=>(Xr(t,r.type)||{})[e]||"")),bd=hd("label"),Od=hd("typeGraphIcon"),vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xr(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(ps)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:ed(e,o,i),uri:a.uri}})).filter(l.identity):[]},gd=(0,l.pipe)(vd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),_d=(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=_d(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):_d(e.slice(1),r)}})),Ad=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Nd=e=>(0,l.propOr)([],"matchRules",e),Rd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?sd({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},Pd=(e,t,r)=>t&&r?r.aEntity:e,Sd=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 Dl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Wr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},wd=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 Dl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Wr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Id=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return Dl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Ud=(e,t,r)=>Promise.all(t.map((async t=>await Dl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),Cd=async(e,t)=>await Ud(e,t,"NOT"),Ld=async(e,t)=>await Ud(e,t,"MATCH"),Dd=async(e,t)=>await Promise.all(t.map((async t=>await Dl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kd(e,t,r[t])}))}return e}function kd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fd(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 Md=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return Dl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},xd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return iy({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},$d=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return iy({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Vd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return Dl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Gd=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 Vd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Wd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(yd,i);return Promise.all([s.length?Id(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return Vd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},Yd=(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=Fd(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)}),[])),Bd=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),Yd),qd=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return Dl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(Bd)},Hd=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)},Qd=Hd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return Dl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(Bd)})),Kd=Hd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return Dl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Jd=(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)}},Xd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return Dl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},zd=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 Xd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},Zd=zd("NOT"),ey=zd("MATCH"),ty=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(yd,a);return Promise.all([Ud(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return Xd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},ry=ty("NOT"),ny=ty("MATCH");function iy(e){let{requestProvider:t=Dl,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}`,jd({},Fd(s,["headers"]),{headers:jd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const ay=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return iy({url:Rc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},oy=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return iy({url:hc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},sy=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=ep(t,r);return iy({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(tp,(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)))}))))},ly=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return iy({url:`${Cc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},uy=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return Dl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},cy=e=>{let{dtssPath:t,tenant:r}=e;return Dl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},py=e=>{let{dtssPath:t,customerTenant:r}=e;return Dl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},dy=e=>{let{dtssPath:t,tenants:r}=e;return Dl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},yy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return iy({url:Cc(t),dataTenant:r,customerTenant:n,dtssPath:i})},fy=()=>Dl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function Ty(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){Ey(e,t,r[t])}))}return e}function Ey(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{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=Ty({},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 Dl(`${t}/api/${r}/graph/search${Yr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},hy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return Dl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:Ty({},n,i),headers:{"Content-Type":"application/json"}})},by=(e,t)=>`${e}/${t}/comments`,Oy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return Dl(`${by(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},vy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return Dl(`${by(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},gy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return Dl(by(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},_y=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return Dl(`${by(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Ay=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return Dl(`${by(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ny=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return Dl(`${by(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ry=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return Dl(`${by(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Py=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return Dl(`${by(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},Sy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Yr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return Dl(`${by(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function wy(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){Iy(e,t,r[t])}))}return e}function Iy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uy=e=>{let{tenant:t,servicesPath:r}=e;return Dl(`${r}/oauth/proxy${Yr({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Cy="graphExport",Ly=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await Fy({servicesPath:e,tenant:t,environment:r,namespace:Cy,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(wy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await Fy({servicesPath:e,tenant:t,environment:r,namespace:Cy,options:wy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await Fy({servicesPath:e,tenant:t,environment:r,namespace:Cy,options:wy({method:"POST"},o)})),s},Dy=e=>{let{servicesPath:t,key:r}=e;return Dl(`${t}/settings${Yr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},jy=e=>{let{servicesPath:t}=e;return Dl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},ky=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return Dl(`${n}/plugins${Yr({tenant:t,user:r})}`,{method:"GET"})},Fy=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return Dl(`${n}/configService${Yr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},My=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return Fy({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},xy=e=>{let{servicesPath:t,stateHash:r}=e;return Dl(`${t}/searchLink?key=${r}`,{method:"GET"})},$y=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),Dl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Vy=e=>Dl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Gy=e=>{let{exportPath:t,tenant:r,options:n}=e;return Dl(`${t}/${r}/activities${Yr(n)}`,{method:"POST"})};function Wy(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){Yy(e,t,r[t])}))}return e}function Yy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const By=e=>{const{entityUri:t}=e;return Dl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},qy=e=>{let{entityUri:t,crosswalk:r}=e;return Dl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Hy=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return Dl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[Wy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),Wy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Qy=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return Dl(`/${r}/_${n}${Yr({contributorURI:t})}`,{method:"POST"})},Ky=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return Dl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Jy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return Dl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Xy=e=>{let{entityUri:t,crosswalkId:r}=e;return Dl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function zy(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=>{let{entityTypeUri:t}=e;return Dl(`/dataQuality/fillRates${Wr({entityType:Ht(t)})}`,{method:"GET"})},ef=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){zy(e,t,r[t])}))}return e}({},n===at.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return Dl(`/entityType/${Ht(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},tf=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return Dl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Ht(n)}`,{method:"GET",headers:{env:i}})},rf=e=>{let{timeSeriesServicePath: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 Dl(`${t}/api/${r}/entityType/${Ht(n)}/ml/dataQuality/${o}/timeSeries`,{method:"POST",body:JSON.stringify(c)})},nf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return Dl(`/${t}${Yr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},af=e=>{let{attributeUri:t,value:r}=e;return Dl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},of=e=>{let{attributeUri:t,value:r}=e;return Dl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},sf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return Dl(`/${t}${Yr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},lf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Yr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=El()([[{value:a}]]);return Dl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},uf=e=>{let{entityUri:t,attributeName:r,value:n}=e;return Dl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},cf=e=>{let{entityUri:t,attributeName:r}=e;return Dl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function pf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const df=e=>{let{entityUri:t}=e;return Dl(`/${t}/_historicURIs`,{method:"GET"})},yf=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 Dl(`/${t}/_changesWithTotal${Yr(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){pf(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},ff=(e,t)=>Dl(`/${e}/_previousChange${Yr({timestamp:t})}`,{method:"GET"}),Tf=(e,t)=>Dl(`/${e}${Yr({time:t})}`,{method:"GET"});function Ef(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){mf(e,t,r[t])}))}return e}function mf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const hf=e=>{let{url:t,method:r,data:n,headers:i}=e;return Dl(t,Ef({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:Ef({"Content-Type":"application/json"},null!=i?i:{})}))},bf=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Yr({options:a.join(","),severity:o.join(",")});return Dl(`${t}/validate/${i}/entity/${md({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},Of=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return Dl(`${t}/validate/${n}/entity${Yr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},vf=e=>{let{tenant:t,apiPath:r}=e;return Dl(`${r}/tenants/${t}/name`,{method:"GET"})},gf=e=>{let{tenant:t,apiPath:r}=e;return Dl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},_f=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return Dl(`${a}/preferences${Yr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Af=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 Dl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Nf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return Dl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},Rf=e=>{const{servicesPath:t}=e;return Dl(`${t}/getTokenForWorker`,{method:"GET"})};var Pf=r(29524);const Sf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=Mt(),s={attributes:al({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?cl({entity:e,attributeType:n,uri:i.uri,value:t}):ll({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},wf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(vs),(0,l.filter)(Ft),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),If=(0,l.curry)(((e,t)=>{const r=wf(e=e||{},t=t||{});return r.concat((0,l.chain)(If(e),r))})),Uf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),Cf=Uf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),Lf=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),Ft)),Df=e=>(0,l.pipe)(Cf,Lf(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),jf=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Cf,(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})),kf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),Ft),(0,l.omit)(["uri","timestamp"])),Ff=(0,l.pipe)(kf,(0,l.evolve)({attributes:El(!0)})),Mf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=Df(i);if(a.length>0)for(const t of a)e=jf(t,r[t].uri,e);const o=await jc(Ff(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},xf=async(e,t,r)=>{const n=Vf(e,t),i={};for(const t of n)i[t]=await Mf(e,t,i,r);return i},$f=(0,l.curry)(((e,t)=>{const r=Pf.Node(t);return Df(e[t]).forEach((t=>{const n=$f(e,t);r.addEdge(n)})),r})),Vf=(e,t)=>(0,l.pipe)((0,l.map)($f(e)),(0,l.map)(Pf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Gf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(kf))})),Wf=(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]},Yf=(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 jf(r,n,e)}),e))))}),t)}),Gf),Bf=(0,l.curry)(((e,t)=>(0,l.when)(Ft,(0,l.propOr)(l.__,t,e),t)));function qf(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}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 Qf=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:ot.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Kf=e=>{let{relationUri:t}=e;return{type:ot.DELETE_RELATION,parameters:{relationUri:t}}},Jf=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}}},Xf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:ot.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},zf=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}}},Zf=(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))),eT=e=>e.type===ot.DELETE_RELATION,tT=e=>e.type===ot.CREATE_RELATION,rT=e=>e.type===ot.REPOINT_RELATION,nT=e=>e.type===ot.UPDATE_RELATION,iT=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),aT=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 op({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 ap(e,i).then(o)};case ot.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return cp(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case ot.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return sp({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=[Kf({relationUri:o}),Qf({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(oT(n)),(0,l.map)(aT),iT)(s)}}},oT=e=>t=>qf({dcrProcessor:e},t),sT=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Br({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(oT(r)),(0,l.map)(aT),iT,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},lT=e=>t=>(0,l.map)((t=>qf({},t,{parameters:(0,l.evolve)({parentUri:Bf(e),entityUri:Bf(e),newEntityUri:Bf(e)},t.parameters)})),t),uT=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},cT=(e,t)=>{const r=e.filter(tT).find(Zf(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>nT(o)&&Zf(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!rT(o)||!Zf(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(uT({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},pT=(e,t)=>{const r=e.filter(rT).filter(Zf(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!nT(i)||!Zf(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(uT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},dT=(e,t)=>{const r=e.filter(eT).filter(Zf(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!Zf(t,e)))},yT=(e,t)=>{const r=e.filter(nT).filter(Zf(t));let n=null;const i=e.filter((e=>!r.includes(e)||!nT(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(uT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},fT=e=>{const t=e.filter(eT).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(dT,e)},TT=e=>{const t=e.filter(tT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(cT,e)},ET=e=>{const t=e.filter(rT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(pT,e)},mT=e=>{const t=e.filter(nT).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)(yT,e))(t)},hT=e=>(0,l.pipe)(fT,TT,ET,mT)(e);function bT(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){OT(e,t,r[t])}))}return e}function OT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vT=e=>bT({},(0,l.path)(LT(),e),{startDate:(0,l.path)(FT(),e),endDate:(0,l.path)(MT(),e)}),gT=(e,t)=>(0,l.pipe)((0,l.path)(kT()),Bf(t))(e),_T=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=gT(e,r),i=(0,l.path)(DT(),e)===st.IN,a=e.parentEntityUri||n;return Qf({parentUri:i?t:a,relation:vT(e),entityUri:i?a:t})})),...o.map((t=>{const i=gT(t,r),a=(0,l.path)(DT(),t)===st.IN,o=i!==(0,l.pipe)((0,l.path)(LT()),a?xT:$T)(t),s=WT(e,(0,l.path)(UT(),t)),u=t.parentEntityUri||n,c=Bf(r,i);return o?zf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(LT(),t),isReversed:!1}):Xf({oldRelation:(0,l.path)(LT(),s),newRelation:vT(t)})})),...i.map((e=>Kf({relationUri:e}))),...s.map((e=>Jf({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},AT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return bT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),NT=(0,l.has)("dataTenant"),RT=(0,l.ifElse)(NT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),PT=(e,t)=>(0,l.pipe)(Si,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(js),Ba)(e,t),ST=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)}},wT=(e,t,r)=>{const n=Jp(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)},IT="relation",UT=(0,l.always)([IT,"relationUri"]),CT=(0,l.always)([IT,"relationType"]),LT=(0,l.always)([IT,"object"]),DT=(0,l.always)([IT,"direction"]),jT=(0,l.always)([IT,"object","attributes"]),kT=(0,l.always)(["entity","entityUri"]),FT=(0,l.always)([IT,"startDate"]),MT=(0,l.always)([IT,"endDate"]),xT=(0,l.path)(["startObject","objectURI"]),$T=(0,l.path)(["endObject","objectURI"]),VT=(0,l.path)(["startObject","objectTypeURI"]),GT=(0,l.path)(["endObject","objectTypeURI"]),WT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(UT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=WT(r.connections,t);if(e)return e}}},YT=(0,l.pipe)(WT,(0,l.path)(LT())),BT=(0,l.allPass)([(0,l.pipe)((0,l.path)(kT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(CT()),(0,l.complement)(E))]),qT=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}=KT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=HT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?ST(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},HT=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:hn.IN}:{type:t[0],direction:hn.OUT}:null},QT=e=>e.uri||e,KT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&$i(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===hn.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"],Xr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Xr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(QT,Si(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(hn.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(hn.OUT)),(0,l.map)(u))},t)||{}},JT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Li({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ii(e,n.uri);return n&&(!t||Zr(e,i,t))&&(!r||Zr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Xr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Xr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(ss,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)}},XT=(0,l.curry)(((e,t,r,n,i)=>{const a=Zr(n,l.__,t.type),o=e?GT:VT,s=Zr(n,l.__,r.type),u=e?VT:GT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),zT=(e,t,r)=>{const n=e?GT:VT,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(Zr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function ZT(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){eE(e,t,r[t])}))}return e}function eE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return ZT({},t,{[r]:{parents:n,children:i}})},rE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return ZT({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},nE=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=wf(t,i),o=tE({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>nE(n.uri,t,[e],r)),o)},iE=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)(UT(),n),a=t?rE({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(kT(),n),s=Ft(o)?[o]:[],u=tE({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>nE(t,r,[i],e)),u)}),n)},aE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return iE(r,e,t,nE(e,t))},oE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return aE(t,r,n);if(Vt(e)){const t=WT(n,e);return t&&iE([t],null,r)}return r[e]?nE(e,r):void 0},sE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>sE(e,t))))},lE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>lE(e,t))))},uE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=$t(t),u=aE(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=WT(i,c),!s)return null;o.push({type:Ye.relationConnection,value:s,valueType:Si(a,(0,l.path)(CT(),s))});continue}if(Vt(u)){const e=n[c];if(!e)return null;o.push({type:Ye.tempEntity,value:e,valueType:Xr(a,e.type)});continue}const p=n[u],d=Ds(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ye.attributeValue,value:d,valueType:Ar(a,Xt(d.uri,p.type))}),o.push({type:Ye.tempEntity,value:y,valueType:Xr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},lE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Vt(s),d=p?YT(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Si(a,d.type):Xr(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:Ye.tempEntity,value:T,valueType:Xr(a,T.type)}),o.push({type:Ye.attributeValue,value:s,valueType:E}),m=s.value;const l=vs(s);T=l&&Ft(l)?n[l]:null}}return o},cE=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,pE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?pE(t.value):[]];return e.concat(r)}),[])),dE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,yE=e=>{const t=[...pE((null==e?void 0:e.attributes)||[]),...pE((null==e?void 0:e.analyticsAttributes)||[])];return e?[Ed(e),...t]:[]},fE=(e,t)=>[e,...t.map((t=>dE(e,t)))],TE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return RT(t)}))},EE=(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,Ed({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),hE=(0,l.curry)(((e,t)=>{const r=Lo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(hE(e,r.extendsTypeURI)):n})),bE=(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))),OE=(e,t)=>(0,l.pipe)((0,l.prop)("type"),hE(e),bE(t))(t);function vE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gE=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}},_E=e=>!e.deactivated,AE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},NE=e=>AE(e)+e.message,RE=(0,l.unless)(l.isNil,(0,l.prop)("message")),PE=(0,l.unless)(l.isNil,(0,l.prop)("type")),SE=(0,l.curry)(((e,t)=>Bt(t.parentUri,e))),wE=(0,l.curry)(((e,t)=>t.parentUri===e)),IE=(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))),UE=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),CE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),LE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([VE,_E,SE(e),IE(t),(0,l.complement)(CE(e,t.uri))]))(r)},DE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([VE,_E,wE(e),UE(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",$e.missed))]))(r);return n&&n.message||""},jE=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))},kE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_E,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(UT(),e))]))(t)},FE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_E,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},ME=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([_E,SE(t)]))(r)},xE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_E,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},$E=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?uE(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(fr(a))return Jp(o,e.dataLabelPattern);if(Tr(a)){const t=o,i=vs(t),a=gt(e),s=Xr(n,a);return Ft(i)?Jp(r[i],s.dataLabelPattern):t.label}return""}case Ye.tempEntity:return Jp(o,a.dataLabelPattern);case Ye.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Xr(n,null==e?void 0:e.entityType);return`${zp(i&&Ft(i)?Jp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||wi(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vE(e,t,r[t])}))}return e}({},e,{label:zp(t)})}))},VE=e=>!e.severity||e.severity===Ge.ERROR,GE=(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(GE(n))}));case bt.TYPE_REFERENCE:return!!fs(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}})),WE=(e,t)=>e.every((0,l.complement)(GE(t))),YE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Fo(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||!ps(e.parent))))).forEach((e=>{WE(e.attrValues,n)&&r.push(gE({type:$e.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:On().text("Attribute is required"),source:Ve.local}))})),r}),[])},BE=(0,l.curry)(((e,t,r)=>Rs(e,t,r,!1))),qE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Xr(e),(0,l.prop)("attributes"),(0,l.reject)(dr),(0,l.filter)(Tr),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(BE(e,t)));return(0,l.pipe)(r,(0,l.reject)(vs),(0,l.map)((e=>{let{uri:r}=e;return gE({type:$e.missedRefEntity,uri:"",attributeTypeUri:Xt(r,t.type),parentUri:r,message:On().text("Entity is required"),source:Ve.local})})))(t)},HE=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(vs,Ft)).flatMap((n=>{const i=vs(n),a=t[i],o=Ar(e,Xt(n.uri,r.type));return QE(e,t,o,a)})),QE=(e,t,r,n)=>{const i=At(r),a=i.map((t=>Ar(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",bt.TYPE_REFERENCE))).flatMap(Rt).concat(i);return KE(e,t,n,(e=>a.some(Bt(e.uri))))},KE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=YE(e,r,n),a=qE(e,r),o=HE(e,t,r);return[...i,...a,...o]},JE=(e,t)=>{const r=(0,l.path)(LT(),t)||{};return YE(e,r)},XE=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(kT()),(0,l.ifElse)(Ft,(e=>t[e]),(0,l.always)(null)))(r),i=JE(e,r),a=(e=>(0,l.path)(kT(),e)?[]:[gE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(CT(),e),parentUri:(0,l.path)(UT(),e),message:On().text("Entity is required"),source:Ve.local})])(r),o=((e,t,r)=>r?KE(e,t,r):[])(e,t,n);return[...i,...a,...o]},zE=e=>(0,l.path)(["entity","uri"],e)?[]:[gE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:On().text("Entity is required"),source:Ve.local})],ZE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=YE(e,r),i=zE(t);return[...n,...i]};function em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tm=(e,t)=>{var r,n;const i=Xr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||lo(e)},rm=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),nm=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(rm(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},im=(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)(gs,Ft,l.not)]),(e=>{const t=(0,l.pipe)(gs,Ht)(e);return nm((e=>e.replace(t,t+Ct)))(e)})),(0,l.when)((0,l.pipe)(vs,Ft),(t=>{const r=vs(t),n=e[r],i=n&&om(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){em(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),am=(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)(im(r,e.type)),(0,l.map)(nm(rr))))})(e))),om=(e,t)=>(0,l.evolve)({attributes:fl({valueTransformer:(0,l.pipe)(Ns,im(t),rm(rr)),deleteEmptyComplex:!0}),uri:rr})(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){lm(e,t,r[t])}))}return e}function lm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const um=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(Ut,"g"),"uri$$$$").replace(new RegExp(Ct,"g"),""))),cm=e=>(0,l.pipe)((0,l.evolve)({objectUri:um,objectParentUri:um}),(e=>{return sm({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?$e.missed:$e.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&tr(e.objectUri),uri:e.objectUri,source:Ve.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),pm=(e,t)=>(0,l.map)((0,l.pipe)(cm,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=$E(t,s),p=null!=c&&c.length?c.slice(0,-1):$E(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&Ar(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 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&&er(i)){const n=(0,l.last)(a),i=n.valueType;if(Tr(i)&&Pt(i).includes(o)){const i=vs(n.value),o=i&&Ft(i)?t[i]:null;return o?sm({},e,{parentUri:o.uri,path:a.concat({type:Ye.tempEntity,value:o,valueType:Xr(r,o.type),label:""})}):e}}return e}})(t)))(e),dm=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 ym(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fm;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(fm||(fm={}));const Tm={},Em={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(!Tm[e]){const t=Em[e]||Em.random0;Tm[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){ym(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return Tm[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]})),hm=e=>mm(fm.Charts,e);var bm=r(51404),Om=r.n(bm);const vm=Array.from({length:100},((e,t)=>t/100)),gm=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)},_m={},Am=new(Om())({hash:gm,saturation:vm.slice(15,71),lightness:vm.slice(50,90)}),Nm=(0,l.curry)(((e,t,r)=>{t in _m||(_m[t]={});const n=_m[t];r in n||(n[r]=((e,t)=>{const r=String(gm(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Rm=Nm(Am,"crosswalks"),Pm=Nm(Am,"sources"),Sm=Nm(Am,"contributors");function wm(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){Im(e,t,r[t])}))}return e}function Im(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Um=(0,l.has)("items"),Cm=e=>0===e,Lm=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)},Dm=e=>e.reduce(((e,t)=>e+t.width),0),jm=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),km=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),Fm=e=>e.reduce(((e,t)=>e+t.height),0),Mm=e=>(0,l.is)(String,e)&&e.includes("%"),xm=e=>Boolean(e.spacer),$m=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),Vm=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Um(t)?Vm(t):t)),[]),Gm=e=>({id:e.layout}),Wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Gm;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=Mm(r.width)?$m(i,r.width):u}return Lm(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return Lm(n,t,r)},o=(e,t)=>Um(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,Um(s)?n(s.layout):e(s.view)),d=Cm(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(Um(s))return o.concat(p(wm({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(wm({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Dm(o),height:jm(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Um(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=Cm(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Um(i))return r.concat(p(wm({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(wm({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?Lm(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?Lm(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:km(i),height:Fm(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=Cm(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return wm({},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=wm({},e,{width:a}),s=wm({},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(wm({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return wm({},e,{height:Fm(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(wm({},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 wm({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=wm({},t,{items:(0,l.reject)(xm,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 Vm(f)},Ym=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),Bm=[ct.FilteredEntitiesViewFacet,ct.ActivitiesViewFacet,ct.ProfileStatsFacet,ct.FilteredSavedSearchesFacet],qm=(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=Bm.includes(a.component)?8:4;return wm({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function Hm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Qm(e,t,r[t])}))}return e}function Qm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Km={BarChart:ut.BAR,BarChartGrouped:ut.BAR,BarChartHorizontal:ut.BAR,LineChart:ut.LINE,Map:ut.MAP,Pie:ut.PIE},Jm=(e,t)=>Zt(e)?Kt(e,t):e,Xm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=Km[r];return Hm({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},zm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return Hm({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"]))},Zm=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return Hm({},e,{value:[un,cn,on.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:dn(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Zt(t)||!r?n:(n||[]).concat((i=r,{filter:on.EQUALS,fieldName:"type",values:[i]}));var i},eh=["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"],th={"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:Jm(n,r),filters:Zm(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:Jm(n,r),filters:Zm(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 Hm({id:t,count:o,canRead:u,orderType:s,attributeUri:Jm(r,p),filters:Zm(a,r,p),component:ct.DashboardFacet,title:i,showOthers:!0},Xm(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:Jm(n,r),filters:Zm(a,n,r),chartType:ut.MAP,component:ct.DashboardFacet,title:i,geoUrl:eh[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 Hm({id:t,count:o,canRead:l,attributeUri:Jm(n,r),filters:Zm(a,n,r),component:ct.DashboardFacet,title:i,geoUrl:s,chartType:ut.MAP,projection:"geoMercator"},Xm(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:zm(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:Zm(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:on.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||On().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||On().text("Activity log")}}},rh=e=>({id:e,height:10}),nh=(0,l.pipe)((0,l.map)((e=>{const t=th[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),ih=e=>{if("0.1"===e.version){const t=nh(e.views),r=Wm(rh,e.layout,{columns:4});return{id:e.id,margin:0,layout:Ym(r,t),views:t}}return e},ah=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=>ah(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function oh(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){sh(e,t,r[t])}))}return e}function sh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lh=oh({},pt,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),uh=e=>e,ch={[lh.Attributes]:uh,[lh.HierarchyTree]:uh,[lh.HierarchyPaths]:uh,[lh.RelationsTable]:uh,[lh.Relations]:e=>oh({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[lh.SingleAttributeView]:uh,[lh.CustomView]:uh,[lh.TableAttributeView]:uh,[lh.MapView]:uh,[lh.OldTreeView]:e=>oh({},e,{class:pt.HierarchyTree}),[lh.OldMapView]:e=>oh({},e,{class:pt.MapView}),[lh.ImageAttributeView]:uh,[lh.PotentialMatchesView]:uh},ph=(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)),dh=(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})),yh=e=>{if("0.1"===e.version){const t=ph(e.views),r=Wm(dh(t),e.layout,{columns:4});return{id:e.id,layout:Ym(r,t),views:t,workflow:e.workflow,maxWidth:e.maxWidth,sidePanelViews:e.sidePanelViews,profileBand:e.profileBand}}return e},fh=(e,t)=>e.class===t||e["react-class"]===t,Th=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(fh(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 fh(t,pt.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.includes(n)||t.includes(n)}},Eh=(e,t)=>e.filter((e=>t.some((t=>fh(e,t))))).map((e=>{let{id:t}=e;return t})),mh=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},hh=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),bh=(e,t)=>(e||[]).find((e=>e.activator===t));function Oh(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){vh(e,t,r[t])}))}return e}function vh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gh=(e,t)=>ah(t).map((t=>(0,l.pipe)((0,l.map)((e=>mh(e,t))),(0,l.reject)(l.isNil),l.head)(e))),_h=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Ah=(e,t)=>{const r=gh(e,t.layout),n=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>mh(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return ah(r.layout||{})}})(e,t),i=yh(Oh({},t,{views:r,version:"0.1"})),a=t["entity-type"],o=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head,(0,l.when)((0,l.complement)(l.isNil),(0,l.pick)(["showEntityId","cloneAction"])))(e))(e);return(0,l.reject)(l.isNil,{entityType:a,views:i.views,layout:i.layout,sidePanelViews:n,profileBand:o})},Nh=(e,t)=>{if("scroll"===t.layout.layout){const r=gh(e,t.layout),n=ih(Oh({},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}},Rh=(e,t)=>{const r=gh(e,t.layout)[0];return{class:yt.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},Ph=(e,t)=>{const r=gh(e,t.layout)[0];return{class:yt.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Sh=(e,t)=>{const r=gh(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}},wh=(e,t)=>{const r=gh(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}},Ih=(e,t)=>{const r=gh(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}},Uh=(e,t)=>{const r=gh(e,t.layout)[0];return{class:yt.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},Ch=(e,t)=>{const r=gh(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=hh(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"]}},Lh=(e,t)=>({class:yt.Graph,id:t.id}),Dh=(e,t)=>{const r=gh(e,t.layout)[0];return{class:yt.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},jh=e=>t=>!!(0,l.intersection)(e,t).length,kh=(0,l.cond)([[jh(["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"]),()=>Nh],[jh(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Rh],[jh(["com.reltio.plugins.graph.GraphView"]),()=>Lh],[jh(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>Ph],[jh(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Sh],[jh(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>wh],[jh(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>Ih],[jh(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Uh],[jh(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>Ch],[jh(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>Dh],[l.T,()=>(0,l.always)(void 0)]]),Fh=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(_h),(0,l.map)((t=>Ah(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=>mh(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=>mh(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=ah(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 kh(o)(t,i)},Mh=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))},xh="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var $h;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}($h||($h={}));const Vh={[yt.DQDashboard]:`${xh}DqDashboard.svg`,[yt.Dashboard]:`${xh}Dashboard.svg`,[yt.Graph]:`${xh}Graph.svg`,[yt.RelationshipSearch]:`${xh}GraphSearch.svg`,[yt.Interactions]:`${xh}Interactions.svg`,[yt.PotentialMatches]:`${xh}PotentialMatches.svg`,[yt.Profile]:`${xh}Profile.svg`,[yt.ProfileActivityLog]:`${xh}ActivityLog.svg`,[yt.Relationships]:`${xh}Relationships.svg`,[yt.Sources]:`${xh}Crosswalk.svg`,[yt.Search]:`${xh}Search.svg`,[$h.DashboardGroup]:`${xh}DashboardGroup.svg`,[$h.ProfileGroup]:`${xh}ProfileGroup.svg`,[$h.SearchGroup]:`${xh}SearchGroup.svg`,DEFAULT:`${xh}Default.svg`},Gh=e=>Vh[null==e?void 0:e.class]||Vh.DEFAULT,Wh=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Vh[$h.ProfileGroup]:null,Yh=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Vh[yt.Dashboard]||t===Vh[yt.DQDashboard]})),(0,l.always)(Vh[$h.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Vh[yt.Search]||t===Vh[yt.RelationshipSearch]})),(0,l.always)(Vh[$h.SearchGroup])],[l.T,()=>null]])(e),Bh=e=>(0,l.pipe)((0,l.chain)(Mh),(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:Gh(Fh(e,t)),screen:Fh(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=Fh(t,e);return{label:t.label,icon:Wh(t)||Yh(r)||Gh(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function qh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Hh=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},Qh=e=>({id:e,height:10}),Kh=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)(Hh),(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=ah(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){qh(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Wm(Qh,t.layout,{columns:4});return{views:r,layout:Ym(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function Jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xh=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,zh=e=>(0,l.pipe)((e=>hh(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){Jh(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),Zh=(0,l.prop)("showLookupCode"),eb=e=>{const t=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),r=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>mh(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),u=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),c=(e=>(0,l.pipe)((e=>bh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(Xh,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),p=zh(e),d=(e=>(0,l.pipe)((e=>bh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),y=(e=>(0,l.pipe)((e=>bh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),f=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),T=(e=>(0,l.pipe)((0,l.map)((e=>mh(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e);var E;return{i18n:o,entity:{requestSettings:{defaultMaxValues:t}},image:{attributeFieldsOrder:r},lookups:{autocomplete:n,showCode:void 0===(E=Zh(T))||E},validate:{levels:i,validateReadMode:a},attributePresentations:s,workflow:{enabled:u},defaultRoute:c,customScripts:p,checkUser:d,checkIdle:y,showSwitchToClassic:f}},tb=e=>({layout:Bh(e),pivoting:Kh(e),properties:eb(e)});var rb=r(58697),nb=r.n(rb);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){ab(e,t,r[t])}))}return e}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=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${nb()()}`;return n[e.id].push(t),i=!0,ib({},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]++,ib({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},sb=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(sb(e))}))}))),t},lb=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(db,t),(0,l.propOr)([],"crosswalks",e))),e),ub=(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(ub(e))}))})),r},cb=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=cb(e);r>t&&(t=r)}))})),t+1):t},pb=(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},db=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},yb=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},fb=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},Tb=(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)},Eb=(0,l.eqBy)(db),mb=(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)(Ts,(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)))),hb=(e,t,r,n)=>{const i=`\n importScripts("${e}");\n importScripts("${t.join('","')}");\n postMessage({action:'loaded'});`;let a;try{const e=window.webkitURL||window.URL;a=new Worker(e.createObjectURL(new Blob([i],{type:"application/javascript"})))}catch(e){a=new Worker("data:application/javascript,"+encodeURIComponent(i))}if(a){let e="";a.addEventListener("message",(t=>{if("loaded"!==t.data.action){const i=JSON.parse(t.data);r({task:i,worker:a,innerText:e,config:n}),"setHtml"===i.action&&(e=i.params.html)}}))}return a},bb=(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=On().number(t));return t})),Ob=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?On().number(e,"0,0.0a").toUpperCase():On().number(e,"0,0"):""},vb=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let gb=!0;const _b=e=>gb=e,Ab=(e,t)=>e!==t&&t?gb&&e?`${t} (${e})`:t:e,Nb=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Rb=(e,t,r)=>{const n=Nb(e,t,r);return Ab(r,n)},Pb=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),Sb=(0,l.complement)(Pb),wb=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Ib=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)},Ub=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(Sb(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Cb=(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&&bb(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)?On().text("yes"):On().text("no");case bt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(wu(t)?Iu(t):On().date(t,s));case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_LOCAL_DATE:return t&&(wu(t)?Iu(t):On().date(t,s));case bt.TYPE_TIMESTAMP:return t&&(wu(t)?Iu(t):On().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)?Ab((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Lb={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)"},Db=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})))),kb=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),Db,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}},Fb="__metadata",Mb=(e=>{const t=[Fb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),xb=(0,l.set)(Mb),$b=(0,l.view)(Mb),Vb=xb(Tn.NEW),Gb=xb(Tn.REMOVED),Wb=xb(Tn.EDITED),Yb=xb(Tn.IGNORED),Bb=(0,l.pipe)($b,(0,l.equals)(Tn.REMOVED)),qb=(0,l.pipe)($b,(0,l.equals)(Tn.NEW)),Hb=(0,l.pipe)($b,(0,l.equals)(Tn.EDITED)),Qb=(0,l.pipe)($b,(0,l.complement)(l.isNil)),Kb=(0,l.pipe)($b,(0,l.equals)(Tn.IGNORED)),Jb=(0,l.omit)([Fb]),Xb=(e,t)=>e===Fb?void 0:t;function zb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Zb=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=Zb(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},eO=(e,t)=>Zb((0,l.propEq)("nodeId",t),e),tO=(e,t)=>Zb((0,l.pathEq)(["entity","uri"],t),e),rO=(e,t)=>{const r=eO(e,t);return r.length>1?r[r.length-2]:null},nO=(e,t)=>{const r=eO(e,t);return r.length>0?r[r.length-1]:null},iO=(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=>iO(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},aO=()=>{},oO=(e,t)=>{let{parent:r,nodeProcessing:n=aO}=t;n(e,r),e.children&&e.children.forEach((t=>oO(t,{parent:e,nodeProcessing:n})))},sO=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){zb(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})}}},lO=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&&oO(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}=sO({node:r,connection:n,isReversed:i}),s=Qf({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ze.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=sO({node:r,isReversed:i,connection:n}),l=s?zf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):Xf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},uO=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=uO(r,t);if(e)return e}return!1},cO=(0,l.curry)(((e,t)=>{const r=(0,l.map)(cO(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)=>uO(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:cO(e,n.root)}}));return(0,l.pipe)(r,n)(t)},dO={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},yO={asc:"asc",desc:"desc"},fO=dO.entityLabel,TO=yO.asc,EO=(0,l.always)(0),mO=e=>{let{sortField:t=fO,sortOrder:r=TO,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case dO.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return F_.strings.sort(t,a,o)})(n,r);case dO.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return F_.strings.sort(e,i,a)})(r);default:return EO}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},hO=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(yO)),l.identity,(0,l.always)(TO))),bO=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(dO)),l.identity,(0,l.always)(fO)));var OO=r(91104);let vO;const gO=(e,t)=>(vO||(vO=OO.createClient({key:t})),new Promise((t=>{vO.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)}))}))),_O=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},AO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(ps).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[_O(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(AO(e.value,t,r))),n})),NO=e=>e&&e.length>0,RO=(e,t)=>[].concat(e&&e.attributes?AO(e.attributes,t):[]).filter(l.identity),PO=(e,t,r,n,i)=>{if(e&&e.type){const t=(Xr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=RO(e,t.latitude),n=RO(e,t.longitude),NO(r)&&NO(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(NO(t)&&t[0].value&&NO(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?gO(n.label,i).catch((()=>null)):Promise.resolve(null)},SO=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=Xr(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 PO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?gO(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)))},wO=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=Xr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(Ar(e,r.latitude,t.type)&&Ar(e,r.longitude,t.type)){const e=RO(t,r.latitude),n=RO(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))},IO=(e,t,r)=>Promise.all([wO(e,t),SO(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 UO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){CO(e,t,r[t])}))}return e}function CO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const LO=(e,t)=>t.values.map(_o(e,t.entityTypeUri)),DO=(e,t,r)=>Bs(t.fieldName,r)||Ar(e,Kt(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?Ab(e,t):e}),r)},kO=(0,l.path)(["attrType","label"]),FO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>UO({},e,{[t]:!0})),{});e[r]=e[r]?UO({},e[r],n):n}return e}),{}),MO=(0,l.pipe)((0,l.prop)("values"),E),xO=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",Ln.type.name)),$O=e=>e.type===WO.NUMERIC_RANGE_FACET,VO=e=>e.type===WO.DATE_RANGE_FACET,GO=(0,l.either)($O,VO),WO={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},YO=e=>{switch(null==e?void 0:e.name){case Ln.type.name:return WO.ENTITY_TYPE_FACET;case Ln.createdBy.name:case Ln.updatedBy.name:case Ln.sourceSystems.name:case Ln.tags.name:case Ln.roles.name:case Ln.matchRules.name:case Ln.MLRecommendedMatch.name:return WO.WITH_DROPDOWN_CHECKBOXES_FACET;case Ln.createdTime.name:case Ln.updatedTime.name:case Ln.startDate.name:case Ln.endDate.name:return WO.DATE_RANGE_FACET;case Ln.matches.name:case Ln.matchScore.name:return WO.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return WO.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return WO.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return WO.DATE_RANGE_FACET;default:return WO.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},BO=(0,l.pipe)(DO,YO),qO=(0,l.pipe)((0,l.path)(["attrType","type"]),Dr),HO=(0,l.cond)([[$O,(0,l.always)(on.IN_RANGE)],[VO,(0,l.always)(on.WITHIN)],[(0,l.allPass)([qO,e=>e.values.length>=2]),(0,l.always)(on.EXISTS)],[l.T,(0,l.always)(on.EQUALS)]]),QO=(0,l.cond)([[VO,(0,l.prop)("values")],[$O,(0,l.prop)("values")],[qO,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 KO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const JO=(0,l.pipe)((0,l.path)(["attrType","type"]),Sr),XO=(0,l.pipe)((0,l.path)(["attrType","type"]),Ur),zO=(0,l.pipe)((0,l.prop)("attrType"),Hs),ZO=(0,l.pipe)((0,l.prop)("attrType"),qs),ev=e=>t=>t.values.map((t=>Xr(e,t).label)).join(" , "),tv=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),rv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(On().number),tv)),(0,l.join)(","))(e.values);return`${kO(e)}: ${t}`},nv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),tv)),(0,l.join)(","))(e.values);return`${kO(e)}: ${t}`},iv=e=>t=>`${kO(t)}: ${LO(e,t).join(", ")}`,av=e=>t=>{const r=jO(e,t);return`${kO(t)}: ${r.join(", ")}`},ov=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[ZO,ev(e)],[XO,rv],[JO,nv],[zO,iv(e)],[l.T,av(t)]]),r))),sv=(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){KO(e,t,r[t])}))}return e}({},t,{attrType:DO(e,t,n)}))),ov(e,r))(t),lv=new RegExp(`^${On().text("Search")}`),uv=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...sv(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(lv,"",u)]},cv=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(yn),pv=e=>(e=>cv.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]=Uu(t);return e.replace(r,i).replace(n,a)}),e))(e),dv=(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}`})),yv={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},fv=e=>[yv.geoPolygon,yv.onMapMove].includes(e),Tv=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},Ev=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},mv=(e,t)=>fv(e)?t.map(Tv):[Ev(t)],hv=e=>fv(e)?On().text("Geo Polygon"):On().text("Geo Location"),bv=e=>{switch(e){case yv.geoLocation:return"geoLocation";case yv.geoPolygon:case yv.onMapMove:return"geoPolygon"}},Ov={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},vv=e=>On().text(e),gv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[on.EQUALS]:"=",[on.NOT_EQUALS]:"≠",[on.STARTS_WITH]:"*",[on.MISSING_VALUE]:On().text("missing value"),[on.HAS_ALL]:On().text("has all"),[on.IN_RANGE]:On().text("in range"),[on.FULL_TEXT]:On().text("full text"),[on.EXISTS]:On().text("exists"),[on.COUNT_EQUALS]:`${On().text("count")} =`,[on.COUNT_NOT_EQUALS]:`${On().text("count")} ≠`,[on.COUNT_LT]:`${On().text("count")} <`,[on.COUNT_LTE]:`${On().text("count")} <=`,[on.COUNT_GT]:`${On().text("count")} >`,[on.COUNT_RANGE]:On().text("count range"),[on.LT]:"<",[on.LTE]:"<=",[on.GT]:">",[on.GTE]:">=",[on.IN_FILE]:On().text("in file"),[on.NOT_IN_FILE]:On().text("not in file"),[on.CONTAINS]:"~",[sn.LIST_EQUALS]:"=",[sn.NOT_LIST_EQUALS]:"≠",[sn.LIST_EQUALS_CASE_SENSITIVE]:"=",[sn.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||On().text(e.toLowerCase())},_v=e=>({type:Ov.operator,text:e}),Av=e=>({type:Ov.operator,text:vv(e)}),Nv=e=>({type:Ov.attributeLabel,text:e}),Rv=e=>({type:Ov.specialAttributeLabel,text:e}),Pv=e=>({type:Ov.attributeFilter,text:gv(e)}),Sv=e=>({type:Ov.attributeValue,text:e}),wv=e=>({type:Ov.entityTypeLabel,text:e}),Iv=()=>({type:Ov.space,text:" "}),Uv=()=>({type:Ov.bracket,text:"("}),Cv=()=>({type:Ov.bracket,text:")"}),Lv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),Dv=(0,l.curry)(((e,t)=>t.map(Lv(e)))),jv=(0,l.curry)(((e,t,r)=>[e,...r,t])),kv=jv(Uv(),Cv()),Fv=jv(Iv(),Iv()),Mv=(0,l.curry)(((e,t)=>[e,...t])),xv=e=>Mv(wv(e)),$v=e=>Mv(wv(`${e}: `)),Vv=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=cu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=lu(s),a=uu(s);!r&&t&&n&&(i.push(Uv()),r=!0),i.push(o),r&&a&&(i.push(Cv()),r=!1);const l=e?Av(s):_v(s);i.push(...Fv([l]))}else i.push(o),r&&(i.push(Cv()),r=!1)}return i}},Gv=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),Wv=(0,l.pipe)(Vv({localizable:!1}),Gv),Yv=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},Bv=e=>{let{data:t,values:r,filter:n}=e;return t&&Hu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},qv=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(Bv)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Hv=(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)&&Or(e.data.attrType)})(e)&&[on.HAS_ALL,on.EQUALS,on.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:br((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})))),Ib),Qv=(e,t)=>(0,l.pipe)(Hv,Ub(t))(e),Kv=(0,l.pathEq)(["data","fieldName"],Ln.type.name),Jv=(0,l.path)(["data","entityTypeUri"]),Xv=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),zv=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(cs(e)),attributes:(0,l.filter)((0,l.pipe)(Jv,(0,l.anyPass)([l.isNil,cs(e),r=>{const n=(t.entityTypes||[]).filter(cs(e));return(n.length>1?rn(e,n):null)===r&&!!Xr(e,r)}])))})(t))))),Zv=e=>(0,l.pipe)((0,l.prop)("filter"),Kl,(0,l.equals)(e)),eg=(0,l.curry)(((e,t,r,n,i,a)=>{const o=Bs(n.fieldName)||n.attrType,s=Pu(o,i),u=Cb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>Or(s),()=>(0,l.is)(Object,a)&&a.lookupCode?Ab(a.lookupCode,a.value):Rb(r,br(o),a)],[()=>Hs(s),()=>_o(e,n.entityTypeUri,a)],[()=>Qs(s),()=>Bo(e,a)],[()=>el(s),()=>Qo(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>Ur(c)||Dr(c)),_u),Sv)()})),tg=(e,t,r,n)=>{const i=eg(e,t,r,n.data,n.filter);return(0,l.cond)([[Zv(0),(0,l.always)([])],[(0,l.both)(Zv(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[Iv(),i(r),{type:Ov.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[Iv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),Dv({type:Ov.punctuationMark,text:", "}))(t)]}]])(n)},rg=(e,t)=>{const r=!!Bs(e.data.fieldName);return(0,l.pipe)(Yv,r?Rv:Nv)(e,t)},ng=(e,t,r,n,i)=>[rg(n,i),Iv(),Pv(n.filter),...tg(e,t,r,n)],ig=(0,l.addIndex)(l.map),ag=(0,l.propEq)("length",1),og=(0,l.propSatisfies)((0,l.lt)(1),"length"),sg=(0,l.complement)(l.isEmpty),lg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(yu,(0,l.filter)(Bv),fu,(0,l.map)((n=>({operand:ng(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Vv()))(n)},ug=(0,l.pipe)(lg,l.flatten),cg=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>bd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=lg(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(xv),(0,l.pipe)(s($v),(0,l.unless)((()=>ag(u)||i),kv)))(u)},pg=(e,t,r,n)=>(0,l.pipe)(yu,(0,l.filter)(qv),fu,ig(((n,i,a)=>({operand:cg(e,t,r,n,ag(a)),operator:n.operator}))),Vv(),l.flatten)(n),dg=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Vv(),l.flatten),yg=e=>{let{searchType:t,values:[r]}=e;return mv(t,r).join(", ")},fg=(e,t,r,n,i,a)=>{const o=(e=>e?[Rv(e.isRawFilter?On().text("Raw filter"):On().text("Search")),...Fv([Pv(on.EQUALS)]),Sv(`"${e.value}"`)]:[])(i),s=(e=>e?[Rv(hv(e.searchType)),Iv(),Sv(yg(e))]:[])(a),u=(0,l.pipe)(pg,(0,l.when)((e=>og(e)&&(sg(o)||sg(s))),kv))(e,t,r,n);return dg([o,s,u])},Tg=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),Eg=(0,l.pipe)(fg,Tg),mg=(0,l.has)("attributes"),hg=Array.isArray,bg=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),Og=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=vg(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)(bg(a))),kv),(0,l.concat)(Fv([_v(o)]))))(s)},vg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return mg(n)?Og(e,t,r,n,i):hg(n)?n.reduce(((n,a)=>n.concat(vg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Fv([_v(n.operator)])))(ng(e,t,r,n,i))},gg=(e,t,r,n,i)=>(0,l.pipe)(vg,l.flatten)(e,t,r,n,i);function _g(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){Ag(e,t,r[t])}))}return e}function Ag(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ng=(0,l.complement)(Kv),Rg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Kv),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(Jv),(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}},Pg=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=Rg(t);return(r||n)&&pu(t)},Sg=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(Pg)),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(Kv).some((0,l.propEq)("filter",on.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}=Rg(r);if(Pg(e))t.push(_g({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(Ng)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Kv,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(Jv,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(Ng),entityTypes:n,operator:i?a:e.operator,id:nb()()}}));t.push(...n)}var a;return t})(t))),[]))),wg={[on.EQUALS]:on.ON,[on.IN_RANGE]:on.WITHIN,[on.GTE]:on.AFTER,[on.GT]:on.AFTER,[on.LTE]:on.BEFORE,[on.LT]:on.BEFORE},Ig=(0,l.curry)((e=>wg[e]||e)),Ug=(0,l.curry)(((e,t)=>{switch(e){case on.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case on.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),Cg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),Sr),Lg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>_g({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return Cg(e)?(0,l.evolve)({filter:Ig,values:Ug(t)},e):e}))})))})),Dg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),Sg,zv(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")))})),Lg,(0,l.reject)(Xv))(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){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=(e,t)=>({data:{uri:Zt(e.fieldName)?Kt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||HO(e),id:nb()(),values:QO(e)}),Mg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=Bs(a,t,r)||Ar(e,i);if(!s)return null;if(cr(s))return jg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=bd(e,{type:o}),i=(_r(e,Kt(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]})}})),xg=(0,l.curry)(((e,t,r,n)=>Dg(Mg,e,n,t,r)));function $g(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){Vg(e,t,r[t])}))}return e}function Vg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Gg=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},Wg=e=>"rdmLookups.not.resolved"===e?Ln.notResolved.name:e,Yg=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===pn?on.IN_RANGE:dn(a),u=Wg(n),c=Bs(u)||Ar(e,i),p=(0,l.cond)([[()=>Zl(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>$g({},e,{filename:vb(e)}))))],[()=>Dr(null==c?void 0:c.type),(0,l.map)(le)],[e=>Xl(s)&&!Array.isArray(e[0])&&!Sr(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:nb()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===pn?"and not":"and",filter:s,values:p}})),Bg=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(Yg(e,rn(e,i)));return[{id:nb()(),operator:"or",attributes:a,entityTypes:i}]})),qg=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Hg=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([qg("from"),qg("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,()=>[]]]),Qg=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return $g({},r,{values:Hg(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?$s(e.fieldName,n):e.fieldName})},Kg=(e,t)=>{if((0,l.has)("children")(e)){const r=Qg(e,t);return e.children.reduce(((e,n)=>(e.push(Kg(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return Qg(e,t)},Jg=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(Qg(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push($g({fieldName:e.fieldName},Qg(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(Kg,l.flatten)],[l.T,Qg]]),Xg=(0,l.pipe)((0,l.map)(Jg),l.flatten),zg=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},Zg=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=Bg(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:Xg(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>$g({},t,{type:BO(e,t)}))).map((e=>$g({},e,{values:GO(e)?zg(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 Fg(r,t)})),operator:"or",id:nb()(),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=>({[Wg(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[$g({},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)},e_=(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)(MO),(0,l.partition)(xO))(t),i=n.map((t=>jg({},t,{type:BO(e,t)}))).map((e=>Fg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:nb()(),entityTypes:a}]})(e,a);return xg(e,t,r,o)})(e,t,r,n):Zg(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},t_=e=>"2.0"===e.version?e.keyword:Gg(e),r_=e=>(0,l.pathEq)(["object","uri"],e),n_=(e,t)=>(0,l.pipe)((0,l.find)(r_(e)),(0,l.prop)("object"))(t),i_=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"),r_(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=n_(r.match,t)||n[r.match];return i?{label:zp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return go(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)},a_=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),o_=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),s_=(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:zp((0,l.prop)("label",a)),matchRules:i.map((function(t){return go(e,a.type,t)||{label:t,uri:t}}))}})))(t),l_=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)},u_=(0,l.path)(["object","uri"]),c_=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(),d_=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=d_(n[e],t),!r);e++);return r},y_=(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)(y_,[t]),a);return r.push.apply(r,o),r};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){T_(e,t,r[t])}))}return e}function T_(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,t)=>!!e[t],m_=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},h_=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||[]])},b_=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return f_({},t,{[r.uri]:f_({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:h_(null==o?void 0:o.parents,n),children:h_(null==o?void 0:o.children,i),values:h_(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},O_=e=>e.children?e.children.flatMap(O_):e,v_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Xr(r,t)||Si(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return ts(r,n,i).flatMap(O_).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>Ar(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=b_({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>b_({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},g_=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)(ps),(0,l.map)(m_))(i);return b_({structure:e,attrType:e[t].attrType,values:a})}),t)},__=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 E_(e,r)}));return r||n?t.filter(ps).reduce(((e,t)=>__({structure:e,attributeValue:t})),e):e}),t);{const e=r;return E_(t,e.type)?b_({structure:t,attrType:t[e.type].attrType,values:[m_(e)]}):t}},A_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?f_({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},N_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Rs(i,n,r)||[];return a.length?b_({structure:t,attrType:t[r].attrType,values:a.filter(ps).map(m_)}):t},R_=(e,t,r)=>{const n=$t(e),i=$t(t);return n===i?((e,t)=>{const r=tr(t),n=tr(e);return Bt(n,r)})(e,t):!(!r||!er(t))&&sE(r,i).includes(n)},P_=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},S_=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?aE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return R_(r,t,o)}))},w_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>w_(e,t,r)))))},I_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&P_(n,e)}},U_=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=oE(u,o,i,a),p=w_("children",t,l),d=w_("parents",t,l),y=p.flatMap((e=>w_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return R_(t,n,c)})).map((t=>I_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return R_(n,t,c)||$t(t)!==u&&R_(t,n,c)})).map((t=>I_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=w_("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)&&R_(n,t,c)}))})).map((t=>I_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return R_(t,n,c)})).map((e=>I_(r,n,e,s))),...T,...E,...f]},C_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Cb({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=>Jp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[fr,()=>a(n)],[Or,()=>(e=>{const r=o(e),n=br(t);return xl([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Rb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},L_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:on.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(D_(r,t)):i.push(j_([t],r)),i},D_=(e,t)=>{const r=pr(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=fr(i)?D_(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:hr(t.uri),filter:t.type===bt.TYPE_BLOB?on.FULL_TEXT:on.EQUALS,values:e}:{fieldName:hr(t.uri),filter:on.MISSING_VALUE},k_={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},F_={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([[2398],{52374:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>js,PY2:()=>_n,Ng6:()=>He,YJ7:()=>En,NlI:()=>sn,Xt7:()=>We,wfT:()=>oi,EMD:()=>Qn,HAc:()=>Ye,PEf:()=>Sn,oA3:()=>Hn,$XE:()=>ut,eWf:()=>Rn,q7e:()=>Be,KVe:()=>si,WVQ:()=>xr,oZZ:()=>mi,bNA:()=>hi,Rjq:()=>bi,G39:()=>In,W0P:()=>Et,X1H:()=>Tt,yn8:()=>at,N0y:()=>it,dZX:()=>ct,bQt:()=>vi,oS0:()=>bt,lL_:()=>yn,Nsj:()=>hn,psV:()=>Tn,xPW:()=>An,pyR:()=>ei,p8l:()=>Jn,Wkf:()=>Ge,zHr:()=>Ve,NIO:()=>$e,$26:()=>YO,Esk:()=>Gn,s9T:()=>rt,MEy:()=>bu,j5E:()=>on,vAw:()=>qn,NMQ:()=>Bn,mNm:()=>zn,rwv:()=>Ti,s_5:()=>ti,RgZ:()=>Xn,unl:()=>Ei,Qy0:()=>Oi,pYu:()=>Vn,wIJ:()=>fv,GFH:()=>Ke,Ury:()=>Un,S91:()=>Cn,p3$:()=>Ni,wSh:()=>Z,BDP:()=>ji,pGS:()=>Zn,ARY:()=>Ot,XGc:()=>ai,fO_:()=>qr,wwy:()=>Ze,h_8:()=>Dn,_XL:()=>mn,j2V:()=>li,dMV:()=>ni,NBX:()=>p_,OXy:()=>vt,BXd:()=>ot,CJB:()=>pi,lXI:()=>yt,nqG:()=>_i,C68:()=>wn,yxQ:()=>gi,Yj_:()=>et,D25:()=>Xe,ZIY:()=>pt,Tl4:()=>vv,lwr:()=>Pn,NkU:()=>ui,Rtp:()=>ii,YGx:()=>st,uTS:()=>ri,MCv:()=>qe,IYE:()=>Kn,PiC:()=>fi,MVv:()=>mt,h_m:()=>ft,tJI:()=>Qe,fDt:()=>Je,cNQ:()=>ci,SwE:()=>Wn,ZHR:()=>yi,lD1:()=>Ln,lVm:()=>lt,vnX:()=>TO,$x5:()=>EO,_R1:()=>yO,wUm:()=>fO,z7V:()=>Ai,dC6:()=>nt,MBD:()=>ze,GmF:()=>ya,cKm:()=>dt,iP_:()=>Nn,NVC:()=>tt,tPT:()=>ll,tZe:()=>Wp,kRE:()=>Hy,psB:()=>Qy,X0$:()=>sl,zE1:()=>hl,Wm5:()=>Xs,vyX:()=>cc,wLZ:()=>ul,W4V:()=>se,EtK:()=>As,Wtd:()=>ol,asT:()=>A_,kGs:()=>ge,ewt:()=>wT,O_f:()=>du,sOy:()=>Bt,Tde:()=>hr,LMI:()=>Hu,skb:()=>cg,sPt:()=>Mu,sH1:()=>xu,RPM:()=>_E,h27:()=>nc,Uqd:()=>uc,xG:()=>_g,Z2f:()=>Ib,fgW:()=>Yv,I69:()=>Tg,ZxB:()=>mg,mdt:()=>hE,Qbq:()=>pb,rny:()=>Ji,UEY:()=>Da,Q0T:()=>La,Lyr:()=>Va,sBn:()=>Ca,itK:()=>Sa,H9$:()=>Ua,KPc:()=>Ia,zos:()=>wa,ELQ:()=>Ga,dZs:()=>ha,Cz4:()=>ma,z_L:()=>xa,fGe:()=>Ea,iuF:()=>Ra,Wib:()=>Pa,Hn0:()=>$a,obS:()=>Wa,E$L:()=>ba,XUh:()=>Na,Qp_:()=>_a,_jk:()=>Oa,sKE:()=>va,WmG:()=>Aa,QKx:()=>Fa,Oik:()=>ka,s0A:()=>ga,o9m:()=>ja,MCd:()=>Ma,RsS:()=>ic,tGK:()=>Vl,lIv:()=>bl,Vg3:()=>na,mkC:()=>Yi,xv5:()=>aa,a14:()=>qi,yv0:()=>ia,Zm0:()=>Bi,Nxd:()=>Wi,$mM:()=>ra,ifj:()=>Vr,NWi:()=>Kb,xr3:()=>Qb,wNf:()=>Xl,iJH:()=>Jb,d89:()=>$i,Edd:()=>Vi,Z5t:()=>Gi,uGe:()=>Fi,UoR:()=>ki,xvW:()=>Hb,$qe:()=>qb,yPM:()=>Ta,$cp:()=>ml,vKJ:()=>Tl,VtG:()=>Mc,AID:()=>Yf,B1H:()=>u_,b7X:()=>lb,$uE:()=>_e,keo:()=>cb,C_p:()=>om,G27:()=>oh,JA0:()=>ky,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ne,YYG:()=>Ae,f_2:()=>My,w3l:()=>Bg,QHB:()=>ah,Jso:()=>zg,RXH:()=>Ym,Vr9:()=>fh,lMm:()=>rb,BlA:()=>D_,fmQ:()=>Es,yRD:()=>Dg,NcL:()=>dm,QK6:()=>de,ymd:()=>Rp,JV_:()=>uf,XiW:()=>lT,Yrx:()=>_y,GPx:()=>al,gjI:()=>il,vlo:()=>HT,E_P:()=>yE,aAL:()=>yp,NBq:()=>ms,wp9:()=>mE,DsR:()=>sp,MPc:()=>Kf,gWE:()=>Jf,DT_:()=>Xf,ipn:()=>Zf,ORg:()=>Ci,_wz:()=>zf,RYR:()=>AT,PP2:()=>Sy,wS7:()=>Fb,cBQ:()=>qc,pBq:()=>wf,DsO:()=>ee,X78:()=>pf,xZs:()=>af,YFy:()=>Ny,Gmt:()=>zy,K$w:()=>Xy,DSj:()=>fp,Mfr:()=>Ry,k9j:()=>Qc,ww$:()=>cl,WVU:()=>Jy,hxF:()=>Zs,nwO:()=>F_,Mzk:()=>Vc,aFF:()=>mb,HRH:()=>gu,EZK:()=>td,Kxm:()=>Xp,Z9i:()=>VE,CrF:()=>Wy,DNd:()=>Ba,vUy:()=>w_,lJh:()=>Nu,zHo:()=>Ru,sEJ:()=>y_,UO$:()=>jf,zeJ:()=>Ar,dLR:()=>Ss,JQy:()=>Ls,XtP:()=>Rs,Ug0:()=>rn,A1W:()=>ub,sw:()=>ed,nv3:()=>iO,JgD:()=>nO,nve:()=>f_,SkP:()=>Ds,SAs:()=>Uf,PWK:()=>Yo,IM5:()=>Ps,Mfk:()=>sb,mB6:()=>Lb,p6d:()=>w,o0x:()=>U,ufS:()=>Ob,k7L:()=>vb,mrB:()=>I,ncP:()=>xt,Zmi:()=>Dt,hm5:()=>kt,ECL:()=>Yr,vPL:()=>id,qmL:()=>pE,hPi:()=>Pf,hXd:()=>zi,OCS:()=>Zi,p2l:()=>Fs,qF1:()=>Pp,_X$:()=>Sp,yj2:()=>cv,bzh:()=>vE,k66:()=>es,kiP:()=>Eo,pSg:()=>ce,kz_:()=>Cy,H_U:()=>rs,t9e:()=>za,j2$:()=>Yp,PFL:()=>sr,aJ3:()=>jO,To9:()=>br,wpo:()=>Ad,ADq:()=>kE,UUb:()=>DE,tQX:()=>jE,xy8:()=>pr,EUG:()=>Nr,AFK:()=>Xt,X3M:()=>_r,WN0:()=>ts,kDl:()=>ws,uDV:()=>cE,IhQ:()=>Us,R$r:()=>dE,w80:()=>Co,Pfu:()=>Ja,Gtj:()=>Cl,fyF:()=>Ul,kkq:()=>Zo,u5q:()=>$t,O$n:()=>gd,ptG:()=>_d,f4_:()=>bm,uap:()=>hm,d7q:()=>gy,liG:()=>wy,$oF:()=>vy,avf:()=>FT,DiQ:()=>kT,cfX:()=>jT,vD3:()=>xT,Qrb:()=>DT,EJQ:()=>MT,HWy:()=>LT,gjS:()=>PT,y6v:()=>CT,JUW:()=>xy,GtP:()=>wm,_kX:()=>Ha,u1e:()=>Qa,sJj:()=>fb,CJp:()=>Pm,uKF:()=>yb,wo0:()=>qy,s5:()=>Ho,cwx:()=>qo,Y6b:()=>py,TTx:()=>tf,UtR:()=>dy,HaQ:()=>rf,E6I:()=>Gy,Won:()=>fy,vTU:()=>uy,Nsy:()=>dd,KMQ:()=>Eb,Do$:()=>Ed,CSV:()=>$s,TMe:()=>yy,l1V:()=>Su,VQ1:()=>Cu,z7d:()=>QT,Xaq:()=>as,Sj8:()=>C_,PJj:()=>Ml,k3T:()=>an,PjQ:()=>Di,s7l:()=>Lc,GGR:()=>WT,j5q:()=>VT,DnY:()=>Ic,RY5:()=>iE,Px$:()=>NT,KPC:()=>o_,NIY:()=>xc,HvW:()=>jc,Fof:()=>Za,BTI:()=>hd,uie:()=>sd,ChB:()=>rd,q27:()=>Rd,vrC:()=>Nh,fAQ:()=>Tf,XkT:()=>wc,lrH:()=>Ef,nt9:()=>Xr,XH8:()=>vd,XH2:()=>nn,jFi:()=>Od,qhs:()=>Uo,wwR:()=>md,Uk3:()=>zt,ev7:()=>c_,RB9:()=>jy,iFp:()=>NE,e$p:()=>PE,PcX:()=>SE,SpP:()=>RE,R6_:()=>FO,CY1:()=>BO,Ajk:()=>Nc,Yiz:()=>Ac,FK9:()=>hc,UOo:()=>gb,aTW:()=>ef,uug:()=>Jl,P$2:()=>QO,XS2:()=>Gl,Hyb:()=>lu,d3Y:()=>fc,Klp:()=>Ec,WxZ:()=>KO,Gzu:()=>Pu,ZOr:()=>Sc,uqV:()=>oy,Pm4:()=>re,hWO:()=>Qt,nVD:()=>oE,dED:()=>by,P2h:()=>hy,jrr:()=>po,mmY:()=>fo,T6O:()=>ns,h6J:()=>$p,hM2:()=>t_,XR6:()=>X,jmz:()=>uE,IHt:()=>lE,NZI:()=>$E,wdF:()=>yf,kgP:()=>ff,ZYI:()=>gp,QXK:()=>Pl,efz:()=>Sl,Q5d:()=>Rl,Ysv:()=>wl,UWq:()=>XT,ocC:()=>JT,io3:()=>en,Sbt:()=>Do,roS:()=>Lo,Ww1:()=>jo,QaS:()=>Gc,ERZ:()=>Wg,CL1:()=>r_,idV:()=>Zp,nIW:()=>Ht,fjE:()=>MO,sG0:()=>Nb,tV7:()=>xl,g8o:()=>bv,Qy:()=>hv,t2P:()=>DO,KbW:()=>vo,wId:()=>_o,LS0:()=>Ao,bFH:()=>Hd,Rgl:()=>Kd,fW1:()=>ym,Ywp:()=>uO,pg:()=>Id,WSA:()=>Jd,fed:()=>Zg,tT_:()=>Cs,KbL:()=>Cc,JBA:()=>tr,aNC:()=>rO,RFJ:()=>vp,Zeh:()=>Df,OT5:()=>lO,mC3:()=>vl,kR6:()=>L_,NVY:()=>TE,k6v:()=>wp,FEC:()=>Ip,Ob5:()=>Pd,KUV:()=>Sd,dvH:()=>fE,V3i:()=>mh,VD3:()=>tn,mm2:()=>Uu,rou:()=>_f,izH:()=>Ka,DK$:()=>Xa,KMp:()=>dp,c31:()=>At,mbo:()=>ME,gT8:()=>Pt,CZ8:()=>fs,uGi:()=>Os,Poc:()=>gt,_9k:()=>_s,ZTM:()=>hs,bwT:()=>vs,tzW:()=>wt,tF$:()=>Rt,o96:()=>Ts,M4S:()=>gs,_vs:()=>ap,xF8:()=>ST,HQx:()=>hb,ATu:()=>FE,j1S:()=>Ii,V3K:()=>Si,Lmx:()=>wi,ZaZ:()=>_t,n_1:()=>ly,N6e:()=>up,SxO:()=>yo,w3p:()=>EE,xU7:()=>pe,Y_p:()=>Mo,$k6:()=>Fo,Gdl:()=>Pb,U6P:()=>Rb,OwB:()=>kO,hTh:()=>sE,xqc:()=>Qo,JvE:()=>Ko,i29:()=>zu,dzT:()=>Qi,uPS:()=>Bc,cZV:()=>Yc,n3B:()=>Xv,e6O:()=>Bv,s7j:()=>yv,j$Q:()=>$y,kW2:()=>Sm,tH7:()=>Bo,Yxg:()=>Bs,MaZ:()=>GT,nqN:()=>$T,jWj:()=>ZT,o_J:()=>os,hgZ:()=>nd,yW4:()=>Vp,uT0:()=>Mp,C82:()=>xp,u9Z:()=>gf,zl1:()=>nf,J$m:()=>sy,j_Q:()=>Oc,OaI:()=>vc,wB1:()=>l_,SP6:()=>wd,ZYr:()=>a_,IMU:()=>Op,FoU:()=>Fy,DVz:()=>Cb,mxe:()=>Kv,FHr:()=>Cf,D1g:()=>Af,VO3:()=>OO,de5:()=>bO,Uw1:()=>Te,J6q:()=>xE,XCe:()=>lo,fbl:()=>cO,Ir:()=>bo,XQO:()=>Oo,QXb:()=>$d,P8_:()=>sf,iiD:()=>pp,MOC:()=>Vd,WF:()=>xd,xE1:()=>Li,idW:()=>g_,QWZ:()=>bb,YL3:()=>$c,Fn9:()=>T,j2U:()=>ks,MpE:()=>It,kQw:()=>ur,mfm:()=>uu,vZp:()=>Zt,E8K:()=>m_,VSb:()=>ds,vr_:()=>lr,Vmh:()=>S_,FgW:()=>Eh,oDv:()=>ls,kuw:()=>cs,eHk:()=>zT,Tt2:()=>ss,T6Y:()=>Dr,_26:()=>au,YkM:()=>mr,J6y:()=>Bl,njU:()=>Zl,TBP:()=>us,IT0:()=>GE,x_:()=>Tb,biM:()=>fd,TMl:()=>Td,Vkd:()=>ru,WiY:()=>GO,_zi:()=>nu,J6D:()=>Iu,Lt4:()=>Sr,QEi:()=>vr,whI:()=>Qr,KIu:()=>Jr,JhM:()=>oe,C_0:()=>Fr,qIF:()=>zv,O27:()=>E,aBi:()=>Nd,xOX:()=>Js,EdS:()=>Wt,WgC:()=>Gt,eEv:()=>ar,A4t:()=>eu,YOQ:()=>er,Wos:()=>Cr,jWr:()=>Ya,Or$:()=>Er,lhE:()=>Zr,CwH:()=>Or,pzC:()=>Hs,ymH:()=>zl,QZu:()=>fr,rYH:()=>VO,FVt:()=>Ur,Kn2:()=>ue,jgw:()=>cu,OXP:()=>ps,lS4:()=>gr,g5f:()=>WO,fp6:()=>Ql,Uty:()=>la,YkG:()=>Tr,xdS:()=>St,kMF:()=>eT,$NE:()=>Yt,bC9:()=>Vt,Ian:()=>Ui,KVV:()=>db,q9e:()=>ko,iIf:()=>Sb,ian:()=>el,m6e:()=>Mr,OFd:()=>Qs,kqr:()=>cr,fnZ:()=>Hr,VFZ:()=>tl,ZiX:()=>Ft,j5n:()=>wr,zkt:()=>_,Pcm:()=>s_,QDV:()=>qs,M5u:()=>$O,laD:()=>Jv,mtq:()=>ir,CtB:()=>wb,CBv:()=>ae,I0t:()=>kr,u1G:()=>qT,gk1:()=>Hv,Bgb:()=>qv,uzs:()=>Kr,v0l:()=>ju,Zqp:()=>Ty,j0k:()=>Wo,tCm:()=>Jt,gmx:()=>Wl,mOr:()=>Ou,TwZ:()=>Ov,GyU:()=>aO,zGm:()=>Ld,bMg:()=>ey,EyD:()=>Yb,FQA:()=>Bb,fZN:()=>ny,xsF:()=>Gb,Lxg:()=>Wb,O3l:()=>Jc,Wni:()=>Kc,wRx:()=>zb,OxG:()=>Yd,uJQ:()=>Wd,qWg:()=>Ub,i96:()=>Ud,zhn:()=>Xb,G8q:()=>Ri,Jct:()=>bT,A9Y:()=>te,Y5F:()=>jg,gxP:()=>le,c$P:()=>Yl,M7o:()=>lc,BBN:()=>co,ZBU:()=>J,UkJ:()=>No,xkv:()=>of,z$M:()=>__,KAm:()=>Dy,lCl:()=>Bf,rkF:()=>sm,IU6:()=>Kp,RGr:()=>h,aYu:()=>m,ije:()=>kl,Buf:()=>cp,YLu:()=>jl,ct9:()=>$o,XkY:()=>ty,T5R:()=>Dd,uQS:()=>iy,wcJ:()=>xo,d$I:()=>pl,rSp:()=>yd,Sx:()=>Fc,Ilm:()=>Ol,Ki6:()=>zs,VGk:()=>op,sFD:()=>Bm,eWN:()=>N_,dWE:()=>dv,Lkd:()=>uT,aDL:()=>kf,yaA:()=>ay,lOh:()=>Rf,DBr:()=>UO,hK$:()=>$l,TZ_:()=>Qp,CMB:()=>Zv,FU8:()=>kc,J$p:()=>$f,b5s:()=>xf,h2W:()=>Kt,SL_:()=>bf,oUH:()=>jp,ck9:()=>jd,nL:()=>Ab,k$p:()=>Hm,Xs0:()=>Dl,u7I:()=>Nf,rxg:()=>fu,bji:()=>Tu,oCZ:()=>rm,MjG:()=>hO,FuV:()=>Dp,$ju:()=>Fp,t6d:()=>kp,m5F:()=>fe,sx:()=>R_,rSc:()=>Db,U10:()=>gc,L8n:()=>Ky,R9X:()=>cy,rj2:()=>cf,_C4:()=>Bp,tCj:()=>lf,uAg:()=>Ay,wx9:()=>IT,KF3:()=>qp,ax9:()=>Hp,HH7:()=>lp,ufV:()=>Py,_6y:()=>Hc,XTh:()=>dO,AJo:()=>Wc,Ixr:()=>Vy,P6Y:()=>M_,Bd_:()=>zE,xkB:()=>XE,W41:()=>vf,WkI:()=>Of,sSE:()=>JE,GMd:()=>Qu,Bxm:()=>em,FVh:()=>BE,U_T:()=>Xd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>Au,Ls5:()=>_u,$bd:()=>mu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>P,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:()=>je,editRoles:()=>Ce,editStartDate:()=>De,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)},R=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),P=R("startOf"),S=R("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"),D=(0,l.equals)("9999"),j=(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")],[j,(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")],[D,(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 Re(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 Pe(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Re(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=Pe(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=Pe(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=Pe(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 De(e,t){e.startDate=t||""}function je(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.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))),Rt=Nt("configuration/relationTypes"),Pt=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.__,"/")]]),Dt=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,jt=e=>()=>Dt(e),kt=(e,t)=>{const r=Lt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Dt(n)},Ft=e=>e&&e.includes("uri$$"),Mt=jt("entities"),xt=jt("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=>5===e.split("/").length,tr=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},rr=e=>e.replace(/uri\$\$/g,Ut);function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ir=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Wt),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",bt.TYPE_STRING)]),ar=(0,l.has)("values"),or=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(bt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(bt.TYPE_LOOKUP)],[ar,(0,l.always)(bt.TYPE_ENUM)],[ir,(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")]]),sr=(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){nr(e,t,r[t])}))}return e}({},e,{type:or(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),lr=e=>!!e&&(!!e.autoGenerated&&e.type!==bt.TYPE_NESTED||!!e.parentAutoGenerated),ur=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),cr=(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),pr=e=>ur(e)?"analyticsAttributes":"attributes",dr=(0,l.propEq)("hidden",!0),yr=(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))),fr=yr(bt.TYPE_NESTED),Tr=yr(bt.TYPE_REFERENCE),Er=yr(bt.TYPE_IMAGE),mr=(0,l.either)(fr,Tr),hr=(e,t)=>{const r=ur(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(".")},br=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),Or=(0,l.pipe)(br,Boolean),vr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),gr=(0,l.both)(Or,(0,l.pipe)(br,("rdm",(0,l.pipe)(qt,(0,l.equals)("rdm")))));const _r=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=pr({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:[]},Ar=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=_r(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",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=>Ar(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],Pr=[bt.TYPE_ACTIVENESS_DATE,bt.TYPE_TIMESTAMP,bt.TYPE_LOCAL_DATE],Sr=e=>Rr.includes(e),wr=e=>Pr.includes(e),Ir=[bt.TYPE_INT,bt.TYPE_LONG,bt.TYPE_NUMBER,bt.TYPE_FLOAT,bt.TYPE_DOUBLE,bt.TYPE_COUNT],Ur=e=>Ir.includes(e),Cr=e=>[bt.TYPE_FLOAT,bt.TYPE_DOUBLE].includes(e),Lr=[bt.TYPE_BOOLEAN,bt.TYPE_BOOLEAN_RADIO,bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Dr=e=>Lr.includes(e),jr=[bt.TYPE_URL,bt.TYPE_BLOG_URL,bt.TYPE_IMAGE_URL],kr=e=>jr.includes(e),Fr=yr(bt.TYPE_EMAIL),Mr=e=>bt.TYPE_SSN===e;var xr,$r=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(xr||(xr={}));const Vr=(0,l.curry)(((e,t,r)=>{var n;const i=e===xr.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)))})),Gr=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Wr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Gr),Yr=(0,l.pipe)((0,l.reject)(E),Wr),Br=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("?")?"&":"?")+Gr(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}},qr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Hr=(0,l.equals)(qr.SUGGESTING),Qr=(0,l.equals)(qr.EDITING),Kr=(0,l.equals)(qr.VIEWING),Jr=(0,l.either)(Qr,Hr),Xr=(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)(Xr(e),(0,l.prop)("extendsTypeURI"))(t))),Zr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(zr(e,r)));return n(r)})),en=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=zr(e,n);return r})),tn=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?tn(e,Xr(e,t.extendsTypeURI),r):void 0,rn=(e,t)=>{const r=t.map(en(e));return(r.length?r.reduce(l.intersection):[])[0]},nn=(e,t)=>tn(e,(0,l.is)(Object,t)?t:Xr(e,t),"typeImage"),an=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Zr(e,t,n.uri)?r.concat(n.uri):r),[]),on={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"},sn={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},ln={[on.EQUALS]:"equals",[on.NOT_EQUALS]:"not",[on.STARTS_WITH]:"starts with",[on.MISSING_VALUE]:"missing value",[on.IN_RANGE]:"in range",[on.HAS_ALL]:"has all",[on.FULL_TEXT]:"full text",[on.EXISTS]:"exists",[on.COUNT_EQUALS]:"count equals",[on.COUNT_NOT_EQUALS]:"count not equal",[on.COUNT_LT]:"count less",[on.COUNT_LTE]:"count less or equal",[on.COUNT_GT]:"count greater",[on.COUNT_GTE]:"count greater or equal",[on.COUNT_RANGE]:"count in range",[on.LT]:"less than",[on.LTE]:"less than or equal",[on.GT]:"greater than",[on.GTE]:"greater than or equal",[on.IN_FILE]:"in file",[on.NOT_IN_FILE]:"not in file",[on.CONTAINS]:"contains",[on.ON]:"on",[on.BEFORE]:"before",[on.AFTER]:"after",[on.WITHIN]:"within"},un="in",cn="notIn",pn="not range",dn=e=>({[un]:on.EQUALS,[cn]:on.NOT_EQUALS}[e]||e),yn={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},fn={[yn.LAST_DAY]:"Last 24 hours",[yn.LAST_3DAYS]:"Last 3 days",[yn.LAST_WEEK]:"Last week",[yn.LAST_MONTH]:"Last month",[yn.LAST_YEAR]:"Last year",[yn.PICK_DATE]:"Pick date"},Tn={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},En={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},mn="<No label>",hn={IN:"in",OUT:"out"};var bn=r(87918),On=r.n(bn);function vn(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){gn(e,t,r[t])}))}return e}function gn(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={startDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return On().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return On().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},An=vn({id:{type:bt.TYPE_ENTITY_ID,get label(){return On().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},_n,{roles:{type:bt.TYPE_STRING,get label(){return On().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:bt.TYPE_STRING,get label(){return On().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),Nn={workflow:{type:bt.TYPE_STRING,get label(){return On().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:bt.TYPE_STRING,get label(){return On().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:bt.TYPE_STRING,get label(){return On().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Rn={commenter:{type:bt.TYPE_STRING,get label(){return On().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Pn={notResolved:{type:bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return On().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Sn={createdBy:{type:bt.TYPE_STRING,get label(){return On().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:bt.TYPE_STRING,get label(){return On().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},wn={matches:{type:bt.TYPE_COUNT,get label(){return On().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:bt.TYPE_COUNT,get label(){return On().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},In={sourceSystems:{type:bt.TYPE_STRING,get label(){return On().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:bt.TYPE_STRING,get label(){return On().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:bt.TYPE_INT,get label(){return On().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:bt.TYPE_TIMESTAMP,get label(){return On().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:bt.TYPE_STRING,get label(){return On().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:bt.TYPE_STRING,get label(){return On().text("Match Rules")},uri:Un.matchRules,name:Un.matchRules,faceted:!0,hideForDataTenant:!0},[Un.MLRecommendedMatch]:{type:bt.TYPE_STRING,get label(){return On().text("Match IQ")},uri:Un.MLRecommendedMatch,name:Un.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},Ln=vn({},An,Nn,Rn,Pn,Sn,wn,In,Cn,{type:{type:bt.TYPE_STRING,get label(){return On().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Dn="NOT_MATCH";var jn=r(13980),kn=r.n(jn);function Fn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Mn(e,t,r[t])}))}return e}function Mn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xn=kn().oneOf(["mobile","tablet","desktop"]),$n=kn().shape({deviceTypes:kn().oneOfType([xn,kn().arrayOf(xn)]),roles:kn().arrayOf(kn().string)}),Vn=kn().shape({value:kn().string,lookupCode:kn().string}),Gn=kn().shape({link:kn().string,filename:kn().string}),Wn=kn().shape({displayName:kn().string,parent:kn().string}),Yn=kn().oneOfType([kn().string,kn().number,kn().bool,Vn]),Bn=kn().oneOfType([Yn,kn().arrayOf(Yn)]),qn=kn().shape({fieldName:kn().string,values:kn().arrayOf(Bn),filter:kn().string,type:kn().string}),Hn=kn().shape({minValue:kn().number,maxValue:kn().number}),Qn=kn().shape({label:kn().string,name:kn().string,description:kn().string,type:kn().string,hidden:kn().bool,faceted:kn().bool,searchable:kn().bool,uri:kn().string,access:kn().arrayOf(kn().string),cardinality:Hn}),Kn=kn().shape({label:kn().string,uri:kn().string,typeColor:kn().string,direction:kn().string,startObject:kn().object,endObject:kn().object}),Jn=kn().shape({typeColor:kn().string,typeIcon:kn().string,typeImage:kn().string,label:kn().string,uri:kn().string,attributes:kn().arrayOf(Qn)}),Xn=kn().shape({uri:kn().string,label:kn().string,memberTypes:kn().array,extendsTypeUri:kn().string,attributes:kn().arrayOf(Qn)}),zn=kn().shape({uri:kn().string,label:kn().string,extendsTypeUri:kn().string,relationshipTypeURIs:kn().arrayOf(kn().string)}),Zn=kn().shape({uri:kn().string,description:kn().string,label:kn().string,schemaVersion:kn().string,entityTypes:kn().arrayOf(Jn),roles:kn().arrayOf(kn().object),groupTypes:kn().arrayOf(kn().object),relationTypes:kn().arrayOf(Kn),graphTypes:kn().arrayOf(zn),interactionTypes:kn().arrayOf(Xn),sources:kn().arrayOf(kn().object)}),ei=kn().shape({uri:kn().string,type:kn().string}),ti=kn().shape({uri:kn().string,attributes:kn().object,type:kn().string,timestamp:kn().number,members:kn().object}),ri=kn().shape({uri:kn().string,type:kn().string}),ni=kn().shape({value:kn().object,ov:kn().bool,type:kn().string,uri:kn().string}),ii=kn().shape({refEntity:kn().oneOfType([kn().array,kn().object]),refRelation:kn().oneOfType([kn().array,kn().object]),value:kn().object,ov:kn().bool,type:kn().string,uri:kn().string}),ai=kn().oneOf((0,l.values)(qr)),oi=kn().shape({type:kn().oneOf(Object.values($e)).isRequired,attributeTypeUri:kn().string.isRequired,parentUri:kn().string.isRequired,uri:kn().string,message:kn().string}),si={attributeType:Qn,showEmptyEditors:kn().bool,lazy:kn().bool,mode:ai,metadata:Zn,ownError:oi,errors:kn().arrayOf(oi),crosswalks:kn().array,onAddAttributes:kn().func,onAddOneMore:kn().func,onDeleteAttribute:kn().func,onChangeAttribute:kn().func,additionalControlsRenderer:kn().func,hideDeleteButton:kn().bool,showNonOv:kn().bool,state:kn().oneOf(["deleted","edited"]),expanded:kn().bool},li=Fn({attributeValue:ni},si),ui=Fn({attributeValue:ii},si),ci=kn().shape({value:kn().oneOfType([kn().string,kn().bool,kn().number]),ov:kn().bool,type:kn().string,uri:kn().string,lookupCode:kn().string,lookupRawValue:kn().string}),pi=kn().shape({totalOvValues:kn().number,totalValues:kn().number}),di=kn().shape({inRelations:kn().arrayOf(kn().oneOfType([kn().object,kn().string])),outRelations:kn().arrayOf(kn().oneOfType([kn().object,kn().string])),groups:kn().arrayOf(kn().string),entityTypes:kn().arrayOf(kn().string),nextEntry:kn().object}),yi=kn().oneOf(["asc","desc"]),fi=kn().shape({id:kn().string,content:di,allowOnlyCreateNew:kn().bool,sortColumn:kn().string,sortOrder:yi,"text-empty":kn().string,max:kn().number,icon:kn().string,caption:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n,editingEnabled:kn().bool}),Ti=kn().shape({id:kn().string,graph:kn().shape({type:kn().string,layout:kn().number,deep:kn().number,limit:kn().number,uri:kn().string,options:kn().shape({reverseRelations:kn().bool})}),sortBy:kn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:yi,max:kn().number,icon:kn().string,caption:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n}),Ei=kn().shape({id:kn().string,caption:kn().string,pageSize:kn().number,icon:kn().string,canCreate:$n,canRead:$n,canUpdate:$n,canDelete:$n,attributes:kn().object}),mi=kn().shape({entityUri:kn().string,entityType:kn().string,entityLabel:kn().string,object:ei}),hi=kn().shape({relationUri:kn().string,relationType:kn().string,relationLabel:kn().string,direction:kn().string,object:ri}),bi=kn().shape({entity:mi,relation:hi}),Oi=kn().shape({value:kn().string,isRawFilter:kn().bool}),vi=kn().shape({id:kn().string,label:kn().string,name:kn().string,availableEntityTypes:kn().array}),gi=kn().shape({id:kn().string,allowMergeAll:kn().bool,matchActions:kn().object,availableTabs:kn().arrayOf(kn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),_i=kn().shape({matchRules:kn().arrayOf(kn().string),object:ei,shortestTransitiveMatchPath:kn().arrayOf(kn().shape({matchRules:kn().arrayOf(kn().string),match:kn().string})),direct:kn().bool,matchScore:kn().number}),Ai=kn().arrayOf(_i),Ni=kn().arrayOf(kn().shape({uri:kn().string,label:kn().string})),Ri=[{label:On().text("And"),value:"and"},{label:On().text("Or"),value:"or"},{label:On().text("And not"),value:"and not"},{label:On().text("Or not"),value:"or not"}];function Pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Si=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),wi=(0,l.pipe)(Si,(0,l.propOr)("","label")),Ii=(0,l.curry)(((e,t)=>{const r=Si(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Ui=(0,l.curry)(((e,t,r)=>{const[n,i]=Ii(e,r);return Zr(e,n,t)||Zr(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){Pi(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Li=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?hn.OUT:hn.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(hn.IN),i=r(hn.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Di=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),ji={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},ki=(0,l.curry)(((e,t)=>e.every((e=>Fi(e,t))))),Fi=(0,l.curry)(((e,t)=>{const r=lr(t);return Mi(e,t)&&(e===ji.READ||!r)})),Mi=(e,t)=>!t||!t.access||t.access.includes(e),xi=(0,l.curry)(((e,t,r)=>Fi(ji.READ,r)&&(Hr(t)?Fi(ji.INITIATE_CHANGE_REQUEST,r):Fi(e,r)))),$i=xi(ji.CREATE),Vi=xi(ji.DELETE),Gi=xi(ji.UPDATE),Wi=ki([ji.CREATE,ji.MERGE,ji.READ,ji.UPDATE]),Yi=ki([ji.UPDATE,ji.READ,ji.CREATE]),Bi=ki([ji.UPDATE,ji.READ]),qi=ki([ji.DELETE,ji.UPDATE,ji.READ]),Hi=(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["*"])),Qi=(e,t,r)=>(0,l.pipe)((0,l.map)(Hi(e,t)),(0,l.filter)(l.identity))(r),Ki=(e,t,r)=>{const n=Qi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Fi(ji.MERGE,r)},Ji=(0,l.curry)(((e,t,r,n)=>{const i=Si(e,n),[a,o]=Ii(e,n);return i&&Fi(ji.CREATE,i)&&Zr(e,a,t.type)&&Zr(e,o,r.type)})),Xi=(e,t,r,n,i)=>{const a=Xr(e,n.type),o=Qi(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(Ji(e,n,i))||a.some(Ji(e,i,n))}))},zi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Xr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ki(o,i,a),canAddRelation:Xi(e,o,i,r,n),canMark:Fi(ji.UPDATE,a)&&Fi(ji.READ,a)}},Zi=(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),ea=ur,ta=(0,l.complement)(ea),ra=Fi(ji.READ),na=e=>{let{attributeType:t,mode:r}=e;return ta(t)&&$i(r,t)&&!dr(t)},ia=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=Ft(r.uri),o=Gi(n),s=$i(n);return(0,l.cond)([[ea,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},aa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=Ft(r.uri),s=Gi(n),u=Vi(n),c=sa(ji.UPDATE,n,a,r),p=sa(ji.DELETE,n,a,r);return(0,l.cond)([[ea,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)},oa=(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=>!Mi(e,n)||!oa(e,t,r[n.name],n)))))})),sa=(0,l.curry)(((e,t,r,n,i)=>Hr(t)?oa(ji.INITIATE_CHANGE_REQUEST,r,n,i):oa(e,r,n,i))),la=(0,l.both)((0,l.complement)(dr),ra),ua="SuperUser",ca="allTenants",pa=[ca,"allCustomers"],da=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===ua})).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===ua){const e=r?pa.concat(r.map((e=>`allTenants.${e}`))):pa,n=r&&t[0]===ca?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}))},ya={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"},fa={[ya.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[ya.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[ya.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[ya.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[ya.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[ya.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[ya.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[ya.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[ya.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[ya.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[ya.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[ya.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[ya.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[ya.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[ya.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[ya.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[ya.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[ya.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[ya.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[ya.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[ya.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[ya.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[ya.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[ya.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[ya.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[ya.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Ta=(0,l.curry)(((e,t,r)=>da({allowedPermissionsNames:e,permissionsNames:ya,permissionsConfig:fa}).some((e=>e(t,{params:{tenant:r}}))))),Ea=Ta([ya.CAN_EXPORT]),ma=Ta([ya.CAN_EXPORT_ACTIVITIES]),ha=Ta([ya.CAN_IMPORT_ENTITIES_FROM_DT]),ba=Ta([ya.CAN_READ_ENTITIES_FROM_DT]),Oa=Ta([ya.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),va=Ta([ya.CAN_UPDATE_PROCESS_INSTANCE]),ga=Ta([ya.CAN_VIEW_WORKFLOW_DEFINITION]),_a=Ta([ya.CAN_CONFIG_ENVIRONMENT_REGISTER]),Aa=Ta([ya.CAN_UPDATE_WORKFLOW_DATA_TASK]),Na=Ta([ya.CAN_READ_WORKFLOW_DATA_TASK]),Ra=Ta([ya.CAN_MANAGE_WORKFLOW_DEFINITION]),Pa=Ta([ya.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),Sa=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),wa=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Ia=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ua=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Ca=Ta([ya.CAN_EXECUTE_WORKFLOW_JOBS]),La=Ta([ya.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Da=Ta([ya.CAN_CREATE_CONFIG_JAR]),ja=Ta([ya.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),ka=Ta([ya.CAN_VIEW_CONFIG_JAR]),Fa=Ta([ya.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Ma=Ta([ya.CAN_VIEW_WORKFLOW_JOBS]),xa=Ta([ya.CAN_MAKE_BULK_UPDATE]),$a=Ta([ya.CAN_OPEN_DATA_LOADER_EXECUTE,ya.CAN_OPEN_DATA_LOADER_READ]),Va=Ta([ya.CAN_BULK_DELETE_PROFILES]),Ga=Ta([ya.CAN_READ_MDM_DATA_ENTITIES]),Wa=Ta([ya.CAN_READ_DVF]),Ya=Ta([ya.IS_FREEMIUM_ADMIN]),Ba=(0,l.reject)(dr),qa=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),Ba,(0,l.filter)(e))(t),Ha=(0,l.curry)(((e,t)=>qa((t=>na({attributeType:t,mode:e})),t))),Qa=(0,l.curry)(((e,t)=>qa((t=>na({attributeType:t,mode:e})||la(t)),t))),Ka=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(la)),Ja=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ja(e)])))),Xa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(la),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Xa(e)])))),za=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...za(e)])))),Za=(0,l.pipe)(Xr,(0,l.converge)(l.concat,[Xa,za]));function eo(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){to(e,t,r[t])}))}return e}function to(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ro=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,ro(e)))},t))),no=e=>{var t;return eo({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},io=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),ao=(0,l.when)(io,(0,l.dissoc)("values")),oo=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return eo({},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})})),so=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},lo=(0,$r.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ja,t).concat((0,l.chain)(Ja,r)).some(so)})),uo=e=>{let t=!1;const r=ro((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?eo({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},co=e=>{const t=lo(e),r=(0,l.map)((e=>ro((0,l.pipe)(ao,(0,l.when)((0,l.always)(e),oo))))(t)),n=(0,l.map)(no),i=(0,l.map)(uo);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},po=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),yo=(0,l.prop)("relationshipTypeURIs"),fo=(0,l.curry)(((e,t)=>e.graphTypes.filter(To(e,t)))),To=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return n.some(Ui(e,t))},Eo=(e,t)=>(0,l.pipe)(po,(0,l.defaultTo)({}),yo,(0,l.defaultTo)([]),(0,l.chain)(Ii(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Xr(e)))(e,t),mo=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),ho=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),bo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ho((0,l.complement)(mo))(e)},Oo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ho(mo)(e)},vo=(0,l.pipe)(Xr,(0,l.propOr)([],"matchGroups")),go=(e,t,r)=>(0,l.pipe)(vo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),_o=(0,l.curry)(((e,t,r)=>(0,l.pipe)(go,(0,l.propOr)(r,"label"))(e,t,r))),Ao=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(vo,(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]})),No=e=>(0,l.partition)(mo,e),Ro=(0,l.includes)(l.__,["and","or","not"]),Po=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),So=(0,l.includes)(l.__,["equals","notEquals","in"]),wo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Ro(t)?wo(r):Po(t)?r.filter(Wt):So(t)?r.map((0,l.prop)("uri")).filter(Wt):[]})),l.uniq),Io=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(wo),l.uniq),Uo=(0,l.pipe)(vo,Io),Co=(0,l.pipe)(Ao,Io),Lo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Do=(0,l.pipe)(Lo,Xa),jo=(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||Zr(e,n,t)})(e,t))})(e,t)),ko=e=>!!e.required,Fo=(e,t,r)=>{const n=(0,l.cond)([[Wt,Xr(e)],[Yt,Si(e)]])(t);return Mo(e,n,r)},Mo=(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&&!lr(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=Fo(e,n,r).filter((e=>a.some(Bt(e.uri))))}else t.attributes&&(i=Mo(e,t,r));i&&n.push(...i)}return n})):t.type===bt.TYPE_REFERENCE?Fo(e,_t(t),r):[],xo=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),ko]),e.attributes||[])},$o=(e,t)=>{const r=Pt(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},Vo=(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)?On().text(n):n};return r(null,t)})),Go=["label","description","abbreviation","caption","toolTip"],Wo=e=>Vo(Go,e),Yo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Ht(t);return r.find((e=>{let{uri:t}=e;return Ht(t)===n}))})),Bo=(0,l.curry)(((e,t)=>{const r=Ht(t);return(0,l.pipe)(Yo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),qo=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"})},Ho=(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}))},Qo=(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)})),Ko=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Xr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Jo(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){Xo(e,t,r[t])}))}return e}function Xo(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 Zo(i,e,t,r,n)},Zo=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=zo(t,e,n,i);return r.length?Jo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(mr),(0,l.prop)("children"))).filter(la).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},es=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["attributes","analyticsAttributes"])},ts=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["attributes"])},rs=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return zo(e,t,r,["analyticsAttributes"])},ns=(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)})),is=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Ht(r)===e})))),as=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),is("LUD")),(0,l.defaultTo)(r))(t||[])},os=(e,t)=>{let{survivorshipStrategies:r}=e;return is(t,r)},ss=(0,l.allPass)([(0,l.complement)(l.isNil),Fi(ji.READ)]),ls=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Fi(ji.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)),Fi(ji.CREATE)]),cs=(0,l.curryN)(2,(0,l.pipe)(Xr,ls)),ps=e=>{let{ov:t}=e;return!1!==t},ds=(e,t)=>((e,t)=>kr(e.type)&&ae(t))(e,t)||((e,t)=>Fr(e.type)&&oe(t))(e,t),ys=(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))),fs=ys("refEntity"),Ts=ys("refRelation"),Es=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ms=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},hs=(0,l.prop)("objectURI"),bs=(0,l.prop)("objectURI"),Os=(0,l.prop)("type"),vs=(0,l.pipe)(fs,(0,l.defaultTo)({}),hs),gs=(0,l.pipe)(Ts,(0,l.defaultTo)({}),bs),_s=(0,l.pipe)(fs,(0,l.defaultTo)({}),Os),As=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Ns=(0,l.evolve)({refEntity:re,refRelation:re}),Rs=(e,t,r,n)=>{const i=_r(e,r),a=Xr(e,t.type)||Si(e,t.type);if(0===i.length)return null;const o=pr(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},Ps=(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?Ps(a.value,o):a},Ss=(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 Ps(e[r],i)})),ws=(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")]]),Is=(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.map)(ws),(0,l.when)((()=>i.length>0),(0,l.map)(Is(e,i))))(r)})),Us=Is(null),Cs=Is(ps),Ls=(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=Ss(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},Ds=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(vs,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),js=Object.values(_n),ks=(0,l.includes)(l.__,js),Fs=e=>js.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Ms(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 $s=(e,t)=>`${e}_${t}`,Vs=[Ln.matches.name,Ln.matchRules.name],Gs=(0,l.values)(Nn).map((e=>e.name)),Ws=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Gs)))),Ys=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Vs)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>$s(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),Bs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Ws(r),Ys(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith($s(`dtPotentialMatches.${t.name}`,"")))))(Ln)},qs=(0,l.propEq)("uri",Ln.type.uri),Hs=e=>(0,l.values)(Cn).some((0,l.propEq)("uri",null==e?void 0:e.uri)),Qs=(0,l.propEq)("uri",In.sourceSystems.uri),Ks=Object.values(An),Js=(0,l.includes)(l.__,Ks),Xs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ms({},t,{[r.uri]:void 0===n?r.defaultValue:n})},zs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},Zs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ms({},t,{[r.uri]:n})},el=(0,l.propEq)("uri",An.roles.uri),tl=(0,l.propEq)("uri",An.tags.uri);function rl(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){nl(e,t,r[t])}))}return e}function nl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const il=e=>{let{parentUri:t,attributeType:r}=e;return rl({uri:kt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[mr,(0,l.always)({value:{}})],[Or,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),Sr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},al=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ha(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),vr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=il({parentUri:r,attributeType:e});let s=Nr(n,e);s&&(e.type===bt.TYPE_REFERENCE&&(s=wt(s)),a.value=al({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||vr(e))&&(o[t]=[a])}return o},ol=e=>{let{entity:t,metadata:r}=e;return Fo(r,t.type,!0).filter(vr).reduce(((e,t)=>{const n=t.name,i=tr(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:ll({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},sl=(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?rl({},e,{value:sl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return rl({},s(t),al({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),ll=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=il({parentUri:n,attributeType:r}),u=ws(l);return(0,xe.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},ul=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,ws(n),a,o,i)}))},cl=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)}))},pl=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)}))},dl=e=>""===e,yl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([dl,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([dl,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]]),fl=(0,l.reject)(yl),Tl=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=>Tl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),fl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},El=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Tl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Ns),deleteEmptyComplex:e})},ml=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(El(e),(0,l.reject)(l.isEmpty))},hl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return ks(r)?Xs({entity:e,attributeType:r}):ll({entity:e,attributeType:r,parentUri:n,index:i})}),e))),bl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return ks(r)?Zs({entity:e,attributeType:r,value:i}):cl({entity:e,attributeType:r,uri:n,value:i})})),Ol=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return ks(r)?zs({entity:e,attributeType:r}):pl({entity:e,attributeType:r,uri:n})})),vl=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)},gl="UrlThumbnail",_l="CdnUrlThumbnail",Al=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(ps):(0,l.head)(n);return e&&e.value}return null})),Nl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>Al(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Rl=Nl(["CdnUrl","Url"],!0),Pl=Nl(["CdnUrlPreview","UrlPreview"],!0),Sl=Nl([_l,gl],!0),wl=Nl([_l,gl]),Il=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[cr,(0,l.always)(t)],[(0,l.both)(ur,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=cr(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(ks(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)}),[])},Ul=(e,t,r)=>{const n=Ka(e),i=(0,l.any)(r?l.T:ps);return Il(n,t,i)},Cl=(e,t,r,n,i,a)=>{const o=Ft(null==r?void 0:r.uri)?Ha(t,e):Qa(t,e);return Il(o,r,((e,o)=>{const s=na({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:ps,e)||cr(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let Ll;const Dl=e=>{Ll=e};function jl(e,t){return Ll(e,t)}const kl=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)})),Fl=50,Ml=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=Fl,offset:a=0}=e;return jl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},xl=(0,l.once)((()=>jl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),$l=e=>jl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Vl=(e,t)=>jl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Gl=e=>Z.fromNull(ln[e]).map(On().text).orSome(""),Wl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Yl=(0,l.split)("_"),Bl=(0,l.includes)("_"),ql=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),Hl=(0,l.curry)(((e,t)=>e.some(ql(t)))),Ql=Hl([on.IN_RANGE,on.COUNT_RANGE,on.WITHIN]),Kl=Hl([on.EXISTS,on.MISSING_VALUE]),Jl=(0,l.cond)([[Kl,(0,l.always)(0)],[Ql,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Xl=(0,l.complement)(Kl),zl=Hl([on.HAS_ALL,on.EQUALS,on.NOT_EQUALS]),Zl=Hl([on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE]),eu=Hl([on.IN_FILE,on.NOT_IN_FILE]),tu=e=>{switch(e){case on.COUNT_EQUALS:return on.EQUALS;case on.COUNT_NOT_EQUALS:return on.NOT_EQUALS;case on.COUNT_LT:return on.LT;case on.COUNT_LTE:return on.LTE;case on.COUNT_GT:return on.GT;case on.COUNT_GTE:return on.GTE;case on.COUNT_RANGE:return on.IN_RANGE}},ru=Hl([on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS]),nu=Hl([on.WITHIN]),iu=[[on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE],[on.NOT_IN_FILE,on.IN_FILE],[on.EQUALS,on.NOT_EQUALS,on.HAS_ALL],[on.LT,on.LTE,on.GT,on.GTE],[on.MISSING_VALUE,on.EXISTS],[on.COUNT_RANGE],[on.IN_RANGE],[on.STARTS_WITH,on.CONTAINS],[on.FULL_TEXT],[on.ON,on.BEFORE,on.AFTER,on.NOT_EQUALS],[on.WITHIN]],au=(e,t)=>iu.some((r=>r.includes(e)&&r.includes(t))),ou=(0,l.pipe)(l.omit,l.values),su={OPTIONS_FOR_STRING:ou(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_DATE:[on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS,on.MISSING_VALUE,on.EXISTS,on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE,on.IN_FILE,on.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:ou(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_BLOB:ou(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_NUMBER:ou(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_LOOKUP:ou(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],on),OPTIONS_FOR_ENUM:ou(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],on),OPTIONS_FOR_ID:[on.EQUALS,on.NOT_EQUALS,on.IN_FILE,on.NOT_IN_FILE],OPTIONS_FOR_COUNT:[on.EQUALS,on.NOT_EQUALS,on.LT,on.LTE,on.GT,on.GTE,on.IN_RANGE],OPTIONS_FOR_COMPLEX:[on.COUNT_EQUALS,on.COUNT_NOT_EQUALS,on.COUNT_LT,on.COUNT_LTE,on.COUNT_GT,on.COUNT_GTE,on.COUNT_RANGE,on.EXISTS,on.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[on.EQUALS,on.NOT_EQUALS,on.EXISTS,on.MISSING_VALUE]},lu=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 su.OPTIONS_FOR_STRING;case bt.TYPE_LOOKUP:case bt.TYPE_DEPENDENT_LOOKUP:return su.OPTIONS_FOR_LOOKUP;case bt.TYPE_ENUM:return su.OPTIONS_FOR_ENUM;case bt.TYPE_DATE:case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_TIMESTAMP:case bt.TYPE_LOCAL_DATE:return su.OPTIONS_FOR_DATE;case bt.TYPE_BOOLEAN:case bt.TYPE_BOOLEAN_RADIO:return su.OPTIONS_FOR_BOOLEAN;case bt.TYPE_BLOB:return su.OPTIONS_FOR_BLOB;case bt.TYPE_LONG:case bt.TYPE_INT:case bt.TYPE_FLOAT:case bt.TYPE_DOUBLE:case bt.TYPE_NUMBER:return su.OPTIONS_FOR_NUMBER;case bt.TYPE_ENTITY_ID:return su.OPTIONS_FOR_ID;case bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[on.EQUALS];case bt.TYPE_COUNT:return su.OPTIONS_FOR_COUNT;case bt.TYPE_NESTED:case bt.TYPE_REFERENCE:case bt.TYPE_IMAGE:return su.OPTIONS_FOR_COMPLEX;default:return su.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(Zl,n):n},uu=e=>[Qe.and,Qe.andNot].includes(e),cu=e=>[Qe.or,Qe.orNot].includes(e),pu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),cu)),du=(yu=[Qe.and],e=>e.slice(0,-1).every((e=>yu.includes(e.operator))));var yu;const fu=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Tu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),Eu=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},mu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[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)&&Eu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},hu="and",bu=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)(hu,n,e),o=(e=>[Qe.andNot,Qe.orNot].includes(e))(a)?mu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},Ou=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),vu=e=>Array.isArray(e)?e.map(vu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),gu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),_u=e=>`'${e}'`,Au=e=>`"${e}"`,Nu=(0,l.pipe)(vu,gu),Ru=(0,l.pipe)(Nu,_u),Pu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Ql(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),Su=(e,t)=>Zl(t)?{type:bt.TYPE_INT}:eu(t)?{type:bt.TYPE_FILE}:ru(t)&&!nu(t)&&wr(e.type)?{type:bt.TYPE_LOCAL_DATE}:e,wu=Object.values(yn),Iu=e=>wu.includes(e),Uu=e=>On().text(fn[e]),Cu=e=>{const t=f()();switch(e){case yn.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case yn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case yn.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case yn.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case yn.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Lu(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){Du(e,t,r[t])}))}return e}function Du(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ju=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),ku=(0,l.curry)(((e,t,r)=>{const n=r.map(Ql(e)||t.endsWith(".count")?Nu:Ru).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Fu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Mu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Jl(t);return(0,l.pipe)(Fu(i),(0,l.map)(ku(t,r)),ju(" or "))(n)},xu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Ru).join(",")})`},$u=e=>`*${e}*`,Vu=e=>`URL:${e}`,Gu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Wu=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===on.IN_FILE?r:`not ${r}`},Yu=(e,t)=>[P(e,t),S(e,t)],Bu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!qu(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case on.ON:return Lu({},e,n?{filter:on.EQUALS}:{filter:on.IN_RANGE,values:[Yu(i,n)]});case on.BEFORE:return Lu({},e,{filter:on.LTE,values:[[S(i,n)]]});case on.AFTER:return Lu({},e,{filter:on.GTE,values:[[P(i,n)]]});case on.WITHIN:return Lu({},e,{filter:on.IN_RANGE,values:[Cu(i)]})}}return e}),Mu),qu=(0,l.propSatisfies)(wr,"type"),Hu=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",on.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Mu({filter:on.EQUALS,fieldName:t,values:[r]}))),new bu).build())),ju(" or "))(r)}],[(0,l.propEq)("filter",on.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Mu({fieldName:r,filter:t,values:n.map((0,l.pipe)(vu,$u))})}],[(0,l.propEq)("filter",on.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Mu(Lu({},e,{values:(0,l.flatten)(r)})):Gu(r)?xu(Lu({},e,{filter:"listEquals"})):Mu(e)}],[(0,l.propEq)("filter",on.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Jl(t);return(0,l.pipe)(Fu(i),(0,l.map)(ku(t,r)),ju(" and "))(n)})(Lu({},e,{values:(0,l.flatten)(e.values)})):qu(e)?(e=>{const{values:t}=e,r=!qu(e),[n]=t;return(new bu).addClause(Mu(Lu({},e,{filter:on.LT,values:[P(n,r)]}))).addClause(Mu(Lu({},e,{filter:on.GT,values:[S(n,r)]}))).orBuild()})(e):Gu(t)?xu(Lu({},e,{filter:"not listEquals"})):Mu(e)}],[(0,l.propSatisfies)(eu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Mu({fieldName:r,filter:Wu(t,r),values:n.map((0,l.prop)("link")).map(Vu)})}],[(0,l.propSatisfies)(Zl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Mu({fieldName:`${r}.count`,values:n,filter:tu(t)})}],[(0,l.propSatisfies)(ru,"filter"),Bu],[(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 ku(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return ku(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Mu]],Qu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Xl(e)||Ju(r))},Ku=e=>Array.isArray(e)?Ju(e):null!=e&&vu(e).length>0,Ju=e=>e&&e.length>0&&e.every(Ku);function Xu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zu=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},Zu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),ec=(e,t,r)=>"children"===e?rc(r,[...t][0],!0):r,tc=(e,t,r)=>"values"===e?[...r,...t]:r,rc=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)(ec,t),e);if(!r&&zl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(tc,t),e)}return(0,l.append)(t,e)},nc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=zu(e),r=e=>e.fieldName===t?e:r({fieldName:Zu(e),children:[e]});return r(e)})(t);return rc(e,r)}),[]),ic=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")),ac=e=>{let[t]=e;return t.children?ac(t.children):t.operator},oc=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=ac(t)===Qe.andNot,a=n(t,!1),o=i?`not ${mu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${ac(r)||hu} ${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&&ic(i)&&!t?r(i):n(i,a)}],...e])(o))),new bu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},sc=(0,l.pipe)((0,l.propOr)("","filter"),Bl),lc=(0,l.map)((0,l.when)(sc,(e=>{const[t,r]=Yl(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){Xu(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),uc=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)(Qu),lc,nc,oc([...e,...Hu],t))},cc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),pc=[on.ON,on.BEFORE,on.AFTER,on.WITHIN,on.NOT_EQUALS,on.MISSING_VALUE,on.EXISTS],dc=[on.EQUALS,on.NOT_EQUALS,on.STARTS_WITH,on.MISSING_VALUE,on.HAS_ALL,on.FULL_TEXT,on.EXISTS],yc=[on.EQUALS,on.NOT_EQUALS,on.LT,on.LTE,on.GT,on.GTE,on.IN_RANGE],fc=(e,t)=>{const r=sr(e);return(e=>{switch(e){case _n.startDate.name:case _n.endDate.name:case Nn.dueDate.name:case Sn.createdTime.name:case Sn.updatedTime.name:case In.reltioLoadDate.name:case In.createDate.name:case In.updateDate.name:case In.deleteDate.name:case In.publishDate.name:return pc;case wn.matches.name:case In.count.name:return yc;case Nn.workflow.name:case Nn.assignee.name:case Nn.step.name:case Rn.commenter.name:case Sn.createdBy.name:case Sn.updatedBy.name:case In.sourceSystems.name:case In.value.name:return dc;default:return null}})(t)||lu(r)},Tc=[on.EQUALS,on.NOT_EQUALS,on.CONTAINS,on.STARTS_WITH,on.MISSING_VALUE,on.HAS_ALL,on.IN_RANGE,on.WITHIN,on.EXISTS,on.ON],Ec=(0,l.pipe)(fc,(0,l.filter)((0,l.includes)(l.__,Tc))),mc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),hc=e=>{let{query:t,body:r}=e;return t=mc(t),jl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},bc=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)(uc(),cc(t.globalFilter))(n),activeness:t.activityFilter||En.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Yr(i)}`},Oc=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=bc(e,t,r);return jl(n)},vc=e=>jl(`/entities/_total?${e}`),gc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(ls),(0,l.map)((0,l.prop)("uri")))(e),i={filter:on.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(uc(),cc(r.globalFilter))([i,a]),s=Yr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||En.ACTIVE_ONLY,max:4});return jl("/entities/_typeAheadSearch"+s,{method:"GET"})},_c=(0,l.pipe)((0,l.reject)(l.isNil),Wr),Ac=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)(uc(),cc(i))(r),p=_c({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return hc({query:p,body:d})},Nc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return Ac({fieldName:t,searchParams:i,options:n})},Rc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Pc=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)(uc(),cc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Rc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Yr(i)}`},Sc=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=Pc(e,t,r);return jl(n)},wc=e=>jc(e,{select:"secondaryLabel"}),Ic=(e,t)=>{const{select:r=Rc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),jl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Uc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),Ft)),Cc=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=Uc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=hr(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)(uc(),cc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),jl(`${s}/api/${o}/${t}/_object`,m)},Lc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Dc={options:"sendHidden,addRefAttrUriToCrosswalk"},jc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dc;return jl(`/${e}${Yr(t)}`)},kc=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 jl(n,r)},Fc=e=>jl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Mc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return jl(`/${e}/_clone${Yr({executeLCA:!1,valuesToCopy:r})}`,n)},xc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return jl(`/entities/_events/_total${Wr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},$c=(e,t)=>jl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Vc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return jl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},Gc=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 jl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Wr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Wc=e=>{const t=new FormData;return t.append("file",e),jl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,On().text("Can't upload file"));return Promise.reject(t)}))},Yc=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 jl(`/personal/findSavedSearches${Wr({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"}})},Bc=e=>jl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),qc=e=>jl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Hc=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return jl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},Qc=e=>{let{uri:t}=e;return jl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Kc=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),Hc)(e),Jc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),Hc)(e);function Xc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zc=["max","offset","filter"],Zc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:Zc(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){Xc(e,t,r[t])}))}return e}({},t,(0,l.pick)(zc,e)))),ep=(0,l.omit)(["activeness"]),tp=(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)(Zc(e),(0,l.omit)(zc))(e))),ep,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Yr({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},rp=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),np=(0,l.reject)(l.isNil),ip=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),ap=e=>jl(ip(e),{method:"GET",headers:{"Content-Type":"application/json"}}),op=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,ip);return jl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},sp=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?ml()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(np,ne,JSON.stringify);return jl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},lp=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"),ip,n),o=be(i(t),i(r)).concat(ve(t,r));return jl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},up=(e,t)=>{const{url:r,options:n}=tp(e,t);return jl(r,n).then(rp)},cp=(e,t)=>jl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),pp=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===hn.IN?a.inRelations=[n]:a.outRelations=[n],jl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},dp=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return jl(`${t}/recentSearches${Yr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},yp=e=>jl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),fp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return jl(`/recentSearches${Yr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function Tp(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){Ep(e,t,r[t])}))}return e}function Ep(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mp={select:"label,secondaryLabel,name,type,startDate,endDate"},hp=(0,l.reject)(l.isNil),bp=(0,l.pipe)(hp,Wr),Op=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=Tp({},mp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return jl(`/${t}/_tree${bp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},vp=e=>{let{uri:t,graphUri:r}=e;const n=Tp({},mp,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return jl(`/${t}/_parents${bp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},gp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=Tp({},mp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return jl(`/${t}/_hops${bp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function _p(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 Ap=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},Np="/activities",Rp=e=>{let{label:t,description:r}=e;return jl(Np,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:Ap()}})},Pp=e=>{const t=Yr(e);return jl(Np+t,{method:"GET"})},Sp=e=>jl(`/activities/_total${Yr(e)}`,{method:"GET"}),wp=e=>{const{entityUri:t}=e,r=_p(e,["entityUri"]);return jl(`/${t}/_activities${Yr(r)}`,{method:"GET"})},Ip=e=>{const{entityUri:t}=e,r=_p(e,["entityUri"]);return jl(`/${t}/_activities/_total${Yr(r)}`,{method:"GET"})};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 Lp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Dp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return jl(Lp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},jp=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=Lp({url:r,workflowPath:t,tenant:n})),jl(s,{method:i||"GET",body:JSON.stringify(a),headers:Up({"Content-Type":"application/json"},null!=o?o:{})})},kp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Lp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return jl(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)},Fp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Lp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Up({},l,{comment:o}):l;return jl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Mp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Lp({url:`/tasks${s?Yr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Up({objectURIs:[i]},(0,l.reject)(E,a)))};return jl(u,Up({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},xp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return jl(Lp({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})})},$p=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return jl(Lp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Up({max:a,offset:o},i))})},Vp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return jl(Lp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},Gp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return jl(Lp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Wp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return Gp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Yp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return jl(Lp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Bp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return Gp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},qp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return Gp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},Hp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return Gp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},Qp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return jl(Lp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Kp=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return jl(Lp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Jp=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(ps);return a&&a[0]&&(r=n.length>0&&a[0].value?Jp(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}}),""),Xp=(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=Jp(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},zp=/[,\s]*$/,Zp=e=>{const t=On().text(mn);if(!e)return t;const r=e.replace(zp,"");return""===r.toString().trim()?t:r},ed=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},td=(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=ed(e,r.referencedEntityTypeURI);if(n)return Xp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Xp({attributes:t||{}},r.dataLabelPattern);return""},rd=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}`},nd=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)}`},id=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",ad=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),Sl,(0,l.prop)("value"))),od=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),ad),sd=(e,t,r)=>{const n=od(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Ss(e),ad)))(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")])})(Xr(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,ad))(r)})(e,r)||nn(e,r.type);return id(t,n)};function ld(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){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}const cd="DTSS/",pd=(0,l.replace)(new RegExp("^entities/"),""),dd=e=>cd+e.dataTenant+"/"+e.uri,yd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),fd=e=>!(!e||!e.dataTenant),Td=(0,l.startsWith)(cd),Ed=(0,l.pipe)((0,l.ifElse)(Td,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),md=(0,l.ifElse)(fd,dd,(0,l.prop)("uri")),hd=e=>e&&e.uri?e.dataTenant?dd(e):pd(e.uri):"",bd=(0,l.curry)(((e,t,r)=>(Xr(t,r.type)||{})[e]||"")),Od=bd("label"),vd=bd("typeGraphIcon"),gd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xr(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(ps)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:td(e,o,i),uri:a.uri}})).filter(l.identity):[]},_d=(0,l.pipe)(gd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),Ad=(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=Ad(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):Ad(e.slice(1),r)}})),Nd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Rd=e=>(0,l.propOr)([],"matchRules",e),Pd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?ld({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},Sd=(e,t,r)=>t&&r?r.aEntity:e,wd=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 jl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Wr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Id=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 jl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Wr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ud=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return jl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Cd=(e,t,r)=>Promise.all(t.map((async t=>await jl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),Ld=async(e,t)=>await Cd(e,t,"NOT"),Dd=async(e,t)=>await Cd(e,t,"MATCH"),jd=async(e,t)=>await Promise.all(t.map((async t=>await jl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function kd(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){Fd(e,t,r[t])}))}return e}function Fd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Md(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 xd=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return jl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},$d=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return ay({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Vd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return ay({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Gd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return jl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Wd=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 Gd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Yd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(fd,i);return Promise.all([s.length?Ud(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return Gd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},Bd=(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=Md(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)}),[])),qd=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),Bd),Hd=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return jl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(qd)},Qd=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)},Kd=Qd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return jl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(qd)})),Jd=Qd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return jl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Xd=(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)}},zd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return jl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},Zd=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 zd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},ey=Zd("NOT"),ty=Zd("MATCH"),ry=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(fd,a);return Promise.all([Cd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return zd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},ny=ry("NOT"),iy=ry("MATCH");function ay(e){let{requestProvider:t=jl,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}`,kd({},Md(s,["headers"]),{headers:kd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const oy=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return ay({url:Pc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},sy=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return ay({url:bc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ly=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=tp(t,r);return ay({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(rp,(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)))}))))},uy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return ay({url:`${Lc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},cy=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return jl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},py=e=>{let{dtssPath:t,tenant:r}=e;return jl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},dy=e=>{let{dtssPath:t,customerTenant:r}=e;return jl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},yy=e=>{let{dtssPath:t,tenants:r}=e;return jl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},fy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return ay({url:Lc(t),dataTenant:r,customerTenant:n,dtssPath:i})},Ty=()=>jl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function Ey(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){my(e,t,r[t])}))}return e}function my(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const hy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=Ey({},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 jl(`${t}/api/${r}/graph/search${Yr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},by=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return jl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:Ey({},n,i),headers:{"Content-Type":"application/json"}})},Oy=(e,t)=>`${e}/${t}/comments`,vy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return jl(`${Oy(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},gy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return jl(`${Oy(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},_y=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return jl(Oy(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},Ay=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return jl(`${Oy(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Ny=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return jl(`${Oy(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ry=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return jl(`${Oy(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Py=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return jl(`${Oy(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Sy=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return jl(`${Oy(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},wy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Yr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return jl(`${Oy(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Iy(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){Uy(e,t,r[t])}))}return e}function Uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Cy=e=>{let{tenant:t,servicesPath:r}=e;return jl(`${r}/oauth/proxy${Yr({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ly="graphExport",Dy=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await My({servicesPath:e,tenant:t,environment:r,namespace:Ly,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(Iy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await My({servicesPath:e,tenant:t,environment:r,namespace:Ly,options:Iy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await My({servicesPath:e,tenant:t,environment:r,namespace:Ly,options:Iy({method:"POST"},o)})),s},jy=e=>{let{servicesPath:t,key:r}=e;return jl(`${t}/settings${Yr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},ky=e=>{let{servicesPath:t}=e;return jl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Fy=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return jl(`${n}/plugins${Yr({tenant:t,user:r})}`,{method:"GET"})},My=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return jl(`${n}/configService${Yr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},xy=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return My({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},$y=e=>{let{servicesPath:t,stateHash:r}=e;return jl(`${t}/searchLink?key=${r}`,{method:"GET"})},Vy=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),jl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Gy=e=>jl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Wy=e=>{let{exportPath:t,tenant:r,options:n}=e;return jl(`${t}/${r}/activities${Yr(n)}`,{method:"POST"})};function Yy(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){By(e,t,r[t])}))}return e}function By(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=>{const{entityUri:t}=e;return jl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Hy=e=>{let{entityUri:t,crosswalk:r}=e;return jl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Qy=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return jl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[Yy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),Yy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Ky=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return jl(`/${r}/_${n}${Yr({contributorURI:t})}`,{method:"POST"})},Jy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return jl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Xy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return jl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},zy=e=>{let{entityUri:t,crosswalkId:r}=e;return jl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Zy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ef=e=>{let{entityTypeUri:t}=e;return jl(`/dataQuality/fillRates${Wr({entityType:Ht(t)})}`,{method:"GET"})},tf=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){Zy(e,t,r[t])}))}return e}({},n===at.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return jl(`/entityType/${Ht(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},rf=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return jl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Ht(n)}`,{method:"GET",headers:{env:i}})},nf=e=>{let{timeSeriesServicePath: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 jl(`${t}/api/${r}/entityType/${Ht(n)}/ml/dataQuality/${o}/timeSeries`,{method:"POST",body:JSON.stringify(c)})},af=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return jl(`/${t}${Yr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},of=e=>{let{attributeUri:t,value:r}=e;return jl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},sf=e=>{let{attributeUri:t,value:r}=e;return jl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},lf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return jl(`/${t}${Yr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},uf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Yr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=ml()([[{value:a}]]);return jl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},cf=e=>{let{entityUri:t,attributeName:r,value:n}=e;return jl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},pf=e=>{let{entityUri:t,attributeName:r}=e;return jl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};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{entityUri:t}=e;return jl(`/${t}/_historicURIs`,{method:"GET"})},ff=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 jl(`/${t}/_changesWithTotal${Yr(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){df(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},Tf=(e,t)=>jl(`/${e}/_previousChange${Yr({timestamp:t})}`,{method:"GET"}),Ef=(e,t)=>jl(`/${e}${Yr({time:t})}`,{method:"GET"});function mf(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}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{url:t,method:r,data:n,headers:i}=e;return jl(t,mf({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:mf({"Content-Type":"application/json"},null!=i?i:{})}))},Of=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Yr({options:a.join(","),severity:o.join(",")});return jl(`${t}/validate/${i}/entity/${hd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},vf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return jl(`${t}/validate/${n}/entity${Yr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},gf=e=>{let{tenant:t,apiPath:r}=e;return jl(`${r}/tenants/${t}/name`,{method:"GET"})},_f=e=>{let{tenant:t,apiPath:r}=e;return jl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},Af=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return jl(`${a}/preferences${Yr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Nf=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 jl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Rf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return jl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},Pf=e=>{const{servicesPath:t}=e;return jl(`${t}/getTokenForWorker`,{method:"GET"})};var Sf=r(29524);const wf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=Mt(),s={attributes:al({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?cl({entity:e,attributeType:n,uri:i.uri,value:t}):ll({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},If=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(vs),(0,l.filter)(Ft),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Uf=(0,l.curry)(((e,t)=>{const r=If(e=e||{},t=t||{});return r.concat((0,l.chain)(Uf(e),r))})),Cf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),Lf=Cf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),Df=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),Ft)),jf=e=>(0,l.pipe)(Lf,Df(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),kf=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Lf,(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})),Ff=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),Ft),(0,l.omit)(["uri","timestamp"])),Mf=(0,l.pipe)(Ff,(0,l.evolve)({attributes:ml(!0)})),xf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=jf(i);if(a.length>0)for(const t of a)e=kf(t,r[t].uri,e);const o=await kc(Mf(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},$f=async(e,t,r)=>{const n=Gf(e,t),i={};for(const t of n)i[t]=await xf(e,t,i,r);return i},Vf=(0,l.curry)(((e,t)=>{const r=Sf.Node(t);return jf(e[t]).forEach((t=>{const n=Vf(e,t);r.addEdge(n)})),r})),Gf=(e,t)=>(0,l.pipe)((0,l.map)(Vf(e)),(0,l.map)(Sf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Wf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Ff))})),Yf=(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]},Bf=(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 kf(r,n,e)}),e))))}),t)}),Wf),qf=(0,l.curry)(((e,t)=>(0,l.when)(Ft,(0,l.propOr)(l.__,t,e),t)));function Hf(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){Qf(e,t,r[t])}))}return e}function Qf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Kf=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:ot.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Jf=e=>{let{relationUri:t}=e;return{type:ot.DELETE_RELATION,parameters:{relationUri:t}}},Xf=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}}},zf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:ot.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},Zf=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}}},eT=(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))),tT=e=>e.type===ot.DELETE_RELATION,rT=e=>e.type===ot.CREATE_RELATION,nT=e=>e.type===ot.REPOINT_RELATION,iT=e=>e.type===ot.UPDATE_RELATION,aT=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),oT=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 sp({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 op(e,i).then(o)};case ot.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return pp(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case ot.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return lp({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=[Jf({relationUri:o}),Kf({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(sT(n)),(0,l.map)(oT),aT)(s)}}},sT=e=>t=>Hf({dcrProcessor:e},t),lT=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Br({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(sT(r)),(0,l.map)(oT),aT,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},uT=e=>t=>(0,l.map)((t=>Hf({},t,{parameters:(0,l.evolve)({parentUri:qf(e),entityUri:qf(e),newEntityUri:qf(e)},t.parameters)})),t),cT=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},pT=(e,t)=>{const r=e.filter(rT).find(eT(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>iT(o)&&eT(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!nT(o)||!eT(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(cT({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},dT=(e,t)=>{const r=e.filter(nT).filter(eT(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!iT(i)||!eT(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(cT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},yT=(e,t)=>{const r=e.filter(tT).filter(eT(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!eT(t,e)))},fT=(e,t)=>{const r=e.filter(iT).filter(eT(t));let n=null;const i=e.filter((e=>!r.includes(e)||!iT(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(cT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},TT=e=>{const t=e.filter(tT).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(yT,e)},ET=e=>{const t=e.filter(rT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(pT,e)},mT=e=>{const t=e.filter(nT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(dT,e)},hT=e=>{const t=e.filter(iT).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)(fT,e))(t)},bT=e=>(0,l.pipe)(TT,ET,mT,hT)(e);function OT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vT(e,t,r[t])}))}return e}function vT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gT=e=>OT({},(0,l.path)(DT(),e),{startDate:(0,l.path)(MT(),e),endDate:(0,l.path)(xT(),e)}),_T=(e,t)=>(0,l.pipe)((0,l.path)(FT()),qf(t))(e),AT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=_T(e,r),i=(0,l.path)(jT(),e)===st.IN,a=e.parentEntityUri||n;return Kf({parentUri:i?t:a,relation:gT(e),entityUri:i?a:t})})),...o.map((t=>{const i=_T(t,r),a=(0,l.path)(jT(),t)===st.IN,o=i!==(0,l.pipe)((0,l.path)(DT()),a?$T:VT)(t),s=YT(e,(0,l.path)(CT(),t)),u=t.parentEntityUri||n,c=qf(r,i);return o?Zf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(DT(),t),isReversed:!1}):zf({oldRelation:(0,l.path)(DT(),s),newRelation:gT(t)})})),...i.map((e=>Jf({relationUri:e}))),...s.map((e=>Xf({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},NT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return OT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),RT=(0,l.has)("dataTenant"),PT=(0,l.ifElse)(RT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),ST=(e,t)=>(0,l.pipe)(Si,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(js),Ba)(e,t),wT=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)}},IT=(e,t,r)=>{const n=Xp(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)},UT="relation",CT=(0,l.always)([UT,"relationUri"]),LT=(0,l.always)([UT,"relationType"]),DT=(0,l.always)([UT,"object"]),jT=(0,l.always)([UT,"direction"]),kT=(0,l.always)([UT,"object","attributes"]),FT=(0,l.always)(["entity","entityUri"]),MT=(0,l.always)([UT,"startDate"]),xT=(0,l.always)([UT,"endDate"]),$T=(0,l.path)(["startObject","objectURI"]),VT=(0,l.path)(["endObject","objectURI"]),GT=(0,l.path)(["startObject","objectTypeURI"]),WT=(0,l.path)(["endObject","objectTypeURI"]),YT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(CT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=YT(r.connections,t);if(e)return e}}},BT=(0,l.pipe)(YT,(0,l.path)(DT())),qT=(0,l.allPass)([(0,l.pipe)((0,l.path)(FT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(LT()),(0,l.complement)(E))]),HT=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}=JT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=QT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?wT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},QT=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:hn.IN}:{type:t[0],direction:hn.OUT}:null},KT=e=>e.uri||e,JT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&$i(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===hn.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"],Xr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Xr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(KT,Si(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(hn.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(hn.OUT)),(0,l.map)(u))},t)||{}},XT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Li({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ii(e,n.uri);return n&&(!t||Zr(e,i,t))&&(!r||Zr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Xr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Xr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(ss,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)}},zT=(0,l.curry)(((e,t,r,n,i)=>{const a=Zr(n,l.__,t.type),o=e?WT:GT,s=Zr(n,l.__,r.type),u=e?GT:WT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),ZT=(e,t,r)=>{const n=e?WT:GT,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(Zr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function eE(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){tE(e,t,r[t])}))}return e}function tE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return eE({},t,{[r]:{parents:n,children:i}})},nE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return eE({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},iE=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=If(t,i),o=rE({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>iE(n.uri,t,[e],r)),o)},aE=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)(CT(),n),a=t?nE({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(FT(),n),s=Ft(o)?[o]:[],u=rE({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>iE(t,r,[i],e)),u)}),n)},oE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return aE(r,e,t,iE(e,t))},sE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return oE(t,r,n);if(Vt(e)){const t=YT(n,e);return t&&aE([t],null,r)}return r[e]?iE(e,r):void 0},lE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>lE(e,t))))},uE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>uE(e,t))))},cE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=$t(t),u=oE(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=YT(i,c),!s)return null;o.push({type:Ye.relationConnection,value:s,valueType:Si(a,(0,l.path)(LT(),s))});continue}if(Vt(u)){const e=n[c];if(!e)return null;o.push({type:Ye.tempEntity,value:e,valueType:Xr(a,e.type)});continue}const p=n[u],d=Ds(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ye.attributeValue,value:d,valueType:Ar(a,Xt(d.uri,p.type))}),o.push({type:Ye.tempEntity,value:y,valueType:Xr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},uE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Vt(s),d=p?BT(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Si(a,d.type):Xr(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:Ye.tempEntity,value:T,valueType:Xr(a,T.type)}),o.push({type:Ye.attributeValue,value:s,valueType:E}),m=s.value;const l=vs(s);T=l&&Ft(l)?n[l]:null}}return o},pE=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,dE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?dE(t.value):[]];return e.concat(r)}),[])),yE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,fE=e=>{const t=[...dE((null==e?void 0:e.attributes)||[]),...dE((null==e?void 0:e.analyticsAttributes)||[])];return e?[md(e),...t]:[]},TE=(e,t)=>[e,...t.map((t=>yE(e,t)))],EE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return PT(t)}))},mE=(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,md({uri:n,dataTenant:i}),r]})(t)}},hE=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),bE=(0,l.curry)(((e,t)=>{const r=Lo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(bE(e,r.extendsTypeURI)):n})),OE=(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"),bE(e),OE(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 _E=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}},AE=e=>!e.deactivated,NE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},RE=e=>NE(e)+e.message,PE=(0,l.unless)(l.isNil,(0,l.prop)("message")),SE=(0,l.unless)(l.isNil,(0,l.prop)("type")),wE=(0,l.curry)(((e,t)=>Bt(t.parentUri,e))),IE=(0,l.curry)(((e,t)=>t.parentUri===e)),UE=(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))),CE=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),LE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),DE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([GE,AE,wE(e),UE(t),(0,l.complement)(LE(e,t.uri))]))(r)},jE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([GE,AE,IE(e),CE(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",$e.missed))]))(r);return n&&n.message||""},kE=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))},FE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([AE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(CT(),e))]))(t)},ME=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([AE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},xE=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([AE,wE(t)]))(r)},$E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([AE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},VE=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?cE(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(fr(a))return Xp(o,e.dataLabelPattern);if(Tr(a)){const t=o,i=vs(t),a=gt(e),s=Xr(n,a);return Ft(i)?Xp(r[i],s.dataLabelPattern):t.label}return""}case Ye.tempEntity:return Xp(o,a.dataLabelPattern);case Ye.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Xr(n,null==e?void 0:e.entityType);return`${Zp(i&&Ft(i)?Xp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||wi(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gE(e,t,r[t])}))}return e}({},e,{label:Zp(t)})}))},GE=e=>!e.severity||e.severity===Ge.ERROR,WE=(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(WE(n))}));case bt.TYPE_REFERENCE:return!!fs(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}})),YE=(e,t)=>e.every((0,l.complement)(WE(t))),BE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Fo(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||!ps(e.parent))))).forEach((e=>{YE(e.attrValues,n)&&r.push(_E({type:$e.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:On().text("Attribute is required"),source:Ve.local}))})),r}),[])},qE=(0,l.curry)(((e,t,r)=>Rs(e,t,r,!1))),HE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Xr(e),(0,l.prop)("attributes"),(0,l.reject)(dr),(0,l.filter)(Tr),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(qE(e,t)));return(0,l.pipe)(r,(0,l.reject)(vs),(0,l.map)((e=>{let{uri:r}=e;return _E({type:$e.missedRefEntity,uri:"",attributeTypeUri:Xt(r,t.type),parentUri:r,message:On().text("Entity is required"),source:Ve.local})})))(t)},QE=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(vs,Ft)).flatMap((n=>{const i=vs(n),a=t[i],o=Ar(e,Xt(n.uri,r.type));return KE(e,t,o,a)})),KE=(e,t,r,n)=>{const i=At(r),a=i.map((t=>Ar(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",bt.TYPE_REFERENCE))).flatMap(Rt).concat(i);return JE(e,t,n,(e=>a.some(Bt(e.uri))))},JE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=BE(e,r,n),a=HE(e,r),o=QE(e,t,r);return[...i,...a,...o]},XE=(e,t)=>{const r=(0,l.path)(DT(),t)||{};return BE(e,r)},zE=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(FT()),(0,l.ifElse)(Ft,(e=>t[e]),(0,l.always)(null)))(r),i=XE(e,r),a=(e=>(0,l.path)(FT(),e)?[]:[_E({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(LT(),e),parentUri:(0,l.path)(CT(),e),message:On().text("Entity is required"),source:Ve.local})])(r),o=((e,t,r)=>r?JE(e,t,r):[])(e,t,n);return[...i,...a,...o]},ZE=e=>(0,l.path)(["entity","uri"],e)?[]:[_E({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:On().text("Entity is required"),source:Ve.local})],em=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=BE(e,r),i=ZE(t);return[...n,...i]};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 rm=(e,t)=>{var r,n;const i=Xr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||lo(e)},nm=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),im=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(nm(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},am=(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)(gs,Ft,l.not)]),(e=>{const t=(0,l.pipe)(gs,Ht)(e);return im((e=>e.replace(t,t+Ct)))(e)})),(0,l.when)((0,l.pipe)(vs,Ft),(t=>{const r=vs(t),n=e[r],i=n&&sm(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){tm(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),om=(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)(am(r,e.type)),(0,l.map)(im(rr))))})(e))),sm=(e,t)=>(0,l.evolve)({attributes:Tl({valueTransformer:(0,l.pipe)(Ns,am(t),nm(rr)),deleteEmptyComplex:!0}),uri:rr})(e);function lm(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){um(e,t,r[t])}))}return e}function um(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cm=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(Ut,"g"),"uri$$$$").replace(new RegExp(Ct,"g"),""))),pm=e=>(0,l.pipe)((0,l.evolve)({objectUri:cm,objectParentUri:cm}),(e=>{return lm({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?$e.missed:$e.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&tr(e.objectUri),uri:e.objectUri,source:Ve.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),dm=(e,t)=>(0,l.map)((0,l.pipe)(pm,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=VE(t,s),p=null!=c&&c.length?c.slice(0,-1):VE(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&Ar(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 lm({},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&&er(i)){const n=(0,l.last)(a),i=n.valueType;if(Tr(i)&&Pt(i).includes(o)){const i=vs(n.value),o=i&&Ft(i)?t[i]:null;return o?lm({},e,{parentUri:o.uri,path:a.concat({type:Ye.tempEntity,value:o,valueType:Xr(r,o.type),label:""})}):e}}return e}})(t)))(e),ym=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 fm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Tm;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(Tm||(Tm={}));const Em={},mm={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"]}},hm=(0,l.curry)(((e,t)=>{const r=(e=>{if(!Em[e]){const t=mm[e]||mm.random0;Em[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){fm(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return Em[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]})),bm=e=>hm(Tm.Charts,e);var Om=r(51404),vm=r.n(Om);const gm=Array.from({length:100},((e,t)=>t/100)),_m=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)},Am={},Nm=new(vm())({hash:_m,saturation:gm.slice(15,71),lightness:gm.slice(50,90)}),Rm=(0,l.curry)(((e,t,r)=>{t in Am||(Am[t]={});const n=Am[t];r in n||(n[r]=((e,t)=>{const r=String(_m(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Pm=Rm(Nm,"crosswalks"),Sm=Rm(Nm,"sources"),wm=Rm(Nm,"contributors");function Im(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){Um(e,t,r[t])}))}return e}function Um(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Cm=(0,l.has)("items"),Lm=e=>0===e,Dm=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)},jm=e=>e.reduce(((e,t)=>e+t.width),0),km=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Fm=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),Mm=e=>e.reduce(((e,t)=>e+t.height),0),xm=e=>(0,l.is)(String,e)&&e.includes("%"),$m=e=>Boolean(e.spacer),Vm=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),Gm=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Cm(t)?Gm(t):t)),[]),Wm=e=>({id:e.layout}),Ym=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Wm;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=xm(r.width)?Vm(i,r.width):u}return Dm(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return Dm(n,t,r)},o=(e,t)=>Cm(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,Cm(s)?n(s.layout):e(s.view)),d=Lm(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(Cm(s))return o.concat(p(Im({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(Im({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:jm(o),height:km(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Cm(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=Lm(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Cm(i))return r.concat(p(Im({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(Im({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?Dm(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?Dm(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Fm(i),height:Mm(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=Lm(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return Im({},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=Im({},e,{width:a}),s=Im({},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(Im({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return Im({},e,{height:Mm(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(Im({},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 Im({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=Im({},t,{items:(0,l.reject)($m,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 Gm(f)},Bm=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),qm=[ct.FilteredEntitiesViewFacet,ct.ActivitiesViewFacet,ct.ProfileStatsFacet,ct.FilteredSavedSearchesFacet],Hm=(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=qm.includes(a.component)?8:4;return Im({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function Qm(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){Km(e,t,r[t])}))}return e}function Km(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Jm={BarChart:ut.BAR,BarChartGrouped:ut.BAR,BarChartHorizontal:ut.BAR,LineChart:ut.LINE,Map:ut.MAP,Pie:ut.PIE},Xm=(e,t)=>Zt(e)?Kt(e,t):e,zm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=Jm[r];return Qm({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Zm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return Qm({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"]))},eh=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return Qm({},e,{value:[un,cn,on.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:dn(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Zt(t)||!r?n:(n||[]).concat((i=r,{filter:on.EQUALS,fieldName:"type",values:[i]}));var i},th=["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"],rh={"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:Xm(n,r),filters:eh(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:Xm(n,r),filters:eh(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 Qm({id:t,count:o,canRead:u,orderType:s,attributeUri:Xm(r,p),filters:eh(a,r,p),component:ct.DashboardFacet,title:i,showOthers:!0},zm(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:Xm(n,r),filters:eh(a,n,r),chartType:ut.MAP,component:ct.DashboardFacet,title:i,geoUrl:th[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 Qm({id:t,count:o,canRead:l,attributeUri:Xm(n,r),filters:eh(a,n,r),component:ct.DashboardFacet,title:i,geoUrl:s,chartType:ut.MAP,projection:"geoMercator"},zm(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:Zm(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:eh(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:on.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||On().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||On().text("Activity log")}}},nh=e=>({id:e,height:10}),ih=(0,l.pipe)((0,l.map)((e=>{const t=rh[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),ah=e=>{if("0.1"===e.version){const t=ih(e.views),r=Ym(nh,e.layout,{columns:4});return{id:e.id,margin:0,layout:Bm(r,t),views:t}}return e},oh=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=>oh(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){lh(e,t,r[t])}))}return e}function lh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const uh=sh({},pt,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),ch=e=>e,ph={[uh.Attributes]:ch,[uh.HierarchyTree]:ch,[uh.HierarchyPaths]:ch,[uh.RelationsTable]:ch,[uh.Relations]:e=>sh({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[uh.SingleAttributeView]:ch,[uh.CustomView]:ch,[uh.TableAttributeView]:ch,[uh.MapView]:ch,[uh.OldTreeView]:e=>sh({},e,{class:pt.HierarchyTree}),[uh.OldMapView]:e=>sh({},e,{class:pt.MapView}),[uh.ImageAttributeView]:ch,[uh.PotentialMatchesView]:ch},dh=(0,l.pipe)((0,l.map)((e=>{const t=ph[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),yh=(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})),fh=e=>{if("0.1"===e.version){const t=dh(e.views),r=Ym(yh(t),e.layout,{columns:4});return{id:e.id,layout:Bm(r,t),views:t,workflow:e.workflow,maxWidth:e.maxWidth,sidePanelViews:e.sidePanelViews,profileBand:e.profileBand}}return e},Th=(e,t)=>e.class===t||e["react-class"]===t,Eh=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(Th(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 Th(t,pt.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.includes(n)||t.includes(n)}},mh=(e,t)=>e.filter((e=>t.some((t=>Th(e,t))))).map((e=>{let{id:t}=e;return t})),hh=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},bh=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),Oh=(e,t)=>(e||[]).find((e=>e.activator===t));function vh(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){gh(e,t,r[t])}))}return e}function gh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _h=(e,t)=>oh(t).map((t=>(0,l.pipe)((0,l.map)((e=>hh(e,t))),(0,l.reject)(l.isNil),l.head)(e))),Ah=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Nh=(e,t)=>{const r=_h(e,t.layout),n=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>hh(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return oh(r.layout||{})}})(e,t),i=fh(vh({},t,{views:r,version:"0.1"})),a=t["entity-type"],o=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head,(0,l.when)((0,l.complement)(l.isNil),(0,l.pick)(["showEntityId","cloneAction"])))(e))(e);return(0,l.reject)(l.isNil,{entityType:a,views:i.views,layout:i.layout,sidePanelViews:n,profileBand:o})},Rh=(e,t)=>{if("scroll"===t.layout.layout){const r=_h(e,t.layout),n=ah(vh({},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}},Ph=(e,t)=>{const r=_h(e,t.layout)[0];return{class:yt.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},Sh=(e,t)=>{const r=_h(e,t.layout)[0];return{class:yt.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},wh=(e,t)=>{const r=_h(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}},Ih=(e,t)=>{const r=_h(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}},Uh=(e,t)=>{const r=_h(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}},Ch=(e,t)=>{const r=_h(e,t.layout)[0];return{class:yt.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},Lh=(e,t)=>{const r=_h(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=bh(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"]}},Dh=(e,t)=>({class:yt.Graph,id:t.id}),jh=(e,t)=>{const r=_h(e,t.layout)[0];return{class:yt.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},kh=e=>t=>!!(0,l.intersection)(e,t).length,Fh=(0,l.cond)([[kh(["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"]),()=>Rh],[kh(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Ph],[kh(["com.reltio.plugins.graph.GraphView"]),()=>Dh],[kh(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>Sh],[kh(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>wh],[kh(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Ih],[kh(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>Uh],[kh(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Ch],[kh(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>Lh],[kh(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>jh],[l.T,()=>(0,l.always)(void 0)]]),Mh=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(Ah),(0,l.map)((t=>Nh(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=>hh(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=>hh(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=oh(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 Fh(o)(t,i)},xh=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))},$h="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Vh;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Vh||(Vh={}));const Gh={[yt.DQDashboard]:`${$h}DqDashboard.svg`,[yt.Dashboard]:`${$h}Dashboard.svg`,[yt.Graph]:`${$h}Graph.svg`,[yt.RelationshipSearch]:`${$h}GraphSearch.svg`,[yt.Interactions]:`${$h}Interactions.svg`,[yt.PotentialMatches]:`${$h}PotentialMatches.svg`,[yt.Profile]:`${$h}Profile.svg`,[yt.ProfileActivityLog]:`${$h}ActivityLog.svg`,[yt.Relationships]:`${$h}Relationships.svg`,[yt.Sources]:`${$h}Crosswalk.svg`,[yt.Search]:`${$h}Search.svg`,[Vh.DashboardGroup]:`${$h}DashboardGroup.svg`,[Vh.ProfileGroup]:`${$h}ProfileGroup.svg`,[Vh.SearchGroup]:`${$h}SearchGroup.svg`,DEFAULT:`${$h}Default.svg`},Wh=e=>Gh[null==e?void 0:e.class]||Gh.DEFAULT,Yh=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Gh[Vh.ProfileGroup]:null,Bh=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Gh[yt.Dashboard]||t===Gh[yt.DQDashboard]})),(0,l.always)(Gh[Vh.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Gh[yt.Search]||t===Gh[yt.RelationshipSearch]})),(0,l.always)(Gh[Vh.SearchGroup])],[l.T,()=>null]])(e),qh=e=>(0,l.pipe)((0,l.chain)(xh),(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:Wh(Mh(e,t)),screen:Mh(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=Mh(t,e);return{label:t.label,icon:Yh(t)||Bh(r)||Wh(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function Hh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qh=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},Kh=e=>({id:e,height:10}),Jh=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)(Qh),(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=ih(((e,t)=>{const r=oh(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){Hh(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Ym(Kh,t.layout,{columns:4});return{views:r,layout:Bm(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function Xh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zh=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,Zh=e=>(0,l.pipe)((e=>bh(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){Xh(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),eb=(0,l.prop)("showLookupCode"),tb=e=>{const t=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),r=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>hh(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),u=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),c=(e=>(0,l.pipe)((e=>Oh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(zh,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),p=Zh(e),d=(e=>(0,l.pipe)((e=>Oh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),y=(e=>(0,l.pipe)((e=>Oh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),f=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),T=(e=>(0,l.pipe)((0,l.map)((e=>hh(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e);var E;return{i18n:o,entity:{requestSettings:{defaultMaxValues:t}},image:{attributeFieldsOrder:r},lookups:{autocomplete:n,showCode:void 0===(E=eb(T))||E},validate:{levels:i,validateReadMode:a},attributePresentations:s,workflow:{enabled:u},defaultRoute:c,customScripts:p,checkUser:d,checkIdle:y,showSwitchToClassic:f}},rb=e=>({layout:qh(e),pivoting:Jh(e),properties:tb(e)});var nb=r(58697),ib=r.n(nb);function ab(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){ob(e,t,r[t])}))}return e}function ob(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sb=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}_${ib()()}`;return n[e.id].push(t),i=!0,ab({},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]++,ab({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},lb=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(lb(e))}))}))),t},ub=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(yb,t),(0,l.propOr)([],"crosswalks",e))),e),cb=(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(cb(e))}))})),r},pb=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=pb(e);r>t&&(t=r)}))})),t+1):t},db=(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},yb=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},fb=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},Tb=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},Eb=(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)},mb=(0,l.eqBy)(yb),hb=(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)(Ts,(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)))),bb=(e,t,r,n)=>{const i=`\n importScripts("${e}");\n importScripts("${t.join('","')}");\n postMessage({action:'loaded'});`;let a;try{const e=window.webkitURL||window.URL;a=new Worker(e.createObjectURL(new Blob([i],{type:"application/javascript"})))}catch(e){a=new Worker("data:application/javascript,"+encodeURIComponent(i))}if(a){let e="";a.addEventListener("message",(t=>{if("loaded"!==t.data.action){const i=JSON.parse(t.data);r({task:i,worker:a,innerText:e,config:n}),"setHtml"===i.action&&(e=i.params.html)}}))}return a},Ob=(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=On().number(t));return t})),vb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?On().number(e,"0,0.0a").toUpperCase():On().number(e,"0,0"):""},gb=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let _b=!0;const Ab=e=>_b=e,Nb=(e,t)=>e!==t&&t?_b&&e?`${t} (${e})`:t:e,Rb=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Pb=(e,t,r)=>{const n=Rb(e,t,r);return Nb(r,n)},Sb=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),wb=(0,l.complement)(Sb),Ib=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Ub=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)},Cb=(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})))),Lb=(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&&Ob(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)?On().text("yes"):On().text("no");case bt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(Iu(t)?Uu(t):On().date(t,s));case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_LOCAL_DATE:return t&&(Iu(t)?Uu(t):On().date(t,s));case bt.TYPE_TIMESTAMP:return t&&(Iu(t)?Uu(t):On().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)?Nb((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Db={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)"},jb=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()}},kb=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})))),Fb=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),jb,kb);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}},Mb="__metadata",xb=(e=>{const t=[Mb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),$b=(0,l.set)(xb),Vb=(0,l.view)(xb),Gb=$b(Tn.NEW),Wb=$b(Tn.REMOVED),Yb=$b(Tn.EDITED),Bb=$b(Tn.IGNORED),qb=(0,l.pipe)(Vb,(0,l.equals)(Tn.REMOVED)),Hb=(0,l.pipe)(Vb,(0,l.equals)(Tn.NEW)),Qb=(0,l.pipe)(Vb,(0,l.equals)(Tn.EDITED)),Kb=(0,l.pipe)(Vb,(0,l.complement)(l.isNil)),Jb=(0,l.pipe)(Vb,(0,l.equals)(Tn.IGNORED)),Xb=(0,l.omit)([Mb]),zb=(e,t)=>e===Mb?void 0:t;function Zb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eO=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=eO(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},tO=(e,t)=>eO((0,l.propEq)("nodeId",t),e),rO=(e,t)=>eO((0,l.pathEq)(["entity","uri"],t),e),nO=(e,t)=>{const r=tO(e,t);return r.length>1?r[r.length-2]:null},iO=(e,t)=>{const r=tO(e,t);return r.length>0?r[r.length-1]:null},aO=(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=>aO(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},oO=()=>{},sO=(e,t)=>{let{parent:r,nodeProcessing:n=oO}=t;n(e,r),e.children&&e.children.forEach((t=>sO(t,{parent:e,nodeProcessing:n})))},lO=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){Zb(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})}}},uO=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&&sO(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}=lO({node:r,connection:n,isReversed:i}),s=Kf({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ze.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=lO({node:r,isReversed:i,connection:n}),l=s?Zf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):zf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},cO=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=cO(r,t);if(e)return e}return!1},pO=(0,l.curry)(((e,t)=>{const r=(0,l.map)(pO(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),dO=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>cO(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:pO(e,n.root)}}));return(0,l.pipe)(r,n)(t)},yO={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},fO={asc:"asc",desc:"desc"},TO=yO.entityLabel,EO=fO.asc,mO=(0,l.always)(0),hO=e=>{let{sortField:t=TO,sortOrder:r=EO,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case yO.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return M_.strings.sort(t,a,o)})(n,r);case yO.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return M_.strings.sort(e,i,a)})(r);default:return mO}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},bO=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(fO)),l.identity,(0,l.always)(EO))),OO=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(yO)),l.identity,(0,l.always)(TO)));var vO=r(91104);let gO;const _O=(e,t)=>(gO||(gO=vO.createClient({key:t})),new Promise((t=>{gO.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)}))}))),AO=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},NO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(ps).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[AO(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(NO(e.value,t,r))),n})),RO=e=>e&&e.length>0,PO=(e,t)=>[].concat(e&&e.attributes?NO(e.attributes,t):[]).filter(l.identity),SO=(e,t,r,n,i)=>{if(e&&e.type){const t=(Xr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=PO(e,t.latitude),n=PO(e,t.longitude),RO(r)&&RO(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(RO(t)&&t[0].value&&RO(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?_O(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=Xr(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 SO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?_O(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)))},IO=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=Xr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(Ar(e,r.latitude,t.type)&&Ar(e,r.longitude,t.type)){const e=PO(t,r.latitude),n=PO(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))},UO=(e,t,r)=>Promise.all([IO(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 CO(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){LO(e,t,r[t])}))}return e}function LO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const DO=(e,t)=>t.values.map(_o(e,t.entityTypeUri)),jO=(e,t,r)=>Bs(t.fieldName,r)||Ar(e,Kt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),kO=(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?Nb(e,t):e}),r)},FO=(0,l.path)(["attrType","label"]),MO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>CO({},e,{[t]:!0})),{});e[r]=e[r]?CO({},e[r],n):n}return e}),{}),xO=(0,l.pipe)((0,l.prop)("values"),E),$O=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",Ln.type.name)),VO=e=>e.type===YO.NUMERIC_RANGE_FACET,GO=e=>e.type===YO.DATE_RANGE_FACET,WO=(0,l.either)(VO,GO),YO={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},BO=e=>{switch(null==e?void 0:e.name){case Ln.type.name:return YO.ENTITY_TYPE_FACET;case Ln.createdBy.name:case Ln.updatedBy.name:case Ln.sourceSystems.name:case Ln.tags.name:case Ln.roles.name:case Ln.matchRules.name:case Ln.MLRecommendedMatch.name:return YO.WITH_DROPDOWN_CHECKBOXES_FACET;case Ln.createdTime.name:case Ln.updatedTime.name:case Ln.startDate.name:case Ln.endDate.name:return YO.DATE_RANGE_FACET;case Ln.matches.name:case Ln.matchScore.name:return YO.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return YO.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return YO.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return YO.DATE_RANGE_FACET;default:return YO.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},qO=(0,l.pipe)(jO,BO),HO=(0,l.pipe)((0,l.path)(["attrType","type"]),Dr),QO=(0,l.cond)([[VO,(0,l.always)(on.IN_RANGE)],[GO,(0,l.always)(on.WITHIN)],[(0,l.allPass)([HO,e=>e.values.length>=2]),(0,l.always)(on.EXISTS)],[l.T,(0,l.always)(on.EQUALS)]]),KO=(0,l.cond)([[GO,(0,l.prop)("values")],[VO,(0,l.prop)("values")],[HO,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 JO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const XO=(0,l.pipe)((0,l.path)(["attrType","type"]),Sr),zO=(0,l.pipe)((0,l.path)(["attrType","type"]),Ur),ZO=(0,l.pipe)((0,l.prop)("attrType"),Hs),ev=(0,l.pipe)((0,l.prop)("attrType"),qs),tv=e=>t=>t.values.map((t=>Xr(e,t).label)).join(" , "),rv=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),nv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(On().number),rv)),(0,l.join)(","))(e.values);return`${FO(e)}: ${t}`},iv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),rv)),(0,l.join)(","))(e.values);return`${FO(e)}: ${t}`},av=e=>t=>`${FO(t)}: ${DO(e,t).join(", ")}`,ov=e=>t=>{const r=kO(e,t);return`${FO(t)}: ${r.join(", ")}`},sv=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[ev,tv(e)],[zO,nv],[XO,iv],[ZO,av(e)],[l.T,ov(t)]]),r))),lv=(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){JO(e,t,r[t])}))}return e}({},t,{attrType:jO(e,t,n)}))),sv(e,r))(t),uv=new RegExp(`^${On().text("Search")}`),cv=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...lv(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(uv,"",u)]},pv=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(yn),dv=e=>(e=>pv.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]=Cu(t);return e.replace(r,i).replace(n,a)}),e))(e),yv=(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}`})),fv={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},Tv=e=>[fv.geoPolygon,fv.onMapMove].includes(e),Ev=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},mv=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},hv=(e,t)=>Tv(e)?t.map(Ev):[mv(t)],bv=e=>Tv(e)?On().text("Geo Polygon"):On().text("Geo Location"),Ov=e=>{switch(e){case fv.geoLocation:return"geoLocation";case fv.geoPolygon:case fv.onMapMove:return"geoPolygon"}},vv={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},gv=e=>On().text(e),_v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[on.EQUALS]:"=",[on.NOT_EQUALS]:"≠",[on.STARTS_WITH]:"*",[on.MISSING_VALUE]:On().text("missing value"),[on.HAS_ALL]:On().text("has all"),[on.IN_RANGE]:On().text("in range"),[on.FULL_TEXT]:On().text("full text"),[on.EXISTS]:On().text("exists"),[on.COUNT_EQUALS]:`${On().text("count")} =`,[on.COUNT_NOT_EQUALS]:`${On().text("count")} ≠`,[on.COUNT_LT]:`${On().text("count")} <`,[on.COUNT_LTE]:`${On().text("count")} <=`,[on.COUNT_GT]:`${On().text("count")} >`,[on.COUNT_RANGE]:On().text("count range"),[on.LT]:"<",[on.LTE]:"<=",[on.GT]:">",[on.GTE]:">=",[on.IN_FILE]:On().text("in file"),[on.NOT_IN_FILE]:On().text("not in file"),[on.CONTAINS]:"~",[sn.LIST_EQUALS]:"=",[sn.NOT_LIST_EQUALS]:"≠",[sn.LIST_EQUALS_CASE_SENSITIVE]:"=",[sn.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||On().text(e.toLowerCase())},Av=e=>({type:vv.operator,text:e}),Nv=e=>({type:vv.operator,text:gv(e)}),Rv=e=>({type:vv.attributeLabel,text:e}),Pv=e=>({type:vv.specialAttributeLabel,text:e}),Sv=e=>({type:vv.attributeFilter,text:_v(e)}),wv=e=>({type:vv.attributeValue,text:e}),Iv=e=>({type:vv.entityTypeLabel,text:e}),Uv=()=>({type:vv.space,text:" "}),Cv=()=>({type:vv.bracket,text:"("}),Lv=()=>({type:vv.bracket,text:")"}),Dv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),jv=(0,l.curry)(((e,t)=>t.map(Dv(e)))),kv=(0,l.curry)(((e,t,r)=>[e,...r,t])),Fv=kv(Cv(),Lv()),Mv=kv(Uv(),Uv()),xv=(0,l.curry)(((e,t)=>[e,...t])),$v=e=>xv(Iv(e)),Vv=e=>xv(Iv(`${e}: `)),Gv=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=pu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=uu(s),a=cu(s);!r&&t&&n&&(i.push(Cv()),r=!0),i.push(o),r&&a&&(i.push(Lv()),r=!1);const l=e?Nv(s):Av(s);i.push(...Mv([l]))}else i.push(o),r&&(i.push(Lv()),r=!1)}return i}},Wv=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),Yv=(0,l.pipe)(Gv({localizable:!1}),Wv),Bv=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},qv=e=>{let{data:t,values:r,filter:n}=e;return t&&Qu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},Hv=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(qv)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Qv=(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)&&Or(e.data.attrType)})(e)&&[on.HAS_ALL,on.EQUALS,on.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:br((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})))),Ub),Kv=(e,t)=>(0,l.pipe)(Qv,Cb(t))(e),Jv=(0,l.pathEq)(["data","fieldName"],Ln.type.name),Xv=(0,l.path)(["data","entityTypeUri"]),zv=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),Zv=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(cs(e)),attributes:(0,l.filter)((0,l.pipe)(Xv,(0,l.anyPass)([l.isNil,cs(e),r=>{const n=(t.entityTypes||[]).filter(cs(e));return(n.length>1?rn(e,n):null)===r&&!!Xr(e,r)}])))})(t))))),eg=e=>(0,l.pipe)((0,l.prop)("filter"),Jl,(0,l.equals)(e)),tg=(0,l.curry)(((e,t,r,n,i,a)=>{const o=Bs(n.fieldName)||n.attrType,s=Su(o,i),u=Lb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>Or(s),()=>(0,l.is)(Object,a)&&a.lookupCode?Nb(a.lookupCode,a.value):Pb(r,br(o),a)],[()=>Hs(s),()=>_o(e,n.entityTypeUri,a)],[()=>Qs(s),()=>Bo(e,a)],[()=>el(s),()=>Qo(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>Ur(c)||Dr(c)),Au),wv)()})),rg=(e,t,r,n)=>{const i=tg(e,t,r,n.data,n.filter);return(0,l.cond)([[eg(0),(0,l.always)([])],[(0,l.both)(eg(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[Uv(),i(r),{type:vv.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[Uv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),jv({type:vv.punctuationMark,text:", "}))(t)]}]])(n)},ng=(e,t)=>{const r=!!Bs(e.data.fieldName);return(0,l.pipe)(Bv,r?Pv:Rv)(e,t)},ig=(e,t,r,n,i)=>[ng(n,i),Uv(),Sv(n.filter),...rg(e,t,r,n)],ag=(0,l.addIndex)(l.map),og=(0,l.propEq)("length",1),sg=(0,l.propSatisfies)((0,l.lt)(1),"length"),lg=(0,l.complement)(l.isEmpty),ug=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(fu,(0,l.filter)(qv),Tu,(0,l.map)((n=>({operand:ig(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Gv()))(n)},cg=(0,l.pipe)(ug,l.flatten),pg=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>Od(e,{type:t}))).join(", ");return r?t(r):l.identity},u=ug(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s($v),(0,l.pipe)(s(Vv),(0,l.unless)((()=>og(u)||i),Fv)))(u)},dg=(e,t,r,n)=>(0,l.pipe)(fu,(0,l.filter)(Hv),Tu,ag(((n,i,a)=>({operand:pg(e,t,r,n,og(a)),operator:n.operator}))),Gv(),l.flatten)(n),yg=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Gv(),l.flatten),fg=e=>{let{searchType:t,values:[r]}=e;return hv(t,r).join(", ")},Tg=(e,t,r,n,i,a)=>{const o=(e=>e?[Pv(e.isRawFilter?On().text("Raw filter"):On().text("Search")),...Mv([Sv(on.EQUALS)]),wv(`"${e.value}"`)]:[])(i),s=(e=>e?[Pv(bv(e.searchType)),Uv(),wv(fg(e))]:[])(a),u=(0,l.pipe)(dg,(0,l.when)((e=>sg(e)&&(lg(o)||lg(s))),Fv))(e,t,r,n);return yg([o,s,u])},Eg=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),mg=(0,l.pipe)(Tg,Eg),hg=(0,l.has)("attributes"),bg=Array.isArray,Og=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),vg=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=gg(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)(Og(a))),Fv),(0,l.concat)(Mv([Av(o)]))))(s)},gg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return hg(n)?vg(e,t,r,n,i):bg(n)?n.reduce(((n,a)=>n.concat(gg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Mv([Av(n.operator)])))(ig(e,t,r,n,i))},_g=(e,t,r,n,i)=>(0,l.pipe)(gg,l.flatten)(e,t,r,n,i);function Ag(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){Ng(e,t,r[t])}))}return e}function Ng(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rg=(0,l.complement)(Jv),Pg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Jv),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(Xv),(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}},Sg=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=Pg(t);return(r||n)&&du(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)(Sg)),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(Jv).some((0,l.propEq)("filter",on.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}=Pg(r);if(Sg(e))t.push(Ag({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(Rg)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Jv,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(Xv,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(Rg),entityTypes:n,operator:i?a:e.operator,id:ib()()}}));t.push(...n)}var a;return t})(t))),[]))),Ig={[on.EQUALS]:on.ON,[on.IN_RANGE]:on.WITHIN,[on.GTE]:on.AFTER,[on.GT]:on.AFTER,[on.LTE]:on.BEFORE,[on.LT]:on.BEFORE},Ug=(0,l.curry)((e=>Ig[e]||e)),Cg=(0,l.curry)(((e,t)=>{switch(e){case on.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case on.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),Lg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),Sr),Dg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>Ag({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return Lg(e)?(0,l.evolve)({filter:Ug,values:Cg(t)},e):e}))})))})),jg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),wg,Zv(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")))})),Dg,(0,l.reject)(zv))(r)));function kg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fg(e,t,r[t])}))}return e}function Fg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mg=(e,t)=>({data:{uri:Zt(e.fieldName)?Kt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||QO(e),id:ib()(),values:KO(e)}),xg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=Bs(a,t,r)||Ar(e,i);if(!s)return null;if(cr(s))return kg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=Od(e,{type:o}),i=(_r(e,Kt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return kg({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),$g=(0,l.curry)(((e,t,r,n)=>jg(xg,e,n,t,r)));function Vg(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){Gg(e,t,r[t])}))}return e}function Gg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Wg=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},Yg=e=>"rdmLookups.not.resolved"===e?Ln.notResolved.name:e,Bg=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===pn?on.IN_RANGE:dn(a),u=Yg(n),c=Bs(u)||Ar(e,i),p=(0,l.cond)([[()=>eu(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>Vg({},e,{filename:gb(e)}))))],[()=>Dr(null==c?void 0:c.type),(0,l.map)(le)],[e=>zl(s)&&!Array.isArray(e[0])&&!Sr(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:ib()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===pn?"and not":"and",filter:s,values:p}})),qg=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(Bg(e,rn(e,i)));return[{id:ib()(),operator:"or",attributes:a,entityTypes:i}]})),Hg=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Qg=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([Hg("from"),Hg("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,()=>[]]]),Kg=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return Vg({},r,{values:Qg(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?$s(e.fieldName,n):e.fieldName})},Jg=(e,t)=>{if((0,l.has)("children")(e)){const r=Kg(e,t);return e.children.reduce(((e,n)=>(e.push(Jg(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return Kg(e,t)},Xg=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(Kg(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(Vg({fieldName:e.fieldName},Kg(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(Jg,l.flatten)],[l.T,Kg]]),zg=(0,l.pipe)((0,l.map)(Xg),l.flatten),Zg=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},e_=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=qg(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:zg(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>Vg({},t,{type:qO(e,t)}))).map((e=>Vg({},e,{values:WO(e)?Zg(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 Mg(r,t)})),operator:"or",id:ib()(),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=>({[Yg(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[Vg({},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 $g(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)(xO),(0,l.partition)($O))(t),i=n.map((t=>kg({},t,{type:qO(e,t)}))).map((e=>Mg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:ib()(),entityTypes:a}]})(e,a);return $g(e,t,r,o)})(e,t,r,n):e_(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},r_=e=>"2.0"===e.version?e.keyword:Wg(e),n_=e=>(0,l.pathEq)(["object","uri"],e),i_=(e,t)=>(0,l.pipe)((0,l.find)(n_(e)),(0,l.prop)("object"))(t),a_=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"),n_(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=i_(r.match,t)||n[r.match];return i?{label:Zp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return go(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}),{}),s_=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),l_=(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:Zp((0,l.prop)("label",a)),matchRules:i.map((function(t){return go(e,a.type,t)||{label:t,uri:t}}))}})))(t),u_=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)},c_=(0,l.path)(["object","uri"]),p_=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},d_=e=>e.getValue(),y_=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=y_(n[e],t),!r);e++);return r},f_=(e,t)=>{const r=[],n=(0,l.pipe)(d_,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(f_,[t]),a);return r.push.apply(r,o),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){E_(e,t,r[t])}))}return e}function E_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const m_=(e,t)=>!!e[t],h_=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},b_=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||[]])},O_=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return T_({},t,{[r.uri]:T_({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:b_(null==o?void 0:o.parents,n),children:b_(null==o?void 0:o.children,i),values:b_(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},v_=e=>e.children?e.children.flatMap(v_):e,g_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Xr(r,t)||Si(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return ts(r,n,i).flatMap(v_).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>Ar(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=O_({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>O_({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},__=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)(ps),(0,l.map)(h_))(i);return O_({structure:e,attrType:e[t].attrType,values:a})}),t)},A_=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 m_(e,r)}));return r||n?t.filter(ps).reduce(((e,t)=>A_({structure:e,attributeValue:t})),e):e}),t);{const e=r;return m_(t,e.type)?O_({structure:t,attrType:t[e.type].attrType,values:[h_(e)]}):t}},N_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?T_({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},R_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Rs(i,n,r)||[];return a.length?O_({structure:t,attrType:t[r].attrType,values:a.filter(ps).map(h_)}):t},P_=(e,t,r)=>{const n=$t(e),i=$t(t);return n===i?((e,t)=>{const r=tr(t),n=tr(e);return Bt(n,r)})(e,t):!(!r||!er(t))&&lE(r,i).includes(n)},S_=(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?oE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return P_(r,t,o)}))},I_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>I_(e,t,r)))))},U_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&S_(n,e)}},C_=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=sE(u,o,i,a),p=I_("children",t,l),d=I_("parents",t,l),y=p.flatMap((e=>I_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return P_(t,n,c)})).map((t=>U_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return P_(n,t,c)||$t(t)!==u&&P_(t,n,c)})).map((t=>U_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=I_("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)&&P_(n,t,c)}))})).map((t=>U_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return P_(t,n,c)})).map((e=>U_(r,n,e,s))),...T,...E,...f]},L_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Lb({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=>Xp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[fr,()=>a(n)],[Or,()=>(e=>{const r=o(e),n=br(t);return $l([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Pb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},D_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:on.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(j_(r,t)):i.push(k_([t],r)),i},j_=(e,t)=>{const r=pr(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=fr(i)?j_(i,t[r]):[k_(t[r],i)];return e.push(...a),e}}),[])},k_=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:hr(t.uri),filter:t.type===bt.TYPE_BLOB?on.FULL_TEXT:on.EQUALS,values:e}:{fieldName:hr(t.uri),filter:on.MISSING_VALUE},F_={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},M_={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=2398.js.map