1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7613],{28506:(e,t,r)=>{r.d(t,{ED:()=>l,OK:()=>o,Re:()=>g,SQ:()=>n,TL:()=>c,Vv:()=>s,Xg:()=>x,_G:()=>i,_N:()=>a,jy:()=>d,tk:()=>u});let a={emerald:"bg-success-tint text-success",blue:"bg-info-tint text-info",amber:"bg-warning-tint text-warning",red:"bg-destructive-tint text-destructive",slate:"bg-muted text-muted-foreground",violet:"bg-violet-100 text-violet-700",orange:"bg-warning-tint text-warning",gray:"bg-muted text-muted-foreground",purple:"bg-purple-100 text-purple-700"},l={OK:"emerald",ATTENTION:"amber",AT_RISK:"red",INACTIVE:"gray"},n={MERCHANDISER:"blue",SALES:"orange",SUPERVISOR:"purple",PROMOTER:"violet"},s={CARRY_IT:"violet",MATCH_PRICE:"amber",MONITOR:"slate"},i={1:"text-warning",2:"text-muted-foreground",3:"text-warning"},o={visits:"#696AC3",sales:"#FFB620"},c={OOS:"#ef4444",PLANOGRAM_MISS:"#8b5cf6",PRICE_OOR:"#f59e0b",LOW_SHARE:"#64748b"},d=["#ef4444","#8b5cf6","#f59e0b","#64748b","#0ea5e9"],u={OK:"#22c55e",ATTENTION:"#eab308",AT_RISK:"#ef4444",INACTIVE:"#9ca3af"},x={OK:"bg-success",ATTENTION:"bg-warning",AT_RISK:"bg-destructive",INACTIVE:"bg-gray-400"},g={SHELF:"bg-success-tint text-success",POP:"bg-warning-tint text-warning",COMPETITOR:"bg-destructive-tint text-destructive",OOS:"bg-destructive-tint text-destructive",STOCKOUT:"bg-destructive-tint text-destructive",PLANOGRAM:"bg-info-tint text-info",STORE_FRONT:"bg-indigo-100 text-indigo-700",GENERAL:"bg-muted text-muted-foreground"}},29994:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var a=r(95155),l=r(12115),n=r(31962),s=r(68022),i=r(67389),o=r(97921),c=r(75039),d=r(95584),u=r(28506);function x(e,t){return u.TL[e.category]||u.jy[t%u.jy.length]}function g({data:e=[],centerLabel:t}){let[r,u]=l.useState({}),[m,f]=l.useState([]);(0,l.useEffect)(()=>{let t={};e.forEach((e,r)=>{t[e.label.replace(/\s+/g,"-").toLowerCase()]={label:e.label,color:x(e,r)}}),f(e.map((e,t)=>({name:e.label,value:e.value,fill:x(e,t)}))),u(t)},[e]);let h=e.reduce((e,t)=>e+(Number(t.value)||0),0);return e&&0!==e.length&&0!==h?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsx)(c.at,{config:r,className:"mx-auto aspect-square max-h-[280px]",children:(0,a.jsxs)(n.r,{children:[(0,a.jsx)(c.II,{cursor:!1,content:(0,a.jsx)(c.Nt,{hideLabel:!0})}),(0,a.jsxs)(s.F,{data:m,dataKey:"value",nameKey:"name",innerRadius:60,strokeWidth:4,children:[m.map(e=>(0,a.jsx)(i.f,{fill:e.fill},e.name)),(0,a.jsx)(o.J,{content:({viewBox:e})=>e&&"cx"in e?(0,a.jsxs)("text",{x:e.cx,y:e.cy,textAnchor:"middle",dominantBaseline:"middle",children:[(0,a.jsx)("tspan",{x:e.cx,y:e.cy,className:"fill-foreground text-2xl font-bold",children:h}),t&&(0,a.jsx)("tspan",{x:e.cx,y:(e.cy||0)+20,className:"fill-muted-foreground text-xs",children:t})]}):null})]})]})}),(0,a.jsx)("ul",{className:"flex w-full flex-wrap items-center justify-center gap-x-4 gap-y-1.5 text-xs",children:e.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"inline-block h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:x(e,t)}}),(0,a.jsx)("span",{className:"text-muted-foreground",children:e.label}),(0,a.jsx)("span",{className:"font-semibold tabular-nums text-foreground",children:e.value})]},e.category||e.label))})]}):(0,a.jsx)("div",{className:"flex w-full items-center justify-center min-h-[280px]",children:(0,a.jsx)(d.A,{})})}},75039:(e,t,r)=>{r.d(t,{Hm:()=>b,II:()=>m,Nt:()=>f,_3:()=>h,at:()=>x});var a=r(95155),l=r(12115),n=r(4450),s=r(18662),i=r(93459),o=r(86190);let c={light:"",dark:".dark"},d=l.createContext(null);function u(){let e=l.useContext(d);if(!e)throw Error("useChart must be used within a <ChartContainer />");return e}let x=l.forwardRef(({id:e,className:t,children:r,config:s,...i},c)=>{let u=l.useId(),x=`chart-${e||u.replace(/:/g,"")}`;return(0,a.jsx)(d.Provider,{value:{config:s},children:(0,a.jsxs)("div",{"data-chart":x,ref:c,className:(0,o.cn)("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line-line]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[(0,a.jsx)(g,{id:x,config:s}),(0,a.jsx)(n.u,{children:r})]})})});x.displayName="Chart";let g=({id:e,config:t})=>{let r=Object.entries(t).filter(([e,t])=>t.theme||t.color);return r.length?(0,a.jsx)("style",{dangerouslySetInnerHTML:{__html:Object.entries(c).map(([t,a])=>` 2${a} [data-chart=${e}] { 3${r.map(([e,r])=>{let a=r.theme?.[t]||r.color;return a?` --color-${e}: ${a};`:null}).join("\n")} 4} 5`)}}):null},m=s.m,f=l.forwardRef(({active:e,payload:t,className:r,indicator:n="dot",hideLabel:s=!1,hideIndicator:i=!1,label:c,labelFormatter:d,labelClassName:x,formatter:g,color:m,nameKey:f,labelKey:h},b)=>{let{config:v}=u(),j=l.useMemo(()=>
5{if(s||!t?.length)return null;let[e]=t,r=`${h||e.dataKey||e.name||"value"}`,l=p(v,e,r),n=h||"string"!=typeof c?l?.label:v[c]?.label||c;return d?(0,a.jsx)("div",{className:(0,o.cn)("font-medium",x),children:d(n,t)}):n?(0,a.jsx)("div",{className:(0,o.cn)("font-medium",x),children:n}):null},[c,d,t,s,x,v,h]);if(!e||!t?.length)return null;let y=1===t.length&&"dot"!==n;return(0,a.jsxs)("div",{ref:b,className:(0,o.cn)("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-chart-tooltip text-chart-tooltip-foreground px-2.5 py-1.5 text-xs shadow-xl",r),children:[y?null:j,(0,a.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{let r=`${f||e.name||e.dataKey||"value"}`,l=p(v,e,r),s=m||e.payload.fill||e.color;return(0,a.jsx)("div",{className:(0,o.cn)("flex w-full items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===n&&"items-center"),children:g&&e.value&&e.name?g(e.value,e.name,e,t,e.payload):(0,a.jsxs)(a.Fragment,{children:[l?.icon?(0,a.jsx)(l.icon,{}):!i&&(0,a.jsx)("div",{className:(0,o.cn)("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===n,"w-1":"line"===n,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===n,"my-0.5":y&&"dashed"===n}),style:{"--color-bg":s,"--color-border":s}}),(0,a.jsxs)("div",{className:(0,o.cn)("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[(0,a.jsxs)("div",{className:"grid gap-1.5",children:[y?j:null,(0,a.jsx)("span",{className:"text-white",children:l?.label||e.name})]}),e.value&&(0,a.jsx)("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})});f.displayName="ChartTooltip";let h=i.s,b=l.forwardRef(({className:e,hideIcon:t=!1,payload:r,verticalAlign:l="bottom",nameKey:n},s)=>{let{config:i}=u();return r?.length?(0,a.jsx)("div",{ref:s,className:(0,o.cn)("flex items-center justify-center gap-4","top"===l?"pb-3":"pt-3",e),children:r.map(e=>{let r=`${n||e.dataKey||"value"}`,l=p(i,e,r);return(0,a.jsxs)("div",{className:(0,o.cn)("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[l?.icon&&!t?(0,a.jsx)(l.icon,{}):(0,a.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color}}),l?.label]},e.value)})}):null});function p(e,t,r){if("object"!=typeof t||null===t)return;let a="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0,l=r;return r in t&&"string"==typeof t[r]?l=t[r]:a&&r in a&&"string"==typeof a[r]&&(l=a[r]),l in e?e[l]:e[r]}b.displayName="ChartLegend"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.