@reltio/remotes 1.4.1397 → 1.4.1398
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/6210.js +1 -1
- package/6210.js.map +1 -1
- package/8847.js +1 -1
- package/8847.js.map +1 -1
- package/package.json +1 -1
package/6210.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6210],{52992:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>ks,IL3:()=>$p,PY2:()=>on,Ng6:()=>Ae,YJ7:()=>zr,NlI:()=>Vr,XYV:()=>Kr,Xt7:()=>Oe,wfT:()=>Wn,EMD:()=>Un,HAc:()=>ve,PEf:()=>pn,oA3:()=>In,$XE:()=>Ve,eWf:()=>un,q7e:()=>ge,KVe:()=>Yn,WVQ:()=>Or,oZZ:()=>Zn,bNA:()=>ei,Rjq:()=>ti,G39:()=>yn,W0P:()=>Je,X1H:()=>He,yn8:()=>Me,N0y:()=>ke,dZX:()=>Ge,bQt:()=>ni,oS0:()=>Ze,bZE:()=>Hr,Nsj:()=>en,psV:()=>Xr,xPW:()=>sn,pyR:()=>Mn,p8l:()=>Ln,Wkf:()=>be,zHr:()=>he,NIO:()=>me,$26:()=>Hv,Esk:()=>An,s9T:()=>je,MEy:()=>Ou,j5E:()=>$r,vAw:()=>wn,NMQ:()=>Sn,eVu:()=>Fu,YGb:()=>Ke,mNm:()=>Dn,s_5:()=>Fn,RgZ:()=>jn,unl:()=>zn,Qy0:()=>ri,pYu:()=>Nn,wIJ:()=>mg,GFH:()=>Re,Ury:()=>fn,S91:()=>Tn,p3$:()=>si,wSh:()=>Z,BDP:()=>mi,pGS:()=>kn,ARY:()=>et,XGc:()=>Gn,fO_:()=>Rr,wwy:()=>Ue,h_8:()=>mn,_XL:()=>Zr,j2V:()=>Bn,dMV:()=>$n,NBX:()=>EN,OXy:()=>tt,BXd:()=>Fe,KM9:()=>Ne,CJB:()=>Qn,lXI:()=>Be,nqG:()=>ai,C68:()=>dn,yxQ:()=>ii,Yj_:()=>Ce,D25:()=>we,ZIY:()=>We,Tl4:()=>Ng,lwr:()=>cn,NkU:()=>qn,Rtp:()=>Vn,YGx:()=>xe,uTS:()=>xn,MCv:()=>_e,IYE:()=>Cn,PiC:()=>Xn,MVv:()=>Xe,h_m:()=>qe,DUe:()=>Qr,tJI:()=>Pe,fDt:()=>Se,cNQ:()=>Hn,SwE:()=>Pn,ZHR:()=>Jn,PYu:()=>Qe,lD1:()=>En,lVm:()=>$e,vnX:()=>mv,$x5:()=>hv,_R1:()=>Tv,wUm:()=>Ev,z7V:()=>oi,dC6:()=>De,MBD:()=>Ie,GmF:()=>Ki,cKm:()=>Ye,iP_:()=>ln,NVC:()=>Le,tPT:()=>ul,tZe:()=>nd,kRE:()=>pf,psB:()=>df,X0$:()=>ll,zE1:()=>bl,Wm5:()=>zs,vyX:()=>Oc,wLZ:()=>cl,W4V:()=>se,EtK:()=>bs,Wtd:()=>sl,asT:()=>SN,kGs:()=>KE,ewt:()=>KT,O_f:()=>yu,sOy:()=>At,Tde:()=>Zt,LMI:()=>nc,skb:()=>y_,sPt:()=>Qu,sH1:()=>Ku,RPM:()=>Em,h27:()=>yc,Uqd:()=>bc,xG:()=>P_,Z2f:()=>CO,fgW:()=>Hg,I69:()=>h_,ZxB:()=>O_,mdt:()=>pm,Qbq:()=>DE,rny:()=>Ci,UEY:()=>Ea,Q0T:()=>Ta,Lyr:()=>_a,sBn:()=>fa,itK:()=>ca,H9$:()=>ya,KPc:()=>da,zos:()=>pa,ELQ:()=>Na,dZs:()=>ea,Cz4:()=>Zi,z_L:()=>va,fGe:()=>zi,iuF:()=>la,Wib:()=>ua,Hn0:()=>ga,obS:()=>Aa,E$L:()=>ta,XUh:()=>sa,Qp_:()=>aa,_jk:()=>ra,sKE:()=>na,WmG:()=>oa,QKx:()=>ba,Oik:()=>ha,s0A:()=>ia,o9m:()=>ma,MCd:()=>Oa,RsS:()=>fc,tGK:()=>Gl,lIv:()=>Ol,Vg3:()=>xi,mkC:()=>Pi,xv5:()=>Vi,a14:()=>Si,yv0:()=>$i,Zm0:()=>Ri,Nxd:()=>Ai,$mM:()=>Fi,ifj:()=>gr,NWi:()=>XO,xr3:()=>JO,wNf:()=>zl,iJH:()=>zO,d89:()=>gi,Edd:()=>_i,Z5t:()=>Ni,uGe:()=>bi,UoR:()=>hi,xvW:()=>KO,$qe:()=>QO,yPM:()=>Xi,$cp:()=>hl,vKJ:()=>El,VtG:()=>Jc,AID:()=>uT,B1H:()=>fN,b7X:()=>CE,$uE:()=>zE,keo:()=>jE,C_p:()=>Zm,G27:()=>ib,JA0:()=>Zy,b3T:()=>QE,oC6:()=>qE,_Zs:()=>HE,epC:()=>em,YYG:()=>ZE,f_2:()=>tf,w3l:()=>J_,QHB:()=>nb,Jso:()=>nN,RXH:()=>Gh,Vr9:()=>yb,lMm:()=>cO,BlA:()=>FN,fmQ:()=>ps,yRD:()=>M_,NcL:()=>ah,QK6:()=>de,ymd:()=>xp,JV_:()=>Rf,XiW:()=>ST,Yrx:()=>$y,GPx:()=>ol,gjI:()=>al,vlo:()=>yE,E_P:()=>am,aAL:()=>Pp,NBq:()=>ds,wp9:()=>cm,DsR:()=>Op,MPc:()=>fT,gWE:()=>TT,DT_:()=>ET,ipn:()=>hT,ORg:()=>fi,_wz:()=>mT,RYR:()=>YT,PP2:()=>By,wS7:()=>xO,cBQ:()=>ip,pBq:()=>Hf,DsO:()=>ee,X78:()=>wf,xZs:()=>_f,YFy:()=>Gy,Gmt:()=>Ef,K$w:()=>Tf,DSj:()=>Rp,Mfr:()=>Wy,k9j:()=>op,ww$:()=>pl,WVU:()=>ff,hxF:()=>el,E7G:()=>Bd,nwO:()=>VN,Mzk:()=>Zc,aFF:()=>VE,HRH:()=>_u,EZK:()=>Td,Kxm:()=>pd,Z9i:()=>jm,CrF:()=>sf,DNd:()=>Ra,vUy:()=>LN,lJh:()=>Pu,zHo:()=>Ru,sEJ:()=>hN,UO$:()=>Zf,zeJ:()=>ar,dLR:()=>_s,JQy:()=>Ls,XtP:()=>vs,Ug0:()=>Mr,A1W:()=>LE,sw:()=>fd,nv3:()=>ov,JgD:()=>av,nve:()=>bN,SkP:()=>js,SAs:()=>Kf,i5L:()=>Ds,PWK:()=>Po,IM5:()=>gs,Aup:()=>db,Mfk:()=>TO,HQx:()=>$o,oN$:()=>xo,mB6:()=>DO,p6d:()=>w,o0x:()=>U,ufS:()=>gO,k7L:()=>_O,mrB:()=>I,ncP:()=>bt,Zmi:()=>ft,hm5:()=>Et,ECL:()=>Ar,vPL:()=>hd,qmL:()=>UE,hPi:()=>Bf,hXd:()=>ji,OCS:()=>Di,p2l:()=>Fs,qF1:()=>Vp,_X$:()=>Gp,yj2:()=>yg,bzh:()=>fm,k66:()=>ko,kiP:()=>Xa,pSg:()=>ce,kz_:()=>Ky,H_U:()=>Fo,t9e:()=>ja,j2$:()=>id,PFL:()=>Gt,aJ3:()=>Fv,To9:()=>er,wpo:()=>Fd,ADq:()=>wm,UUb:()=>Rm,tQX:()=>Sm,xy8:()=>qt,EUG:()=>or,AFK:()=>Ut,X3M:()=>ir,WN0:()=>Mo,kDl:()=>Ns,uDV:()=>IE,IhQ:()=>ws,pfb:()=>Us,R$r:()=>im,w80:()=>fo,Pfu:()=>Ca,Gtj:()=>Ll,fyF:()=>Cl,kkq:()=>Do,u5q:()=>Ot,O$n:()=>kd,ptG:()=>Md,f4_:()=>yh,uap:()=>dh,d7q:()=>xy,liG:()=>qy,$oF:()=>Fy,avf:()=>nE,DiQ:()=>rE,cfX:()=>tE,vD3:()=>aE,Qrb:()=>eE,EJQ:()=>iE,HWy:()=>ZT,gjS:()=>HT,y6v:()=>zT,JUW:()=>rf,GtP:()=>Ah,_kX:()=>wa,u1e:()=>Ia,sJj:()=>FE,CJp:()=>_h,uKF:()=>ME,wo0:()=>cf,s5:()=>wo,cwx:()=>So,Y6b:()=>Sy,TTx:()=>Of,UtR:()=>wy,HaQ:()=>vf,E6I:()=>of,Won:()=>Uy,vTU:()=>Py,Nsy:()=>Pd,KMQ:()=>$E,Do$:()=>Id,CSV:()=>Vs,TMe:()=>Iy,l1V:()=>wu,RHh:()=>Mu,VQ1:()=>Du,cGG:()=>ju,z7d:()=>fE,Xaq:()=>Wo,Sj8:()=>kN,PJj:()=>xl,k3T:()=>xr,PjQ:()=>Ei,s7l:()=>Yc,jLA:()=>Ph,GGR:()=>uE,j5q:()=>sE,DnY:()=>Vc,RY5:()=>NE,Px$:()=>BT,KPC:()=>pN,NIY:()=>Xc,HvW:()=>qc,Fof:()=>Da,BXy:()=>Hc,fX:()=>Rh,BTI:()=>Cd,uie:()=>vd,ChB:()=>Ed,q27:()=>$d,vrC:()=>Pb,fAQ:()=>Lf,XkT:()=>$c,lrH:()=>jf,nt9:()=>Cr,XH8:()=>Dd,XH2:()=>Fr,jFi:()=>jd,qhs:()=>yo,wwR:()=>Ud,Uk3:()=>Ct,ev7:()=>TN,RB9:()=>zy,iFp:()=>hm,e$p:()=>Om,PcX:()=>vm,SpP:()=>bm,R6_:()=>$v,CY1:()=>Qv,Ajk:()=>Dc,Yiz:()=>jc,FK9:()=>Sc,UOo:()=>NO,aTW:()=>hf,uug:()=>Xl,P$2:()=>Xv,XS2:()=>Wl,Hyb:()=>uu,d3Y:()=>Nc,Klp:()=>Pc,WxZ:()=>zv,Gzu:()=>Su,ZOr:()=>xc,uqV:()=>_y,Pm4:()=>re,hWO:()=>St,nHA:()=>Th,nVD:()=>PE,_tF:()=>Vu,dED:()=>ky,P2h:()=>Dy,jrr:()=>Ha,mmY:()=>Ka,T6O:()=>Vo,h6J:()=>ed,hM2:()=>oN,XR6:()=>X,jmz:()=>wE,IHt:()=>SE,NZI:()=>Lm,wdF:()=>Uf,kgP:()=>Cf,ZYI:()=>Dp,QXK:()=>Sl,efz:()=>wl,Q5d:()=>Rl,Ysv:()=>Il,UWq:()=>mE,ocC:()=>EE,io3:()=>Dr,Sbt:()=>Eo,roS:()=>To,Ww1:()=>mo,QaS:()=>ep,ERZ:()=>Q_,CL1:()=>sN,idV:()=>yd,nIW:()=>Rt,fjE:()=>Vv,sG0:()=>RO,tV7:()=>$l,g8o:()=>gg,Qy:()=>vg,t2P:()=>Mv,KbW:()=>ro,wId:()=>io,LS0:()=>ao,bFH:()=>cy,Rgl:()=>dy,fW1:()=>oh,GFW:()=>gf,Ywp:()=>pv,pg:()=>Hd,WSA:()=>yy,fed:()=>iN,tT_:()=>Is,BgZ:()=>Cs,KbL:()=>Wc,JBA:()=>kt,aNC:()=>iv,RFJ:()=>jp,Zeh:()=>zf,OT5:()=>cv,mC3:()=>gl,kR6:()=>MN,NVY:()=>lm,k6v:()=>Wp,FEC:()=>Yp,L5S:()=>om,Ob5:()=>Vd,KUV:()=>Gd,dvH:()=>sm,V3i:()=>Eb,VD3:()=>kr,mm2:()=>Lu,rou:()=>Vf,izH:()=>Ua,DK$:()=>La,KMp:()=>Ap,c31:()=>it,mbo:()=>Um,gT8:()=>st,CZ8:()=>us,uGi:()=>Ts,Poc:()=>rt,_9k:()=>hs,ZTM:()=>ys,bwT:()=>Es,tzW:()=>ut,tF$:()=>ot,o96:()=>cs,M4S:()=>ms,_vs:()=>hp,xF8:()=>QT,PUO:()=>GE,ATu:()=>Im,j1S:()=>di,V3K:()=>ci,Lmx:()=>pi,ZaZ:()=>nt,n_1:()=>Ay,N6e:()=>gp,SxO:()=>Qa,w3p:()=>um,xU7:()=>pe,Y_p:()=>Oo,$k6:()=>bo,Gdl:()=>wO,U6P:()=>SO,OwB:()=>xv,hTh:()=>RE,xqc:()=>Io,JvE:()=>Uo,i29:()=>lc,dzT:()=>Ii,uPS:()=>np,cZV:()=>rp,n3B:()=>e_,e6O:()=>Qg,s7j:()=>Eg,j$Q:()=>nf,kW2:()=>Nh,tH7:()=>Ro,Yxg:()=>qs,MaZ:()=>lE,nqN:()=>oE,jWj:()=>bE,o_J:()=>Yo,hgZ:()=>md,yW4:()=>td,uT0:()=>zp,C82:()=>Zp,bsH:()=>fh,u9Z:()=>$f,J$m:()=>Ny,j_Q:()=>Ic,OaI:()=>Uc,wB1:()=>yN,SP6:()=>qd,ZYr:()=>cN,IMU:()=>Lp,FoU:()=>ef,DVz:()=>jO,mxe:()=>zg,FHr:()=>Jf,D1g:()=>Gf,VO3:()=>gv,de5:()=>vv,Uw1:()=>Te,J6q:()=>Cm,XCe:()=>Ya,fbl:()=>dv,Ir:()=>eo,XQO:()=>to,QXb:()=>ny,P8_:()=>Af,iiD:()=>Np,MOC:()=>iy,WF:()=>ry,xE1:()=>Ti,idW:()=>PN,QWZ:()=>bO,YL3:()=>zc,Fn9:()=>T,j2U:()=>Ms,MpE:()=>ct,kQw:()=>Yt,mfm:()=>cu,vZp:()=>Lt,E8K:()=>gN,VSb:()=>ss,vr_:()=>Wt,Vmh:()=>CN,FgW:()=>Tb,oDv:()=>qo,fGG:()=>OO,kuw:()=>Qo,eHk:()=>hE,Tt2:()=>Bo,pQZ:()=>Ko,oZ7:()=>vO,T6Y:()=>Tr,_26:()=>ou,YkM:()=>zt,J6y:()=>ql,njU:()=>eu,TBP:()=>Ho,IT0:()=>Dm,x_:()=>xE,biM:()=>Sd,TMl:()=>wd,Vkd:()=>nu,WiY:()=>Bv,_zi:()=>iu,J6D:()=>Cu,Lt4:()=>ur,QEi:()=>rr,whI:()=>wr,KIu:()=>Ur,JhM:()=>oe,C_0:()=>hr,lzc:()=>Yd,qIF:()=>t_,O27:()=>E,aBi:()=>xd,xOX:()=>Xs,EdS:()=>_t,WgC:()=>gt,eEv:()=>$t,A4t:()=>tu,YOQ:()=>Dt,Wos:()=>yr,jWr:()=>Pa,Or$:()=>Xt,lhE:()=>jr,CwH:()=>tr,pzC:()=>Qs,ymH:()=>Zl,QZu:()=>Kt,rYH:()=>Yv,FVt:()=>dr,Kn2:()=>ue,jgw:()=>pu,Qgr:()=>Uu,OXP:()=>os,lS4:()=>nr,g5f:()=>qv,fp6:()=>Kl,Uty:()=>Yi,YkG:()=>Jt,xdS:()=>lt,kMF:()=>bT,$NE:()=>Nt,bC9:()=>vt,Ian:()=>yi,KVV:()=>kE,q9e:()=>ho,iIf:()=>IO,ian:()=>tl,m6e:()=>br,OFd:()=>Ks,kqr:()=>Bt,fnZ:()=>Sr,VFZ:()=>rl,ZiX:()=>mt,j5n:()=>cr,zkt:()=>_,Pcm:()=>dN,QDV:()=>Hs,M5u:()=>Wv,laD:()=>Zg,mtq:()=>xt,CtB:()=>UO,CBv:()=>ae,I0t:()=>mr,u1G:()=>dE,gk1:()=>Jg,Bgb:()=>Kg,uzs:()=>Ir,v0l:()=>Bu,Zqp:()=>Cy,j0k:()=>Ao,tCm:()=>It,gmx:()=>Yl,mOr:()=>vu,TwZ:()=>_g,GyU:()=>sv,zGm:()=>Jd,bMg:()=>my,EyD:()=>qO,FQA:()=>HO,fZN:()=>Oy,xsF:()=>YO,Lxg:()=>BO,O3l:()=>lp,Wni:()=>sp,wRx:()=>ev,OxG:()=>sy,uJQ:()=>oy,qWg:()=>LO,i96:()=>Qd,zhn:()=>ZO,G8q:()=>li,Jct:()=>xT,A9Y:()=>te,Y5F:()=>$_,gxP:()=>le,c$P:()=>Bl,M7o:()=>hc,BBN:()=>qa,ZBU:()=>J,UkJ:()=>oo,xkv:()=>Nf,z$M:()=>RN,KAm:()=>Xy,lCl:()=>cT,rkF:()=>eh,IU6:()=>ud,RGr:()=>h,aYu:()=>m,ije:()=>Ml,Buf:()=>_p,YLu:()=>kl,ct9:()=>go,XkY:()=>hy,T5R:()=>Xd,uQS:()=>vy,wcJ:()=>vo,d$I:()=>dl,rSp:()=>Rd,Sx:()=>Kc,Ilm:()=>vl,Ki6:()=>Zs,VGk:()=>bp,sFD:()=>Wh,eWN:()=>wN,dWE:()=>Tg,Lkd:()=>wT,aDL:()=>eT,yaA:()=>gy,lOh:()=>Yf,DBr:()=>jv,hK$:()=>Vl,TZ_:()=>ld,CMB:()=>r_,FU8:()=>Qc,J$p:()=>iT,b5s:()=>nT,h2W:()=>wt,SL_:()=>Mf,oUH:()=>Kp,ck9:()=>zd,RAb:()=>$u,nL:()=>PO,k$p:()=>Bh,Xs0:()=>Dl,u7I:()=>Wf,rxg:()=>Tu,bji:()=>Eu,oCZ:()=>Km,MjG:()=>Ov,FuV:()=>Qp,$ju:()=>Xp,t6d:()=>Jp,m5F:()=>fe,sx:()=>IN,rSc:()=>kO,U10:()=>Cc,L8n:()=>yf,R9X:()=>Ry,rj2:()=>Sf,_C4:()=>ad,tCj:()=>Pf,uAg:()=>Vy,wx9:()=>JT,KF3:()=>od,ax9:()=>sd,HH7:()=>vp,ufV:()=>Yy,_6y:()=>ap,XTh:()=>fv,AJo:()=>tp,Ixr:()=>af,P6Y:()=>GN,Bd_:()=>Bm,xkB:()=>Ym,W41:()=>xf,WkI:()=>Ff,sSE:()=>Wm,GMd:()=>ic,jtL:()=>ac,Bxm:()=>Hm,FVh:()=>Fm,U_T:()=>fy,FTe:()=>ie,VGB:()=>ne,Wfe:()=>Au,Ls5:()=>Nu,$bd:()=>hu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>N,toUtcDate:()=>A});var a={};r.r(a),r.d(a,{addAttribute:()=>zo,editAttribute:()=>Zo,editEndDate:()=>as,editRoles:()=>rs,editStartDate:()=>is,editTags:()=>ns,removeAttribute:()=>ts});var o={};r.r(o),r.d(o,{applyCrosswalks:()=>KE,collectCrosswalksFromAttributes:()=>zE,compareActivenessAttributes:()=>QE,compareAttributes:()=>qE,compareImages:()=>HE,compareRoles:()=>em,compareTags:()=>ZE});var s={};r.r(s),r.d(s,{createHistoryManager:()=>nm});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"),N=e=>{const t=new Date(e),r=new Date;return r.setFullYear(t.getUTCFullYear()),r.setDate(t.getUTCDate()),r.setMonth(t.getUTCMonth()),r.setHours(t.getUTCHours()),r.setMinutes(t.getUTCMinutes()),r.setSeconds(t.getUTCSeconds()),r.setMilliseconds(t.getUTCMilliseconds()),r},A=e=>{const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return new Date(r)},P=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),R=P("startOf"),S=P("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),j=(0,l.equals)("9999"),D=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),M=(0,l.test)(/^9+$/),F=(0,l.test)(/^[9az]+$/),x=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[D,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[F,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[F,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[j,(0,l.always)("YYYY")],[M,(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=>oe(e=e||"")?`mailto:${e}`:!e.includes("://")&&(e.toLowerCase().startsWith("www.")||e.split(".").length>2)?`http://${e}`:e,le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;var Ee=r(76665);let me,he,be,Oe,ve,ge,_e,Ne,Ae,Pe,Re,Se,we,Ie,Ue,Ce,Le,je,De,ke,Me,Fe,xe,$e,Ve,Ge,We,Ye,Be,qe,He,Qe,Ke,Je,Xe;var ze;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(me||(me={})),function(e){e.local="local",e.validationService="validationService"}(he||(he={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(be||(be={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(Oe||(Oe={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(ve||(ve={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(ge||(ge={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(_e||(_e={})),function(e){e.asc="asc",e.desc="desc"}(Ne||(Ne={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Ae||(Ae={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(Pe||(Pe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Re||(Re={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Se||(Se={})),function(e){e.PROFILE="profile",e.MAP="map"}(we||(we={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(Ie||(Ie={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ue||(Ue={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Ce||(Ce={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(Le||(Le={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(je||(je={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(De||(De={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(ke||(ke={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(Me||(Me={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(Fe||(Fe={})),function(e){e.IN="in",e.OUT="out"}(xe||(xe={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}($e||($e={})),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"}(Ve||(Ve={})),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"}(Ge||(Ge={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttribute="com.reltio.plugins.entity.attributes.SingleAttributeView",e.AttributeTable="com.reltio.plugins.entity.attributes.AttributeTableView",e.Custom="com.reltio.plugins.ui.CustomActionView",e.Map="com.reltio.plugins.react.EntityMapView",e.ImageAttribute="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatches="com.reltio.plugins.entity.PotentialMatchesView"}(We||(We={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(Ye||(Ye={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.NestedProfile="NestedProfileView",e.Search="SearchView",e.Tags="Tags",e.Pivoting="Pivoting"}(Be||(Be={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(qe||(qe={})),function(e){e.NEW="new",e.CLASSIC="classic"}(He||(He={})),function(e){e.ASC_BY_NAME="ascByName"}(Qe||(Qe={})),function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network",e.TREE="Tree"}(Ke||(Ke={})),function(e){e.SET_HTML="setHtml",e.SHOW_POPUP="showPopup",e.HIDE_POPUP="hidePopup",e.LOG="log",e.SET_VISIBILITY="setVisibility",e.MESSAGE="message",e.SET_ENABLED="setEnabled",e.SET_TOOLTIP="setToolTip",e.SET_LABEL="setLabel",e.SET_HEIGHT="setHeight",e.SET_WIDTH="setWidth",e.RETURN_PROCESSED_API_RESPONSE="returnProcessedApiResponse",e.RETURN_PROCESSED_API_REQUEST="returnProcessedApiRequest",e.REQUEST="request",e.EVENT="event"}(Je||(Je={})),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"}(Xe||(Xe={})),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"}(ze||(ze={}));const Ze=ze;let et,tt;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(et||(et={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(tt||(tt={}));const rt=(0,l.prop)("referencedEntityTypeURI"),nt=(0,l.prop)("relationshipTypeURI"),it=(0,l.prop)("referencedAttributeURIs"),at=(0,l.curry)(((e,t)=>(0,l.pipe)(it,(0,l.filter)((0,l.startsWith)(e)))(t))),ot=at("configuration/relationTypes"),st=at("configuration/entityTypes"),lt=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),ut=(0,l.filter)(lt),ct=(e,t)=>!t||t.some((t=>t===e.uri)),pt="1Tempo4rary",dt="1Tepmo4Rel",yt=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),ft=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Tt=e=>()=>ft(e),Et=(e,t)=>{const r=yt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return ft(n)},mt=e=>e&&e.includes("uri$$"),ht=Tt("entities"),bt=Tt("relations"),Ot=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),vt=(0,l.startsWith)("relations/"),gt=(0,l.startsWith)("entities/"),_t=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Nt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),At=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),Pt=(0,l.pipe)((0,l.split)("/"),l.head),Rt=(0,l.pipe)((0,l.split)("/"),l.last),St=e=>e.split(".").slice(0,2).join("."),wt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},It=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Ut=(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("/")},Ct=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},Lt=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),jt=e=>2===e.split("/").length,Dt=e=>5===e.split("/").length,kt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},Mt=e=>e.replace(/uri\$\$/g,pt);function Ft(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xt=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,_t),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",Ze.TYPE_STRING)]),$t=(0,l.has)("values"),Vt=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(Ze.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(Ze.TYPE_LOOKUP)],[$t,(0,l.always)(Ze.TYPE_ENUM)],[xt,(0,l.always)(Ze.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",Ze.TYPE_BOOLEAN),(0,l.always)(Ze.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Gt=(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){Ft(e,t,r[t])}))}return e}({},e,{type:Vt(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),Wt=e=>!!e&&(!!e.autoGenerated&&e.type!==Ze.TYPE_NESTED||!!e.parentAutoGenerated),Yt=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),Bt=(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),qt=e=>Yt(e)?"analyticsAttributes":"attributes",Ht=(0,l.propEq)("hidden",!0),Qt=(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))),Kt=Qt(Ze.TYPE_NESTED),Jt=Qt(Ze.TYPE_REFERENCE),Xt=Qt(Ze.TYPE_IMAGE),zt=(0,l.either)(Kt,Jt),Zt=(e,t)=>{const r=Yt(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(".")},er=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),tr=(0,l.pipe)(er,Boolean),rr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),nr=(0,l.both)(tr,(0,l.pipe)(er,("rdm",(0,l.pipe)(Pt,(0,l.equals)("rdm")))));const ir=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=qt({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]||or(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=ir(e,t,r);return n.length?(0,l.last)(n):null},or=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",Ze.TYPE_NESTED),(0,l.propEq)("type",Ze.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",Ze.TYPE_REFERENCE),(0,l.pipe)(it,(0,l.map)((t=>ar(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},sr=[Ze.TYPE_ACTIVENESS_DATE,Ze.TYPE_DATE,Ze.TYPE_TIMESTAMP,Ze.TYPE_LOCAL_DATE],lr=[Ze.TYPE_ACTIVENESS_DATE,Ze.TYPE_TIMESTAMP,Ze.TYPE_LOCAL_DATE],ur=e=>sr.includes(e),cr=e=>lr.includes(e),pr=[Ze.TYPE_INT,Ze.TYPE_LONG,Ze.TYPE_NUMBER,Ze.TYPE_FLOAT,Ze.TYPE_DOUBLE,Ze.TYPE_COUNT],dr=e=>pr.includes(e),yr=e=>[Ze.TYPE_FLOAT,Ze.TYPE_DOUBLE].includes(e),fr=[Ze.TYPE_BOOLEAN,Ze.TYPE_BOOLEAN_RADIO,Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Tr=e=>fr.includes(e),Er=[Ze.TYPE_URL,Ze.TYPE_BLOG_URL,Ze.TYPE_IMAGE_URL],mr=e=>Er.includes(e),hr=Qt(Ze.TYPE_EMAIL),br=e=>Ze.TYPE_SSN===e;var Or,vr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(Or||(Or={}));const gr=(0,l.curry)(((e,t,r)=>{var n;const i=e===Or.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)))})),_r=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Nr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),_r),Ar=(0,l.pipe)((0,l.reject)(E),Nr),Pr=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s,(()=>E())),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+_r(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;let T,E=l.identity;const m=()=>!e||f()||T?T||Promise.resolve():(T=new Promise((e=>{E=e})),Promise.resolve());return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f,getDcrUriAwait:m}},Rr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Sr=(0,l.equals)(Rr.SUGGESTING),wr=(0,l.equals)(Rr.EDITING),Ir=(0,l.equals)(Rr.VIEWING),Ur=(0,l.either)(wr,Sr),Cr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Lr=(0,l.curry)(((e,t)=>(0,l.pipe)(Cr(e),(0,l.prop)("extendsTypeURI"))(t))),jr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Lr(e,r)));return n(r)})),Dr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Lr(e,n);return r})),kr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?kr(e,Cr(e,t.extendsTypeURI),r):void 0,Mr=(e,t)=>{const r=t.map(Dr(e));return(r.length?r.reduce(l.intersection):[])[0]},Fr=(e,t)=>kr(e,(0,l.is)(Object,t)?t:Cr(e,t),"typeImage"),xr=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&jr(e,t,n.uri)?r.concat(n.uri):r),[]),$r={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"},Vr={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},Gr={[$r.EQUALS]:"equals",[$r.NOT_EQUALS]:"not",[$r.STARTS_WITH]:"starts with",[$r.MISSING_VALUE]:"missing value",[$r.IN_RANGE]:"in range",[$r.HAS_ALL]:"has all",[$r.FULL_TEXT]:"full text",[$r.EXISTS]:"exists",[$r.COUNT_EQUALS]:"count equals",[$r.COUNT_NOT_EQUALS]:"count not equal",[$r.COUNT_LT]:"count less",[$r.COUNT_LTE]:"count less or equal",[$r.COUNT_GT]:"count greater",[$r.COUNT_GTE]:"count greater or equal",[$r.COUNT_RANGE]:"count in range",[$r.LT]:"less than",[$r.LTE]:"less than or equal",[$r.GT]:"greater than",[$r.GTE]:"greater than or equal",[$r.IN_FILE]:"in file",[$r.NOT_IN_FILE]:"not in file",[$r.CONTAINS]:"contains",[$r.ON]:"on",[$r.BEFORE]:"before",[$r.AFTER]:"after",[$r.WITHIN]:"within"},Wr="in",Yr="notIn",Br="not range",qr=e=>({[Wr]:$r.EQUALS,[Yr]:$r.NOT_EQUALS}[e]||e);var Hr,Qr;!function(e){e.LAST_DAY="lastDay",e.LAST_WEEK="lastWeek",e.LAST_MONTH="lastMonth",e.LAST_6MONTHS="last6Months",e.LAST_YEAR="lastYear",e.PICK_DATE="pickDate"}(Hr||(Hr={})),function(e){e.LAST_3DAYS="last3Days"}(Qr||(Qr={}));const Kr=["LAST_DAY","LAST_3DAYS","LAST_WEEK","LAST_MONTH","LAST_6MONTHS","LAST_YEAR","PICK_DATE"].reduce(((e,t)=>(e[t]=Hr[t]||Qr[t],e)),{}),Jr={[Hr.LAST_DAY]:"Last 24 hours",[Qr.LAST_3DAYS]:"Last 3 days",[Hr.LAST_WEEK]:"Last 7 days",[Hr.LAST_MONTH]:"Last month",[Hr.LAST_6MONTHS]:"Last 6 months",[Hr.LAST_YEAR]:"Last year",[Hr.PICK_DATE]:"Pick date"},Xr={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},zr={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Zr="<No label>",en={IN:"in",OUT:"out"};var tn=r(87918),rn=r.n(tn);function nn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){an(e,t,r[t])}))}return e}function an(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const on={startDate:{type:Ze.TYPE_ACTIVENESS_DATE,get label(){return rn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:Ze.TYPE_ACTIVENESS_DATE,get label(){return rn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},sn=nn({id:{type:Ze.TYPE_ENTITY_ID,get label(){return rn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},on,{roles:{type:Ze.TYPE_STRING,get label(){return rn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:Ze.TYPE_STRING,get label(){return rn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),ln={workflow:{type:Ze.TYPE_STRING,get label(){return rn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:Ze.TYPE_STRING,get label(){return rn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:Ze.TYPE_STRING,get label(){return rn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},un={commenter:{type:Ze.TYPE_STRING,get label(){return rn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},cn={notResolved:{type:Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return rn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},pn={createdBy:{type:Ze.TYPE_STRING,get label(){return rn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:Ze.TYPE_STRING,get label(){return rn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},dn={matches:{type:Ze.TYPE_COUNT,get label(){return rn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:Ze.TYPE_COUNT,get label(){return rn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},yn={sourceSystems:{type:Ze.TYPE_STRING,get label(){return rn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:Ze.TYPE_STRING,get label(){return rn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:Ze.TYPE_INT,get label(){return rn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:Ze.TYPE_STRING,get label(){return rn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let fn;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(fn||(fn={}));const Tn={[fn.matchRules]:{type:Ze.TYPE_STRING,get label(){return rn().text("Match Rules")},uri:fn.matchRules,name:fn.matchRules,faceted:!0,hideForDataTenant:!0},[fn.MLRecommendedMatch]:{type:Ze.TYPE_STRING,get label(){return rn().text("Match IQ")},uri:fn.MLRecommendedMatch,name:fn.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},En=nn({},sn,ln,un,cn,pn,dn,yn,Tn,{type:{type:Ze.TYPE_STRING,get label(){return rn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),mn="NOT_MATCH";var hn=r(13980),bn=r.n(hn);function On(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vn(e,t,r[t])}))}return e}function vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gn=bn().oneOf(["mobile","tablet","desktop"]),_n=bn().shape({deviceTypes:bn().oneOfType([gn,bn().arrayOf(gn)]),roles:bn().arrayOf(bn().string)}),Nn=bn().shape({value:bn().string,lookupCode:bn().string}),An=bn().shape({link:bn().string,filename:bn().string}),Pn=bn().shape({displayName:bn().string,parent:bn().string}),Rn=bn().oneOfType([bn().string,bn().number,bn().bool,Nn]),Sn=bn().oneOfType([Rn,bn().arrayOf(Rn)]),wn=bn().shape({fieldName:bn().string,values:bn().arrayOf(Sn),filter:bn().string,type:bn().string}),In=bn().shape({minValue:bn().number,maxValue:bn().number}),Un=bn().shape({label:bn().string,name:bn().string,description:bn().string,type:bn().string,hidden:bn().bool,faceted:bn().bool,searchable:bn().bool,uri:bn().string,access:bn().arrayOf(bn().string),cardinality:In}),Cn=bn().shape({label:bn().string,uri:bn().string,typeColor:bn().string,direction:bn().string,startObject:bn().object,endObject:bn().object}),Ln=bn().shape({typeColor:bn().string,typeIcon:bn().string,typeImage:bn().string,label:bn().string,uri:bn().string,attributes:bn().arrayOf(Un)}),jn=bn().shape({uri:bn().string,label:bn().string,memberTypes:bn().array,extendsTypeUri:bn().string,attributes:bn().arrayOf(Un)}),Dn=bn().shape({uri:bn().string,label:bn().string,extendsTypeUri:bn().string,relationshipTypeURIs:bn().arrayOf(bn().string)}),kn=bn().shape({uri:bn().string,description:bn().string,label:bn().string,schemaVersion:bn().string,entityTypes:bn().arrayOf(Ln),roles:bn().arrayOf(bn().object),groupTypes:bn().arrayOf(bn().object),relationTypes:bn().arrayOf(Cn),graphTypes:bn().arrayOf(Dn),interactionTypes:bn().arrayOf(jn),sources:bn().arrayOf(bn().object)}),Mn=bn().shape({uri:bn().string,type:bn().string}),Fn=bn().shape({uri:bn().string,attributes:bn().object,type:bn().string,timestamp:bn().number,members:bn().object}),xn=bn().shape({uri:bn().string,type:bn().string}),$n=bn().shape({value:bn().object,ov:bn().bool,type:bn().string,uri:bn().string}),Vn=bn().shape({refEntity:bn().oneOfType([bn().array,bn().object]),refRelation:bn().oneOfType([bn().array,bn().object]),value:bn().object,ov:bn().bool,type:bn().string,uri:bn().string}),Gn=bn().oneOf((0,l.values)(Rr)),Wn=bn().shape({type:bn().oneOf(Object.values(me)).isRequired,attributeTypeUri:bn().string.isRequired,parentUri:bn().string.isRequired,uri:bn().string,message:bn().string}),Yn={attributeType:Un,showEmptyEditors:bn().bool,lazy:bn().bool,mode:Gn,metadata:kn,ownError:Wn,errors:bn().arrayOf(Wn),crosswalks:bn().array,onAddAttributes:bn().func,onAddOneMore:bn().func,onDeleteAttribute:bn().func,onChangeAttribute:bn().func,additionalControlsRenderer:bn().func,hideDeleteButton:bn().bool,showNonOv:bn().bool,state:bn().oneOf(["deleted","edited"]),expanded:bn().bool},Bn=On({attributeValue:$n},Yn),qn=On({attributeValue:Vn},Yn),Hn=bn().shape({value:bn().oneOfType([bn().string,bn().bool,bn().number]),ov:bn().bool,type:bn().string,uri:bn().string,lookupCode:bn().string,lookupRawValue:bn().string}),Qn=bn().shape({totalOvValues:bn().number,totalValues:bn().number}),Kn=bn().shape({inRelations:bn().arrayOf(bn().oneOfType([bn().object,bn().string])),outRelations:bn().arrayOf(bn().oneOfType([bn().object,bn().string])),groups:bn().arrayOf(bn().string),entityTypes:bn().arrayOf(bn().string),nextEntry:bn().object}),Jn=bn().oneOf(["asc","desc"]),Xn=bn().shape({id:bn().string,content:Kn,allowOnlyCreateNew:bn().bool,sortColumn:bn().string,sortOrder:Jn,"text-empty":bn().string,max:bn().number,icon:bn().string,caption:bn().string,canCreate:_n,canRead:_n,canUpdate:_n,canDelete:_n,editingEnabled:bn().bool}),zn=bn().shape({id:bn().string,caption:bn().string,pageSize:bn().number,icon:bn().string,canCreate:_n,canRead:_n,canUpdate:_n,canDelete:_n,attributes:bn().object}),Zn=bn().shape({entityUri:bn().string,entityType:bn().string,entityLabel:bn().string,object:Mn}),ei=bn().shape({relationUri:bn().string,relationType:bn().string,relationLabel:bn().string,direction:bn().string,object:xn}),ti=bn().shape({entity:Zn,relation:ei}),ri=bn().shape({value:bn().string,isRawFilter:bn().bool}),ni=bn().shape({id:bn().string,label:bn().string,name:bn().string,availableEntityTypes:bn().array}),ii=bn().shape({id:bn().string,allowMergeAll:bn().bool,matchActions:bn().object,availableTabs:bn().arrayOf(bn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),ai=bn().shape({matchRules:bn().arrayOf(bn().string),object:Mn,shortestTransitiveMatchPath:bn().arrayOf(bn().shape({matchRules:bn().arrayOf(bn().string),match:bn().string})),direct:bn().bool,matchScore:bn().number}),oi=bn().arrayOf(ai),si=bn().arrayOf(bn().shape({uri:bn().string,label:bn().string})),li=[{label:rn().text("And"),value:"and"},{label:rn().text("Or"),value:"or"},{label:rn().text("And not"),value:"and not"},{label:rn().text("Or not"),value:"or not"}];function ui(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ci=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),pi=(0,l.pipe)(ci,(0,l.propOr)("","label")),di=(0,l.curry)(((e,t)=>{const r=ci(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),yi=(0,l.curry)(((e,t,r)=>{const[n,i]=di(e,r);return jr(e,n,t)||jr(e,i,t)})),fi=(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){ui(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Ti=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?en.OUT:en.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(en.IN),i=r(en.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Ei=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),mi={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},hi=(0,l.curry)(((e,t)=>e.every((e=>bi(e,t))))),bi=(0,l.curry)(((e,t)=>{const r=Wt(t);return Oi(e,t)&&(e===mi.READ||!r)})),Oi=(e,t)=>!t||!t.access||t.access.includes(e),vi=(0,l.curry)(((e,t,r)=>bi(mi.READ,r)&&(Sr(t)?bi(mi.INITIATE_CHANGE_REQUEST,r):bi(e,r)))),gi=vi(mi.CREATE),_i=vi(mi.DELETE),Ni=vi(mi.UPDATE),Ai=hi([mi.CREATE,mi.MERGE,mi.READ,mi.UPDATE]),Pi=hi([mi.UPDATE,mi.READ,mi.CREATE]),Ri=hi([mi.UPDATE,mi.READ]),Si=hi([mi.DELETE,mi.UPDATE,mi.READ]),wi=(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["*"])),Ii=(e,t,r)=>(0,l.pipe)((0,l.map)(wi(e,t)),(0,l.filter)(l.identity))(r),Ui=(e,t,r)=>{const n=Ii(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&bi(mi.MERGE,r)},Ci=(0,l.curry)(((e,t,r,n)=>{const i=ci(e,n),[a,o]=di(e,n);return i&&bi(mi.CREATE,i)&&jr(e,a,t.type)&&jr(e,o,r.type)})),Li=(e,t,r,n,i)=>{const a=Cr(e,n.type),o=Ii(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(Ci(e,n,i))||a.some(Ci(e,i,n))}))},ji=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Cr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ui(o,i,a),canAddRelation:Li(e,o,i,r,n),canMark:bi(mi.UPDATE,a)&&bi(mi.READ,a)}},Di=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>ji(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),ki=Yt,Mi=(0,l.complement)(ki),Fi=bi(mi.READ),xi=e=>{let{attributeType:t,mode:r}=e;return Mi(t)&&gi(r,t)&&!Ht(t)},$i=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=mt(r.uri),o=Ni(n),s=gi(n);return(0,l.cond)([[ki,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},Vi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=mt(r.uri),s=Ni(n),u=_i(n),c=Wi(mi.UPDATE,n,a,r),p=Wi(mi.DELETE,n,a,r);return(0,l.cond)([[ki,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)},Gi=(0,l.curry)(((e,t,r,n)=>{const i=or(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=>!Oi(e,n)||!Gi(e,t,r[n.name],n)))))})),Wi=(0,l.curry)(((e,t,r,n,i)=>Sr(t)?Gi(mi.INITIATE_CHANGE_REQUEST,r,n,i):Gi(e,r,n,i))),Yi=(0,l.both)((0,l.complement)(Ht),Fi),Bi="SuperUser",qi="allTenants",Hi=[qi,"allCustomers"],Qi=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===Bi})).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===Bi){const e=r?Hi.concat(r.map((e=>`allTenants.${e}`))):Hi,n=r&&t[0]===qi?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}))},Ki={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"},Ji={[Ki.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[Ki.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[Ki.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[Ki.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[Ki.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[Ki.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[Ki.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[Ki.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[Ki.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[Ki.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[Ki.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[Ki.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[Ki.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[Ki.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[Ki.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[Ki.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[Ki.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[Ki.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[Ki.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[Ki.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[Ki.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[Ki.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[Ki.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[Ki.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[Ki.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Xi=(0,l.curry)(((e,t,r)=>Qi({allowedPermissionsNames:e,permissionsNames:Ki,permissionsConfig:Ji}).some((e=>e(t,{params:{tenant:r}}))))),zi=Xi([Ki.CAN_EXPORT]),Zi=Xi([Ki.CAN_EXPORT_ACTIVITIES]),ea=Xi([Ki.CAN_IMPORT_ENTITIES_FROM_DT]),ta=Xi([Ki.CAN_READ_ENTITIES_FROM_DT]),ra=Xi([Ki.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),na=Xi([Ki.CAN_UPDATE_PROCESS_INSTANCE]),ia=Xi([Ki.CAN_VIEW_WORKFLOW_DEFINITION]),aa=Xi([Ki.CAN_CONFIG_ENVIRONMENT_REGISTER]),oa=Xi([Ki.CAN_UPDATE_WORKFLOW_DATA_TASK]),sa=Xi([Ki.CAN_READ_WORKFLOW_DATA_TASK]),la=Xi([Ki.CAN_MANAGE_WORKFLOW_DEFINITION]),ua=Xi([Ki.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),ca=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),pa=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),da=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),ya=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),fa=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS]),Ta=Xi([Ki.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Ea=Xi([Ki.CAN_CREATE_CONFIG_JAR]),ma=Xi([Ki.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),ha=Xi([Ki.CAN_VIEW_CONFIG_JAR]),ba=Xi([Ki.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Oa=Xi([Ki.CAN_VIEW_WORKFLOW_JOBS]),va=Xi([Ki.CAN_MAKE_BULK_UPDATE]),ga=Xi([Ki.CAN_OPEN_DATA_LOADER_EXECUTE,Ki.CAN_OPEN_DATA_LOADER_READ]),_a=Xi([Ki.CAN_BULK_DELETE_PROFILES]),Na=Xi([Ki.CAN_READ_MDM_DATA_ENTITIES]),Aa=Xi([Ki.CAN_READ_DVF]),Pa=Xi([Ki.IS_FREEMIUM_ADMIN]),Ra=(0,l.reject)(Ht),Sa=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),Ra,(0,l.filter)(e))(t),wa=(0,l.curry)(((e,t)=>Sa((t=>xi({attributeType:t,mode:e})),t))),Ia=(0,l.curry)(((e,t)=>Sa((t=>xi({attributeType:t,mode:e})||Yi(t)),t))),Ua=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(Yi)),Ca=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ca(e)])))),La=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(Yi),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...La(e)])))),ja=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...ja(e)])))),Da=(0,l.pipe)(Cr,(0,l.converge)(l.concat,[La,ja]));function ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ma(e,t,r[t])}))}return e}function Ma(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fa=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,Fa(e)))},t))),xa=e=>{var t;return ka({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},$a=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),Va=(0,l.when)($a,(0,l.dissoc)("values")),Ga=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return ka({},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})})),Wa=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},Ya=(0,vr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ca,t).concat((0,l.chain)(Ca,r)).some(Wa)})),Ba=e=>{let t=!1;const r=Fa((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?ka({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},qa=e=>{const t=Ya(e),r=(0,l.map)((e=>Fa((0,l.pipe)(Va,(0,l.when)((0,l.always)(e),Ga))))(t)),n=(0,l.map)(xa),i=(0,l.map)(Ba);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},Ha=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Qa=(0,l.prop)("relationshipTypeURIs"),Ka=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(Ja(e,t)))||[]})),Ja=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(yi(e,t))},Xa=(e,t)=>(0,l.pipe)(Ha,(0,l.defaultTo)({}),Qa,(0,l.defaultTo)([]),(0,l.chain)(di(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Cr(e)))(e,t),za=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),Za=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Za((0,l.complement)(za))(e)},to=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Za(za)(e)},ro=(0,l.pipe)(Cr,(0,l.propOr)([],"matchGroups")),no=(e,t,r)=>(0,l.pipe)(ro,(0,l.find)((0,l.propEq)("uri",r)))(e,t),io=(0,l.curry)(((e,t,r)=>(0,l.pipe)(no,(0,l.propOr)(r,"label"))(e,t,r))),ao=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(ro,(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]})),oo=e=>(0,l.partition)(za,e),so=(0,l.includes)(l.__,["and","or","not"]),lo=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),uo=(0,l.includes)(l.__,["equals","notEquals","in"]),co=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return so(t)?co(r):lo(t)?r.filter(_t):uo(t)?r.map((0,l.prop)("uri")).filter(_t):[]})),l.uniq),po=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(co),l.uniq),yo=(0,l.pipe)(ro,po),fo=(0,l.pipe)(ao,po),To=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Eo=(0,l.pipe)(To,La),mo=(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||jr(e,n,t)})(e,t))})(e,t)),ho=e=>!!e.required,bo=(e,t,r)=>{const n=(0,l.cond)([[_t,Cr(e)],[Nt,ci(e)]])(t);return Oo(e,n,r)},Oo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&_t(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!Wt(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===Ze.TYPE_REFERENCE){const n=nt(t),a=it(t);i=bo(e,n,r).filter((e=>a.some(At(e.uri))))}else t.attributes&&(i=Oo(e,t,r));i&&n.push(...i)}return n})):t.type===Ze.TYPE_REFERENCE?bo(e,nt(t),r):[],vo=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),ho]),e.attributes||[])},go=(e,t)=>{const r=st(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},_o=(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)?rn().text(n):n};return r(null,t)})),No=["label","description","abbreviation","caption","toolTip"],Ao=e=>_o(No,e),Po=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Rt(t);return r.find((e=>{let{uri:t}=e;return Rt(t)===n}))})),Ro=(0,l.curry)(((e,t)=>{const r=Rt(t);return(0,l.pipe)(Po(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),So=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"})},wo=(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}))},Io=(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)})),Uo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Cr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));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 jo=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 Do(i,e,t,r,n)},Do=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:or(t,r)).map((e=>e.map((e=>{const r=jo(t,e,n,i);return r.length?Co({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(zt),(0,l.prop)("children"))).filter(Yi).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},ko=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["attributes","analyticsAttributes"])},Mo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["attributes"])},Fo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["analyticsAttributes"])},xo=e=>e.children?e.children.flatMap(xo):e,$o=e=>e.children?[e,...e.children.flatMap($o)]:e,Vo=(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)})),Go=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Rt(r)===e})))),Wo=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),Go("LUD")),(0,l.defaultTo)(r))(t||[])},Yo=(e,t)=>{let{survivorshipStrategies:r}=e;return Go(t,r)},Bo=(0,l.allPass)([(0,l.complement)(l.isNil),bi(mi.READ)]),qo=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),bi(mi.READ)]),Ho=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),(0,l.anyPass)([bi(mi.CREATE),bi(mi.INITIATE_CHANGE_REQUEST)])]),Qo=(0,l.curryN)(2,(0,l.pipe)(Cr,qo)),Ko=(0,l.curryN)(2,(0,l.pipe)(ci,Bo));function Jo(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 Xo(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Jo(r[i],r[i+1],e,t));return n}function zo(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Xo(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 zo(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 Zo(e,t,r,n,i,a){void 0===a&&(a=0);var o=Xo(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()?(es(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(es.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=zo(e,t,r,n,i,a),s}var c=Zo(e,o,o.valueUri,{},i,a);Zo(c,t,r,n,i,a+1)}function es(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function ts(e,t,r,n){void 0===n&&(n=0);var i=Xo(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&ts(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 rs(e,t){e.roles=t||[]}function ns(e,t){e.tags=t||[]}function is(e,t){e.startDate=t||""}function as(e,t){e.endDate=t||""}const os=e=>{let{ov:t}=e;return!1!==t},ss=(e,t)=>((e,t)=>mr(e.type)&&ae(t))(e,t)||((e,t)=>hr(e.type)&&oe(t))(e,t),ls=(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))),us=ls("refEntity"),cs=ls("refRelation"),ps=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ds=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},ys=(0,l.prop)("objectURI"),fs=(0,l.prop)("objectURI"),Ts=(0,l.prop)("type"),Es=(0,l.pipe)(us,(0,l.defaultTo)({}),ys),ms=(0,l.pipe)(cs,(0,l.defaultTo)({}),fs),hs=(0,l.pipe)(us,(0,l.defaultTo)({}),Ts),bs=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Os=(0,l.evolve)({refEntity:re,refRelation:re}),vs=(e,t,r,n)=>{const i=ir(e,r),a=Cr(e,t.type)||ci(e,t.type);if(0===i.length)return null;const o=qt(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(!ct(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=>nt(e)===r.uri||rt(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},gs=(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?gs(a.value,o):a},_s=(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 gs(e[r],i)})),Ns=(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")]]),As=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","ov"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","ov"])],[l.T,(0,l.pick)(["value","ov"])]]),Ps=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.when)((()=>i.length>0),(0,l.pipe)((0,l.map)((0,l.prop)("value")),(0,l.map)(Ps(e,i)))))(r)})),Rs=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Rs(e)),e)(t))),Ss=(0,l.curry)(((e,t,r,n)=>(0,l.pipe)(Ps(e,r),Rs(t))(n))),ws=Ss(null,Ns),Is=Ss(os,Ns),Us=Ss(null,As),Cs=Ss(os,As),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=_s(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},js=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Es,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Ds=(e,t)=>{const r=kt(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Ls(e,r,n)},ks=Object.values(on),Ms=(0,l.includes)(l.__,ks),Fs=e=>ks.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$s(e,t,r[t])}))}return e}function $s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vs=(e,t)=>`${e}_${t}`,Gs=[En.matches.name,En.matchRules.name],Ws=(0,l.values)(ln).map((e=>e.name)),Ys=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Ws)))),Bs=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Gs)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>Vs(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),qs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Ys(r),Bs(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(Vs(`dtPotentialMatches.${t.name}`,"")))))(En)},Hs=(0,l.propEq)("uri",En.type.uri),Qs=e=>(0,l.values)(Tn).some((0,l.propEq)("uri",null==e?void 0:e.uri)),Ks=(0,l.propEq)("uri",yn.sourceSystems.uri),Js=Object.values(sn),Xs=(0,l.includes)(l.__,Js),zs=e=>{let{entity:t,attributeType:r,value:n}=e;return xs({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Zs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},el=e=>{let{entity:t,attributeType:r,value:n}=e;return xs({},t,{[r.uri]:n})},tl=(0,l.propEq)("uri",sn.roles.uri),rl=(0,l.propEq)("uri",sn.tags.uri);function nl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){il(e,t,r[t])}))}return e}function il(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const al=e=>{let{parentUri:t,attributeType:r}=e;return nl({uri:Et(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[zt,(0,l.always)({value:{}})],[tr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),ur)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},ol=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(wa(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),rr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=al({parentUri:r,attributeType:e});let s=or(n,e);s&&(e.type===Ze.TYPE_REFERENCE&&(s=ut(s)),a.value=ol({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||rr(e))&&(o[t]=[a])}return o},sl=e=>{let{entity:t,metadata:r}=e;return bo(r,t.type,!0).filter(rr).reduce(((e,t)=>{const n=t.name,i=kt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:vs(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:ul({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},ll=(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===Ze.TYPE_NESTED?nl({},e,{value:ll({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return nl({},s(t),ol({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),ul=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=al({parentUri:n,attributeType:r}),u=Ns(l);return(0,Ee.ZP)(t,(e=>{zo(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},cl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{zo(e.attributes||e.value,r,n.uri,Ns(n),a,o,i)}))},pl=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{Zo(e.attributes||e.value,r,n,i,a,o)}))},dl=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Ee.ZP)(t,(e=>{ts(e.attributes||e.value,r,n,i)}))},yl=e=>""===e,fl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([yl,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([yl,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]]),Tl=(0,l.reject)(fl),El=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=>El({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Tl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},ml=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return El({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Os),deleteEmptyComplex:e})},hl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(ml(e),(0,l.reject)(l.isEmpty))},bl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Ms(r)?zs({entity:e,attributeType:r}):ul({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Ol=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Ms(r)?el({entity:e,attributeType:r,value:i}):pl({entity:e,attributeType:r,uri:n,value:i})})),vl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Ms(r)?Zs({entity:e,attributeType:r}):dl({entity:e,attributeType:r,uri:n})})),gl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},_l="UrlThumbnail",Nl="CdnUrlThumbnail",Al=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(os):(0,l.head)(n);return e&&e.value}return null})),Pl=(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=Pl(["CdnUrl","Url"],!0),Sl=Pl(["CdnUrlPreview","UrlPreview"],!0),wl=Pl([Nl,_l],!0),Il=Pl([Nl,_l]),Ul=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[Bt,(0,l.always)(t)],[(0,l.both)(Yt,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=Bt(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Ms(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)}),[])},Cl=(e,t,r)=>{const n=Ua(e),i=(0,l.any)(r?l.T:os);return Ul(n,t,i)},Ll=(e,t,r,n,i,a)=>{const o=mt(null==r?void 0:r.uri)?wa(t,e):Ia(t,e);return Ul(o,r,((e,o)=>{const s=xi({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:os,e)||Bt(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let jl;const Dl=e=>{jl=e};function kl(e,t){return jl(e,t)}const Ml=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,xl=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=Fl,offset:a=0}=e;return kl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},$l=(0,l.once)((()=>kl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),Vl=e=>kl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Gl=(e,t)=>kl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Wl=e=>Z.fromNull(Gr[e]).map(rn().text).orSome(""),Yl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Bl=(0,l.split)("_"),ql=(0,l.includes)("_"),Hl=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),Ql=(0,l.curry)(((e,t)=>e.some(Hl(t)))),Kl=Ql([$r.IN_RANGE,$r.COUNT_RANGE,$r.WITHIN]),Jl=Ql([$r.EXISTS,$r.MISSING_VALUE]),Xl=(0,l.cond)([[Jl,(0,l.always)(0)],[Kl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),zl=(0,l.complement)(Jl),Zl=Ql([$r.HAS_ALL,$r.EQUALS,$r.NOT_EQUALS]),eu=Ql([$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE]),tu=Ql([$r.IN_FILE,$r.NOT_IN_FILE]),ru=e=>{switch(e){case $r.COUNT_EQUALS:return $r.EQUALS;case $r.COUNT_NOT_EQUALS:return $r.NOT_EQUALS;case $r.COUNT_LT:return $r.LT;case $r.COUNT_LTE:return $r.LTE;case $r.COUNT_GT:return $r.GT;case $r.COUNT_GTE:return $r.GTE;case $r.COUNT_RANGE:return $r.IN_RANGE}},nu=Ql([$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS]),iu=Ql([$r.WITHIN]),au=[[$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE],[$r.NOT_IN_FILE,$r.IN_FILE],[$r.EQUALS,$r.NOT_EQUALS,$r.HAS_ALL],[$r.LT,$r.LTE,$r.GT,$r.GTE],[$r.MISSING_VALUE,$r.EXISTS],[$r.COUNT_RANGE],[$r.IN_RANGE],[$r.STARTS_WITH,$r.CONTAINS],[$r.FULL_TEXT],[$r.ON,$r.BEFORE,$r.AFTER,$r.NOT_EQUALS],[$r.WITHIN]],ou=(e,t)=>au.some((r=>r.includes(e)&&r.includes(t))),su=(0,l.pipe)(l.omit,l.values),lu={OPTIONS_FOR_STRING:su(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_DATE:[$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS,$r.MISSING_VALUE,$r.EXISTS,$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE,$r.IN_FILE,$r.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:su(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_BLOB:su(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_NUMBER:su(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_LOOKUP:su(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],$r),OPTIONS_FOR_ENUM:su(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_ID:[$r.EQUALS,$r.NOT_EQUALS,$r.IN_FILE,$r.NOT_IN_FILE],OPTIONS_FOR_COUNT:[$r.EQUALS,$r.NOT_EQUALS,$r.LT,$r.LTE,$r.GT,$r.GTE,$r.IN_RANGE],OPTIONS_FOR_COMPLEX:[$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE,$r.EXISTS,$r.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[$r.EQUALS,$r.NOT_EQUALS,$r.EXISTS,$r.MISSING_VALUE]},uu=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case Ze.TYPE_TYPEAHEAD:case Ze.TYPE_STRING:case Ze.TYPE_PASSWORD:case Ze.TYPE_TEXT:case Ze.TYPE_CIK_ID:case Ze.TYPE_URL:case Ze.TYPE_BLOG_URL:case Ze.TYPE_IMAGE_URL:case Ze.TYPE_EMAIL:return lu.OPTIONS_FOR_STRING;case Ze.TYPE_LOOKUP:case Ze.TYPE_DEPENDENT_LOOKUP:return lu.OPTIONS_FOR_LOOKUP;case Ze.TYPE_ENUM:return lu.OPTIONS_FOR_ENUM;case Ze.TYPE_DATE:case Ze.TYPE_ACTIVENESS_DATE:case Ze.TYPE_TIMESTAMP:case Ze.TYPE_LOCAL_DATE:return lu.OPTIONS_FOR_DATE;case Ze.TYPE_BOOLEAN:case Ze.TYPE_BOOLEAN_RADIO:return lu.OPTIONS_FOR_BOOLEAN;case Ze.TYPE_BLOB:return lu.OPTIONS_FOR_BLOB;case Ze.TYPE_LONG:case Ze.TYPE_INT:case Ze.TYPE_FLOAT:case Ze.TYPE_DOUBLE:case Ze.TYPE_NUMBER:return lu.OPTIONS_FOR_NUMBER;case Ze.TYPE_ENTITY_ID:return lu.OPTIONS_FOR_ID;case Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[$r.EQUALS];case Ze.TYPE_COUNT:return lu.OPTIONS_FOR_COUNT;case Ze.TYPE_NESTED:case Ze.TYPE_REFERENCE:case Ze.TYPE_IMAGE:return lu.OPTIONS_FOR_COMPLEX;default:return lu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(eu,n):n},cu=e=>[Pe.and,Pe.andNot].includes(e),pu=e=>[Pe.or,Pe.orNot].includes(e),du=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),pu)),yu=(fu=[Pe.and],e=>e.slice(0,-1).every((e=>fu.includes(e.operator))));var fu;const Tu=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Eu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),mu=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},hu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[Pe.or,Pe.orNot],n=t?[Pe.and,Pe.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)&&mu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},bu="and",Ou=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)(bu,n,e),o=(e=>[Pe.andNot,Pe.orNot].includes(e))(a)?hu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},vu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),gu=e=>Array.isArray(e)?e.map(gu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),_u=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),Nu=e=>`'${e}'`,Au=e=>`"${e}"`,Pu=(0,l.pipe)(gu,_u),Ru=(0,l.pipe)(Pu,Nu),Su=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Kl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),wu=(e,t)=>eu(t)?{type:Ze.TYPE_INT}:tu(t)?{type:Ze.TYPE_FILE}:nu(t)&&!iu(t)&&cr(e.type)?{type:Ze.TYPE_LOCAL_DATE}:e,Iu=Object.values(Kr),Uu=e=>!Object.values(Kr).includes(e),Cu=e=>Iu.includes(e),Lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jr;return rn().text(t[e])},ju=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.values(Hr),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jr;return e.map((e=>({value:e,get label(){return Lu(e,t)}})))},Du=e=>{const t=f()().startOf("minute");switch(e){case Hr.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case Hr.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case Hr.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case Hr.LAST_6MONTHS:return[f()(t).subtract(6,"months").valueOf(),t.valueOf()];case Hr.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()];case Qr.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];default:return e}},ku=e=>{let[t,r]=e;return[f()(t).valueOf(),f()(r).endOf("date").valueOf()]},Mu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;return(0,l.is)(String,e)?t(e):ku(e)};let Fu;!function(e){e.CurrentUser="currentUser"}(Fu||(Fu={}));const xu={},$u=(e,t)=>{xu[e]=t},Vu=e=>xu[e];function Gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wu(e,t,r[t])}))}return e}function Wu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Yu=e=>e.split("{CurrentUser}").join(Vu(Fu.CurrentUser)||""),Bu=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),qu=(0,l.curry)(((e,t,r)=>{const n=r.map(Kl(e)||t.endsWith(".count")?Pu:Ru).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Hu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Qu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Xl(t);return(0,l.pipe)(Hu(i),(0,l.map)(qu(t,r)),Bu(" or "))(n)},Ku=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Ru).join(",")})`},Ju=e=>`*${e}*`,Xu=e=>`URL:${e}`,zu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Zu=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===$r.IN_FILE?r:`not ${r}`},ec=(e,t)=>[R(e,t),S(e,t)],tc=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!rc(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case $r.ON:return Gu({},e,n?{filter:$r.EQUALS}:{filter:$r.IN_RANGE,values:[ec(i,n)]});case $r.BEFORE:return Gu({},e,{filter:$r.LTE,values:[[S(i,n)]]});case $r.AFTER:return Gu({},e,{filter:$r.GTE,values:[[R(i,n)]]});case $r.WITHIN:return Gu({},e,{filter:$r.IN_RANGE,values:[Du(i)]})}}return e}),Qu),rc=(0,l.propSatisfies)(cr,"type"),nc=[[(0,l.prop)("rawFilter"),(0,l.pipe)((0,l.prop)("rawFilter"),Yu)],[(0,l.propEq)("filter",$r.HAS_ALL),(0,l.pipe)((e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Qu({filter:$r.EQUALS,fieldName:t,values:[r]}))),new Ou).build())),Bu(" or "))(r)}),Yu)],[(0,l.propEq)("filter",$r.CONTAINS),(0,l.pipe)((e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:r,filter:t,values:n.map((0,l.pipe)(gu,Ju))})}),Yu)],[(0,l.propEq)("filter",$r.EQUALS),(0,l.pipe)((e=>{const{fieldName:t,values:r}=e;return"type"===t?Qu(Gu({},e,{values:(0,l.flatten)(r)})):zu(r)?Ku(Gu({},e,{filter:"listEquals"})):Qu(e)}),Yu)],[(0,l.propEq)("filter",$r.NOT_EQUALS),(0,l.pipe)((e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Xl(t);return(0,l.pipe)(Hu(i),(0,l.map)(qu(t,r)),Bu(" and "))(n)})(Gu({},e,{values:(0,l.flatten)(e.values)})):rc(e)?(e=>{const{values:t}=e,r=!rc(e),[n]=t;return(new Ou).addClause(Qu(Gu({},e,{filter:$r.LT,values:[R(n,r)]}))).addClause(Qu(Gu({},e,{filter:$r.GT,values:[S(n,r)]}))).orBuild()})(e):zu(t)?Ku(Gu({},e,{filter:"not listEquals"})):Qu(e)}),Yu)],[(0,l.propSatisfies)(tu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:r,filter:Zu(t,r),values:n.map((0,l.prop)("link")).map(Xu)})}],[(0,l.propSatisfies)(eu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:`${r}.count`,values:n,filter:ru(t)})}],[(0,l.propSatisfies)(nu,"filter"),tc],[(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 qu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return qu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,(0,l.pipe)(Qu,Yu)]],ic=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!zl(e)||oc(e,r))},ac=(e,t)=>Array.isArray(t)?oc(e,t):e===$r.WITHIN?Cu(t)||Number.isInteger(t):!(0,l.isNil)(t)&&gu(t).length>0,oc=(e,t)=>t&&t.length>0&&t.every((t=>ac(e,t)));function sc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lc=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},uc=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),cc=(e,t,r)=>"children"===e?dc(r,[...t][0],!0):r,pc=(e,t,r)=>"values"===e?[...r,...t]:r,dc=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)(cc,t),e);if(!r&&Zl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(pc,t),e)}return(0,l.append)(t,e)},yc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=lc(e),r=e=>e.fieldName===t?e:r({fieldName:uc(e),children:[e]});return r(e)})(t);return dc(e,r)}),[]),fc=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")),Tc=e=>{let[t]=e;return t.children?Tc(t.children):t.operator},Ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=Tc(t)===Pe.andNot,a=n(t,!1),o=i?`not ${hu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Tc(r)||bu} ${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&&fc(i)&&!t?r(i):n(i,a)}],...e])(o))),new Ou).buildWithOperators(i.map((0,l.prop)("operator")))}return n},mc=(0,l.pipe)((0,l.propOr)("","filter"),ql),hc=(0,l.map)((0,l.when)(mc,(e=>{const[t,r]=Bl(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){sc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),bc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(ic),hc,yc,Ec([...e,...nc],t))},Oc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),vc=[$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS,$r.MISSING_VALUE,$r.EXISTS],gc=[$r.EQUALS,$r.NOT_EQUALS,$r.STARTS_WITH,$r.MISSING_VALUE,$r.HAS_ALL,$r.FULL_TEXT,$r.EXISTS],_c=[$r.EQUALS,$r.NOT_EQUALS,$r.LT,$r.LTE,$r.GT,$r.GTE,$r.IN_RANGE],Nc=(e,t)=>{const r=Gt(e);return(e=>{switch(e){case on.startDate.name:case on.endDate.name:case ln.dueDate.name:case pn.createdTime.name:case pn.updatedTime.name:case yn.reltioLoadDate.name:case yn.createDate.name:case yn.updateDate.name:case yn.deleteDate.name:case yn.publishDate.name:return vc;case dn.matches.name:case yn.count.name:return _c;case ln.workflow.name:case ln.assignee.name:case ln.step.name:case un.commenter.name:case pn.createdBy.name:case pn.updatedBy.name:case yn.sourceSystems.name:case yn.value.name:return gc;default:return null}})(t)||uu(r)},Ac=[$r.EQUALS,$r.NOT_EQUALS,$r.CONTAINS,$r.STARTS_WITH,$r.MISSING_VALUE,$r.HAS_ALL,$r.IN_RANGE,$r.WITHIN,$r.EXISTS,$r.ON],Pc=(0,l.pipe)(Nc,(0,l.filter)((0,l.includes)(l.__,Ac))),Rc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Sc=e=>{let{query:t,body:r}=e;return t=Rc(t),kl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},wc=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)(bc(),Oc(t.globalFilter))(n),activeness:t.activityFilter||zr.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Ar(i)}`},Ic=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=wc(e,t,r);return kl(n)},Uc=e=>kl(`/entities/_total?${e}`),Cc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(qo),(0,l.map)((0,l.prop)("uri")))(e),i={filter:$r.EQUALS,fieldName:"type",values:n},a=r.isRawFilter?{rawFilter:t}:{filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(bc(),Oc(r.globalFilter))([i,a]),s=Ar({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||zr.ACTIVE_ONLY,max:r.max||4});return kl("/entities/_typeAheadSearch"+s,{method:"GET"})},Lc=(0,l.pipe)((0,l.reject)(l.isNil),Nr),jc=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)(bc(),Oc(i))(r),p=Lc({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Sc({query:p,body:d})},Dc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return jc({fieldName:t,searchParams:i,options:n})};function kc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Fc=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)(bc(),Oc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Mc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Ar(i)}`},xc=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=Fc(e,t,r);return kl(n)},$c=e=>qc(e,{select:"secondaryLabel"}),Vc=(e,t)=>{const{select:r=Mc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),kl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Gc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),mt)),Wc=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=Gc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Zt(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)(bc(),Oc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),kl(`${s}/api/${o}/${t}/_object`,m)},Yc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Bc={options:"sendHidden,addRefAttrUriToCrosswalk"},qc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bc;return kl(`/${e}${Ar(t)}`)},Hc=(e,t)=>qc(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){kc(e,t,r[t])}))}return e}({},Bc,{explicitSurvivorshipGroup:t})),Qc=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 kl(n,r)},Kc=e=>kl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Jc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return kl(`/${e}/_clone${Ar({executeLCA:!1,valuesToCopy:r})}`,n)},Xc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return kl(`/entities/_events/_total${Nr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},zc=(e,t)=>kl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Zc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return kl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},ep=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 kl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Nr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},tp=e=>{const t=new FormData;return t.append("file",e),kl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,rn().text("Can't upload file"));return Promise.reject(t)}))},rp=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 kl(`/personal/findSavedSearches${Nr({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"}})},np=e=>kl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),ip=e=>kl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),ap=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return kl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},op=e=>{let{uri:t}=e;return kl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},sp=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),ap)(e),lp=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),ap)(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=["max","offset","filter"],pp=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:pp(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){up(e,t,r[t])}))}return e}({},t,(0,l.pick)(cp,e)))),dp=e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Ae.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Ae.ALL,e)))return!1},yp=(0,l.omit)(["activeness"]),fp=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=dp(t),{searchByOv:i}=r;t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(pp(e),(0,l.omit)(cp))(e))),yp,(0,l.omit)(["labels"])))(t);const a={limitCreditsConsumption:!0,activeness_enabled:n,options:i?"searchByOv":void 0},o=`/${e}/_connections${Ar(a)}`,s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)};return{url:o,options:s}},Tp=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Ep=(0,l.reject)(l.isNil),mp=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),hp=e=>kl(mp(e),{method:"GET",headers:{"Content-Type":"application/json"}}),bp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,mp);return kl(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?hl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Ep,ne,JSON.stringify);return kl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},vp=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"),mp,n),o=qE(i(t),i(r)).concat(QE(t,r));return kl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},gp=(e,t,r)=>{const{url:n,options:i}=fp(e,t,r);return kl(n,i).then(Tp)},_p=(e,t)=>kl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),Np=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===en.IN?a.inRelations=[n]:a.outRelations=[n],kl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Ap=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return kl(`${t}/recentSearches${Ar({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},Pp=e=>kl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Rp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return kl(`/recentSearches${Ar({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function Sp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wp(e,t,r[t])}))}return e}function wp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ip={select:"label,secondaryLabel,name,type,startDate,endDate"},Up=(0,l.reject)(l.isNil),Cp=(0,l.pipe)(Up,Nr),Lp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=Sp({},Ip,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return kl(`/${t}/_tree${Cp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},jp=e=>{let{uri:t,graphUri:r}=e;const n=Sp({},Ip,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return kl(`/${t}/_parents${Cp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Dp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=Sp({},Ip,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return kl(`/${t}/_hops${Cp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function kp(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 Mp=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},Fp="/activities",xp=e=>{let{label:t,description:r}=e;return kl(Fp,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:Mp()}})};var $p;!function(e){e.userSearch="USER_SEARCH",e.profileView="USER_PROFILE_VIEW"}($p||($p={}));const Vp=e=>{const t=Ar(e);return kl(Fp+t,{method:"GET"})},Gp=e=>kl(`/activities/_total${Ar(e)}`,{method:"GET"}),Wp=e=>{const{entityUri:t}=e,r=kp(e,["entityUri"]);return kl(`/${t}/_activities${Ar(r)}`,{method:"GET"})},Yp=e=>{const{entityUri:t}=e,r=kp(e,["entityUri"]);return kl(`/${t}/_activities/_total${Ar(r)}`,{method:"GET"})};function Bp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qp(e,t,r[t])}))}return e}function qp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Hp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Qp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return kl(Hp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Kp=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=Hp({url:r,workflowPath:t,tenant:n})),kl(s,{method:i||"GET",body:JSON.stringify(a),headers:Bp({"Content-Type":"application/json"},null!=o?o:{})})},Jp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Hp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return kl(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)},Xp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Hp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Bp({},l,{comment:o}):l;return kl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},zp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Hp({url:`/tasks${s?Ar(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Bp({objectURIs:[i]},(0,l.reject)(E,a)))};return kl(u,Bp({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Zp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return kl(Hp({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})})},ed=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return kl(Hp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Bp({max:a,offset:o},i))})},td=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return kl(Hp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},rd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return kl(Hp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},nd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},id=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return kl(Hp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},ad=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},od=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},sd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},ld=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return kl(Hp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},ud=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return kl(Hp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},cd=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(os);return a&&a[0]&&(r=n.length>0&&a[0].value?cd(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}}),""),pd=(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=cd(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},dd=/[,\s]*$/,yd=e=>{const t=rn().text(Zr);if(!e)return t;const r=e.replace(dd,"");return""===r.toString().trim()?t:r},fd=(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=fd(e,r.referencedEntityTypeURI);if(n)return pd({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return pd({attributes:t||{}},r.dataLabelPattern);return""},Ed=e=>{let{uiPath:t,uri:r,screen:n="profile"}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}${n}?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},md=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)}`},hd=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",bd=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),wl,(0,l.prop)("value"))),Od=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),bd),vd=(e,t,r)=>{const n=Od(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(_s(e),bd)))(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")])})(Cr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>vs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,bd))(r)})(e,r)||Fr(e,r.type);return hd(t,n)};function gd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_d(e,t,r[t])}))}return e}function _d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Nd="DTSS/",Ad=(0,l.replace)(new RegExp("^entities/"),""),Pd=e=>Nd+e.dataTenant+"/"+e.uri,Rd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),Sd=e=>!(!e||!e.dataTenant),wd=(0,l.startsWith)(Nd),Id=(0,l.pipe)((0,l.ifElse)(wd,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),Ud=(0,l.ifElse)(Sd,Pd,(0,l.prop)("uri")),Cd=e=>e&&e.uri?e.dataTenant?Pd(e):Ad(e.uri):"",Ld=(0,l.curry)(((e,t,r)=>(Cr(t,r.type)||{})[e]||"")),jd=Ld("label"),Dd=Ld("typeGraphIcon"),kd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Cr(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(os)||"");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):[]},Md=(0,l.pipe)(kd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),Fd=(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=Fd(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):Fd(e.slice(1),r)}})),xd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,$d=e=>(0,l.propOr)([],"matchRules",e),Vd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?gd({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},Gd=(e,t,r)=>t&&r?r.aEntity:e,Wd=(0,l.evolve)({attributes:hl(!0)}),Yd=(0,l.pipe)(Wd,(0,l.props)(["attributes","startDate","endDate","roles","tags"]),(0,l.all)(E)),Bd=e=>(0,l.assoc)("dataTenant",e),qd=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 kl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Nr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Hd=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 kl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Nr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Qd=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return kl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Kd=(e,t,r)=>Promise.all(t.map((async t=>await kl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),Jd=async(e,t)=>await Kd(e,t,"NOT"),Xd=async(e,t)=>await Kd(e,t,"MATCH"),zd=async(e,t)=>await Promise.all(t.map((async t=>await kl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(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}function ty(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 ry=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return kl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},ny=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return gy({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},iy=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return gy({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},ay=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return kl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},oy=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 ay({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},sy=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(Sd,i);return Promise.all([s.length?Qd(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return ay({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},ly=(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=ty(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)}),[])),uy=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),ly),cy=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return kl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(uy)},py=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)},dy=py((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return kl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(uy)})),yy=py((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return kl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),fy=(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)}},Ty=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return kl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},Ey=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 Ty(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},my=Ey("NOT"),hy=Ey("MATCH"),by=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(Sd,a);return Promise.all([Kd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return Ty(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},Oy=by("NOT"),vy=by("MATCH");function gy(e){let{requestProvider:t=kl,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}`,Zd({},ty(s,["headers"]),{headers:Zd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const _y=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return gy({url:Fc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Ny=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return gy({url:wc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Ay=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a,options:o}=e;const{searchByOv:s}=o,{options:u}=fp(t,r);return gy({url:`entities/_connections/_getConnections${Ar({dataEntityUri:t,options:s?"searchByOv":void 0})}`,options:u,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)))}))))},Py=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return gy({url:`${Yc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},Ry=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return kl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},Sy=e=>{let{dtssPath:t,tenant:r}=e;return kl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},wy=e=>{let{dtssPath:t,customerTenant:r}=e;return kl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},Iy=e=>{let{dtssPath:t,tenants:r}=e;return kl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},Uy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return gy({url:Yc(t),dataTenant:r,customerTenant:n,dtssPath:i})},Cy=()=>kl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function Ly(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jy(e,t,r[t])}))}return e}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Dy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=Ly({},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 kl(`${t}/api/${r}/graph/search${Ar({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},ky=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return kl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:Ly({},n,i),headers:{"Content-Type":"application/json"}})},My=(e,t)=>`${e}/${t}/comments`,Fy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return kl(`${My(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},xy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return kl(`${My(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},$y=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return kl(My(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},Vy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return kl(`${My(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Gy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return kl(`${My(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Wy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return kl(`${My(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Yy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return kl(`${My(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},By=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return kl(`${My(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},qy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Ar({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return kl(`${My(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Hy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Qy(e,t,r[t])}))}return e}function Qy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ky=e=>{let{tenant:t,servicesPath:r}=e;return kl(`${r}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Jy="graphExport",Xy=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(Hy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:Hy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:Hy({method:"POST"},o)})),s},zy=e=>{let{servicesPath:t,key:r}=e;return kl(`${t}/settings${Ar({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Zy=e=>{let{servicesPath:t}=e;return kl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},ef=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return kl(`${n}/plugins${Ar({tenant:t,user:r})}`,{method:"GET"})},tf=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return kl(`${n}/configService${Ar({tenant:t,environment:r,namespace:a,projection:o})}`,i)},rf=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return tf({tenant:t,environment:r,servicesPath:n,options:{method:"GET"}})},nf=e=>{let{servicesPath:t,stateHash:r}=e;return kl(`${t}/searchLink?key=${r}`,{method:"GET"})},af=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),kl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},of=e=>kl(`/${e}?showObjectsInfo=true`,{method:"GET"}),sf=e=>{let{exportPath:t,tenant:r,options:n}=e;return kl(`${t}/${r}/activities${Ar(n)}`,{method:"POST"})};function lf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uf(e,t,r[t])}))}return e}function uf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cf=e=>{const{entityUri:t}=e;return kl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},pf=e=>{let{entityUri:t,crosswalk:r}=e;return kl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},df=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return kl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[lf({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),lf({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},yf=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return kl(`/${r}/_${n}${Ar({contributorURI:t})}`,{method:"POST"})},ff=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return kl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Tf=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return kl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ef=e=>{let{entityUri:t,crosswalkId:r}=e;return kl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};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{entityTypeUri:t}=e;return kl(`/dataQuality/fillRates${Nr({entityType:Rt(t)})}`,{method:"GET"})},bf=e=>{let{attributes:t=[],metrics:r=[]}=e;const n=r.length,i=t.length*n;return i>10?10:i},Of=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){mf(e,t,r[t])}))}return e}({},n===Me.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{}),o=n===Me.ATTRIBUTE_TYPE?Nr({numberOfThreads:bf({attributes:r,metrics:i})||1}):"";return kl(`/entityType/${Rt(t)}/dataQuality/${n}${o}`,{method:"POST",body:JSON.stringify(a)})},vf=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return kl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Rt(n)}`,{method:"GET",headers:{env:i}})},gf=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=Me.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u}=e;const c={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u};return kl(`${t}/${r}/entityType/${Rt(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(c)})},_f=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return kl(`/${t}${Ar({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Nf=e=>{let{attributeUri:t,value:r}=e;return kl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Af=e=>{let{attributeUri:t,value:r}=e;return kl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},Pf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return kl(`/${t}${Ar({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},Rf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Ar({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=hl()([[{value:a}]]);return kl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Sf=e=>{let{entityUri:t,attributeName:r,value:n}=e;return kl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},wf=e=>{let{entityUri:t,attributeName:r}=e;return kl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function If(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uf=e=>{let{entityUri:t}=e;return kl(`/${t}/_historicURIs`,{method:"GET"})},Cf=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 kl(`/${t}/_changesWithTotal${Ar(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){If(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},Lf=(e,t)=>kl(`/${e}/_previousChange${Ar({timestamp:t})}`,{method:"GET"}),jf=(e,t)=>kl(`/${e}${Ar({time:t})}`,{method:"GET"});function Df(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kf(e,t,r[t])}))}return e}function kf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mf=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a}=e;return kl(t,{method:r||"GET",body:n,headers:Df({"Content-Type":"application/json"},null!=i?i:{}),noRequestProcessor:a})},Ff=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Ar({options:a.join(","),severity:o.join(",")});return kl(`${t}/validate/${i}/entity/${Cd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},xf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return kl(`${t}/validate/${n}/entity${Ar({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},$f=e=>{let{tenant:t,apiPath:r}=e;return kl(`${r}/tenants/${t}/name`,{method:"GET"})},Vf=e=>{let{tenant:t,apiPath:r}=e;return kl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},Gf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return kl(`${a}/preferences${Ar({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Wf=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 kl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Yf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return kl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},Bf=e=>{const{servicesPath:t}=e;return kl(`${t}/getTokenForWorker`,{method:"GET"})};var qf=r(29524);const Hf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=ht(),s={attributes:ol({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=vs(r,e,n.uri)[0];return i&&i.value?pl({entity:e,attributeType:n,uri:i.uri,value:t}):ul({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},Qf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Es),(0,l.filter)(mt),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Kf=(0,l.curry)(((e,t)=>{const r=Qf(e=e||{},t=t||{});return r.concat((0,l.chain)(Kf(e),r))})),Jf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),Xf=Jf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),zf=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),mt)),Zf=e=>(0,l.pipe)(Xf,zf(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),eT=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Xf,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),tT=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),mt),(0,l.omit)(["uri","timestamp"])),rT=(0,l.pipe)(tT,Wd),nT=async(e,t,r)=>{if(!e)return null;const n=Zf(e);if(n.length>0)for(const r of n)e=eT(r,t[r],e);const i=await Qc(rT(e),null==r?void 0:r.enhanceUriWithDCR),a=(e=>(0,l.path)([0,"errors"],e))(i);if(a)throw a;if((0,l.has)("changes",i))return null==r||r.updateDCRUriFromResponse(i),((e,t)=>(0,l.pipe)((0,l.prop)("changes"),l.keys,(0,l.find)((e=>!(0,l.values)(t).includes(e))))(e))(i,t);const o=(e=>(0,l.pathOr)(e,[0,"object"],e))(i);return o.uri},iT=async(e,t,r)=>{const n=oT(e,t),i={};for(const t of n)i[t]=await nT(e[t],i,r);return i},aT=(0,l.curry)(((e,t)=>{const r=qf.Node(t);return Zf(e[t]).forEach((t=>{const n=aT(e,t);r.addEdge(n)})),r})),oT=(e,t)=>(0,l.pipe)((0,l.map)(aT(e)),(0,l.map)(qf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),sT=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(tT))})),lT=(e,t)=>[...ZE(e.tags||[],t.tags||[]),...em(e.roles||[],t.roles||[]),...HE(e,t),...QE(e,t)],uT=(e,t)=>[...KE(qE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),zE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e),...lT(e,t)],cT=(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 eT(r,n,e)}),e))))}),t)}),sT),pT=(0,l.curry)(((e,t)=>(0,l.when)(mt,(0,l.propOr)(l.__,t,e),t)));function dT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yT(e,t,r[t])}))}return e}function yT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fT=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Fe.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},TT=e=>{let{relationUri:t}=e;return{type:Fe.DELETE_RELATION,parameters:{relationUri:t}}},ET=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Fe.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},mT=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Fe.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},hT=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Fe.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},bT=(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))),OT=e=>e.type===Fe.DELETE_RELATION,vT=e=>e.type===Fe.CREATE_RELATION,gT=e=>e.type===Fe.REPOINT_RELATION,_T=e=>e.type===Fe.UPDATE_RELATION,NT=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 Fe.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 Fe.DELETE_RELATION:return()=>{const{relationUri:e}=r;return bp(e,i).then(o)};case Fe.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return Np(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case Fe.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return vp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case Fe.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[TT({relationUri:o}),fT({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(RT(n)),(0,l.map)(AT),NT)(s)}}},PT=e=>t=>()=>e().then(t),RT=e=>t=>dT({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=Pr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(RT(r)),(0,l.map)(AT),(0,l.map)(PT(r.getDcrUriAwait)),NT,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},wT=e=>t=>(0,l.map)((t=>dT({},t,{parameters:(0,l.evolve)({parentUri:pT(e),entityUri:pT(e),newEntityUri:pT(e)},t.parameters)})),t),IT=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},UT=(e,t)=>{const r=e.filter(vT).find(bT(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>_T(o)&&bT(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!gT(o)||!bT(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(IT({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},CT=(e,t)=>{const r=e.filter(gT).filter(bT(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!_T(i)||!bT(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(IT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},LT=(e,t)=>{const r=e.filter(OT).filter(bT(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!bT(t,e)))},jT=(e,t)=>{const r=e.filter(_T).filter(bT(t));let n=null;const i=e.filter((e=>!r.includes(e)||!_T(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(IT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},DT=e=>{const t=e.filter(OT).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(LT,e)},kT=e=>{const t=e.filter(vT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(UT,e)},MT=e=>{const t=e.filter(gT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(CT,e)},FT=e=>{const t=e.filter(_T).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)(jT,e))(t)},xT=e=>(0,l.pipe)(DT,kT,MT,FT)(e);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){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=>$T({},(0,l.path)(eE(),e),{startDate:(0,l.path)(iE(),e),endDate:(0,l.path)(aE(),e)}),WT=(e,t)=>(0,l.pipe)((0,l.path)(nE()),pT(t))(e),YT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=WT(e,r),i=(0,l.path)(tE(),e)===xe.IN,a=e.parentEntityUri||n;return fT({parentUri:i?t:a,relation:GT(e),entityUri:i?a:t})})),...o.map((t=>{const i=WT(t,r),a=(0,l.path)(tE(),t)===xe.IN,o=i!==(0,l.pipe)((0,l.path)(eE()),a?oE:sE)(t),s=cE(e,(0,l.path)(zT(),t)),u=t.parentEntityUri||n,c=pT(r,i);return o?hT({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(eE(),t),isReversed:!1}):mT({oldRelation:(0,l.path)(eE(),s),newRelation:GT(t)})})),...i.map((e=>TT({relationUri:e}))),...s.map((e=>ET({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},BT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return $T({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),qT=(0,l.has)("dataTenant"),HT=(0,l.ifElse)(qT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),QT=(e,t)=>(0,l.pipe)(ci,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(ks),Ra)(e,t),KT=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)}},JT=(e,t,r)=>{const n=pd(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)},XT="relation",zT=(0,l.always)([XT,"relationUri"]),ZT=(0,l.always)([XT,"relationType"]),eE=(0,l.always)([XT,"object"]),tE=(0,l.always)([XT,"direction"]),rE=(0,l.always)([XT,"object","attributes"]),nE=(0,l.always)(["entity","entityUri"]),iE=(0,l.always)([XT,"startDate"]),aE=(0,l.always)([XT,"endDate"]),oE=(0,l.path)(["startObject","objectURI"]),sE=(0,l.path)(["endObject","objectURI"]),lE=(0,l.path)(["startObject","objectTypeURI"]),uE=(0,l.path)(["endObject","objectTypeURI"]),cE=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(zT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=cE(r.connections,t);if(e)return e}}},pE=(0,l.pipe)(cE,(0,l.path)(eE())),dE=(0,l.allPass)([(0,l.pipe)((0,l.path)(nE()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(ZT()),(0,l.complement)(E))]),yE=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:bt()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=EE({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=fE(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?KT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},fE=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:en.IN}:{type:t[0],direction:en.OUT}:null},TE=e=>e.uri||e,EE=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&gi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===en.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"],Cr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Cr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(TE,ci(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(en.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(en.OUT)),(0,l.map)(u))},t)||{}},mE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Ti({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=di(e,n.uri);return n&&(!t||jr(e,i,t))&&(!r||jr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Cr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Cr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(Bo,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)}},hE=(0,l.curry)(((e,t,r,n,i)=>{const a=jr(n,l.__,t.type),o=e?uE:lE,s=jr(n,l.__,r.type),u=e?lE:uE;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),bE=(e,t,r)=>{const n=e?uE:lE,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(jr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function OE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vE(e,t,r[t])}))}return e}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{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return OE({},t,{[r]:{parents:n,children:i}})},_E=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return OE({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},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=Qf(t,i),o=gE({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)},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)(zT(),n),a=t?_E({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(nE(),n),s=mt(o)?[o]:[],u=gE({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>NE(t,r,[i],e)),u)}),n)},PE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return AE(r,e,t,NE(e,t))},RE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return PE(t,r,n);if(vt(e)){const t=cE(n,e);return t&&AE([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))))},wE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>wE(e,t))))},IE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=Ot(t),u=PE(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=cE(i,c),!s)return null;o.push({type:ve.relationConnection,value:s,valueType:ci(a,(0,l.path)(ZT(),s))});continue}if(vt(u)){const e=n[c];if(!e)return null;o.push({type:ve.tempEntity,value:e,valueType:Cr(a,e.type)});continue}const p=n[u],d=js(p,c),y=n[c];if(!d||!y)return null;o.push({type:ve.attributeValue,value:d,valueType:ar(a,Ut(d.uri,p.type))}),o.push({type:ve.tempEntity,value:y,valueType:Cr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},wE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=vt(s),d=p?pE(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?ci(a,d.type):Cr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:or(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:ve.tempEntity,value:T,valueType:Cr(a,T.type)}),o.push({type:ve.attributeValue,value:s,valueType:E}),m=s.value;const l=Es(s);T=l&&mt(l)?n[l]:null}}return o},UE=e=>e.every((e=>{let{type:t}=e;return[ve.attributeValue,ve.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===ve.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,CE=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(CE(e))}))}))),t},LE=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(ME,t),(0,l.propOr)([],"crosswalks",e))),e),jE=(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(jE(e))}))})),r},DE=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=DE(e);r>t&&(t=r)}))})),t+1):t},kE=(e,t)=>{if(mt(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},ME=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},FE=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},xE=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},$E=(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)},VE=(0,l.eqBy)(ME),GE=(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)(cs,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e))));function WE(e){return e&&void 0!==e.uri}function YE(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function BE(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function qE(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(qE(d.value,y.value,r)):"Reference"===g(d)?BE(d,y)?o.push.apply(o,qE(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 HE(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)||WE(r)&&WE(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function QE(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 KE(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var n="configuration/sources/Reltio",i="configuration/sources/ReltioCleanser";function a(e,t){return e.crosswalk={type:t.type,value:t.value},e}function o(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function s(e){return e.removeIt=!0}var l=e.map((function(e){if(e.crosswalk)return[e];var o=JE(t,e.uri),s=o.filter((function(e){return e.type===n})),l=o.filter((function(e){return e.type!==n})),u=[];switch(e.type){case"INSERT_ATTRIBUTE":u.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":u=u.concat(o.map((function(t){return a(e,t)})));break;case"DELETE_ATTRIBUTE":(l.length||0==s.length)&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),u=u.concat(s.map((function(t){return a({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":{const o=l.some((e=>{let{type:t}=e;return t===i}))&&r?XE(r,t,e.uri):null;if(o||s.length){if(s.length)u=u.concat(s.map((function(t){return a({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)})));else if(o){var c=JE(t,o.uri).filter((e=>{let{type:t}=e;return t===n}));u=u.concat(c.map((t=>a({type:"UPDATE_ATTRIBUTE",uri:o.uri,newValue:e.newValue},t))))}}else u.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});l.length&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}});break}}return u})),u=[].concat.apply([],l),c=o(u,"typeUri");for(var p in c)if("undefined"!==p){var d=c[p],y=u.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===p||"INSERT_ATTRIBUTE"===e.type&&e.uri===p})),f=d.filter((function(e){return e.crosswalk&&e.crosswalk.type===n}))[0],T=y.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0];!T&&f&&(u.push({type:"UPDATE_ATTRIBUTE",uri:f.uri,newValue:{value:f.value},crosswalk:f.crosswalk}),y.forEach(s)),d.forEach(s)}return(u=u.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),u}const JE=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),XE=(e,t,r)=>(0,l.pipe)(Ds,(0,l.defaultTo)([]),(0,l.reject)((0,l.propEq)("uri",r)),(0,l.ifElse)((0,l.allPass)([e=>1===e.length,e=>{let[r]=e;return kE(t,r)},e=>{let[t]=e;return!os(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function zE(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 ZE(e,t){return YE("UPDATE_TAGS").call(this,e,t)}function em(e,t){return YE("UPDATE_ROLES").call(this,e,t)}function tm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rm(e,t,r[t])}))}return e}function rm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nm=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=tm({},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:tm({},n,{roles:s,tags:u}),roles:i,tags:l}}}};const im=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?im(t.value):[]];return e.concat(r)}),[])),am=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,om=e=>e?[Ud(e)]:[],sm=e=>{const t=[...im((null==e?void 0:e.attributes)||[]),...im((null==e?void 0:e.analyticsAttributes)||[])];return e?[...om(e),...t]:[]},lm=(e,t)=>[e,...t.map((t=>am(e,t)))],um=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return HT(t)}))},cm=(e,t)=>{switch(e){case ge.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case ge.ENTITY_ATTRIBUTE:case ge.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Ct(t)]})(t);case ge.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case ge.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,Ud({uri:n,dataTenant:i}),r]})(t)}},pm=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),dm=(0,l.curry)(((e,t)=>{const r=To(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(dm(e,r.extendsTypeURI)):n})),ym=(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))),fm=(e,t)=>(0,l.pipe)((0,l.prop)("type"),dm(e),ym(t))(t);function Tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Em=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}},mm=e=>!e.deactivated,hm=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},bm=e=>hm(e)+e.message,Om=(0,l.unless)(l.isNil,(0,l.prop)("message")),vm=(0,l.unless)(l.isNil,(0,l.prop)("type")),gm=(0,l.curry)(((e,t)=>At(t.parentUri,e))),_m=(0,l.curry)(((e,t)=>t.parentUri===e)),Nm=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),At(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",Ze.TYPE_REFERENCE),(0,l.pipe)(it,(0,l.any)(At(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),Am=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),Pm=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),Rm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([Dm,mm,gm(e),Nm(t),(0,l.complement)(Pm(e,t.uri))]))(r)},Sm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([Dm,mm,_m(e),Am(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",me.missed))]))(r);return n&&n.message||""},wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===me.missed))},Im=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(zT(),e))]))(t)},Um=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},Cm=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([mm,gm(t)]))(r)},Lm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},jm=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?IE(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case ve.attributeValue:{const e=a;if(Kt(a))return pd(o,e.dataLabelPattern);if(Jt(a)){const t=o,i=Es(t),a=rt(e),s=Cr(n,a);return mt(i)?pd(r[i],s.dataLabelPattern):t.label}return""}case ve.tempEntity:return pd(o,a.dataLabelPattern);case ve.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Cr(n,null==e?void 0:e.entityType);return`${yd(i&&mt(i)?pd(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||pi(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){Tm(e,t,r[t])}))}return e}({},e,{label:yd(t)})}))},Dm=e=>!e.severity||e.severity===be.ERROR,km=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case Ze.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(km(n))}));case Ze.TYPE_REFERENCE:return!!us(t);case Ze.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),Mm=(e,t)=>e.every((0,l.complement)(km(t))),Fm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=bo(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=vs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!os(e.parent))))).forEach((e=>{Mm(e.attrValues,n)&&r.push(Em({type:me.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:rn().text("Attribute is required"),source:he.local}))})),r}),[])},xm=(0,l.curry)(((e,t,r)=>vs(e,t,r,!1))),$m=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Cr(e),(0,l.prop)("attributes"),(0,l.defaultTo)([]),(0,l.reject)(Ht),(0,l.filter)(Jt),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(xm(e,t)));return(0,l.pipe)(r,(0,l.reject)(Es),(0,l.map)((e=>{let{uri:r}=e;return Em({type:me.missedRefEntity,uri:"",attributeTypeUri:Ut(r,t.type),parentUri:r,message:rn().text("Entity is required"),source:he.local})})))(t)},Vm=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Es,mt)).flatMap((n=>{const i=Es(n),a=t[i],o=ar(e,Ut(n.uri,r.type));return Gm(e,t,o,a)})),Gm=(e,t,r,n)=>{const i=it(r),a=i.map((t=>ar(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",Ze.TYPE_REFERENCE))).flatMap(ot).concat(i);return Wm(e,t,n,(e=>a.some(At(e.uri))))},Wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=Fm(e,r,n),a=$m(e,r),o=Vm(e,t,r);return[...i,...a,...o]},Ym=(e,t)=>{const r=(0,l.path)(eE(),t)||{};return Fm(e,r)},Bm=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(nE()),(0,l.ifElse)(mt,(e=>t[e]),(0,l.always)(null)))(r),i=Ym(e,r),a=(e=>(0,l.path)(nE(),e)?[]:[Em({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(ZT(),e),parentUri:(0,l.path)(zT(),e),message:rn().text("Entity is required"),source:he.local})])(r),o=((e,t,r)=>r?Wm(e,t,r):[])(e,t,n);return[...i,...a,...o]},qm=e=>(0,l.path)(["entity","uri"],e)?[]:[Em({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:rn().text("Entity is required"),source:he.local})],Hm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=Fm(e,r),i=qm(t);return[...n,...i]};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=(e,t)=>{var r,n;const i=Cr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||Ya(e)},Jm=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),Xm=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(Jm(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},zm=(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)(ms,mt,l.not)]),(e=>{const t=(0,l.pipe)(ms,Rt)(e);return Xm((e=>e.replace(t,t+dt)))(e)})),(0,l.when)((0,l.pipe)(Es,mt),(t=>{const r=Es(t),n=e[r],i=n&&eh(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){Qm(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),Zm=(e,t,r)=>KE(qE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),zE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(zm(r,e.type)),(0,l.map)(Xm(Mt))))})(e))).concat(lT(e,t)),eh=(e,t)=>(0,l.evolve)({attributes:El({valueTransformer:(0,l.pipe)(Os,zm(t),Jm(Mt)),deleteEmptyComplex:!0}),uri:Mt})(e);function th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rh(e,t,r[t])}))}return e}function rh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nh=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(pt,"g"),"uri$$$$").replace(new RegExp(dt,"g"),""))),ih=e=>(0,l.pipe)((0,l.evolve)({objectUri:nh,objectParentUri:nh}),(e=>{return th({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?me.missed:me.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&kt(e.objectUri),uri:e.objectUri,source:he.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),ah=(e,t)=>(0,l.map)((0,l.pipe)(ih,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=jm(t,s),p=null!=c&&c.length?c.slice(0,-1):jm(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===ve.attributeValue&&(a=e.valueType)}return a})(o,c,e);return th({},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&&Dt(i)){const n=(0,l.last)(a),i=n.valueType;if(Jt(i)&&st(i).includes(o)){const i=Es(n.value),o=i&&mt(i)?t[i]:null;return o?th({},e,{parentUri:o.uri,path:a.concat({type:ve.tempEntity,value:o,valueType:Cr(r,o.type),label:""})}):e}}return e}})(t)))(e),oh=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};var sh,lh=r(33164);function uh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(sh||(sh={}));const ch={},ph={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"]}},dh=(0,l.curry)(((e,t)=>{const r=(e=>{if(!ch[e]){const t=ph[e]||ph.random0;ch[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){uh(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return ch[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]})),yh=e=>dh(sh.Charts,e),fh=e=>dh(sh.Random1,e),Th=e=>(0,lh.getColor)(e)?"#FFFFFF":"#212121";var Eh=r(73116);const mh=Array.from({length:100},((e,t)=>t/100)),hh=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)},bh={},Oh=new Eh.Z({hash:hh,saturation:mh.slice(15,71),lightness:mh.slice(50,90)}),vh=new Eh.Z({hash:hh,saturation:mh.slice(46,89),lightness:mh.slice(44,58)}),gh=(0,l.curry)(((e,t,r)=>{t in bh||(bh[t]={});const n=bh[t];r in n||(n[r]=((e,t)=>{const r=String(hh(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),_h=gh(Oh,"crosswalks"),Nh=gh(Oh,"sources"),Ah=gh(Oh,"contributors"),Ph=gh(Oh,"dataValidationFunctions"),Rh=gh(vh,"entities");function Sh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wh(e,t,r[t])}))}return e}function wh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ih=(0,l.has)("items"),Uh=e=>0===e,Ch=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)},Lh=e=>e.reduce(((e,t)=>e+t.width),0),jh=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Dh=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),kh=e=>e.reduce(((e,t)=>e+t.height),0),Mh=e=>(0,l.is)(String,e)&&e.includes("%"),Fh=e=>Boolean(e.spacer),xh=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),$h=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Ih(t)?$h(t):t)),[]),Vh=e=>({id:e.layout}),Gh=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Vh;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=Mh(r.width)?xh(i,r.width):u}return Ch(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return Ch(n,t,r)},o=(e,t)=>Ih(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,Ih(s)?n(s.layout):e(s.view)),d=Uh(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(Ih(s))return o.concat(p(Sh({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(Sh({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Lh(o),height:jh(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Ih(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=Uh(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Ih(i))return r.concat(p(Sh({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(Sh({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?Ch(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?Ch(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Dh(i),height:kh(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=Uh(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return Sh({},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=Sh({},e,{width:a}),s=Sh({},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(Sh({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return Sh({},e,{height:kh(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(Sh({},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 Sh({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=Sh({},t,{items:(0,l.reject)(Fh,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 $h(f)},Wh=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),Yh=[Ge.FilteredEntitiesViewFacet,Ge.ActivitiesViewFacet,Ge.ProfileStatsFacet,Ge.FilteredSavedSearchesFacet],Bh=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=Yh.includes(a.component)?8:4;return Sh({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function qh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(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}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={BarChart:Ve.BAR,BarChartGrouped:Ve.BAR,BarChartHorizontal:Ve.BAR,LineChart:Ve.LINE,Map:Ve.MAP,Pie:Ve.PIE},Kh=(e,t)=>Lt(e)?wt(e,t):e,Jh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=Qh[r];return qh({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Xh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return qh({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"]))},zh=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return qh({},e,{value:[Wr,Yr,$r.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:qr(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Lt(t)||!r?n:(n||[]).concat((i=r,{filter:$r.EQUALS,fieldName:"type",values:[i]}));var i},Zh=["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"],eb={"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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.BAR,component:Ge.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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.BUBBLE,component:Ge.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:Ge.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 qh({id:t,count:o,canRead:u,orderType:s,attributeUri:Kh(r,p),filters:zh(a,r,p),component:Ge.DashboardFacet,title:i,showOthers:!0},Jh(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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.MAP,component:Ge.DashboardFacet,title:i,geoUrl:Zh[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 qh({id:t,count:o,canRead:l,attributeUri:Kh(n,r),filters:zh(a,n,r),component:Ge.DashboardFacet,title:i,geoUrl:s,chartType:Ve.MAP,projection:"geoMercator"},Jh(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.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:Xh(i),component:Ge.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:zh(n,null,a),component:Ge.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:$r.GTE,fieldName:"matches",values:["1"]}],component:Ge.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:Ge.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:Ve.CLOUD,component:Ge.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:Ve.TREE,component:Ge.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.NotificationInboxFacet,title:n||rn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.ActivitiesViewFacet,title:n||rn().text("Activity log")}}},tb=e=>({id:e,height:10}),rb=(0,l.pipe)((0,l.map)((e=>{const t=eb[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),nb=e=>{if("0.1"===e.version){const t=rb(e.views),r=Gh(tb,e.layout,{columns:4});return{id:e.id,margin:0,layout:Wh(r,t),views:t}}return e},ib=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=>ib(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);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=ab({},We,{OldMap:"com.reltio.plugins.entity.EntityMapView",OldTree:"com.reltio.plugins.entity.TreeView"}),lb=e=>e,ub={[sb.Attributes]:lb,[sb.HierarchyTree]:lb,[sb.HierarchyPaths]:lb,[sb.RelationsTable]:lb,[sb.Relations]:e=>ab({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[sb.SingleAttribute]:lb,[sb.Custom]:lb,[sb.AttributeTable]:lb,[sb.Map]:lb,[sb.OldTree]:e=>ab({},e,{class:We.HierarchyTree}),[sb.OldMap]:e=>ab({},e,{class:We.Map}),[sb.ImageAttribute]:lb,[sb.PotentialMatches]:lb},cb=(0,l.pipe)((0,l.map)((e=>{const t=ub[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),pb=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===We.Map?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),db=(e,t)=>(t||[]).map((t=>ab({},t,pb(e,t.id)))),yb=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return ab({},t,{layout:db(t.views,e.newLayout)});if("0.1"===e.version){const r=cb(e.views),n=Gh(pb(r),e.layout,{columns:4});return ab({},t,{layout:Wh(n,r),views:r})}return e},fb=(e,t)=>e.class===t||e["react-class"]===t,Tb=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(fb(t,We.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 fb(t,We.SingleAttribute)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.some(At(n))||t.some(At(n))}},Eb=(e,t)=>e.filter((e=>t.some((t=>fb(e,t))))).map((e=>{let{id:t}=e;return t})),mb=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},hb=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),bb=e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e);function Ob(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vb(e,t,r[t])}))}return e}function vb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gb=(0,l.curry)(((e,t)=>ib(t).map((t=>(0,l.pipe)((0,l.map)((e=>mb(e,t))),(0,l.reject)(l.isNil),l.head)(e))))),_b=(0,l.either)((0,l.propEq)("label","D&B Connector"),(0,l.propEq)("label","D&B Connector")),Nb=(0,l.propEq)("class",We.Custom),Ab=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Pb=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];let i;if("2.0"===r&&t.newLayout){const{newLayout:r}=t,a=db(t.views,r);return i=(0,l.when)((0,l.pipe)(l.head,(0,l.is)(String)),(0,l.pipe)((0,l.map)((t=>(0,l.pipe)((0,l.map)((e=>mb(e,t))),(0,l.reject)(l.isNil),l.head)(e))),(e=>[{id:"common",views:e}])))(t.sidePanelViews),(0,l.pipe)((0,l.pick)(["views","profileBand","workflow"]),(0,l.mergeRight)({entityType:n,layout:a,sidePanelViews:i}),(0,l.reject)(l.isNil))(t)}const a=gb(e,t.layout);i=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>mb(e,t.side))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("layout"))(e),[n,i]=(0,l.partition)(_b,null==r?void 0:r.items),a=(0,l.pipe)(gb(e),(0,l.filter)(Nb))(Ob({},r,{items:n})),o=[{id:"common",views:gb(e,Ob({},r,{items:i}))}];return a.length>0&&o.push({id:"D&B",views:a}),o}})(e,t);const o=(e=>(0,l.pipe)((0,l.chain)((e=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.entity.side.WorkflowsView"===e.class))})(e))),l.head,(0,l.unless)(l.isNil,(0,l.pick)(["showClosedTasks","assignee","processTypes"])))(e))(e),s=yb(Ob({},t,{views:a,version:"0.1"})),u=(0,l.pipe)(bb,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:s.views,layout:s.layout,sidePanelViews:i,profileBand:u,workflow:o})},Rb=(e,t)=>{if("scroll"===t.layout.layout){const r=gb(e,t.layout),n=nb(Ob({},t,{views:r,version:"0.1"}));return{class:Be.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:Be.Dashboard,views:t.views,layout:t.layout,id:t.id}},Sb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},wb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Ib=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Ub=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Cb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Lb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},jb=(e,t)=>{const r=gb(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=hb(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:Be.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"],tabs:r.tabs}},Db=(e,t)=>({class:Be.Graph,id:t.id}),kb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},Mb=e=>t=>!!(0,l.intersection)(e,t).length,Fb=(0,l.cond)([[Mb(["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"]),()=>Rb],[Mb(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Sb],[Mb(["com.reltio.plugins.graph.GraphView"]),()=>Db],[Mb(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>wb],[Mb(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Ib],[Mb(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Ub],[Mb(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>Cb],[Mb(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Lb],[Mb(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>jb],[Mb(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>kb],[l.T,()=>(0,l.always)(void 0)]]),xb=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(Ab),(0,l.map)((t=>Pb(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand","workflow"])))(e);return{class:Be.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:qe.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:qe.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n||"com.reltio.plugins.newDashboard.NewDashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>mb(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",Be.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>mb(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;if(i.entityPerspectiveId)return((e,t,r)=>{const n=Pb(e,r),i=(0,l.pipe)((0,l.propOr)([],"entity-types"),(0,l.map)((e=>[e,n])),l.fromPairs)(t);return{class:Be.NestedProfile,id:t.id,entityTypes:i}})(t,e,i);const a=ib(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 Fb(o)(t,i)};function $b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vb(e,t,r[t])}))}return e}function Vb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Gb=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))},Wb="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Yb;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Yb||(Yb={}));const Bb={[Be.DQDashboard]:`${Wb}DqDashboard.svg`,[Be.Dashboard]:`${Wb}Dashboard.svg`,[Be.Graph]:`${Wb}Graph.svg`,[Be.RelationshipSearch]:`${Wb}GraphSearch.svg`,[Be.Interactions]:`${Wb}Interactions.svg`,[Be.PotentialMatches]:`${Wb}PotentialMatches.svg`,[Be.Profile]:`${Wb}Profile.svg`,[Be.NestedProfile]:`${Wb}Profile.svg`,[Be.ProfileActivityLog]:`${Wb}ActivityLog.svg`,[Be.Relationships]:`${Wb}Relationships.svg`,[Be.Sources]:`${Wb}Crosswalk.svg`,[Be.Search]:`${Wb}Search.svg`,[Yb.DashboardGroup]:`${Wb}DashboardGroup.svg`,[Yb.ProfileGroup]:`${Wb}ProfileGroup.svg`,[Yb.SearchGroup]:`${Wb}SearchGroup.svg`,DEFAULT:`${Wb}Default.svg`},qb=e=>Bb[null==e?void 0:e.class]||Bb.DEFAULT,Hb=(0,l.pipe)((0,l.pluck)("screen"),(0,l.filter)((0,l.anyPass)([(0,l.propEq)("class",Be.NestedProfile)])),(0,l.groupBy)((0,l.prop)("class")),(0,l.map)((e=>e.map(((e,t)=>$b({},e,{nestedRoute:`${t+1}`})))))),Qb=(e,t)=>{var r;return(null===(r=e[t.class])||void 0===r?void 0:r.find((0,l.propEq)("id",t.id)))||t},Kb=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Bb[Yb.ProfileGroup]:null,Jb=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Bb[Be.Dashboard]||t===Bb[Be.DQDashboard]})),(0,l.always)(Bb[Yb.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Bb[Be.Search]||t===Bb[Be.RelationshipSearch]})),(0,l.always)(Bb[Yb.SearchGroup])],[l.T,()=>null]])(e),Xb=e=>(0,l.pipe)((0,l.chain)(Gb),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>{const r=(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>$b({},e,{entityTypes:e["entity-types"],screen:xb(e,t)}))),(0,l.filter)((e=>e.screen)))(t),n=Hb(r);return(0,l.map)((e=>{let{label:t,screen:r,canRead:i,entityTypes:a}=e;return{label:t,icon:qb(r),screen:Qb(n,r),canRead:i,entityTypes:a}}))(r)})(t,e),n=xb(t,e);return{label:t.label,icon:Kb(t)||Jb(r)||qb(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));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=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},eO=e=>({id:e,height:10}),tO=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)(Zb),(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=rb(((e,t)=>{const r=ib(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){zb(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Gh(eO,t.layout,{columns:4});return{views:r,layout:Wh(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function rO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nO=(0,l.curry)(((e,t)=>(0,l.pipe)((e=>((e,t)=>(e||[]).find((e=>"com.reltio.plugins.ui.Activator"===e.activator)))(e)),(0,l.prop)(e))(t))),iO=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,aO=e=>(0,l.pipe)((e=>hb(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){rO(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),oO=(0,l.unless)((e=>!!e&&(e.startsWith("http:")||e.startsWith("https:"))),(0,l.always)(null)),sO=(0,l.pipe)(nO("top-logo"),oO),lO=(0,l.prop)("showLookupCode"),uO=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(e=>{let{workflowPath:t,enabled:r}=e;return{enabled:r,path:t}}))(e))(e),p=(e=>(0,l.pipe)(nO("default-perspective"),(0,l.ifElse)(iO,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),d=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.AttributesSorting"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("strategy"))(e))(e),y=aO(e),f=(e=>nO("checkUser",e))(e),T=(e=>nO("checkIdle",e))(e),E=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),m=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e),h=void 0===(b=lO(m))||b;var b;const O=null===(t=bb(e))||void 0===t?void 0:t.showEntityId,v=(e=>nO("preview",e))(e),g=sO(e),_=(e=>nO("topBackgroundColor",e))(e),N=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.framework.util.DateMask"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(e=>{let{dateMask:t,dateTimeMask:r}=e;return{dateMask:t,dateTimeMask:r}}),(0,l.reject)(l.isNil))(e))(e);return{i18n:s,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:h},validate:{levels:a,validateReadMode:o},masks:0===Object.keys(N).length?void 0:N,attributePresentations:u,attributesSorting:d,workflow:c,defaultRoute:p,customScripts:y,checkUser:f,checkIdle:T,showSwitchToClassic:E,showEntityId:O,preview:v,logo:g,headerColor:_}},cO=e=>({layout:Xb(e),pivoting:tO(e),properties:uO(e)});var pO=r(58697),dO=r.n(pO);function yO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fO(e,t,r[t])}))}return e}function fO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const TO=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}_${dO()()}`;return n[e.id].push(t),i=!0,yO({},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]++,yO({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};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){mO(e,t,r[t])}))}return e}function mO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let hO={};const bO=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=X(`${r.id}: ${r.action.files.join('","')}`);if(E(hO[a])){try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}hO=EO({},hO,{[a]:EO({},hO[a]||{},{worker:i})})}else i=hO[a].worker,hO[a].innerText&&t({task:{action:Je.SET_HTML,params:{html:hO[a].innerText}},worker:i,config:r}),i.removeEventListener("message",hO[a].onWorkerMessage);return i&&(hO[a].onWorkerMessage=e=>{if("loaded"!==e.data.action){const n=JSON.parse(e.data);t({task:n,worker:i,config:r}),"setHtml"!==n.action||n.params.id||(hO[a].innerText=n.params.html)}},i.addEventListener("message",hO[a].onWorkerMessage)),i},OO=(0,l.curry)(((e,t)=>!e||!e.availableEntityTypes||!t||e.availableEntityTypes.includes(t))),vO=(0,l.flip)(OO),gO=(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=rn().number(t));return t})),_O=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?rn().number(e,"0,0.0a").toUpperCase():rn().number(e,"0,0"):""},NO=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let AO=!0;const PO=e=>AO=e,RO=(e,t)=>e!==t&&t?AO&&e?`${t} (${e})`:t:e,SO=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),wO=(e,t,r)=>{const n=SO(e,t,r);return RO(r,n)},IO=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),UO=(0,l.complement)(IO),CO=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),LO=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)},jO=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(UO(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),DO=(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 Ze.TYPE_NUMBER:case Ze.TYPE_FLOAT:case Ze.TYPE_DOUBLE:case Ze.TYPE_LONG:case Ze.TYPE_INT:case Ze.TYPE_COUNT:return t&&gO(o,t);case Ze.TYPE_BOOLEAN:case Ze.TYPE_BOOLEAN_RADIO:case Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t=t,(0,l.isNil)(t)?t:le(t)?rn().text("Yes"):rn().text("No");case Ze.TYPE_DATE:return(0,l.is)(Number,t)&&(t=N(Number(t)).getTime()),(t=t)&&(Cu(t)?Lu(t):rn().date(t,s));case Ze.TYPE_ACTIVENESS_DATE:case Ze.TYPE_LOCAL_DATE:return(t=t)&&(Cu(t)?Lu(t):rn().date(t,s));case Ze.TYPE_TIMESTAMP:return(t=t)&&(Cu(t)?Lu(t):rn().date(isNaN(t)?t:Number(t),u));case Ze.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case Ze.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case Ze.TYPE_DOLLAR:return t=t,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?RO((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),kO={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)"},MO=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()}},FO=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})))),xO=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),MO,FO);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}},$O="__metadata",VO=(e=>{const t=[$O,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),GO=(0,l.set)(VO),WO=(0,l.view)(VO),YO=GO(Xr.NEW),BO=GO(Xr.REMOVED),qO=GO(Xr.EDITED),HO=GO(Xr.IGNORED),QO=(0,l.pipe)(WO,(0,l.equals)(Xr.REMOVED)),KO=(0,l.pipe)(WO,(0,l.equals)(Xr.NEW)),JO=(0,l.pipe)(WO,(0,l.equals)(Xr.EDITED)),XO=(0,l.pipe)(WO,(0,l.complement)(l.isNil)),zO=(0,l.pipe)(WO,(0,l.equals)(Xr.IGNORED)),ZO=(0,l.omit)([$O]),ev=(e,t)=>e===$O?void 0:t;function tv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rv=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=rv(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},nv=(e,t)=>rv((0,l.propEq)("nodeId",t),e),iv=(e,t)=>rv((0,l.pathEq)(["entity","uri"],t),e),av=(e,t)=>{const r=nv(e,t);return r.length>1?r[r.length-2]:null},ov=(e,t)=>{const r=nv(e,t);return r.length>0?r[r.length-1]:null},sv=(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=>sv(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},lv=()=>{},uv=(e,t)=>{let{parent:r,nodeProcessing:n=lv}=t;n(e,r),e.children&&e.children.forEach((t=>uv(t,{parent:e,nodeProcessing:n})))},cv=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ue.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 Ue.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 Ue.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){tv(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})}}},pv=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&&uv(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ue.addingChild||r.editingMode===Ue.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=cv({node:r,connection:n,isReversed:i}),s=fT({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ue.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=cv({node:r,isReversed:i,connection:n}),l=s?hT({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):mT({oldRelation:e,newRelation:a});t.push(l)}}})})),t},dv=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=dv(r,t);if(e)return e}return!1},yv=(0,l.curry)(((e,t)=>{const r=(0,l.map)(yv(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),fv=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>dv(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:yv(e,n.root)}}));return(0,l.pipe)(r,n)(t)},Tv={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},Ev={asc:"asc",desc:"desc"},mv=Tv.entityLabel,hv=Ev.asc,bv=(0,l.always)(0),Ov=e=>{let{sortField:t=mv,sortOrder:r=hv,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case Tv.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return GN.strings.sort(t,a,o)})(n,r);case Tv.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return GN.strings.sort(e,i,a)})(r);default:return bv}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},vv=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(Ev)),l.identity,(0,l.always)(hv))),gv=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(Tv)),l.identity,(0,l.always)(mv)));var _v=r(91104);let Nv;const Av=(e,t)=>(Nv||(Nv=_v.createClient({key:t})),new Promise((t=>{Nv.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)}))}))),Pv=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},Rv=(e,t)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(os).flatMap((e=>{let r;return e.type==t&&(r=[Pv(e)]),(0,l.is)(Object,e.value)&&(r=(r||[]).concat(Rv(e.value,t))),r})),Sv=e=>e&&e.length>0,wv=(e,t)=>[].concat(e&&e.attributes?Rv(e.attributes,t):[]).filter(l.identity);function Iv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uv=(e,t,r,n,i,a)=>{if(e&&e.type){const t=Cr(r,e.type);n&&(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Iv(e,t,r[t])}))}return e}({},e,{attributes:{[i]:[n]}}));const a=(t.geoLocationAttributes||[]).map((t=>{return r=wv(e,t.latitude),n=wv(e,t.longitude),Sv(r)&&Sv(n)&&(0,l.zipWith)(((e,t)=>({lat:Number(e),lng:Number(t)})),r,n);var r,n})).filter(l.identity);if(a.length>0)return Promise.resolve(a[0])}const o=t.GeoLocation;if(o){const e=o.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(Sv(t)&&t[0].value&&Sv(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?Av(n.label,a).catch((()=>null)):Promise.resolve(null)},Cv=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=Cr(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>[e,t.attributes[e]])).filter((e=>{let[,t]=e;return t})).flatMap((e=>{let[r,n]=e;return n.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e,name:r})))})));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s,name:u}=t;return Uv(a,o,e,s,u,r).then((e=>!e&&a.label&&""!==a.label?Av(a.label,r).catch((()=>null)):e)).then((e=>ne(e).filter(l.identity).map((e=>({id:e.id||n,label:i,entity:a,point:e}))))).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},Lv=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=Cr(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=wv(t,r.latitude),n=wv(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))},jv=(e,t,r)=>Promise.all([Lv(e,t),Cv(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lng===e.point.lng))))]}));function Dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kv(e,t,r[t])}))}return e}function kv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mv=(e,t)=>t.values.map(io(e,t.entityTypeUri)),Fv=(e,t,r)=>qs(t.fieldName,r)||ar(e,wt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),xv=(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?RO(e,t):e}),r)},$v=(0,l.path)(["attrType","label"]),Vv=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>Dv({},e,{[t]:!0})),{});e[r]=e[r]?Dv({},e[r],n):n}return e}),{}),Gv=(0,l.pipe)((0,l.prop)("values"),E),Wv=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",En.type.name)),Yv=e=>e.type===Hv.NUMERIC_RANGE_FACET,Bv=e=>e.type===Hv.DATE_RANGE_FACET,qv=(0,l.either)(Yv,Bv),Hv={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},Qv=e=>{switch(null==e?void 0:e.name){case En.type.name:return Hv.ENTITY_TYPE_FACET;case En.createdBy.name:case En.updatedBy.name:case En.sourceSystems.name:case En.tags.name:case En.roles.name:case En.matchRules.name:case En.MLRecommendedMatch.name:return Hv.WITH_DROPDOWN_CHECKBOXES_FACET;case En.createdTime.name:case En.updatedTime.name:case En.startDate.name:case En.endDate.name:return Hv.DATE_RANGE_FACET;case En.matches.name:case En.matchScore.name:return Hv.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return Hv.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return Hv.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return Hv.DATE_RANGE_FACET;default:return Hv.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},Kv=(0,l.pipe)(Fv,Qv),Jv=(0,l.pipe)((0,l.path)(["attrType","type"]),Tr),Xv=(0,l.cond)([[Yv,(0,l.always)($r.IN_RANGE)],[Bv,(0,l.always)($r.WITHIN)],[(0,l.allPass)([Jv,e=>e.values.length>=2]),(0,l.always)($r.EXISTS)],[l.T,(0,l.always)($r.EQUALS)]]),zv=(0,l.cond)([[Bv,(0,l.prop)("values")],[Yv,(0,l.prop)("values")],[Jv,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 Zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eg=(0,l.pipe)((0,l.path)(["attrType","type"]),ur),tg=(0,l.pipe)((0,l.path)(["attrType","type"]),dr),rg=(0,l.pipe)((0,l.prop)("attrType"),Qs),ng=(0,l.pipe)((0,l.prop)("attrType"),Hs),ig=e=>t=>t.values.map((t=>Cr(e,t).label)).join(" , "),ag=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),og=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(rn().number),ag)),(0,l.join)(","))(e.values);return`${$v(e)}: ${t}`},sg=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),ag)),(0,l.join)(","))(e.values);return`${$v(e)}: ${t}`},lg=e=>t=>`${$v(t)}: ${Mv(e,t).join(", ")}`,ug=e=>t=>{const r=xv(e,t);return`${$v(t)}: ${r.join(", ")}`},cg=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[ng,ig(e)],[tg,og],[eg,sg],[rg,lg(e)],[l.T,ug(t)]]),r))),pg=(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){Zv(e,t,r[t])}))}return e}({},t,{attrType:Fv(e,t,n)}))),cg(e,r))(t),dg=new RegExp(`^${rn().text("Search")}`),yg=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...pg(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(dg,"",u)]},fg=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(Kr),Tg=e=>(e=>fg.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]=Du(t);return e.replace(r,i).replace(n,a)}),e))(e),Eg=(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}`})),mg={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},hg=e=>[mg.geoPolygon,mg.onMapMove].includes(e),bg=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},Og=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},vg=(e,t)=>hg(e)?t.map(bg):[Og(t)],gg=e=>hg(e)?rn().text("Geo Polygon"):rn().text("Geo Location"),_g=e=>{switch(e){case mg.geoLocation:return"geoLocation";case mg.geoPolygon:case mg.onMapMove:return"geoPolygon"}},Ng={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},Ag=e=>rn().text(e),Pg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[$r.EQUALS]:"=",[$r.NOT_EQUALS]:"≠",[$r.STARTS_WITH]:"*",[$r.MISSING_VALUE]:rn().text("missing value"),[$r.HAS_ALL]:rn().text("has all"),[$r.IN_RANGE]:rn().text("in range"),[$r.FULL_TEXT]:rn().text("full text"),[$r.EXISTS]:rn().text("exists"),[$r.COUNT_EQUALS]:`${rn().text("count")} =`,[$r.COUNT_NOT_EQUALS]:`${rn().text("count")} ≠`,[$r.COUNT_LT]:`${rn().text("count")} <`,[$r.COUNT_LTE]:`${rn().text("count")} <=`,[$r.COUNT_GT]:`${rn().text("count")} >`,[$r.COUNT_RANGE]:rn().text("count range"),[$r.LT]:"<",[$r.LTE]:"<=",[$r.GT]:">",[$r.GTE]:">=",[$r.IN_FILE]:rn().text("in file"),[$r.NOT_IN_FILE]:rn().text("not in file"),[$r.CONTAINS]:"~",[Vr.LIST_EQUALS]:"=",[Vr.NOT_LIST_EQUALS]:"≠",[Vr.LIST_EQUALS_CASE_SENSITIVE]:"=",[Vr.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||rn().text(e.toLowerCase())},Rg=e=>({type:Ng.operator,text:e}),Sg=e=>({type:Ng.operator,text:Ag(e)}),wg=e=>({type:Ng.attributeLabel,text:e}),Ig=e=>({type:Ng.specialAttributeLabel,text:e}),Ug=e=>({type:Ng.attributeFilter,text:Pg(e)}),Cg=e=>({type:Ng.attributeValue,text:e}),Lg=e=>({type:Ng.entityTypeLabel,text:e}),jg=()=>({type:Ng.space,text:" "}),Dg=()=>({type:Ng.bracket,text:"("}),kg=()=>({type:Ng.bracket,text:")"}),Mg=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),Fg=(0,l.curry)(((e,t)=>t.map(Mg(e)))),xg=(0,l.curry)(((e,t,r)=>[e,...r,t])),$g=xg(Dg(),kg()),Vg=xg(jg(),jg()),Gg=(0,l.curry)(((e,t)=>[e,...t])),Wg=e=>Gg(Lg(e)),Yg=e=>Gg(Lg(`${e}: `)),Bg=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=du(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=cu(s),a=pu(s);!r&&t&&n&&(i.push(Dg()),r=!0),i.push(o),r&&a&&(i.push(kg()),r=!1);const l=e?Sg(s):Rg(s);i.push(...Vg([l]))}else i.push(o),r&&(i.push(kg()),r=!1)}return i}},qg=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),Hg=(0,l.pipe)(Bg({localizable:!1}),qg),Qg=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},Kg=e=>{let{data:t,values:r,filter:n}=e;return t&&ic({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},Jg=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(Kg)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Xg=(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)&&tr(e.data.attrType)})(e)&&[$r.HAS_ALL,$r.EQUALS,$r.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:er((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})))),LO),zg=(e,t)=>(0,l.pipe)(Xg,jO(t))(e),Zg=(0,l.pathEq)(["data","fieldName"],En.type.name),e_=(0,l.path)(["data","entityTypeUri"]),t_=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),r_=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(Qo(e)),attributes:(0,l.filter)((0,l.pipe)(e_,(0,l.anyPass)([l.isNil,Qo(e),r=>{const n=(t.entityTypes||[]).filter(Qo(e));return(n.length>1?Mr(e,n):null)===r&&!!Cr(e,r)}])))})(t))))),n_=e=>(0,l.pipe)((0,l.prop)("filter"),Xl,(0,l.equals)(e)),i_=(0,l.curry)(((e,t,r,n,i,a)=>{const o=qs(n.fieldName)||n.attrType,s=wu(o,i),u=DO({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>tr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?RO(a.lookupCode,a.value):wO(r,er(o),a)],[()=>Qs(s),()=>io(e,n.entityTypeUri,a)],[()=>Ks(s),()=>Ro(e,a)],[()=>tl(s),()=>Io(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>dr(c)||Tr(c)),Au),Cg)()})),a_=(e,t,r,n)=>{const i=i_(e,t,r,n.data,n.filter);return(0,l.cond)([[n_(0),(0,l.always)([])],[(0,l.both)(n_(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[jg(),i(r),{type:Ng.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[jg(),...(0,l.pipe)(l.flatten,(0,l.map)(i),Fg({type:Ng.punctuationMark,text:", "}))(t)]}]])(n)},o_=(e,t)=>{const r=!!qs(e.data.fieldName);return(0,l.pipe)(Qg,r?Ig:wg)(e,t)},s_=(e,t,r,n,i)=>[o_(n,i),jg(),Ug(n.filter),...a_(e,t,r,n)],l_=(0,l.addIndex)(l.map),u_=(0,l.propEq)("length",1),c_=(0,l.propSatisfies)((0,l.lt)(1),"length"),p_=(0,l.complement)(l.isEmpty),d_=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(Tu,(0,l.filter)(Kg),Eu,(0,l.map)((n=>({operand:s_(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Bg()))(n)},y_=(0,l.pipe)(d_,l.flatten),f_=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>jd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=d_(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(Wg),(0,l.pipe)(s(Yg),(0,l.unless)((()=>u_(u)||i),$g)))(u)},T_=(e,t,r,n)=>(0,l.pipe)(Tu,(0,l.filter)(Jg),Eu,l_(((n,i,a)=>({operand:f_(e,t,r,n,u_(a)),operator:n.operator}))),Bg(),l.flatten)(n),E_=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Bg(),l.flatten),m_=e=>{let{searchType:t,values:[r]}=e;return vg(t,r).join(", ")},h_=(e,t,r,n,i,a)=>{const o=(e=>e?[Ig(e.isRawFilter?rn().text("Raw filter"):rn().text("Search")),...Vg([Ug($r.EQUALS)]),Cg(`"${e.value}"`)]:[])(i),s=(e=>e?[Ig(gg(e.searchType)),jg(),Cg(m_(e))]:[])(a),u=(0,l.pipe)(T_,(0,l.when)((e=>c_(e)&&(p_(o)||p_(s))),$g))(e,t,r,n);return E_([o,s,u])},b_=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),O_=(0,l.pipe)(h_,b_),v_=(0,l.has)("attributes"),g_=Array.isArray,__=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),N_=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=A_(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)(__(a))),$g),(0,l.concat)(Vg([Rg(o)]))))(s)},A_=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return v_(n)?N_(e,t,r,n,i):g_(n)?n.reduce(((n,a)=>n.concat(A_(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Vg([Rg(n.operator)])))(s_(e,t,r,n,i))},P_=(e,t,r,n,i)=>(0,l.pipe)(A_,l.flatten)(e,t,r,n,i);function R_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){S_(e,t,r[t])}))}return e}function S_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const w_=(0,l.complement)(Zg),I_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Zg),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(e_),(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}},U_=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=I_(t);return(r||n)&&yu(t)},C_=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(U_)),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(Zg).some((0,l.propEq)("filter",$r.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}=I_(r);if(U_(e))t.push(R_({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(w_)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Zg,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(e_,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(w_),entityTypes:n,operator:i?a:e.operator,id:dO()()}}));t.push(...n)}var a;return t})(t))),[]))),L_={[$r.EQUALS]:$r.ON,[$r.IN_RANGE]:$r.WITHIN,[$r.GTE]:$r.AFTER,[$r.GT]:$r.AFTER,[$r.LTE]:$r.BEFORE,[$r.LT]:$r.BEFORE},j_=(0,l.curry)((e=>L_[e]||e)),D_=(0,l.curry)(((e,t)=>{switch(e){case $r.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case $r.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),k_=(0,l.pipe)((0,l.path)(["data","attrType","type"]),ur),M_=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>R_({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return k_(e)?(0,l.evolve)({filter:j_,values:D_(t)},e):e}))})))})),F_=(0,l.evolve)({values:(0,l.when)((0,l.pipe)((0,l.prop)(0),Uu),(0,l.map)(Du))}),x_=(0,l.map)((0,l.cond)([[k_,F_],[l.T,l.identity]])),$_=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),C_,r_(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")),x_)})),M_,(0,l.reject)(t_))(r)));function V_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){G_(e,t,r[t])}))}return e}function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W_=(e,t)=>({data:{uri:Lt(e.fieldName)?wt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||Xv(e),id:dO()(),values:zv(e)}),Y_=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=qs(a,t,r)||ar(e,i);if(!s)return null;if(Bt(s))return V_({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=jd(e,{type:o}),i=(ir(e,wt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return V_({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),B_=(0,l.curry)(((e,t,r,n)=>$_(Y_,e,n,t,r)));function q_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H_(e,t,r[t])}))}return e}function H_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q_=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},K_=e=>"rdmLookups.not.resolved"===e?En.notResolved.name:e,J_=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===Br?$r.IN_RANGE:qr(a),u=K_(n),c=qs(u)||ar(e,i),p=(0,l.cond)([[()=>tu(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>q_({},e,{filename:NO(e)}))))],[()=>Tr(null==c?void 0:c.type),(0,l.map)(le)],[e=>Zl(s)&&!Array.isArray(e[0])&&!ur(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:dO()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===Br?"and not":"and",filter:s,values:p}})),X_=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(J_(e,Mr(e,i)));return[{id:dO()(),operator:"or",attributes:a,entityTypes:i}]})),z_=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Z_=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([z_("from"),z_("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,()=>[]]]),eN=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return q_({},r,{values:Z_(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?Vs(e.fieldName,n):e.fieldName})},tN=(e,t)=>{if((0,l.has)("children")(e)){const r=eN(e,t);return e.children.reduce(((e,n)=>(e.push(tN(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return eN(e,t)},rN=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(eN(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(q_({fieldName:e.fieldName},eN(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(tN,l.flatten)],[l.T,eN]]),nN=(0,l.pipe)((0,l.map)(rN),l.flatten),iN=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},aN=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=X_(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:nN(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>q_({},t,{type:Kv(e,t)}))).map((e=>q_({},e,{values:qv(e)?iN(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 W_(r,t)})),operator:"or",id:dO()(),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=>({[K_(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[q_({},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 B_(e,t,r,p)},oN=(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)(Gv),(0,l.partition)(Wv))(t),i=n.map((t=>V_({},t,{type:Kv(e,t)}))).map((e=>W_(e))),a=r.values||[];return[{attributes:i,operator:"or",id:dO()(),entityTypes:a}]})(e,a);return B_(e,t,r,o)})(e,t,r,n):aN(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},sN=e=>"2.0"===e.version?e.keyword:Q_(e),lN=e=>(0,l.pathEq)(["object","uri"],e),uN=(e,t)=>(0,l.pipe)((0,l.find)(lN(e)),(0,l.prop)("object"))(t),cN=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"),lN(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=uN(r.match,t)||n[r.match];return i?{label:yd((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return no(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)},pN=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),dN=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),yN=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[],negativeRules:a=[]}=t;const o=(0,l.propOr)({},n,r);return{label:yd((0,l.prop)("label",o)),matchRules:i.concat(a).map((function(t){return no(e,o.type,t)||{label:t,uri:t}}))}})))(t),fN=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)},TN=(0,l.path)(["object","uri"]),EN=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},mN=e=>e.getValue(),hN=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=hN(n[e],t),!r);e++);return r},bN=(e,t)=>{const r=[],n=(0,l.pipe)(mN,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(bN,[t]),a);return r.push.apply(r,o),r};function ON(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vN(e,t,r[t])}))}return e}function vN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gN=(e,t)=>!!e[t],_N=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},NN=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||[]])},AN=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return ON({},t,{[r.uri]:ON({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:NN(null==o?void 0:o.parents,n),children:NN(null==o?void 0:o.children,i),values:NN(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},PN=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Cr(r,t)||ci(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Mo(r,n,i).flatMap(xo).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=AN({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>AN({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},RN=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!mt(e.uri)&&_t(e.type)&&_t(t)&&!t.startsWith(e.type))(n,t))return e;const i=vs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(os),(0,l.map)(_N))(i);return AN({structure:e,attrType:e[t].attrType,values:a})}),t)},SN=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 gN(e,r)}));return r||n?t.filter(os).reduce(((e,t)=>SN({structure:e,attributeValue:t})),e):e}),t);{const e=r;return gN(t,e.type)?AN({structure:t,attrType:t[e.type].attrType,values:[_N(e)]}):t}},wN=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?ON({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},IN=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=vs(i,n,r)||[];return a.length?AN({structure:t,attrType:t[r].attrType,values:a.filter(os).map(_N)}):t},UN=(e,t,r)=>{const n=Ot(e),i=Ot(t);return n===i?((e,t)=>{const r=kt(t),n=kt(e);return At(n,r)||((e,t)=>jt(e)&&!jt(t)&&At(t,e))(n,r)})(e,t):!(!r||!Dt(t))&&SE(r,i).includes(n)},CN=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},LN=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?PE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return UN(r,t,o)}))},jN=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>jN(e,t,r)))))},DN=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&CN(n,e)}},kN=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=Ot(n),c=RE(u,o,i,a),p=jN("children",t,l),d=jN("parents",t,l),y=p.flatMap((e=>jN("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return UN(t,n,c)})).map((t=>DN(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return UN(n,t,c)||Ot(t)!==u&&UN(t,n,c)})).map((t=>DN(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=jN("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)&&UN(n,t,c)}))})).map((t=>DN(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return UN(t,n,c)})).map((e=>DN(r,n,e,s))),...T,...E,...f]},MN=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=DO({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=>pd(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[Kt,()=>a(n)],[tr,()=>(e=>{const r=o(e),n=er(t);return Vl([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return wO(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},FN=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:$r.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(xN(r,t)):i.push($N([t],r)),i},xN=(e,t)=>{const r=qt(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=Kt(i)?xN(i,t[r]):[$N(t[r],i)];return e.push(...a),e}}),[])},$N=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Zt(t.uri),filter:t.type===Ze.TYPE_BLOB?$r.FULL_TEXT:$r.EQUALS,values:e}:{fieldName:Zt(t.uri),filter:$r.MISSING_VALUE},VN={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},GN={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([[6210],{52992:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>ks,IL3:()=>$p,PY2:()=>on,Ng6:()=>Ae,YJ7:()=>zr,NlI:()=>Vr,XYV:()=>Kr,Xt7:()=>Oe,wfT:()=>Wn,EMD:()=>Un,HAc:()=>ve,PEf:()=>pn,oA3:()=>In,$XE:()=>Ve,eWf:()=>un,q7e:()=>ge,KVe:()=>Yn,WVQ:()=>Or,oZZ:()=>Zn,bNA:()=>ei,Rjq:()=>ti,G39:()=>yn,W0P:()=>Je,X1H:()=>He,yn8:()=>Me,N0y:()=>ke,dZX:()=>Ge,bQt:()=>ni,oS0:()=>Ze,bZE:()=>Hr,Nsj:()=>en,psV:()=>Xr,xPW:()=>sn,pyR:()=>Mn,p8l:()=>Ln,Wkf:()=>be,zHr:()=>he,NIO:()=>me,$26:()=>Hv,Esk:()=>An,s9T:()=>je,MEy:()=>Ou,j5E:()=>$r,vAw:()=>wn,NMQ:()=>Sn,eVu:()=>Fu,YGb:()=>Ke,mNm:()=>Dn,s_5:()=>Fn,RgZ:()=>jn,unl:()=>zn,Qy0:()=>ri,pYu:()=>Nn,wIJ:()=>mg,GFH:()=>Re,Ury:()=>fn,S91:()=>Tn,p3$:()=>si,wSh:()=>Z,BDP:()=>mi,pGS:()=>kn,ARY:()=>et,XGc:()=>Gn,fO_:()=>Rr,wwy:()=>Ue,h_8:()=>mn,_XL:()=>Zr,j2V:()=>Bn,dMV:()=>$n,NBX:()=>EN,OXy:()=>tt,BXd:()=>Fe,KM9:()=>Ne,CJB:()=>Qn,lXI:()=>Be,nqG:()=>ai,C68:()=>dn,yxQ:()=>ii,Yj_:()=>Ce,D25:()=>we,ZIY:()=>We,Tl4:()=>Ng,lwr:()=>cn,NkU:()=>qn,Rtp:()=>Vn,YGx:()=>xe,uTS:()=>xn,MCv:()=>_e,IYE:()=>Cn,PiC:()=>Xn,MVv:()=>Xe,h_m:()=>qe,DUe:()=>Qr,tJI:()=>Pe,fDt:()=>Se,cNQ:()=>Hn,SwE:()=>Pn,ZHR:()=>Jn,PYu:()=>Qe,lD1:()=>En,lVm:()=>$e,vnX:()=>mv,$x5:()=>hv,_R1:()=>Tv,wUm:()=>Ev,z7V:()=>oi,dC6:()=>De,MBD:()=>Ie,GmF:()=>Ki,cKm:()=>Ye,iP_:()=>ln,NVC:()=>Le,tPT:()=>ul,tZe:()=>nd,kRE:()=>pf,psB:()=>df,X0$:()=>ll,zE1:()=>bl,Wm5:()=>zs,vyX:()=>Oc,wLZ:()=>cl,W4V:()=>se,EtK:()=>bs,Wtd:()=>sl,asT:()=>SN,kGs:()=>KE,ewt:()=>KT,O_f:()=>yu,sOy:()=>At,Tde:()=>Zt,LMI:()=>nc,skb:()=>y_,sPt:()=>Qu,sH1:()=>Ku,RPM:()=>Em,h27:()=>yc,Uqd:()=>bc,xG:()=>P_,Z2f:()=>CO,fgW:()=>Hg,I69:()=>h_,ZxB:()=>O_,mdt:()=>pm,Qbq:()=>DE,rny:()=>Ci,UEY:()=>Ea,Q0T:()=>Ta,Lyr:()=>_a,sBn:()=>fa,itK:()=>ca,H9$:()=>ya,KPc:()=>da,zos:()=>pa,ELQ:()=>Na,dZs:()=>ea,Cz4:()=>Zi,z_L:()=>va,fGe:()=>zi,iuF:()=>la,Wib:()=>ua,Hn0:()=>ga,obS:()=>Aa,E$L:()=>ta,XUh:()=>sa,Qp_:()=>aa,_jk:()=>ra,sKE:()=>na,WmG:()=>oa,QKx:()=>ba,Oik:()=>ha,s0A:()=>ia,o9m:()=>ma,MCd:()=>Oa,RsS:()=>fc,tGK:()=>Gl,lIv:()=>Ol,Vg3:()=>xi,mkC:()=>Pi,xv5:()=>Vi,a14:()=>Si,yv0:()=>$i,Zm0:()=>Ri,Nxd:()=>Ai,$mM:()=>Fi,ifj:()=>gr,NWi:()=>XO,xr3:()=>JO,wNf:()=>zl,iJH:()=>zO,d89:()=>gi,Edd:()=>_i,Z5t:()=>Ni,uGe:()=>bi,UoR:()=>hi,xvW:()=>KO,$qe:()=>QO,yPM:()=>Xi,$cp:()=>hl,vKJ:()=>El,VtG:()=>Jc,AID:()=>uT,B1H:()=>fN,b7X:()=>CE,$uE:()=>zE,keo:()=>jE,C_p:()=>Zm,G27:()=>ib,JA0:()=>Zy,b3T:()=>QE,oC6:()=>qE,_Zs:()=>HE,epC:()=>em,YYG:()=>ZE,f_2:()=>tf,w3l:()=>J_,QHB:()=>nb,Jso:()=>nN,RXH:()=>Gh,Vr9:()=>yb,lMm:()=>cO,BlA:()=>FN,fmQ:()=>ps,yRD:()=>M_,NcL:()=>ah,QK6:()=>de,ymd:()=>xp,JV_:()=>Rf,XiW:()=>ST,Yrx:()=>$y,GPx:()=>ol,gjI:()=>al,vlo:()=>yE,E_P:()=>am,aAL:()=>Pp,NBq:()=>ds,wp9:()=>cm,DsR:()=>Op,MPc:()=>fT,gWE:()=>TT,DT_:()=>ET,ipn:()=>hT,ORg:()=>fi,_wz:()=>mT,RYR:()=>YT,PP2:()=>By,wS7:()=>xO,cBQ:()=>ip,pBq:()=>Hf,DsO:()=>ee,X78:()=>wf,xZs:()=>_f,YFy:()=>Gy,Gmt:()=>Ef,K$w:()=>Tf,DSj:()=>Rp,Mfr:()=>Wy,k9j:()=>op,ww$:()=>pl,WVU:()=>ff,hxF:()=>el,E7G:()=>Bd,nwO:()=>VN,Mzk:()=>Zc,aFF:()=>VE,HRH:()=>_u,EZK:()=>Td,Kxm:()=>pd,Z9i:()=>jm,CrF:()=>sf,DNd:()=>Ra,vUy:()=>LN,lJh:()=>Pu,zHo:()=>Ru,sEJ:()=>hN,UO$:()=>Zf,zeJ:()=>ar,dLR:()=>_s,JQy:()=>Ls,XtP:()=>vs,Ug0:()=>Mr,A1W:()=>LE,sw:()=>fd,nv3:()=>ov,JgD:()=>av,nve:()=>bN,SkP:()=>js,SAs:()=>Kf,i5L:()=>Ds,PWK:()=>Po,IM5:()=>gs,Aup:()=>db,Mfk:()=>TO,HQx:()=>$o,oN$:()=>xo,mB6:()=>DO,p6d:()=>w,o0x:()=>U,ufS:()=>gO,k7L:()=>_O,mrB:()=>I,ncP:()=>bt,Zmi:()=>ft,hm5:()=>Et,ECL:()=>Ar,vPL:()=>hd,qmL:()=>UE,hPi:()=>Bf,hXd:()=>ji,OCS:()=>Di,p2l:()=>Fs,qF1:()=>Vp,_X$:()=>Gp,yj2:()=>yg,bzh:()=>fm,k66:()=>ko,kiP:()=>Xa,pSg:()=>ce,kz_:()=>Ky,H_U:()=>Fo,t9e:()=>ja,j2$:()=>id,PFL:()=>Gt,aJ3:()=>Fv,To9:()=>er,wpo:()=>Fd,ADq:()=>wm,UUb:()=>Rm,tQX:()=>Sm,xy8:()=>qt,EUG:()=>or,AFK:()=>Ut,X3M:()=>ir,WN0:()=>Mo,kDl:()=>Ns,uDV:()=>IE,IhQ:()=>ws,pfb:()=>Us,R$r:()=>im,w80:()=>fo,Pfu:()=>Ca,Gtj:()=>Ll,fyF:()=>Cl,kkq:()=>Do,u5q:()=>Ot,O$n:()=>kd,ptG:()=>Md,f4_:()=>yh,uap:()=>dh,d7q:()=>xy,liG:()=>qy,$oF:()=>Fy,avf:()=>nE,DiQ:()=>rE,cfX:()=>tE,vD3:()=>aE,Qrb:()=>eE,EJQ:()=>iE,HWy:()=>ZT,gjS:()=>HT,y6v:()=>zT,JUW:()=>rf,GtP:()=>Ah,_kX:()=>wa,u1e:()=>Ia,sJj:()=>FE,CJp:()=>_h,uKF:()=>ME,wo0:()=>cf,s5:()=>wo,cwx:()=>So,Y6b:()=>Sy,TTx:()=>Of,UtR:()=>wy,HaQ:()=>vf,E6I:()=>of,Won:()=>Uy,vTU:()=>Py,Nsy:()=>Pd,KMQ:()=>$E,Do$:()=>Id,CSV:()=>Vs,TMe:()=>Iy,l1V:()=>wu,RHh:()=>Mu,VQ1:()=>Du,cGG:()=>ju,z7d:()=>fE,Xaq:()=>Wo,Sj8:()=>kN,PJj:()=>xl,k3T:()=>xr,PjQ:()=>Ei,s7l:()=>Yc,jLA:()=>Ph,GGR:()=>uE,j5q:()=>sE,DnY:()=>Vc,RY5:()=>NE,Px$:()=>BT,KPC:()=>pN,NIY:()=>Xc,HvW:()=>qc,Fof:()=>Da,BXy:()=>Hc,fX:()=>Rh,BTI:()=>Cd,uie:()=>vd,ChB:()=>Ed,q27:()=>$d,vrC:()=>Pb,fAQ:()=>Lf,XkT:()=>$c,lrH:()=>jf,nt9:()=>Cr,XH8:()=>Dd,XH2:()=>Fr,jFi:()=>jd,qhs:()=>yo,wwR:()=>Ud,Uk3:()=>Ct,ev7:()=>TN,RB9:()=>zy,iFp:()=>hm,e$p:()=>Om,PcX:()=>vm,SpP:()=>bm,R6_:()=>$v,CY1:()=>Qv,Ajk:()=>Dc,Yiz:()=>jc,FK9:()=>Sc,UOo:()=>NO,aTW:()=>hf,uug:()=>Xl,P$2:()=>Xv,XS2:()=>Wl,Hyb:()=>uu,d3Y:()=>Nc,Klp:()=>Pc,WxZ:()=>zv,Gzu:()=>Su,ZOr:()=>xc,uqV:()=>_y,Pm4:()=>re,hWO:()=>St,nHA:()=>Th,nVD:()=>PE,_tF:()=>Vu,dED:()=>ky,P2h:()=>Dy,jrr:()=>Ha,mmY:()=>Ka,T6O:()=>Vo,h6J:()=>ed,hM2:()=>oN,XR6:()=>X,jmz:()=>wE,IHt:()=>SE,NZI:()=>Lm,wdF:()=>Uf,kgP:()=>Cf,ZYI:()=>Dp,QXK:()=>Sl,efz:()=>wl,Q5d:()=>Rl,Ysv:()=>Il,UWq:()=>mE,ocC:()=>EE,io3:()=>Dr,Sbt:()=>Eo,roS:()=>To,Ww1:()=>mo,QaS:()=>ep,ERZ:()=>Q_,CL1:()=>sN,idV:()=>yd,nIW:()=>Rt,fjE:()=>Vv,sG0:()=>RO,tV7:()=>$l,g8o:()=>gg,Qy:()=>vg,t2P:()=>Mv,KbW:()=>ro,wId:()=>io,LS0:()=>ao,bFH:()=>cy,Rgl:()=>dy,fW1:()=>oh,GFW:()=>gf,Ywp:()=>pv,pg:()=>Hd,WSA:()=>yy,fed:()=>iN,tT_:()=>Is,BgZ:()=>Cs,KbL:()=>Wc,JBA:()=>kt,aNC:()=>iv,RFJ:()=>jp,Zeh:()=>zf,OT5:()=>cv,mC3:()=>gl,kR6:()=>MN,NVY:()=>lm,k6v:()=>Wp,FEC:()=>Yp,L5S:()=>om,Ob5:()=>Vd,KUV:()=>Gd,dvH:()=>sm,V3i:()=>Eb,VD3:()=>kr,mm2:()=>Lu,rou:()=>Vf,izH:()=>Ua,DK$:()=>La,KMp:()=>Ap,c31:()=>it,mbo:()=>Um,gT8:()=>st,CZ8:()=>us,uGi:()=>Ts,Poc:()=>rt,_9k:()=>hs,ZTM:()=>ys,bwT:()=>Es,tzW:()=>ut,tF$:()=>ot,o96:()=>cs,M4S:()=>ms,_vs:()=>hp,xF8:()=>QT,PUO:()=>GE,ATu:()=>Im,j1S:()=>di,V3K:()=>ci,Lmx:()=>pi,ZaZ:()=>nt,n_1:()=>Ay,N6e:()=>gp,SxO:()=>Qa,w3p:()=>um,xU7:()=>pe,Y_p:()=>Oo,$k6:()=>bo,Gdl:()=>wO,U6P:()=>SO,OwB:()=>xv,hTh:()=>RE,xqc:()=>Io,JvE:()=>Uo,i29:()=>lc,dzT:()=>Ii,uPS:()=>np,cZV:()=>rp,n3B:()=>e_,e6O:()=>Qg,s7j:()=>Eg,j$Q:()=>nf,kW2:()=>Nh,tH7:()=>Ro,Yxg:()=>qs,MaZ:()=>lE,nqN:()=>oE,jWj:()=>bE,o_J:()=>Yo,hgZ:()=>md,yW4:()=>td,uT0:()=>zp,C82:()=>Zp,bsH:()=>fh,u9Z:()=>$f,J$m:()=>Ny,j_Q:()=>Ic,OaI:()=>Uc,wB1:()=>yN,SP6:()=>qd,ZYr:()=>cN,IMU:()=>Lp,FoU:()=>ef,DVz:()=>jO,mxe:()=>zg,FHr:()=>Jf,D1g:()=>Gf,VO3:()=>gv,de5:()=>vv,Uw1:()=>Te,J6q:()=>Cm,XCe:()=>Ya,fbl:()=>dv,Ir:()=>eo,XQO:()=>to,QXb:()=>ny,P8_:()=>Af,iiD:()=>Np,MOC:()=>iy,WF:()=>ry,xE1:()=>Ti,idW:()=>PN,QWZ:()=>bO,YL3:()=>zc,Fn9:()=>T,j2U:()=>Ms,MpE:()=>ct,kQw:()=>Yt,mfm:()=>cu,vZp:()=>Lt,E8K:()=>gN,VSb:()=>ss,vr_:()=>Wt,Vmh:()=>CN,FgW:()=>Tb,oDv:()=>qo,fGG:()=>OO,kuw:()=>Qo,eHk:()=>hE,Tt2:()=>Bo,pQZ:()=>Ko,oZ7:()=>vO,T6Y:()=>Tr,_26:()=>ou,YkM:()=>zt,J6y:()=>ql,njU:()=>eu,TBP:()=>Ho,IT0:()=>Dm,x_:()=>xE,biM:()=>Sd,TMl:()=>wd,Vkd:()=>nu,WiY:()=>Bv,_zi:()=>iu,J6D:()=>Cu,Lt4:()=>ur,QEi:()=>rr,whI:()=>wr,KIu:()=>Ur,JhM:()=>oe,C_0:()=>hr,lzc:()=>Yd,qIF:()=>t_,O27:()=>E,aBi:()=>xd,xOX:()=>Xs,EdS:()=>_t,WgC:()=>gt,eEv:()=>$t,A4t:()=>tu,YOQ:()=>Dt,Wos:()=>yr,jWr:()=>Pa,Or$:()=>Xt,lhE:()=>jr,CwH:()=>tr,pzC:()=>Qs,ymH:()=>Zl,QZu:()=>Kt,rYH:()=>Yv,FVt:()=>dr,Kn2:()=>ue,jgw:()=>pu,Qgr:()=>Uu,OXP:()=>os,lS4:()=>nr,g5f:()=>qv,fp6:()=>Kl,Uty:()=>Yi,YkG:()=>Jt,xdS:()=>lt,kMF:()=>bT,$NE:()=>Nt,bC9:()=>vt,Ian:()=>yi,KVV:()=>kE,q9e:()=>ho,iIf:()=>IO,ian:()=>tl,m6e:()=>br,OFd:()=>Ks,kqr:()=>Bt,fnZ:()=>Sr,VFZ:()=>rl,ZiX:()=>mt,j5n:()=>cr,zkt:()=>_,Pcm:()=>dN,QDV:()=>Hs,M5u:()=>Wv,laD:()=>Zg,mtq:()=>xt,CtB:()=>UO,CBv:()=>ae,I0t:()=>mr,u1G:()=>dE,gk1:()=>Jg,Bgb:()=>Kg,uzs:()=>Ir,v0l:()=>Bu,Zqp:()=>Cy,j0k:()=>Ao,tCm:()=>It,gmx:()=>Yl,mOr:()=>vu,TwZ:()=>_g,GyU:()=>sv,zGm:()=>Jd,bMg:()=>my,EyD:()=>qO,FQA:()=>HO,fZN:()=>Oy,xsF:()=>YO,Lxg:()=>BO,O3l:()=>lp,Wni:()=>sp,wRx:()=>ev,OxG:()=>sy,uJQ:()=>oy,qWg:()=>LO,i96:()=>Qd,zhn:()=>ZO,G8q:()=>li,Jct:()=>xT,A9Y:()=>te,Y5F:()=>$_,gxP:()=>le,c$P:()=>Bl,M7o:()=>hc,BBN:()=>qa,ZBU:()=>J,UkJ:()=>oo,xkv:()=>Nf,z$M:()=>RN,KAm:()=>Xy,lCl:()=>cT,rkF:()=>eh,IU6:()=>ud,RGr:()=>h,aYu:()=>m,ije:()=>Ml,Buf:()=>_p,YLu:()=>kl,ct9:()=>go,XkY:()=>hy,T5R:()=>Xd,uQS:()=>vy,wcJ:()=>vo,d$I:()=>dl,rSp:()=>Rd,Sx:()=>Kc,Ilm:()=>vl,Ki6:()=>Zs,VGk:()=>bp,sFD:()=>Wh,eWN:()=>wN,dWE:()=>Tg,Lkd:()=>wT,aDL:()=>eT,yaA:()=>gy,lOh:()=>Yf,DBr:()=>jv,hK$:()=>Vl,TZ_:()=>ld,CMB:()=>r_,FU8:()=>Qc,J$p:()=>iT,b5s:()=>nT,h2W:()=>wt,SL_:()=>Mf,oUH:()=>Kp,ck9:()=>zd,RAb:()=>$u,nL:()=>PO,k$p:()=>Bh,Xs0:()=>Dl,u7I:()=>Wf,rxg:()=>Tu,bji:()=>Eu,oCZ:()=>Km,MjG:()=>Ov,FuV:()=>Qp,$ju:()=>Xp,t6d:()=>Jp,m5F:()=>fe,sx:()=>IN,rSc:()=>kO,U10:()=>Cc,L8n:()=>yf,R9X:()=>Ry,rj2:()=>Sf,_C4:()=>ad,tCj:()=>Pf,uAg:()=>Vy,wx9:()=>JT,KF3:()=>od,ax9:()=>sd,HH7:()=>vp,ufV:()=>Yy,_6y:()=>ap,XTh:()=>fv,AJo:()=>tp,Ixr:()=>af,P6Y:()=>GN,Bd_:()=>Bm,xkB:()=>Ym,W41:()=>xf,WkI:()=>Ff,sSE:()=>Wm,GMd:()=>ic,jtL:()=>ac,Bxm:()=>Hm,FVh:()=>Fm,U_T:()=>fy,FTe:()=>ie,VGB:()=>ne,Wfe:()=>Au,Ls5:()=>Nu,$bd:()=>hu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>N,toUtcDate:()=>A});var a={};r.r(a),r.d(a,{addAttribute:()=>zo,editAttribute:()=>Zo,editEndDate:()=>as,editRoles:()=>rs,editStartDate:()=>is,editTags:()=>ns,removeAttribute:()=>ts});var o={};r.r(o),r.d(o,{applyCrosswalks:()=>KE,collectCrosswalksFromAttributes:()=>zE,compareActivenessAttributes:()=>QE,compareAttributes:()=>qE,compareImages:()=>HE,compareRoles:()=>em,compareTags:()=>ZE});var s={};r.r(s),r.d(s,{createHistoryManager:()=>nm});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"),N=e=>{const t=new Date(e),r=new Date;return r.setFullYear(t.getUTCFullYear()),r.setDate(t.getUTCDate()),r.setMonth(t.getUTCMonth()),r.setHours(t.getUTCHours()),r.setMinutes(t.getUTCMinutes()),r.setSeconds(t.getUTCSeconds()),r.setMilliseconds(t.getUTCMilliseconds()),r},A=e=>{const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return new Date(r)},P=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),R=P("startOf"),S=P("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),j=(0,l.equals)("9999"),D=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),M=(0,l.test)(/^9+$/),F=(0,l.test)(/^[9az]+$/),x=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[D,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[F,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[F,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[j,(0,l.always)("YYYY")],[M,(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=>oe(e=e||"")?`mailto:${e}`:!e.includes("://")&&(e.toLowerCase().startsWith("www.")||e.split(".").length>2)?`http://${e}`:e,le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;var Ee=r(76665);let me,he,be,Oe,ve,ge,_e,Ne,Ae,Pe,Re,Se,we,Ie,Ue,Ce,Le,je,De,ke,Me,Fe,xe,$e,Ve,Ge,We,Ye,Be,qe,He,Qe,Ke,Je,Xe;var ze;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(me||(me={})),function(e){e.local="local",e.validationService="validationService"}(he||(he={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(be||(be={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(Oe||(Oe={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(ve||(ve={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(ge||(ge={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(_e||(_e={})),function(e){e.asc="asc",e.desc="desc"}(Ne||(Ne={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Ae||(Ae={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(Pe||(Pe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Re||(Re={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Se||(Se={})),function(e){e.PROFILE="profile",e.MAP="map"}(we||(we={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(Ie||(Ie={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ue||(Ue={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Ce||(Ce={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(Le||(Le={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(je||(je={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(De||(De={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(ke||(ke={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(Me||(Me={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(Fe||(Fe={})),function(e){e.IN="in",e.OUT="out"}(xe||(xe={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}($e||($e={})),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"}(Ve||(Ve={})),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"}(Ge||(Ge={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttribute="com.reltio.plugins.entity.attributes.SingleAttributeView",e.AttributeTable="com.reltio.plugins.entity.attributes.AttributeTableView",e.Custom="com.reltio.plugins.ui.CustomActionView",e.Map="com.reltio.plugins.react.EntityMapView",e.ImageAttribute="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatches="com.reltio.plugins.entity.PotentialMatchesView"}(We||(We={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(Ye||(Ye={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.NestedProfile="NestedProfileView",e.Search="SearchView",e.Tags="Tags",e.Pivoting="Pivoting"}(Be||(Be={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(qe||(qe={})),function(e){e.NEW="new",e.CLASSIC="classic"}(He||(He={})),function(e){e.ASC_BY_NAME="ascByName"}(Qe||(Qe={})),function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network",e.TREE="Tree"}(Ke||(Ke={})),function(e){e.SET_HTML="setHtml",e.SHOW_POPUP="showPopup",e.HIDE_POPUP="hidePopup",e.LOG="log",e.SET_VISIBILITY="setVisibility",e.MESSAGE="message",e.SET_ENABLED="setEnabled",e.SET_TOOLTIP="setToolTip",e.SET_LABEL="setLabel",e.SET_HEIGHT="setHeight",e.SET_WIDTH="setWidth",e.RETURN_PROCESSED_API_RESPONSE="returnProcessedApiResponse",e.RETURN_PROCESSED_API_REQUEST="returnProcessedApiRequest",e.REQUEST="request",e.EVENT="event"}(Je||(Je={})),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"}(Xe||(Xe={})),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"}(ze||(ze={}));const Ze=ze;let et,tt;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(et||(et={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(tt||(tt={}));const rt=(0,l.prop)("referencedEntityTypeURI"),nt=(0,l.prop)("relationshipTypeURI"),it=(0,l.prop)("referencedAttributeURIs"),at=(0,l.curry)(((e,t)=>(0,l.pipe)(it,(0,l.filter)((0,l.startsWith)(e)))(t))),ot=at("configuration/relationTypes"),st=at("configuration/entityTypes"),lt=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),ut=(0,l.filter)(lt),ct=(e,t)=>!t||t.some((t=>t===e.uri)),pt="1Tempo4rary",dt="1Tepmo4Rel",yt=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),ft=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Tt=e=>()=>ft(e),Et=(e,t)=>{const r=yt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return ft(n)},mt=e=>e&&e.includes("uri$$"),ht=Tt("entities"),bt=Tt("relations"),Ot=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),vt=(0,l.startsWith)("relations/"),gt=(0,l.startsWith)("entities/"),_t=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Nt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),At=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),Pt=(0,l.pipe)((0,l.split)("/"),l.head),Rt=(0,l.pipe)((0,l.split)("/"),l.last),St=e=>e.split(".").slice(0,2).join("."),wt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},It=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Ut=(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("/")},Ct=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},Lt=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),jt=e=>2===e.split("/").length,Dt=e=>5===e.split("/").length,kt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},Mt=e=>e.replace(/uri\$\$/g,pt);function Ft(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xt=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,_t),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",Ze.TYPE_STRING)]),$t=(0,l.has)("values"),Vt=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(Ze.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(Ze.TYPE_LOOKUP)],[$t,(0,l.always)(Ze.TYPE_ENUM)],[xt,(0,l.always)(Ze.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",Ze.TYPE_BOOLEAN),(0,l.always)(Ze.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Gt=(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){Ft(e,t,r[t])}))}return e}({},e,{type:Vt(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),Wt=e=>!!e&&(!!e.autoGenerated&&e.type!==Ze.TYPE_NESTED||!!e.parentAutoGenerated),Yt=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),Bt=(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),qt=e=>Yt(e)?"analyticsAttributes":"attributes",Ht=(0,l.propEq)("hidden",!0),Qt=(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))),Kt=Qt(Ze.TYPE_NESTED),Jt=Qt(Ze.TYPE_REFERENCE),Xt=Qt(Ze.TYPE_IMAGE),zt=(0,l.either)(Kt,Jt),Zt=(e,t)=>{const r=Yt(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(".")},er=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),tr=(0,l.pipe)(er,Boolean),rr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),nr=(0,l.both)(tr,(0,l.pipe)(er,("rdm",(0,l.pipe)(Pt,(0,l.equals)("rdm")))));const ir=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=qt({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]||or(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=ir(e,t,r);return n.length?(0,l.last)(n):null},or=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",Ze.TYPE_NESTED),(0,l.propEq)("type",Ze.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",Ze.TYPE_REFERENCE),(0,l.pipe)(it,(0,l.map)((t=>ar(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},sr=[Ze.TYPE_ACTIVENESS_DATE,Ze.TYPE_DATE,Ze.TYPE_TIMESTAMP,Ze.TYPE_LOCAL_DATE],lr=[Ze.TYPE_ACTIVENESS_DATE,Ze.TYPE_TIMESTAMP,Ze.TYPE_LOCAL_DATE],ur=e=>sr.includes(e),cr=e=>lr.includes(e),pr=[Ze.TYPE_INT,Ze.TYPE_LONG,Ze.TYPE_NUMBER,Ze.TYPE_FLOAT,Ze.TYPE_DOUBLE,Ze.TYPE_COUNT],dr=e=>pr.includes(e),yr=e=>[Ze.TYPE_FLOAT,Ze.TYPE_DOUBLE].includes(e),fr=[Ze.TYPE_BOOLEAN,Ze.TYPE_BOOLEAN_RADIO,Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Tr=e=>fr.includes(e),Er=[Ze.TYPE_URL,Ze.TYPE_BLOG_URL,Ze.TYPE_IMAGE_URL],mr=e=>Er.includes(e),hr=Qt(Ze.TYPE_EMAIL),br=e=>Ze.TYPE_SSN===e;var Or,vr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(Or||(Or={}));const gr=(0,l.curry)(((e,t,r)=>{var n;const i=e===Or.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)))})),_r=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Nr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),_r),Ar=(0,l.pipe)((0,l.reject)(E),Nr),Pr=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s,(()=>E())),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+_r(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;let T,E=l.identity;const m=()=>!e||f()||T?T||Promise.resolve():(T=new Promise((e=>{E=e})),Promise.resolve());return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f,getDcrUriAwait:m}},Rr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Sr=(0,l.equals)(Rr.SUGGESTING),wr=(0,l.equals)(Rr.EDITING),Ir=(0,l.equals)(Rr.VIEWING),Ur=(0,l.either)(wr,Sr),Cr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Lr=(0,l.curry)(((e,t)=>(0,l.pipe)(Cr(e),(0,l.prop)("extendsTypeURI"))(t))),jr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Lr(e,r)));return n(r)})),Dr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Lr(e,n);return r})),kr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?kr(e,Cr(e,t.extendsTypeURI),r):void 0,Mr=(e,t)=>{const r=t.map(Dr(e));return(r.length?r.reduce(l.intersection):[])[0]},Fr=(e,t)=>kr(e,(0,l.is)(Object,t)?t:Cr(e,t),"typeImage"),xr=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&jr(e,t,n.uri)?r.concat(n.uri):r),[]),$r={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"},Vr={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},Gr={[$r.EQUALS]:"equals",[$r.NOT_EQUALS]:"not",[$r.STARTS_WITH]:"starts with",[$r.MISSING_VALUE]:"missing value",[$r.IN_RANGE]:"in range",[$r.HAS_ALL]:"has all",[$r.FULL_TEXT]:"full text",[$r.EXISTS]:"exists",[$r.COUNT_EQUALS]:"count equals",[$r.COUNT_NOT_EQUALS]:"count not equal",[$r.COUNT_LT]:"count less",[$r.COUNT_LTE]:"count less or equal",[$r.COUNT_GT]:"count greater",[$r.COUNT_GTE]:"count greater or equal",[$r.COUNT_RANGE]:"count in range",[$r.LT]:"less than",[$r.LTE]:"less than or equal",[$r.GT]:"greater than",[$r.GTE]:"greater than or equal",[$r.IN_FILE]:"in file",[$r.NOT_IN_FILE]:"not in file",[$r.CONTAINS]:"contains",[$r.ON]:"on",[$r.BEFORE]:"before",[$r.AFTER]:"after",[$r.WITHIN]:"within"},Wr="in",Yr="notIn",Br="not range",qr=e=>({[Wr]:$r.EQUALS,[Yr]:$r.NOT_EQUALS}[e]||e);var Hr,Qr;!function(e){e.LAST_DAY="lastDay",e.LAST_WEEK="lastWeek",e.LAST_MONTH="lastMonth",e.LAST_6MONTHS="last6Months",e.LAST_YEAR="lastYear",e.PICK_DATE="pickDate"}(Hr||(Hr={})),function(e){e.LAST_3DAYS="last3Days"}(Qr||(Qr={}));const Kr=["LAST_DAY","LAST_3DAYS","LAST_WEEK","LAST_MONTH","LAST_6MONTHS","LAST_YEAR","PICK_DATE"].reduce(((e,t)=>(e[t]=Hr[t]||Qr[t],e)),{}),Jr={[Hr.LAST_DAY]:"Last 24 hours",[Qr.LAST_3DAYS]:"Last 3 days",[Hr.LAST_WEEK]:"Last 7 days",[Hr.LAST_MONTH]:"Last month",[Hr.LAST_6MONTHS]:"Last 6 months",[Hr.LAST_YEAR]:"Last year",[Hr.PICK_DATE]:"Pick date"},Xr={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},zr={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Zr="<No label>",en={IN:"in",OUT:"out"};var tn=r(87918),rn=r.n(tn);function nn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){an(e,t,r[t])}))}return e}function an(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const on={startDate:{type:Ze.TYPE_ACTIVENESS_DATE,get label(){return rn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:Ze.TYPE_ACTIVENESS_DATE,get label(){return rn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},sn=nn({id:{type:Ze.TYPE_ENTITY_ID,get label(){return rn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},on,{roles:{type:Ze.TYPE_STRING,get label(){return rn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:Ze.TYPE_STRING,get label(){return rn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),ln={workflow:{type:Ze.TYPE_STRING,get label(){return rn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:Ze.TYPE_STRING,get label(){return rn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:Ze.TYPE_STRING,get label(){return rn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},un={commenter:{type:Ze.TYPE_STRING,get label(){return rn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},cn={notResolved:{type:Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return rn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},pn={createdBy:{type:Ze.TYPE_STRING,get label(){return rn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:Ze.TYPE_STRING,get label(){return rn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},dn={matches:{type:Ze.TYPE_COUNT,get label(){return rn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:Ze.TYPE_COUNT,get label(){return rn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},yn={sourceSystems:{type:Ze.TYPE_STRING,get label(){return rn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:Ze.TYPE_STRING,get label(){return rn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:Ze.TYPE_INT,get label(){return rn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:Ze.TYPE_TIMESTAMP,get label(){return rn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:Ze.TYPE_STRING,get label(){return rn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let fn;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(fn||(fn={}));const Tn={[fn.matchRules]:{type:Ze.TYPE_STRING,get label(){return rn().text("Match Rules")},uri:fn.matchRules,name:fn.matchRules,faceted:!0,hideForDataTenant:!0},[fn.MLRecommendedMatch]:{type:Ze.TYPE_STRING,get label(){return rn().text("Match IQ")},uri:fn.MLRecommendedMatch,name:fn.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},En=nn({},sn,ln,un,cn,pn,dn,yn,Tn,{type:{type:Ze.TYPE_STRING,get label(){return rn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),mn="NOT_MATCH";var hn=r(13980),bn=r.n(hn);function On(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vn(e,t,r[t])}))}return e}function vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gn=bn().oneOf(["mobile","tablet","desktop"]),_n=bn().shape({deviceTypes:bn().oneOfType([gn,bn().arrayOf(gn)]),roles:bn().arrayOf(bn().string)}),Nn=bn().shape({value:bn().string,lookupCode:bn().string}),An=bn().shape({link:bn().string,filename:bn().string}),Pn=bn().shape({displayName:bn().string,parent:bn().string}),Rn=bn().oneOfType([bn().string,bn().number,bn().bool,Nn]),Sn=bn().oneOfType([Rn,bn().arrayOf(Rn)]),wn=bn().shape({fieldName:bn().string,values:bn().arrayOf(Sn),filter:bn().string,type:bn().string}),In=bn().shape({minValue:bn().number,maxValue:bn().number}),Un=bn().shape({label:bn().string,name:bn().string,description:bn().string,type:bn().string,hidden:bn().bool,faceted:bn().bool,searchable:bn().bool,uri:bn().string,access:bn().arrayOf(bn().string),cardinality:In}),Cn=bn().shape({label:bn().string,uri:bn().string,typeColor:bn().string,direction:bn().string,startObject:bn().object,endObject:bn().object}),Ln=bn().shape({typeColor:bn().string,typeIcon:bn().string,typeImage:bn().string,label:bn().string,uri:bn().string,attributes:bn().arrayOf(Un)}),jn=bn().shape({uri:bn().string,label:bn().string,memberTypes:bn().array,extendsTypeUri:bn().string,attributes:bn().arrayOf(Un)}),Dn=bn().shape({uri:bn().string,label:bn().string,extendsTypeUri:bn().string,relationshipTypeURIs:bn().arrayOf(bn().string)}),kn=bn().shape({uri:bn().string,description:bn().string,label:bn().string,schemaVersion:bn().string,entityTypes:bn().arrayOf(Ln),roles:bn().arrayOf(bn().object),groupTypes:bn().arrayOf(bn().object),relationTypes:bn().arrayOf(Cn),graphTypes:bn().arrayOf(Dn),interactionTypes:bn().arrayOf(jn),sources:bn().arrayOf(bn().object)}),Mn=bn().shape({uri:bn().string,type:bn().string}),Fn=bn().shape({uri:bn().string,attributes:bn().object,type:bn().string,timestamp:bn().number,members:bn().object}),xn=bn().shape({uri:bn().string,type:bn().string}),$n=bn().shape({value:bn().object,ov:bn().bool,type:bn().string,uri:bn().string}),Vn=bn().shape({refEntity:bn().oneOfType([bn().array,bn().object]),refRelation:bn().oneOfType([bn().array,bn().object]),value:bn().object,ov:bn().bool,type:bn().string,uri:bn().string}),Gn=bn().oneOf((0,l.values)(Rr)),Wn=bn().shape({type:bn().oneOf(Object.values(me)).isRequired,attributeTypeUri:bn().string.isRequired,parentUri:bn().string.isRequired,uri:bn().string,message:bn().string}),Yn={attributeType:Un,showEmptyEditors:bn().bool,lazy:bn().bool,mode:Gn,metadata:kn,ownError:Wn,errors:bn().arrayOf(Wn),crosswalks:bn().array,onAddAttributes:bn().func,onAddOneMore:bn().func,onDeleteAttribute:bn().func,onChangeAttribute:bn().func,additionalControlsRenderer:bn().func,hideDeleteButton:bn().bool,showNonOv:bn().bool,state:bn().oneOf(["deleted","edited"]),expanded:bn().bool},Bn=On({attributeValue:$n},Yn),qn=On({attributeValue:Vn},Yn),Hn=bn().shape({value:bn().oneOfType([bn().string,bn().bool,bn().number]),ov:bn().bool,type:bn().string,uri:bn().string,lookupCode:bn().string,lookupRawValue:bn().string}),Qn=bn().shape({totalOvValues:bn().number,totalValues:bn().number}),Kn=bn().shape({inRelations:bn().arrayOf(bn().oneOfType([bn().object,bn().string])),outRelations:bn().arrayOf(bn().oneOfType([bn().object,bn().string])),groups:bn().arrayOf(bn().string),entityTypes:bn().arrayOf(bn().string),nextEntry:bn().object}),Jn=bn().oneOf(["asc","desc"]),Xn=bn().shape({id:bn().string,content:Kn,allowOnlyCreateNew:bn().bool,sortColumn:bn().string,sortOrder:Jn,"text-empty":bn().string,max:bn().number,icon:bn().string,caption:bn().string,canCreate:_n,canRead:_n,canUpdate:_n,canDelete:_n,editingEnabled:bn().bool}),zn=bn().shape({id:bn().string,caption:bn().string,pageSize:bn().number,icon:bn().string,canCreate:_n,canRead:_n,canUpdate:_n,canDelete:_n,attributes:bn().object}),Zn=bn().shape({entityUri:bn().string,entityType:bn().string,entityLabel:bn().string,object:Mn}),ei=bn().shape({relationUri:bn().string,relationType:bn().string,relationLabel:bn().string,direction:bn().string,object:xn}),ti=bn().shape({entity:Zn,relation:ei}),ri=bn().shape({value:bn().string,isRawFilter:bn().bool}),ni=bn().shape({id:bn().string,label:bn().string,name:bn().string,availableEntityTypes:bn().array}),ii=bn().shape({id:bn().string,allowMergeAll:bn().bool,matchActions:bn().object,availableTabs:bn().arrayOf(bn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),ai=bn().shape({matchRules:bn().arrayOf(bn().string),object:Mn,shortestTransitiveMatchPath:bn().arrayOf(bn().shape({matchRules:bn().arrayOf(bn().string),match:bn().string})),direct:bn().bool,matchScore:bn().number}),oi=bn().arrayOf(ai),si=bn().arrayOf(bn().shape({uri:bn().string,label:bn().string})),li=[{label:rn().text("And"),value:"and"},{label:rn().text("Or"),value:"or"},{label:rn().text("And not"),value:"and not"},{label:rn().text("Or not"),value:"or not"}];function ui(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ci=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),pi=(0,l.pipe)(ci,(0,l.propOr)("","label")),di=(0,l.curry)(((e,t)=>{const r=ci(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),yi=(0,l.curry)(((e,t,r)=>{const[n,i]=di(e,r);return jr(e,n,t)||jr(e,i,t)})),fi=(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){ui(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Ti=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?en.OUT:en.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(en.IN),i=r(en.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Ei=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),mi={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},hi=(0,l.curry)(((e,t)=>e.every((e=>bi(e,t))))),bi=(0,l.curry)(((e,t)=>{const r=Wt(t);return Oi(e,t)&&(e===mi.READ||!r)})),Oi=(e,t)=>!t||!t.access||t.access.includes(e),vi=(0,l.curry)(((e,t,r)=>bi(mi.READ,r)&&(Sr(t)?bi(mi.INITIATE_CHANGE_REQUEST,r):bi(e,r)))),gi=vi(mi.CREATE),_i=vi(mi.DELETE),Ni=vi(mi.UPDATE),Ai=hi([mi.CREATE,mi.MERGE,mi.READ,mi.UPDATE]),Pi=hi([mi.UPDATE,mi.READ,mi.CREATE]),Ri=hi([mi.UPDATE,mi.READ]),Si=hi([mi.DELETE,mi.UPDATE,mi.READ]),wi=(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["*"])),Ii=(e,t,r)=>(0,l.pipe)((0,l.map)(wi(e,t)),(0,l.filter)(l.identity))(r),Ui=(e,t,r)=>{const n=Ii(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&bi(mi.MERGE,r)},Ci=(0,l.curry)(((e,t,r,n)=>{const i=ci(e,n),[a,o]=di(e,n);return i&&bi(mi.CREATE,i)&&jr(e,a,t.type)&&jr(e,o,r.type)})),Li=(e,t,r,n,i)=>{const a=Cr(e,n.type),o=Ii(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(Ci(e,n,i))||a.some(Ci(e,i,n))}))},ji=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Cr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ui(o,i,a),canAddRelation:Li(e,o,i,r,n),canMark:bi(mi.UPDATE,a)&&bi(mi.READ,a)}},Di=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>ji(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),ki=Yt,Mi=(0,l.complement)(ki),Fi=bi(mi.READ),xi=e=>{let{attributeType:t,mode:r}=e;return Mi(t)&&gi(r,t)&&!Ht(t)},$i=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=mt(r.uri),o=Ni(n),s=gi(n);return(0,l.cond)([[ki,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},Vi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=mt(r.uri),s=Ni(n),u=_i(n),c=Wi(mi.UPDATE,n,a,r),p=Wi(mi.DELETE,n,a,r);return(0,l.cond)([[ki,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)},Gi=(0,l.curry)(((e,t,r,n)=>{const i=or(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=>!Oi(e,n)||!Gi(e,t,r[n.name],n)))))})),Wi=(0,l.curry)(((e,t,r,n,i)=>Sr(t)?Gi(mi.INITIATE_CHANGE_REQUEST,r,n,i):Gi(e,r,n,i))),Yi=(0,l.both)((0,l.complement)(Ht),Fi),Bi="SuperUser",qi="allTenants",Hi=[qi,"allCustomers"],Qi=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===Bi})).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===Bi){const e=r?Hi.concat(r.map((e=>`allTenants.${e}`))):Hi,n=r&&t[0]===qi?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}))},Ki={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"},Ji={[Ki.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[Ki.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[Ki.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[Ki.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[Ki.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[Ki.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[Ki.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[Ki.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[Ki.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[Ki.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[Ki.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[Ki.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[Ki.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[Ki.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[Ki.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[Ki.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[Ki.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[Ki.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[Ki.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[Ki.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[Ki.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[Ki.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[Ki.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[Ki.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[Ki.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[Ki.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Xi=(0,l.curry)(((e,t,r)=>Qi({allowedPermissionsNames:e,permissionsNames:Ki,permissionsConfig:Ji}).some((e=>e(t,{params:{tenant:r}}))))),zi=Xi([Ki.CAN_EXPORT]),Zi=Xi([Ki.CAN_EXPORT_ACTIVITIES]),ea=Xi([Ki.CAN_IMPORT_ENTITIES_FROM_DT]),ta=Xi([Ki.CAN_READ_ENTITIES_FROM_DT]),ra=Xi([Ki.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),na=Xi([Ki.CAN_UPDATE_PROCESS_INSTANCE]),ia=Xi([Ki.CAN_VIEW_WORKFLOW_DEFINITION]),aa=Xi([Ki.CAN_CONFIG_ENVIRONMENT_REGISTER]),oa=Xi([Ki.CAN_UPDATE_WORKFLOW_DATA_TASK]),sa=Xi([Ki.CAN_READ_WORKFLOW_DATA_TASK]),la=Xi([Ki.CAN_MANAGE_WORKFLOW_DEFINITION]),ua=Xi([Ki.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),ca=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),pa=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),da=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),ya=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),fa=Xi([Ki.CAN_EXECUTE_WORKFLOW_JOBS]),Ta=Xi([Ki.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Ea=Xi([Ki.CAN_CREATE_CONFIG_JAR]),ma=Xi([Ki.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),ha=Xi([Ki.CAN_VIEW_CONFIG_JAR]),ba=Xi([Ki.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Oa=Xi([Ki.CAN_VIEW_WORKFLOW_JOBS]),va=Xi([Ki.CAN_MAKE_BULK_UPDATE]),ga=Xi([Ki.CAN_OPEN_DATA_LOADER_EXECUTE,Ki.CAN_OPEN_DATA_LOADER_READ]),_a=Xi([Ki.CAN_BULK_DELETE_PROFILES]),Na=Xi([Ki.CAN_READ_MDM_DATA_ENTITIES]),Aa=Xi([Ki.CAN_READ_DVF]),Pa=Xi([Ki.IS_FREEMIUM_ADMIN]),Ra=(0,l.reject)(Ht),Sa=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),Ra,(0,l.filter)(e))(t),wa=(0,l.curry)(((e,t)=>Sa((t=>xi({attributeType:t,mode:e})),t))),Ia=(0,l.curry)(((e,t)=>Sa((t=>xi({attributeType:t,mode:e})||Yi(t)),t))),Ua=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(Yi)),Ca=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ca(e)])))),La=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(Yi),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...La(e)])))),ja=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...ja(e)])))),Da=(0,l.pipe)(Cr,(0,l.converge)(l.concat,[La,ja]));function ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ma(e,t,r[t])}))}return e}function Ma(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fa=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,Fa(e)))},t))),xa=e=>{var t;return ka({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},$a=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),Va=(0,l.when)($a,(0,l.dissoc)("values")),Ga=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return ka({},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})})),Wa=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},Ya=(0,vr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ca,t).concat((0,l.chain)(Ca,r)).some(Wa)})),Ba=e=>{let t=!1;const r=Fa((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?ka({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},qa=e=>{const t=Ya(e),r=(0,l.map)((e=>Fa((0,l.pipe)(Va,(0,l.when)((0,l.always)(e),Ga))))(t)),n=(0,l.map)(xa),i=(0,l.map)(Ba);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},Ha=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Qa=(0,l.prop)("relationshipTypeURIs"),Ka=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(Ja(e,t)))||[]})),Ja=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(yi(e,t))},Xa=(e,t)=>(0,l.pipe)(Ha,(0,l.defaultTo)({}),Qa,(0,l.defaultTo)([]),(0,l.chain)(di(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Cr(e)))(e,t),za=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),Za=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Za((0,l.complement)(za))(e)},to=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Za(za)(e)},ro=(0,l.pipe)(Cr,(0,l.propOr)([],"matchGroups")),no=(e,t,r)=>(0,l.pipe)(ro,(0,l.find)((0,l.propEq)("uri",r)))(e,t),io=(0,l.curry)(((e,t,r)=>(0,l.pipe)(no,(0,l.propOr)(r,"label"))(e,t,r))),ao=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(ro,(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]})),oo=e=>(0,l.partition)(za,e),so=(0,l.includes)(l.__,["and","or","not"]),lo=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),uo=(0,l.includes)(l.__,["equals","notEquals","in"]),co=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return so(t)?co(r):lo(t)?r.filter(_t):uo(t)?r.map((0,l.prop)("uri")).filter(_t):[]})),l.uniq),po=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(co),l.uniq),yo=(0,l.pipe)(ro,po),fo=(0,l.pipe)(ao,po),To=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Eo=(0,l.pipe)(To,La),mo=(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||jr(e,n,t)})(e,t))})(e,t)),ho=e=>!!e.required,bo=(e,t,r)=>{const n=(0,l.cond)([[_t,Cr(e)],[Nt,ci(e)]])(t);return Oo(e,n,r)},Oo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&_t(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!Wt(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===Ze.TYPE_REFERENCE){const n=nt(t),a=it(t);i=bo(e,n,r).filter((e=>a.some(At(e.uri))))}else t.attributes&&(i=Oo(e,t,r));i&&n.push(...i)}return n})):t.type===Ze.TYPE_REFERENCE?bo(e,nt(t),r):[],vo=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),ho]),e.attributes||[])},go=(e,t)=>{const r=st(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},_o=(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)?rn().text(n):n};return r(null,t)})),No=["label","description","abbreviation","caption","toolTip"],Ao=e=>_o(No,e),Po=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Rt(t);return r.find((e=>{let{uri:t}=e;return Rt(t)===n}))})),Ro=(0,l.curry)(((e,t)=>{const r=Rt(t);return(0,l.pipe)(Po(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),So=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"})},wo=(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}))},Io=(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)})),Uo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Cr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));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 jo=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 Do(i,e,t,r,n)},Do=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:or(t,r)).map((e=>e.map((e=>{const r=jo(t,e,n,i);return r.length?Co({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(zt),(0,l.prop)("children"))).filter(Yi).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},ko=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["attributes","analyticsAttributes"])},Mo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["attributes"])},Fo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return jo(e,t,r,["analyticsAttributes"])},xo=e=>e.children?e.children.flatMap(xo):e,$o=e=>e.children?[e,...e.children.flatMap($o)]:e,Vo=(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)})),Go=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Rt(r)===e})))),Wo=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),Go("LUD")),(0,l.defaultTo)(r))(t||[])},Yo=(e,t)=>{let{survivorshipStrategies:r}=e;return Go(t,r)},Bo=(0,l.allPass)([(0,l.complement)(l.isNil),bi(mi.READ)]),qo=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),bi(mi.READ)]),Ho=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),(0,l.anyPass)([bi(mi.CREATE),bi(mi.INITIATE_CHANGE_REQUEST)])]),Qo=(0,l.curryN)(2,(0,l.pipe)(Cr,qo)),Ko=(0,l.curryN)(2,(0,l.pipe)(ci,Bo));function Jo(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 Xo(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Jo(r[i],r[i+1],e,t));return n}function zo(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Xo(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 zo(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 Zo(e,t,r,n,i,a){void 0===a&&(a=0);var o=Xo(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()?(es(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(es.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=zo(e,t,r,n,i,a),s}var c=Zo(e,o,o.valueUri,{},i,a);Zo(c,t,r,n,i,a+1)}function es(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function ts(e,t,r,n){void 0===n&&(n=0);var i=Xo(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&ts(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 rs(e,t){e.roles=t||[]}function ns(e,t){e.tags=t||[]}function is(e,t){e.startDate=t||""}function as(e,t){e.endDate=t||""}const os=e=>{let{ov:t}=e;return!1!==t},ss=(e,t)=>((e,t)=>mr(e.type)&&ae(t))(e,t)||((e,t)=>hr(e.type)&&oe(t))(e,t),ls=(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))),us=ls("refEntity"),cs=ls("refRelation"),ps=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ds=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},ys=(0,l.prop)("objectURI"),fs=(0,l.prop)("objectURI"),Ts=(0,l.prop)("type"),Es=(0,l.pipe)(us,(0,l.defaultTo)({}),ys),ms=(0,l.pipe)(cs,(0,l.defaultTo)({}),fs),hs=(0,l.pipe)(us,(0,l.defaultTo)({}),Ts),bs=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Os=(0,l.evolve)({refEntity:re,refRelation:re}),vs=(e,t,r,n)=>{const i=ir(e,r),a=Cr(e,t.type)||ci(e,t.type);if(0===i.length)return null;const o=qt(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(!ct(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=>nt(e)===r.uri||rt(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},gs=(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?gs(a.value,o):a},_s=(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 gs(e[r],i)})),Ns=(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")]]),As=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","ov"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","ov"])],[l.T,(0,l.pick)(["value","ov"])]]),Ps=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.when)((()=>i.length>0),(0,l.pipe)((0,l.map)((0,l.prop)("value")),(0,l.map)(Ps(e,i)))))(r)})),Rs=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Rs(e)),e)(t))),Ss=(0,l.curry)(((e,t,r,n)=>(0,l.pipe)(Ps(e,r),Rs(t))(n))),ws=Ss(null,Ns),Is=Ss(os,Ns),Us=Ss(null,As),Cs=Ss(os,As),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=_s(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},js=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Es,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Ds=(e,t)=>{const r=kt(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Ls(e,r,n)},ks=Object.values(on),Ms=(0,l.includes)(l.__,ks),Fs=e=>ks.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$s(e,t,r[t])}))}return e}function $s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vs=(e,t)=>`${e}_${t}`,Gs=[En.matches.name,En.matchRules.name],Ws=(0,l.values)(ln).map((e=>e.name)),Ys=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Ws)))),Bs=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Gs)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>Vs(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),qs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Ys(r),Bs(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(Vs(`dtPotentialMatches.${t.name}`,"")))))(En)},Hs=(0,l.propEq)("uri",En.type.uri),Qs=e=>(0,l.values)(Tn).some((0,l.propEq)("uri",null==e?void 0:e.uri)),Ks=(0,l.propEq)("uri",yn.sourceSystems.uri),Js=Object.values(sn),Xs=(0,l.includes)(l.__,Js),zs=e=>{let{entity:t,attributeType:r,value:n}=e;return xs({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Zs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},el=e=>{let{entity:t,attributeType:r,value:n}=e;return xs({},t,{[r.uri]:n})},tl=(0,l.propEq)("uri",sn.roles.uri),rl=(0,l.propEq)("uri",sn.tags.uri);function nl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){il(e,t,r[t])}))}return e}function il(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const al=e=>{let{parentUri:t,attributeType:r}=e;return nl({uri:Et(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[zt,(0,l.always)({value:{}})],[tr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),ur)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},ol=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(wa(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),rr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=al({parentUri:r,attributeType:e});let s=or(n,e);s&&(e.type===Ze.TYPE_REFERENCE&&(s=ut(s)),a.value=ol({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||rr(e))&&(o[t]=[a])}return o},sl=e=>{let{entity:t,metadata:r}=e;return bo(r,t.type,!0).filter(rr).reduce(((e,t)=>{const n=t.name,i=kt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:vs(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:ul({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},ll=(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===Ze.TYPE_NESTED?nl({},e,{value:ll({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return nl({},s(t),ol({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),ul=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=al({parentUri:n,attributeType:r}),u=Ns(l);return(0,Ee.ZP)(t,(e=>{zo(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},cl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{zo(e.attributes||e.value,r,n.uri,Ns(n),a,o,i)}))},pl=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{Zo(e.attributes||e.value,r,n,i,a,o)}))},dl=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Ee.ZP)(t,(e=>{ts(e.attributes||e.value,r,n,i)}))},yl=e=>""===e,fl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([yl,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([yl,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]]),Tl=(0,l.reject)(fl),El=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=>El({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Tl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},ml=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return El({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Os),deleteEmptyComplex:e})},hl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(ml(e),(0,l.reject)(l.isEmpty))},bl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Ms(r)?zs({entity:e,attributeType:r}):ul({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Ol=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Ms(r)?el({entity:e,attributeType:r,value:i}):pl({entity:e,attributeType:r,uri:n,value:i})})),vl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Ms(r)?Zs({entity:e,attributeType:r}):dl({entity:e,attributeType:r,uri:n})})),gl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},_l="UrlThumbnail",Nl="CdnUrlThumbnail",Al=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(os):(0,l.head)(n);return e&&e.value}return null})),Pl=(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=Pl(["CdnUrl","Url"],!0),Sl=Pl(["CdnUrlPreview","UrlPreview"],!0),wl=Pl([Nl,_l],!0),Il=Pl([Nl,_l]),Ul=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[Bt,(0,l.always)(t)],[(0,l.both)(Yt,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=Bt(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Ms(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)}),[])},Cl=(e,t,r)=>{const n=Ua(e),i=(0,l.any)(r?l.T:os);return Ul(n,t,i)},Ll=(e,t,r,n,i,a)=>{const o=mt(null==r?void 0:r.uri)?wa(t,e):Ia(t,e);return Ul(o,r,((e,o)=>{const s=xi({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:os,e)||Bt(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let jl;const Dl=e=>{jl=e};function kl(e,t){return jl(e,t)}const Ml=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,xl=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=Fl,offset:a=0}=e;return kl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},$l=(0,l.once)((()=>kl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),Vl=e=>kl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Gl=(e,t)=>kl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Wl=e=>Z.fromNull(Gr[e]).map(rn().text).orSome(""),Yl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Bl=(0,l.split)("_"),ql=(0,l.includes)("_"),Hl=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),Ql=(0,l.curry)(((e,t)=>e.some(Hl(t)))),Kl=Ql([$r.IN_RANGE,$r.COUNT_RANGE,$r.WITHIN]),Jl=Ql([$r.EXISTS,$r.MISSING_VALUE]),Xl=(0,l.cond)([[Jl,(0,l.always)(0)],[Kl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),zl=(0,l.complement)(Jl),Zl=Ql([$r.HAS_ALL,$r.EQUALS,$r.NOT_EQUALS]),eu=Ql([$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE]),tu=Ql([$r.IN_FILE,$r.NOT_IN_FILE]),ru=e=>{switch(e){case $r.COUNT_EQUALS:return $r.EQUALS;case $r.COUNT_NOT_EQUALS:return $r.NOT_EQUALS;case $r.COUNT_LT:return $r.LT;case $r.COUNT_LTE:return $r.LTE;case $r.COUNT_GT:return $r.GT;case $r.COUNT_GTE:return $r.GTE;case $r.COUNT_RANGE:return $r.IN_RANGE}},nu=Ql([$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS]),iu=Ql([$r.WITHIN]),au=[[$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE],[$r.NOT_IN_FILE,$r.IN_FILE],[$r.EQUALS,$r.NOT_EQUALS,$r.HAS_ALL],[$r.LT,$r.LTE,$r.GT,$r.GTE],[$r.MISSING_VALUE,$r.EXISTS],[$r.COUNT_RANGE],[$r.IN_RANGE],[$r.STARTS_WITH,$r.CONTAINS],[$r.FULL_TEXT],[$r.ON,$r.BEFORE,$r.AFTER,$r.NOT_EQUALS],[$r.WITHIN]],ou=(e,t)=>au.some((r=>r.includes(e)&&r.includes(t))),su=(0,l.pipe)(l.omit,l.values),lu={OPTIONS_FOR_STRING:su(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_DATE:[$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS,$r.MISSING_VALUE,$r.EXISTS,$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE,$r.IN_FILE,$r.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:su(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_BLOB:su(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_NUMBER:su(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_LOOKUP:su(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],$r),OPTIONS_FOR_ENUM:su(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],$r),OPTIONS_FOR_ID:[$r.EQUALS,$r.NOT_EQUALS,$r.IN_FILE,$r.NOT_IN_FILE],OPTIONS_FOR_COUNT:[$r.EQUALS,$r.NOT_EQUALS,$r.LT,$r.LTE,$r.GT,$r.GTE,$r.IN_RANGE],OPTIONS_FOR_COMPLEX:[$r.COUNT_EQUALS,$r.COUNT_NOT_EQUALS,$r.COUNT_LT,$r.COUNT_LTE,$r.COUNT_GT,$r.COUNT_GTE,$r.COUNT_RANGE,$r.EXISTS,$r.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[$r.EQUALS,$r.NOT_EQUALS,$r.EXISTS,$r.MISSING_VALUE]},uu=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case Ze.TYPE_TYPEAHEAD:case Ze.TYPE_STRING:case Ze.TYPE_PASSWORD:case Ze.TYPE_TEXT:case Ze.TYPE_CIK_ID:case Ze.TYPE_URL:case Ze.TYPE_BLOG_URL:case Ze.TYPE_IMAGE_URL:case Ze.TYPE_EMAIL:return lu.OPTIONS_FOR_STRING;case Ze.TYPE_LOOKUP:case Ze.TYPE_DEPENDENT_LOOKUP:return lu.OPTIONS_FOR_LOOKUP;case Ze.TYPE_ENUM:return lu.OPTIONS_FOR_ENUM;case Ze.TYPE_DATE:case Ze.TYPE_ACTIVENESS_DATE:case Ze.TYPE_TIMESTAMP:case Ze.TYPE_LOCAL_DATE:return lu.OPTIONS_FOR_DATE;case Ze.TYPE_BOOLEAN:case Ze.TYPE_BOOLEAN_RADIO:return lu.OPTIONS_FOR_BOOLEAN;case Ze.TYPE_BLOB:return lu.OPTIONS_FOR_BLOB;case Ze.TYPE_LONG:case Ze.TYPE_INT:case Ze.TYPE_FLOAT:case Ze.TYPE_DOUBLE:case Ze.TYPE_NUMBER:return lu.OPTIONS_FOR_NUMBER;case Ze.TYPE_ENTITY_ID:return lu.OPTIONS_FOR_ID;case Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[$r.EQUALS];case Ze.TYPE_COUNT:return lu.OPTIONS_FOR_COUNT;case Ze.TYPE_NESTED:case Ze.TYPE_REFERENCE:case Ze.TYPE_IMAGE:return lu.OPTIONS_FOR_COMPLEX;default:return lu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(eu,n):n},cu=e=>[Pe.and,Pe.andNot].includes(e),pu=e=>[Pe.or,Pe.orNot].includes(e),du=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),pu)),yu=(fu=[Pe.and],e=>e.slice(0,-1).every((e=>fu.includes(e.operator))));var fu;const Tu=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Eu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),mu=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},hu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[Pe.or,Pe.orNot],n=t?[Pe.and,Pe.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)&&mu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},bu="and",Ou=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)(bu,n,e),o=(e=>[Pe.andNot,Pe.orNot].includes(e))(a)?hu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},vu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),gu=e=>Array.isArray(e)?e.map(gu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),_u=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),Nu=e=>`'${e}'`,Au=e=>`"${e}"`,Pu=(0,l.pipe)(gu,_u),Ru=(0,l.pipe)(Pu,Nu),Su=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Kl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),wu=(e,t)=>eu(t)?{type:Ze.TYPE_INT}:tu(t)?{type:Ze.TYPE_FILE}:nu(t)&&!iu(t)&&cr(e.type)?{type:Ze.TYPE_LOCAL_DATE}:e,Iu=Object.values(Kr),Uu=e=>!Object.values(Kr).includes(e),Cu=e=>Iu.includes(e),Lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jr;return rn().text(t[e])},ju=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.values(Hr),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jr;return e.map((e=>({value:e,get label(){return Lu(e,t)}})))},Du=e=>{const t=f()().startOf("minute");switch(e){case Hr.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case Hr.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case Hr.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case Hr.LAST_6MONTHS:return[f()(t).subtract(6,"months").valueOf(),t.valueOf()];case Hr.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()];case Qr.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];default:return e}},ku=e=>{let[t,r]=e;return[f()(t).valueOf(),f()(r).endOf("date").valueOf()]},Mu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;return(0,l.is)(String,e)?t(e):ku(e)};let Fu;!function(e){e.CurrentUser="currentUser"}(Fu||(Fu={}));const xu={},$u=(e,t)=>{xu[e]=t},Vu=e=>xu[e];function Gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wu(e,t,r[t])}))}return e}function Wu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Yu=e=>e.split("{CurrentUser}").join(Vu(Fu.CurrentUser)||""),Bu=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),qu=(0,l.curry)(((e,t,r)=>{const n=r.map(Kl(e)||t.endsWith(".count")?Pu:Ru).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Hu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Qu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Xl(t);return(0,l.pipe)(Hu(i),(0,l.map)(qu(t,r)),Bu(" or "))(n)},Ku=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Ru).join(",")})`},Ju=e=>`*${e}*`,Xu=e=>`URL:${e}`,zu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Zu=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===$r.IN_FILE?r:`not ${r}`},ec=(e,t)=>[R(e,t),S(e,t)],tc=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!rc(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case $r.ON:return Gu({},e,n?{filter:$r.EQUALS}:{filter:$r.IN_RANGE,values:[ec(i,n)]});case $r.BEFORE:return Gu({},e,{filter:$r.LTE,values:[[S(i,n)]]});case $r.AFTER:return Gu({},e,{filter:$r.GTE,values:[[R(i,n)]]});case $r.WITHIN:return Gu({},e,{filter:$r.IN_RANGE,values:[Du(i)]})}}return e}),Qu),rc=(0,l.propSatisfies)(cr,"type"),nc=[[(0,l.prop)("rawFilter"),(0,l.pipe)((0,l.prop)("rawFilter"),Yu)],[(0,l.propEq)("filter",$r.HAS_ALL),(0,l.pipe)((e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Qu({filter:$r.EQUALS,fieldName:t,values:[r]}))),new Ou).build())),Bu(" or "))(r)}),Yu)],[(0,l.propEq)("filter",$r.CONTAINS),(0,l.pipe)((e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:r,filter:t,values:n.map((0,l.pipe)(gu,Ju))})}),Yu)],[(0,l.propEq)("filter",$r.EQUALS),(0,l.pipe)((e=>{const{fieldName:t,values:r}=e;return"type"===t?Qu(Gu({},e,{values:(0,l.flatten)(r)})):zu(r)?Ku(Gu({},e,{filter:"listEquals"})):Qu(e)}),Yu)],[(0,l.propEq)("filter",$r.NOT_EQUALS),(0,l.pipe)((e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Xl(t);return(0,l.pipe)(Hu(i),(0,l.map)(qu(t,r)),Bu(" and "))(n)})(Gu({},e,{values:(0,l.flatten)(e.values)})):rc(e)?(e=>{const{values:t}=e,r=!rc(e),[n]=t;return(new Ou).addClause(Qu(Gu({},e,{filter:$r.LT,values:[R(n,r)]}))).addClause(Qu(Gu({},e,{filter:$r.GT,values:[S(n,r)]}))).orBuild()})(e):zu(t)?Ku(Gu({},e,{filter:"not listEquals"})):Qu(e)}),Yu)],[(0,l.propSatisfies)(tu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:r,filter:Zu(t,r),values:n.map((0,l.prop)("link")).map(Xu)})}],[(0,l.propSatisfies)(eu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Qu({fieldName:`${r}.count`,values:n,filter:ru(t)})}],[(0,l.propSatisfies)(nu,"filter"),tc],[(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 qu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return qu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,(0,l.pipe)(Qu,Yu)]],ic=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!zl(e)||oc(e,r))},ac=(e,t)=>Array.isArray(t)?oc(e,t):e===$r.WITHIN?Cu(t)||Number.isInteger(t):!(0,l.isNil)(t)&&gu(t).length>0,oc=(e,t)=>t&&t.length>0&&t.every((t=>ac(e,t)));function sc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lc=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},uc=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),cc=(e,t,r)=>"children"===e?dc(r,[...t][0],!0):r,pc=(e,t,r)=>"values"===e?[...r,...t]:r,dc=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)(cc,t),e);if(!r&&Zl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(pc,t),e)}return(0,l.append)(t,e)},yc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=lc(e),r=e=>e.fieldName===t?e:r({fieldName:uc(e),children:[e]});return r(e)})(t);return dc(e,r)}),[]),fc=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")),Tc=e=>{let[t]=e;return t.children?Tc(t.children):t.operator},Ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=Tc(t)===Pe.andNot,a=n(t,!1),o=i?`not ${hu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Tc(r)||bu} ${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&&fc(i)&&!t?r(i):n(i,a)}],...e])(o))),new Ou).buildWithOperators(i.map((0,l.prop)("operator")))}return n},mc=(0,l.pipe)((0,l.propOr)("","filter"),ql),hc=(0,l.map)((0,l.when)(mc,(e=>{const[t,r]=Bl(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){sc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),bc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(ic),hc,yc,Ec([...e,...nc],t))},Oc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),vc=[$r.ON,$r.BEFORE,$r.AFTER,$r.WITHIN,$r.NOT_EQUALS,$r.MISSING_VALUE,$r.EXISTS],gc=[$r.EQUALS,$r.NOT_EQUALS,$r.STARTS_WITH,$r.MISSING_VALUE,$r.HAS_ALL,$r.FULL_TEXT,$r.EXISTS],_c=[$r.EQUALS,$r.NOT_EQUALS,$r.LT,$r.LTE,$r.GT,$r.GTE,$r.IN_RANGE],Nc=(e,t)=>{const r=Gt(e);return(e=>{switch(e){case on.startDate.name:case on.endDate.name:case ln.dueDate.name:case pn.createdTime.name:case pn.updatedTime.name:case yn.reltioLoadDate.name:case yn.createDate.name:case yn.updateDate.name:case yn.deleteDate.name:case yn.publishDate.name:return vc;case dn.matches.name:case yn.count.name:return _c;case ln.workflow.name:case ln.assignee.name:case ln.step.name:case un.commenter.name:case pn.createdBy.name:case pn.updatedBy.name:case yn.sourceSystems.name:case yn.value.name:return gc;default:return null}})(t)||uu(r)},Ac=[$r.EQUALS,$r.NOT_EQUALS,$r.CONTAINS,$r.STARTS_WITH,$r.MISSING_VALUE,$r.HAS_ALL,$r.IN_RANGE,$r.WITHIN,$r.EXISTS,$r.ON],Pc=(0,l.pipe)(Nc,(0,l.filter)((0,l.includes)(l.__,Ac))),Rc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Sc=e=>{let{query:t,body:r}=e;return t=Rc(t),kl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},wc=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)(bc(),Oc(t.globalFilter))(n),activeness:t.activityFilter||zr.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Ar(i)}`},Ic=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=wc(e,t,r);return kl(n)},Uc=e=>kl(`/entities/_total?${e}`),Cc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(qo),(0,l.map)((0,l.prop)("uri")))(e),i={filter:$r.EQUALS,fieldName:"type",values:n},a=r.isRawFilter?{rawFilter:t}:{filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(bc(),Oc(r.globalFilter))([i,a]),s=Ar({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||zr.ACTIVE_ONLY,max:r.max||4});return kl("/entities/_typeAheadSearch"+s,{method:"GET"})},Lc=(0,l.pipe)((0,l.reject)(l.isNil),Nr),jc=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)(bc(),Oc(i))(r),p=Lc({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Sc({query:p,body:d})},Dc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return jc({fieldName:t,searchParams:i,options:n})};function kc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Fc=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)(bc(),Oc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Mc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Ar(i)}`},xc=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=Fc(e,t,r);return kl(n)},$c=e=>qc(e,{select:"secondaryLabel"}),Vc=(e,t)=>{const{select:r=Mc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),kl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Gc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),mt)),Wc=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=Gc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Zt(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)(bc(),Oc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),kl(`${s}/api/${o}/${t}/_object`,m)},Yc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Bc={options:"sendHidden,addRefAttrUriToCrosswalk"},qc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bc;return kl(`/${e}${Ar(t)}`)},Hc=(e,t)=>qc(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){kc(e,t,r[t])}))}return e}({},Bc,{explicitSurvivorshipGroup:t})),Qc=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 kl(n,r)},Kc=e=>kl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Jc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return kl(`/${e}/_clone${Ar({executeLCA:!1,valuesToCopy:r})}`,n)},Xc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return kl(`/entities/_events/_total${Nr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},zc=(e,t)=>kl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Zc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return kl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},ep=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 kl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Nr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},tp=e=>{const t=new FormData;return t.append("file",e),kl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,rn().text("Can't upload file"));return Promise.reject(t)}))},rp=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 kl(`/personal/findSavedSearches${Nr({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"}})},np=e=>kl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),ip=e=>kl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),ap=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return kl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},op=e=>{let{uri:t}=e;return kl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},sp=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),ap)(e),lp=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),ap)(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=["max","offset","filter"],pp=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:pp(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){up(e,t,r[t])}))}return e}({},t,(0,l.pick)(cp,e)))),dp=e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Ae.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Ae.ALL,e)))return!1},yp=(0,l.omit)(["activeness"]),fp=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=dp(t),{searchByOv:i}=r;t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(pp(e),(0,l.omit)(cp))(e))),yp,(0,l.omit)(["labels"])))(t);const a={limitCreditsConsumption:!0,activeness_enabled:n,options:i?"searchByOv":void 0},o=`/${e}/_connections${Ar(a)}`,s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)};return{url:o,options:s}},Tp=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Ep=(0,l.reject)(l.isNil),mp=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),hp=e=>kl(mp(e),{method:"GET",headers:{"Content-Type":"application/json"}}),bp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,mp);return kl(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?hl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Ep,ne,JSON.stringify);return kl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},vp=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"),mp,n),o=qE(i(t),i(r)).concat(QE(t,r));return kl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},gp=(e,t,r)=>{const{url:n,options:i}=fp(e,t,r);return kl(n,i).then(Tp)},_p=(e,t)=>kl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),Np=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===en.IN?a.inRelations=[n]:a.outRelations=[n],kl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Ap=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return kl(`${t}/recentSearches${Ar({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},Pp=e=>kl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Rp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return kl(`/recentSearches${Ar({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function Sp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wp(e,t,r[t])}))}return e}function wp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ip={select:"label,secondaryLabel,name,type,startDate,endDate"},Up=(0,l.reject)(l.isNil),Cp=(0,l.pipe)(Up,Nr),Lp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=Sp({},Ip,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return kl(`/${t}/_tree${Cp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},jp=e=>{let{uri:t,graphUri:r}=e;const n=Sp({},Ip,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return kl(`/${t}/_parents${Cp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Dp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=Sp({},Ip,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return kl(`/${t}/_hops${Cp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function kp(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 Mp=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},Fp="/activities",xp=e=>{let{label:t,description:r}=e;return kl(Fp,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:Mp()}})};var $p;!function(e){e.userSearch="USER_SEARCH",e.profileView="USER_PROFILE_VIEW"}($p||($p={}));const Vp=e=>{const t=Ar(e);return kl(Fp+t,{method:"GET"})},Gp=e=>kl(`/activities/_total${Ar(e)}`,{method:"GET"}),Wp=e=>{const{entityUri:t}=e,r=kp(e,["entityUri"]);return kl(`/${t}/_activities${Ar(r)}`,{method:"GET"})},Yp=e=>{const{entityUri:t}=e,r=kp(e,["entityUri"]);return kl(`/${t}/_activities/_total${Ar(r)}`,{method:"GET"})};function Bp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qp(e,t,r[t])}))}return e}function qp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Hp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Qp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return kl(Hp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Kp=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=Hp({url:r,workflowPath:t,tenant:n})),kl(s,{method:i||"GET",body:JSON.stringify(a),headers:Bp({"Content-Type":"application/json"},null!=o?o:{})})},Jp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Hp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return kl(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)},Xp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Hp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Bp({},l,{comment:o}):l;return kl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},zp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Hp({url:`/tasks${s?Ar(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Bp({objectURIs:[i]},(0,l.reject)(E,a)))};return kl(u,Bp({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Zp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return kl(Hp({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})})},ed=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return kl(Hp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Bp({max:a,offset:o},i))})},td=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return kl(Hp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},rd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return kl(Hp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},nd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},id=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return kl(Hp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},ad=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},od=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},sd=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return rd({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},ld=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return kl(Hp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},ud=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return kl(Hp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},cd=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(os);return a&&a[0]&&(r=n.length>0&&a[0].value?cd(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}}),""),pd=(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=cd(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},dd=/[,\s]*$/,yd=e=>{const t=rn().text(Zr);if(!e)return t;const r=e.replace(dd,"");return""===r.toString().trim()?t:r},fd=(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=fd(e,r.referencedEntityTypeURI);if(n)return pd({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return pd({attributes:t||{}},r.dataLabelPattern);return""},Ed=e=>{let{uiPath:t,uri:r,screen:n="profile"}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}${n}?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},md=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)}`},hd=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",bd=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),wl,(0,l.prop)("value"))),Od=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),bd),vd=(e,t,r)=>{const n=Od(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(_s(e),bd)))(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")])})(Cr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>vs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,bd))(r)})(e,r)||Fr(e,r.type);return hd(t,n)};function gd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_d(e,t,r[t])}))}return e}function _d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Nd="DTSS/",Ad=(0,l.replace)(new RegExp("^entities/"),""),Pd=e=>Nd+e.dataTenant+"/"+e.uri,Rd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),Sd=e=>!(!e||!e.dataTenant),wd=(0,l.startsWith)(Nd),Id=(0,l.pipe)((0,l.ifElse)(wd,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),Ud=(0,l.ifElse)(Sd,Pd,(0,l.prop)("uri")),Cd=e=>e&&e.uri?e.dataTenant?Pd(e):Ad(e.uri):"",Ld=(0,l.curry)(((e,t,r)=>(Cr(t,r.type)||{})[e]||"")),jd=Ld("label"),Dd=Ld("typeGraphIcon"),kd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Cr(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(os)||"");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):[]},Md=(0,l.pipe)(kd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),Fd=(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=Fd(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):Fd(e.slice(1),r)}})),xd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,$d=e=>(0,l.propOr)([],"matchRules",e),Vd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?gd({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},Gd=(e,t,r)=>t&&r?r.aEntity:e,Wd=(0,l.evolve)({attributes:hl(!0)}),Yd=(0,l.pipe)(Wd,(0,l.props)(["attributes","startDate","endDate","roles","tags"]),(0,l.all)(E)),Bd=e=>(0,l.assoc)("dataTenant",e),qd=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 kl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Nr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Hd=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 kl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Nr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Qd=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return kl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Kd=(e,t,r)=>Promise.all(t.map((async t=>await kl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),Jd=async(e,t)=>await Kd(e,t,"NOT"),Xd=async(e,t)=>await Kd(e,t,"MATCH"),zd=async(e,t)=>await Promise.all(t.map((async t=>await kl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(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}function ty(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 ry=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return kl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},ny=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return gy({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},iy=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return gy({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},ay=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return kl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},oy=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 ay({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},sy=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(Sd,i);return Promise.all([s.length?Qd(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return ay({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},ly=(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=ty(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)}),[])),uy=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),ly),cy=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return kl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(uy)},py=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)},dy=py((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return kl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(uy)})),yy=py((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return kl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),fy=(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)}},Ty=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return kl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},Ey=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 Ty(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},my=Ey("NOT"),hy=Ey("MATCH"),by=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(Sd,a);return Promise.all([Kd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return Ty(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},Oy=by("NOT"),vy=by("MATCH");function gy(e){let{requestProvider:t=kl,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}`,Zd({},ty(s,["headers"]),{headers:Zd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const _y=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return gy({url:Fc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Ny=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return gy({url:wc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Ay=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a,options:o}=e;const{searchByOv:s}=o,{options:u}=fp(t,r);return gy({url:`entities/_connections/_getConnections${Ar({dataEntityUri:t,options:s?"searchByOv":void 0})}`,options:u,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)))}))))},Py=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return gy({url:`${Yc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},Ry=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return kl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},Sy=e=>{let{dtssPath:t,tenant:r}=e;return kl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},wy=e=>{let{dtssPath:t,customerTenant:r}=e;return kl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},Iy=e=>{let{dtssPath:t,tenants:r}=e;return kl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},Uy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return gy({url:Yc(t),dataTenant:r,customerTenant:n,dtssPath:i})},Cy=()=>kl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function Ly(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jy(e,t,r[t])}))}return e}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Dy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=Ly({},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 kl(`${t}/api/${r}/graph/search${Ar({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},ky=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return kl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:Ly({},n,i),headers:{"Content-Type":"application/json"}})},My=(e,t)=>`${e}/${t}/comments`,Fy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return kl(`${My(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},xy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return kl(`${My(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},$y=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return kl(My(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},Vy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return kl(`${My(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Gy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return kl(`${My(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Wy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return kl(`${My(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Yy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return kl(`${My(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},By=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return kl(`${My(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},qy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Ar({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return kl(`${My(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Hy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Qy(e,t,r[t])}))}return e}function Qy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ky=e=>{let{tenant:t,servicesPath:r}=e;return kl(`${r}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Jy="graphExport",Xy=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(Hy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:Hy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await tf({servicesPath:e,tenant:t,environment:r,namespace:Jy,options:Hy({method:"POST"},o)})),s},zy=e=>{let{servicesPath:t,key:r}=e;return kl(`${t}/settings${Ar({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Zy=e=>{let{servicesPath:t}=e;return kl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},ef=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return kl(`${n}/plugins${Ar({tenant:t,user:r})}`,{method:"GET"})},tf=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return kl(`${n}/configService${Ar({tenant:t,environment:r,namespace:a,projection:o})}`,i)},rf=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return tf({tenant:t,environment:r,servicesPath:n,options:{method:"GET"}})},nf=e=>{let{servicesPath:t,stateHash:r}=e;return kl(`${t}/searchLink?key=${r}`,{method:"GET"})},af=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),kl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},of=e=>kl(`/${e}?showObjectsInfo=true`,{method:"GET"}),sf=e=>{let{exportPath:t,tenant:r,options:n}=e;return kl(`${t}/${r}/activities${Ar(n)}`,{method:"POST"})};function lf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uf(e,t,r[t])}))}return e}function uf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cf=e=>{const{entityUri:t}=e;return kl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},pf=e=>{let{entityUri:t,crosswalk:r}=e;return kl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},df=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return kl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[lf({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),lf({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},yf=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return kl(`/${r}/_${n}${Ar({contributorURI:t})}`,{method:"POST"})},ff=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return kl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Tf=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return kl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ef=e=>{let{entityUri:t,crosswalkId:r}=e;return kl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};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{entityTypeUri:t}=e;return kl(`/dataQuality/fillRates${Nr({entityType:Rt(t)})}`,{method:"GET"})},bf=e=>{let{attributes:t=[],metrics:r=[]}=e;const n=r.length,i=t.length*n;return i>10?10:i},Of=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){mf(e,t,r[t])}))}return e}({},n===Me.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{}),o=n===Me.ATTRIBUTE_TYPE?Nr({numberOfThreads:bf({attributes:r,metrics:i})||1}):"";return kl(`/entityType/${Rt(t)}/dataQuality/${n}${o}`,{method:"POST",body:JSON.stringify(a)})},vf=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return kl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Rt(n)}`,{method:"GET",headers:{env:i}})},gf=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=Me.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u}=e;const c={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u};return kl(`${t}/${r}/entityType/${Rt(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(c)})},_f=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return kl(`/${t}${Ar({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Nf=e=>{let{attributeUri:t,value:r}=e;return kl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Af=e=>{let{attributeUri:t,value:r}=e;return kl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},Pf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return kl(`/${t}${Ar({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},Rf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Ar({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=hl()([[{value:a}]]);return kl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Sf=e=>{let{entityUri:t,attributeName:r,value:n}=e;return kl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},wf=e=>{let{entityUri:t,attributeName:r}=e;return kl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function If(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uf=e=>{let{entityUri:t}=e;return kl(`/${t}/_historicURIs`,{method:"GET"})},Cf=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 kl(`/${t}/_changesWithTotal${Ar(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){If(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},Lf=(e,t)=>kl(`/${e}/_previousChange${Ar({timestamp:t})}`,{method:"GET"}),jf=(e,t)=>kl(`/${e}${Ar({time:t})}`,{method:"GET"});function Df(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kf(e,t,r[t])}))}return e}function kf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mf=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a}=e;return kl(t,{method:r||"GET",body:n,headers:Df({"Content-Type":"application/json"},null!=i?i:{}),noRequestProcessor:a})},Ff=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Ar({options:a.join(","),severity:o.join(",")});return kl(`${t}/validate/${i}/entity/${Cd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},xf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return kl(`${t}/validate/${n}/entity${Ar({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},$f=e=>{let{tenant:t,apiPath:r}=e;return kl(`${r}/tenants/${t}/name`,{method:"GET"})},Vf=e=>{let{tenant:t,apiPath:r}=e;return kl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},Gf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return kl(`${a}/preferences${Ar({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Wf=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 kl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Yf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return kl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},Bf=e=>{const{servicesPath:t}=e;return kl(`${t}/getTokenForWorker`,{method:"GET"})};var qf=r(29524);const Hf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=ht(),s={attributes:ol({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=vs(r,e,n.uri)[0];return i&&i.value?pl({entity:e,attributeType:n,uri:i.uri,value:t}):ul({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},Qf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Es),(0,l.filter)(mt),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Kf=(0,l.curry)(((e,t)=>{const r=Qf(e=e||{},t=t||{});return r.concat((0,l.chain)(Kf(e),r))})),Jf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),Xf=Jf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),zf=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),mt)),Zf=e=>(0,l.pipe)(Xf,zf(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),eT=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Xf,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),tT=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),mt),(0,l.omit)(["uri","timestamp"])),rT=(0,l.pipe)(tT,Wd),nT=async(e,t,r)=>{if(!e)return null;const n=Zf(e);if(n.length>0)for(const r of n)e=eT(r,t[r],e);const i=await Qc(rT(e),null==r?void 0:r.enhanceUriWithDCR),a=(e=>(0,l.path)([0,"errors"],e))(i);if(a)throw a;if((0,l.has)("changes",i))return null==r||r.updateDCRUriFromResponse(i),((e,t)=>(0,l.pipe)((0,l.prop)("changes"),l.keys,(0,l.find)((e=>!(0,l.values)(t).includes(e))))(e))(i,t);const o=(e=>(0,l.pathOr)(e,[0,"object"],e))(i);return o.uri},iT=async(e,t,r)=>{const n=oT(e,t),i={};for(const t of n)i[t]=await nT(e[t],i,r);return i},aT=(0,l.curry)(((e,t)=>{const r=qf.Node(t);return Zf(e[t]).forEach((t=>{const n=aT(e,t);r.addEdge(n)})),r})),oT=(e,t)=>(0,l.pipe)((0,l.map)(aT(e)),(0,l.map)(qf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),sT=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(tT))})),lT=(e,t)=>[...ZE(e.tags||[],t.tags||[]),...em(e.roles||[],t.roles||[]),...HE(e,t),...QE(e,t)],uT=(e,t)=>[...KE(qE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),zE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e),...lT(e,t)],cT=(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 eT(r,n,e)}),e))))}),t)}),sT),pT=(0,l.curry)(((e,t)=>(0,l.when)(mt,(0,l.propOr)(l.__,t,e),t)));function dT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yT(e,t,r[t])}))}return e}function yT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fT=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Fe.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},TT=e=>{let{relationUri:t}=e;return{type:Fe.DELETE_RELATION,parameters:{relationUri:t}}},ET=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Fe.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},mT=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Fe.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},hT=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Fe.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},bT=(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))),OT=e=>e.type===Fe.DELETE_RELATION,vT=e=>e.type===Fe.CREATE_RELATION,gT=e=>e.type===Fe.REPOINT_RELATION,_T=e=>e.type===Fe.UPDATE_RELATION,NT=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 Fe.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 Fe.DELETE_RELATION:return()=>{const{relationUri:e}=r;return bp(e,i).then(o)};case Fe.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return Np(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case Fe.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return vp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case Fe.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[TT({relationUri:o}),fT({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(RT(n)),(0,l.map)(AT),NT)(s)}}},PT=e=>t=>()=>e().then(t),RT=e=>t=>dT({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=Pr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(RT(r)),(0,l.map)(AT),(0,l.map)(PT(r.getDcrUriAwait)),NT,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},wT=e=>t=>(0,l.map)((t=>dT({},t,{parameters:(0,l.evolve)({parentUri:pT(e),entityUri:pT(e),newEntityUri:pT(e)},t.parameters)})),t),IT=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},UT=(e,t)=>{const r=e.filter(vT).find(bT(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>_T(o)&&bT(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!gT(o)||!bT(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(IT({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},CT=(e,t)=>{const r=e.filter(gT).filter(bT(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!_T(i)||!bT(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(IT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},LT=(e,t)=>{const r=e.filter(OT).filter(bT(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!bT(t,e)))},jT=(e,t)=>{const r=e.filter(_T).filter(bT(t));let n=null;const i=e.filter((e=>!r.includes(e)||!_T(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(IT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},DT=e=>{const t=e.filter(OT).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(LT,e)},kT=e=>{const t=e.filter(vT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(UT,e)},MT=e=>{const t=e.filter(gT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(CT,e)},FT=e=>{const t=e.filter(_T).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)(jT,e))(t)},xT=e=>(0,l.pipe)(DT,kT,MT,FT)(e);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){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=>$T({},(0,l.path)(eE(),e),{startDate:(0,l.path)(iE(),e),endDate:(0,l.path)(aE(),e)}),WT=(e,t)=>(0,l.pipe)((0,l.path)(nE()),pT(t))(e),YT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=WT(e,r),i=(0,l.path)(tE(),e)===xe.IN,a=e.parentEntityUri||n;return fT({parentUri:i?t:a,relation:GT(e),entityUri:i?a:t})})),...o.map((t=>{const i=WT(t,r),a=(0,l.path)(tE(),t)===xe.IN,o=i!==(0,l.pipe)((0,l.path)(eE()),a?oE:sE)(t),s=cE(e,(0,l.path)(zT(),t)),u=t.parentEntityUri||n,c=pT(r,i);return o?hT({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(eE(),t),isReversed:!1}):mT({oldRelation:(0,l.path)(eE(),s),newRelation:GT(t)})})),...i.map((e=>TT({relationUri:e}))),...s.map((e=>ET({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},BT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return $T({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),qT=(0,l.has)("dataTenant"),HT=(0,l.ifElse)(qT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),QT=(e,t)=>(0,l.pipe)(ci,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(ks),Ra)(e,t),KT=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)}},JT=(e,t,r)=>{const n=pd(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)},XT="relation",zT=(0,l.always)([XT,"relationUri"]),ZT=(0,l.always)([XT,"relationType"]),eE=(0,l.always)([XT,"object"]),tE=(0,l.always)([XT,"direction"]),rE=(0,l.always)([XT,"object","attributes"]),nE=(0,l.always)(["entity","entityUri"]),iE=(0,l.always)([XT,"startDate"]),aE=(0,l.always)([XT,"endDate"]),oE=(0,l.path)(["startObject","objectURI"]),sE=(0,l.path)(["endObject","objectURI"]),lE=(0,l.path)(["startObject","objectTypeURI"]),uE=(0,l.path)(["endObject","objectTypeURI"]),cE=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(zT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=cE(r.connections,t);if(e)return e}}},pE=(0,l.pipe)(cE,(0,l.path)(eE())),dE=(0,l.allPass)([(0,l.pipe)((0,l.path)(nE()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(ZT()),(0,l.complement)(E))]),yE=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:bt()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=EE({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=fE(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?KT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},fE=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:en.IN}:{type:t[0],direction:en.OUT}:null},TE=e=>e.uri||e,EE=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&gi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===en.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"],Cr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Cr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(TE,ci(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(en.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(en.OUT)),(0,l.map)(u))},t)||{}},mE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Ti({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=di(e,n.uri);return n&&(!t||jr(e,i,t))&&(!r||jr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Cr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Cr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(Bo,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)}},hE=(0,l.curry)(((e,t,r,n,i)=>{const a=jr(n,l.__,t.type),o=e?uE:lE,s=jr(n,l.__,r.type),u=e?lE:uE;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),bE=(e,t,r)=>{const n=e?uE:lE,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(jr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function OE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vE(e,t,r[t])}))}return e}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{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return OE({},t,{[r]:{parents:n,children:i}})},_E=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return OE({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},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=Qf(t,i),o=gE({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)},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)(zT(),n),a=t?_E({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(nE(),n),s=mt(o)?[o]:[],u=gE({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>NE(t,r,[i],e)),u)}),n)},PE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return AE(r,e,t,NE(e,t))},RE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return PE(t,r,n);if(vt(e)){const t=cE(n,e);return t&&AE([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))))},wE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>wE(e,t))))},IE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=Ot(t),u=PE(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=cE(i,c),!s)return null;o.push({type:ve.relationConnection,value:s,valueType:ci(a,(0,l.path)(ZT(),s))});continue}if(vt(u)){const e=n[c];if(!e)return null;o.push({type:ve.tempEntity,value:e,valueType:Cr(a,e.type)});continue}const p=n[u],d=js(p,c),y=n[c];if(!d||!y)return null;o.push({type:ve.attributeValue,value:d,valueType:ar(a,Ut(d.uri,p.type))}),o.push({type:ve.tempEntity,value:y,valueType:Cr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},wE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=vt(s),d=p?pE(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?ci(a,d.type):Cr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:or(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:ve.tempEntity,value:T,valueType:Cr(a,T.type)}),o.push({type:ve.attributeValue,value:s,valueType:E}),m=s.value;const l=Es(s);T=l&&mt(l)?n[l]:null}}return o},UE=e=>e.every((e=>{let{type:t}=e;return[ve.attributeValue,ve.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===ve.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,CE=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(CE(e))}))}))),t},LE=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(ME,t),(0,l.propOr)([],"crosswalks",e))),e),jE=(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(jE(e))}))})),r},DE=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=DE(e);r>t&&(t=r)}))})),t+1):t},kE=(e,t)=>{if(mt(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},ME=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},FE=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},xE=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},$E=(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)},VE=(0,l.eqBy)(ME),GE=(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)(cs,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e))));function WE(e){return e&&void 0!==e.uri}function YE(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function BE(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function qE(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(qE(d.value,y.value,r)):"Reference"===g(d)?BE(d,y)?o.push.apply(o,qE(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 HE(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)||WE(r)&&WE(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function QE(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 KE(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var n="configuration/sources/Reltio",i="configuration/sources/ReltioCleanser";function a(e,t){return e.crosswalk={type:t.type,value:t.value},e}function o(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function s(e){return e.removeIt=!0}var l=e.map((function(e){if(e.crosswalk)return[e];var o=JE(t,e.uri),s=o.filter((function(e){return e.type===n})),l=o.filter((function(e){return e.type!==n})),u=[];switch(e.type){case"INSERT_ATTRIBUTE":u.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":u=u.concat(o.map((function(t){return a(e,t)})));break;case"DELETE_ATTRIBUTE":(l.length||0==s.length)&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),u=u.concat(s.map((function(t){return a({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":{const o=l.some((e=>{let{type:t}=e;return t===i}))&&r?XE(r,t,e.uri):null;if(o||s.length){if(s.length)u=u.concat(s.map((function(t){return a({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)})));else if(o){var c=JE(t,o.uri).filter((e=>{let{type:t}=e;return t===n}));u=u.concat(c.map((t=>a({type:"UPDATE_ATTRIBUTE",uri:o.uri,newValue:e.newValue},t))))}}else u.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});l.length&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}});break}}return u})),u=[].concat.apply([],l),c=o(u,"typeUri");for(var p in c)if("undefined"!==p){var d=c[p],y=u.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===p||"INSERT_ATTRIBUTE"===e.type&&e.uri===p})),f=d.filter((function(e){return e.crosswalk&&e.crosswalk.type===n}))[0],T=y.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0];!T&&f&&(u.push({type:"UPDATE_ATTRIBUTE",uri:f.uri,newValue:{value:f.value},crosswalk:f.crosswalk}),y.forEach(s)),d.forEach(s)}return(u=u.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),u}const JE=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),XE=(e,t,r)=>(0,l.pipe)(Ds,(0,l.defaultTo)([]),(0,l.reject)((0,l.propEq)("uri",r)),(0,l.ifElse)((0,l.allPass)([e=>1===e.length,e=>{let[r]=e;return kE(t,r)},e=>{let[t]=e;return!os(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function zE(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 ZE(e,t){return YE("UPDATE_TAGS").call(this,e,t)}function em(e,t){return YE("UPDATE_ROLES").call(this,e,t)}function tm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rm(e,t,r[t])}))}return e}function rm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nm=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=tm({},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:tm({},n,{roles:s,tags:u}),roles:i,tags:l}}}};const im=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?im(t.value):[]];return e.concat(r)}),[])),am=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,om=e=>e?[Ud(e)]:[],sm=e=>{const t=[...im((null==e?void 0:e.attributes)||[]),...im((null==e?void 0:e.analyticsAttributes)||[])];return e?[...om(e),...t]:[]},lm=(e,t)=>[e,...t.map((t=>am(e,t)))],um=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return HT(t)}))},cm=(e,t)=>{switch(e){case ge.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case ge.ENTITY_ATTRIBUTE:case ge.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Ct(t)]})(t);case ge.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case ge.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,Ud({uri:n,dataTenant:i}),r]})(t)}},pm=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),dm=(0,l.curry)(((e,t)=>{const r=To(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(dm(e,r.extendsTypeURI)):n})),ym=(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))),fm=(e,t)=>(0,l.pipe)((0,l.prop)("type"),dm(e),ym(t))(t);function Tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Em=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}},mm=e=>!e.deactivated,hm=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},bm=e=>hm(e)+e.message,Om=(0,l.unless)(l.isNil,(0,l.prop)("message")),vm=(0,l.unless)(l.isNil,(0,l.prop)("type")),gm=(0,l.curry)(((e,t)=>At(t.parentUri,e))),_m=(0,l.curry)(((e,t)=>t.parentUri===e)),Nm=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),At(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",Ze.TYPE_REFERENCE),(0,l.pipe)(it,(0,l.any)(At(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),Am=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),Pm=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),Rm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([Dm,mm,gm(e),Nm(t),(0,l.complement)(Pm(e,t.uri))]))(r)},Sm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([Dm,mm,_m(e),Am(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",me.missed))]))(r);return n&&n.message||""},wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===me.missed))},Im=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(zT(),e))]))(t)},Um=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},Cm=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([mm,gm(t)]))(r)},Lm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([mm,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},jm=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?IE(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case ve.attributeValue:{const e=a;if(Kt(a))return pd(o,e.dataLabelPattern);if(Jt(a)){const t=o,i=Es(t),a=rt(e),s=Cr(n,a);return mt(i)?pd(r[i],s.dataLabelPattern):t.label}return""}case ve.tempEntity:return pd(o,a.dataLabelPattern);case ve.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Cr(n,null==e?void 0:e.entityType);return`${yd(i&&mt(i)?pd(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||pi(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){Tm(e,t,r[t])}))}return e}({},e,{label:yd(t)})}))},Dm=e=>!e.severity||e.severity===be.ERROR,km=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case Ze.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(km(n))}));case Ze.TYPE_REFERENCE:return!!us(t);case Ze.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),Mm=(e,t)=>e.every((0,l.complement)(km(t))),Fm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=bo(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=vs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!os(e.parent))))).forEach((e=>{Mm(e.attrValues,n)&&r.push(Em({type:me.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:rn().text("Attribute is required"),source:he.local}))})),r}),[])},xm=(0,l.curry)(((e,t,r)=>vs(e,t,r,!1))),$m=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Cr(e),(0,l.prop)("attributes"),(0,l.defaultTo)([]),(0,l.reject)(Ht),(0,l.filter)(Jt),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(xm(e,t)));return(0,l.pipe)(r,(0,l.reject)(Es),(0,l.map)((e=>{let{uri:r}=e;return Em({type:me.missedRefEntity,uri:"",attributeTypeUri:Ut(r,t.type),parentUri:r,message:rn().text("Entity is required"),source:he.local})})))(t)},Vm=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Es,mt)).flatMap((n=>{const i=Es(n),a=t[i],o=ar(e,Ut(n.uri,r.type));return Gm(e,t,o,a)})),Gm=(e,t,r,n)=>{const i=it(r),a=i.map((t=>ar(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",Ze.TYPE_REFERENCE))).flatMap(ot).concat(i);return Wm(e,t,n,(e=>a.some(At(e.uri))))},Wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=Fm(e,r,n),a=$m(e,r),o=Vm(e,t,r);return[...i,...a,...o]},Ym=(e,t)=>{const r=(0,l.path)(eE(),t)||{};return Fm(e,r)},Bm=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(nE()),(0,l.ifElse)(mt,(e=>t[e]),(0,l.always)(null)))(r),i=Ym(e,r),a=(e=>(0,l.path)(nE(),e)?[]:[Em({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(ZT(),e),parentUri:(0,l.path)(zT(),e),message:rn().text("Entity is required"),source:he.local})])(r),o=((e,t,r)=>r?Wm(e,t,r):[])(e,t,n);return[...i,...a,...o]},qm=e=>(0,l.path)(["entity","uri"],e)?[]:[Em({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:rn().text("Entity is required"),source:he.local})],Hm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=Fm(e,r),i=qm(t);return[...n,...i]};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=(e,t)=>{var r,n;const i=Cr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||Ya(e)},Jm=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),Xm=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(Jm(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},zm=(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)(ms,mt,l.not)]),(e=>{const t=(0,l.pipe)(ms,Rt)(e);return Xm((e=>e.replace(t,t+dt)))(e)})),(0,l.when)((0,l.pipe)(Es,mt),(t=>{const r=Es(t),n=e[r],i=n&&eh(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){Qm(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),Zm=(e,t,r)=>KE(qE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),zE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(zm(r,e.type)),(0,l.map)(Xm(Mt))))})(e))).concat(lT(e,t)),eh=(e,t)=>(0,l.evolve)({attributes:El({valueTransformer:(0,l.pipe)(Os,zm(t),Jm(Mt)),deleteEmptyComplex:!0}),uri:Mt})(e);function th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rh(e,t,r[t])}))}return e}function rh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nh=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(pt,"g"),"uri$$$$").replace(new RegExp(dt,"g"),""))),ih=e=>(0,l.pipe)((0,l.evolve)({objectUri:nh,objectParentUri:nh}),(e=>{return th({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?me.missed:me.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&kt(e.objectUri),uri:e.objectUri,source:he.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),ah=(e,t)=>(0,l.map)((0,l.pipe)(ih,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=jm(t,s),p=null!=c&&c.length?c.slice(0,-1):jm(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===ve.attributeValue&&(a=e.valueType)}return a})(o,c,e);return th({},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&&Dt(i)){const n=(0,l.last)(a),i=n.valueType;if(Jt(i)&&st(i).includes(o)){const i=Es(n.value),o=i&&mt(i)?t[i]:null;return o?th({},e,{parentUri:o.uri,path:a.concat({type:ve.tempEntity,value:o,valueType:Cr(r,o.type),label:""})}):e}}return e}})(t)))(e),oh=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};var sh,lh=r(33164);function uh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(sh||(sh={}));const ch={},ph={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"]}},dh=(0,l.curry)(((e,t)=>{const r=(e=>{if(!ch[e]){const t=ph[e]||ph.random0;ch[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){uh(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return ch[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]})),yh=e=>dh(sh.Charts,e),fh=e=>dh(sh.Random1,e),Th=e=>(0,lh.getColor)(e)?"#FFFFFF":"#212121";var Eh=r(73116);const mh=Array.from({length:100},((e,t)=>t/100)),hh=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)},bh={},Oh=new Eh.Z({hash:hh,saturation:mh.slice(15,71),lightness:mh.slice(50,90)}),vh=new Eh.Z({hash:hh,saturation:mh.slice(46,89),lightness:mh.slice(44,58)}),gh=(0,l.curry)(((e,t,r)=>{t in bh||(bh[t]={});const n=bh[t];r in n||(n[r]=((e,t)=>{const r=String(hh(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),_h=gh(Oh,"crosswalks"),Nh=gh(Oh,"sources"),Ah=gh(Oh,"contributors"),Ph=gh(Oh,"dataValidationFunctions"),Rh=gh(vh,"entities");function Sh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wh(e,t,r[t])}))}return e}function wh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ih=(0,l.has)("items"),Uh=e=>0===e,Ch=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)},Lh=e=>e.reduce(((e,t)=>e+t.width),0),jh=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Dh=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),kh=e=>e.reduce(((e,t)=>e+t.height),0),Mh=e=>(0,l.is)(String,e)&&e.includes("%"),Fh=e=>Boolean(e.spacer),xh=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),$h=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Ih(t)?$h(t):t)),[]),Vh=e=>({id:e.layout}),Gh=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Vh;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=Mh(r.width)?xh(i,r.width):u}return Ch(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return Ch(n,t,r)},o=(e,t)=>Ih(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,Ih(s)?n(s.layout):e(s.view)),d=Uh(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(Ih(s))return o.concat(p(Sh({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(Sh({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Lh(o),height:jh(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Ih(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=Uh(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Ih(i))return r.concat(p(Sh({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(Sh({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?Ch(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?Ch(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Dh(i),height:kh(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=Uh(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return Sh({},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=Sh({},e,{width:a}),s=Sh({},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(Sh({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return Sh({},e,{height:kh(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(Sh({},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 Sh({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=Sh({},t,{items:(0,l.reject)(Fh,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 $h(f)},Wh=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),Yh=[Ge.FilteredEntitiesViewFacet,Ge.ActivitiesViewFacet,Ge.ProfileStatsFacet,Ge.FilteredSavedSearchesFacet],Bh=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=Yh.includes(a.component)?8:4;return Sh({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function qh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(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}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={BarChart:Ve.BAR,BarChartGrouped:Ve.BAR,BarChartHorizontal:Ve.BAR,LineChart:Ve.LINE,Map:Ve.MAP,Pie:Ve.PIE},Kh=(e,t)=>Lt(e)?wt(e,t):e,Jh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=Qh[r];return qh({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Xh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return qh({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"]))},zh=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return qh({},e,{value:[Wr,Yr,$r.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:qr(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Lt(t)||!r?n:(n||[]).concat((i=r,{filter:$r.EQUALS,fieldName:"type",values:[i]}));var i},Zh=["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"],eb={"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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.BAR,component:Ge.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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.BUBBLE,component:Ge.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:Ge.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 qh({id:t,count:o,canRead:u,orderType:s,attributeUri:Kh(r,p),filters:zh(a,r,p),component:Ge.DashboardFacet,title:i,showOthers:!0},Jh(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:Kh(n,r),filters:zh(a,n,r),chartType:Ve.MAP,component:Ge.DashboardFacet,title:i,geoUrl:Zh[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 qh({id:t,count:o,canRead:l,attributeUri:Kh(n,r),filters:zh(a,n,r),component:Ge.DashboardFacet,title:i,geoUrl:s,chartType:Ve.MAP,projection:"geoMercator"},Jh(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.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:Xh(i),component:Ge.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:zh(n,null,a),component:Ge.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:$r.GTE,fieldName:"matches",values:["1"]}],component:Ge.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:Ge.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:Ve.CLOUD,component:Ge.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:Ve.TREE,component:Ge.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.NotificationInboxFacet,title:n||rn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ge.ActivitiesViewFacet,title:n||rn().text("Activity log")}}},tb=e=>({id:e,height:10}),rb=(0,l.pipe)((0,l.map)((e=>{const t=eb[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),nb=e=>{if("0.1"===e.version){const t=rb(e.views),r=Gh(tb,e.layout,{columns:4});return{id:e.id,margin:0,layout:Wh(r,t),views:t}}return e},ib=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=>ib(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);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=ab({},We,{OldMap:"com.reltio.plugins.entity.EntityMapView",OldTree:"com.reltio.plugins.entity.TreeView"}),lb=e=>e,ub={[sb.Attributes]:lb,[sb.HierarchyTree]:lb,[sb.HierarchyPaths]:lb,[sb.RelationsTable]:lb,[sb.Relations]:e=>ab({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[sb.SingleAttribute]:lb,[sb.Custom]:lb,[sb.AttributeTable]:lb,[sb.Map]:lb,[sb.OldTree]:e=>ab({},e,{class:We.HierarchyTree}),[sb.OldMap]:e=>ab({},e,{class:We.Map}),[sb.ImageAttribute]:lb,[sb.PotentialMatches]:lb},cb=(0,l.pipe)((0,l.map)((e=>{const t=ub[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),pb=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===We.Map?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),db=(e,t)=>(t||[]).map((t=>ab({},t,pb(e,t.id)))),yb=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return ab({},t,{layout:db(t.views,e.newLayout)});if("0.1"===e.version){const r=cb(e.views),n=Gh(pb(r),e.layout,{columns:4});return ab({},t,{layout:Wh(n,r),views:r})}return e},fb=(e,t)=>e.class===t||e["react-class"]===t,Tb=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(fb(t,We.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 fb(t,We.SingleAttribute)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.some(At(n))||t.some(At(n))}},Eb=(e,t)=>e.filter((e=>t.some((t=>fb(e,t))))).map((e=>{let{id:t}=e;return t})),mb=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},hb=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),bb=e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e);function Ob(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vb(e,t,r[t])}))}return e}function vb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gb=(0,l.curry)(((e,t)=>ib(t).map((t=>(0,l.pipe)((0,l.map)((e=>mb(e,t))),(0,l.reject)(l.isNil),l.head)(e))).filter(l.identity))),_b=(0,l.either)((0,l.propEq)("label","D&B Connector"),(0,l.propEq)("label","D&B Connector")),Nb=(0,l.propEq)("class",We.Custom),Ab=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Pb=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];let i;if("2.0"===r&&t.newLayout){const{newLayout:r}=t,a=db(t.views,r);return i=(0,l.when)((0,l.pipe)(l.head,(0,l.is)(String)),(0,l.pipe)((0,l.map)((t=>(0,l.pipe)((0,l.map)((e=>mb(e,t))),(0,l.reject)(l.isNil),l.head)(e))),(0,l.reject)(l.isNil),(e=>[{id:"common",views:e}])))(t.sidePanelViews),(0,l.pipe)((0,l.pick)(["views","profileBand","workflow"]),(0,l.mergeRight)({entityType:n,layout:a,sidePanelViews:i}),(0,l.reject)(l.isNil))(t)}const a=gb(e,t.layout);i=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>mb(e,t.side))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("layout"))(e),[n,i]=(0,l.partition)(_b,null==r?void 0:r.items),a=(0,l.pipe)(gb(e),(0,l.filter)(Nb))(Ob({},r,{items:n})),o=[{id:"common",views:gb(e,Ob({},r,{items:i}))}];return a.length>0&&o.push({id:"D&B",views:a}),o}})(e,t);const o=(e=>(0,l.pipe)((0,l.chain)((e=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.entity.side.WorkflowsView"===e.class))})(e))),l.head,(0,l.unless)(l.isNil,(0,l.pick)(["showClosedTasks","assignee","processTypes"])))(e))(e),s=yb(Ob({},t,{views:a,version:"0.1"})),u=(0,l.pipe)(bb,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:s.views,layout:s.layout,sidePanelViews:i,profileBand:u,workflow:o})},Rb=(e,t)=>{if("scroll"===t.layout.layout){const r=gb(e,t.layout),n=nb(Ob({},t,{views:r,version:"0.1"}));return{class:Be.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:Be.Dashboard,views:t.views,layout:t.layout,id:t.id}},Sb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},wb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Ib=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Ub=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Cb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Lb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},jb=(e,t)=>{const r=gb(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=hb(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:Be.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"],tabs:r.tabs}},Db=(e,t)=>({class:Be.Graph,id:t.id}),kb=(e,t)=>{const r=gb(e,t.layout)[0];return{class:Be.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},Mb=e=>t=>!!(0,l.intersection)(e,t).length,Fb=(0,l.cond)([[Mb(["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"]),()=>Rb],[Mb(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Sb],[Mb(["com.reltio.plugins.graph.GraphView"]),()=>Db],[Mb(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>wb],[Mb(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Ib],[Mb(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Ub],[Mb(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>Cb],[Mb(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Lb],[Mb(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>jb],[Mb(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>kb],[l.T,()=>(0,l.always)(void 0)]]),xb=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(Ab),(0,l.map)((t=>Pb(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand","workflow"])))(e);return{class:Be.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:qe.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:qe.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n||"com.reltio.plugins.newDashboard.NewDashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>mb(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",Be.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>mb(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;if(i.entityPerspectiveId)return((e,t,r)=>{const n=Pb(e,r),i=(0,l.pipe)((0,l.propOr)([],"entity-types"),(0,l.map)((e=>[e,n])),l.fromPairs)(t);return{class:Be.NestedProfile,id:t.id,entityTypes:i}})(t,e,i);const a=ib(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 Fb(o)(t,i)};function $b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vb(e,t,r[t])}))}return e}function Vb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Gb=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))},Wb="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Yb;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Yb||(Yb={}));const Bb={[Be.DQDashboard]:`${Wb}DqDashboard.svg`,[Be.Dashboard]:`${Wb}Dashboard.svg`,[Be.Graph]:`${Wb}Graph.svg`,[Be.RelationshipSearch]:`${Wb}GraphSearch.svg`,[Be.Interactions]:`${Wb}Interactions.svg`,[Be.PotentialMatches]:`${Wb}PotentialMatches.svg`,[Be.Profile]:`${Wb}Profile.svg`,[Be.NestedProfile]:`${Wb}Profile.svg`,[Be.ProfileActivityLog]:`${Wb}ActivityLog.svg`,[Be.Relationships]:`${Wb}Relationships.svg`,[Be.Sources]:`${Wb}Crosswalk.svg`,[Be.Search]:`${Wb}Search.svg`,[Yb.DashboardGroup]:`${Wb}DashboardGroup.svg`,[Yb.ProfileGroup]:`${Wb}ProfileGroup.svg`,[Yb.SearchGroup]:`${Wb}SearchGroup.svg`,DEFAULT:`${Wb}Default.svg`},qb=e=>Bb[null==e?void 0:e.class]||Bb.DEFAULT,Hb=(0,l.pipe)((0,l.pluck)("screen"),(0,l.filter)((0,l.anyPass)([(0,l.propEq)("class",Be.NestedProfile)])),(0,l.groupBy)((0,l.prop)("class")),(0,l.map)((e=>e.map(((e,t)=>$b({},e,{nestedRoute:`${t+1}`})))))),Qb=(e,t)=>{var r;return(null===(r=e[t.class])||void 0===r?void 0:r.find((0,l.propEq)("id",t.id)))||t},Kb=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Bb[Yb.ProfileGroup]:null,Jb=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Bb[Be.Dashboard]||t===Bb[Be.DQDashboard]})),(0,l.always)(Bb[Yb.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Bb[Be.Search]||t===Bb[Be.RelationshipSearch]})),(0,l.always)(Bb[Yb.SearchGroup])],[l.T,()=>null]])(e),Xb=e=>(0,l.pipe)((0,l.chain)(Gb),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>{const r=(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>$b({},e,{entityTypes:e["entity-types"],screen:xb(e,t)}))),(0,l.filter)((e=>e.screen)))(t),n=Hb(r);return(0,l.map)((e=>{let{label:t,screen:r,canRead:i,entityTypes:a}=e;return{label:t,icon:qb(r),screen:Qb(n,r),canRead:i,entityTypes:a}}))(r)})(t,e),n=xb(t,e);return{label:t.label,icon:Kb(t)||Jb(r)||qb(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));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=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},eO=e=>({id:e,height:10}),tO=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)(Zb),(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=rb(((e,t)=>{const r=ib(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){zb(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Gh(eO,t.layout,{columns:4});return{views:r,layout:Wh(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function rO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nO=(0,l.curry)(((e,t)=>(0,l.pipe)((e=>((e,t)=>(e||[]).find((e=>"com.reltio.plugins.ui.Activator"===e.activator)))(e)),(0,l.prop)(e))(t))),iO=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,aO=e=>(0,l.pipe)((e=>hb(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){rO(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),oO=(0,l.unless)((e=>!!e&&(e.startsWith("http:")||e.startsWith("https:"))),(0,l.always)(null)),sO=(0,l.pipe)(nO("top-logo"),oO),lO=(0,l.prop)("showLookupCode"),uO=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(e=>{let{workflowPath:t,enabled:r}=e;return{enabled:r,path:t}}))(e))(e),p=(e=>(0,l.pipe)(nO("default-perspective"),(0,l.ifElse)(iO,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),d=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.AttributesSorting"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("strategy"))(e))(e),y=aO(e),f=(e=>nO("checkUser",e))(e),T=(e=>nO("checkIdle",e))(e),E=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),m=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e),h=void 0===(b=lO(m))||b;var b;const O=null===(t=bb(e))||void 0===t?void 0:t.showEntityId,v=(e=>nO("preview",e))(e),g=sO(e),_=(e=>nO("topBackgroundColor",e))(e),N=(e=>(0,l.pipe)((0,l.map)((e=>mb(e,"com.reltio.framework.util.DateMask"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(e=>{let{dateMask:t,dateTimeMask:r}=e;return{dateMask:t,dateTimeMask:r}}),(0,l.reject)(l.isNil))(e))(e);return{i18n:s,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:h},validate:{levels:a,validateReadMode:o},masks:0===Object.keys(N).length?void 0:N,attributePresentations:u,attributesSorting:d,workflow:c,defaultRoute:p,customScripts:y,checkUser:f,checkIdle:T,showSwitchToClassic:E,showEntityId:O,preview:v,logo:g,headerColor:_}},cO=e=>({layout:Xb(e),pivoting:tO(e),properties:uO(e)});var pO=r(58697),dO=r.n(pO);function yO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fO(e,t,r[t])}))}return e}function fO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const TO=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}_${dO()()}`;return n[e.id].push(t),i=!0,yO({},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]++,yO({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};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){mO(e,t,r[t])}))}return e}function mO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let hO={};const bO=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=X(`${r.id}: ${r.action.files.join('","')}`);if(E(hO[a])){try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}hO=EO({},hO,{[a]:EO({},hO[a]||{},{worker:i})})}else i=hO[a].worker,hO[a].innerText&&t({task:{action:Je.SET_HTML,params:{html:hO[a].innerText}},worker:i,config:r}),i.removeEventListener("message",hO[a].onWorkerMessage);return i&&(hO[a].onWorkerMessage=e=>{if("loaded"!==e.data.action){const n=JSON.parse(e.data);t({task:n,worker:i,config:r}),"setHtml"!==n.action||n.params.id||(hO[a].innerText=n.params.html)}},i.addEventListener("message",hO[a].onWorkerMessage)),i},OO=(0,l.curry)(((e,t)=>!e||!e.availableEntityTypes||!t||e.availableEntityTypes.includes(t))),vO=(0,l.flip)(OO),gO=(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=rn().number(t));return t})),_O=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?rn().number(e,"0,0.0a").toUpperCase():rn().number(e,"0,0"):""},NO=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let AO=!0;const PO=e=>AO=e,RO=(e,t)=>e!==t&&t?AO&&e?`${t} (${e})`:t:e,SO=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),wO=(e,t,r)=>{const n=SO(e,t,r);return RO(r,n)},IO=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),UO=(0,l.complement)(IO),CO=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),LO=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)},jO=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(UO(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),DO=(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 Ze.TYPE_NUMBER:case Ze.TYPE_FLOAT:case Ze.TYPE_DOUBLE:case Ze.TYPE_LONG:case Ze.TYPE_INT:case Ze.TYPE_COUNT:return t&&gO(o,t);case Ze.TYPE_BOOLEAN:case Ze.TYPE_BOOLEAN_RADIO:case Ze.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t=t,(0,l.isNil)(t)?t:le(t)?rn().text("Yes"):rn().text("No");case Ze.TYPE_DATE:return(0,l.is)(Number,t)&&(t=N(Number(t)).getTime()),(t=t)&&(Cu(t)?Lu(t):rn().date(t,s));case Ze.TYPE_ACTIVENESS_DATE:case Ze.TYPE_LOCAL_DATE:return(t=t)&&(Cu(t)?Lu(t):rn().date(t,s));case Ze.TYPE_TIMESTAMP:return(t=t)&&(Cu(t)?Lu(t):rn().date(isNaN(t)?t:Number(t),u));case Ze.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case Ze.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case Ze.TYPE_DOLLAR:return t=t,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?RO((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),kO={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)"},MO=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()}},FO=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})))),xO=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),MO,FO);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}},$O="__metadata",VO=(e=>{const t=[$O,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),GO=(0,l.set)(VO),WO=(0,l.view)(VO),YO=GO(Xr.NEW),BO=GO(Xr.REMOVED),qO=GO(Xr.EDITED),HO=GO(Xr.IGNORED),QO=(0,l.pipe)(WO,(0,l.equals)(Xr.REMOVED)),KO=(0,l.pipe)(WO,(0,l.equals)(Xr.NEW)),JO=(0,l.pipe)(WO,(0,l.equals)(Xr.EDITED)),XO=(0,l.pipe)(WO,(0,l.complement)(l.isNil)),zO=(0,l.pipe)(WO,(0,l.equals)(Xr.IGNORED)),ZO=(0,l.omit)([$O]),ev=(e,t)=>e===$O?void 0:t;function tv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rv=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=rv(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},nv=(e,t)=>rv((0,l.propEq)("nodeId",t),e),iv=(e,t)=>rv((0,l.pathEq)(["entity","uri"],t),e),av=(e,t)=>{const r=nv(e,t);return r.length>1?r[r.length-2]:null},ov=(e,t)=>{const r=nv(e,t);return r.length>0?r[r.length-1]:null},sv=(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=>sv(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},lv=()=>{},uv=(e,t)=>{let{parent:r,nodeProcessing:n=lv}=t;n(e,r),e.children&&e.children.forEach((t=>uv(t,{parent:e,nodeProcessing:n})))},cv=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ue.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 Ue.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 Ue.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){tv(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})}}},pv=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&&uv(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ue.addingChild||r.editingMode===Ue.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=cv({node:r,connection:n,isReversed:i}),s=fT({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ue.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=cv({node:r,isReversed:i,connection:n}),l=s?hT({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):mT({oldRelation:e,newRelation:a});t.push(l)}}})})),t},dv=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=dv(r,t);if(e)return e}return!1},yv=(0,l.curry)(((e,t)=>{const r=(0,l.map)(yv(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),fv=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>dv(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:yv(e,n.root)}}));return(0,l.pipe)(r,n)(t)},Tv={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},Ev={asc:"asc",desc:"desc"},mv=Tv.entityLabel,hv=Ev.asc,bv=(0,l.always)(0),Ov=e=>{let{sortField:t=mv,sortOrder:r=hv,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case Tv.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return GN.strings.sort(t,a,o)})(n,r);case Tv.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return GN.strings.sort(e,i,a)})(r);default:return bv}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},vv=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(Ev)),l.identity,(0,l.always)(hv))),gv=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(Tv)),l.identity,(0,l.always)(mv)));var _v=r(91104);let Nv;const Av=(e,t)=>(Nv||(Nv=_v.createClient({key:t})),new Promise((t=>{Nv.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)}))}))),Pv=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},Rv=(e,t)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(os).flatMap((e=>{let r;return e.type==t&&(r=[Pv(e)]),(0,l.is)(Object,e.value)&&(r=(r||[]).concat(Rv(e.value,t))),r})),Sv=e=>e&&e.length>0,wv=(e,t)=>[].concat(e&&e.attributes?Rv(e.attributes,t):[]).filter(l.identity);function Iv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uv=(e,t,r,n,i,a)=>{if(e&&e.type){const t=Cr(r,e.type);n&&(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Iv(e,t,r[t])}))}return e}({},e,{attributes:{[i]:[n]}}));const a=(t.geoLocationAttributes||[]).map((t=>{return r=wv(e,t.latitude),n=wv(e,t.longitude),Sv(r)&&Sv(n)&&(0,l.zipWith)(((e,t)=>({lat:Number(e),lng:Number(t)})),r,n);var r,n})).filter(l.identity);if(a.length>0)return Promise.resolve(a[0])}const o=t.GeoLocation;if(o){const e=o.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(Sv(t)&&t[0].value&&Sv(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?Av(n.label,a).catch((()=>null)):Promise.resolve(null)},Cv=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=Cr(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>[e,t.attributes[e]])).filter((e=>{let[,t]=e;return t})).flatMap((e=>{let[r,n]=e;return n.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e,name:r})))})));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s,name:u}=t;return Uv(a,o,e,s,u,r).then((e=>!e&&a.label&&""!==a.label?Av(a.label,r).catch((()=>null)):e)).then((e=>ne(e).filter(l.identity).map((e=>({id:e.id||n,label:i,entity:a,point:e}))))).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},Lv=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=Cr(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=wv(t,r.latitude),n=wv(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))},jv=(e,t,r)=>Promise.all([Lv(e,t),Cv(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lng===e.point.lng))))]}));function Dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kv(e,t,r[t])}))}return e}function kv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mv=(e,t)=>t.values.map(io(e,t.entityTypeUri)),Fv=(e,t,r)=>qs(t.fieldName,r)||ar(e,wt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),xv=(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?RO(e,t):e}),r)},$v=(0,l.path)(["attrType","label"]),Vv=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>Dv({},e,{[t]:!0})),{});e[r]=e[r]?Dv({},e[r],n):n}return e}),{}),Gv=(0,l.pipe)((0,l.prop)("values"),E),Wv=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",En.type.name)),Yv=e=>e.type===Hv.NUMERIC_RANGE_FACET,Bv=e=>e.type===Hv.DATE_RANGE_FACET,qv=(0,l.either)(Yv,Bv),Hv={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},Qv=e=>{switch(null==e?void 0:e.name){case En.type.name:return Hv.ENTITY_TYPE_FACET;case En.createdBy.name:case En.updatedBy.name:case En.sourceSystems.name:case En.tags.name:case En.roles.name:case En.matchRules.name:case En.MLRecommendedMatch.name:return Hv.WITH_DROPDOWN_CHECKBOXES_FACET;case En.createdTime.name:case En.updatedTime.name:case En.startDate.name:case En.endDate.name:return Hv.DATE_RANGE_FACET;case En.matches.name:case En.matchScore.name:return Hv.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return Hv.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return Hv.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return Hv.DATE_RANGE_FACET;default:return Hv.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},Kv=(0,l.pipe)(Fv,Qv),Jv=(0,l.pipe)((0,l.path)(["attrType","type"]),Tr),Xv=(0,l.cond)([[Yv,(0,l.always)($r.IN_RANGE)],[Bv,(0,l.always)($r.WITHIN)],[(0,l.allPass)([Jv,e=>e.values.length>=2]),(0,l.always)($r.EXISTS)],[l.T,(0,l.always)($r.EQUALS)]]),zv=(0,l.cond)([[Bv,(0,l.prop)("values")],[Yv,(0,l.prop)("values")],[Jv,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 Zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eg=(0,l.pipe)((0,l.path)(["attrType","type"]),ur),tg=(0,l.pipe)((0,l.path)(["attrType","type"]),dr),rg=(0,l.pipe)((0,l.prop)("attrType"),Qs),ng=(0,l.pipe)((0,l.prop)("attrType"),Hs),ig=e=>t=>t.values.map((t=>Cr(e,t).label)).join(" , "),ag=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),og=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(rn().number),ag)),(0,l.join)(","))(e.values);return`${$v(e)}: ${t}`},sg=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),ag)),(0,l.join)(","))(e.values);return`${$v(e)}: ${t}`},lg=e=>t=>`${$v(t)}: ${Mv(e,t).join(", ")}`,ug=e=>t=>{const r=xv(e,t);return`${$v(t)}: ${r.join(", ")}`},cg=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[ng,ig(e)],[tg,og],[eg,sg],[rg,lg(e)],[l.T,ug(t)]]),r))),pg=(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){Zv(e,t,r[t])}))}return e}({},t,{attrType:Fv(e,t,n)}))),cg(e,r))(t),dg=new RegExp(`^${rn().text("Search")}`),yg=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...pg(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(dg,"",u)]},fg=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(Kr),Tg=e=>(e=>fg.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]=Du(t);return e.replace(r,i).replace(n,a)}),e))(e),Eg=(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}`})),mg={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},hg=e=>[mg.geoPolygon,mg.onMapMove].includes(e),bg=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},Og=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},vg=(e,t)=>hg(e)?t.map(bg):[Og(t)],gg=e=>hg(e)?rn().text("Geo Polygon"):rn().text("Geo Location"),_g=e=>{switch(e){case mg.geoLocation:return"geoLocation";case mg.geoPolygon:case mg.onMapMove:return"geoPolygon"}},Ng={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},Ag=e=>rn().text(e),Pg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[$r.EQUALS]:"=",[$r.NOT_EQUALS]:"≠",[$r.STARTS_WITH]:"*",[$r.MISSING_VALUE]:rn().text("missing value"),[$r.HAS_ALL]:rn().text("has all"),[$r.IN_RANGE]:rn().text("in range"),[$r.FULL_TEXT]:rn().text("full text"),[$r.EXISTS]:rn().text("exists"),[$r.COUNT_EQUALS]:`${rn().text("count")} =`,[$r.COUNT_NOT_EQUALS]:`${rn().text("count")} ≠`,[$r.COUNT_LT]:`${rn().text("count")} <`,[$r.COUNT_LTE]:`${rn().text("count")} <=`,[$r.COUNT_GT]:`${rn().text("count")} >`,[$r.COUNT_RANGE]:rn().text("count range"),[$r.LT]:"<",[$r.LTE]:"<=",[$r.GT]:">",[$r.GTE]:">=",[$r.IN_FILE]:rn().text("in file"),[$r.NOT_IN_FILE]:rn().text("not in file"),[$r.CONTAINS]:"~",[Vr.LIST_EQUALS]:"=",[Vr.NOT_LIST_EQUALS]:"≠",[Vr.LIST_EQUALS_CASE_SENSITIVE]:"=",[Vr.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||rn().text(e.toLowerCase())},Rg=e=>({type:Ng.operator,text:e}),Sg=e=>({type:Ng.operator,text:Ag(e)}),wg=e=>({type:Ng.attributeLabel,text:e}),Ig=e=>({type:Ng.specialAttributeLabel,text:e}),Ug=e=>({type:Ng.attributeFilter,text:Pg(e)}),Cg=e=>({type:Ng.attributeValue,text:e}),Lg=e=>({type:Ng.entityTypeLabel,text:e}),jg=()=>({type:Ng.space,text:" "}),Dg=()=>({type:Ng.bracket,text:"("}),kg=()=>({type:Ng.bracket,text:")"}),Mg=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),Fg=(0,l.curry)(((e,t)=>t.map(Mg(e)))),xg=(0,l.curry)(((e,t,r)=>[e,...r,t])),$g=xg(Dg(),kg()),Vg=xg(jg(),jg()),Gg=(0,l.curry)(((e,t)=>[e,...t])),Wg=e=>Gg(Lg(e)),Yg=e=>Gg(Lg(`${e}: `)),Bg=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=du(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=cu(s),a=pu(s);!r&&t&&n&&(i.push(Dg()),r=!0),i.push(o),r&&a&&(i.push(kg()),r=!1);const l=e?Sg(s):Rg(s);i.push(...Vg([l]))}else i.push(o),r&&(i.push(kg()),r=!1)}return i}},qg=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),Hg=(0,l.pipe)(Bg({localizable:!1}),qg),Qg=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},Kg=e=>{let{data:t,values:r,filter:n}=e;return t&&ic({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},Jg=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(Kg)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Xg=(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)&&tr(e.data.attrType)})(e)&&[$r.HAS_ALL,$r.EQUALS,$r.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:er((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})))),LO),zg=(e,t)=>(0,l.pipe)(Xg,jO(t))(e),Zg=(0,l.pathEq)(["data","fieldName"],En.type.name),e_=(0,l.path)(["data","entityTypeUri"]),t_=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),r_=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(Qo(e)),attributes:(0,l.filter)((0,l.pipe)(e_,(0,l.anyPass)([l.isNil,Qo(e),r=>{const n=(t.entityTypes||[]).filter(Qo(e));return(n.length>1?Mr(e,n):null)===r&&!!Cr(e,r)}])))})(t))))),n_=e=>(0,l.pipe)((0,l.prop)("filter"),Xl,(0,l.equals)(e)),i_=(0,l.curry)(((e,t,r,n,i,a)=>{const o=qs(n.fieldName)||n.attrType,s=wu(o,i),u=DO({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>tr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?RO(a.lookupCode,a.value):wO(r,er(o),a)],[()=>Qs(s),()=>io(e,n.entityTypeUri,a)],[()=>Ks(s),()=>Ro(e,a)],[()=>tl(s),()=>Io(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>dr(c)||Tr(c)),Au),Cg)()})),a_=(e,t,r,n)=>{const i=i_(e,t,r,n.data,n.filter);return(0,l.cond)([[n_(0),(0,l.always)([])],[(0,l.both)(n_(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[jg(),i(r),{type:Ng.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[jg(),...(0,l.pipe)(l.flatten,(0,l.map)(i),Fg({type:Ng.punctuationMark,text:", "}))(t)]}]])(n)},o_=(e,t)=>{const r=!!qs(e.data.fieldName);return(0,l.pipe)(Qg,r?Ig:wg)(e,t)},s_=(e,t,r,n,i)=>[o_(n,i),jg(),Ug(n.filter),...a_(e,t,r,n)],l_=(0,l.addIndex)(l.map),u_=(0,l.propEq)("length",1),c_=(0,l.propSatisfies)((0,l.lt)(1),"length"),p_=(0,l.complement)(l.isEmpty),d_=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(Tu,(0,l.filter)(Kg),Eu,(0,l.map)((n=>({operand:s_(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Bg()))(n)},y_=(0,l.pipe)(d_,l.flatten),f_=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>jd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=d_(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(Wg),(0,l.pipe)(s(Yg),(0,l.unless)((()=>u_(u)||i),$g)))(u)},T_=(e,t,r,n)=>(0,l.pipe)(Tu,(0,l.filter)(Jg),Eu,l_(((n,i,a)=>({operand:f_(e,t,r,n,u_(a)),operator:n.operator}))),Bg(),l.flatten)(n),E_=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Bg(),l.flatten),m_=e=>{let{searchType:t,values:[r]}=e;return vg(t,r).join(", ")},h_=(e,t,r,n,i,a)=>{const o=(e=>e?[Ig(e.isRawFilter?rn().text("Raw filter"):rn().text("Search")),...Vg([Ug($r.EQUALS)]),Cg(`"${e.value}"`)]:[])(i),s=(e=>e?[Ig(gg(e.searchType)),jg(),Cg(m_(e))]:[])(a),u=(0,l.pipe)(T_,(0,l.when)((e=>c_(e)&&(p_(o)||p_(s))),$g))(e,t,r,n);return E_([o,s,u])},b_=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),O_=(0,l.pipe)(h_,b_),v_=(0,l.has)("attributes"),g_=Array.isArray,__=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),N_=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=A_(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)(__(a))),$g),(0,l.concat)(Vg([Rg(o)]))))(s)},A_=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return v_(n)?N_(e,t,r,n,i):g_(n)?n.reduce(((n,a)=>n.concat(A_(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Vg([Rg(n.operator)])))(s_(e,t,r,n,i))},P_=(e,t,r,n,i)=>(0,l.pipe)(A_,l.flatten)(e,t,r,n,i);function R_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){S_(e,t,r[t])}))}return e}function S_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const w_=(0,l.complement)(Zg),I_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Zg),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(e_),(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}},U_=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=I_(t);return(r||n)&&yu(t)},C_=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(U_)),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(Zg).some((0,l.propEq)("filter",$r.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}=I_(r);if(U_(e))t.push(R_({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(w_)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Zg,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(e_,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(w_),entityTypes:n,operator:i?a:e.operator,id:dO()()}}));t.push(...n)}var a;return t})(t))),[]))),L_={[$r.EQUALS]:$r.ON,[$r.IN_RANGE]:$r.WITHIN,[$r.GTE]:$r.AFTER,[$r.GT]:$r.AFTER,[$r.LTE]:$r.BEFORE,[$r.LT]:$r.BEFORE},j_=(0,l.curry)((e=>L_[e]||e)),D_=(0,l.curry)(((e,t)=>{switch(e){case $r.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case $r.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),k_=(0,l.pipe)((0,l.path)(["data","attrType","type"]),ur),M_=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>R_({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return k_(e)?(0,l.evolve)({filter:j_,values:D_(t)},e):e}))})))})),F_=(0,l.evolve)({values:(0,l.when)((0,l.pipe)((0,l.prop)(0),Uu),(0,l.map)(Du))}),x_=(0,l.map)((0,l.cond)([[k_,F_],[l.T,l.identity]])),$_=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),C_,r_(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")),x_)})),M_,(0,l.reject)(t_))(r)));function V_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){G_(e,t,r[t])}))}return e}function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W_=(e,t)=>({data:{uri:Lt(e.fieldName)?wt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||Xv(e),id:dO()(),values:zv(e)}),Y_=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=qs(a,t,r)||ar(e,i);if(!s)return null;if(Bt(s))return V_({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=jd(e,{type:o}),i=(ir(e,wt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return V_({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),B_=(0,l.curry)(((e,t,r,n)=>$_(Y_,e,n,t,r)));function q_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H_(e,t,r[t])}))}return e}function H_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q_=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},K_=e=>"rdmLookups.not.resolved"===e?En.notResolved.name:e,J_=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===Br?$r.IN_RANGE:qr(a),u=K_(n),c=qs(u)||ar(e,i),p=(0,l.cond)([[()=>tu(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>q_({},e,{filename:NO(e)}))))],[()=>Tr(null==c?void 0:c.type),(0,l.map)(le)],[e=>Zl(s)&&!Array.isArray(e[0])&&!ur(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:dO()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===Br?"and not":"and",filter:s,values:p}})),X_=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(J_(e,Mr(e,i)));return[{id:dO()(),operator:"or",attributes:a,entityTypes:i}]})),z_=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Z_=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([z_("from"),z_("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,()=>[]]]),eN=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return q_({},r,{values:Z_(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?Vs(e.fieldName,n):e.fieldName})},tN=(e,t)=>{if((0,l.has)("children")(e)){const r=eN(e,t);return e.children.reduce(((e,n)=>(e.push(tN(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return eN(e,t)},rN=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(eN(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(q_({fieldName:e.fieldName},eN(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(tN,l.flatten)],[l.T,eN]]),nN=(0,l.pipe)((0,l.map)(rN),l.flatten),iN=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},aN=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=X_(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:nN(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>q_({},t,{type:Kv(e,t)}))).map((e=>q_({},e,{values:qv(e)?iN(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 W_(r,t)})),operator:"or",id:dO()(),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=>({[K_(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[q_({},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 B_(e,t,r,p)},oN=(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)(Gv),(0,l.partition)(Wv))(t),i=n.map((t=>V_({},t,{type:Kv(e,t)}))).map((e=>W_(e))),a=r.values||[];return[{attributes:i,operator:"or",id:dO()(),entityTypes:a}]})(e,a);return B_(e,t,r,o)})(e,t,r,n):aN(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},sN=e=>"2.0"===e.version?e.keyword:Q_(e),lN=e=>(0,l.pathEq)(["object","uri"],e),uN=(e,t)=>(0,l.pipe)((0,l.find)(lN(e)),(0,l.prop)("object"))(t),cN=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"),lN(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=uN(r.match,t)||n[r.match];return i?{label:yd((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return no(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)},pN=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),dN=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),yN=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[],negativeRules:a=[]}=t;const o=(0,l.propOr)({},n,r);return{label:yd((0,l.prop)("label",o)),matchRules:i.concat(a).map((function(t){return no(e,o.type,t)||{label:t,uri:t}}))}})))(t),fN=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)},TN=(0,l.path)(["object","uri"]),EN=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},mN=e=>e.getValue(),hN=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=hN(n[e],t),!r);e++);return r},bN=(e,t)=>{const r=[],n=(0,l.pipe)(mN,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(bN,[t]),a);return r.push.apply(r,o),r};function ON(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vN(e,t,r[t])}))}return e}function vN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gN=(e,t)=>!!e[t],_N=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},NN=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||[]])},AN=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return ON({},t,{[r.uri]:ON({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:NN(null==o?void 0:o.parents,n),children:NN(null==o?void 0:o.children,i),values:NN(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},PN=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Cr(r,t)||ci(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Mo(r,n,i).flatMap(xo).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=AN({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>AN({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},RN=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!mt(e.uri)&&_t(e.type)&&_t(t)&&!t.startsWith(e.type))(n,t))return e;const i=vs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(os),(0,l.map)(_N))(i);return AN({structure:e,attrType:e[t].attrType,values:a})}),t)},SN=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 gN(e,r)}));return r||n?t.filter(os).reduce(((e,t)=>SN({structure:e,attributeValue:t})),e):e}),t);{const e=r;return gN(t,e.type)?AN({structure:t,attrType:t[e.type].attrType,values:[_N(e)]}):t}},wN=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?ON({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},IN=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=vs(i,n,r)||[];return a.length?AN({structure:t,attrType:t[r].attrType,values:a.filter(os).map(_N)}):t},UN=(e,t,r)=>{const n=Ot(e),i=Ot(t);return n===i?((e,t)=>{const r=kt(t),n=kt(e);return At(n,r)||((e,t)=>jt(e)&&!jt(t)&&At(t,e))(n,r)})(e,t):!(!r||!Dt(t))&&SE(r,i).includes(n)},CN=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},LN=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?PE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return UN(r,t,o)}))},jN=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>jN(e,t,r)))))},DN=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&CN(n,e)}},kN=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=Ot(n),c=RE(u,o,i,a),p=jN("children",t,l),d=jN("parents",t,l),y=p.flatMap((e=>jN("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return UN(t,n,c)})).map((t=>DN(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return UN(n,t,c)||Ot(t)!==u&&UN(t,n,c)})).map((t=>DN(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=jN("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)&&UN(n,t,c)}))})).map((t=>DN(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return UN(t,n,c)})).map((e=>DN(r,n,e,s))),...T,...E,...f]},MN=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=DO({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=>pd(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[Kt,()=>a(n)],[tr,()=>(e=>{const r=o(e),n=er(t);return Vl([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return wO(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},FN=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:$r.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(xN(r,t)):i.push($N([t],r)),i},xN=(e,t)=>{const r=qt(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=Kt(i)?xN(i,t[r]):[$N(t[r],i)];return e.push(...a),e}}),[])},$N=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Zt(t.uri),filter:t.type===Ze.TYPE_BLOB?$r.FULL_TEXT:$r.EQUALS,values:e}:{fieldName:Zt(t.uri),filter:$r.MISSING_VALUE},VN={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},GN={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=6210.js.map
|