1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5486],{55486:(e,t,n)=>{n.r(t),n.d(t,{Bar:()=>g,Bubble:()=>m,Chart:()=>d,Doughnut:()=>h,Line:()=>b,Pie:()=>A,PolarArea:()=>p,Radar:()=>v,Scatter:()=>w,getDatasetAtEvent:()=>i,getElementAtEvent:()=>f,getElementsAtEvent:()=>o});var r=n(95155),a=n(12115),s=n(73643);let u="label";function c(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function l(e,t,n=u){let r=[];e.datasets=t.map(t=>{let a=e.datasets.find(e=>e[n]===t[n]);return!a||!t.data||r.includes(a)?{...t}:(r.push(a),Object.assign(a,t),a)})}function i(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"dataset",{intersect:!0},!1)}function f(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function o(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"index",{intersect:!0},!1)}let d=(0,a.forwardRef)(function(e,t){let{height:n=150,width:i=300,redraw:f=!1,datasetIdKey:o,type:d,data:E,options:b,plugins:g=[],fallbackContent:v,updateMode:h,...p}=e,m=(0,a.useRef)(null),A=(0,a.useRef)(null),w=()=>{m.current&&(A.current=new s.t1(m.current,{type:d,data:function(e,t=u){let n={labels:[],datasets:[]};return n.labels=e.labels,l(n,e.datasets,t),n}(E,o),options:b&&{...b},plugins:g}),c(t,A.current))},j=()=>{c(t,null),A.current&&(A.current.destroy(),A.current=null)};return(0,a.useEffect)(()=>{!f&&A.current&&b&&function(e,t){let n=e.options;n&&t&&Object.assign(n,t)}(A.current,b)},[f,b]),(0,a.useEffect)(()=>{!f&&A.current&&(A.current.config.data.labels=E.labels)},[f,E.labels]),(0,a.useEffect)(()=>{!f&&A.current&&E.datasets&&l(A.current.config.data,E.datasets,o)},[f,E.datasets]),(0,a.useEffect)(()=>{A.current&&(f?(j(),setTimeout(w)):A.current.update(h))},[f,b,E.labels,E.datasets,h]),(0,a.useEffect)(()=>{A.current&&(j(),setTimeout(w))},[d]),(0,a.useEffect)(()=>(w(),()=>j()),[]),(0,r.jsx)("canvas",{ref:m,role:"img",height:n,width:i,...p,children:v})});function E(e,t){return s.t1.register(t),(0,a.forwardRef)((t,n)=>(0,r.jsx)(d,{...t,ref:n,type:e}))}let b=E("line",s.ZT),g=E("bar",s.A6),v=E("radar",s.h9),h=E("doughnut",s.ju),p=E("polarArea",s.G5),m=E("bubble",s.Jb),A=E("pie",s.P$),w=E("scatter",s.Pz)}}]);
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.