"use strict";(globalThis.wpRiseJsonp||=[]).push([["node_modules_pnpm_react-chartjs-2_5_3_1_chart_js_4_5_1_react_19_2_8_node_modules_react-chartj-df81b70","node_modules_pnpm_react-chartjs-2_5_3_1_chart_js_4_5_1_react_19_2_8_node_modules_react-chartj-df81b71"],{9935(m,d){/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var l=Symbol.for("react.transitional.element"),p=Symbol.for("react.fragment");function n(o,u,c){var C=null;if(c!==void 0&&(C=""+c),u.key!==void 0&&(C=""+u.key),"key"in u){c={};for(var E in u)E!=="key"&&(c[E]=u[E])}else c=u;return u=c.ref,{$$typeof:l,type:o,key:C,ref:u!==void 0?u:null,props:c}}d.Fragment=p,d.jsx=n,d.jsxs=n},30739(m,d,l){m.exports=l(9935)},40616(m,d,l){l.r(d),l.d(d,{getDatasetAtEvent:()=>M,getElementAtEvent:()=>B,getElementsAtEvent:()=>L});var p=l(30739),n=l(49860),o=l(30467);const u="label";function c(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function C(t,e){const s=t.options;s&&e&&Object.assign(s,e)}function E(t,e){t.labels=e}function P(t,e,s=u){const h=[];t.datasets=e.map(a=>{const f=t.datasets.find(A=>A[s]===a[s]);return!f||!a.data||h.includes(f)?{...a}:(h.push(f),Object.assign(f,a),f)})}function T(t,e=u){const s={labels:[],datasets:[]};return E(s,t.labels),P(s,t.datasets,e),s}function M(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"dataset",{intersect:!0},!1)}function B(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"nearest",{intersect:!0},!1)}function L(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"index",{intersect:!0},!1)}function O(t,e){const{height:s=150,width:h=300,redraw:a=!1,datasetIdKey:f,type:A,data:_,options:v,plugins:x=[],fallbackContent:Y,updateMode:D,...$}=t,b=(0,n.useRef)(null),r=(0,n.useRef)(null),g=()=>{b.current&&(r.current=new o.Chart(b.current,{type:A,data:T(_,f),options:v&&{...v},plugins:x}),c(e,r.current))},R=()=>{c(e,null),r.current&&(r.current.destroy(),r.current=null)};return(0,n.useEffect)(()=>{!a&&r.current&&v&&C(r.current,v)},[a,v]),(0,n.useEffect)(()=>{!a&&r.current&&E(r.current.config.data,_.labels)},[a,_.labels]),(0,n.useEffect)(()=>{!a&&r.current&&_.datasets&&P(r.current.config.data,_.datasets,f)},[a,_.datasets]),(0,n.useEffect)(()=>{r.current&&(a?(R(),setTimeout(g)):r.current.update(D))},[a,v,_.labels,_.datasets,D]),(0,n.useEffect)(()=>{r.current&&(R(),setTimeout(g))},[A]),(0,n.useEffect)(()=>(g(),()=>R()),[]),(0,p.jsx)("canvas",{ref:b,role:"img",height:s,width:h,...$,children:Y})}const j=(0,n.forwardRef)(O);function i(t,e){return o.Chart.register(e),(0,n.forwardRef)((s,h)=>(0,p.jsx)(j,{...s,ref:h,type:t}))}const w=i("line",o.LineController),y=i("bar",o.BarController),F=i("radar",o.RadarController),S=i("doughnut",o.DoughnutController),k=i("polarArea",o.PolarAreaController),I=i("bubble",o.BubbleController),U=i("pie",o.PieController),W=i("scatter",o.ScatterController);l.d(d,["Bar",0,y,"Bubble",0,I,"Chart",0,j,"Doughnut",0,S,"Line",0,w,"Pie",0,U,"PolarArea",0,k,"Radar",0,F,"Scatter",0,W])}}]);
