1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2121],{28302:function(e,l,a){a.r(l),a.d(l,{default:function(){return j}});var t=a(27573),s=a(57364),n=a(50896),r=a(48266),i=a(45168),o=a(85107),c=a(17158),d=a(7653),u=a(53512),x=a(20054),h=a(44230),m=a.n(h),f=a(3950),w=a(75298),v=a(22851);function j(e){let{from:l,to:a=new Date,width:h=100,onClick:j,data:p,isLoading:g,error:y}=e,b=(0,d.useMemo)(()=>p?Math.min(...p.map(e=>e.value)):0,[p]),N=(0,d.useMemo)(()=>p?Math.max(...p.map(e=>e.value)):0,[p]);(0,d.useMemo)(()=>(N-b)*.1,[N,b]);let k=(0,d.useMemo)(()=>(0,v.O)(p||[],"value"),[p]),M=(0,d.useMemo)(()=>{if(!p||p.length<2||!l)return h;let e=new Date(p[0].date).getTime()-(l.getTime()+m()("1h"));if(e>0){let t=a.getTime()-l.getTime();return Math.max((t-e)/t*h,h/4)}return h},[p]),D=(0,d.useMemo)(()=>{if(!p||p.length<2)return;let[e,l]=[p[0],p[p.length-1]];return e.value<l.value||e.value===l.value&&void 0},[p]);return g?(0,t.jsx)(o.O,{className:"w-full h-full"}):y?(0,t.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center gap-y-1",children:[(0,t.jsx)(u.Z,{}),(0,t.jsx)("div",{className:"text-xs",children:y.message||"Could retrieve data"})]}):p&&p.length<2?(0,t.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center gap-y-1",children:[(0,t.jsx)(x.Z,{}),(0,t.jsx)("div",{className:"text-xs",children:"Not enough data"})]}):(0,t.jsx)("div",{className:(0,w.cn)("h-full w-full overflow-visible"),onClick:j,children:(0,t.jsx)("div",{className:"flex flex-row h-full justify-center",children:(0,t.jsx)(c.BO,{style:{width:M},config:{value:{label:"Value",color:"hsl(var(".concat(void 0===D?"--chart-1":D?"--chart-success":"--chart-danger","))")}},className:"h-full w-full overflow-visible",children:(0,t.jsxs)(s.w,{data:p,margin:{},children:[(0,t.jsx)(n.K,{dataKey:"date",tickLine:!1,axisLine:!1,tick:!1}),(0,t.jsx)(r.B,{dataKey:"value",tickLine:!1,axisLine:!1,tick:!1,width:0,domain:k}),(0,t.jsx)(c.h7,{allowEscapeViewBox:{x:!0,y:!1},wrapperStyle:{zIndex:50},content:e=>{let{active:l,payload:a}=e;return l&&a&&a.length?(0,t.jsxs)("div",{className:"bg-background border rounded p-2 shadow-md",children:[(0,t.jsx)("p",{className:"text-xs",children:"Date: ".concat((0,f.p6)(a[0].payload.date,"MM/dd/yyyy"))}),(0,t.jsx)("p",{className:"text-xs font-bold",children:"Price: $".concat(a[0].value)})]}):null}}),(0,t.jsx)(i.x,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4},stroke:"var(--color-value)"})]})})})})}},82638:function(e,l,a){a.r(l),a.d(l,{buyboxGraphColumn:function(){return f},chartSubRowColumns:function(){return w}});var t=a(27573),s=a(7653),n=a(44230),r=a.n(n),i=a(64070),o=a(85107),c=a(84537),d=a(72659),u=a(15199);let x=(0,i.default)(()=>Promise.all([a.e(2121),a.e(9804),a.e(461),a.e(5298),a.e(9526)]).then(a.bind(a,28302)),{loadableGenerated:{webpack:()=>[28302]},ssr:!1,loading:()=>(0,t.jsx)(o.O,{className:"w-full h-full"})}),h=e=>{let{from:l,to:a=new Date,ctx:n}=e,{data:r,isLoading:i,error:o}=(0,u.SS)("","buybox-data",n.row.original.id,l,a),[h,m]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"w-[100px] h-[100px]",children:[(0,t.jsx)(x,{from:l,to:a,data:r,isLoading:i,error:o,width:100,onClick:()=>m(!0)}),(0,t.jsx)(d.u,{showModal:h,setShowModal:m,className:"gap-0 sm:max-w-[425px]",children:(0,t.jsx)(c.Zb,{children:(0,t.jsxs)(c.aY,{className:"sm:max-w-[425px]",children:[(0,t.jsx)(c.Ol,{children:(0,t.jsx)(c.ll,{children:"Buybox Trend"})}),(0,t.jsx)("div",{className:"px-6 pt-6",children:(0,t.jsx)(x,{from:l,to:a,data:r,isLoading:i,error:o,width:330})})]})})})]})};var m=a(20459);let f={id:"buyboxGraph",header:"Buybox trend",meta:{zIndex:10},cell:function(e){return(0,s.useMemo)(()=>(0,t.jsx)(h,{from:new Date(Date.now()-r()("30d")),to:new Date,ctx:e}),[e.row.original.id])}},w=[m.y,m.h]}}]);
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.