@mesh.ai/rabbit 1.28.0 → 1.28.1
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.
|
@@ -29898,7 +29898,7 @@ const yH = Y(
|
|
|
29898
29898
|
({ children: e, className: t, ...n }, r) => /* @__PURE__ */ u("div", { className: oe("flex grow flex-col justify-center", t), ...n, ref: r, children: e })
|
|
29899
29899
|
);
|
|
29900
29900
|
yH.displayName = "ListItemCompContent";
|
|
29901
|
-
const bH = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u(hH, { bold: !0, className: t, ...n, children: e });
|
|
29901
|
+
const bH = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u(hH, { bold: !0, className: oe("text-body-primary", t), ...n, children: e });
|
|
29902
29902
|
bH.displayName = "ListItemCompTitle";
|
|
29903
29903
|
const xH = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u(mH, { className: oe("text-body-secondary", t), ...n, children: e });
|
|
29904
29904
|
xH.displayName = "ListItemCompDescription";
|
|
@@ -93,4 +93,4 @@ z`).split(`
|
|
|
93
93
|
`)} {
|
|
94
94
|
${hr}
|
|
95
95
|
}
|
|
96
|
-
`}),R.appendChild(G.createTextNode(Pt))}ee.timeEnd("clone node"),me==null||me(Ne),ge!==!1&&re(Ne)&&(ee.time("embed web font"),yield eU(Ne,H),ee.timeEnd("embed web font")),ee.time("embed node"),x6(Ne,H);const _e=ce.length;let Ie=0;const qe=()=>m(this,null,function*(){for(;;){const Pt=ce.pop();if(!Pt)break;try{yield Pt}catch(jn){De("Failed to run task",jn)}ve==null||ve(++Ie,_e)}});ve==null||ve(Ie,_e),yield Promise.all([...Array(4)].map(qe)),ee.timeEnd("embed node"),$e==null||$e(Ne);const Ve=cU(Ne,H);return le&&Ve.insertBefore(le,Ve.children[0]),R&&Ve.insertBefore(R,Ve.children[0]),we&&g6(H),Se==null||Se(Ve),Ve})}function cU(S,I){const{width:H,height:G}=I,ee=zt(H,G,S.ownerDocument),ce=ee.ownerDocument.createElementNS(ee.namespaceURI,"foreignObject");return ce.setAttributeNS(null,"x","0%"),ce.setAttributeNS(null,"y","0%"),ce.setAttributeNS(null,"width","100%"),ce.setAttributeNS(null,"height","100%"),ce.append(S),ee.appendChild(ce),ee}function Wl(S,I){return m(this,null,function*(){var H;const G=yield Wt(S,I),ee=yield C6(G),ce=tt(ee,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=$t(G.ownerDocument),G.svgDefsElement=(H=G.ownerDocument)==null?void 0:H.createElementNS(Bt,"defs"),G.svgStyles.clear());const R=Qe(ce,ee.ownerDocument);return yield zn(R,G)})}function uU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{log:G,type:ee,quality:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to blob");const pe=yield fr(le,ee,ce);if(["image/png","image/jpeg"].includes(ee)&&R){const ge=yield ct(pe.slice(0,33));let ve=new Uint8Array(ge);return ee==="image/png"?ve=M(ve,R):ee==="image/jpeg"&&(ve=x(ve,R)),G.timeEnd("canvas to blob"),new Blob([ve,pe.slice(33)],{type:ee})}return G.timeEnd("canvas to blob"),pe})}function Wo(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{log:G,quality:ee,type:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to data url");let pe=le.toDataURL(ce,ee);if(["image/png","image/jpeg"].includes(ce)&&R&&U&&B){const[ge,ve]=pe.split(",");let we=0,me=!1;if(ce==="image/png"){const Ve=V(ve);Ve>=0?(we=Math.ceil((Ve+28)/3)*4,me=!0):we=33/3*4}else ce==="image/jpeg"&&(we=18/3*4);const $e=ve.substring(0,we),Se=ve.substring(we),Ne=window.atob($e),_e=new Uint8Array(Ne.length);for(let Ve=0;Ve<_e.length;Ve++)_e[Ve]=Ne.charCodeAt(Ve);const Ie=ce==="image/png"?M(_e,R,me):x(_e,R),qe=window.btoa(String.fromCharCode(...Ie));pe=[ge,",",qe,Se].join("")}return G.timeEnd("canvas to data url"),pe})}function A6(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{width:G,height:ee,ownerDocument:ce}=H,R=yield Wo(H),le=zt(G,ee,ce),pe=le.ownerDocument.createElementNS(le.namespaceURI,"image");return pe.setAttributeNS(null,"href",R),pe.setAttributeNS(null,"height","100%"),pe.setAttributeNS(null,"width","100%"),le.appendChild(pe),tt(le,H.isEnable("removeControlCharacter"))})}function dU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{ownerDocument:G,width:ee,height:ce,scale:R,type:le}=H,pe=le==="image/svg+xml"?yield A6(H):yield Wo(H),ge=Qe(pe,G);return ge.width=Math.floor(ee*R),ge.height=Math.floor(ce*R),ge.style.width=`${ee}px`,ge.style.height=`${ce}px`,ge})}function fU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/jpeg"})))})}function pU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),G=yield Wl(H);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function hU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/png"})))})}function gU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/webp"})))})}n.createContext=Il,n.destroyContext=g6,n.domToBlob=uU,n.domToCanvas=Wl,n.domToDataUrl=Wo,n.domToForeignObjectSvg=C6,n.domToImage=dU,n.domToJpeg=fU,n.domToPixel=pU,n.domToPng=hU,n.domToSvg=A6,n.domToWebp=gU,n.loadMedia=wt,n.waitUntilLoad=An,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(x0,x0.exports);var _j=x0.exports;const Bn=(e,t,n)=>{d.useImperativeHandle(t,()=>({download(){e.current&&_j.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},H8=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"green",dark:"#1A6400",light:"#B1E39F"},{name:"purple",dark:"#734DBB",light:"#E7DAFF"},{name:"bronze_yellow",dark:"#7E6000",light:"#FFCEFB"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"indigo",dark:"#4657AE",light:"#CDD5FF"},{name:"brown",dark:"#8A4A00",light:"#FCC88B"},{name:"cardinal",dark:"#BE1442",light:"#FFD0D0"},{name:"dark_green",dark:"#00675E",light:"#A1DFD5"},{name:"maroon",dark:"#891E01",light:"#FFAE99"},{name:"golden_brown",dark:"#90591A",light:"#FFDEB6"},{name:"maroon",dark:"#800000",light:"#F2CECE"},{name:"green_yellow",dark:"#6A6A00",light:"#FFFFC7"},{name:"blue",dark:"#000075",light:"#CFCFFF"},{name:"black",dark:"#000000",light:"#E3E1E1"},{name:"grey",dark:"#323846",light:"#D0DFFF"},{name:"pink",dark:"#BE012F",light:"#FFD9E2"},{name:"royal_blue",dark:"#002FDC",light:"#D7DFFF"},{name:"magenta",dark:"#B402AA",light:"#FFCEFB"}];function Xe(e){return H8[e%H8.length]}const Sl=(e,t)=>d.Children.map(e,n=>d.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function C0({value:e,darkColor:t,lightColor:n}){return l.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[l.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-radius-600 border"}),l.jsx("div",{className:"flex items-start justify-start",children:l.jsx("div",{className:"text-xs font-normal leading-none text-body-primary",children:e})})]})}function A0({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm basis-full flex-col items-start justify-start px-1 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function S0({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function E0({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return l.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[l.jsx(hn,{size:"md",children:l.jsx(gn,{src:r,alt:"Avatar"})}),l.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function ke({children:e,showSideBySide:t,tooltipTitle:n}){const r=Sl(e,C0),o=Sl(e,A0),a=Sl(e,S0),i=Sl(e,E0);return l.jsxs("div",{className:"rabbit-ds relative z-[1500] inline-flex h-auto w-auto min-w-[200px] max-w-[400px] flex-col items-start justify-start gap-2 rounded-radius-200 bg-white p-2 shadow-card-basic",children:[l.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-body-primary",children:n}),a,l.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-radius-200 p-2",children:[t&&l.jsxs("div",{className:ne("flex w-full justify-between"),children:[o&&o[0],!!(o!=null&&o[1])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),t&&(o==null?void 0:o[2])&&l.jsxs("div",{className:ne("mt-3 flex w-full justify-between"),children:[o&&o[2],!!(o!=null&&o[3])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[3]]}),!t&&l.jsx("div",{className:ne("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?l.jsx("div",{className:"h-250 w-full bg-surface-grey-subtle px-2"}):null,r,i]})}C0.displayName="Legend",A0.displayName="Item",S0.displayName="Header",E0.displayName="Footer",ke.Legend=C0,ke.Item=A0,ke.Header=S0,ke.Footer=E0,ke.defaultProps={showSideBySide:!1};function U8({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}U8.defaultProps={xValue:void 0,yValue:void 0};function Ij({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsx(z4,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,c;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((c=o==null?void 0:o.xScale)==null?void 0:c.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const Lj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),Bj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},zj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),El={xAccessor:e=>e.x,yAccessor:e=>e.y},G8=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Y8=10,Wj=5,M0=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,connectNulls:g=!1,maxNodesInMiniMode:m=Wj,tooltipStackCharLimit:x=Y8,seriesSelectorTitle:y,preselectedNodes:w},b)=>{const[A,C]=d.useState(()=>(w&&w<=e.length?e.slice(0,w):e).map(k=>k.id)),$=d.useRef(null);Bn($,b,`${a}-${i}-LineChart`);const P=d.useMemo(()=>o.map((M,k)=>{const L=e.find(j=>j.id===M.id);return{points:M.data.map((j,V)=>({x:r[V],y:Number(j),nodeId:M.id,color:(L==null?void 0:L.color)??Xe(k)}))}}).slice(0,h==="mini"?m:o.length),[o,h,m,e,r]),T=d.useMemo(()=>h==="full"?P.filter(M=>A.includes(M.points[0].nodeId)):P,[P,A,h]);return l.jsxs("div",{ref:$,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(t8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:M=>u?G8(M,u.symbol,u.position):M,rangePadding:{end:10},tickComponent:M=>l.jsx(Bj,{tickData:M,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>f?G8(Ht(M>=1e3?"~s":"")(M),f.symbol,f.position):Ht(M>=1e3?"~s":"")(M),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((M,k)=>l.jsxs(l.Fragment,{children:[l.jsx(Ij,{data:M.points,xAccessor:El.xAccessor,yAccessor:El.yAccessor,connectNulls:g}),l.jsx(V8,{dataKey:`Performance Management ${k}`,data:M.points,size:8,renderGlyph:Lj,xAccessor:El.xAccessor,yAccessor:El.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:zj,renderTooltip:({tooltipData:M})=>{var j,V,z,E,_,U;const k=e.find(B=>{var O;return B.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),L=((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum)&&((V=M==null?void 0:M.nearestDatum)==null?void 0:V.datum.x.length)<x;return l.jsx(U8,{xValue:(z=M==null?void 0:M.nearestDatum)==null?void 0:z.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!L,tooltipTitle:p,legendValue:(k==null?void 0:k.name)||"",legendDarkColor:((_=M==null?void 0:M.nearestDatum)==null?void 0:_.datum.color.dark)||Xe(0).dark,legendLightColor:((U=M==null?void 0:M.nearestDatum)==null?void 0:U.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:y??a}),"(",T.length??0,"/",P.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:P.map(M=>{const k=e.find(L=>L.id===M.points[0].nodeId);return k&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),k.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:A.includes(k.id),onCheckedChange:L=>{let j=[...A];L?j=[...A,k.id]:j.splice(A.indexOf(k.id),1),C(j)}})})]},k.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:P.map(M=>{const k=e.find(L=>L.id===M.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),k==null?void 0:k.name]},k==null?void 0:k.id)})})]})}),jj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Y8,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};M0.defaultProps=jj,M0.displayName="LineBase";const X8=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(M0,{ref:t,width:n,height:r,...e})}));X8.displayName="LineChart";const Vj=X8;function q8(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Hj(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function $0(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function Uj(e,t){return e.sourceLinks.length?e.depth:t-1}function Ml(e){return function(){return e}}function K8(e,t){return $l(e.source,t.source)||e.index-t.index}function Q8(e,t){return $l(e.target,t.target)||e.index-t.index}function $l(e,t){return e.y0-t.y0}function P0(e){return e.value}function Gj(e){return e.index}function Yj(e){return e.nodes}function Xj(e){return e.links}function Z8(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function J8({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function qj(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=Gj,c=Uj,u,f,p=Yj,h=Xj,v=6;function g(){const E={nodes:p.apply(null,arguments),links:h.apply(null,arguments)};return m(E),x(E),y(E),w(E),C(E),J8(E),E}g.update=function(E){return J8(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:Ml(E),g):s},g.nodeAlign=function(E){return arguments.length?(c=typeof E=="function"?E:Ml(E),g):c},g.nodeSort=function(E){return arguments.length?(u=E,g):u},g.nodeWidth=function(E){return arguments.length?(o=+E,g):o},g.nodePadding=function(E){return arguments.length?(a=i=+E,g):a},g.nodes=function(E){return arguments.length?(p=typeof E=="function"?E:Ml(E),g):p},g.links=function(E){return arguments.length?(h=typeof E=="function"?E:Ml(E),g):h},g.linkSort=function(E){return arguments.length?(f=E,g):f},g.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],g):[n-e,r-t]},g.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],g):[[e,t],[n,r]]},g.iterations=function(E){return arguments.length?(v=+E,g):v};function m({nodes:E,links:_}){for(const[B,O]of E.entries())O.index=B,O.sourceLinks=[],O.targetLinks=[];const U=new Map(E.map((B,O)=>[s(B,O,E),B]));for(const[B,O]of _.entries()){O.index=B;let{source:N,target:D}=O;typeof N!="object"&&(N=O.source=Z8(U,N)),typeof D!="object"&&(D=O.target=Z8(U,D)),N.sourceLinks.push(O),D.targetLinks.push(O)}if(f!=null)for(const{sourceLinks:B,targetLinks:O}of E)B.sort(f),O.sort(f)}function x({nodes:E}){for(const _ of E)_.value=_.fixedValue===void 0?Math.max($0(_.sourceLinks,P0),$0(_.targetLinks,P0)):_.fixedValue}function y({nodes:E}){const _=E.length;let U=new Set(E),B=new Set,O=0;for(;U.size;){for(const N of U){N.depth=O;for(const{target:D}of N.sourceLinks)B.add(D)}if(++O>_)throw new Error("circular link");U=B,B=new Set}}function w({nodes:E}){const _=E.length;let U=new Set(E),B=new Set,O=0;for(;U.size;){for(const N of U){N.height=O;for(const{source:D}of N.targetLinks)B.add(D)}if(++O>_)throw new Error("circular link");U=B,B=new Set}}function b({nodes:E}){const _=q8(E,O=>O.depth)+1,U=(n-e-o)/(_-1),B=new Array(_);for(const O of E){const N=Math.max(0,Math.min(_-1,Math.floor(c.call(null,O,_))));O.layer=N,O.x0=e+N*U,O.x1=O.x0+o,B[N]?B[N].push(O):B[N]=[O]}if(u)for(const O of B)O.sort(u);return B}function A(E){const _=Hj(E,U=>(r-t-(U.length-1)*i)/$0(U,P0));for(const U of E){let B=t;for(const O of U){O.y0=B,O.y1=B+O.value*_,B=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*_}B=(r-B+i)/(U.length+1);for(let O=0;O<U.length;++O){const N=U[O];N.y0+=B*(O+1),N.y1+=B*(O+1)}j(U)}}function C(E){const _=b(E);i=Math.min(a,(r-t)/(q8(_,U=>U.length)-1)),A(_);for(let U=0;U<v;++U){const B=Math.pow(.99,U),O=Math.max(1-B,(U+1)/v);P(_,B,O),$(_,B,O)}}function $(E,_,U){for(let B=1,O=E.length;B<O;++B){const N=E[B];for(const D of N){let Q=0,q=0;for(const{source:oe,value:re}of D.targetLinks){let J=re*(D.layer-oe.layer);Q+=V(oe,D)*J,q+=J}if(!(q>0))continue;let te=(Q/q-D.y0)*_;D.y0+=te,D.y1+=te,L(D)}u===void 0&&N.sort($l),T(N,U)}}function P(E,_,U){for(let B=E.length,O=B-2;O>=0;--O){const N=E[O];for(const D of N){let Q=0,q=0;for(const{target:oe,value:re}of D.sourceLinks){let J=re*(oe.layer-D.layer);Q+=z(D,oe)*J,q+=J}if(!(q>0))continue;let te=(Q/q-D.y0)*_;D.y0+=te,D.y1+=te,L(D)}u===void 0&&N.sort($l),T(N,U)}}function T(E,_){const U=E.length>>1,B=E[U];k(E,B.y0-i,U-1,_),M(E,B.y1+i,U+1,_),k(E,r,E.length-1,_),M(E,t,0,_)}function M(E,_,U,B){for(;U<E.length;++U){const O=E[U],N=(_-O.y0)*B;N>1e-6&&(O.y0+=N,O.y1+=N),_=O.y1+i}}function k(E,_,U,B){for(;U>=0;--U){const O=E[U],N=(O.y1-_)*B;N>1e-6&&(O.y0-=N,O.y1-=N),_=O.y0-i}}function L({sourceLinks:E,targetLinks:_}){if(f===void 0){for(const{source:{sourceLinks:U}}of _)U.sort(Q8);for(const{target:{targetLinks:U}}of E)U.sort(K8)}}function j(E){if(f===void 0)for(const{sourceLinks:_,targetLinks:U}of E)_.sort(Q8),U.sort(K8)}function V(E,_){let U=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:B,width:O}of E.sourceLinks){if(B===_)break;U+=O+i}for(const{source:B,width:O}of _.targetLinks){if(B===E)break;U-=O}return U}function z(E,_){let U=_.y0-(_.targetLinks.length-1)*i/2;for(const{source:B,width:O}of _.targetLinks){if(B===E)break;U+=O+i}for(const{target:B,width:O}of E.sourceLinks){if(B===_)break;U-=O}return U}return g}function Kj({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,c,u,f;const a=e.source,i=e.target;return l.jsxs(ke,{tooltipTitle:o,children:[l.jsx(ke.Item,{label:t,value:a.name}),l.jsx(ke.Item,{label:n,value:i.name}),l.jsx(ke.Item,{label:r,value:e.weight.toString()}),l.jsx(ke.Legend,{value:a.name,darkColor:(s=Xe((a.index||0)+1))==null?void 0:s.dark,lightColor:(c=Xe((a.index||0)+1))==null?void 0:c.light}),l.jsx(ke.Legend,{value:i.name,darkColor:(u=Xe((i.index||0)+1))==null?void 0:u.dark,lightColor:(f=Xe((i.index||0)+1))==null?void 0:f.light})]})}const R8=80,eb=20,Qj=30,Zj=12,tb=d.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const c=d.useMemo(()=>qj().nodeId(E=>E.id).nodeWidth(Zj).nodePadding(Qj).nodeAlign(E=>E.group),[]),u=d.useRef(null);Bn(u,s,`${n}-SankeyChart`);const[f,p]=d.useState(""),[h,v]=d.useState(null),{tooltipData:g,tooltipLeft:m,tooltipTop:x,tooltipOpen:y,showTooltip:w,hideTooltip:b}=Ua(),{containerBounds:A,containerRef:C,TooltipInPortal:$}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),P=d.useMemo(()=>c.extent([[R8,eb],[t-R8,e-eb-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,c,r,o]),T=d.useMemo(()=>Math.max(...P.nodes.map(E=>E.depth??0)),[P]),M=d.useMemo(()=>{const E={};let _=-1/0;return P.nodes.forEach(U=>{const{group:B}=U;E[B]?(E[B].x=Math.max(E[B].x??-1/0,U.x0??-1/0),E[B].y=Math.max(E[B].y??-1/0,U.y1??-1/0)):(E[B]={},E[B].x=U.x0,E[B].y=U.y1),_=Math.max(_,E[B].y??-1/0),E[B].y=_}),Object.keys(E).forEach(U=>{E[U].y=_}),E},[P]),k=d.useCallback(E=>{const _=c.nodeId()(E);p(f===_?"":_)},[f,c]),L=d.useCallback(()=>{p(""),v(null)},[]),j=d.useMemo(()=>f===""&&h===null?new Set:new Set(P.links.filter(E=>c.nodeId()(E.source)===f||c.nodeId()(E.target)===f||(h==null?void 0:h.source)===E.source&&(h==null?void 0:h.target)===E.target)),[f,P,h,c]),V=d.useCallback((E,_)=>{const U=("clientX"in E?E.clientX:0)-A.left,B=("clientY"in E?E.clientY:0)-A.top;v(_),U&&B&&w({tooltipLeft:U,tooltipTop:B,tooltipData:_})},[w,A]),z=d.useCallback(()=>{L(),b()},[L,b]);return l.jsxs("div",{ref:u,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[l.jsxs("svg",{height:e,width:t,ref:C,children:[l.jsx("g",{children:P.links.map(E=>l.jsx(NB,{data:E,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>z(),onMouseMove:_=>V(_,E),stroke:Xe((E.source.index||0)+1).light,strokeWidth:E.width,strokeOpacity:j.has(E)?.7:.4},E.index))}),l.jsx("g",{children:P.nodes.map(E=>{var _,U,B;return l.jsx("g",{children:l.jsx(W4,{x:E.x0??0,height:(E.y1??0)-(E.y0??0)+10,width:(E.x1??0)-(E.x0??0),y:(E.y0??0)-5,onMouseEnter:()=>k(E),onMouseLeave:()=>L(),radius:2,fill:f===E.id?(_=Xe((E.index||0)+1))==null?void 0:_.dark:(U=Xe((E.index||0)+1))==null?void 0:U.light,stroke:(B=Xe((E.index||0)+1))==null?void 0:B.dark,all:!0})},E.index)})}),l.jsx("g",{children:a.map(E=>l.jsx(Ra,{axisCharLimit:20,x:M[E.id].x??0,y:(M[E.id].y??0)+40,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},E.id))}),l.jsxs("g",{children:[P.nodes.map(E=>l.jsx(Ra,{axisCharLimit:8,x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:E.depth===T?"start":"end",fill:"#666666"}},E.index)),P.nodes.map(E=>E.value&&l.jsx(wa,{x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:E.depth===T?"start":"end",fill:"#666666"},children:`(${E.value.toString()})`},E.index))]})]}),y&&g&&l.jsx($,{top:x,left:m,unstyled:!0,applyPositionStyle:!0,children:l.jsx(Kj,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});tb.displayName="Sankey";const nb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>n&&r&&l.jsx(tb,{ref:t,width:n,height:r,...e})}));nb.displayName="SankeyChart";const Jj=nb;function Rj(e){return"bandwidth"in e?e.bandwidth():0}var eV=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function T0(){return T0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T0.apply(this,arguments)}function tV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function rb(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,a=e.scale,i=e.width,s=e.stroke,c=s===void 0?"#eaf0f6":s,u=e.strokeWidth,f=u===void 0?1:u,p=e.strokeDasharray,h=e.className,v=e.children,g=e.numTicks,m=g===void 0?10:g,x=e.lineStyle,y=e.offset,w=e.tickValues,b=tV(e,eV),A=w??bf(a,m),C=(y??0)+Rj(a)/2,$=A.map(function(P,T){var M,k=((M=rl(a(P)))!=null?M:0)+C;return{index:T,from:new Nn({x:0,y:k}),to:new Nn({x:i,y:k})}});return d.createElement(mn,{className:gt("visx-rows",h),top:n,left:o},v?v({lines:$}):$.map(function(P){var T=P.from,M=P.to,k=P.index;return d.createElement(LB,T0({key:"row-line-"+k,from:T,to:M,stroke:c,strokeWidth:f,strokeDasharray:p,style:x},b))}))}rb.propTypes={tickValues:ie.array,width:ie.number.isRequired};function ob({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const c=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:!0,children:[l.jsx(ke.Item,{label:r,value:c}),l.jsx(ke.Item,{label:o,value:u}),l.jsx(ke.Legend,{value:a,darkColor:i,lightColor:s})]})}ob.defaultProps={xValue:void 0,yValue:void 0};const ab=20,ib=50,k0=80,Pl=50,nV=10,rV=25,N0=d.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:c=rV,minBinCount:u=nV,integerBins:f=!1,integerYAxis:p=!1},h)=>{const v=d.useMemo(()=>Ls(a),[a]),{histogramDomain:g,threshold:m,thresholdInteger:x}=d.useMemo(()=>{const O=v[0]??0,N=O===v[1]?u+O:v[1]??0,D=N-O>u?N:u+O,Q=Math.min(Math.max(N-O,u),c),q=Math.floor(v[0]??0),te=Math.ceil(D);return{histogramDomain:r||(f?[q,te]:[O,N]),threshold:Q,thresholdInteger:Math.ceil(Q)}},[v,r,f,c,u]),y=d.useMemo(()=>Oo({domain:g,range:[Pl,i-ib],round:!0,nice:!0}),[g,i]),w=d.useMemo(()=>RF().domain(y.domain()).thresholds(o||(f?x:m))(a),[y,o,a,m,x,f]),b=d.useMemo(()=>Oo({domain:[0,Nd(w,O=>O.length)??0],range:[s-k0,ab],round:!0,nice:!0}),[w,s]),A=d.useMemo(()=>b.ticks().filter(O=>p?Number.isInteger(O):O),[p,b]),C=d.useRef(null);Bn(C,h,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:P,tooltipTop:T,tooltipOpen:M,showTooltip:k,hideTooltip:L}=Ua(),{containerBounds:j,containerRef:V,TooltipInPortal:z}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-Pl-ib,_=s-ab-k0-100,U=d.useCallback((O,N)=>{const D=("clientX"in O?O.clientX:0)-j.left,Q=("clientY"in O?O.clientY:0)-j.top;D&&Q&&k({tooltipLeft:D,tooltipTop:Q,tooltipData:N})},[k,j]),B=d.useCallback(()=>{L()},[L]);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:C,children:[l.jsxs("svg",{width:i,height:s,ref:V,children:[l.jsx(Ff,{orientation:"bottom",scale:y,top:s-k0,hideTicks:!0,numTicks:6,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Ff,{orientation:"left",scale:b,left:Pl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:O=>p?Number(O)>=1e3?Ht("~s")(Number(Ht("d")(O))):Ht("d")(O):Number(O)>=1e3?Ht("~s")(O):Ht("")(O),tickValues:A,label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsxs(mn,{children:[l.jsx(rb,{scale:b,width:E,height:_,left:Pl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),w.map(O=>{const N=Math.abs(b(0)-b(O.length)),D=Math.abs(y(O.x1??0)-y(O.x0??0));return l.jsx("g",{children:l.jsx(wB,{x:y(O.x0??0),y:b(O.length),width:D,height:N&&N-1,fill:Xe(0).light,stroke:Xe(0).dark,strokeWidth:1,onMouseMove:Q=>U(Q,O),onMouseLeave:()=>B()})},Math.random())})]})]}),M&&$&&l.jsx(z,{top:T,left:P,unstyled:!0,applyPositionStyle:!0,children:l.jsx(ob,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Xe(0).dark,legendLightColor:Xe(0).light})},Math.random()),b.domain()[2]]})}),sb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(N0,{ref:t,width:n,height:r,...e})}));N0.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},N0.displayName="HistogramBase",sb.displayName="HistogramChart";const oV=sb;function lb({tooltipTitle:e,label:t,value:n,unit:r,legendValue:o,legendDarkColor:a,legendLightColor:i}){return l.jsxs(ke,{tooltipTitle:e,children:[l.jsx(ke.Item,{label:t,value:`${n} ${r}`}),l.jsx(ke.Legend,{value:o,darkColor:a||"",lightColor:i||""})]})}lb.defaultProps={};const aV=e=>e.value,iV=e=>e.label,cb=d.forwardRef(({width:e,height:t,unit:n="%",data:r,tooltipTitle:o,legendTitle:a},i)=>{const s=e/2,c=t/2,u=d.useMemo(()=>Math.min(e-.35*e,t-50)/2,[e,t]),{tooltipData:f,tooltipLeft:p,tooltipTop:h,tooltipOpen:v,showTooltip:g,hideTooltip:m}=Ua(),{containerBounds:x,containerRef:y,TooltipInPortal:w}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),b=d.useRef(null),A=d.useCallback(($,P)=>{const T=("clientX"in $?$.clientX:0)-x.left,M=("clientY"in $?$.clientY:0)-x.top;T&&M&&g({tooltipLeft:T,tooltipTop:M,tooltipData:P})},[g,x]),C=d.useCallback(()=>{m()},[m]);return Bn(b,i,"DonutChart"),l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:b,children:[l.jsx("svg",{width:e,height:t,className:"rabbit-ds",ref:y,children:l.jsx(mn,{top:c-20,left:s,children:l.jsx(pB,{data:r,pieValue:aV,outerRadius:u-10,innerRadius:u-Math.min(e*.07,22)-10,cornerRadius:2,padAngle:.025,children:$=>l.jsx(l.Fragment,{children:$.arcs.map(P=>{const T=iV(P.data);return l.jsx("g",{children:l.jsx("path",{d:$.path(P)??void 0,fill:P.data.color,onMouseLeave:C,onMouseMove:M=>A(M,{label:a,value:P.value,tooltipTitle:o,unit:n,legendValue:T,legendDarkColor:P.data.labelColor,legendLightColor:P.data.color})})},`arc-${T}`)})})})})}),v&&f&&l.jsx(w,{top:h,left:p,unstyled:!0,applyPositionStyle:!0,children:l.jsx(lb,{unit:f.unit,label:f.label,value:f.value,tooltipTitle:o,legendValue:f.legendValue??"",legendDarkColor:f.legendDarkColor,legendLightColor:f.legendLightColor})},Math.random()),l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-2 text-[10px] font-semibold text-body-secondary",style:{fontSize:Math.min(e*.04,10)},children:r.map($=>l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:$.color,borderColor:$.labelColor,color:$.labelColor,width:Math.min(e*.04,10),height:Math.min(e*.04,10)},className:"h-3 w-3 rounded-radius-round border"}),`${$.label}: ${$.value}${n}`]},$.label))})]})});cb.displayName="DonutChartBase";const ub=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(cb,{ref:t,width:n,height:r,...e})}));ub.displayName="DonutChart";const sV=ub;function db({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}db.defaultProps={xValue:void 0,yValue:void 0};const Tl={top:60,left:20,right:20,bottom:20},fb={start:10,end:-10,middle:0},pb=d.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:c,series:u=[],xAxisValues:f},p)=>{const h=d.useRef(null);Bn(h,p,"RadarChart");const{tooltipData:v,tooltipLeft:g,tooltipTop:m,tooltipOpen:x,showTooltip:y,hideTooltip:w}=Ua(),{containerBounds:b,containerRef:A,TooltipInPortal:C}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=d.useCallback((N,D)=>{const Q=Math.PI*2/N;return[...new Array(N)].map((q,te)=>({x:D*Math.sin(te*Q),y:D*Math.cos(te*Q)}))},[]),P=d.useCallback((N,D,Q)=>Q==="pre"?`${D}${N}`:`${N}${D}`,[]),T=d.useCallback((N,D,Q)=>{const q=Math.PI*2/N.length,te=new Array(N.length).fill({x:0,y:0,data:null}),oe=new Array(N.length+1).fill("").reduce((re,J,ae)=>{if(ae>N.length)return re;const Y=D(Q(N[ae-1]))*Math.sin(ae*q),Z=D(Q(N[ae-1]))*Math.cos(ae*q);return te[ae-1]={x:Y,y:Z,data:N[ae-1]},`${re}${Y},${Z} `});return{points:te,pointString:oe}},[]),M=d.useMemo(()=>new Nn({x:0,y:0}),[]),k=d.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),L=d.useCallback((N,D)=>{const Q=("clientX"in N?N.clientX:0)-b.left,q=("clientY"in N?N.clientY:0)-b.top;Q&&q&&y({tooltipLeft:Q,tooltipTop:q,tooltipData:D})},[y,b]),j=d.useCallback(()=>{w()},[w]),V=d.useMemo(()=>e-Tl.left-Tl.right,[e]),z=d.useMemo(()=>t-Tl.top-Tl.bottom,[t]),E=d.useMemo(()=>Math.min(V,z)/2,[V,z]),_=u.length?u.reduce((N,D)=>{const Q=D.data.filter(q=>q);return Math.max(N,...Q)},-1/0):0,U=Oo({range:[0,E],domain:c??[0,_]}),B=$(f.length,E),O=N=>T(N,D=>U(D)??0,D=>D);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:h,children:[l.jsxs("svg",{width:e,height:t,ref:A,pointerEvents:"all",onMouseLeave:j,children:[l.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),l.jsxs(mn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,D)=>l.jsx(j4,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(D+1)/n},`web1-${Math.random()}`)),f.map((N,D)=>l.jsxs(l.Fragment,{children:[l.jsx(Cf,{from:M,to:B[D],stroke:f.length===1?Xe(0).dark:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),l.jsx(wa,{x:B[D].x,y:B[D].y,textAnchor:k(B[D].x),verticalAnchor:k(B[D].y),dx:fb[k(B[D].x)],dy:fb[k(B[D].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?P(f[(D+f.length-1)%f.length],s.symbol,s.position):f[(D+f.length-1)%f.length]}`})]})),u.map((N,D)=>l.jsx("polygon",{points:O(N.data).pointString,fill:Xe(D).light,fillOpacity:.2,stroke:Xe(D).dark,strokeWidth:1},`polypath-${Math.random()}`)),u.map((N,D)=>O(N.data).points.map((Q,q)=>l.jsx(j4,{cx:Q.x,cy:Q.y,r:5,fill:"transparent",onMouseMove:te=>{var oe;return L(te,{yAxisLabel:((oe=r.find(re=>re.id===N.id))==null?void 0:oe.name)??"",xAxisValue:f[q],yAxisValue:N.data[q],xAxisLabel:o??"Category",legendDarkColor:Xe(D).dark,legendLightColor:Xe(D).light})},onMouseOut:j},`radar-point-${Math.random()}`)))]})]}),x&&v&&l.jsx(C,{top:m,left:g,unstyled:!0,applyPositionStyle:!0,children:l.jsx(db,{xAxisLabel:v.xAxisLabel??"",xValue:v.xAxisValue,yAxisLabel:v.yAxisLabel??"",yValue:v.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:v.yAxisLabel??"",legendDarkColor:v.legendDarkColor,legendLightColor:v.legendLightColor})},Math.random())]})});pb.displayName="RadarChartBase";const hb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(pb,{ref:t,width:n,height:r,...e})}));hb.displayName="RadarChart";const lV=hb;function gb({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}gb.defaultProps={xValue:void 0,yValue:void 0};const cV=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),uV=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},vb={xAccessor:e=>e.x,yAccessor:e=>e.y},mb=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,bb=10,dV=5,O0=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,maxNodesInMiniMode:g=dV,tooltipStackCharLimit:m=bb,seriesSelectorTitle:x,preselectedNodes:y},w)=>{const[b,A]=d.useState(()=>(y&&y<=e.length?e.slice(0,y):e).map(M=>M.id)),C=d.useRef(null);Bn(C,w,`${a}-${i}-StackedBarChart`);const $=d.useMemo(()=>o.map((T,M)=>{const k=e.find(L=>L.id===T.id);return{points:T.data.map((L,j)=>({x:r[j],y:Number(L),nodeId:T.id,color:(k==null?void 0:k.color)??Xe(M)}))}}).slice(0,h==="mini"?g:o.length),[o,h,g,e,r]),P=d.useMemo(()=>h==="full"?$.filter(T=>b.includes(T.points[0].nodeId)):$,[$,b,h]);return l.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(t8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:T=>u?mb(T,u.symbol,u.position):T,rangePadding:{end:10},tickComponent:T=>l.jsx(uV,{tickData:T,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>f?mb(Ht(T>=1e3?"~s":"")(T),f.symbol,f.position):Ht(T>=1e3?"~s":"")(T),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Oj,{children:P.map(T=>l.jsx(Tj,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:vb.xAccessor,yAccessor:vb.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:cV,renderTooltip:({tooltipData:T})=>{var L,j,V,z,E,_;const M=e.find(U=>{var B;return U.id===((B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum.nodeId)}),k=((L=T==null?void 0:T.nearestDatum)==null?void 0:L.datum)&&((j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x.length)<m;return l.jsx(gb,{xValue:(V=T==null?void 0:T.nearestDatum)==null?void 0:V.datum.x,yValue:(z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!k,tooltipTitle:p,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Xe(0).dark,legendLightColor:((_=T==null?void 0:T.nearestDatum)==null?void 0:_.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:x??a}),"(",P.length??0,"/",$.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return M&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),M.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:b.includes(M.id),onCheckedChange:k=>{let L=[...b];k?L=[...b,M.id]:L.splice(b.indexOf(M.id),1),A(L)}})})]},M.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),fV={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:bb,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};O0.defaultProps=fV,O0.displayName="StackedBarChartBase";const yb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(O0,{ref:t,width:n,height:r,...e})}));yb.displayName="StackedBarChart";const pV=yb,hV=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>l.jsxs("div",{className:"rabbit-ds inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:e.map(({id:o,name:a,color:i})=>l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),a]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:t.includes(o),onCheckedChange:s=>{let c=[...t];s?c=[...t,o]:c.splice(t.indexOf(o),1),n(c)}})})]},o))})]});function wb({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,otherDataPoints:i=[],pointMetaData:s,seriesMetaData:c}){var p;const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Header,{label:"Review Cycle",value:(p=s==null?void 0:s.reviewCycle)==null?void 0:p.name}),l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),i.map(({label:h,value:v})=>l.jsx(ke.Item,{label:h,value:v},h)),l.jsx(ke.Footer,{nodeData:c})]})}wb.defaultProps={xValue:void 0,yValue:void 0};var gV=["id","markerWidth","markerHeight","markerUnits","children"];function D0(){return D0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D0.apply(this,arguments)}function vV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function F0(e){var t=e.id,n=e.markerWidth,r=n===void 0?3:n,o=e.markerHeight,a=o===void 0?3:o,i=e.markerUnits,s=i===void 0?"userSpaceOnUse":i,c=e.children,u=vV(e,gV);return d.createElement("defs",null,d.createElement("marker",D0({id:t,markerWidth:r,markerHeight:a,markerUnits:s},u),c))}F0.propTypes={id:ie.string.isRequired,size:ie.number,markerWidth:ie.oneOfType([ie.string,ie.number]),markerHeight:ie.oneOfType([ie.string,ie.number]),markerUnits:ie.string,refX:ie.oneOfType([ie.string,ie.number]),refY:ie.oneOfType([ie.string,ie.number]),strokeWidth:ie.number,children:ie.node.isRequired};var mV=["id","size","strokeWidth"];function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_0.apply(this,arguments)}function bV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function yV(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=bV(e,mV),s=r+a*2,c=r,u=s/2,f="0 0, "+r+" "+r/2+", 0 "+r;return d.createElement(F0,_0({id:t,markerWidth:s,markerHeight:s,refX:c,refY:u,orient:"auto",markerUnits:"strokeWidth",fill:"none",strokeWidth:a},i),d.createElement("g",{transform:"translate("+a+", "+a+")"},d.createElement("polyline",{points:f})))}var wV=["id","size","strokeWidth"];function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I0.apply(this,arguments)}function xV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function CV(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=xV(e,wV),s=r*2,c=s+a,u=c/2;return d.createElement(F0,I0({id:t,markerWidth:c,markerHeight:c,refX:0,refY:u,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:a},i),d.createElement("circle",{r,cx:u,cy:u}))}function AV({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsxs(l.Fragment,{children:[l.jsx(CV,{id:"marker-circle",stroke:"#666",size:6,refX:7,fill:"transparent",strokeWidth:2}),l.jsx(yV,{id:"marker-arrow",stroke:"#666",size:14,strokeWidth:2,markerUnits:"userSpaceOnUse"}),l.jsx(z4,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))??0},y:i=>{var s;return((s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i)))??0},curve:pa,shapeRendering:"geometricPrecision",markerStart:"url(#marker-circle)",markerEnd:"url(#marker-arrow)"})]})}const SV=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),EV=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),kl={xAccessor:e=>e==null?void 0:e.x,yAccessor:e=>e==null?void 0:e.y},xb=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,MV=10,$V=5,Cb=d.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:c,yAxisUnitSymbol:u,tooltipTitle:f,mode:p="mini",xAxisCharLimit:h,connectNulls:v=!1,maxNodesInMiniMode:g=$V,tooltipStackCharLimit:m=MV,withBackground:x=!0},y)=>{const w=d.useRef(null),b=e===1;Bn(w,y,`${o}-${a}-DirectedLineChart`);const A=d.useMemo(()=>t.map(({seriesMetaData:k},L)=>{const{employee:j}=k;return{id:j.id,name:j.name,color:Xe(L)}}).slice(0,p==="mini"?g:t.length),[t,p,g]),[C,$]=d.useState(()=>A.filter((k,L)=>p==="full"||L<g).map(k=>k.id)),P=d.useMemo(()=>t.map((k,L)=>({nodeId:k.seriesMetaData.employee.id,points:k.xValues.map((j,V)=>{var E;let z=null;return b?z=1/t.length*(L+1)+1/(t.length*10)*(V+1):z=((E=k==null?void 0:k.yValues)==null?void 0:E[V])??null,{x:k.xValues[V],y:z,pointMetaData:k.pointsMetaData[V],nodeId:k.seriesMetaData.employee.id,color:Xe(L)}})})).slice(0,p==="mini"?g:t.length),[t,p,g,b]),T=d.useMemo(()=>p==="full"?P.filter(({nodeId:k})=>C.includes(k)):P,[P,p,C]),M=d.useMemo(()=>Math.floor((r-(p==="mini"?0:150))/(t[0].xValues.length*8)),[r,p,t]);return l.jsx("div",{ref:w,id:"directed-line-chart",className:ne("rabbit-ds flex flex-col",x?"bg-[white]":""),style:{width:r,height:n},children:l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:50,right:50,bottom:50},xScale:typeof i[0]=="string"?{type:"band",domain:i,padding:1}:{type:"linear",domain:i},yScale:typeof s[0]=="string"?{type:"band",domain:s,padding:1}:{type:"linear",domain:s},children:[l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:k=>c?xb(k,c.symbol,c.position):k,tickComponent:k=>l.jsx(Ra,{textLabel:k.formattedValue||"",x:k.x,y:k.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:h??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:k=>u?xb(k,u.symbol,u.position):k,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((k,L)=>l.jsxs(l.Fragment,{children:[l.jsx(AV,{data:k.points,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor,connectNulls:v}),l.jsx(V8,{dataKey:`Performance Management ${L}`,data:k.points,size:8,renderGlyph:SV,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,showVerticalCrosshair:!0,showHorizontalCrosshair:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:EV,renderTooltip:({tooltipData:k})=>{var V,z,E,_,U,B,O,N,D;const L=t.find(Q=>{var q;return Q.id===((q=k==null?void 0:k.nearestDatum)==null?void 0:q.datum.nodeId)}),j=((V=k==null?void 0:k.nearestDatum)==null?void 0:V.datum)&&String((z=k==null?void 0:k.nearestDatum)==null?void 0:z.datum.x).length<m;return l.jsx(wb,{xValue:(E=k==null?void 0:k.nearestDatum)==null?void 0:E.datum.x,yValue:(_=k==null?void 0:k.nearestDatum)==null?void 0:_.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,otherDataPoints:((O=(B=(U=k==null?void 0:k.nearestDatum)==null?void 0:U.datum)==null?void 0:B.pointMetaData)==null?void 0:O.otherDataPoints)??[],seriesMetaData:L==null?void 0:L.seriesMetaData,pointMetaData:(D=(N=k==null?void 0:k.nearestDatum)==null?void 0:N.datum)==null?void 0:D.pointMetaData})}})]})}),p==="full"&&l.jsx(hV,{nodes:A,seriesSelectorTitle:"Team members",selectedNodeIds:C,setSelectedNodeIds:$})]})})});Cb.displayName="LineBase";const Ab=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Cb,{ref:t,width:n,height:r,...e})}));Ab.displayName="DirectedLineChart";const Sb=Ab,PV=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function TV({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=PV.find(a=>a[r]);return o?o[r]:r}return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start",children:[l.jsx("div",{className:"flex items-start gap-2.5",children:l.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&l.jsxs("span",{className:"text-3xs text-body-secondary",children:[e==null?void 0:e.count," Member",my(e==null?void 0:e.count)]})]}),t&&l.jsx("div",{className:"flex items-start",children:l.jsx("div",{className:"flex items-center justify-center rounded-radius-600 bg-surface-grey-subtle/40 px-0.5",children:l.jsxs("span",{className:"text-2xs leading-400 text-body-secondary",children:[e==null?void 0:e.percentage,"%"]})})})]})}const kV=({rows:e,columns:t,boxData:n=[]})=>{let r="";return!n||(n==null?void 0:n.length)===0||(r=n.slice(0,t).reduce((a,i)=>{var f,p,h,v;const s=e===1?"OVERALL":"PERFORMANCE",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},NV=({rows:e,columns:t,boxData:n=[]})=>{if(e===1)return"1fr";let r="";return!n||(n==null?void 0:n.length)===0||(r=n.filter((a,i)=>i%t===0).reduce((a,i)=>{var f,p,h,v;const s="POTENTIAL",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},Eb=d.forwardRef(({rows:e=3,columns:t=3,spacing:n="1px",boxData:r=[],position:o="relative",margin:a="0",width:i="100%",left:s=0,top:c=0,mode:u="mini",showCountData:f=!1},p)=>{const h=d.useRef(null);return Bn(h,p,"GridChart"),l.jsxs("div",{ref:h,className:"flex flex-row",style:{position:o,top:c,left:s,width:i,margin:a,height:"100%"},children:[l.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:NV({rows:e,columns:t,boxData:r}),gridTemplateColumns:kV({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((v,g)=>l.jsx("div",{style:{padding:"8px",backgroundColor:(v==null?void 0:v.color)??"#CFD7DF"},children:l.jsx(TV,{box:v,showCountData:f})},v.label+v.color+g))}),u==="full"&&l.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});Eb.displayName="GridChart";const Mb=Eb,$b=d.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=d.useRef(null);return Bn(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),l.jsxs("div",{ref:o,className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:l.jsx(Mb,{...t,mode:n})}),l.jsxs("div",{className:"absolute h-full w-full",children:[l.jsx(Sb,{...e,mode:n}),l.jsx("div",{})]})]})});$b.displayName="GridDirectedLineChart";const OV=$b,Nl="ToggleGroup",[Pb,GG]=rt(Nl,[io]),Tb=io(),DV=d.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return d.createElement(FV,K({},o,{ref:t}))}if(n==="multiple"){const o=r;return d.createElement(_V,K({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Nl}\``)}),[kb,Nb]=Pb(Nl),FV=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=ut({prop:n,defaultProp:r,onChange:o});return d.createElement(kb,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:d.useCallback(()=>s(""),[s])},d.createElement(Ob,K({},a,{ref:t})))}),_V=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=ut({prop:n,defaultProp:r,onChange:o}),c=d.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=d.useCallback(f=>s((p=[])=>p.filter(h=>h!==f)),[s]);return d.createElement(kb,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u},d.createElement(Ob,K({},a,{ref:t})))}),[IV,LV]=Pb(Nl),Ob=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...c}=e,u=Tb(n),f=Hn(i),p={role:"group",dir:f,...c};return d.createElement(IV,{scope:n,rovingFocus:o,disabled:r},o?d.createElement(qc,K({asChild:!0},u,{orientation:a,dir:f,loop:s}),d.createElement(be.div,K({},p,{ref:t}))):d.createElement(be.div,K({},p,{ref:t})))}),L0="ToggleGroupItem",BV=d.forwardRef((e,t)=>{const n=Nb(L0,e.__scopeToggleGroup),r=LV(L0,e.__scopeToggleGroup),o=Tb(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},c=d.useRef(null);return r.rovingFocus?d.createElement(Kc,K({asChild:!0},o,{focusable:!i,active:a,ref:c}),d.createElement(Db,K({},s,{ref:t}))):d.createElement(Db,K({},s,{ref:t}))}),Db=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Nb(L0,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return d.createElement(P1,K({},s,o,{ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),zV=DV,WV=BV;function jV({children:e,...t}){return l.jsx(zV,{className:"flex gap-2",...t,children:e})}function VV({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return l.jsx(WV,{asChild:!0,value:e,...i,children:l.jsx("button",{"data-deer-btn":!0,type:"button",className:ne("rabbit-ds inline-flex h-7 w-auto flex-col items-center justify-center rounded-radius-round border border-solid p-0 hover:cursor-pointer","data-[state=off]:border-card-grey-subtle data-[state=off]:bg-surface-grey-subtle data-[state=off]:text-body-secondary","data-[state=on]:border-primary-hover data-[state=on]:bg-primary/10 data-[state=on]:text-primary-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),children:l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-radius-round px-4 py-1",children:[r?l.jsx(Me,{IconSVG:r,size:"small"}):null,l.jsxs("div",{className:"text-sm font-semibold",children:[o?l.jsx("span",{children:o}):null," ",a?l.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const ei="NavigationMenu",[B0,HV,UV]=yr(ei),[z0,GV,YV]=yr(ei),[W0,YG]=rt(ei,[UV,YV]),[XV,jr]=W0(ei),[qV,XG]=W0(ei),KV=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:c="horizontal",dir:u,...f}=e,[p,h]=d.useState(null),v=Ee(t,M=>h(M)),g=Hn(u),m=d.useRef(0),x=d.useRef(0),y=d.useRef(0),[w,b]=d.useState(!0),[A="",C]=ut({prop:r,onChange:M=>{const k=M!=="",L=s>0;k?(window.clearTimeout(y.current),L&&b(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=d.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>C(""),150)},[C]),P=d.useCallback(M=>{window.clearTimeout(x.current),C(M)},[C]),T=d.useCallback(M=>{A===M?window.clearTimeout(x.current):m.current=window.setTimeout(()=>{window.clearTimeout(x.current),C(M)},i)},[A,C,i]);return d.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(x.current),window.clearTimeout(y.current)},[]),d.createElement(QV,{scope:n,isRootMenu:!0,value:A,dir:g,orientation:c,rootNavigationMenu:p,onTriggerEnter:M=>{window.clearTimeout(m.current),w?T(M):P(M)},onTriggerLeave:()=>{window.clearTimeout(m.current),$()},onContentEnter:()=>window.clearTimeout(x.current),onContentLeave:$,onItemSelect:M=>{C(k=>k===M?"":M)},onItemDismiss:()=>C("")},d.createElement(be.nav,K({"aria-label":"Main","data-orientation":c,dir:g},f,{ref:v})))}),QV=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:h,onContentLeave:v}=e,[g,m]=d.useState(null),[x,y]=d.useState(new Map),[w,b]=d.useState(null);return d.createElement(XV,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:oi(s),baseId:dt(),dir:o,orientation:a,viewport:g,onViewportChange:m,indicatorTrack:w,onIndicatorTrackChange:b,onTriggerEnter:Je(f),onTriggerLeave:Je(p),onContentEnter:Je(h),onContentLeave:Je(v),onItemSelect:Je(c),onItemDismiss:Je(u),onViewportContentChange:d.useCallback((A,C)=>{y($=>($.set(A,C),new Map($)))},[]),onViewportContentRemove:d.useCallback(A=>{y(C=>C.has(A)?(C.delete(A),new Map(C)):C)},[])},d.createElement(B0.Provider,{scope:t},d.createElement(qV,{scope:t,items:x},i)))},ZV="NavigationMenuList",JV=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(ZV,n),a=d.createElement(be.ul,K({"data-orientation":o.orientation},r,{ref:t}));return d.createElement(be.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},d.createElement(B0.Slot,{scope:n},o.isRootMenu?d.createElement(Lb,{asChild:!0},a):a))}),RV="NavigationMenuItem",[eH,Fb]=W0(RV),tH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=dt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),p=d.useRef(!1),h=d.useCallback((g="start")=>{if(s.current){f.current();const m=j0(s.current);m.length&&V0(g==="start"?m:m.reverse())}},[]),v=d.useCallback(()=>{if(s.current){const g=j0(s.current);g.length&&(f.current=cH(g))}},[]);return d.createElement(eH,{scope:n,value:i,triggerRef:c,contentRef:s,focusProxyRef:u,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:v,onContentFocusOutside:v},d.createElement(be.li,K({},o,{ref:t})))}),_b="NavigationMenuTrigger",nH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=jr(_b,e.__scopeNavigationMenu),i=Fb(_b,e.__scopeNavigationMenu),s=d.useRef(null),c=Ee(s,i.triggerRef,t),u=jb(a.baseId,i.value),f=Vb(a.baseId,i.value),p=d.useRef(!1),h=d.useRef(!1),v=i.value===a.value;return d.createElement(d.Fragment,null,d.createElement(B0.ItemSlot,{scope:n,value:i.value},d.createElement(zb,{asChild:!0},d.createElement(be.button,K({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Wb(v),"aria-expanded":v,"aria-controls":f},o,{ref:c,onPointerEnter:fe(e.onPointerEnter,()=>{h.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:fe(e.onPointerMove,H0(()=>{r||h.current||i.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(i.value),p.current=!0)})),onPointerLeave:fe(e.onPointerLeave,H0(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:fe(e.onClick,()=>{a.onItemSelect(i.value),h.current=v}),onKeyDown:fe(e.onKeyDown,g=>{const x={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];v&&g.key===x&&(i.onEntryKeyDown(),g.preventDefault())})})))),v&&d.createElement(d.Fragment,null,d.createElement(J2,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const m=i.contentRef.current,x=g.relatedTarget,y=x===s.current,w=m==null?void 0:m.contains(x);(y||!w)&&i.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&d.createElement("span",{"aria-owns":f})))}),Ib="navigationMenu.linkSelect",rH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return d.createElement(zb,{asChild:!0},d.createElement(be.a,K({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:fe(e.onClick,i=>{const s=i.target,c=new CustomEvent(Ib,{bubbles:!0,cancelable:!0});if(s.addEventListener(Ib,u=>o==null?void 0:o(u),{once:!0}),ii(s,c),!c.defaultPrevented&&!i.metaKey){const u=new CustomEvent(Dl,{bubbles:!0,cancelable:!0});ii(s,u)}},{checkForDefaultPrevented:!1})})))}),Ol="NavigationMenuContent",oH=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=jr(Ol,e.__scopeNavigationMenu),a=Fb(Ol,e.__scopeNavigationMenu),i=Ee(a.contentRef,t),s=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?d.createElement(aH,K({forceMount:n},c,{ref:i})):d.createElement(Tt,{present:n||s},d.createElement(iH,K({"data-state":Wb(s)},c,{ref:i,onPointerEnter:fe(e.onPointerEnter,o.onContentEnter),onPointerLeave:fe(e.onPointerLeave,H0(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...c.style}})))}),aH=d.forwardRef((e,t)=>{const n=jr(Ol,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ht(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ht(()=>()=>o(e.value),[e.value,o]),null}),Dl="navigationMenu.rootContentDismiss",iH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:c,...u}=e,f=jr(Ol,n),p=d.useRef(null),h=Ee(p,t),v=jb(f.baseId,r),g=Vb(f.baseId,r),m=HV(n),x=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const b=p.current;if(f.isRootMenu&&b){const A=()=>{var C;y(),s(),b.contains(document.activeElement)&&((C=o.current)===null||C===void 0||C.focus())};return b.addEventListener(Dl,A),()=>b.removeEventListener(Dl,A)}},[f.isRootMenu,e.value,o,y,s]);const w=d.useMemo(()=>{const A=m().map(k=>k.value);f.dir==="rtl"&&A.reverse();const C=A.indexOf(f.value),$=A.indexOf(f.previousValue),P=r===f.value,T=$===A.indexOf(r);if(!P&&!T)return x.current;const M=(()=>{if(C!==$){if(P&&$!==-1)return C>$?"from-end":"from-start";if(T&&C!==-1)return C>$?"to-start":"to-end"}return null})();return x.current=M,M},[f.previousValue,f.value,f.dir,m,r]);return d.createElement(Lb,{asChild:!0},d.createElement(Xo,K({id:g,"aria-labelledby":v,"data-motion":w,"data-orientation":f.orientation},u,{ref:h,onDismiss:()=>{var b;const A=new Event(Dl,{bubbles:!0,cancelable:!0});(b=p.current)===null||b===void 0||b.dispatchEvent(A)},onFocusOutside:fe(e.onFocusOutside,b=>{var A;c();const C=b.target;(A=f.rootNavigationMenu)!==null&&A!==void 0&&A.contains(C)&&b.preventDefault()}),onPointerDownOutside:fe(e.onPointerDownOutside,b=>{var A;const C=b.target,$=m().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(C)}),P=f.isRootMenu&&((A=f.viewport)===null||A===void 0?void 0:A.contains(C));($||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:fe(e.onKeyDown,b=>{const A=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!A){const P=j0(b.currentTarget),T=document.activeElement,M=P.findIndex(j=>j===T),L=b.shiftKey?P.slice(0,M).reverse():P.slice(M+1,P.length);if(V0(L))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:fe(e.onEscapeKeyDown,b=>{i.current=!0})})))}),sH="FocusGroup",Lb=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(sH,n);return d.createElement(z0.Provider,{scope:n},d.createElement(z0.Slot,{scope:n},d.createElement(be.div,K({dir:o.dir},r,{ref:t}))))}),Bb=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],lH="FocusGroupItem",zb=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=GV(n),a=jr(lH,n);return d.createElement(z0.ItemSlot,{scope:n},d.createElement(be.button,K({},r,{ref:t,onKeyDown:fe(e.onKeyDown,i=>{if(["Home","End",...Bb].includes(i.key)){let c=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&c.reverse(),Bb.includes(i.key)){const p=c.indexOf(i.currentTarget);c=c.slice(p+1)}setTimeout(()=>V0(c)),i.preventDefault()}})})))});function j0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function V0(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function cH(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Wb(e){return e?"open":"closed"}function jb(e,t){return`${e}-trigger-${t}`}function Vb(e,t){return`${e}-content-${t}`}function H0(e){return t=>t.pointerType==="mouse"?e(t):void 0}const uH=KV,dH=JV,fH=tH,pH=nH,Hb=rH,hH=oH,gH=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function vH(){return l.jsx("div",{className:"relative h-full w-full",children:l.jsxs("div",{className:"absolute left-0 top-0 h-full w-full bg-gradient-to-b from-[#E9F5F8] via-[#F7F7F7] to-[#A1E7FC] shadow-[-4px_0px_4px_0px_rgba(0,0,0.05)_inset]",children:[l.jsx("div",{className:"absolute inset-0 h-full w-full",style:{background:"linear-gradient(180deg, rgba(231, 244, 247, 0.80) 0%, rgba(185, 239, 254, 0.80) 40%, rgba(136, 226, 252, 0.80) 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-darken",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full opacity-60 mix-blend-multiply",style:{background:"linear-gradient(89deg, #A0E7FC 0%, #A4E8FC 19%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full opacity-90 mix-blend-darken",style:{background:"linear-gradient(180deg, #AAE9FC 0%, #D7F1F8 40%, #F4FDFF 100%)",backdropFilter:"blur(4px)"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(87deg, rgba(233, 245, 248, 0.60) 0%, rgba(247, 247, 247, 0.60) 19%, rgba(247, 247, 247, 0.60) 38%, rgba(161, 231, 252, 0.60) 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}})]})})}const Ub=d.forwardRef(({className:e,children:t,...n},r)=>l.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[l.jsx("div",{className:"absolute h-full w-full",children:l.jsx(vH,{})}),l.jsx(uH,{className:ne(gH({className:e})),orientation:"vertical",ref:r,...n,children:l.jsx(dH,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));Ub.displayName="LeftNav";const U0=d.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?dn:"div";return l.jsx(fH,{asChild:!0,children:l.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});U0.displayName="LeftNavItem",U0.defaultProps={asChild:!1};const mH=Ge(["inline-flex w-full flex-col items-center justify-start gap-1"],{variants:{variant:{top:"order-1 mb-auto",bottom:"order-2 mt-auto"},defaultVariant:{variant:"top"}}}),Gb=d.forwardRef(({children:e,align:t,...n},r)=>l.jsx("div",{ref:r,className:ne(mH({variant:t})),...n,children:e}));Gb.displayName="LeftNavItem";const Yb=d.forwardRef((e,t)=>l.jsx(Hb,{ref:t,...e,className:"rabbit-ds z-20 flex size-1400 h-1400 w-1400 cursor-pointer items-center justify-center rounded-radius-100 border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:l.jsxs("svg",{className:"z-20 h-6 w-6",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:l.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[l.jsx("path",{d:"M22.1654 14.8101C22.1654 15.8326 21.3386 16.6614 20.3187 16.6614C19.2988 16.6614 18.472 15.8326 18.472 14.8101C18.472 13.7877 19.2988 12.9589 20.3187 12.9589C21.3386 12.9589 22.1654 13.7877 22.1654 14.8101Z",fill:"#008EF0"}),l.jsx("path",{d:"M9.50932 5.28316C9.14769 5.45665 8.74267 5.5538 8.315 5.5538C6.78513 5.5538 5.54492 4.31054 5.54492 2.7769C5.54492 1.24326 6.78513 0 8.315 0C9.84488 0 11.0851 1.24326 11.0851 2.7769C11.0851 3.20559 10.9882 3.6116 10.8151 3.9741L14.3002 7.46776C14.4528 7.42686 14.6131 7.40506 14.7785 7.40506C15.7984 7.40506 16.6253 8.2339 16.6253 9.25633C16.6253 10.2788 15.7984 11.1076 14.7785 11.1076C13.7586 11.1076 12.9318 10.2788 12.9318 9.25633C12.9318 9.09048 12.9536 8.92973 12.9944 8.77678L9.50932 5.28316Z",fill:"#008EF0"}),l.jsx("path",{d:"M5.53426 9.24775C5.53426 10.2702 4.70745 11.099 3.68754 11.099C2.66762 11.099 1.84082 10.2702 1.84082 9.24775C1.84082 8.22532 2.66762 7.39648 3.68754 7.39648C4.70745 7.39648 5.53426 8.22532 5.53426 9.24775Z",fill:"#FFC200"}),l.jsx("path",{d:"M9.99463 16.5323C9.84207 16.5732 9.68173 16.595 9.5163 16.595C8.49639 16.595 7.66958 15.7661 7.66958 14.7437C7.66958 13.7213 8.49639 12.8924 9.5163 12.8924C10.5362 12.8924 11.363 13.7213 11.363 14.7437C11.363 14.9095 11.3413 15.0703 11.3005 15.2232L14.7855 18.7169C15.1471 18.5434 15.5521 18.4462 15.9798 18.4462C17.5097 18.4462 18.7499 19.6895 18.7499 21.2231C18.7499 22.7568 17.5097 24 15.9798 24C14.4499 24 13.2097 22.7568 13.2097 21.2231C13.2097 20.7944 13.3066 20.3884 13.4797 20.0259L9.99463 16.5323Z",fill:"#FFC200"}),l.jsx("path",{d:"M11.087 20.3604C11.087 21.3828 10.2602 22.2117 9.24028 22.2117C8.22036 22.2117 7.39355 21.3828 7.39355 20.3604C7.39355 19.338 8.22036 18.5092 9.24028 18.5092C10.2602 18.5092 11.087 19.338 11.087 20.3604Z",fill:"#EC3B64"}),l.jsx("path",{d:"M24.014 8.32719C24.014 9.86083 22.7738 11.1041 21.2439 11.1041C20.8197 11.1041 20.4178 11.0085 20.0584 10.8377L16.5673 14.3374C16.6063 14.4873 16.6271 14.6445 16.6271 14.8066C16.6271 15.8291 15.8003 16.6579 14.7804 16.6579C13.7605 16.6579 12.9337 15.8291 12.9337 14.8066C12.9337 13.7842 13.7605 12.9554 14.7804 12.9554C14.9495 12.9554 15.1134 12.9782 15.269 13.0208L18.748 9.53324C18.5723 9.1685 18.4738 8.75938 18.4738 8.32719C18.4738 6.79355 19.714 5.55029 21.2439 5.55029C22.7738 5.55029 24.014 6.79355 24.014 8.32719Z",fill:"#EC3B64"}),l.jsx("path",{d:"M16.6205 3.69746C16.6205 4.71988 15.7937 5.54872 14.7737 5.54872C13.7538 5.54872 12.927 4.71988 12.927 3.69746C12.927 2.67503 13.7538 1.84619 14.7737 1.84619C15.7937 1.84619 16.6205 2.67503 16.6205 3.69746Z",fill:"#5CC461"}),l.jsx("path",{d:"M11.0803 9.25125C11.0803 10.2737 10.2535 11.1025 9.23361 11.1025C9.07191 11.1025 8.91506 11.0817 8.7656 11.0425L5.27441 14.5423C5.44482 14.9026 5.54016 15.3055 5.54016 15.7307C5.54016 17.2643 4.29995 18.5076 2.77008 18.5076C1.24021 18.5076 0 17.2643 0 15.7307C0 14.197 1.24021 12.9538 2.77008 12.9538C3.20121 12.9538 3.60934 13.0525 3.97319 13.2287L7.45222 9.74107C7.40963 9.58505 7.38689 9.42081 7.38689 9.25125C7.38689 8.22883 8.21369 7.39999 9.23361 7.39999C10.2535 7.39999 11.0803 8.22883 11.0803 9.25125Z",fill:"#5CC461"})]})}),l.jsxs("defs",{children:[l.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),l.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),l.jsx("feOffset",{dy:"2"}),l.jsx("feGaussianBlur",{stdDeviation:"4"}),l.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),l.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),l.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),l.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),l.jsx("clipPath",{id:"clip0_1397_29183",children:l.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),l.jsx("clipPath",{id:"clip1_1397_29183",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));Yb.displayName="LeftNavHome";const bH=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-radius-200 font-sans text-[10px] text-body-secondary transition-colors disabled:pointer-events-none","hover:bg-card-bg-hover hover:font-semibold hover:text-primary-hover","focus:bg-card-bg-focus focus:font-semibold focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","active:bg-card-bg-focus active:font-semibold active:text-primary-focus","is-active:bg-card-bg-focus is-active:font-semibold is-active:text-primary-focus"],{variants:{variant:{default:"",withNotification:"",withMenu:"",gradient:""}},defaultVariants:{variant:"default"}}),yH=Ge("",{variants:{variant:{default:"",gradient:"bg-[linear-gradient(90deg,#038EEF_9.05%,#ED3C65_86.39%)] text-transparent [-webkit-background-clip:text] [background-clip:text]"}},defaultVariants:{variant:"default"}}),Xb=d.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},c)=>l.jsx("div",{className:"rabbit-ds",children:l.jsxs(Hb,{"data-deer-btn":!0,className:ne(bH({variant:t,className:e})),ref:c,"data-active":a,...s,children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsxs("div",{className:"relative flex items-center justify-center",children:[l.jsx(Me,{IconSVG:r,size:"large"}),t==="withNotification"&&l.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-radius-300 bg-functional-warn px-2 text-xs text-white",children:[l.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),l.jsx("div",{className:ne(yH({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&l.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:l.jsx(Me,{IconSVG:b1,size:"large"})})]})}));Xb.displayName="LeftNavButton";const wH=Ge("cursor-pointer border border-solid border-[#CFD7DF] bg-[#F5F7F9] px-1 py-[2px] text-primary transition-all hover:border-primary-hover hover:bg-primary-hover hover:text-white",{variants:{variant:{default:"rounded-l-full border-r-0",collapsed:"rounded-r-full border-l-0"}},defaultVariants:{variant:"default"}});function xH({className:e,isCollapsed:t,...n}){return l.jsx("button",{"data-deer-btn":!0,type:"button",className:ne(wH({variant:t?"collapsed":"default"}),e),...n,children:l.jsx(Me,{IconSVG:p1,className:t?"rotate-180":""})})}const qb=d.createContext({isOpen:!1,toggleOpen:()=>{}}),CH=()=>d.useContext(qb);function Kb({...e}){const{isOpen:t,toggleOpen:n}=CH();return l.jsx(xH,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function AH(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=d.useState(n),i=d.useCallback(()=>{a(f=>!f)},[]),s=r?e.open:o,c=r?e.onToggle:i,u=d.useMemo(()=>({isOpen:s,toggleOpen:c}),[s,c]);return l.jsx(qb.Provider,{value:u,children:l.jsxs("div",{className:ne("rabbit-ds relative h-screen transition-all",s?"w-full":"w-0","shadow-[-8px_-2px_8px_0px_rgba(0,0,0,0.08)_inset]"),style:{background:"linear-gradient(273deg, #E7EFF1 0%, #EEF5F8 11%, #EFFAFE 100%)"},children:[l.jsx(Kb,{}),l.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function SH({children:e}){return l.jsx("div",{className:ne("nav-group flex flex-col gap-1","after:my-4 after:h-[1px] after:w-full after:bg-accent last:after:hidden"),children:e})}function EH({children:e}){return l.jsx("div",{className:"p-2 text-xs font-semibold text-body-secondary",children:e})}function MH({children:e,...t}){return l.jsx(Q2,{...t,children:e})}const $H=Ge("max-w-[28%] shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function PH({className:e,orientation:t,...n}){return l.jsx("div",{className:$H({orientation:t}),children:l.jsx(Ft,{className:ne(e,"h-auto min-h-10"),variant:"transparentOutline",...n})})}const TH={ON_TRACK:{label:"On-track",colorScheme:"tag-green"},OFF_TRACK:{label:"Off-track",colorScheme:"tag-yellow"},AT_RISK:{label:"At-risk",colorScheme:"tag-red"},CLOSED:{label:"Closed",colorScheme:"tag-darkGray"},NOT_STARTED:{label:"Not started",colorScheme:"tag-lightGray"}},kH=d.forwardRef(function({title:t,achieved:n,status:r,explanation:o,truncateExplanation:a=!0},i){const s=TH[r];return l.jsx("div",{ref:i,className:ne("rabbit-ds","mr-auto",a?"w-[70%]":""),children:l.jsxs("div",{className:"flex w-full flex-col gap-1",children:[l.jsxs("div",{className:"mt-1 flex items-center",children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:m1}),l.jsx("div",{className:"ml-1 text-sm",children:t})]}),l.jsxs("div",{className:"my-1 flex items-end gap-[18px]",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-xs text-body-secondary",children:"Achieved"}),l.jsxs("span",{className:ne(s.colorScheme,"!bg-transparent text-3xl font-semibold"),children:[n,"%"]})]}),l.jsx(kg,{colorScheme:s.colorScheme,className:"mb-1",children:s.label})]}),o&&l.jsxs("div",{className:ne("flex w-full gap-1",a?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",a?"truncate":""),children:o})]})]})})});function NH({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:r})]}),l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"text-body-secondary",children:[n," • "]}),l.jsxs("span",{className:"text-body-secondary",children:["Due by ",o]})]})]})]})})}function OH({employeeName:e,employeeProfilePhoto:t,designation:n}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx("span",{className:"text-body-secondary",children:n})]})]})})}const Qb=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:ne("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),l.jsxs("div",{className:ne("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));Qb.displayName="RequestedFeedbackNudgeData";const DH=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function FH({className:e,children:t,orientation:n}){return l.jsx("div",{className:ne("rabbit-ds","flex w-full items-center rounded-radius-200 border border-solid border-[#F3F5F8] bg-[#FDFDFD] p-2",DH({orientation:n}),e),children:t})}function _H({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a,variant:i="default"}){const[s,c]=d.useState(1),u=e.slice(0,o*s),f=e.length>o,p=e.length===u.length,h=i==="informational",v=()=>{c(g=>p?1:g+1)};return l.jsxs("div",{className:ne("rabbit-ds","flex w-full flex-col items-start gap-[7px] rounded-radius-200 bg-white px-4 py-3 shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[l.jsxs("div",{className:"flex w-full items-start justify-between",children:[l.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?l.jsx(hn,{className:"h-16 w-16",children:l.jsx(gn,{src:n,alt:t})}):null,h?l.jsx("div",{className:"flex flex-col gap-[7px]",children:u}):l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold",children:t}),l.jsx("span",{className:"text-sm",children:r})]})]}),a]}),!h&&u,f&&l.jsx("div",{className:"mx-auto",children:l.jsxs(Ft,{variant:"text",onClick:v,iconRight:p?d1:Ur,children:["View ",p?"less":"more"]})})]})}function IH({surveyName:e,date:t}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Me,{IconSVG:x1}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx(Fc,{date:t,showRelativeTime:!0})]})]})})}const Zb=d.forwardRef(function({employeeProfilePhoto:t,employeeName:n,scheduleDate:r,duration:o,subTitle:a,explanation:i,truncateExplanation:s=!0},c){return l.jsx("div",{ref:c,className:ne("rabbit-ds","mr-auto",s?"w-[70%]":""),children:l.jsxs("div",{className:ne("flex items-center gap-2 text-sm","flex-row [&>div]:items-start"),children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:n})}),l.jsxs("div",{className:"flex w-full flex-col items-center gap-1",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[n," • "]}),r?l.jsx(Fc,{date:r,duration:o,timeFormat:"HH:mm a",showTime:!0,className:"text-body-secondary"}):l.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]}),i&&l.jsxs("div",{className:ne("flex w-[90%] gap-1",s?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",s?"truncate":""),children:i})]})]})]})})});Zb.defaultProps={subTitle:void 0,scheduleDate:void 0};function LH({label:e,onClick:t,customCompProps:n}){const[r,o]=d.useState(1);return l.jsxs(ru,{children:[l.jsx(Qi,{children:l.jsx("span",{children:e})}),l.jsx(nu,{children:l.jsx(Zi,{children:l.jsx(so,{children:l.jsxs("div",{className:"flex flex-col p-2",children:[l.jsx(Ql,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),l.jsx(T1,{id:n==null?void 0:n.label,className:"mt-2 !min-w-[160px]",type:"number",value:r,onChange:a=>o(a.target.valueAsNumber),min:1}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ft,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function BH({options:e}){const[t,n]=d.useState(!1),r=(o,a)=>{o(a),n(!1)};return l.jsxs(Xi,{open:t,children:[l.jsx(qi,{asChild:!0,onClick:()=>n(!0),children:l.jsx(Ft,{variant:"text",size:"smallIcon",children:l.jsx(Me,{IconSVG:v1})})}),l.jsx(oa,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:l.jsx(so,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?l.jsx(aa,{onClick:()=>r(a),children:l.jsx("span",{children:i})},i):l.jsx(LH,{onClick:c=>r(a,c),label:i,customCompProps:s},i))})})]})}const Jb=aa,Rb=so,e6=Ki,t6=es,n6=Ji,r6=Ri,o6=d.forwardRef(({className:e,children:t,align:n="end",...r},o)=>l.jsx(oa,{ref:o,align:n,...r,children:t}));o6.displayName="SplitButtonDropdownContent";const zH=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function WH({children:e,size:t,status:n,variant:r,...o}){return l.jsx("div",{className:"rabbit-ds flex flex-row",children:l.jsxs(Xi,{children:[l.jsx(Ft,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),l.jsx(qi,{asChild:!0,children:l.jsx(Ft,{variant:r,status:n,className:"rounded-l-none border-l-0",size:zH({size:t}),iconLeft:Ur})})]})})}Jb.displayName="SplitButtonDropdownItem",Rb.displayName="SplitButtonDropdownGroup",e6.displayName="SplitButtonDropdownRadioGroup",t6.displayName="SplitButtonDropdownLabel",n6.displayName="SplitButtonDropdownCheckboxItem",r6.displayName="SplitButtonDropdownRadioItem";const a6=({bold:e=!1,xbold:t=!1,color:n="text-body-primary"})=>ne("rabbit-ds-text",t?"font-bold":e?"font-semibold":"font-normal",n),jH=({children:e,className:t,...n})=>l.jsx("h3",{className:ne("text-350sm leading-500",a6(n),t),children:e}),VH=({children:e,className:t,...n})=>l.jsx("p",{className:ne("text-300sm leading-400",a6(n),t),children:e}),i6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("rabbit-ds flex gap-200 p-300",t),...n,ref:r,children:e}));i6.displayName="ListItemComp";const s6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));s6.displayName="ListItemCompLeading";const l6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex grow flex-col justify-center",t),...n,ref:r,children:e}));l6.displayName="ListItemCompContent";const c6=({children:e,className:t,...n})=>l.jsx(jH,{bold:!0,className:t,...n,children:e});c6.displayName="ListItemCompTitle";const u6=({children:e,className:t,...n})=>l.jsx(VH,{className:ne("text-body-secondary",t),...n,children:e});u6.displayName="ListItemCompDescription";const d6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));d6.displayName="ListItemCompAction",W.Accordion=Mp,W.AccordionContent=Tp,W.AccordionItem=$p,W.AccordionTrigger=Pp,W.Add=by,W.Alert=kp,W.AlertDescription=Op,W.AlertDialogAction=xh,W.AlertDialogCancel=wh,W.AlertDialogComponent=xx,W.AlertDialogContainer=bh,W.AlertDialogContent=Pc,W.AlertDialogDescription=kc,W.AlertDialogOverlay=$c,W.AlertDialogPortal=yh,W.AlertDialogTitle=Tc,W.AlertDialogTrigger=Ch,W.AlertIcon=Np,W.Avatar=hn,W.AvatarBadge=ts,W.AvatarFallback=Pi,W.AvatarGroup=Mu,W.AvatarImage=gn,W.Breadcrumb=Lg,W.BreadcrumbEllipsis=Hg,W.BreadcrumbItem=zg,W.BreadcrumbLink=Wg,W.BreadcrumbList=Bg,W.BreadcrumbPage=jg,W.BreadcrumbSeparator=Vg,W.Button=Ft,W.Calendar=yy,W.Caption=Nc,W.Card=Yo,W.CardContent=oc,W.CardDescription=op,W.CardHeader=rp,W.CardKPI=K$,W.CardTitle=rc,W.Carousel=tT,W.CarouselContainer=nT,W.CarouselNextButton=oT,W.CarouselPrevButton=rT,W.Check=Ho,W.CheckCircleOutline=l1,W.Checkbox=ci,W.ChevronDown=Ur,W.ChevronLeft=wy,W.ChevronLeftCircle=c1,W.ChevronRight=li,W.ChevronRightCircle=u1,W.ChevronUp=d1,W.Chip=e7,W.ChipGroup=jV,W.ChipGroupItem=VV,W.Close=f1,W.CollapseNavigation=p1,W.CollapsibleCard=J7,W.ColumnFilter=h1,W.ColumnFilterCheck=C1,W.Company=xy,W.Country=Cy,W.Currency=Ay,W.DateTime=Fc,W.Develop=Sy,W.DirectedLineChart=Sb,W.DisplayName=Ey,W.DonutChart=sV,W.Download=My,W.Dropdown=Xi,W.DropdownCheckboxItem=Ji,W.DropdownChip=q2,W.DropdownContent=oa,W.DropdownGroup=so,W.DropdownItem=aa,W.DropdownLabel=es,W.DropdownPortal=nu,W.DropdownRadioGroup=Ki,W.DropdownRadioItem=Ri,W.DropdownSeparator=ou,W.DropdownSub=ru,W.DropdownSubContent=Zi,W.DropdownSubTrigger=Qi,W.DropdownTrigger=qi,W.Engagement=$y,W.EngagementNudgeData=IH,W.ErrorOutline=ql,W.ExpandDown=Py,W.ExpandRight=g1,W.Feedback=Ty,W.Gear=ky,W.Goal=Ny,W.GoalsNudgeData=kH,W.GridChart=Mb,W.GridDirectedLineChart=OV,W.Help=Oy,W.HistogramChart=oV,W.HistoryComments=Dy,W.Home=Fy,W.HoverCard=U$,W.HoverCardContent=hv,W.HoverCardPortal=Y$,W.HoverCardTrigger=G$,W.Icon=Me,W.InfoWorkZero=Gr,W.Initiatives=_y,W.Input=T1,W.KebabMenu=v1,W.KnowTeamNudgeData=Zb,W.Label=Ql,W.LeftNav=Ub,W.LeftNavButton=Xb,W.LeftNavGroup=Gb,W.LeftNavHome=Yb,W.LeftNavItem=U0,W.LeftNavItemContent=hH,W.LeftNavItemDropdown=Xi,W.LeftNavItemDropdownCheckboxItem=Ji,W.LeftNavItemDropdownContent=oa,W.LeftNavItemDropdownGroup=so,W.LeftNavItemDropdownItem=aa,W.LeftNavItemDropdownLabel=es,W.LeftNavItemDropdownPortal=nu,W.LeftNavItemDropdownRadioGroup=Ki,W.LeftNavItemDropdownRadioItem=Ri,W.LeftNavItemDropdownSeparator=ou,W.LeftNavItemDropdownSub=ru,W.LeftNavItemDropdownSubContent=Zi,W.LeftNavItemDropdownSubTrigger=Qi,W.LeftNavItemDropdownTrigger=qi,W.LeftNavItemTrigger=pH,W.LineChart=Vj,W.ListItem=Q2,W.ListItemComp=i6,W.ListItemCompAction=d6,W.ListItemCompContent=l6,W.ListItemCompDescription=u6,W.ListItemCompLeading=s6,W.ListItemCompTitle=c6,W.ListItemIcon=cE,W.ListItemText=sE,W.Manager=Iy,W.ManagerWithBorder=Ly,W.MeshLogo=A1,W.MeshMaven=Xy,W.MeshMavenAsk=qy,W.MeshMavenDisabledThumbsUp=Ky,W.MeshMavenWithHording=Qy,W.MeshMavenWithOrangeBulb=Zy,W.MeshMavenWithThumbsUp=Jy,W.Metric=bv,W.MetricCard=mv,W.MetricCardStatText=Tu,W.MetricCardText=ps,W.MetricCardTitle=yv,W.MyOneOnOne=By,W.NavCollapseButtonL2=Kb,W.NavGroupL2=SH,W.NavGroupTitleL2=EH,W.NavItemL2=MH,W.NavL2=AH,W.NudgeAction=PH,W.NudgeCard=_H,W.NudgeCardItem=FH,W.NudgeKebabMenu=BH,W.Objective=m1,W.Overflow=b1,W.Person=zy,W.Product=Wy,W.ProfileCard=ku,W.ProfileCardItem=wv,W.ProfileCardKey=xv,W.ProfileCardValue=Cv,W.ProgressBar=W1,W.ProgressInfo=X$,W.ProgressSlider=j7,W.RadarChart=lV,W.RequestFeedback=jy,W.RequestedFeedbackNudgeData=Qb,W.Reviews=Vy,W.ReviewsNudgeData=NH,W.Role=Hy,W.SankeyChart=Jj,W.Search=y1,W.Select=ZE,W.SelectContent=pg,W.SelectGroup=JE,W.SelectItem=gg,W.SelectLabel=hg,W.SelectSeparator=vg,W.SelectTrigger=fg,W.SelectValue=RE,W.SettingsSchedule=Uy,W.ShareFeedback=Gy,W.SharePraiseNudgeData=OH,W.SliderDrag=w1,W.SplitButton=WH,W.SplitButtonDropdownCheckboxItem=n6,W.SplitButtonDropdownContent=o6,W.SplitButtonDropdownGroup=Rb,W.SplitButtonDropdownItem=Jb,W.SplitButtonDropdownLabel=t6,W.SplitButtonDropdownRadioGroup=e6,W.SplitButtonDropdownRadioItem=r6,W.StackedBarChart=pV,W.Survey=x1,W.Switch=h9,W.Tabs=Mg,W.TabsContent=Tg,W.TabsList=$g,W.TabsTrigger=Pg,W.Tag=kg,W.Team=Yy,W.Toaster=i$,W.Tooltip=gu,W.TooltipContent=ss,W.TooltipPortal=mu,W.TooltipProvider=hu,W.TooltipTrigger=vu,W.TrendingDown=S1,W.TrendingUp=E1,W.getInitialsFromName=Ph,W.toast=QM,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|
|
96
|
+
`}),R.appendChild(G.createTextNode(Pt))}ee.timeEnd("clone node"),me==null||me(Ne),ge!==!1&&re(Ne)&&(ee.time("embed web font"),yield eU(Ne,H),ee.timeEnd("embed web font")),ee.time("embed node"),x6(Ne,H);const _e=ce.length;let Ie=0;const qe=()=>m(this,null,function*(){for(;;){const Pt=ce.pop();if(!Pt)break;try{yield Pt}catch(jn){De("Failed to run task",jn)}ve==null||ve(++Ie,_e)}});ve==null||ve(Ie,_e),yield Promise.all([...Array(4)].map(qe)),ee.timeEnd("embed node"),$e==null||$e(Ne);const Ve=cU(Ne,H);return le&&Ve.insertBefore(le,Ve.children[0]),R&&Ve.insertBefore(R,Ve.children[0]),we&&g6(H),Se==null||Se(Ve),Ve})}function cU(S,I){const{width:H,height:G}=I,ee=zt(H,G,S.ownerDocument),ce=ee.ownerDocument.createElementNS(ee.namespaceURI,"foreignObject");return ce.setAttributeNS(null,"x","0%"),ce.setAttributeNS(null,"y","0%"),ce.setAttributeNS(null,"width","100%"),ce.setAttributeNS(null,"height","100%"),ce.append(S),ee.appendChild(ce),ee}function Wl(S,I){return m(this,null,function*(){var H;const G=yield Wt(S,I),ee=yield C6(G),ce=tt(ee,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=$t(G.ownerDocument),G.svgDefsElement=(H=G.ownerDocument)==null?void 0:H.createElementNS(Bt,"defs"),G.svgStyles.clear());const R=Qe(ce,ee.ownerDocument);return yield zn(R,G)})}function uU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{log:G,type:ee,quality:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to blob");const pe=yield fr(le,ee,ce);if(["image/png","image/jpeg"].includes(ee)&&R){const ge=yield ct(pe.slice(0,33));let ve=new Uint8Array(ge);return ee==="image/png"?ve=M(ve,R):ee==="image/jpeg"&&(ve=x(ve,R)),G.timeEnd("canvas to blob"),new Blob([ve,pe.slice(33)],{type:ee})}return G.timeEnd("canvas to blob"),pe})}function Wo(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{log:G,quality:ee,type:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to data url");let pe=le.toDataURL(ce,ee);if(["image/png","image/jpeg"].includes(ce)&&R&&U&&B){const[ge,ve]=pe.split(",");let we=0,me=!1;if(ce==="image/png"){const Ve=V(ve);Ve>=0?(we=Math.ceil((Ve+28)/3)*4,me=!0):we=33/3*4}else ce==="image/jpeg"&&(we=18/3*4);const $e=ve.substring(0,we),Se=ve.substring(we),Ne=window.atob($e),_e=new Uint8Array(Ne.length);for(let Ve=0;Ve<_e.length;Ve++)_e[Ve]=Ne.charCodeAt(Ve);const Ie=ce==="image/png"?M(_e,R,me):x(_e,R),qe=window.btoa(String.fromCharCode(...Ie));pe=[ge,",",qe,Se].join("")}return G.timeEnd("canvas to data url"),pe})}function A6(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{width:G,height:ee,ownerDocument:ce}=H,R=yield Wo(H),le=zt(G,ee,ce),pe=le.ownerDocument.createElementNS(le.namespaceURI,"image");return pe.setAttributeNS(null,"href",R),pe.setAttributeNS(null,"height","100%"),pe.setAttributeNS(null,"width","100%"),le.appendChild(pe),tt(le,H.isEnable("removeControlCharacter"))})}function dU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),{ownerDocument:G,width:ee,height:ce,scale:R,type:le}=H,pe=le==="image/svg+xml"?yield A6(H):yield Wo(H),ge=Qe(pe,G);return ge.width=Math.floor(ee*R),ge.height=Math.floor(ce*R),ge.style.width=`${ee}px`,ge.style.height=`${ce}px`,ge})}function fU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/jpeg"})))})}function pU(S,I){return m(this,null,function*(){const H=yield Wt(S,I),G=yield Wl(H);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function hU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/png"})))})}function gU(S,I){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},I),{type:"image/webp"})))})}n.createContext=Il,n.destroyContext=g6,n.domToBlob=uU,n.domToCanvas=Wl,n.domToDataUrl=Wo,n.domToForeignObjectSvg=C6,n.domToImage=dU,n.domToJpeg=fU,n.domToPixel=pU,n.domToPng=hU,n.domToSvg=A6,n.domToWebp=gU,n.loadMedia=wt,n.waitUntilLoad=An,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(x0,x0.exports);var _j=x0.exports;const Bn=(e,t,n)=>{d.useImperativeHandle(t,()=>({download(){e.current&&_j.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},H8=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"green",dark:"#1A6400",light:"#B1E39F"},{name:"purple",dark:"#734DBB",light:"#E7DAFF"},{name:"bronze_yellow",dark:"#7E6000",light:"#FFCEFB"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"indigo",dark:"#4657AE",light:"#CDD5FF"},{name:"brown",dark:"#8A4A00",light:"#FCC88B"},{name:"cardinal",dark:"#BE1442",light:"#FFD0D0"},{name:"dark_green",dark:"#00675E",light:"#A1DFD5"},{name:"maroon",dark:"#891E01",light:"#FFAE99"},{name:"golden_brown",dark:"#90591A",light:"#FFDEB6"},{name:"maroon",dark:"#800000",light:"#F2CECE"},{name:"green_yellow",dark:"#6A6A00",light:"#FFFFC7"},{name:"blue",dark:"#000075",light:"#CFCFFF"},{name:"black",dark:"#000000",light:"#E3E1E1"},{name:"grey",dark:"#323846",light:"#D0DFFF"},{name:"pink",dark:"#BE012F",light:"#FFD9E2"},{name:"royal_blue",dark:"#002FDC",light:"#D7DFFF"},{name:"magenta",dark:"#B402AA",light:"#FFCEFB"}];function Xe(e){return H8[e%H8.length]}const Sl=(e,t)=>d.Children.map(e,n=>d.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function C0({value:e,darkColor:t,lightColor:n}){return l.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[l.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-radius-600 border"}),l.jsx("div",{className:"flex items-start justify-start",children:l.jsx("div",{className:"text-xs font-normal leading-none text-body-primary",children:e})})]})}function A0({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm basis-full flex-col items-start justify-start px-1 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function S0({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function E0({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return l.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[l.jsx(hn,{size:"md",children:l.jsx(gn,{src:r,alt:"Avatar"})}),l.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function ke({children:e,showSideBySide:t,tooltipTitle:n}){const r=Sl(e,C0),o=Sl(e,A0),a=Sl(e,S0),i=Sl(e,E0);return l.jsxs("div",{className:"rabbit-ds relative z-[1500] inline-flex h-auto w-auto min-w-[200px] max-w-[400px] flex-col items-start justify-start gap-2 rounded-radius-200 bg-white p-2 shadow-card-basic",children:[l.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-body-primary",children:n}),a,l.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-radius-200 p-2",children:[t&&l.jsxs("div",{className:ne("flex w-full justify-between"),children:[o&&o[0],!!(o!=null&&o[1])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),t&&(o==null?void 0:o[2])&&l.jsxs("div",{className:ne("mt-3 flex w-full justify-between"),children:[o&&o[2],!!(o!=null&&o[3])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[3]]}),!t&&l.jsx("div",{className:ne("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?l.jsx("div",{className:"h-250 w-full bg-surface-grey-subtle px-2"}):null,r,i]})}C0.displayName="Legend",A0.displayName="Item",S0.displayName="Header",E0.displayName="Footer",ke.Legend=C0,ke.Item=A0,ke.Header=S0,ke.Footer=E0,ke.defaultProps={showSideBySide:!1};function U8({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}U8.defaultProps={xValue:void 0,yValue:void 0};function Ij({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsx(z4,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,c;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((c=o==null?void 0:o.xScale)==null?void 0:c.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const Lj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),Bj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},zj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),El={xAccessor:e=>e.x,yAccessor:e=>e.y},G8=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Y8=10,Wj=5,M0=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,connectNulls:g=!1,maxNodesInMiniMode:m=Wj,tooltipStackCharLimit:x=Y8,seriesSelectorTitle:y,preselectedNodes:w},b)=>{const[A,C]=d.useState(()=>(w&&w<=e.length?e.slice(0,w):e).map(k=>k.id)),$=d.useRef(null);Bn($,b,`${a}-${i}-LineChart`);const P=d.useMemo(()=>o.map((M,k)=>{const L=e.find(j=>j.id===M.id);return{points:M.data.map((j,V)=>({x:r[V],y:Number(j),nodeId:M.id,color:(L==null?void 0:L.color)??Xe(k)}))}}).slice(0,h==="mini"?m:o.length),[o,h,m,e,r]),T=d.useMemo(()=>h==="full"?P.filter(M=>A.includes(M.points[0].nodeId)):P,[P,A,h]);return l.jsxs("div",{ref:$,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(t8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:M=>u?G8(M,u.symbol,u.position):M,rangePadding:{end:10},tickComponent:M=>l.jsx(Bj,{tickData:M,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>f?G8(Ht(M>=1e3?"~s":"")(M),f.symbol,f.position):Ht(M>=1e3?"~s":"")(M),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((M,k)=>l.jsxs(l.Fragment,{children:[l.jsx(Ij,{data:M.points,xAccessor:El.xAccessor,yAccessor:El.yAccessor,connectNulls:g}),l.jsx(V8,{dataKey:`Performance Management ${k}`,data:M.points,size:8,renderGlyph:Lj,xAccessor:El.xAccessor,yAccessor:El.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:zj,renderTooltip:({tooltipData:M})=>{var j,V,z,E,_,U;const k=e.find(B=>{var O;return B.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),L=((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum)&&((V=M==null?void 0:M.nearestDatum)==null?void 0:V.datum.x.length)<x;return l.jsx(U8,{xValue:(z=M==null?void 0:M.nearestDatum)==null?void 0:z.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!L,tooltipTitle:p,legendValue:(k==null?void 0:k.name)||"",legendDarkColor:((_=M==null?void 0:M.nearestDatum)==null?void 0:_.datum.color.dark)||Xe(0).dark,legendLightColor:((U=M==null?void 0:M.nearestDatum)==null?void 0:U.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:y??a}),"(",T.length??0,"/",P.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:P.map(M=>{const k=e.find(L=>L.id===M.points[0].nodeId);return k&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),k.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:A.includes(k.id),onCheckedChange:L=>{let j=[...A];L?j=[...A,k.id]:j.splice(A.indexOf(k.id),1),C(j)}})})]},k.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:P.map(M=>{const k=e.find(L=>L.id===M.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),k==null?void 0:k.name]},k==null?void 0:k.id)})})]})}),jj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Y8,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};M0.defaultProps=jj,M0.displayName="LineBase";const X8=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(M0,{ref:t,width:n,height:r,...e})}));X8.displayName="LineChart";const Vj=X8;function q8(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Hj(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function $0(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function Uj(e,t){return e.sourceLinks.length?e.depth:t-1}function Ml(e){return function(){return e}}function K8(e,t){return $l(e.source,t.source)||e.index-t.index}function Q8(e,t){return $l(e.target,t.target)||e.index-t.index}function $l(e,t){return e.y0-t.y0}function P0(e){return e.value}function Gj(e){return e.index}function Yj(e){return e.nodes}function Xj(e){return e.links}function Z8(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function J8({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function qj(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=Gj,c=Uj,u,f,p=Yj,h=Xj,v=6;function g(){const E={nodes:p.apply(null,arguments),links:h.apply(null,arguments)};return m(E),x(E),y(E),w(E),C(E),J8(E),E}g.update=function(E){return J8(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:Ml(E),g):s},g.nodeAlign=function(E){return arguments.length?(c=typeof E=="function"?E:Ml(E),g):c},g.nodeSort=function(E){return arguments.length?(u=E,g):u},g.nodeWidth=function(E){return arguments.length?(o=+E,g):o},g.nodePadding=function(E){return arguments.length?(a=i=+E,g):a},g.nodes=function(E){return arguments.length?(p=typeof E=="function"?E:Ml(E),g):p},g.links=function(E){return arguments.length?(h=typeof E=="function"?E:Ml(E),g):h},g.linkSort=function(E){return arguments.length?(f=E,g):f},g.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],g):[n-e,r-t]},g.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],g):[[e,t],[n,r]]},g.iterations=function(E){return arguments.length?(v=+E,g):v};function m({nodes:E,links:_}){for(const[B,O]of E.entries())O.index=B,O.sourceLinks=[],O.targetLinks=[];const U=new Map(E.map((B,O)=>[s(B,O,E),B]));for(const[B,O]of _.entries()){O.index=B;let{source:N,target:D}=O;typeof N!="object"&&(N=O.source=Z8(U,N)),typeof D!="object"&&(D=O.target=Z8(U,D)),N.sourceLinks.push(O),D.targetLinks.push(O)}if(f!=null)for(const{sourceLinks:B,targetLinks:O}of E)B.sort(f),O.sort(f)}function x({nodes:E}){for(const _ of E)_.value=_.fixedValue===void 0?Math.max($0(_.sourceLinks,P0),$0(_.targetLinks,P0)):_.fixedValue}function y({nodes:E}){const _=E.length;let U=new Set(E),B=new Set,O=0;for(;U.size;){for(const N of U){N.depth=O;for(const{target:D}of N.sourceLinks)B.add(D)}if(++O>_)throw new Error("circular link");U=B,B=new Set}}function w({nodes:E}){const _=E.length;let U=new Set(E),B=new Set,O=0;for(;U.size;){for(const N of U){N.height=O;for(const{source:D}of N.targetLinks)B.add(D)}if(++O>_)throw new Error("circular link");U=B,B=new Set}}function b({nodes:E}){const _=q8(E,O=>O.depth)+1,U=(n-e-o)/(_-1),B=new Array(_);for(const O of E){const N=Math.max(0,Math.min(_-1,Math.floor(c.call(null,O,_))));O.layer=N,O.x0=e+N*U,O.x1=O.x0+o,B[N]?B[N].push(O):B[N]=[O]}if(u)for(const O of B)O.sort(u);return B}function A(E){const _=Hj(E,U=>(r-t-(U.length-1)*i)/$0(U,P0));for(const U of E){let B=t;for(const O of U){O.y0=B,O.y1=B+O.value*_,B=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*_}B=(r-B+i)/(U.length+1);for(let O=0;O<U.length;++O){const N=U[O];N.y0+=B*(O+1),N.y1+=B*(O+1)}j(U)}}function C(E){const _=b(E);i=Math.min(a,(r-t)/(q8(_,U=>U.length)-1)),A(_);for(let U=0;U<v;++U){const B=Math.pow(.99,U),O=Math.max(1-B,(U+1)/v);P(_,B,O),$(_,B,O)}}function $(E,_,U){for(let B=1,O=E.length;B<O;++B){const N=E[B];for(const D of N){let Q=0,q=0;for(const{source:oe,value:re}of D.targetLinks){let J=re*(D.layer-oe.layer);Q+=V(oe,D)*J,q+=J}if(!(q>0))continue;let te=(Q/q-D.y0)*_;D.y0+=te,D.y1+=te,L(D)}u===void 0&&N.sort($l),T(N,U)}}function P(E,_,U){for(let B=E.length,O=B-2;O>=0;--O){const N=E[O];for(const D of N){let Q=0,q=0;for(const{target:oe,value:re}of D.sourceLinks){let J=re*(oe.layer-D.layer);Q+=z(D,oe)*J,q+=J}if(!(q>0))continue;let te=(Q/q-D.y0)*_;D.y0+=te,D.y1+=te,L(D)}u===void 0&&N.sort($l),T(N,U)}}function T(E,_){const U=E.length>>1,B=E[U];k(E,B.y0-i,U-1,_),M(E,B.y1+i,U+1,_),k(E,r,E.length-1,_),M(E,t,0,_)}function M(E,_,U,B){for(;U<E.length;++U){const O=E[U],N=(_-O.y0)*B;N>1e-6&&(O.y0+=N,O.y1+=N),_=O.y1+i}}function k(E,_,U,B){for(;U>=0;--U){const O=E[U],N=(O.y1-_)*B;N>1e-6&&(O.y0-=N,O.y1-=N),_=O.y0-i}}function L({sourceLinks:E,targetLinks:_}){if(f===void 0){for(const{source:{sourceLinks:U}}of _)U.sort(Q8);for(const{target:{targetLinks:U}}of E)U.sort(K8)}}function j(E){if(f===void 0)for(const{sourceLinks:_,targetLinks:U}of E)_.sort(Q8),U.sort(K8)}function V(E,_){let U=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:B,width:O}of E.sourceLinks){if(B===_)break;U+=O+i}for(const{source:B,width:O}of _.targetLinks){if(B===E)break;U-=O}return U}function z(E,_){let U=_.y0-(_.targetLinks.length-1)*i/2;for(const{source:B,width:O}of _.targetLinks){if(B===E)break;U+=O+i}for(const{target:B,width:O}of E.sourceLinks){if(B===_)break;U-=O}return U}return g}function Kj({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,c,u,f;const a=e.source,i=e.target;return l.jsxs(ke,{tooltipTitle:o,children:[l.jsx(ke.Item,{label:t,value:a.name}),l.jsx(ke.Item,{label:n,value:i.name}),l.jsx(ke.Item,{label:r,value:e.weight.toString()}),l.jsx(ke.Legend,{value:a.name,darkColor:(s=Xe((a.index||0)+1))==null?void 0:s.dark,lightColor:(c=Xe((a.index||0)+1))==null?void 0:c.light}),l.jsx(ke.Legend,{value:i.name,darkColor:(u=Xe((i.index||0)+1))==null?void 0:u.dark,lightColor:(f=Xe((i.index||0)+1))==null?void 0:f.light})]})}const R8=80,eb=20,Qj=30,Zj=12,tb=d.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const c=d.useMemo(()=>qj().nodeId(E=>E.id).nodeWidth(Zj).nodePadding(Qj).nodeAlign(E=>E.group),[]),u=d.useRef(null);Bn(u,s,`${n}-SankeyChart`);const[f,p]=d.useState(""),[h,v]=d.useState(null),{tooltipData:g,tooltipLeft:m,tooltipTop:x,tooltipOpen:y,showTooltip:w,hideTooltip:b}=Ua(),{containerBounds:A,containerRef:C,TooltipInPortal:$}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),P=d.useMemo(()=>c.extent([[R8,eb],[t-R8,e-eb-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,c,r,o]),T=d.useMemo(()=>Math.max(...P.nodes.map(E=>E.depth??0)),[P]),M=d.useMemo(()=>{const E={};let _=-1/0;return P.nodes.forEach(U=>{const{group:B}=U;E[B]?(E[B].x=Math.max(E[B].x??-1/0,U.x0??-1/0),E[B].y=Math.max(E[B].y??-1/0,U.y1??-1/0)):(E[B]={},E[B].x=U.x0,E[B].y=U.y1),_=Math.max(_,E[B].y??-1/0),E[B].y=_}),Object.keys(E).forEach(U=>{E[U].y=_}),E},[P]),k=d.useCallback(E=>{const _=c.nodeId()(E);p(f===_?"":_)},[f,c]),L=d.useCallback(()=>{p(""),v(null)},[]),j=d.useMemo(()=>f===""&&h===null?new Set:new Set(P.links.filter(E=>c.nodeId()(E.source)===f||c.nodeId()(E.target)===f||(h==null?void 0:h.source)===E.source&&(h==null?void 0:h.target)===E.target)),[f,P,h,c]),V=d.useCallback((E,_)=>{const U=("clientX"in E?E.clientX:0)-A.left,B=("clientY"in E?E.clientY:0)-A.top;v(_),U&&B&&w({tooltipLeft:U,tooltipTop:B,tooltipData:_})},[w,A]),z=d.useCallback(()=>{L(),b()},[L,b]);return l.jsxs("div",{ref:u,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[l.jsxs("svg",{height:e,width:t,ref:C,children:[l.jsx("g",{children:P.links.map(E=>l.jsx(NB,{data:E,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>z(),onMouseMove:_=>V(_,E),stroke:Xe((E.source.index||0)+1).light,strokeWidth:E.width,strokeOpacity:j.has(E)?.7:.4},E.index))}),l.jsx("g",{children:P.nodes.map(E=>{var _,U,B;return l.jsx("g",{children:l.jsx(W4,{x:E.x0??0,height:(E.y1??0)-(E.y0??0)+10,width:(E.x1??0)-(E.x0??0),y:(E.y0??0)-5,onMouseEnter:()=>k(E),onMouseLeave:()=>L(),radius:2,fill:f===E.id?(_=Xe((E.index||0)+1))==null?void 0:_.dark:(U=Xe((E.index||0)+1))==null?void 0:U.light,stroke:(B=Xe((E.index||0)+1))==null?void 0:B.dark,all:!0})},E.index)})}),l.jsx("g",{children:a.map(E=>l.jsx(Ra,{axisCharLimit:20,x:M[E.id].x??0,y:(M[E.id].y??0)+40,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},E.id))}),l.jsxs("g",{children:[P.nodes.map(E=>l.jsx(Ra,{axisCharLimit:8,x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:E.depth===T?"start":"end",fill:"#666666"}},E.index)),P.nodes.map(E=>E.value&&l.jsx(wa,{x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:E.depth===T?"start":"end",fill:"#666666"},children:`(${E.value.toString()})`},E.index))]})]}),y&&g&&l.jsx($,{top:x,left:m,unstyled:!0,applyPositionStyle:!0,children:l.jsx(Kj,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});tb.displayName="Sankey";const nb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>n&&r&&l.jsx(tb,{ref:t,width:n,height:r,...e})}));nb.displayName="SankeyChart";const Jj=nb;function Rj(e){return"bandwidth"in e?e.bandwidth():0}var eV=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function T0(){return T0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T0.apply(this,arguments)}function tV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function rb(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,a=e.scale,i=e.width,s=e.stroke,c=s===void 0?"#eaf0f6":s,u=e.strokeWidth,f=u===void 0?1:u,p=e.strokeDasharray,h=e.className,v=e.children,g=e.numTicks,m=g===void 0?10:g,x=e.lineStyle,y=e.offset,w=e.tickValues,b=tV(e,eV),A=w??bf(a,m),C=(y??0)+Rj(a)/2,$=A.map(function(P,T){var M,k=((M=rl(a(P)))!=null?M:0)+C;return{index:T,from:new Nn({x:0,y:k}),to:new Nn({x:i,y:k})}});return d.createElement(mn,{className:gt("visx-rows",h),top:n,left:o},v?v({lines:$}):$.map(function(P){var T=P.from,M=P.to,k=P.index;return d.createElement(LB,T0({key:"row-line-"+k,from:T,to:M,stroke:c,strokeWidth:f,strokeDasharray:p,style:x},b))}))}rb.propTypes={tickValues:ie.array,width:ie.number.isRequired};function ob({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const c=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:!0,children:[l.jsx(ke.Item,{label:r,value:c}),l.jsx(ke.Item,{label:o,value:u}),l.jsx(ke.Legend,{value:a,darkColor:i,lightColor:s})]})}ob.defaultProps={xValue:void 0,yValue:void 0};const ab=20,ib=50,k0=80,Pl=50,nV=10,rV=25,N0=d.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:c=rV,minBinCount:u=nV,integerBins:f=!1,integerYAxis:p=!1},h)=>{const v=d.useMemo(()=>Ls(a),[a]),{histogramDomain:g,threshold:m,thresholdInteger:x}=d.useMemo(()=>{const O=v[0]??0,N=O===v[1]?u+O:v[1]??0,D=N-O>u?N:u+O,Q=Math.min(Math.max(N-O,u),c),q=Math.floor(v[0]??0),te=Math.ceil(D);return{histogramDomain:r||(f?[q,te]:[O,N]),threshold:Q,thresholdInteger:Math.ceil(Q)}},[v,r,f,c,u]),y=d.useMemo(()=>Oo({domain:g,range:[Pl,i-ib],round:!0,nice:!0}),[g,i]),w=d.useMemo(()=>RF().domain(y.domain()).thresholds(o||(f?x:m))(a),[y,o,a,m,x,f]),b=d.useMemo(()=>Oo({domain:[0,Nd(w,O=>O.length)??0],range:[s-k0,ab],round:!0,nice:!0}),[w,s]),A=d.useMemo(()=>b.ticks().filter(O=>p?Number.isInteger(O):O),[p,b]),C=d.useRef(null);Bn(C,h,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:P,tooltipTop:T,tooltipOpen:M,showTooltip:k,hideTooltip:L}=Ua(),{containerBounds:j,containerRef:V,TooltipInPortal:z}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-Pl-ib,_=s-ab-k0-100,U=d.useCallback((O,N)=>{const D=("clientX"in O?O.clientX:0)-j.left,Q=("clientY"in O?O.clientY:0)-j.top;D&&Q&&k({tooltipLeft:D,tooltipTop:Q,tooltipData:N})},[k,j]),B=d.useCallback(()=>{L()},[L]);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:C,children:[l.jsxs("svg",{width:i,height:s,ref:V,children:[l.jsx(Ff,{orientation:"bottom",scale:y,top:s-k0,hideTicks:!0,numTicks:6,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Ff,{orientation:"left",scale:b,left:Pl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:O=>p?Number(O)>=1e3?Ht("~s")(Number(Ht("d")(O))):Ht("d")(O):Number(O)>=1e3?Ht("~s")(O):Ht("")(O),tickValues:A,label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsxs(mn,{children:[l.jsx(rb,{scale:b,width:E,height:_,left:Pl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),w.map(O=>{const N=Math.abs(b(0)-b(O.length)),D=Math.abs(y(O.x1??0)-y(O.x0??0));return l.jsx("g",{children:l.jsx(wB,{x:y(O.x0??0),y:b(O.length),width:D,height:N&&N-1,fill:Xe(0).light,stroke:Xe(0).dark,strokeWidth:1,onMouseMove:Q=>U(Q,O),onMouseLeave:()=>B()})},Math.random())})]})]}),M&&$&&l.jsx(z,{top:T,left:P,unstyled:!0,applyPositionStyle:!0,children:l.jsx(ob,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Xe(0).dark,legendLightColor:Xe(0).light})},Math.random()),b.domain()[2]]})}),sb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(N0,{ref:t,width:n,height:r,...e})}));N0.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},N0.displayName="HistogramBase",sb.displayName="HistogramChart";const oV=sb;function lb({tooltipTitle:e,label:t,value:n,unit:r,legendValue:o,legendDarkColor:a,legendLightColor:i}){return l.jsxs(ke,{tooltipTitle:e,children:[l.jsx(ke.Item,{label:t,value:`${n} ${r}`}),l.jsx(ke.Legend,{value:o,darkColor:a||"",lightColor:i||""})]})}lb.defaultProps={};const aV=e=>e.value,iV=e=>e.label,cb=d.forwardRef(({width:e,height:t,unit:n="%",data:r,tooltipTitle:o,legendTitle:a},i)=>{const s=e/2,c=t/2,u=d.useMemo(()=>Math.min(e-.35*e,t-50)/2,[e,t]),{tooltipData:f,tooltipLeft:p,tooltipTop:h,tooltipOpen:v,showTooltip:g,hideTooltip:m}=Ua(),{containerBounds:x,containerRef:y,TooltipInPortal:w}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),b=d.useRef(null),A=d.useCallback(($,P)=>{const T=("clientX"in $?$.clientX:0)-x.left,M=("clientY"in $?$.clientY:0)-x.top;T&&M&&g({tooltipLeft:T,tooltipTop:M,tooltipData:P})},[g,x]),C=d.useCallback(()=>{m()},[m]);return Bn(b,i,"DonutChart"),l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:b,children:[l.jsx("svg",{width:e,height:t,className:"rabbit-ds",ref:y,children:l.jsx(mn,{top:c-20,left:s,children:l.jsx(pB,{data:r,pieValue:aV,outerRadius:u-10,innerRadius:u-Math.min(e*.07,22)-10,cornerRadius:2,padAngle:.025,children:$=>l.jsx(l.Fragment,{children:$.arcs.map(P=>{const T=iV(P.data);return l.jsx("g",{children:l.jsx("path",{d:$.path(P)??void 0,fill:P.data.color,onMouseLeave:C,onMouseMove:M=>A(M,{label:a,value:P.value,tooltipTitle:o,unit:n,legendValue:T,legendDarkColor:P.data.labelColor,legendLightColor:P.data.color})})},`arc-${T}`)})})})})}),v&&f&&l.jsx(w,{top:h,left:p,unstyled:!0,applyPositionStyle:!0,children:l.jsx(lb,{unit:f.unit,label:f.label,value:f.value,tooltipTitle:o,legendValue:f.legendValue??"",legendDarkColor:f.legendDarkColor,legendLightColor:f.legendLightColor})},Math.random()),l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-2 text-[10px] font-semibold text-body-secondary",style:{fontSize:Math.min(e*.04,10)},children:r.map($=>l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:$.color,borderColor:$.labelColor,color:$.labelColor,width:Math.min(e*.04,10),height:Math.min(e*.04,10)},className:"h-3 w-3 rounded-radius-round border"}),`${$.label}: ${$.value}${n}`]},$.label))})]})});cb.displayName="DonutChartBase";const ub=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(cb,{ref:t,width:n,height:r,...e})}));ub.displayName="DonutChart";const sV=ub;function db({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}db.defaultProps={xValue:void 0,yValue:void 0};const Tl={top:60,left:20,right:20,bottom:20},fb={start:10,end:-10,middle:0},pb=d.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:c,series:u=[],xAxisValues:f},p)=>{const h=d.useRef(null);Bn(h,p,"RadarChart");const{tooltipData:v,tooltipLeft:g,tooltipTop:m,tooltipOpen:x,showTooltip:y,hideTooltip:w}=Ua(),{containerBounds:b,containerRef:A,TooltipInPortal:C}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=d.useCallback((N,D)=>{const Q=Math.PI*2/N;return[...new Array(N)].map((q,te)=>({x:D*Math.sin(te*Q),y:D*Math.cos(te*Q)}))},[]),P=d.useCallback((N,D,Q)=>Q==="pre"?`${D}${N}`:`${N}${D}`,[]),T=d.useCallback((N,D,Q)=>{const q=Math.PI*2/N.length,te=new Array(N.length).fill({x:0,y:0,data:null}),oe=new Array(N.length+1).fill("").reduce((re,J,ae)=>{if(ae>N.length)return re;const Y=D(Q(N[ae-1]))*Math.sin(ae*q),Z=D(Q(N[ae-1]))*Math.cos(ae*q);return te[ae-1]={x:Y,y:Z,data:N[ae-1]},`${re}${Y},${Z} `});return{points:te,pointString:oe}},[]),M=d.useMemo(()=>new Nn({x:0,y:0}),[]),k=d.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),L=d.useCallback((N,D)=>{const Q=("clientX"in N?N.clientX:0)-b.left,q=("clientY"in N?N.clientY:0)-b.top;Q&&q&&y({tooltipLeft:Q,tooltipTop:q,tooltipData:D})},[y,b]),j=d.useCallback(()=>{w()},[w]),V=d.useMemo(()=>e-Tl.left-Tl.right,[e]),z=d.useMemo(()=>t-Tl.top-Tl.bottom,[t]),E=d.useMemo(()=>Math.min(V,z)/2,[V,z]),_=u.length?u.reduce((N,D)=>{const Q=D.data.filter(q=>q);return Math.max(N,...Q)},-1/0):0,U=Oo({range:[0,E],domain:c??[0,_]}),B=$(f.length,E),O=N=>T(N,D=>U(D)??0,D=>D);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:h,children:[l.jsxs("svg",{width:e,height:t,ref:A,pointerEvents:"all",onMouseLeave:j,children:[l.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),l.jsxs(mn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,D)=>l.jsx(j4,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(D+1)/n},`web1-${Math.random()}`)),f.map((N,D)=>l.jsxs(l.Fragment,{children:[l.jsx(Cf,{from:M,to:B[D],stroke:f.length===1?Xe(0).dark:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),l.jsx(wa,{x:B[D].x,y:B[D].y,textAnchor:k(B[D].x),verticalAnchor:k(B[D].y),dx:fb[k(B[D].x)],dy:fb[k(B[D].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?P(f[(D+f.length-1)%f.length],s.symbol,s.position):f[(D+f.length-1)%f.length]}`})]})),u.map((N,D)=>l.jsx("polygon",{points:O(N.data).pointString,fill:Xe(D).light,fillOpacity:.2,stroke:Xe(D).dark,strokeWidth:1},`polypath-${Math.random()}`)),u.map((N,D)=>O(N.data).points.map((Q,q)=>l.jsx(j4,{cx:Q.x,cy:Q.y,r:5,fill:"transparent",onMouseMove:te=>{var oe;return L(te,{yAxisLabel:((oe=r.find(re=>re.id===N.id))==null?void 0:oe.name)??"",xAxisValue:f[q],yAxisValue:N.data[q],xAxisLabel:o??"Category",legendDarkColor:Xe(D).dark,legendLightColor:Xe(D).light})},onMouseOut:j},`radar-point-${Math.random()}`)))]})]}),x&&v&&l.jsx(C,{top:m,left:g,unstyled:!0,applyPositionStyle:!0,children:l.jsx(db,{xAxisLabel:v.xAxisLabel??"",xValue:v.xAxisValue,yAxisLabel:v.yAxisLabel??"",yValue:v.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:v.yAxisLabel??"",legendDarkColor:v.legendDarkColor,legendLightColor:v.legendLightColor})},Math.random())]})});pb.displayName="RadarChartBase";const hb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(pb,{ref:t,width:n,height:r,...e})}));hb.displayName="RadarChart";const lV=hb;function gb({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}gb.defaultProps={xValue:void 0,yValue:void 0};const cV=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),uV=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},vb={xAccessor:e=>e.x,yAccessor:e=>e.y},mb=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,bb=10,dV=5,O0=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,maxNodesInMiniMode:g=dV,tooltipStackCharLimit:m=bb,seriesSelectorTitle:x,preselectedNodes:y},w)=>{const[b,A]=d.useState(()=>(y&&y<=e.length?e.slice(0,y):e).map(M=>M.id)),C=d.useRef(null);Bn(C,w,`${a}-${i}-StackedBarChart`);const $=d.useMemo(()=>o.map((T,M)=>{const k=e.find(L=>L.id===T.id);return{points:T.data.map((L,j)=>({x:r[j],y:Number(L),nodeId:T.id,color:(k==null?void 0:k.color)??Xe(M)}))}}).slice(0,h==="mini"?g:o.length),[o,h,g,e,r]),P=d.useMemo(()=>h==="full"?$.filter(T=>b.includes(T.points[0].nodeId)):$,[$,b,h]);return l.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(t8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:T=>u?mb(T,u.symbol,u.position):T,rangePadding:{end:10},tickComponent:T=>l.jsx(uV,{tickData:T,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>f?mb(Ht(T>=1e3?"~s":"")(T),f.symbol,f.position):Ht(T>=1e3?"~s":"")(T),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Oj,{children:P.map(T=>l.jsx(Tj,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:vb.xAccessor,yAccessor:vb.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:cV,renderTooltip:({tooltipData:T})=>{var L,j,V,z,E,_;const M=e.find(U=>{var B;return U.id===((B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum.nodeId)}),k=((L=T==null?void 0:T.nearestDatum)==null?void 0:L.datum)&&((j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x.length)<m;return l.jsx(gb,{xValue:(V=T==null?void 0:T.nearestDatum)==null?void 0:V.datum.x,yValue:(z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!k,tooltipTitle:p,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Xe(0).dark,legendLightColor:((_=T==null?void 0:T.nearestDatum)==null?void 0:_.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:x??a}),"(",P.length??0,"/",$.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return M&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),M.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:b.includes(M.id),onCheckedChange:k=>{let L=[...b];k?L=[...b,M.id]:L.splice(b.indexOf(M.id),1),A(L)}})})]},M.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),fV={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:bb,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};O0.defaultProps=fV,O0.displayName="StackedBarChartBase";const yb=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(O0,{ref:t,width:n,height:r,...e})}));yb.displayName="StackedBarChart";const pV=yb,hV=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>l.jsxs("div",{className:"rabbit-ds inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),l.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:e.map(({id:o,name:a,color:i})=>l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),a]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:t.includes(o),onCheckedChange:s=>{let c=[...t];s?c=[...t,o]:c.splice(t.indexOf(o),1),n(c)}})})]},o))})]});function wb({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,otherDataPoints:i=[],pointMetaData:s,seriesMetaData:c}){var p;const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Header,{label:"Review Cycle",value:(p=s==null?void 0:s.reviewCycle)==null?void 0:p.name}),l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),i.map(({label:h,value:v})=>l.jsx(ke.Item,{label:h,value:v},h)),l.jsx(ke.Footer,{nodeData:c})]})}wb.defaultProps={xValue:void 0,yValue:void 0};var gV=["id","markerWidth","markerHeight","markerUnits","children"];function D0(){return D0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D0.apply(this,arguments)}function vV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function F0(e){var t=e.id,n=e.markerWidth,r=n===void 0?3:n,o=e.markerHeight,a=o===void 0?3:o,i=e.markerUnits,s=i===void 0?"userSpaceOnUse":i,c=e.children,u=vV(e,gV);return d.createElement("defs",null,d.createElement("marker",D0({id:t,markerWidth:r,markerHeight:a,markerUnits:s},u),c))}F0.propTypes={id:ie.string.isRequired,size:ie.number,markerWidth:ie.oneOfType([ie.string,ie.number]),markerHeight:ie.oneOfType([ie.string,ie.number]),markerUnits:ie.string,refX:ie.oneOfType([ie.string,ie.number]),refY:ie.oneOfType([ie.string,ie.number]),strokeWidth:ie.number,children:ie.node.isRequired};var mV=["id","size","strokeWidth"];function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_0.apply(this,arguments)}function bV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function yV(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=bV(e,mV),s=r+a*2,c=r,u=s/2,f="0 0, "+r+" "+r/2+", 0 "+r;return d.createElement(F0,_0({id:t,markerWidth:s,markerHeight:s,refX:c,refY:u,orient:"auto",markerUnits:"strokeWidth",fill:"none",strokeWidth:a},i),d.createElement("g",{transform:"translate("+a+", "+a+")"},d.createElement("polyline",{points:f})))}var wV=["id","size","strokeWidth"];function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I0.apply(this,arguments)}function xV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function CV(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=xV(e,wV),s=r*2,c=s+a,u=c/2;return d.createElement(F0,I0({id:t,markerWidth:c,markerHeight:c,refX:0,refY:u,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:a},i),d.createElement("circle",{r,cx:u,cy:u}))}function AV({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsxs(l.Fragment,{children:[l.jsx(CV,{id:"marker-circle",stroke:"#666",size:6,refX:7,fill:"transparent",strokeWidth:2}),l.jsx(yV,{id:"marker-arrow",stroke:"#666",size:14,strokeWidth:2,markerUnits:"userSpaceOnUse"}),l.jsx(z4,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))??0},y:i=>{var s;return((s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i)))??0},curve:pa,shapeRendering:"geometricPrecision",markerStart:"url(#marker-circle)",markerEnd:"url(#marker-arrow)"})]})}const SV=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),EV=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),kl={xAccessor:e=>e==null?void 0:e.x,yAccessor:e=>e==null?void 0:e.y},xb=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,MV=10,$V=5,Cb=d.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:c,yAxisUnitSymbol:u,tooltipTitle:f,mode:p="mini",xAxisCharLimit:h,connectNulls:v=!1,maxNodesInMiniMode:g=$V,tooltipStackCharLimit:m=MV,withBackground:x=!0},y)=>{const w=d.useRef(null),b=e===1;Bn(w,y,`${o}-${a}-DirectedLineChart`);const A=d.useMemo(()=>t.map(({seriesMetaData:k},L)=>{const{employee:j}=k;return{id:j.id,name:j.name,color:Xe(L)}}).slice(0,p==="mini"?g:t.length),[t,p,g]),[C,$]=d.useState(()=>A.filter((k,L)=>p==="full"||L<g).map(k=>k.id)),P=d.useMemo(()=>t.map((k,L)=>({nodeId:k.seriesMetaData.employee.id,points:k.xValues.map((j,V)=>{var E;let z=null;return b?z=1/t.length*(L+1)+1/(t.length*10)*(V+1):z=((E=k==null?void 0:k.yValues)==null?void 0:E[V])??null,{x:k.xValues[V],y:z,pointMetaData:k.pointsMetaData[V],nodeId:k.seriesMetaData.employee.id,color:Xe(L)}})})).slice(0,p==="mini"?g:t.length),[t,p,g,b]),T=d.useMemo(()=>p==="full"?P.filter(({nodeId:k})=>C.includes(k)):P,[P,p,C]),M=d.useMemo(()=>Math.floor((r-(p==="mini"?0:150))/(t[0].xValues.length*8)),[r,p,t]);return l.jsx("div",{ref:w,id:"directed-line-chart",className:ne("rabbit-ds flex flex-col",x?"bg-[white]":""),style:{width:r,height:n},children:l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:50,right:50,bottom:50},xScale:typeof i[0]=="string"?{type:"band",domain:i,padding:1}:{type:"linear",domain:i},yScale:typeof s[0]=="string"?{type:"band",domain:s,padding:1}:{type:"linear",domain:s},children:[l.jsx(Do,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:k=>c?xb(k,c.symbol,c.position):k,tickComponent:k=>l.jsx(Ra,{textLabel:k.formattedValue||"",x:k.x,y:k.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:h??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(Do,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:k=>u?xb(k,u.symbol,u.position):k,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((k,L)=>l.jsxs(l.Fragment,{children:[l.jsx(AV,{data:k.points,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor,connectNulls:v}),l.jsx(V8,{dataKey:`Performance Management ${L}`,data:k.points,size:8,renderGlyph:SV,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,showVerticalCrosshair:!0,showHorizontalCrosshair:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:EV,renderTooltip:({tooltipData:k})=>{var V,z,E,_,U,B,O,N,D;const L=t.find(Q=>{var q;return Q.id===((q=k==null?void 0:k.nearestDatum)==null?void 0:q.datum.nodeId)}),j=((V=k==null?void 0:k.nearestDatum)==null?void 0:V.datum)&&String((z=k==null?void 0:k.nearestDatum)==null?void 0:z.datum.x).length<m;return l.jsx(wb,{xValue:(E=k==null?void 0:k.nearestDatum)==null?void 0:E.datum.x,yValue:(_=k==null?void 0:k.nearestDatum)==null?void 0:_.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,otherDataPoints:((O=(B=(U=k==null?void 0:k.nearestDatum)==null?void 0:U.datum)==null?void 0:B.pointMetaData)==null?void 0:O.otherDataPoints)??[],seriesMetaData:L==null?void 0:L.seriesMetaData,pointMetaData:(D=(N=k==null?void 0:k.nearestDatum)==null?void 0:N.datum)==null?void 0:D.pointMetaData})}})]})}),p==="full"&&l.jsx(hV,{nodes:A,seriesSelectorTitle:"Team members",selectedNodeIds:C,setSelectedNodeIds:$})]})})});Cb.displayName="LineBase";const Ab=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Cb,{ref:t,width:n,height:r,...e})}));Ab.displayName="DirectedLineChart";const Sb=Ab,PV=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function TV({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=PV.find(a=>a[r]);return o?o[r]:r}return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start",children:[l.jsx("div",{className:"flex items-start gap-2.5",children:l.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&l.jsxs("span",{className:"text-3xs text-body-secondary",children:[e==null?void 0:e.count," Member",my(e==null?void 0:e.count)]})]}),t&&l.jsx("div",{className:"flex items-start",children:l.jsx("div",{className:"flex items-center justify-center rounded-radius-600 bg-surface-grey-subtle/40 px-0.5",children:l.jsxs("span",{className:"text-2xs leading-400 text-body-secondary",children:[e==null?void 0:e.percentage,"%"]})})})]})}const kV=({rows:e,columns:t,boxData:n=[]})=>{let r="";return!n||(n==null?void 0:n.length)===0||(r=n.slice(0,t).reduce((a,i)=>{var f,p,h,v;const s=e===1?"OVERALL":"PERFORMANCE",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},NV=({rows:e,columns:t,boxData:n=[]})=>{if(e===1)return"1fr";let r="";return!n||(n==null?void 0:n.length)===0||(r=n.filter((a,i)=>i%t===0).reduce((a,i)=>{var f,p,h,v;const s="POTENTIAL",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},Eb=d.forwardRef(({rows:e=3,columns:t=3,spacing:n="1px",boxData:r=[],position:o="relative",margin:a="0",width:i="100%",left:s=0,top:c=0,mode:u="mini",showCountData:f=!1},p)=>{const h=d.useRef(null);return Bn(h,p,"GridChart"),l.jsxs("div",{ref:h,className:"flex flex-row",style:{position:o,top:c,left:s,width:i,margin:a,height:"100%"},children:[l.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:NV({rows:e,columns:t,boxData:r}),gridTemplateColumns:kV({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((v,g)=>l.jsx("div",{style:{padding:"8px",backgroundColor:(v==null?void 0:v.color)??"#CFD7DF"},children:l.jsx(TV,{box:v,showCountData:f})},v.label+v.color+g))}),u==="full"&&l.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});Eb.displayName="GridChart";const Mb=Eb,$b=d.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=d.useRef(null);return Bn(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),l.jsxs("div",{ref:o,className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:l.jsx(Mb,{...t,mode:n})}),l.jsxs("div",{className:"absolute h-full w-full",children:[l.jsx(Sb,{...e,mode:n}),l.jsx("div",{})]})]})});$b.displayName="GridDirectedLineChart";const OV=$b,Nl="ToggleGroup",[Pb,GG]=rt(Nl,[io]),Tb=io(),DV=d.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return d.createElement(FV,K({},o,{ref:t}))}if(n==="multiple"){const o=r;return d.createElement(_V,K({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Nl}\``)}),[kb,Nb]=Pb(Nl),FV=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=ut({prop:n,defaultProp:r,onChange:o});return d.createElement(kb,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:d.useCallback(()=>s(""),[s])},d.createElement(Ob,K({},a,{ref:t})))}),_V=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=ut({prop:n,defaultProp:r,onChange:o}),c=d.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=d.useCallback(f=>s((p=[])=>p.filter(h=>h!==f)),[s]);return d.createElement(kb,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u},d.createElement(Ob,K({},a,{ref:t})))}),[IV,LV]=Pb(Nl),Ob=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...c}=e,u=Tb(n),f=Hn(i),p={role:"group",dir:f,...c};return d.createElement(IV,{scope:n,rovingFocus:o,disabled:r},o?d.createElement(qc,K({asChild:!0},u,{orientation:a,dir:f,loop:s}),d.createElement(be.div,K({},p,{ref:t}))):d.createElement(be.div,K({},p,{ref:t})))}),L0="ToggleGroupItem",BV=d.forwardRef((e,t)=>{const n=Nb(L0,e.__scopeToggleGroup),r=LV(L0,e.__scopeToggleGroup),o=Tb(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},c=d.useRef(null);return r.rovingFocus?d.createElement(Kc,K({asChild:!0},o,{focusable:!i,active:a,ref:c}),d.createElement(Db,K({},s,{ref:t}))):d.createElement(Db,K({},s,{ref:t}))}),Db=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Nb(L0,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return d.createElement(P1,K({},s,o,{ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),zV=DV,WV=BV;function jV({children:e,...t}){return l.jsx(zV,{className:"flex gap-2",...t,children:e})}function VV({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return l.jsx(WV,{asChild:!0,value:e,...i,children:l.jsx("button",{"data-deer-btn":!0,type:"button",className:ne("rabbit-ds inline-flex h-7 w-auto flex-col items-center justify-center rounded-radius-round border border-solid p-0 hover:cursor-pointer","data-[state=off]:border-card-grey-subtle data-[state=off]:bg-surface-grey-subtle data-[state=off]:text-body-secondary","data-[state=on]:border-primary-hover data-[state=on]:bg-primary/10 data-[state=on]:text-primary-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),children:l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-radius-round px-4 py-1",children:[r?l.jsx(Me,{IconSVG:r,size:"small"}):null,l.jsxs("div",{className:"text-sm font-semibold",children:[o?l.jsx("span",{children:o}):null," ",a?l.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const ei="NavigationMenu",[B0,HV,UV]=yr(ei),[z0,GV,YV]=yr(ei),[W0,YG]=rt(ei,[UV,YV]),[XV,jr]=W0(ei),[qV,XG]=W0(ei),KV=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:c="horizontal",dir:u,...f}=e,[p,h]=d.useState(null),v=Ee(t,M=>h(M)),g=Hn(u),m=d.useRef(0),x=d.useRef(0),y=d.useRef(0),[w,b]=d.useState(!0),[A="",C]=ut({prop:r,onChange:M=>{const k=M!=="",L=s>0;k?(window.clearTimeout(y.current),L&&b(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=d.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>C(""),150)},[C]),P=d.useCallback(M=>{window.clearTimeout(x.current),C(M)},[C]),T=d.useCallback(M=>{A===M?window.clearTimeout(x.current):m.current=window.setTimeout(()=>{window.clearTimeout(x.current),C(M)},i)},[A,C,i]);return d.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(x.current),window.clearTimeout(y.current)},[]),d.createElement(QV,{scope:n,isRootMenu:!0,value:A,dir:g,orientation:c,rootNavigationMenu:p,onTriggerEnter:M=>{window.clearTimeout(m.current),w?T(M):P(M)},onTriggerLeave:()=>{window.clearTimeout(m.current),$()},onContentEnter:()=>window.clearTimeout(x.current),onContentLeave:$,onItemSelect:M=>{C(k=>k===M?"":M)},onItemDismiss:()=>C("")},d.createElement(be.nav,K({"aria-label":"Main","data-orientation":c,dir:g},f,{ref:v})))}),QV=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:h,onContentLeave:v}=e,[g,m]=d.useState(null),[x,y]=d.useState(new Map),[w,b]=d.useState(null);return d.createElement(XV,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:oi(s),baseId:dt(),dir:o,orientation:a,viewport:g,onViewportChange:m,indicatorTrack:w,onIndicatorTrackChange:b,onTriggerEnter:Je(f),onTriggerLeave:Je(p),onContentEnter:Je(h),onContentLeave:Je(v),onItemSelect:Je(c),onItemDismiss:Je(u),onViewportContentChange:d.useCallback((A,C)=>{y($=>($.set(A,C),new Map($)))},[]),onViewportContentRemove:d.useCallback(A=>{y(C=>C.has(A)?(C.delete(A),new Map(C)):C)},[])},d.createElement(B0.Provider,{scope:t},d.createElement(qV,{scope:t,items:x},i)))},ZV="NavigationMenuList",JV=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(ZV,n),a=d.createElement(be.ul,K({"data-orientation":o.orientation},r,{ref:t}));return d.createElement(be.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},d.createElement(B0.Slot,{scope:n},o.isRootMenu?d.createElement(Lb,{asChild:!0},a):a))}),RV="NavigationMenuItem",[eH,Fb]=W0(RV),tH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=dt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),p=d.useRef(!1),h=d.useCallback((g="start")=>{if(s.current){f.current();const m=j0(s.current);m.length&&V0(g==="start"?m:m.reverse())}},[]),v=d.useCallback(()=>{if(s.current){const g=j0(s.current);g.length&&(f.current=cH(g))}},[]);return d.createElement(eH,{scope:n,value:i,triggerRef:c,contentRef:s,focusProxyRef:u,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:v,onContentFocusOutside:v},d.createElement(be.li,K({},o,{ref:t})))}),_b="NavigationMenuTrigger",nH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=jr(_b,e.__scopeNavigationMenu),i=Fb(_b,e.__scopeNavigationMenu),s=d.useRef(null),c=Ee(s,i.triggerRef,t),u=jb(a.baseId,i.value),f=Vb(a.baseId,i.value),p=d.useRef(!1),h=d.useRef(!1),v=i.value===a.value;return d.createElement(d.Fragment,null,d.createElement(B0.ItemSlot,{scope:n,value:i.value},d.createElement(zb,{asChild:!0},d.createElement(be.button,K({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Wb(v),"aria-expanded":v,"aria-controls":f},o,{ref:c,onPointerEnter:fe(e.onPointerEnter,()=>{h.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:fe(e.onPointerMove,H0(()=>{r||h.current||i.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(i.value),p.current=!0)})),onPointerLeave:fe(e.onPointerLeave,H0(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:fe(e.onClick,()=>{a.onItemSelect(i.value),h.current=v}),onKeyDown:fe(e.onKeyDown,g=>{const x={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];v&&g.key===x&&(i.onEntryKeyDown(),g.preventDefault())})})))),v&&d.createElement(d.Fragment,null,d.createElement(J2,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const m=i.contentRef.current,x=g.relatedTarget,y=x===s.current,w=m==null?void 0:m.contains(x);(y||!w)&&i.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&d.createElement("span",{"aria-owns":f})))}),Ib="navigationMenu.linkSelect",rH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return d.createElement(zb,{asChild:!0},d.createElement(be.a,K({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:fe(e.onClick,i=>{const s=i.target,c=new CustomEvent(Ib,{bubbles:!0,cancelable:!0});if(s.addEventListener(Ib,u=>o==null?void 0:o(u),{once:!0}),ii(s,c),!c.defaultPrevented&&!i.metaKey){const u=new CustomEvent(Dl,{bubbles:!0,cancelable:!0});ii(s,u)}},{checkForDefaultPrevented:!1})})))}),Ol="NavigationMenuContent",oH=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=jr(Ol,e.__scopeNavigationMenu),a=Fb(Ol,e.__scopeNavigationMenu),i=Ee(a.contentRef,t),s=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?d.createElement(aH,K({forceMount:n},c,{ref:i})):d.createElement(Tt,{present:n||s},d.createElement(iH,K({"data-state":Wb(s)},c,{ref:i,onPointerEnter:fe(e.onPointerEnter,o.onContentEnter),onPointerLeave:fe(e.onPointerLeave,H0(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...c.style}})))}),aH=d.forwardRef((e,t)=>{const n=jr(Ol,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ht(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ht(()=>()=>o(e.value),[e.value,o]),null}),Dl="navigationMenu.rootContentDismiss",iH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:c,...u}=e,f=jr(Ol,n),p=d.useRef(null),h=Ee(p,t),v=jb(f.baseId,r),g=Vb(f.baseId,r),m=HV(n),x=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const b=p.current;if(f.isRootMenu&&b){const A=()=>{var C;y(),s(),b.contains(document.activeElement)&&((C=o.current)===null||C===void 0||C.focus())};return b.addEventListener(Dl,A),()=>b.removeEventListener(Dl,A)}},[f.isRootMenu,e.value,o,y,s]);const w=d.useMemo(()=>{const A=m().map(k=>k.value);f.dir==="rtl"&&A.reverse();const C=A.indexOf(f.value),$=A.indexOf(f.previousValue),P=r===f.value,T=$===A.indexOf(r);if(!P&&!T)return x.current;const M=(()=>{if(C!==$){if(P&&$!==-1)return C>$?"from-end":"from-start";if(T&&C!==-1)return C>$?"to-start":"to-end"}return null})();return x.current=M,M},[f.previousValue,f.value,f.dir,m,r]);return d.createElement(Lb,{asChild:!0},d.createElement(Xo,K({id:g,"aria-labelledby":v,"data-motion":w,"data-orientation":f.orientation},u,{ref:h,onDismiss:()=>{var b;const A=new Event(Dl,{bubbles:!0,cancelable:!0});(b=p.current)===null||b===void 0||b.dispatchEvent(A)},onFocusOutside:fe(e.onFocusOutside,b=>{var A;c();const C=b.target;(A=f.rootNavigationMenu)!==null&&A!==void 0&&A.contains(C)&&b.preventDefault()}),onPointerDownOutside:fe(e.onPointerDownOutside,b=>{var A;const C=b.target,$=m().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(C)}),P=f.isRootMenu&&((A=f.viewport)===null||A===void 0?void 0:A.contains(C));($||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:fe(e.onKeyDown,b=>{const A=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!A){const P=j0(b.currentTarget),T=document.activeElement,M=P.findIndex(j=>j===T),L=b.shiftKey?P.slice(0,M).reverse():P.slice(M+1,P.length);if(V0(L))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:fe(e.onEscapeKeyDown,b=>{i.current=!0})})))}),sH="FocusGroup",Lb=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(sH,n);return d.createElement(z0.Provider,{scope:n},d.createElement(z0.Slot,{scope:n},d.createElement(be.div,K({dir:o.dir},r,{ref:t}))))}),Bb=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],lH="FocusGroupItem",zb=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=GV(n),a=jr(lH,n);return d.createElement(z0.ItemSlot,{scope:n},d.createElement(be.button,K({},r,{ref:t,onKeyDown:fe(e.onKeyDown,i=>{if(["Home","End",...Bb].includes(i.key)){let c=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&c.reverse(),Bb.includes(i.key)){const p=c.indexOf(i.currentTarget);c=c.slice(p+1)}setTimeout(()=>V0(c)),i.preventDefault()}})})))});function j0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function V0(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function cH(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Wb(e){return e?"open":"closed"}function jb(e,t){return`${e}-trigger-${t}`}function Vb(e,t){return`${e}-content-${t}`}function H0(e){return t=>t.pointerType==="mouse"?e(t):void 0}const uH=KV,dH=JV,fH=tH,pH=nH,Hb=rH,hH=oH,gH=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function vH(){return l.jsx("div",{className:"relative h-full w-full",children:l.jsxs("div",{className:"absolute left-0 top-0 h-full w-full bg-gradient-to-b from-[#E9F5F8] via-[#F7F7F7] to-[#A1E7FC] shadow-[-4px_0px_4px_0px_rgba(0,0,0.05)_inset]",children:[l.jsx("div",{className:"absolute inset-0 h-full w-full",style:{background:"linear-gradient(180deg, rgba(231, 244, 247, 0.80) 0%, rgba(185, 239, 254, 0.80) 40%, rgba(136, 226, 252, 0.80) 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-darken",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full opacity-60 mix-blend-multiply",style:{background:"linear-gradient(89deg, #A0E7FC 0%, #A4E8FC 19%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full opacity-90 mix-blend-darken",style:{background:"linear-gradient(180deg, #AAE9FC 0%, #D7F1F8 40%, #F4FDFF 100%)",backdropFilter:"blur(4px)"}}),l.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(87deg, rgba(233, 245, 248, 0.60) 0%, rgba(247, 247, 247, 0.60) 19%, rgba(247, 247, 247, 0.60) 38%, rgba(161, 231, 252, 0.60) 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}})]})})}const Ub=d.forwardRef(({className:e,children:t,...n},r)=>l.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[l.jsx("div",{className:"absolute h-full w-full",children:l.jsx(vH,{})}),l.jsx(uH,{className:ne(gH({className:e})),orientation:"vertical",ref:r,...n,children:l.jsx(dH,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));Ub.displayName="LeftNav";const U0=d.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?dn:"div";return l.jsx(fH,{asChild:!0,children:l.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});U0.displayName="LeftNavItem",U0.defaultProps={asChild:!1};const mH=Ge(["inline-flex w-full flex-col items-center justify-start gap-1"],{variants:{variant:{top:"order-1 mb-auto",bottom:"order-2 mt-auto"},defaultVariant:{variant:"top"}}}),Gb=d.forwardRef(({children:e,align:t,...n},r)=>l.jsx("div",{ref:r,className:ne(mH({variant:t})),...n,children:e}));Gb.displayName="LeftNavItem";const Yb=d.forwardRef((e,t)=>l.jsx(Hb,{ref:t,...e,className:"rabbit-ds z-20 flex size-1400 h-1400 w-1400 cursor-pointer items-center justify-center rounded-radius-100 border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:l.jsxs("svg",{className:"z-20 h-6 w-6",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:l.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[l.jsx("path",{d:"M22.1654 14.8101C22.1654 15.8326 21.3386 16.6614 20.3187 16.6614C19.2988 16.6614 18.472 15.8326 18.472 14.8101C18.472 13.7877 19.2988 12.9589 20.3187 12.9589C21.3386 12.9589 22.1654 13.7877 22.1654 14.8101Z",fill:"#008EF0"}),l.jsx("path",{d:"M9.50932 5.28316C9.14769 5.45665 8.74267 5.5538 8.315 5.5538C6.78513 5.5538 5.54492 4.31054 5.54492 2.7769C5.54492 1.24326 6.78513 0 8.315 0C9.84488 0 11.0851 1.24326 11.0851 2.7769C11.0851 3.20559 10.9882 3.6116 10.8151 3.9741L14.3002 7.46776C14.4528 7.42686 14.6131 7.40506 14.7785 7.40506C15.7984 7.40506 16.6253 8.2339 16.6253 9.25633C16.6253 10.2788 15.7984 11.1076 14.7785 11.1076C13.7586 11.1076 12.9318 10.2788 12.9318 9.25633C12.9318 9.09048 12.9536 8.92973 12.9944 8.77678L9.50932 5.28316Z",fill:"#008EF0"}),l.jsx("path",{d:"M5.53426 9.24775C5.53426 10.2702 4.70745 11.099 3.68754 11.099C2.66762 11.099 1.84082 10.2702 1.84082 9.24775C1.84082 8.22532 2.66762 7.39648 3.68754 7.39648C4.70745 7.39648 5.53426 8.22532 5.53426 9.24775Z",fill:"#FFC200"}),l.jsx("path",{d:"M9.99463 16.5323C9.84207 16.5732 9.68173 16.595 9.5163 16.595C8.49639 16.595 7.66958 15.7661 7.66958 14.7437C7.66958 13.7213 8.49639 12.8924 9.5163 12.8924C10.5362 12.8924 11.363 13.7213 11.363 14.7437C11.363 14.9095 11.3413 15.0703 11.3005 15.2232L14.7855 18.7169C15.1471 18.5434 15.5521 18.4462 15.9798 18.4462C17.5097 18.4462 18.7499 19.6895 18.7499 21.2231C18.7499 22.7568 17.5097 24 15.9798 24C14.4499 24 13.2097 22.7568 13.2097 21.2231C13.2097 20.7944 13.3066 20.3884 13.4797 20.0259L9.99463 16.5323Z",fill:"#FFC200"}),l.jsx("path",{d:"M11.087 20.3604C11.087 21.3828 10.2602 22.2117 9.24028 22.2117C8.22036 22.2117 7.39355 21.3828 7.39355 20.3604C7.39355 19.338 8.22036 18.5092 9.24028 18.5092C10.2602 18.5092 11.087 19.338 11.087 20.3604Z",fill:"#EC3B64"}),l.jsx("path",{d:"M24.014 8.32719C24.014 9.86083 22.7738 11.1041 21.2439 11.1041C20.8197 11.1041 20.4178 11.0085 20.0584 10.8377L16.5673 14.3374C16.6063 14.4873 16.6271 14.6445 16.6271 14.8066C16.6271 15.8291 15.8003 16.6579 14.7804 16.6579C13.7605 16.6579 12.9337 15.8291 12.9337 14.8066C12.9337 13.7842 13.7605 12.9554 14.7804 12.9554C14.9495 12.9554 15.1134 12.9782 15.269 13.0208L18.748 9.53324C18.5723 9.1685 18.4738 8.75938 18.4738 8.32719C18.4738 6.79355 19.714 5.55029 21.2439 5.55029C22.7738 5.55029 24.014 6.79355 24.014 8.32719Z",fill:"#EC3B64"}),l.jsx("path",{d:"M16.6205 3.69746C16.6205 4.71988 15.7937 5.54872 14.7737 5.54872C13.7538 5.54872 12.927 4.71988 12.927 3.69746C12.927 2.67503 13.7538 1.84619 14.7737 1.84619C15.7937 1.84619 16.6205 2.67503 16.6205 3.69746Z",fill:"#5CC461"}),l.jsx("path",{d:"M11.0803 9.25125C11.0803 10.2737 10.2535 11.1025 9.23361 11.1025C9.07191 11.1025 8.91506 11.0817 8.7656 11.0425L5.27441 14.5423C5.44482 14.9026 5.54016 15.3055 5.54016 15.7307C5.54016 17.2643 4.29995 18.5076 2.77008 18.5076C1.24021 18.5076 0 17.2643 0 15.7307C0 14.197 1.24021 12.9538 2.77008 12.9538C3.20121 12.9538 3.60934 13.0525 3.97319 13.2287L7.45222 9.74107C7.40963 9.58505 7.38689 9.42081 7.38689 9.25125C7.38689 8.22883 8.21369 7.39999 9.23361 7.39999C10.2535 7.39999 11.0803 8.22883 11.0803 9.25125Z",fill:"#5CC461"})]})}),l.jsxs("defs",{children:[l.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),l.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),l.jsx("feOffset",{dy:"2"}),l.jsx("feGaussianBlur",{stdDeviation:"4"}),l.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),l.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),l.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),l.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),l.jsx("clipPath",{id:"clip0_1397_29183",children:l.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),l.jsx("clipPath",{id:"clip1_1397_29183",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));Yb.displayName="LeftNavHome";const bH=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-radius-200 font-sans text-[10px] text-body-secondary transition-colors disabled:pointer-events-none","hover:bg-card-bg-hover hover:font-semibold hover:text-primary-hover","focus:bg-card-bg-focus focus:font-semibold focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","active:bg-card-bg-focus active:font-semibold active:text-primary-focus","is-active:bg-card-bg-focus is-active:font-semibold is-active:text-primary-focus"],{variants:{variant:{default:"",withNotification:"",withMenu:"",gradient:""}},defaultVariants:{variant:"default"}}),yH=Ge("",{variants:{variant:{default:"",gradient:"bg-[linear-gradient(90deg,#038EEF_9.05%,#ED3C65_86.39%)] text-transparent [-webkit-background-clip:text] [background-clip:text]"}},defaultVariants:{variant:"default"}}),Xb=d.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},c)=>l.jsx("div",{className:"rabbit-ds",children:l.jsxs(Hb,{"data-deer-btn":!0,className:ne(bH({variant:t,className:e})),ref:c,"data-active":a,...s,children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsxs("div",{className:"relative flex items-center justify-center",children:[l.jsx(Me,{IconSVG:r,size:"large"}),t==="withNotification"&&l.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-radius-300 bg-functional-warn px-2 text-xs text-white",children:[l.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),l.jsx("div",{className:ne(yH({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&l.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:l.jsx(Me,{IconSVG:b1,size:"large"})})]})}));Xb.displayName="LeftNavButton";const wH=Ge("cursor-pointer border border-solid border-[#CFD7DF] bg-[#F5F7F9] px-1 py-[2px] text-primary transition-all hover:border-primary-hover hover:bg-primary-hover hover:text-white",{variants:{variant:{default:"rounded-l-full border-r-0",collapsed:"rounded-r-full border-l-0"}},defaultVariants:{variant:"default"}});function xH({className:e,isCollapsed:t,...n}){return l.jsx("button",{"data-deer-btn":!0,type:"button",className:ne(wH({variant:t?"collapsed":"default"}),e),...n,children:l.jsx(Me,{IconSVG:p1,className:t?"rotate-180":""})})}const qb=d.createContext({isOpen:!1,toggleOpen:()=>{}}),CH=()=>d.useContext(qb);function Kb({...e}){const{isOpen:t,toggleOpen:n}=CH();return l.jsx(xH,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function AH(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=d.useState(n),i=d.useCallback(()=>{a(f=>!f)},[]),s=r?e.open:o,c=r?e.onToggle:i,u=d.useMemo(()=>({isOpen:s,toggleOpen:c}),[s,c]);return l.jsx(qb.Provider,{value:u,children:l.jsxs("div",{className:ne("rabbit-ds relative h-screen transition-all",s?"w-full":"w-0","shadow-[-8px_-2px_8px_0px_rgba(0,0,0,0.08)_inset]"),style:{background:"linear-gradient(273deg, #E7EFF1 0%, #EEF5F8 11%, #EFFAFE 100%)"},children:[l.jsx(Kb,{}),l.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function SH({children:e}){return l.jsx("div",{className:ne("nav-group flex flex-col gap-1","after:my-4 after:h-[1px] after:w-full after:bg-accent last:after:hidden"),children:e})}function EH({children:e}){return l.jsx("div",{className:"p-2 text-xs font-semibold text-body-secondary",children:e})}function MH({children:e,...t}){return l.jsx(Q2,{...t,children:e})}const $H=Ge("max-w-[28%] shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function PH({className:e,orientation:t,...n}){return l.jsx("div",{className:$H({orientation:t}),children:l.jsx(Ft,{className:ne(e,"h-auto min-h-10"),variant:"transparentOutline",...n})})}const TH={ON_TRACK:{label:"On-track",colorScheme:"tag-green"},OFF_TRACK:{label:"Off-track",colorScheme:"tag-yellow"},AT_RISK:{label:"At-risk",colorScheme:"tag-red"},CLOSED:{label:"Closed",colorScheme:"tag-darkGray"},NOT_STARTED:{label:"Not started",colorScheme:"tag-lightGray"}},kH=d.forwardRef(function({title:t,achieved:n,status:r,explanation:o,truncateExplanation:a=!0},i){const s=TH[r];return l.jsx("div",{ref:i,className:ne("rabbit-ds","mr-auto",a?"w-[70%]":""),children:l.jsxs("div",{className:"flex w-full flex-col gap-1",children:[l.jsxs("div",{className:"mt-1 flex items-center",children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:m1}),l.jsx("div",{className:"ml-1 text-sm",children:t})]}),l.jsxs("div",{className:"my-1 flex items-end gap-[18px]",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-xs text-body-secondary",children:"Achieved"}),l.jsxs("span",{className:ne(s.colorScheme,"!bg-transparent text-3xl font-semibold"),children:[n,"%"]})]}),l.jsx(kg,{colorScheme:s.colorScheme,className:"mb-1",children:s.label})]}),o&&l.jsxs("div",{className:ne("flex w-full gap-1",a?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",a?"truncate":""),children:o})]})]})})});function NH({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:r})]}),l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"text-body-secondary",children:[n," • "]}),l.jsxs("span",{className:"text-body-secondary",children:["Due by ",o]})]})]})]})})}function OH({employeeName:e,employeeProfilePhoto:t,designation:n}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx("span",{className:"text-body-secondary",children:n})]})]})})}const Qb=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:ne("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),l.jsxs("div",{className:ne("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));Qb.displayName="RequestedFeedbackNudgeData";const DH=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function FH({className:e,children:t,orientation:n}){return l.jsx("div",{className:ne("rabbit-ds","flex w-full items-center rounded-radius-200 border border-solid border-[#F3F5F8] bg-[#FDFDFD] p-2",DH({orientation:n}),e),children:t})}function _H({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a,variant:i="default"}){const[s,c]=d.useState(1),u=e.slice(0,o*s),f=e.length>o,p=e.length===u.length,h=i==="informational",v=()=>{c(g=>p?1:g+1)};return l.jsxs("div",{className:ne("rabbit-ds","flex w-full flex-col items-start gap-[7px] rounded-radius-200 bg-white px-4 py-3 shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[l.jsxs("div",{className:"flex w-full items-start justify-between",children:[l.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?l.jsx(hn,{className:"h-16 w-16",children:l.jsx(gn,{src:n,alt:t})}):null,h?l.jsx("div",{className:"flex flex-col gap-[7px]",children:u}):l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold",children:t}),l.jsx("span",{className:"text-sm",children:r})]})]}),a]}),!h&&u,f&&l.jsx("div",{className:"mx-auto",children:l.jsxs(Ft,{variant:"text",onClick:v,iconRight:p?d1:Ur,children:["View ",p?"less":"more"]})})]})}function IH({surveyName:e,date:t}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Me,{IconSVG:x1}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx(Fc,{date:t,showRelativeTime:!0})]})]})})}const Zb=d.forwardRef(function({employeeProfilePhoto:t,employeeName:n,scheduleDate:r,duration:o,subTitle:a,explanation:i,truncateExplanation:s=!0},c){return l.jsx("div",{ref:c,className:ne("rabbit-ds","mr-auto",s?"w-[70%]":""),children:l.jsxs("div",{className:ne("flex items-center gap-2 text-sm","flex-row [&>div]:items-start"),children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:n})}),l.jsxs("div",{className:"flex w-full flex-col items-center gap-1",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[n," • "]}),r?l.jsx(Fc,{date:r,duration:o,timeFormat:"HH:mm a",showTime:!0,className:"text-body-secondary"}):l.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]}),i&&l.jsxs("div",{className:ne("flex w-[90%] gap-1",s?"items-center":"items-start"),children:[l.jsx(Me,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:Gr}),l.jsx("span",{className:ne("w-full text-xs text-body-secondary",s?"truncate":""),children:i})]})]})]})})});Zb.defaultProps={subTitle:void 0,scheduleDate:void 0};function LH({label:e,onClick:t,customCompProps:n}){const[r,o]=d.useState(1);return l.jsxs(ru,{children:[l.jsx(Qi,{children:l.jsx("span",{children:e})}),l.jsx(nu,{children:l.jsx(Zi,{children:l.jsx(so,{children:l.jsxs("div",{className:"flex flex-col p-2",children:[l.jsx(Ql,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),l.jsx(T1,{id:n==null?void 0:n.label,className:"mt-2 !min-w-[160px]",type:"number",value:r,onChange:a=>o(a.target.valueAsNumber),min:1}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ft,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function BH({options:e}){const[t,n]=d.useState(!1),r=(o,a)=>{o(a),n(!1)};return l.jsxs(Xi,{open:t,children:[l.jsx(qi,{asChild:!0,onClick:()=>n(!0),children:l.jsx(Ft,{variant:"text",size:"smallIcon",children:l.jsx(Me,{IconSVG:v1})})}),l.jsx(oa,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:l.jsx(so,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?l.jsx(aa,{onClick:()=>r(a),children:l.jsx("span",{children:i})},i):l.jsx(LH,{onClick:c=>r(a,c),label:i,customCompProps:s},i))})})]})}const Jb=aa,Rb=so,e6=Ki,t6=es,n6=Ji,r6=Ri,o6=d.forwardRef(({className:e,children:t,align:n="end",...r},o)=>l.jsx(oa,{ref:o,align:n,...r,children:t}));o6.displayName="SplitButtonDropdownContent";const zH=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function WH({children:e,size:t,status:n,variant:r,...o}){return l.jsx("div",{className:"rabbit-ds flex flex-row",children:l.jsxs(Xi,{children:[l.jsx(Ft,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),l.jsx(qi,{asChild:!0,children:l.jsx(Ft,{variant:r,status:n,className:"rounded-l-none border-l-0",size:zH({size:t}),iconLeft:Ur})})]})})}Jb.displayName="SplitButtonDropdownItem",Rb.displayName="SplitButtonDropdownGroup",e6.displayName="SplitButtonDropdownRadioGroup",t6.displayName="SplitButtonDropdownLabel",n6.displayName="SplitButtonDropdownCheckboxItem",r6.displayName="SplitButtonDropdownRadioItem";const a6=({bold:e=!1,xbold:t=!1,color:n="text-body-primary"})=>ne("rabbit-ds-text",t?"font-bold":e?"font-semibold":"font-normal",n),jH=({children:e,className:t,...n})=>l.jsx("h3",{className:ne("text-350sm leading-500",a6(n),t),children:e}),VH=({children:e,className:t,...n})=>l.jsx("p",{className:ne("text-300sm leading-400",a6(n),t),children:e}),i6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("rabbit-ds flex gap-200 p-300",t),...n,ref:r,children:e}));i6.displayName="ListItemComp";const s6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));s6.displayName="ListItemCompLeading";const l6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex grow flex-col justify-center",t),...n,ref:r,children:e}));l6.displayName="ListItemCompContent";const c6=({children:e,className:t,...n})=>l.jsx(jH,{bold:!0,className:ne("text-body-primary",t),...n,children:e});c6.displayName="ListItemCompTitle";const u6=({children:e,className:t,...n})=>l.jsx(VH,{className:ne("text-body-secondary",t),...n,children:e});u6.displayName="ListItemCompDescription";const d6=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:ne("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));d6.displayName="ListItemCompAction",W.Accordion=Mp,W.AccordionContent=Tp,W.AccordionItem=$p,W.AccordionTrigger=Pp,W.Add=by,W.Alert=kp,W.AlertDescription=Op,W.AlertDialogAction=xh,W.AlertDialogCancel=wh,W.AlertDialogComponent=xx,W.AlertDialogContainer=bh,W.AlertDialogContent=Pc,W.AlertDialogDescription=kc,W.AlertDialogOverlay=$c,W.AlertDialogPortal=yh,W.AlertDialogTitle=Tc,W.AlertDialogTrigger=Ch,W.AlertIcon=Np,W.Avatar=hn,W.AvatarBadge=ts,W.AvatarFallback=Pi,W.AvatarGroup=Mu,W.AvatarImage=gn,W.Breadcrumb=Lg,W.BreadcrumbEllipsis=Hg,W.BreadcrumbItem=zg,W.BreadcrumbLink=Wg,W.BreadcrumbList=Bg,W.BreadcrumbPage=jg,W.BreadcrumbSeparator=Vg,W.Button=Ft,W.Calendar=yy,W.Caption=Nc,W.Card=Yo,W.CardContent=oc,W.CardDescription=op,W.CardHeader=rp,W.CardKPI=K$,W.CardTitle=rc,W.Carousel=tT,W.CarouselContainer=nT,W.CarouselNextButton=oT,W.CarouselPrevButton=rT,W.Check=Ho,W.CheckCircleOutline=l1,W.Checkbox=ci,W.ChevronDown=Ur,W.ChevronLeft=wy,W.ChevronLeftCircle=c1,W.ChevronRight=li,W.ChevronRightCircle=u1,W.ChevronUp=d1,W.Chip=e7,W.ChipGroup=jV,W.ChipGroupItem=VV,W.Close=f1,W.CollapseNavigation=p1,W.CollapsibleCard=J7,W.ColumnFilter=h1,W.ColumnFilterCheck=C1,W.Company=xy,W.Country=Cy,W.Currency=Ay,W.DateTime=Fc,W.Develop=Sy,W.DirectedLineChart=Sb,W.DisplayName=Ey,W.DonutChart=sV,W.Download=My,W.Dropdown=Xi,W.DropdownCheckboxItem=Ji,W.DropdownChip=q2,W.DropdownContent=oa,W.DropdownGroup=so,W.DropdownItem=aa,W.DropdownLabel=es,W.DropdownPortal=nu,W.DropdownRadioGroup=Ki,W.DropdownRadioItem=Ri,W.DropdownSeparator=ou,W.DropdownSub=ru,W.DropdownSubContent=Zi,W.DropdownSubTrigger=Qi,W.DropdownTrigger=qi,W.Engagement=$y,W.EngagementNudgeData=IH,W.ErrorOutline=ql,W.ExpandDown=Py,W.ExpandRight=g1,W.Feedback=Ty,W.Gear=ky,W.Goal=Ny,W.GoalsNudgeData=kH,W.GridChart=Mb,W.GridDirectedLineChart=OV,W.Help=Oy,W.HistogramChart=oV,W.HistoryComments=Dy,W.Home=Fy,W.HoverCard=U$,W.HoverCardContent=hv,W.HoverCardPortal=Y$,W.HoverCardTrigger=G$,W.Icon=Me,W.InfoWorkZero=Gr,W.Initiatives=_y,W.Input=T1,W.KebabMenu=v1,W.KnowTeamNudgeData=Zb,W.Label=Ql,W.LeftNav=Ub,W.LeftNavButton=Xb,W.LeftNavGroup=Gb,W.LeftNavHome=Yb,W.LeftNavItem=U0,W.LeftNavItemContent=hH,W.LeftNavItemDropdown=Xi,W.LeftNavItemDropdownCheckboxItem=Ji,W.LeftNavItemDropdownContent=oa,W.LeftNavItemDropdownGroup=so,W.LeftNavItemDropdownItem=aa,W.LeftNavItemDropdownLabel=es,W.LeftNavItemDropdownPortal=nu,W.LeftNavItemDropdownRadioGroup=Ki,W.LeftNavItemDropdownRadioItem=Ri,W.LeftNavItemDropdownSeparator=ou,W.LeftNavItemDropdownSub=ru,W.LeftNavItemDropdownSubContent=Zi,W.LeftNavItemDropdownSubTrigger=Qi,W.LeftNavItemDropdownTrigger=qi,W.LeftNavItemTrigger=pH,W.LineChart=Vj,W.ListItem=Q2,W.ListItemComp=i6,W.ListItemCompAction=d6,W.ListItemCompContent=l6,W.ListItemCompDescription=u6,W.ListItemCompLeading=s6,W.ListItemCompTitle=c6,W.ListItemIcon=cE,W.ListItemText=sE,W.Manager=Iy,W.ManagerWithBorder=Ly,W.MeshLogo=A1,W.MeshMaven=Xy,W.MeshMavenAsk=qy,W.MeshMavenDisabledThumbsUp=Ky,W.MeshMavenWithHording=Qy,W.MeshMavenWithOrangeBulb=Zy,W.MeshMavenWithThumbsUp=Jy,W.Metric=bv,W.MetricCard=mv,W.MetricCardStatText=Tu,W.MetricCardText=ps,W.MetricCardTitle=yv,W.MyOneOnOne=By,W.NavCollapseButtonL2=Kb,W.NavGroupL2=SH,W.NavGroupTitleL2=EH,W.NavItemL2=MH,W.NavL2=AH,W.NudgeAction=PH,W.NudgeCard=_H,W.NudgeCardItem=FH,W.NudgeKebabMenu=BH,W.Objective=m1,W.Overflow=b1,W.Person=zy,W.Product=Wy,W.ProfileCard=ku,W.ProfileCardItem=wv,W.ProfileCardKey=xv,W.ProfileCardValue=Cv,W.ProgressBar=W1,W.ProgressInfo=X$,W.ProgressSlider=j7,W.RadarChart=lV,W.RequestFeedback=jy,W.RequestedFeedbackNudgeData=Qb,W.Reviews=Vy,W.ReviewsNudgeData=NH,W.Role=Hy,W.SankeyChart=Jj,W.Search=y1,W.Select=ZE,W.SelectContent=pg,W.SelectGroup=JE,W.SelectItem=gg,W.SelectLabel=hg,W.SelectSeparator=vg,W.SelectTrigger=fg,W.SelectValue=RE,W.SettingsSchedule=Uy,W.ShareFeedback=Gy,W.SharePraiseNudgeData=OH,W.SliderDrag=w1,W.SplitButton=WH,W.SplitButtonDropdownCheckboxItem=n6,W.SplitButtonDropdownContent=o6,W.SplitButtonDropdownGroup=Rb,W.SplitButtonDropdownItem=Jb,W.SplitButtonDropdownLabel=t6,W.SplitButtonDropdownRadioGroup=e6,W.SplitButtonDropdownRadioItem=r6,W.StackedBarChart=pV,W.Survey=x1,W.Switch=h9,W.Tabs=Mg,W.TabsContent=Tg,W.TabsList=$g,W.TabsTrigger=Pg,W.Tag=kg,W.Team=Yy,W.Toaster=i$,W.Tooltip=gu,W.TooltipContent=ss,W.TooltipPortal=mu,W.TooltipProvider=hu,W.TooltipTrigger=vu,W.TrendingDown=S1,W.TrendingUp=E1,W.getInitialsFromName=Ph,W.toast=QM,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|