1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[245],{11245:function(e,t,a){a.r(t),a.d(t,{default:function(){return p}});var n=a(57437),i=a(2265),l=a(66070),r=a(47625),s=a(21156),d=a(97059),c=a(62994),o=a(8147),h=a(22190),x=a(54061),u=a(77031),m=a(83046);function p({entries:e,fieldSchema:t}){let a=t.filter(e=>e?.type==="scale"||e?.type==="number"),p=t.filter(e=>e?.type==="dropdown"),j=(0,i.useMemo)(()=>[...e??[]].sort((e,t)=>new Date(e?.createdAt??0).getTime()-new Date(t?.createdAt??0).getTime()).slice(-30).map(e=>{let t={date:new Date(e?.createdAt??0).toLocaleDateString("en-US",{month:"short",day:"numeric"})};return a.forEach(a=>{let n=e?.entryData?.[a?.name??""];null!=n&&(t[a?.label??a?.name??""]=n)}),t}),[e,a]),f=(0,i.useMemo)(()=>p.map(t=>{let a={};return(e??[]).forEach(e=>{let n=e?.entryData?.[t?.name??""];n&&(a[n]=(a[n]??0)+1)}),{field:t?.label??t?.name??"Field",data:Object.entries(a).map(([e,t])=>({name:e,count:t}))}}),[e,p]),b=["#60B5FF","#FF9149","#FF9898","#80D8C3","#A19AD3"];return 0===a.length&&0===p.length?(0,n.jsx)(l.Zb,{children:(0,n.jsx)(l.aY,{className:"py-8 text-center text-gray-500",children:"No chartable data available. Add scale, number, or dropdown fields to see insights."})}):(0,n.jsxs)("div",{className:"space-y-6",children:[a.length>0&&j.length>0&&(0,n.jsxs)(l.Zb,{children:[(0,n.jsx)(l.Ol,{children:(0,n.jsx)(l.ll,{children:"Trends Over Time"})}),(0,n.jsx)(l.aY,{children:(0,n.jsx)("div",{className:"h-[300px] w-full",children:(0,n.jsx)(r.h,{width:"100%",height:"100%",children:(0,n.jsxs)(s.w,{data:j,children:[(0,n.jsx)(d.K,{dataKey:"date",tick:{fontSize:10},tickLine:!1,interval:"preserveStartEnd"}),(0,n.jsx)(c.B,{tick:{fontSize:10},tickLine:!1,domain:["auto","auto"]}),(0,n.jsx)(o.u,{contentStyle:{backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"8px",fontSize:"11px"}}),(0,n.jsx)(h.D,{verticalAlign:"top",wrapperStyle:{fontSize:11}}),a.map((e,t)=>(0,n.jsx)(x.x,{type:"monotone",dataKey:e?.label??e?.name??"",stroke:b[t%b.length],strokeWidth:2,dot:{r:3},activeDot:{r:5}},e?.id??e?.name))]})})})})]}),f.map((e,t)=>e.data.length>0&&(0,n.jsxs)(l.Zb,{children:[(0,n.jsx)(l.Ol,{children:(0,n.jsxs)(l.ll,{children:[e.field," Distribution"]})}),(0,n.jsx)(l.aY,{children:(0,n.jsx)("div",{className:"h-[250px] w-full",children:(0,n.jsx)(r.h,{width:"100%",height:"100%",children:(0,n.jsxs)(u.v,{data:e.data,children:[(0,n.jsx)(d.K,{dataKey:"name",tick:{fontSize:10},tickLine:!1,interval:0,angle:-45,textAnchor:"end",height:60}),(0,n.jsx)(c.B,{tick:{fontSize:10},tickLine:!1,allowDecimals:!1}),(0,n.jsx)(o.u,{contentStyle:{backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"8px",fontSize:"11px"}}),(0,n.jsx)(m.$,{dataKey:"count",fill:b[t%b.length],radius:[4,4,0,0]})]})})})})]},t))]})}}}]);
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.