@undp/data-viz 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.js +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.js +2 -2
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.js +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +3 -3
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +1 -1
- package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
- package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
- package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
- package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +1 -1
- package/dist/{GraphEl-DDXkYObU.js → GraphEl-Bw-9MUym.js} +8 -7
- package/dist/GraphEl-Bw-9MUym.js.map +1 -0
- package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-DjElfY07.cjs} +2 -2
- package/dist/GraphEl-DjElfY07.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +2 -2
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
- package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
- package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
- package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +2 -2
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.js +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +2 -2
- package/dist/Types.d.ts +1 -0
- package/dist/Typography-Cc_iHQB-.cjs +2 -0
- package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
- package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
- package/dist/Typography-CdMGooqp.js.map +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.js +1 -1
- package/dist/index-BzNfurbO.js +378 -0
- package/dist/index-BzNfurbO.js.map +1 -0
- package/dist/index-CXobQn-E.cjs +2 -0
- package/dist/index-CXobQn-E.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/GraphEl-CWjTuiYd.cjs.map +0 -1
- package/dist/GraphEl-DDXkYObU.js.map +0 -1
- package/dist/Typography-DrJ7IOdw.cjs +0 -2
- package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
- package/dist/Typography-iR8PEgdt.js.map +0 -1
- package/dist/index-BE-lvE4c.js +0 -337
- package/dist/index-BE-lvE4c.js.map +0 -1
- package/dist/index-DlrGwLQA.cjs +0 -2
- package/dist/index-DlrGwLQA.cjs.map +0 -1
package/dist/Histogram.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as le, j as R } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
2
|
import { w as se } from "./Spinner--r2RrJV8.js";
|
|
3
|
-
import { e as re, C as ce } from "./index-
|
|
3
|
+
import { e as re, C as ce } from "./index-BzNfurbO.js";
|
|
4
4
|
import { TreeMapGraph as fe } from "./TreeMapGraph.js";
|
|
5
5
|
import { DonutChart as he } from "./DonutChart.js";
|
|
6
6
|
import { SimpleBarGraph as ue } from "./BarGraph.js";
|
package/dist/HybridMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),d=require("react"),qt=require("./parse-xYI9yrvL.cjs"),It=require("./getSliderMarks-CIuSoedo.cjs"),Ut=require("./Spinner-jTMOLuw_.cjs"),Pt=require("./index-DQA8q5sC.cjs"),U=require("./index-DLFt97gy.cjs"),St=require("./Typography-DrJ7IOdw.cjs"),Gt=require("./index-C5K--w8d.cjs"),zt=require("./Source-B3i0Bx2R.cjs"),Ht=require("./index-Dzc_aaI9-C3DbPpy3.cjs"),Xt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./index-sbKVyHS2.cjs"),Yt=require("./DetailsModal-DHttOA80.cjs"),Jt=require("./pow-BnyPO-NX.cjs"),Kt=require("./ordinal-CrsysVE-.cjs"),Zt=require("./threshold-DNsSUf8Q.cjs"),Nt=require("./select-Bnfk0lJx.cjs"),le=require("./proxy-C4-uo6nS.cjs"),dt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Qt=require("./numberFormattingFunction-02t-wJta.cjs"),eo=require("./use-in-view-C3o_ntMv.cjs"),to=require("./index-CoobIWNj.cjs"),oo=require("./GraphFooter.cjs"),ro=require("./GraphHeader.cjs"),we=require("./Colors.cjs"),ao=require("./fetchAndParseData-QTF6tjij.cjs"),_t=require("./GraphContainer-B1EDxJ0S.cjs"),io=require("./getUniqValue-NX8DgwND.cjs"),no=require("./getJenks-BzJvhy_H.cjs");function so(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const g=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,g.get?g:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const lo=so(d);var co="Separator",Lt="horizontal",uo=["horizontal","vertical"],Vt=lo.forwardRef((a,e)=>{const{decorative:t,orientation:g=Lt,...f}=a,n=mo(g)?g:Lt,y=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return r.ae.jsx(Ht.w.div,{"data-orientation":n,...y,...f,ref:e})});Vt.displayName=co;function mo(a){return uo.includes(a)}var $t=Vt;const Bt=d.forwardRef((a,e)=>{const t=r._.c(14);let g,f,n,y;t[0]!==a?({className:g,variant:n,orientation:y,...f}=a,t[0]=a,t[1]=g,t[2]=f,t[3]=n,t[4]=y):(g=t[1],f=t[2],n=t[3],y=t[4]);const v=n===void 0?"dark":n,s=y===void 0?"horizontal":y,x=s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",k=v==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let E;t[5]!==g||t[6]!==x||t[7]!==k?(E=r.mo(x,k,g),t[5]=g,t[6]=x,t[7]=k,t[8]=E):E=t[8];let S;return t[9]!==s||t[10]!==f||t[11]!==e||t[12]!==E?(S=r.ae.jsx($t,{...f,ref:e,orientation:s,className:E}),t[9]=s,t[10]=f,t[11]=e,t[12]=E,t[13]=S):S=t[13],S});Bt.displayName=$t.displayName;function po(a){const{data:e,colors:t,mapData:g,mapColorLegendTitle:f,colorDomain:n,radius:y,height:v,width:s,scale:x,centerPoint:k,tooltip:E,showLabels:S,mapBorderWidth:ke,mapBorderColor:Re,mapNoDataColor:Ce,onSeriesMouseOver:G,showColorScale:De,zoomScaleExtend:We,zoomTranslateExtend:Ue,highlightedDataPoints:Se,onSeriesMouseClick:I,resetSelectionOnDoubleClick:Ne,detailsOnClick:H,styles:R,classNames:X,mapProjection:ee,zoomInteraction:Y,animate:j,dimmedOpacity:P,customLayers:ce,maxRadiusValue:de,categorical:te,dotColor:J,collapseColorScaleByDefault:Oe,highlightedIds:oe,mapProperty:ue,dotLegendTitle:me,dotBorderColor:Me,labelColor:qe,projectionRotate:K,rewindCoordinatesInMapData:pe}=a,u=d.useMemo(()=>pe?U.index_default(g,{reverse:!0}):g,[g,pe]),[l,z]=d.useState(void 0),[Ge,Ie]=d.useState(Oe===void 0?!(s<680):!Oe),xe=d.useRef(null),[_,N]=d.useState(void 0),[re,O]=d.useState(void 0),[Pe,C]=d.useState(void 0),[ze,M]=d.useState(void 0),L=d.useRef(null),Z=eo.useInView(L,{once:j.once,amount:j.amount}),ae=d.useRef(null),V=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?Jt.sqrt().domain([0,de]).range([.25,y]).nice():void 0,q=te?Kt.ordinal().domain(n).range(t):Zt.threshold().domain(n).range(t);d.useEffect(()=>{const o=Nt.select(ae.current),i=Nt.select(L.current),b=m=>{if(Y==="noZoom")return!1;if(Y==="button")return!m.type.includes("wheel");const ge=m.type==="wheel",fe=m.type.startsWith("touch"),Be=m.type==="mousedown"||m.type==="mousemove";return fe?!0:ge?Y==="scroll"?!0:m.ctrlKey:Be&&!m.button&&!m.ctrlKey},D=U.zoom().scaleExtent(We).translateExtent(Ue||[[-20,-20],[s+20,v+20]]).filter(b).on("zoom",({transform:m})=>{o.attr("transform",m)});i.call(D),xe.current=D},[v,s,Y]);const $=U.index_default$1(u),w=Gt.index_default(u),_e=($[2]-$[0])*1.15,Le=($[3]-$[1])*1.15,Ve=s*190/960*360/_e,$e=v*190/678*180/Le,B=x*Math.min(Ve,$e),Q=ee==="mercator"?U.geoMercator().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="equalEarth"?U.geoEqualEarth().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="naturalEarth"?U.geoNaturalEarth1().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="orthographic"?U.geoOrthographic().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):U.geoAlbersUsa().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B),he=U.geoPath().projection(Q),ie=o=>{if(!L.current||!xe.current)return;Nt.select(L.current).call(xe.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(le.motion.svg,{width:`${s}px`,height:`${v}px`,viewBox:`0 0 ${s} ${v}`,ref:L,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:ae,children:[ce.filter(o=>o.position==="before").map(o=>o.layer),u.features.map((o,i)=>{if(!o.properties?.[ue])return null;const b=he(o);return b?r.jsxRuntimeExports.jsx(le.motion.g,{opacity:l?P:oe.length!==0?oe.indexOf(o.properties[ue])!==-1?1:P:1,children:r.jsxRuntimeExports.jsx("path",{d:b,style:{stroke:Re,strokeWidth:ke,fill:Ce}})},i):null}),r.jsxRuntimeExports.jsxs(to.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const i=u.features.findIndex(m=>o.id===m.properties[ue]);if(i===-1)return null;const b=he(u.features[i]);if(!b)return null;const D=dt.checkIfNullOrUndefined(o.x)?Ce:q(o.x);return r.jsxRuntimeExports.jsx(le.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:l?l===D?1:P:oe.length!==0?oe.indexOf(o.id)!==-1?1:P:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:m=>{O(o),M(m.clientY),C(m.clientX),G?.(o)},onMouseMove:m=>{O(o),M(m.clientY),C(m.clientX)},onMouseLeave:()=>{O(void 0),C(void 0),M(void 0),G?.(void 0)},onClick:()=>{(I||H)&&(Pt.isEqual(_,o)&&Ne?(N(void 0),I?.(void 0)):(N(o),I?.(o)))},children:r.jsxRuntimeExports.jsx(le.motion.path,{d:b,variants:{initial:{fill:D,opacity:0},whileInView:{fill:D,opacity:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},style:{stroke:Re,strokeWidth:ke}},`${o.id}`)},o.id)}),e.filter(o=>!dt.checkIfNullOrUndefined(o.lat)&&!dt.checkIfNullOrUndefined(o.long)).map(o=>{const i=Q([o.long,o.lat])[0]>.8*s?-1:1;return r.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:Se.length!==0?Se.indexOf(o.label||"")!==-1?1:P:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:b=>{O(o),M(b.clientY),C(b.clientX),G?.(o)},onMouseMove:b=>{O(o),M(b.clientY),C(b.clientX)},onMouseLeave:()=>{O(void 0),C(void 0),M(void 0),G?.(void 0)},onClick:()=>{(I||H)&&(Pt.isEqual(_,o)&&Ne?(N(void 0),I?.(void 0)):(N(o),I?.(o)))},transform:`translate(${Q([o.long,o.lat])[0]},${Q([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:J,stroke:Me||J},whileInView:{r:V?V(o.radius||0):y,fill:J,stroke:Me||J,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{r:0,transition:{duration:j.duration}},style:{fillOpacity:.8}}),S&&o.label?r.jsxRuntimeExports.jsx(le.motion.text,{variants:{initial:{opacity:0,x:i*(V?V(o.radius||0):y)},whileInView:{opacity:1,x:i*(V?V(o.radius||0):y),transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},y:0,className:r.mo("text-sm",X?.graphObjectValues),style:{textAnchor:i===-1?"end":"start",fill:qe||"#000",...R?.graphObjectValues||{}},dx:i*4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`)})]}),ce.filter(o=>o.position==="after").map(o=>o.layer)]})}),De===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",X?.colorLegend),children:Ge?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ie(!1)},children:r.jsxRuntimeExports.jsx(Ot.X,{})}),r.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:te?void 0:"340px"},children:[me&&me!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:J}}),r.jsxRuntimeExports.jsx(St._,{size:"xs",marginBottom:"none",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:me})]}),r.jsxRuntimeExports.jsx(zt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Bt,{}),r.jsxRuntimeExports.jsx(zt.n,{size:"xl"})]}):null,f&&f!==""?r.jsxRuntimeExports.jsx(St._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:f}):null,te?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:n.map((o,i)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{z(t[i%t.length])},onMouseLeave:()=>{z(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[i%t.length]}}),r.jsxRuntimeExports.jsx(St._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},i))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[n.map((o,i)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{z(t[i])},onMouseLeave:()=>{z(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:i*320/t.length+1,y:1,width:320/t.length-2,height:8,className:l===t[i]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[i],...l===t[i]?{}:{stroke:t[i]}}}),r.jsxRuntimeExports.jsx("text",{x:(i+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Qt.numberFormattingFunction(o,"NA")})]},i)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{z(t[n.length])},onMouseLeave:()=>{z(void 0)},x:n.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${l===t[n.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[n.length],...l===t[n.length]?{}:{stroke:t[n.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{Ie(!0)},children:r.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),Y==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&_!==void 0?r.jsxRuntimeExports.jsx(Yt.DetailsModal,{body:H,data:_,setData:N,className:X?.modal}):null,re&&E&&Pe&&ze?r.jsxRuntimeExports.jsx(Xt.Tooltip,{data:re,body:E,xPos:Pe,yPos:ze,backgroundStyle:R?.tooltip,className:X?.tooltip}):null]})}function xo(a){const e=r.compilerRuntimeExports.c(135),{data:t,mapData:g,graphTitle:f,colors:n,sources:y,graphDescription:v,height:s,width:x,footNote:k,mapColorLegendTitle:E,colorDomain:S,choroplethScaleType:ke,radius:Re,scale:Ce,centerPoint:G,padding:De,mapBorderWidth:We,mapNoDataColor:Ue,backgroundColor:Se,showLabels:I,mapBorderColor:Ne,tooltip:H,relativeHeight:R,onSeriesMouseOver:X,isWorldMap:ee,showColorScale:Y,zoomScaleExtend:j,zoomTranslateExtend:P,graphID:ce,highlightedDataPoints:de,onSeriesMouseClick:te,graphDownload:J,dataDownload:Oe,showAntarctica:oe,language:ue,minHeight:me,theme:Me,ariaLabel:qe,resetSelectionOnDoubleClick:K,detailsOnClick:pe,styles:u,classNames:l,mapProjection:z,zoomInteraction:Ge,animate:Ie,dimmedOpacity:xe,customLayers:_,maxRadiusValue:N,timeline:re,collapseColorScaleByDefault:O,dotColor:Pe,highlightedIds:C,mapProperty:ze,dotLegendTitle:M,dotBorderColor:L,labelColor:Z,projectionRotate:ae,rewindCoordinatesInMapData:V}=a,q=g===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":g,$=k===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":k,w=ke===void 0?"threshold":ke,_e=Re===void 0?5:Re,Le=Ce===void 0?.95:Ce,Ve=We===void 0?.5:We,$e=Ue===void 0?we.Colors.light.graphNoData:Ue,B=Se===void 0?!1:Se,Q=I===void 0?!1:I,he=Ne===void 0?we.Colors.light.grays["gray-500"]:Ne,ie=ee===void 0?!0:ee,o=Y===void 0?!0:Y;let i;e[0]!==j?(i=j===void 0?[.8,6]:j,e[0]=j,e[1]=i):i=e[1];const b=i;let D;e[2]!==de?(D=de===void 0?[]:de,e[2]=de,e[3]=D):D=e[3];const m=D,ge=J===void 0?!1:J,fe=Oe===void 0?!1:Oe,Be=oe===void 0?!1:oe,ut=ue===void 0?"en":ue,F=me===void 0?0:me,ne=Me===void 0?"light":Me,mt=K===void 0?!0:K,pt=z===void 0?"naturalEarth":z,xt=Ge===void 0?"button":Ge,He=Ie===void 0?!1:Ie,ht=xe===void 0?.3:xe;let Xe;e[4]!==_?(Xe=_===void 0?[]:_,e[4]=_,e[5]=Xe):Xe=e[5];const gt=Xe;let Ye;e[6]!==re?(Ye=re===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:re,e[6]=re,e[7]=Ye):Ye=e[7];const c=Ye,ft=Pe===void 0?we.Colors.primaryColors["blue-600"]:Pe;let Je;e[8]!==C?(Je=C===void 0?[]:C,e[8]=C,e[9]=Je):Je=e[9];const yt=Je,vt=ze===void 0?"ISO3":ze,jt=Z===void 0?we.Colors.primaryColors["blue-600"]:Z;let Ke;e[10]!==ae?(Ke=ae===void 0?[0,0]:ae,e[10]=ae,e[11]=Ke):Ke=e[11];const bt=Ke,Et=V===void 0?!0:V,[se,Ft]=d.useState(0),[Fe,Tt]=d.useState(0),[T,At]=d.useState(c.autoplay);let Te;if(e[12]!==t||e[13]!==c.dateFormat){let h;e[15]!==c.dateFormat?(h=W=>qt.parse(`${W.date}`,c.dateFormat||"yyyy",new Date).getTime(),e[15]=c.dateFormat,e[16]=h):h=e[16],Te=[...new Set(t.filter(Ro).map(h))],Te.sort(ko),e[12]=t,e[13]=c.dateFormat,e[14]=Te}else Te=e[14];const p=Te,[A,wt]=d.useState(c.autoplay?0:p.length-1),[ye,Wt]=d.useState(void 0),kt=d.useRef(null),Mt=d.useRef(null);let Ze;e[17]!==w||e[18]!==S||e[19]!==n?.length||e[20]!==t?(Ze=S||(w==="categorical"?io.getUniqValue(t,"x"):no.getJenks(t.map(wo),n?.length||4)),e[17]=w,e[18]=S,e[19]=n?.length,e[20]=t,e[21]=Ze):Ze=e[21];const Ae=Ze;let Qe,et;e[22]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{const h=new ResizeObserver(W=>{Ft(W[0].target.clientWidth||620),Tt(W[0].target.clientHeight||480)});return kt.current&&h.observe(kt.current),()=>h.disconnect()},et=[],e[22]=Qe,e[23]=et):(Qe=e[22],et=e[23]),d.useEffect(Qe,et);let tt;e[24]===Symbol.for("react.memo_cache_sentinel")?(tt=h=>{Wt(h)},e[24]=tt):tt=e[24];const ot=d.useEffectEvent(tt);let rt;e[25]!==q||e[26]!==ot?(rt=()=>{typeof q=="string"?ao.fetchAndParseJSON(q).then(W=>{ot(W)}):ot(q)},e[25]=q,e[26]=ot,e[27]=rt):rt=e[27];let at;e[28]!==q?(at=[q],e[28]=q,e[29]=at):at=e[29],d.useEffect(rt,at);let it,nt;e[30]!==T||e[31]!==c.speed||e[32]!==p?(it=()=>{const h=setInterval(()=>{wt(W=>W<p.length-1?W+1:0)},(c.speed||2)*1e3);return T||clearInterval(h),()=>clearInterval(h)},nt=[p,T,c.speed],e[30]=T,e[31]=c.speed,e[32]=p,e[33]=it,e[34]=nt):(it=e[33],nt=e[34]),d.useEffect(it,nt);const Rt=c.dateFormat||"yyyy";let st;e[35]!==A||e[36]!==Rt||e[37]!==c.showOnlyActiveDate||e[38]!==p?(st=It.getSliderMarks(p,A,c.showOnlyActiveDate,Rt),e[35]=A,e[36]=Rt,e[37]=c.showOnlyActiveDate,e[38]=p,e[39]=st):st=e[39];const lt=st,Ct=l?.graphContainer,Dt=u?.graphContainer;let ve;e[40]!==l?.description||e[41]!==l?.title||e[42]!==t||e[43]!==fe||e[44]!==v||e[45]!==ge||e[46]!==f||e[47]!==u?.description||e[48]!==u?.title||e[49]!==x?(ve=f||v||ge||fe?r.jsxRuntimeExports.jsx(ro.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:l?.title,description:l?.description},graphTitle:f,graphDescription:v,width:x,graphDownload:ge?Mt:void 0,dataDownload:fe?t.map(Eo).filter(bo).length>0?t.map(jo).filter(vo):t.filter(yo):null}):null,e[40]=l?.description,e[41]=l?.title,e[42]=t,e[43]=fe,e[44]=v,e[45]=ge,e[46]=f,e[47]=u?.description,e[48]=u?.title,e[49]=x,e[50]=ve):ve=e[50];let je;e[51]!==A||e[52]!==lt||e[53]!==T||e[54]!==c.enabled||e[55]!==p?(je=c.enabled&&p.length>0&<?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{At(!T)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":T?"Click to pause animation":"Click to play animation",children:T?r.jsxRuntimeExports.jsx(Ot.Pause,{}):r.jsxRuntimeExports.jsx(Ot.Play,{})}),r.jsxRuntimeExports.jsx(It.Nr,{min:p[0],max:p[p.length-1],marks:lt,step:null,defaultValue:p[p.length-1],value:p[A],onChangeComplete:h=>{wt(p.indexOf(h))},onChange:h=>{wt(p.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[51]=A,e[52]=lt,e[53]=T,e[54]=c.enabled,e[55]=p,e[56]=je):je=e[56];let be;e[57]!==He||e[58]!==G||e[59]!==w||e[60]!==l||e[61]!==O||e[62]!==n||e[63]!==gt||e[64]!==t||e[65]!==pe||e[66]!==ht||e[67]!==Ae||e[68]!==L||e[69]!==ft||e[70]!==M||e[71]!==s||e[72]!==m||e[73]!==yt||e[74]!==A||e[75]!==ie||e[76]!==jt||e[77]!==he||e[78]!==Ve||e[79]!==E||e[80]!==$e||e[81]!==pt||e[82]!==vt||e[83]!==ye||e[84]!==N||e[85]!==F||e[86]!==te||e[87]!==X||e[88]!==bt||e[89]!==_e||e[90]!==R||e[91]!==mt||e[92]!==Et||e[93]!==Le||e[94]!==Be||e[95]!==o||e[96]!==Q||e[97]!==u||e[98]!==Fe||e[99]!==se||e[100]!==ne||e[101]!==c.dateFormat||e[102]!==c.enabled||e[103]!==H||e[104]!==p||e[105]!==x||e[106]!==xt||e[107]!==b||e[108]!==P?(be=r.jsxRuntimeExports.jsx(_t.GraphArea,{ref:kt,children:se&&Fe&&ye?r.jsxRuntimeExports.jsx(po,{dotColor:ft,data:t.filter(h=>c.enabled?h.date===qt.format(new Date(p[A]),c.dateFormat||"yyyy"):h),mapData:Be?ye:{...ye,features:ye.features.filter(fo)},colorDomain:Ae,width:se,height:Fe,scale:Le,centerPoint:G,colors:n||(w==="categorical"?we.Colors[ne].sequentialColors[`neutralColorsx0${Ae.length}`]:we.Colors[ne].sequentialColors[`neutralColorsx0${Ae.length+1}`]),mapColorLegendTitle:E,radius:_e,categorical:w==="categorical",mapBorderWidth:Ve,mapNoDataColor:$e,mapBorderColor:he,tooltip:H,onSeriesMouseOver:X,showLabels:Q,isWorldMap:ie,showColorScale:o,zoomScaleExtend:b,zoomTranslateExtend:P,onSeriesMouseClick:te,highlightedDataPoints:m,resetSelectionOnDoubleClick:mt,styles:u,classNames:l,zoomInteraction:xt,detailsOnClick:pe,mapProjection:pt||(ie?"naturalEarth":"mercator"),animate:He===!0?{duration:.5,once:!0,amount:.5}:He||{duration:0,once:!0,amount:0},dimmedOpacity:ht,customLayers:gt,maxRadiusValue:dt.checkIfNullOrUndefined(N)?Math.max(...t.map(go).filter(ho)):N,collapseColorScaleByDefault:O,highlightedIds:yt,mapProperty:vt,dotLegendTitle:M,dotBorderColor:L,labelColor:jt,projectionRotate:bt,rewindCoordinatesInMapData:Et}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(F,s||(R?F?(x||se)*R>F?(x||se)*R:F:(x||se)*R:Fe))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Ut.w,{"aria-label":"Loading graph"})})}),e[57]=He,e[58]=G,e[59]=w,e[60]=l,e[61]=O,e[62]=n,e[63]=gt,e[64]=t,e[65]=pe,e[66]=ht,e[67]=Ae,e[68]=L,e[69]=ft,e[70]=M,e[71]=s,e[72]=m,e[73]=yt,e[74]=A,e[75]=ie,e[76]=jt,e[77]=he,e[78]=Ve,e[79]=E,e[80]=$e,e[81]=pt,e[82]=vt,e[83]=ye,e[84]=N,e[85]=F,e[86]=te,e[87]=X,e[88]=bt,e[89]=_e,e[90]=R,e[91]=mt,e[92]=Et,e[93]=Le,e[94]=Be,e[95]=o,e[96]=Q,e[97]=u,e[98]=Fe,e[99]=se,e[100]=ne,e[101]=c.dateFormat,e[102]=c.enabled,e[103]=H,e[104]=p,e[105]=x,e[106]=xt,e[107]=b,e[108]=P,e[109]=be):be=e[109];let Ee;e[110]!==l?.footnote||e[111]!==l?.source||e[112]!==$||e[113]!==y||e[114]!==u?.footnote||e[115]!==u?.source||e[116]!==x?(Ee=y||$?r.jsxRuntimeExports.jsx(oo.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:y,footNote:$,width:x}):null,e[110]=l?.footnote,e[111]=l?.source,e[112]=$,e[113]=y,e[114]=u?.footnote,e[115]=u?.source,e[116]=x,e[117]=Ee):Ee=e[117];let ct;return e[118]!==qe||e[119]!==B||e[120]!==ce||e[121]!==s||e[122]!==ut||e[123]!==F||e[124]!==De||e[125]!==R||e[126]!==Ct||e[127]!==Dt||e[128]!==ve||e[129]!==je||e[130]!==be||e[131]!==Ee||e[132]!==ne||e[133]!==x?(ct=r.jsxRuntimeExports.jsxs(_t.GraphContainer,{className:Ct,style:Dt,id:ce,ref:Mt,"aria-label":qe,backgroundColor:B,theme:ne,language:ut,minHeight:F,width:x,height:s,relativeHeight:R,padding:De,children:[ve,je,be,Ee]}),e[118]=qe,e[119]=B,e[120]=ce,e[121]=s,e[122]=ut,e[123]=F,e[124]=De,e[125]=R,e[126]=Ct,e[127]=Dt,e[128]=ve,e[129]=je,e[130]=be,e[131]=Ee,e[132]=ne,e[133]=x,e[134]=ct):ct=e[134],ct}function ho(a){return a!=null}function go(a){return a.radius}function fo(a){return a.properties.NAME!=="Antarctica"}function yo(a){return a!==void 0}function vo(a){return a!==void 0}function jo(a){return a.data}function bo(a){return a!==void 0}function Eo(a){return a.data}function wo(a){return a.x}function ko(a,e){return a-e}function Ro(a){return a.date}exports.HybridMap=xo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-6v2a2njQ.cjs"),d=require("react"),qt=require("./parse-xYI9yrvL.cjs"),It=require("./getSliderMarks-CIuSoedo.cjs"),Ut=require("./Spinner-jTMOLuw_.cjs"),Pt=require("./index-DQA8q5sC.cjs"),U=require("./index-DLFt97gy.cjs"),St=require("./Typography-Cc_iHQB-.cjs"),Gt=require("./index-C5K--w8d.cjs"),zt=require("./Source-24M277ZQ.cjs"),Ht=require("./index-Dzc_aaI9-C3DbPpy3.cjs"),Xt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./index-sbKVyHS2.cjs"),Yt=require("./DetailsModal-DHttOA80.cjs"),Jt=require("./pow-BnyPO-NX.cjs"),Kt=require("./ordinal-CrsysVE-.cjs"),Zt=require("./threshold-DNsSUf8Q.cjs"),Nt=require("./select-Bnfk0lJx.cjs"),le=require("./proxy-C4-uo6nS.cjs"),dt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Qt=require("./numberFormattingFunction-02t-wJta.cjs"),eo=require("./use-in-view-C3o_ntMv.cjs"),to=require("./index-CoobIWNj.cjs"),oo=require("./GraphFooter.cjs"),ro=require("./GraphHeader.cjs"),we=require("./Colors.cjs"),ao=require("./fetchAndParseData-QTF6tjij.cjs"),_t=require("./GraphContainer-B1EDxJ0S.cjs"),io=require("./getUniqValue-NX8DgwND.cjs"),no=require("./getJenks-BzJvhy_H.cjs");function so(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const g=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,g.get?g:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const lo=so(d);var co="Separator",Lt="horizontal",uo=["horizontal","vertical"],Vt=lo.forwardRef((a,e)=>{const{decorative:t,orientation:g=Lt,...f}=a,n=mo(g)?g:Lt,y=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return r.ae.jsx(Ht.w.div,{"data-orientation":n,...y,...f,ref:e})});Vt.displayName=co;function mo(a){return uo.includes(a)}var $t=Vt;const Bt=d.forwardRef((a,e)=>{const t=r._.c(14);let g,f,n,y;t[0]!==a?({className:g,variant:n,orientation:y,...f}=a,t[0]=a,t[1]=g,t[2]=f,t[3]=n,t[4]=y):(g=t[1],f=t[2],n=t[3],y=t[4]);const v=n===void 0?"dark":n,s=y===void 0?"horizontal":y,x=s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",k=v==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let E;t[5]!==g||t[6]!==x||t[7]!==k?(E=r.mo(x,k,g),t[5]=g,t[6]=x,t[7]=k,t[8]=E):E=t[8];let S;return t[9]!==s||t[10]!==f||t[11]!==e||t[12]!==E?(S=r.ae.jsx($t,{...f,ref:e,orientation:s,className:E}),t[9]=s,t[10]=f,t[11]=e,t[12]=E,t[13]=S):S=t[13],S});Bt.displayName=$t.displayName;function po(a){const{data:e,colors:t,mapData:g,mapColorLegendTitle:f,colorDomain:n,radius:y,height:v,width:s,scale:x,centerPoint:k,tooltip:E,showLabels:S,mapBorderWidth:ke,mapBorderColor:Re,mapNoDataColor:Ce,onSeriesMouseOver:G,showColorScale:De,zoomScaleExtend:We,zoomTranslateExtend:Ue,highlightedDataPoints:Se,onSeriesMouseClick:I,resetSelectionOnDoubleClick:Ne,detailsOnClick:H,styles:R,classNames:X,mapProjection:ee,zoomInteraction:Y,animate:j,dimmedOpacity:P,customLayers:ce,maxRadiusValue:de,categorical:te,dotColor:J,collapseColorScaleByDefault:Oe,highlightedIds:oe,mapProperty:ue,dotLegendTitle:me,dotBorderColor:Me,labelColor:qe,projectionRotate:K,rewindCoordinatesInMapData:pe}=a,u=d.useMemo(()=>pe?U.index_default(g,{reverse:!0}):g,[g,pe]),[l,z]=d.useState(void 0),[Ge,Ie]=d.useState(Oe===void 0?!(s<680):!Oe),xe=d.useRef(null),[_,N]=d.useState(void 0),[re,O]=d.useState(void 0),[Pe,C]=d.useState(void 0),[ze,M]=d.useState(void 0),L=d.useRef(null),Z=eo.useInView(L,{once:j.once,amount:j.amount}),ae=d.useRef(null),V=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?Jt.sqrt().domain([0,de]).range([.25,y]).nice():void 0,q=te?Kt.ordinal().domain(n).range(t):Zt.threshold().domain(n).range(t);d.useEffect(()=>{const o=Nt.select(ae.current),i=Nt.select(L.current),b=m=>{if(Y==="noZoom")return!1;if(Y==="button")return!m.type.includes("wheel");const ge=m.type==="wheel",fe=m.type.startsWith("touch"),Be=m.type==="mousedown"||m.type==="mousemove";return fe?!0:ge?Y==="scroll"?!0:m.ctrlKey:Be&&!m.button&&!m.ctrlKey},D=U.zoom().scaleExtent(We).translateExtent(Ue||[[-20,-20],[s+20,v+20]]).filter(b).on("zoom",({transform:m})=>{o.attr("transform",m)});i.call(D),xe.current=D},[v,s,Y]);const $=U.index_default$1(u),w=Gt.index_default(u),_e=($[2]-$[0])*1.15,Le=($[3]-$[1])*1.15,Ve=s*190/960*360/_e,$e=v*190/678*180/Le,B=x*Math.min(Ve,$e),Q=ee==="mercator"?U.geoMercator().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="equalEarth"?U.geoEqualEarth().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="naturalEarth"?U.geoNaturalEarth1().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):ee==="orthographic"?U.geoOrthographic().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B):U.geoAlbersUsa().rotate(K).center(k||w.geometry.coordinates).translate([s/2,v/2]).scale(B),he=U.geoPath().projection(Q),ie=o=>{if(!L.current||!xe.current)return;Nt.select(L.current).call(xe.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(le.motion.svg,{width:`${s}px`,height:`${v}px`,viewBox:`0 0 ${s} ${v}`,ref:L,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:ae,children:[ce.filter(o=>o.position==="before").map(o=>o.layer),u.features.map((o,i)=>{if(!o.properties?.[ue])return null;const b=he(o);return b?r.jsxRuntimeExports.jsx(le.motion.g,{opacity:l?P:oe.length!==0?oe.indexOf(o.properties[ue])!==-1?1:P:1,children:r.jsxRuntimeExports.jsx("path",{d:b,style:{stroke:Re,strokeWidth:ke,fill:Ce}})},i):null}),r.jsxRuntimeExports.jsxs(to.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const i=u.features.findIndex(m=>o.id===m.properties[ue]);if(i===-1)return null;const b=he(u.features[i]);if(!b)return null;const D=dt.checkIfNullOrUndefined(o.x)?Ce:q(o.x);return r.jsxRuntimeExports.jsx(le.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:l?l===D?1:P:oe.length!==0?oe.indexOf(o.id)!==-1?1:P:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:m=>{O(o),M(m.clientY),C(m.clientX),G?.(o)},onMouseMove:m=>{O(o),M(m.clientY),C(m.clientX)},onMouseLeave:()=>{O(void 0),C(void 0),M(void 0),G?.(void 0)},onClick:()=>{(I||H)&&(Pt.isEqual(_,o)&&Ne?(N(void 0),I?.(void 0)):(N(o),I?.(o)))},children:r.jsxRuntimeExports.jsx(le.motion.path,{d:b,variants:{initial:{fill:D,opacity:0},whileInView:{fill:D,opacity:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},style:{stroke:Re,strokeWidth:ke}},`${o.id}`)},o.id)}),e.filter(o=>!dt.checkIfNullOrUndefined(o.lat)&&!dt.checkIfNullOrUndefined(o.long)).map(o=>{const i=Q([o.long,o.lat])[0]>.8*s?-1:1;return r.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:Se.length!==0?Se.indexOf(o.label||"")!==-1?1:P:1,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:b=>{O(o),M(b.clientY),C(b.clientX),G?.(o)},onMouseMove:b=>{O(o),M(b.clientY),C(b.clientX)},onMouseLeave:()=>{O(void 0),C(void 0),M(void 0),G?.(void 0)},onClick:()=>{(I||H)&&(Pt.isEqual(_,o)&&Ne?(N(void 0),I?.(void 0)):(N(o),I?.(o)))},transform:`translate(${Q([o.long,o.lat])[0]},${Q([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:J,stroke:Me||J},whileInView:{r:V?V(o.radius||0):y,fill:J,stroke:Me||J,transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{r:0,transition:{duration:j.duration}},style:{fillOpacity:.8}}),S&&o.label?r.jsxRuntimeExports.jsx(le.motion.text,{variants:{initial:{opacity:0,x:i*(V?V(o.radius||0):y)},whileInView:{opacity:1,x:i*(V?V(o.radius||0):y),transition:{duration:j.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},y:0,className:r.mo("text-sm",X?.graphObjectValues),style:{textAnchor:i===-1?"end":"start",fill:qe||"#000",...R?.graphObjectValues||{}},dx:i*4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`)})]}),ce.filter(o=>o.position==="after").map(o=>o.layer)]})}),De===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",X?.colorLegend),children:Ge?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ie(!1)},children:r.jsxRuntimeExports.jsx(Ot.X,{})}),r.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:te?void 0:"340px"},children:[me&&me!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:J}}),r.jsxRuntimeExports.jsx(St._,{size:"xs",marginBottom:"none",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:me})]}),r.jsxRuntimeExports.jsx(zt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Bt,{}),r.jsxRuntimeExports.jsx(zt.n,{size:"xl"})]}):null,f&&f!==""?r.jsxRuntimeExports.jsx(St._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:f}):null,te?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:n.map((o,i)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{z(t[i%t.length])},onMouseLeave:()=>{z(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[i%t.length]}}),r.jsxRuntimeExports.jsx(St._,{size:"sm",marginBottom:"none",leading:"none",children:o})]},i))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[n.map((o,i)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{z(t[i])},onMouseLeave:()=>{z(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:i*320/t.length+1,y:1,width:320/t.length-2,height:8,className:l===t[i]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[i],...l===t[i]?{}:{stroke:t[i]}}}),r.jsxRuntimeExports.jsx("text",{x:(i+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Qt.numberFormattingFunction(o,"NA")})]},i)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{z(t[n.length])},onMouseLeave:()=>{z(void 0)},x:n.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${l===t[n.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[n.length],...l===t[n.length]?{}:{stroke:t[n.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{Ie(!0)},children:r.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),Y==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&_!==void 0?r.jsxRuntimeExports.jsx(Yt.DetailsModal,{body:H,data:_,setData:N,className:X?.modal}):null,re&&E&&Pe&&ze?r.jsxRuntimeExports.jsx(Xt.Tooltip,{data:re,body:E,xPos:Pe,yPos:ze,backgroundStyle:R?.tooltip,className:X?.tooltip}):null]})}function xo(a){const e=r.compilerRuntimeExports.c(135),{data:t,mapData:g,graphTitle:f,colors:n,sources:y,graphDescription:v,height:s,width:x,footNote:k,mapColorLegendTitle:E,colorDomain:S,choroplethScaleType:ke,radius:Re,scale:Ce,centerPoint:G,padding:De,mapBorderWidth:We,mapNoDataColor:Ue,backgroundColor:Se,showLabels:I,mapBorderColor:Ne,tooltip:H,relativeHeight:R,onSeriesMouseOver:X,isWorldMap:ee,showColorScale:Y,zoomScaleExtend:j,zoomTranslateExtend:P,graphID:ce,highlightedDataPoints:de,onSeriesMouseClick:te,graphDownload:J,dataDownload:Oe,showAntarctica:oe,language:ue,minHeight:me,theme:Me,ariaLabel:qe,resetSelectionOnDoubleClick:K,detailsOnClick:pe,styles:u,classNames:l,mapProjection:z,zoomInteraction:Ge,animate:Ie,dimmedOpacity:xe,customLayers:_,maxRadiusValue:N,timeline:re,collapseColorScaleByDefault:O,dotColor:Pe,highlightedIds:C,mapProperty:ze,dotLegendTitle:M,dotBorderColor:L,labelColor:Z,projectionRotate:ae,rewindCoordinatesInMapData:V}=a,q=g===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":g,$=k===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":k,w=ke===void 0?"threshold":ke,_e=Re===void 0?5:Re,Le=Ce===void 0?.95:Ce,Ve=We===void 0?.5:We,$e=Ue===void 0?we.Colors.light.graphNoData:Ue,B=Se===void 0?!1:Se,Q=I===void 0?!1:I,he=Ne===void 0?we.Colors.light.grays["gray-500"]:Ne,ie=ee===void 0?!0:ee,o=Y===void 0?!0:Y;let i;e[0]!==j?(i=j===void 0?[.8,6]:j,e[0]=j,e[1]=i):i=e[1];const b=i;let D;e[2]!==de?(D=de===void 0?[]:de,e[2]=de,e[3]=D):D=e[3];const m=D,ge=J===void 0?!1:J,fe=Oe===void 0?!1:Oe,Be=oe===void 0?!1:oe,ut=ue===void 0?"en":ue,F=me===void 0?0:me,ne=Me===void 0?"light":Me,mt=K===void 0?!0:K,pt=z===void 0?"naturalEarth":z,xt=Ge===void 0?"button":Ge,He=Ie===void 0?!1:Ie,ht=xe===void 0?.3:xe;let Xe;e[4]!==_?(Xe=_===void 0?[]:_,e[4]=_,e[5]=Xe):Xe=e[5];const gt=Xe;let Ye;e[6]!==re?(Ye=re===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:re,e[6]=re,e[7]=Ye):Ye=e[7];const c=Ye,ft=Pe===void 0?we.Colors.primaryColors["blue-600"]:Pe;let Je;e[8]!==C?(Je=C===void 0?[]:C,e[8]=C,e[9]=Je):Je=e[9];const yt=Je,vt=ze===void 0?"ISO3":ze,jt=Z===void 0?we.Colors.primaryColors["blue-600"]:Z;let Ke;e[10]!==ae?(Ke=ae===void 0?[0,0]:ae,e[10]=ae,e[11]=Ke):Ke=e[11];const bt=Ke,Et=V===void 0?!0:V,[se,Ft]=d.useState(0),[Fe,Tt]=d.useState(0),[T,At]=d.useState(c.autoplay);let Te;if(e[12]!==t||e[13]!==c.dateFormat){let h;e[15]!==c.dateFormat?(h=W=>qt.parse(`${W.date}`,c.dateFormat||"yyyy",new Date).getTime(),e[15]=c.dateFormat,e[16]=h):h=e[16],Te=[...new Set(t.filter(Ro).map(h))],Te.sort(ko),e[12]=t,e[13]=c.dateFormat,e[14]=Te}else Te=e[14];const p=Te,[A,wt]=d.useState(c.autoplay?0:p.length-1),[ye,Wt]=d.useState(void 0),kt=d.useRef(null),Mt=d.useRef(null);let Ze;e[17]!==w||e[18]!==S||e[19]!==n?.length||e[20]!==t?(Ze=S||(w==="categorical"?io.getUniqValue(t,"x"):no.getJenks(t.map(wo),n?.length||4)),e[17]=w,e[18]=S,e[19]=n?.length,e[20]=t,e[21]=Ze):Ze=e[21];const Ae=Ze;let Qe,et;e[22]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{const h=new ResizeObserver(W=>{Ft(W[0].target.clientWidth||620),Tt(W[0].target.clientHeight||480)});return kt.current&&h.observe(kt.current),()=>h.disconnect()},et=[],e[22]=Qe,e[23]=et):(Qe=e[22],et=e[23]),d.useEffect(Qe,et);let tt;e[24]===Symbol.for("react.memo_cache_sentinel")?(tt=h=>{Wt(h)},e[24]=tt):tt=e[24];const ot=d.useEffectEvent(tt);let rt;e[25]!==q||e[26]!==ot?(rt=()=>{typeof q=="string"?ao.fetchAndParseJSON(q).then(W=>{ot(W)}):ot(q)},e[25]=q,e[26]=ot,e[27]=rt):rt=e[27];let at;e[28]!==q?(at=[q],e[28]=q,e[29]=at):at=e[29],d.useEffect(rt,at);let it,nt;e[30]!==T||e[31]!==c.speed||e[32]!==p?(it=()=>{const h=setInterval(()=>{wt(W=>W<p.length-1?W+1:0)},(c.speed||2)*1e3);return T||clearInterval(h),()=>clearInterval(h)},nt=[p,T,c.speed],e[30]=T,e[31]=c.speed,e[32]=p,e[33]=it,e[34]=nt):(it=e[33],nt=e[34]),d.useEffect(it,nt);const Rt=c.dateFormat||"yyyy";let st;e[35]!==A||e[36]!==Rt||e[37]!==c.showOnlyActiveDate||e[38]!==p?(st=It.getSliderMarks(p,A,c.showOnlyActiveDate,Rt),e[35]=A,e[36]=Rt,e[37]=c.showOnlyActiveDate,e[38]=p,e[39]=st):st=e[39];const lt=st,Ct=l?.graphContainer,Dt=u?.graphContainer;let ve;e[40]!==l?.description||e[41]!==l?.title||e[42]!==t||e[43]!==fe||e[44]!==v||e[45]!==ge||e[46]!==f||e[47]!==u?.description||e[48]!==u?.title||e[49]!==x?(ve=f||v||ge||fe?r.jsxRuntimeExports.jsx(ro.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:l?.title,description:l?.description},graphTitle:f,graphDescription:v,width:x,graphDownload:ge?Mt:void 0,dataDownload:fe?t.map(Eo).filter(bo).length>0?t.map(jo).filter(vo):t.filter(yo):null}):null,e[40]=l?.description,e[41]=l?.title,e[42]=t,e[43]=fe,e[44]=v,e[45]=ge,e[46]=f,e[47]=u?.description,e[48]=u?.title,e[49]=x,e[50]=ve):ve=e[50];let je;e[51]!==A||e[52]!==lt||e[53]!==T||e[54]!==c.enabled||e[55]!==p?(je=c.enabled&&p.length>0&<?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{At(!T)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":T?"Click to pause animation":"Click to play animation",children:T?r.jsxRuntimeExports.jsx(Ot.Pause,{}):r.jsxRuntimeExports.jsx(Ot.Play,{})}),r.jsxRuntimeExports.jsx(It.Nr,{min:p[0],max:p[p.length-1],marks:lt,step:null,defaultValue:p[p.length-1],value:p[A],onChangeComplete:h=>{wt(p.indexOf(h))},onChange:h=>{wt(p.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[51]=A,e[52]=lt,e[53]=T,e[54]=c.enabled,e[55]=p,e[56]=je):je=e[56];let be;e[57]!==He||e[58]!==G||e[59]!==w||e[60]!==l||e[61]!==O||e[62]!==n||e[63]!==gt||e[64]!==t||e[65]!==pe||e[66]!==ht||e[67]!==Ae||e[68]!==L||e[69]!==ft||e[70]!==M||e[71]!==s||e[72]!==m||e[73]!==yt||e[74]!==A||e[75]!==ie||e[76]!==jt||e[77]!==he||e[78]!==Ve||e[79]!==E||e[80]!==$e||e[81]!==pt||e[82]!==vt||e[83]!==ye||e[84]!==N||e[85]!==F||e[86]!==te||e[87]!==X||e[88]!==bt||e[89]!==_e||e[90]!==R||e[91]!==mt||e[92]!==Et||e[93]!==Le||e[94]!==Be||e[95]!==o||e[96]!==Q||e[97]!==u||e[98]!==Fe||e[99]!==se||e[100]!==ne||e[101]!==c.dateFormat||e[102]!==c.enabled||e[103]!==H||e[104]!==p||e[105]!==x||e[106]!==xt||e[107]!==b||e[108]!==P?(be=r.jsxRuntimeExports.jsx(_t.GraphArea,{ref:kt,children:se&&Fe&&ye?r.jsxRuntimeExports.jsx(po,{dotColor:ft,data:t.filter(h=>c.enabled?h.date===qt.format(new Date(p[A]),c.dateFormat||"yyyy"):h),mapData:Be?ye:{...ye,features:ye.features.filter(fo)},colorDomain:Ae,width:se,height:Fe,scale:Le,centerPoint:G,colors:n||(w==="categorical"?we.Colors[ne].sequentialColors[`neutralColorsx0${Ae.length}`]:we.Colors[ne].sequentialColors[`neutralColorsx0${Ae.length+1}`]),mapColorLegendTitle:E,radius:_e,categorical:w==="categorical",mapBorderWidth:Ve,mapNoDataColor:$e,mapBorderColor:he,tooltip:H,onSeriesMouseOver:X,showLabels:Q,isWorldMap:ie,showColorScale:o,zoomScaleExtend:b,zoomTranslateExtend:P,onSeriesMouseClick:te,highlightedDataPoints:m,resetSelectionOnDoubleClick:mt,styles:u,classNames:l,zoomInteraction:xt,detailsOnClick:pe,mapProjection:pt||(ie?"naturalEarth":"mercator"),animate:He===!0?{duration:.5,once:!0,amount:.5}:He||{duration:0,once:!0,amount:0},dimmedOpacity:ht,customLayers:gt,maxRadiusValue:dt.checkIfNullOrUndefined(N)?Math.max(...t.map(go).filter(ho)):N,collapseColorScaleByDefault:O,highlightedIds:yt,mapProperty:vt,dotLegendTitle:M,dotBorderColor:L,labelColor:jt,projectionRotate:bt,rewindCoordinatesInMapData:Et}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(F,s||(R?F?(x||se)*R>F?(x||se)*R:F:(x||se)*R:Fe))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Ut.w,{"aria-label":"Loading graph"})})}),e[57]=He,e[58]=G,e[59]=w,e[60]=l,e[61]=O,e[62]=n,e[63]=gt,e[64]=t,e[65]=pe,e[66]=ht,e[67]=Ae,e[68]=L,e[69]=ft,e[70]=M,e[71]=s,e[72]=m,e[73]=yt,e[74]=A,e[75]=ie,e[76]=jt,e[77]=he,e[78]=Ve,e[79]=E,e[80]=$e,e[81]=pt,e[82]=vt,e[83]=ye,e[84]=N,e[85]=F,e[86]=te,e[87]=X,e[88]=bt,e[89]=_e,e[90]=R,e[91]=mt,e[92]=Et,e[93]=Le,e[94]=Be,e[95]=o,e[96]=Q,e[97]=u,e[98]=Fe,e[99]=se,e[100]=ne,e[101]=c.dateFormat,e[102]=c.enabled,e[103]=H,e[104]=p,e[105]=x,e[106]=xt,e[107]=b,e[108]=P,e[109]=be):be=e[109];let Ee;e[110]!==l?.footnote||e[111]!==l?.source||e[112]!==$||e[113]!==y||e[114]!==u?.footnote||e[115]!==u?.source||e[116]!==x?(Ee=y||$?r.jsxRuntimeExports.jsx(oo.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:y,footNote:$,width:x}):null,e[110]=l?.footnote,e[111]=l?.source,e[112]=$,e[113]=y,e[114]=u?.footnote,e[115]=u?.source,e[116]=x,e[117]=Ee):Ee=e[117];let ct;return e[118]!==qe||e[119]!==B||e[120]!==ce||e[121]!==s||e[122]!==ut||e[123]!==F||e[124]!==De||e[125]!==R||e[126]!==Ct||e[127]!==Dt||e[128]!==ve||e[129]!==je||e[130]!==be||e[131]!==Ee||e[132]!==ne||e[133]!==x?(ct=r.jsxRuntimeExports.jsxs(_t.GraphContainer,{className:Ct,style:Dt,id:ce,ref:Mt,"aria-label":qe,backgroundColor:B,theme:ne,language:ut,minHeight:F,width:x,height:s,relativeHeight:R,padding:De,children:[ve,je,be,Ee]}),e[118]=qe,e[119]=B,e[120]=ce,e[121]=s,e[122]=ut,e[123]=F,e[124]=De,e[125]=R,e[126]=Ct,e[127]=Dt,e[128]=ve,e[129]=je,e[130]=be,e[131]=Ee,e[132]=ne,e[133]=x,e[134]=ct):ct=e[134],ct}function ho(a){return a!=null}function go(a){return a.radius}function fo(a){return a.properties.NAME!=="Antarctica"}function yo(a){return a!==void 0}function vo(a){return a!==void 0}function jo(a){return a.data}function bo(a){return a!==void 0}function Eo(a){return a.data}function wo(a){return a.x}function ko(a,e){return a-e}function Ro(a){return a.date}exports.HybridMap=xo;
|
|
2
2
|
//# sourceMappingURL=HybridMap.cjs.map
|
package/dist/HybridMap.js
CHANGED
|
@@ -6,9 +6,9 @@ import { g as Ze, N as Qe } from "./getSliderMarks-Cvg8zHBU.js";
|
|
|
6
6
|
import { w as to } from "./Spinner--r2RrJV8.js";
|
|
7
7
|
import { i as Pe } from "./index-Bwrro8-q.js";
|
|
8
8
|
import { i as eo, z as oo, a as ao, g as ro, b as io, c as no, d as lo, e as so, f as co } from "./index-Dp_SfsUA.js";
|
|
9
|
-
import { _ as Oe } from "./Typography-
|
|
9
|
+
import { _ as Oe } from "./Typography-CdMGooqp.js";
|
|
10
10
|
import { i as mo } from "./index-DCsFBfJ_.js";
|
|
11
|
-
import { n as Le } from "./Source-
|
|
11
|
+
import { n as Le } from "./Source-Cu9OHOBj.js";
|
|
12
12
|
import { w as po } from "./index-Dzc_aaI9-CG2Ar7l1.js";
|
|
13
13
|
import { T as uo } from "./Tooltip-BRnAz2Gv.js";
|
|
14
14
|
import { X as ho, P as go, e as fo } from "./index-B-4y_iGB.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("react"),R=require("./parse-xYI9yrvL.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-BLa2EfMs.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-B1LWQBmM.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),We=require("./Axis-Jt_tmhxS.cjs"),He=require("./ReferenceLine-M9aP3dj-.cjs"),Ge=require("./RegressionLine-Ci-Dh0w0.cjs"),Pe=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Ue=require("./time-CkcKbhwe.cjs"),Xe=require("./linear-CgUCbw9F.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),A=require("./proxy-C4-uo6nS.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-C3o_ntMv.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),Le=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-DX0t62iF.cjs"),De=require("./GraphContainer-B1EDxJ0S.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:h,width:_,height:Ft,lineColor:b,suffix:S,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Wt,noOfXTicks:he,rightMargin:Ht,leftMargin:D,topMargin:Gt,bottomMargin:dt,tooltip:tt,onSeriesMouseOver:Pt,refValues:ie,minValue:ne,maxValue:ht,animate:o,rtl:ft,strokeWidth:et,showDots:oe,annotations:se,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ae,showIntervalValues:fe,intervalLineStrokeWidth:Yt,intervalLineColors:E,intervalAreaColor:Ut,intervalAreaOpacity:Xt,yAxisTitle:vt,noOfYTicks:ye,minDate:re,maxDate:le,curveType:jt,styles:y,classNames:g,precision:q,customLayers:P}=n,wt=C.useRef(null);let Y;t[0]!==o.amount||t[1]!==o.once?(Y={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Y):Y=t[2];const c=Qe.useInView(wt,Y),[p,ce]=C.useState(!1);let Rt,it;t[3]!==o.duration||t[4]!==p||t[5]!==c?(Rt=()=>{if(c&&!p){const e=setTimeout(()=>{ce(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},it=[c,p,o.duration],t[3]=o.duration,t[4]=p,t[5]=c,t[6]=Rt,t[7]=it):(Rt=t[6],it=t[7]),C.useEffect(Rt,it);const nt=jt==="linear"?Ae.curveLinear:jt==="step"?be.curveStep:jt==="stepAfter"?be.stepAfter:jt==="stepBefore"?be.stepBefore:be.monotoneX,[L,Et]=C.useState(void 0),[U,ue]=C.useState(void 0),[m,x]=C.useState(void 0),Bt=vt?D+30:D;let X;t[8]!==dt||t[9]!==Ht||t[10]!==Bt||t[11]!==Gt?(X={top:Gt,bottom:dt,left:Bt,right:Ht},t[8]=dt,t[9]=Ht,t[10]=Bt,t[11]=Gt,t[12]=X):X=t[12];const j=X,ot=C.useRef(null);let st;t[13]!==l?(st=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=st):st=t[14];const a=Te.orderBy(h.filter(yi).map(st),["date"],["asc"]);let at;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],at=f.map(e),t[15]=l,t[16]=f,t[17]=at}else at=t[17];const Ct=at;let rt;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((Z,ee)=>ee%2===0?R.parse(`${Z}`,l,new Date):Z)}),t[23]=l,t[24]=e):e=t[24],rt=yt.map(e),t[20]=yt,t[21]=l,t[22]=rt}else rt=t[22];const xe=rt,u=_-j.left-j.right,v=Ft-j.top-j.bottom,zt=re?R.parse(`${re}`,l,new Date):a[0].date,me=le?R.parse(`${le}`,l,new Date):a[a.length-1].date,w=G.checkIfNullOrUndefined(ne)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:ne,B=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([zt,me]).range([0,u]);let lt;t[25]!==B||t[26]!==ht?(lt=G.checkIfNullOrUndefined(ht)?B>0?B:0:ht,t[25]=B,t[26]=ht,t[27]=lt):lt=t[27];const r=Xe.linear().domain([w,lt]).range([v,0]).nice(),Jt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(nt),Mt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(nt),Kt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(nt),Qt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(nt),Zt=r.ticks(ye),_t=s.ticks(he);C.useEffect(()=>{const e=Z=>{const ee=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(Z)[0]),0)];Et(ee||a[a.length-1]),Pt?.(ee||a[a.length-1]),x(Z.clientY),ue(Z.clientX)},d=()=>{Et(void 0),ue(void 0),x(void 0),Pt?.(void 0)};ze.select(ot.current).on("mousemove",e).on("mouseout",d)},[s,a,Pt]);const te=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Ot=Se.linearRegressionLine(te);let O;t[28]!==o||t[29]!==v||t[30]!==u||t[31]!==Ct||t[32]!==c||t[33]!==s?(O=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:Ct,width:u,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=u,t[31]=Ct,t[32]=c,t[33]=s,t[34]=O):O=t[34];const At=y?.yAxis?.gridLines,bt=y?.yAxis?.labels;let ct;t[35]!==At||t[36]!==bt?(ct={gridLines:At,labels:bt},t[35]=At,t[36]=bt,t[37]=ct):ct=t[37];const ut=g?.yAxis?.gridLines,Lt=g?.yAxis?.labels;let z;t[38]!==ut||t[39]!==Lt?(z={gridLines:ut,labels:Lt},t[38]=ut,t[39]=Lt,t[40]=z):z=t[40];const kt=r(w<0?0:w),It=r(w<0?0:w),Vt=0-D,Nt=u+j.right,St=w<0?0:w;let k;t[41]!==q||t[42]!==M||t[43]!==S||t[44]!==St?(k=Oe.numberFormattingFunction(St,"NA",q,M,S),t[41]=q,t[42]=M,t[43]=S,t[44]=St,t[45]=k):k=t[45];const Dt=0-D,J=r(w<0?0:w),pe=B<0?"1em":-5;let I;t[46]!==Dt||t[47]!==J||t[48]!==pe?(I={x:Dt,y:J,dx:0,dy:pe},t[46]=Dt,t[47]=J,t[48]=pe,t[49]=I):I=t[49];const de=g?.xAxis?.axis,qt=g?.yAxis?.labels;let K;t[50]!==de||t[51]!==qt?(K={axis:de,label:qt},t[50]=de,t[51]=qt,t[52]=K):K=t[52];const xt=y?.xAxis?.axis,mt=y?.yAxis?.labels;let T;t[53]!==xt||t[54]!==mt?(T={axis:xt,label:mt},t[53]=xt,t[54]=mt,t[55]=T):T=t[55];let pt;t[56]!==kt||t[57]!==It||t[58]!==Vt||t[59]!==Nt||t[60]!==k||t[61]!==I||t[62]!==K||t[63]!==T?(pt=i.jsxRuntimeExports.jsx(We.Axis,{y1:kt,y2:It,x1:Vt,x2:Nt,label:k,labelPos:I,classNames:K,styles:T}),t[56]=kt,t[57]=It,t[58]=Vt,t[59]=Nt,t[60]=k,t[61]=I,t[62]=K,t[63]=T,t[64]=pt):pt=t[64];const $=0-D+15,F=v/2,W=y?.yAxis?.title,H=g?.yAxis?.title;let V;t[65]!==$||t[66]!==F||t[67]!==W||t[68]!==H||t[69]!==vt?(V=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:$,y:F,style:W,className:H,text:vt,rotate90:!0}),t[65]=$,t[66]=F,t[67]=W,t[68]=H,t[69]=vt,t[70]=V):V=t[70];let N;t[71]!==P?(N=P.filter(ri).map(ai),t[71]=P,t[72]=N):N=t[72];let Q;t[73]!==Ut?(Q={fill:Ut},t[73]=Ut,t[74]=Q):Q=t[74];let Tt;t[75]!==o.duration?(Tt={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=Tt):Tt=t[76];let $t;t[77]!==b||t[78]!==et?($t={stroke:b,fill:"none",strokeWidth:et},t[77]=b,t[78]=et,t[79]=$t):$t=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const ke=a.map((e,d)=>i.jsxRuntimeExports.jsx(A.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe?i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ae?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Wt?i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",q,M,S)}):null,fe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",q,M,S)}),i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",q,M,S)})]}):null]})},d));let ve;t[82]!==ke?(ve=i.jsxRuntimeExports.jsx("g",{children:ke}),t[82]=ke,t[83]=ve):ve=t[83];const Ie=se.map((e,d)=>{const Z=Ne.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ee=e.showConnector?{y1:Z.y,x1:Z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:ee,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=gt?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Ot(0),y2:Ot(u),graphHeight:v,graphWidth:u,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==P?(Re=P.filter(si).map(oi),t[88]=P,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==ot||t[92]!==v||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:ot,style:Ee,width:u,height:v}),t[91]=ot,t[92]=v,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==g?.tooltip||t[96]!==U||t[97]!==m||t[98]!==L||t[99]!==y?.tooltip||t[100]!==tt?(Me=L&&tt&&U&&m?i.jsxRuntimeExports.jsx($e.Tooltip,{data:L,body:tt,xPos:U,yPos:m,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[95]=g?.tooltip,t[96]=U,t[97]=m,t[98]=L,t[99]=y?.tooltip,t[100]=tt,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.svg,{width:`${_}px`,height:`${Ft}px`,viewBox:`0 0 ${_} ${Ft}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[O,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:xe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Zt.filter(ci),y:Zt.filter(li).map(e=>r(e)),x1:0-D,x2:u+j.right,styles:ct,classNames:z,suffix:S,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:q}),pt,V]}),i.jsxRuntimeExports.jsx("g",{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),N,i.jsxRuntimeExports.jsx(A.motion.path,{style:Q,exit:Tt,variants:{initial:{opacity:0,d:Qt(a)||""},whileInView:{opacity:Xt,d:Qt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Yt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Kt(a)||"",opacity:1},whileInView:{pathLength:1,d:Kt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(A.motion.path,{style:$t,exit:ge,variants:{initial:{pathLength:0,d:Jt(a)||"",opacity:1},whileInView:{pathLength:1,d:Jt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),L?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(L.date),x2:s(L.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,ve,ie?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:ie.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-D,x2:u+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!G.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(104),{data:h,graphTitle:_,suffix:Ft,sources:b,prefix:S,graphDescription:M,height:l,width:f,footNote:Wt,noOfXTicks:he,dateFormat:Ht,showValues:D,backgroundColor:Gt,padding:dt,lineColor:tt,leftMargin:Pt,rightMargin:ie,topMargin:ne,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:et,relativeHeight:oe,onSeriesMouseOver:se,graphID:yt,minValue:gt,maxValue:ae,regressionLine:fe,showIntervalDots:Yt,showIntervalValues:E,intervalLineStrokeWidth:Ut,intervalLineColors:Xt,intervalAreaColor:vt,intervalAreaOpacity:ye,graphDownload:re,dataDownload:le,animate:jt,language:y,minHeight:g,strokeWidth:q,showDots:P,annotations:wt,customHighlightAreaSettings:Y,theme:c,ariaLabel:p,yAxisTitle:ce,noOfYTicks:Rt,minDate:it,maxDate:nt,colorLegendTitle:L,colorLegendColors:Et,colorLegendDomain:U,curveType:ue,styles:m,classNames:x,precision:Bt,customLayers:X}=n,j=Ft===void 0?"":Ft,ot=S===void 0?"":S,st=he===void 0?10:he,a=Ht===void 0?"yyyy":Ht,at=D===void 0?!1:D,Ct=Gt===void 0?!1:Gt,rt=Pt===void 0?30:Pt,xe=ie===void 0?30:ie,u=ne===void 0?20:ne,v=ht===void 0?25:ht;let zt;t[0]!==ft?(zt=ft===void 0?[]:ft,t[0]=ft,t[1]=zt):zt=t[1];const me=zt;let w;t[2]!==et?(w=et===void 0?[]:et,t[2]=et,t[3]=w):w=t[3];const B=w,s=fe===void 0?!1:fe,lt=Yt===void 0?!1:Yt,r=E===void 0?!1:E,Jt=Ut===void 0?0:Ut;let Mt;t[4]!==Xt?(Mt=Xt===void 0?[Le.Colors.light.grays["gray-500"],Le.Colors.light.grays["gray-500"]]:Xt,t[4]=Xt,t[5]=Mt):Mt=t[5];const Kt=Mt,Qt=vt===void 0?Le.Colors.primaryColors["blue-100"]:vt,Zt=ye===void 0?.4:ye,_t=re===void 0?!1:re,te=le===void 0?!1:le,Ot=jt===void 0?!1:jt,O=y===void 0?"en":y,At=g===void 0?0:g,bt=q===void 0?2:q,ct=P===void 0?!0:P;let ut;t[6]!==wt?(ut=wt===void 0?[]:wt,t[6]=wt,t[7]=ut):ut=t[7];const Lt=ut;let z;t[8]!==Y?(z=Y===void 0?[]:Y,t[8]=Y,t[9]=z):z=t[9];const kt=z,It=c===void 0?"light":c,Vt=Rt===void 0?5:Rt,Nt=ue===void 0?"curve":ue,St=Bt===void 0?2:Bt;let k;t[10]!==X?(k=X===void 0?[]:X,t[10]=X,t[11]=k):k=t[11];const Dt=k,[J,pe]=C.useState(0),[I,de]=C.useState(0),qt=C.useRef(null),K=C.useRef(null);let xt,mt;t[12]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{const Tt=new ResizeObserver($t=>{pe($t[0].target.clientWidth||620),de($t[0].target.clientHeight||480)});return qt.current&&Tt.observe(qt.current),()=>Tt.disconnect()},mt=[],t[12]=xt,t[13]=mt):(xt=t[12],mt=t[13]),C.useEffect(xt,mt);const T=x?.graphContainer,pt=m?.graphContainer;let $;t[14]!==x?.description||t[15]!==x?.title||t[16]!==h||t[17]!==te||t[18]!==M||t[19]!==_t||t[20]!==_||t[21]!==m?.description||t[22]!==m?.title||t[23]!==f?($=_||M||_t||te?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:x?.title,description:x?.description},graphTitle:_,graphDescription:M,width:f,graphDownload:_t?K:void 0,dataDownload:te?h.map(Ei).filter(Ri).length>0?h.map(wi).filter(ji):h.filter(vi):null}):null,t[14]=x?.description,t[15]=x?.title,t[16]=h,t[17]=te,t[18]=M,t[19]=_t,t[20]=_,t[21]=m?.description,t[22]=m?.title,t[23]=f,t[24]=$):$=t[24];let F;t[25]!==x?.colorLegend||t[26]!==Et||t[27]!==U||t[28]!==L||t[29]!==h.length||t[30]!==f?(F=Et&&U&&h.length>0?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:f,colorLegendTitle:L,colors:Et,colorDomain:U,showNAColor:!1,className:x?.colorLegend}):null,t[25]=x?.colorLegend,t[26]=Et,t[27]=U,t[28]=L,t[29]=h.length,t[30]=f,t[31]=F):F=t[31];let W;t[32]!==h.length?(W=h.length===0&&i.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[32]=h.length,t[33]=W):W=t[33];let H;t[34]!==Ot||t[35]!==Lt||t[36]!==v||t[37]!==x||t[38]!==Nt||t[39]!==kt||t[40]!==Dt||t[41]!==h||t[42]!==a||t[43]!==B||t[44]!==Qt||t[45]!==Zt||t[46]!==Kt||t[47]!==Jt||t[48]!==O||t[49]!==rt||t[50]!==tt||t[51]!==nt||t[52]!==ae||t[53]!==it||t[54]!==gt||t[55]!==st||t[56]!==Vt||t[57]!==se||t[58]!==St||t[59]!==ot||t[60]!==me||t[61]!==s||t[62]!==xe||t[63]!==ct||t[64]!==lt||t[65]!==r||t[66]!==at||t[67]!==bt||t[68]!==m||t[69]!==j||t[70]!==I||t[71]!==J||t[72]!==o||t[73]!==u||t[74]!==ce?(H=J&&I&&h.length>0?i.jsxRuntimeExports.jsx(ni,{data:h,lineColor:tt||Le.Colors.primaryColors["blue-600"],width:J,height:I,suffix:j,prefix:ot,dateFormat:a,showValues:at,noOfXTicks:st??ii.getNoOfTicks(J),leftMargin:rt,rightMargin:xe,topMargin:u,bottomMargin:v,tooltip:o,highlightAreaSettings:B,onSeriesMouseOver:se,refValues:me,minValue:gt,maxValue:ae,animate:Ot===!0?{duration:.5,once:!0,amount:.5}:Ot||{duration:0,once:!0,amount:0},rtl:O==="he"||O==="ar",strokeWidth:bt,showDots:ct,annotations:Lt,customHighlightAreaSettings:kt,regressionLine:s,showIntervalDots:lt,showIntervalValues:r,intervalLineStrokeWidth:Jt,intervalLineColors:Kt,intervalAreaColor:Qt,intervalAreaOpacity:Zt,yAxisTitle:ce,noOfYTicks:Vt,minDate:it,maxDate:nt,curveType:Nt,styles:m,classNames:x,precision:St,customLayers:Dt}):null,t[34]=Ot,t[35]=Lt,t[36]=v,t[37]=x,t[38]=Nt,t[39]=kt,t[40]=Dt,t[41]=h,t[42]=a,t[43]=B,t[44]=Qt,t[45]=Zt,t[46]=Kt,t[47]=Jt,t[48]=O,t[49]=rt,t[50]=tt,t[51]=nt,t[52]=ae,t[53]=it,t[54]=gt,t[55]=st,t[56]=Vt,t[57]=se,t[58]=St,t[59]=ot,t[60]=me,t[61]=s,t[62]=xe,t[63]=ct,t[64]=lt,t[65]=r,t[66]=at,t[67]=bt,t[68]=m,t[69]=j,t[70]=I,t[71]=J,t[72]=o,t[73]=u,t[74]=ce,t[75]=H):H=t[75];let V;t[76]!==W||t[77]!==H?(V=i.jsxRuntimeExports.jsxs(De.GraphArea,{ref:qt,children:[W,H]}),t[76]=W,t[77]=H,t[78]=V):V=t[78];let N;t[79]!==x?.footnote||t[80]!==x?.source||t[81]!==Wt||t[82]!==b||t[83]!==m?.footnote||t[84]!==m?.source||t[85]!==f?(N=b||Wt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:b,footNote:Wt,width:f}):null,t[79]=x?.footnote,t[80]=x?.source,t[81]=Wt,t[82]=b,t[83]=m?.footnote,t[84]=m?.source,t[85]=f,t[86]=N):N=t[86];let Q;return t[87]!==p||t[88]!==Ct||t[89]!==yt||t[90]!==l||t[91]!==O||t[92]!==At||t[93]!==dt||t[94]!==oe||t[95]!==T||t[96]!==pt||t[97]!==$||t[98]!==F||t[99]!==V||t[100]!==N||t[101]!==It||t[102]!==f?(Q=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:T,style:pt,id:yt,ref:K,"aria-label":p,backgroundColor:Ct,theme:It,language:O,minHeight:At,width:f,height:l,relativeHeight:oe,padding:dt,children:[$,F,V,N]}),t[87]=p,t[88]=Ct,t[89]=yt,t[90]=l,t[91]=O,t[92]=At,t[93]=dt,t[94]=oe,t[95]=T,t[96]=pt,t[97]=$,t[98]=F,t[99]=V,t[100]=N,t[101]=It,t[102]=f,t[103]=Q):Q=t[103],Q}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("react"),R=require("./parse-xYI9yrvL.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-BLa2EfMs.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-B1LWQBmM.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),We=require("./Axis-Jt_tmhxS.cjs"),He=require("./ReferenceLine-M9aP3dj-.cjs"),Ge=require("./RegressionLine-Ci-Dh0w0.cjs"),Pe=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Ue=require("./time-CkcKbhwe.cjs"),Xe=require("./linear-CgUCbw9F.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),A=require("./proxy-C4-uo6nS.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-C3o_ntMv.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),Le=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-N1eHt3vq.cjs"),De=require("./GraphContainer-B1EDxJ0S.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:h,width:_,height:Ft,lineColor:b,suffix:S,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Wt,noOfXTicks:he,rightMargin:Ht,leftMargin:D,topMargin:Gt,bottomMargin:dt,tooltip:tt,onSeriesMouseOver:Pt,refValues:ie,minValue:ne,maxValue:ht,animate:o,rtl:ft,strokeWidth:et,showDots:oe,annotations:se,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ae,showIntervalValues:fe,intervalLineStrokeWidth:Yt,intervalLineColors:E,intervalAreaColor:Ut,intervalAreaOpacity:Xt,yAxisTitle:vt,noOfYTicks:ye,minDate:re,maxDate:le,curveType:jt,styles:y,classNames:g,precision:q,customLayers:P}=n,wt=C.useRef(null);let Y;t[0]!==o.amount||t[1]!==o.once?(Y={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Y):Y=t[2];const c=Qe.useInView(wt,Y),[p,ce]=C.useState(!1);let Rt,it;t[3]!==o.duration||t[4]!==p||t[5]!==c?(Rt=()=>{if(c&&!p){const e=setTimeout(()=>{ce(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},it=[c,p,o.duration],t[3]=o.duration,t[4]=p,t[5]=c,t[6]=Rt,t[7]=it):(Rt=t[6],it=t[7]),C.useEffect(Rt,it);const nt=jt==="linear"?Ae.curveLinear:jt==="step"?be.curveStep:jt==="stepAfter"?be.stepAfter:jt==="stepBefore"?be.stepBefore:be.monotoneX,[L,Et]=C.useState(void 0),[U,ue]=C.useState(void 0),[m,x]=C.useState(void 0),Bt=vt?D+30:D;let X;t[8]!==dt||t[9]!==Ht||t[10]!==Bt||t[11]!==Gt?(X={top:Gt,bottom:dt,left:Bt,right:Ht},t[8]=dt,t[9]=Ht,t[10]=Bt,t[11]=Gt,t[12]=X):X=t[12];const j=X,ot=C.useRef(null);let st;t[13]!==l?(st=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=st):st=t[14];const a=Te.orderBy(h.filter(yi).map(st),["date"],["asc"]);let at;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],at=f.map(e),t[15]=l,t[16]=f,t[17]=at}else at=t[17];const Ct=at;let rt;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((Z,ee)=>ee%2===0?R.parse(`${Z}`,l,new Date):Z)}),t[23]=l,t[24]=e):e=t[24],rt=yt.map(e),t[20]=yt,t[21]=l,t[22]=rt}else rt=t[22];const xe=rt,u=_-j.left-j.right,v=Ft-j.top-j.bottom,zt=re?R.parse(`${re}`,l,new Date):a[0].date,me=le?R.parse(`${le}`,l,new Date):a[a.length-1].date,w=G.checkIfNullOrUndefined(ne)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:ne,B=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([zt,me]).range([0,u]);let lt;t[25]!==B||t[26]!==ht?(lt=G.checkIfNullOrUndefined(ht)?B>0?B:0:ht,t[25]=B,t[26]=ht,t[27]=lt):lt=t[27];const r=Xe.linear().domain([w,lt]).range([v,0]).nice(),Jt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(nt),Mt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(nt),Kt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(nt),Qt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(nt),Zt=r.ticks(ye),_t=s.ticks(he);C.useEffect(()=>{const e=Z=>{const ee=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(Z)[0]),0)];Et(ee||a[a.length-1]),Pt?.(ee||a[a.length-1]),x(Z.clientY),ue(Z.clientX)},d=()=>{Et(void 0),ue(void 0),x(void 0),Pt?.(void 0)};ze.select(ot.current).on("mousemove",e).on("mouseout",d)},[s,a,Pt]);const te=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Ot=Se.linearRegressionLine(te);let O;t[28]!==o||t[29]!==v||t[30]!==u||t[31]!==Ct||t[32]!==c||t[33]!==s?(O=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:Ct,width:u,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=u,t[31]=Ct,t[32]=c,t[33]=s,t[34]=O):O=t[34];const At=y?.yAxis?.gridLines,bt=y?.yAxis?.labels;let ct;t[35]!==At||t[36]!==bt?(ct={gridLines:At,labels:bt},t[35]=At,t[36]=bt,t[37]=ct):ct=t[37];const ut=g?.yAxis?.gridLines,Lt=g?.yAxis?.labels;let z;t[38]!==ut||t[39]!==Lt?(z={gridLines:ut,labels:Lt},t[38]=ut,t[39]=Lt,t[40]=z):z=t[40];const kt=r(w<0?0:w),It=r(w<0?0:w),Vt=0-D,Nt=u+j.right,St=w<0?0:w;let k;t[41]!==q||t[42]!==M||t[43]!==S||t[44]!==St?(k=Oe.numberFormattingFunction(St,"NA",q,M,S),t[41]=q,t[42]=M,t[43]=S,t[44]=St,t[45]=k):k=t[45];const Dt=0-D,J=r(w<0?0:w),pe=B<0?"1em":-5;let I;t[46]!==Dt||t[47]!==J||t[48]!==pe?(I={x:Dt,y:J,dx:0,dy:pe},t[46]=Dt,t[47]=J,t[48]=pe,t[49]=I):I=t[49];const de=g?.xAxis?.axis,qt=g?.yAxis?.labels;let K;t[50]!==de||t[51]!==qt?(K={axis:de,label:qt},t[50]=de,t[51]=qt,t[52]=K):K=t[52];const xt=y?.xAxis?.axis,mt=y?.yAxis?.labels;let T;t[53]!==xt||t[54]!==mt?(T={axis:xt,label:mt},t[53]=xt,t[54]=mt,t[55]=T):T=t[55];let pt;t[56]!==kt||t[57]!==It||t[58]!==Vt||t[59]!==Nt||t[60]!==k||t[61]!==I||t[62]!==K||t[63]!==T?(pt=i.jsxRuntimeExports.jsx(We.Axis,{y1:kt,y2:It,x1:Vt,x2:Nt,label:k,labelPos:I,classNames:K,styles:T}),t[56]=kt,t[57]=It,t[58]=Vt,t[59]=Nt,t[60]=k,t[61]=I,t[62]=K,t[63]=T,t[64]=pt):pt=t[64];const $=0-D+15,F=v/2,W=y?.yAxis?.title,H=g?.yAxis?.title;let V;t[65]!==$||t[66]!==F||t[67]!==W||t[68]!==H||t[69]!==vt?(V=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:$,y:F,style:W,className:H,text:vt,rotate90:!0}),t[65]=$,t[66]=F,t[67]=W,t[68]=H,t[69]=vt,t[70]=V):V=t[70];let N;t[71]!==P?(N=P.filter(ri).map(ai),t[71]=P,t[72]=N):N=t[72];let Q;t[73]!==Ut?(Q={fill:Ut},t[73]=Ut,t[74]=Q):Q=t[74];let Tt;t[75]!==o.duration?(Tt={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=Tt):Tt=t[76];let $t;t[77]!==b||t[78]!==et?($t={stroke:b,fill:"none",strokeWidth:et},t[77]=b,t[78]=et,t[79]=$t):$t=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const ke=a.map((e,d)=>i.jsxRuntimeExports.jsx(A.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe?i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ae?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Wt?i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",q,M,S)}):null,fe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",q,M,S)}),i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",q,M,S)})]}):null]})},d));let ve;t[82]!==ke?(ve=i.jsxRuntimeExports.jsx("g",{children:ke}),t[82]=ke,t[83]=ve):ve=t[83];const Ie=se.map((e,d)=>{const Z=Ne.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ee=e.showConnector?{y1:Z.y,x1:Z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:ee,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=gt?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Ot(0),y2:Ot(u),graphHeight:v,graphWidth:u,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==P?(Re=P.filter(si).map(oi),t[88]=P,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==ot||t[92]!==v||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:ot,style:Ee,width:u,height:v}),t[91]=ot,t[92]=v,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==g?.tooltip||t[96]!==U||t[97]!==m||t[98]!==L||t[99]!==y?.tooltip||t[100]!==tt?(Me=L&&tt&&U&&m?i.jsxRuntimeExports.jsx($e.Tooltip,{data:L,body:tt,xPos:U,yPos:m,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[95]=g?.tooltip,t[96]=U,t[97]=m,t[98]=L,t[99]=y?.tooltip,t[100]=tt,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.svg,{width:`${_}px`,height:`${Ft}px`,viewBox:`0 0 ${_} ${Ft}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[O,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:xe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Zt.filter(ci),y:Zt.filter(li).map(e=>r(e)),x1:0-D,x2:u+j.right,styles:ct,classNames:z,suffix:S,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:q}),pt,V]}),i.jsxRuntimeExports.jsx("g",{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),N,i.jsxRuntimeExports.jsx(A.motion.path,{style:Q,exit:Tt,variants:{initial:{opacity:0,d:Qt(a)||""},whileInView:{opacity:Xt,d:Qt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Yt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Kt(a)||"",opacity:1},whileInView:{pathLength:1,d:Kt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(A.motion.path,{style:$t,exit:ge,variants:{initial:{pathLength:0,d:Jt(a)||"",opacity:1},whileInView:{pathLength:1,d:Jt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),L?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(L.date),x2:s(L.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,ve,ie?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:ie.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-D,x2:u+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!G.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(104),{data:h,graphTitle:_,suffix:Ft,sources:b,prefix:S,graphDescription:M,height:l,width:f,footNote:Wt,noOfXTicks:he,dateFormat:Ht,showValues:D,backgroundColor:Gt,padding:dt,lineColor:tt,leftMargin:Pt,rightMargin:ie,topMargin:ne,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:et,relativeHeight:oe,onSeriesMouseOver:se,graphID:yt,minValue:gt,maxValue:ae,regressionLine:fe,showIntervalDots:Yt,showIntervalValues:E,intervalLineStrokeWidth:Ut,intervalLineColors:Xt,intervalAreaColor:vt,intervalAreaOpacity:ye,graphDownload:re,dataDownload:le,animate:jt,language:y,minHeight:g,strokeWidth:q,showDots:P,annotations:wt,customHighlightAreaSettings:Y,theme:c,ariaLabel:p,yAxisTitle:ce,noOfYTicks:Rt,minDate:it,maxDate:nt,colorLegendTitle:L,colorLegendColors:Et,colorLegendDomain:U,curveType:ue,styles:m,classNames:x,precision:Bt,customLayers:X}=n,j=Ft===void 0?"":Ft,ot=S===void 0?"":S,st=he===void 0?10:he,a=Ht===void 0?"yyyy":Ht,at=D===void 0?!1:D,Ct=Gt===void 0?!1:Gt,rt=Pt===void 0?30:Pt,xe=ie===void 0?30:ie,u=ne===void 0?20:ne,v=ht===void 0?25:ht;let zt;t[0]!==ft?(zt=ft===void 0?[]:ft,t[0]=ft,t[1]=zt):zt=t[1];const me=zt;let w;t[2]!==et?(w=et===void 0?[]:et,t[2]=et,t[3]=w):w=t[3];const B=w,s=fe===void 0?!1:fe,lt=Yt===void 0?!1:Yt,r=E===void 0?!1:E,Jt=Ut===void 0?0:Ut;let Mt;t[4]!==Xt?(Mt=Xt===void 0?[Le.Colors.light.grays["gray-500"],Le.Colors.light.grays["gray-500"]]:Xt,t[4]=Xt,t[5]=Mt):Mt=t[5];const Kt=Mt,Qt=vt===void 0?Le.Colors.primaryColors["blue-100"]:vt,Zt=ye===void 0?.4:ye,_t=re===void 0?!1:re,te=le===void 0?!1:le,Ot=jt===void 0?!1:jt,O=y===void 0?"en":y,At=g===void 0?0:g,bt=q===void 0?2:q,ct=P===void 0?!0:P;let ut;t[6]!==wt?(ut=wt===void 0?[]:wt,t[6]=wt,t[7]=ut):ut=t[7];const Lt=ut;let z;t[8]!==Y?(z=Y===void 0?[]:Y,t[8]=Y,t[9]=z):z=t[9];const kt=z,It=c===void 0?"light":c,Vt=Rt===void 0?5:Rt,Nt=ue===void 0?"curve":ue,St=Bt===void 0?2:Bt;let k;t[10]!==X?(k=X===void 0?[]:X,t[10]=X,t[11]=k):k=t[11];const Dt=k,[J,pe]=C.useState(0),[I,de]=C.useState(0),qt=C.useRef(null),K=C.useRef(null);let xt,mt;t[12]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{const Tt=new ResizeObserver($t=>{pe($t[0].target.clientWidth||620),de($t[0].target.clientHeight||480)});return qt.current&&Tt.observe(qt.current),()=>Tt.disconnect()},mt=[],t[12]=xt,t[13]=mt):(xt=t[12],mt=t[13]),C.useEffect(xt,mt);const T=x?.graphContainer,pt=m?.graphContainer;let $;t[14]!==x?.description||t[15]!==x?.title||t[16]!==h||t[17]!==te||t[18]!==M||t[19]!==_t||t[20]!==_||t[21]!==m?.description||t[22]!==m?.title||t[23]!==f?($=_||M||_t||te?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:x?.title,description:x?.description},graphTitle:_,graphDescription:M,width:f,graphDownload:_t?K:void 0,dataDownload:te?h.map(Ei).filter(Ri).length>0?h.map(wi).filter(ji):h.filter(vi):null}):null,t[14]=x?.description,t[15]=x?.title,t[16]=h,t[17]=te,t[18]=M,t[19]=_t,t[20]=_,t[21]=m?.description,t[22]=m?.title,t[23]=f,t[24]=$):$=t[24];let F;t[25]!==x?.colorLegend||t[26]!==Et||t[27]!==U||t[28]!==L||t[29]!==h.length||t[30]!==f?(F=Et&&U&&h.length>0?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:f,colorLegendTitle:L,colors:Et,colorDomain:U,showNAColor:!1,className:x?.colorLegend}):null,t[25]=x?.colorLegend,t[26]=Et,t[27]=U,t[28]=L,t[29]=h.length,t[30]=f,t[31]=F):F=t[31];let W;t[32]!==h.length?(W=h.length===0&&i.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[32]=h.length,t[33]=W):W=t[33];let H;t[34]!==Ot||t[35]!==Lt||t[36]!==v||t[37]!==x||t[38]!==Nt||t[39]!==kt||t[40]!==Dt||t[41]!==h||t[42]!==a||t[43]!==B||t[44]!==Qt||t[45]!==Zt||t[46]!==Kt||t[47]!==Jt||t[48]!==O||t[49]!==rt||t[50]!==tt||t[51]!==nt||t[52]!==ae||t[53]!==it||t[54]!==gt||t[55]!==st||t[56]!==Vt||t[57]!==se||t[58]!==St||t[59]!==ot||t[60]!==me||t[61]!==s||t[62]!==xe||t[63]!==ct||t[64]!==lt||t[65]!==r||t[66]!==at||t[67]!==bt||t[68]!==m||t[69]!==j||t[70]!==I||t[71]!==J||t[72]!==o||t[73]!==u||t[74]!==ce?(H=J&&I&&h.length>0?i.jsxRuntimeExports.jsx(ni,{data:h,lineColor:tt||Le.Colors.primaryColors["blue-600"],width:J,height:I,suffix:j,prefix:ot,dateFormat:a,showValues:at,noOfXTicks:st??ii.getNoOfTicks(J),leftMargin:rt,rightMargin:xe,topMargin:u,bottomMargin:v,tooltip:o,highlightAreaSettings:B,onSeriesMouseOver:se,refValues:me,minValue:gt,maxValue:ae,animate:Ot===!0?{duration:.5,once:!0,amount:.5}:Ot||{duration:0,once:!0,amount:0},rtl:O==="he"||O==="ar",strokeWidth:bt,showDots:ct,annotations:Lt,customHighlightAreaSettings:kt,regressionLine:s,showIntervalDots:lt,showIntervalValues:r,intervalLineStrokeWidth:Jt,intervalLineColors:Kt,intervalAreaColor:Qt,intervalAreaOpacity:Zt,yAxisTitle:ce,noOfYTicks:Vt,minDate:it,maxDate:nt,curveType:Nt,styles:m,classNames:x,precision:St,customLayers:Dt}):null,t[34]=Ot,t[35]=Lt,t[36]=v,t[37]=x,t[38]=Nt,t[39]=kt,t[40]=Dt,t[41]=h,t[42]=a,t[43]=B,t[44]=Qt,t[45]=Zt,t[46]=Kt,t[47]=Jt,t[48]=O,t[49]=rt,t[50]=tt,t[51]=nt,t[52]=ae,t[53]=it,t[54]=gt,t[55]=st,t[56]=Vt,t[57]=se,t[58]=St,t[59]=ot,t[60]=me,t[61]=s,t[62]=xe,t[63]=ct,t[64]=lt,t[65]=r,t[66]=at,t[67]=bt,t[68]=m,t[69]=j,t[70]=I,t[71]=J,t[72]=o,t[73]=u,t[74]=ce,t[75]=H):H=t[75];let V;t[76]!==W||t[77]!==H?(V=i.jsxRuntimeExports.jsxs(De.GraphArea,{ref:qt,children:[W,H]}),t[76]=W,t[77]=H,t[78]=V):V=t[78];let N;t[79]!==x?.footnote||t[80]!==x?.source||t[81]!==Wt||t[82]!==b||t[83]!==m?.footnote||t[84]!==m?.source||t[85]!==f?(N=b||Wt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:b,footNote:Wt,width:f}):null,t[79]=x?.footnote,t[80]=x?.source,t[81]=Wt,t[82]=b,t[83]=m?.footnote,t[84]=m?.source,t[85]=f,t[86]=N):N=t[86];let Q;return t[87]!==p||t[88]!==Ct||t[89]!==yt||t[90]!==l||t[91]!==O||t[92]!==At||t[93]!==dt||t[94]!==oe||t[95]!==T||t[96]!==pt||t[97]!==$||t[98]!==F||t[99]!==V||t[100]!==N||t[101]!==It||t[102]!==f?(Q=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:T,style:pt,id:yt,ref:K,"aria-label":p,backgroundColor:Ct,theme:It,language:O,minHeight:At,width:f,height:l,relativeHeight:oe,padding:dt,children:[$,F,V,N]}),t[87]=p,t[88]=Ct,t[89]=yt,t[90]=l,t[91]=O,t[92]=At,t[93]=dt,t[94]=oe,t[95]=T,t[96]=pt,t[97]=$,t[98]=F,t[99]=V,t[100]=N,t[101]=It,t[102]=f,t[103]=Q):Q=t[103],Q}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
|
|
2
2
|
//# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
|
|
@@ -27,7 +27,7 @@ import { GraphFooter as ci } from "./GraphFooter.js";
|
|
|
27
27
|
import { GraphHeader as mi } from "./GraphHeader.js";
|
|
28
28
|
import { Colors as Ve } from "./Colors.js";
|
|
29
29
|
import { ColorLegend as fi } from "./ColorLegend.js";
|
|
30
|
-
import { E as ui } from "./EmptyState-
|
|
30
|
+
import { E as ui } from "./EmptyState-dScPFkLy.js";
|
|
31
31
|
import { a as hi, G as yi } from "./GraphContainer-CF6ws3pd.js";
|
|
32
32
|
import { g as pi } from "./getNoOfTicks-CpmRjcRF.js";
|
|
33
33
|
function xi(i) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("./Typography-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("./Typography-Cc_iHQB-.cjs"),y=require("./numberFormattingFunction-02t-wJta.cjs");function N(E){const e=t.compilerRuntimeExports.c(27),{colorLegendTitle:f,colorDomain:s,colors:b,width:h,className:p}=E;let l;e[0]!==p?(l=t.mo("flex gap-0 flex-wrap justify-center leading-0 pb-3",p),e[0]=p,e[1]=l):l=e[1];const g=h?`${h}px`:"none";let n;e[2]!==g?(n={maxWidth:g},e[2]=g,e[3]=n):n=e[3];let i;e[4]!==f?(i=f&&f!==""?t.jsxRuntimeExports.jsx(w._,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:f}):null,e[4]=f,e[5]=i):i=e[5];const j=`linear-gradient(90deg, ${b[0]} 0%, ${b[1]} 100%)`;let r;e[6]!==j?(r=t.jsxRuntimeExports.jsx("div",{className:"h-4 mb-1 w-full min-w-[360px]",style:{background:j}}),e[6]=j,e[7]=r):r=e[7];let o;e[8]!==s[0]?(o=y.numberFormattingFunction(s[0],"NA",2,"",""),e[8]=s[0],e[9]=o):o=e[9];let m;e[10]!==o?(m=t.jsxRuntimeExports.jsx(w._,{marginBottom:"none",size:"sm",children:o}),e[10]=o,e[11]=m):m=e[11];let a;e[12]!==s[1]?(a=y.numberFormattingFunction(s[1],"NA",2,"",""),e[12]=s[1],e[13]=a):a=e[13];let x;e[14]!==a?(x=t.jsxRuntimeExports.jsx(w._,{marginBottom:"none",size:"sm",children:a}),e[14]=a,e[15]=x):x=e[15];let c;e[16]!==m||e[17]!==x?(c=t.jsxRuntimeExports.jsxs("div",{className:"flex justify-between w-full min-w-[360px]",children:[m,x]}),e[16]=m,e[17]=x,e[18]=c):c=e[18];let u;e[19]!==c||e[20]!==r?(u=t.jsxRuntimeExports.jsxs("div",{className:"flex gap-0 flex-wrap justify-center w-full min-w-[360px] leading-0",children:[r,c]}),e[19]=c,e[20]=r,e[21]=u):u=e[21];let d;return e[22]!==l||e[23]!==u||e[24]!==n||e[25]!==i?(d=t.jsxRuntimeExports.jsxs("div",{className:l,style:n,"aria-label":"Color legend",children:[i,u]}),e[22]=l,e[23]=u,e[24]=n,e[25]=i,e[26]=d):d=e[26],d}exports.LinearColorLegend=N;
|
|
2
2
|
//# sourceMappingURL=LinearColorLegend.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as v, m as $, j as l } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
-
import { _ as w } from "./Typography-
|
|
2
|
+
import { _ as w } from "./Typography-CdMGooqp.js";
|
|
3
3
|
import { n as b } from "./numberFormattingFunction-14YCbkN2.js";
|
|
4
4
|
function A(y) {
|
|
5
5
|
const e = v.c(27), {
|
|
@@ -498,6 +498,7 @@ declare interface GraphSettingsDataType {
|
|
|
498
498
|
hideAxisLine?: boolean;
|
|
499
499
|
projectionRotate?: [number, number] | [number, number, number];
|
|
500
500
|
rewindCoordinatesInMapData?: boolean;
|
|
501
|
+
circularBoundary?: boolean;
|
|
501
502
|
}
|
|
502
503
|
|
|
503
504
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -517,6 +517,7 @@ declare interface GraphSettingsDataType {
|
|
|
517
517
|
hideAxisLine?: boolean;
|
|
518
518
|
projectionRotate?: [number, number] | [number, number, number];
|
|
519
519
|
rewindCoordinatesInMapData?: boolean;
|
|
520
|
+
circularBoundary?: boolean;
|
|
520
521
|
}
|
|
521
522
|
|
|
522
523
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),b=require("./parse-xYI9yrvL.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Ie=require("./numberFormattingFunction-02t-wJta.cjs"),Ye=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Se=require("./customArea-B1LWQBmM.cjs"),Xe=require("./AxisTitle-DV4n0RxE.cjs"),Fe=require("./Axis-Jt_tmhxS.cjs"),Pe=require("./XTicksAndGridLines-CekrPykD.cjs"),Be=require("./ReferenceLine-M9aP3dj-.cjs"),ze=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Je=require("./index-D69M6klB.cjs"),B=require("./Colors.cjs"),Ee=require("./uniqBy-O05lp2S5.cjs"),ke=require("./init-DU0ybBc_.cjs"),Ke=require("./time-CkcKbhwe.cjs"),Qe=require("./linear-CgUCbw9F.cjs"),Ze=require("./delaunay-rcy0HhZi.cjs"),$e=require("./line-DaEMhXmx.cjs"),Ae=require("./step-BZ3C8QFW.cjs"),_e=require("./select-Bnfk0lJx.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),tn=require("./pointer-Dkq5NV1q.cjs"),en=require("./use-in-view-C3o_ntMv.cjs"),nn=require("./GraphFooter.cjs"),on=require("./GraphHeader.cjs"),rn=require("./EmptyState-DX0t62iF.cjs"),sn=require("./ColorLegendWithMouseOver.cjs"),Ve=require("./GraphContainer-B1EDxJ0S.cjs"),ln=require("./getNoOfTicks-C_1CFXv_.cjs");function an(e,t){return Array.from(t,i=>e[i])}function cn(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[i]=t;if(i&&i.length!==2||t.length>1){const O=Uint32Array.from(e,(E,c)=>c);return t.length>1?(t=t.map(E=>e.map(E)),O.sort((E,c)=>{for(const r of t){const wt=Me(r[E],r[c]);if(wt)return wt}})):(i=e.map(i),O.sort((E,c)=>Me(i[E],i[c]))),an(e,O)}return e.sort(un(i))}function un(e=ke.ascending){if(e===ke.ascending)return Me;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,i)=>{const O=e(t,i);return O||O===0?O:(e(i,i)===0)-(e(t,t)===0)}}function Me(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}function fn(e){const t=s.compilerRuntimeExports.c(128),{data:i,width:O,height:E,lineColors:c,dateFormat:r,noOfXTicks:wt,rightMargin:st,topMargin:Pt,bottomMargin:lt,suffix:U,prefix:g,leftMargin:C,tooltip:bt,onSeriesMouseOver:at,refValues:ct,highlightAreaSettings:Bt,minValue:z,maxValue:Ct,highlightedLines:H,animate:l,rtl:J,strokeWidth:T,showDots:se,annotations:Rt,customHighlightAreaSettings:zt,yAxisTitle:K,noOfYTicks:Jt,minDate:Kt,maxDate:Qt,curveType:ut,styles:j,colorDomain:L,selectedColor:At,classNames:R,showLabels:he,dimmedOpacity:q,precision:Q,naLabel:ge,customLayers:Z}=e,Et=A.useRef(null);let _;t[0]!==l.amount||t[1]!==l.once?(_={once:l.once,amount:l.amount},t[0]=l.amount,t[1]=l.once,t[2]=_):_=t[2];const m=en.useInView(Et,_),[S,le]=A.useState(!1);let kt,ft;t[3]!==l.duration||t[4]!==S||t[5]!==m?(kt=()=>{if(m&&!S){const n=setTimeout(()=>{le(!0)},(l.duration+.5)*1e3);return()=>clearTimeout(n)}},ft=[m,S,l.duration],t[3]=l.duration,t[4]=S,t[5]=m,t[6]=kt,t[7]=ft):(kt=t[6],ft=t[7]),A.useEffect(kt,ft);const ae=ut==="linear"?$e.curveLinear:ut==="step"?Ae.curveStep:ut==="stepAfter"?Ae.stepAfter:ut==="stepBefore"?Ae.stepBefore:Ae.monotoneX;let Nt;t[8]!==r?(Nt=n=>({...n,date:b.parse(`${n.date}`,r,new Date)}),t[8]=r,t[9]=Nt):Nt=t[9];const a=Te.orderBy(i.map(Nt),["date"],["asc"]).filter(Wn),d=Ee.uniqBy(a,"label",!0);let Dt;t[10]!==r?(Dt=n=>b.parse(`${n}`,r,new Date),t[10]=r,t[11]=Dt):Dt=t[11];const Zt=cn(Ee.uniqBy(i,"date",!0).map(Dt),Gn),[x,mt]=A.useState(void 0),[xt,tt]=A.useState(void 0),[pt,et]=A.useState(void 0),Lt=K?C+30:C;let dt;t[12]!==lt||t[13]!==st||t[14]!==Lt||t[15]!==Pt?(dt={top:Pt,bottom:lt,left:Lt,right:st},t[12]=lt,t[13]=st,t[14]=Lt,t[15]=Pt,t[16]=dt):dt=t[16];const h=dt,ce=A.useRef(null),ue=d.map(n=>Te.orderBy(a.filter(o=>o.label==n),["date"],["asc"]));let ht;if(t[17]!==r||t[18]!==Bt){let n;t[20]!==r?(n=o=>({...o,coordinates:[o.coordinates[0]===null?null:b.parse(`${o.coordinates[0]}`,r,new Date),o.coordinates[1]===null?null:b.parse(`${o.coordinates[1]}`,r,new Date)]}),t[20]=r,t[21]=n):n=t[21],ht=Bt.map(n),t[17]=r,t[18]=Bt,t[19]=ht}else ht=t[19];const qt=ht;let gt;if(t[22]!==zt||t[23]!==r){let n;t[25]!==r?(n=o=>({...o,coordinates:o.coordinates.map((y,Xt)=>Xt%2===0?b.parse(`${y}`,r,new Date):y)}),t[25]=r,t[26]=n):n=t[26],gt=zt.map(n),t[22]=zt,t[23]=r,t[24]=gt}else gt=t[24];const _t=gt,p=O-h.left-h.right,k=E-h.top-h.bottom,fe=Kt?b.parse(`${Kt}`,r,new Date):Zt[0],te=Qt?b.parse(`${Qt}`,r,new Date):Zt[Zt.length-1],w=v.checkIfNullOrUndefined(z)?Math.min(...a.map(Hn).filter(Un))?Math.min(...a.map(Vn).filter($n))>0?0:Math.min(...a.map(In).filter(Tn)):0:z,G=Math.max(...a.map(Mn).filter(Sn))?Math.max(...a.map(qn).filter(Ln)):0,u=Ke.time().domain([fe,te]).range([0,p]);let nt;t[27]!==w||t[28]!==z?(nt=v.checkIfNullOrUndefined(z)?w:z,t[27]=w,t[28]=z,t[29]=nt):nt=t[29];let M;t[30]!==G||t[31]!==Ct?(M=v.checkIfNullOrUndefined(Ct)?G>0?G:0:Ct,t[30]=G,t[31]=Ct,t[32]=M):M=t[32];const f=Qe.linear().domain([nt,M]).range([k,0]).nice(),me=Ze.Delaunay.from(a.filter(Dn),n=>u(n.date),n=>f(n.y)).voronoi([0,0,p<0?0:p,k<0?0:k]),St=$e.line().x(n=>u(n.date)).y(n=>f(n.y)).curve(ae),Mt=f.ticks(Jt),ee=u.ticks(wt);A.useEffect(()=>{const n=y=>{const Xt=a[ke.bisectCenter(a.map(Nn),u.invert(tn.pointer(y)[0]),0)];mt(Xt||a[a.length-1]),et(y.clientY),tt(y.clientX),at?.(Xt||a[a.length-1])},o=()=>{mt(void 0),tt(void 0),et(void 0)};_e.select(ce.current).on("mousemove",n).on("mouseout",o),at?.(void 0)},[u,a,at]);let ot;t[33]!==l||t[34]!==k||t[35]!==p||t[36]!==qt||t[37]!==m||t[38]!==u?(ot=s.jsxRuntimeExports.jsx(Je.HighlightArea,{areaSettings:qt,width:p,height:k,scale:u,animate:l,isInView:m}),t[33]=l,t[34]=k,t[35]=p,t[36]=qt,t[37]=m,t[38]=u,t[39]=ot):ot=t[39];const Tt=j?.yAxis?.gridLines,N=j?.yAxis?.labels;let yt;t[40]!==Tt||t[41]!==N?(yt={gridLines:Tt,labels:N},t[40]=Tt,t[41]=N,t[42]=yt):yt=t[42];const It=R?.yAxis?.gridLines,$t=R?.yAxis?.labels;let vt;t[43]!==It||t[44]!==$t?(vt={gridLines:It,labels:$t},t[43]=It,t[44]=$t,t[45]=vt):vt=t[45];const Ot=f(w<0?0:w),Vt=f(w<0?0:w),Ut=0-C,it=p+h.right,xe=w<0?0:w;let I;t[46]!==Q||t[47]!==g||t[48]!==U||t[49]!==xe?(I=Ie.numberFormattingFunction(xe,"NA",Q,g,U),t[46]=Q,t[47]=g,t[48]=U,t[49]=xe,t[50]=I):I=t[50];const pe=0-C,Ht=f(w<0?0:w),de=G<0?"1em":-5;let W;t[51]!==pe||t[52]!==Ht||t[53]!==de?(W={x:pe,y:Ht,dx:0,dy:de},t[51]=pe,t[52]=Ht,t[53]=de,t[54]=W):W=t[54];const ne=R?.xAxis?.axis,jt=R?.yAxis?.labels;let $;t[55]!==ne||t[56]!==jt?($={axis:ne,label:jt},t[55]=ne,t[56]=jt,t[57]=$):$=t[57];const Gt=j?.xAxis?.axis,Wt=j?.yAxis?.labels;let D;t[58]!==Gt||t[59]!==Wt?(D={axis:Gt,label:Wt},t[58]=Gt,t[59]=Wt,t[60]=D):D=t[60];let V;t[61]!==Ot||t[62]!==Vt||t[63]!==Ut||t[64]!==it||t[65]!==I||t[66]!==W||t[67]!==$||t[68]!==D?(V=s.jsxRuntimeExports.jsx(Fe.Axis,{y1:Ot,y2:Vt,x1:Ut,x2:it,label:I,labelPos:W,classNames:$,styles:D}),t[61]=Ot,t[62]=Vt,t[63]=Ut,t[64]=it,t[65]=I,t[66]=W,t[67]=$,t[68]=D,t[69]=V):V=t[69];const Y=0-C-15,X=k/2,F=j?.yAxis?.title,P=R?.yAxis?.title;let rt;t[70]!==Y||t[71]!==X||t[72]!==F||t[73]!==P||t[74]!==K?(rt=s.jsxRuntimeExports.jsx(Xe.AxisTitle,{x:Y,y:X,style:F,className:P,text:K,rotate90:!0}),t[70]=Y,t[71]=X,t[72]=F,t[73]=P,t[74]=K,t[75]=rt):rt=t[75];let Yt;t[76]!==r?(Yt=n=>b.format(n,r),t[76]=r,t[77]=Yt):Yt=t[77];const ye=ee.map(Yt),Ue=ee.map(n=>u(n)),Ne=j?.xAxis?.gridLines,De=j?.xAxis?.labels;let ve;t[78]!==Ne||t[79]!==De?(ve={gridLines:Ne,labels:De},t[78]=Ne,t[79]=De,t[80]=ve):ve=t[80];const Le=R?.xAxis?.gridLines;let oe;t[81]!==Le?(oe=s.mo("opacity-0",Le),t[81]=Le,t[82]=oe):oe=t[82];const qe=R?.xAxis?.labels;let ie;t[83]!==qe?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",qe),t[83]=qe,t[84]=ie):ie=t[84];let Oe;t[85]!==oe||t[86]!==ie?(Oe={gridLines:oe,labels:ie},t[85]=oe,t[86]=ie,t[87]=Oe):Oe=t[87];let je;t[88]!==Z?(je=Z.filter(An).map(Rn),t[88]=Z,t[89]=je):je=t[89];const He=a.filter(pn).map((n,o)=>s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsx("path",{d:me.renderCell(a.findIndex(y=>y.label===n.label&&y.date===n.date)),opacity:0,onMouseEnter:y=>{mt(n),et(y.clientY),tt(y.clientX),at?.(n)},onMouseMove:y=>{mt(n),et(y.clientY),tt(y.clientX)},onMouseLeave:()=>{mt(void 0),tt(void 0),et(void 0),at?.(void 0)}})},o));let we;t[90]!==l||t[91]!==p||t[92]!==m||t[93]!==C||t[94]!==h.right||t[95]!==ct||t[96]!==f?(we=ct?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:ct.map((n,o)=>s.jsxRuntimeExports.jsx(Be.RefLineY,{text:n.text,color:n.color,y:f(n.value),x1:0-C,x2:p+h.right,classNames:n.classNames,styles:n.styles,animate:l,isInView:m},o))}):null,t[90]=l,t[91]=p,t[92]=m,t[93]=C,t[94]=h.right,t[95]=ct,t[96]=f,t[97]=we):we=t[97];let re;if(t[98]!==l||t[99]!==Rt||t[100]!==r||t[101]!==p||t[102]!==m||t[103]!==h.right||t[104]!==J||t[105]!==u||t[106]!==f){let n;t[108]!==l||t[109]!==r||t[110]!==p||t[111]!==m||t[112]!==h.right||t[113]!==J||t[114]!==u||t[115]!==f?(n=(o,y)=>{const Xt=Se.getLineEndPoint({x:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),y:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8},{x:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date)):0,y:o.yCoordinate?f(o.yCoordinate):0},v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius),Ge=o.showConnector?{y1:Xt.y,x1:Xt.x,y2:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0):0+(o.yOffset||0),x2:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),cy:o.yCoordinate?f(o.yCoordinate):0,cx:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date)):0,circleRadius:v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius,strokeWidth:o.showConnector===!0?2:Math.min(o.showConnector||0,1)}:void 0,We={y:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8,x:J?0:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),width:J?o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0):p+h.right-(o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0)),maxWidth:o.maxWidth,fontWeight:o.fontWeight,align:o.align};return s.jsxRuntimeExports.jsx(Se.Annotation,{color:o.color,connectorsSettings:Ge,labelSettings:We,text:o.text,classNames:o.classNames,styles:o.styles,animate:l,isInView:m},y)},t[108]=l,t[109]=r,t[110]=p,t[111]=m,t[112]=h.right,t[113]=J,t[114]=u,t[115]=f,t[116]=n):n=t[116],re=Rt.map(n),t[98]=l,t[99]=Rt,t[100]=r,t[101]=p,t[102]=m,t[103]=h.right,t[104]=J,t[105]=u,t[106]=f,t[107]=re}else re=t[107];let be;t[117]!==re?(be=s.jsxRuntimeExports.jsx("g",{children:re}),t[117]=re,t[118]=be):be=t[118];let Ce;t[119]!==Z?(Ce=Z.filter(xn).map(mn),t[119]=Z,t[120]=Ce):Ce=t[120];let Re;return t[121]!==R?.tooltip||t[122]!==xt||t[123]!==pt||t[124]!==x||t[125]!==j?.tooltip||t[126]!==bt?(Re=x&&bt&&xt&&pt?s.jsxRuntimeExports.jsx(Ye.Tooltip,{data:x,body:bt,xPos:xt,yPos:pt,backgroundStyle:j?.tooltip,className:R?.tooltip}):null,t[121]=R?.tooltip,t[122]=xt,t[123]=pt,t[124]=x,t[125]=j?.tooltip,t[126]=bt,t[127]=Re):Re=t[127],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(Ft.motion.svg,{width:`${O}px`,height:`${E}px`,viewBox:`0 0 ${O} ${E}`,direction:"ltr",ref:Et,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[ot,s.jsxRuntimeExports.jsx(Se.CustomArea,{areaSettings:_t,scaleX:u,scaleY:f,animate:l,isInView:m}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(ze.YTicksAndGridLines,{values:Mt.filter(kn),y:Mt.filter(En).map(n=>f(n)),x1:0-C,x2:p+h.right,styles:yt,classNames:vt,suffix:U,prefix:g,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Q}),V,rt]}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsx(Pe.XTicksAndGridLines,{values:ye,x:Ue,y1:0,y2:k,styles:ve,classNames:Oe,suffix:U,prefix:g,labelType:"primary",showGridLines:!0,precision:Q})}),je,s.jsxRuntimeExports.jsxs(Ft.motion.g,{children:[ue.map(n=>s.jsxRuntimeExports.jsxs(Ft.motion.g,{exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:x?n[0].label===x.label?1:q:At?n[0].color&&c[L.indexOf(n[0].color)]===At?1:q:H.length!==0?H.indexOf(n[0].label)!==-1?1:q:1},whileInView:{opacity:x?n[0].label===x.label?1:q:At?n[0].color&&c[L.indexOf(n[0].color)]===At?1:q:H.length!==0?H.indexOf(n[0].label)!==-1?1:q:1,transition:{duration:l.duration}}},initial:"initial",animate:m?"whileInView":"initial",children:[s.jsxRuntimeExports.jsx(Ft.motion.path,{d:St(n.filter(Cn))||"",style:{fill:"none",strokeWidth:x?n[0].label===x.label?T+Math.max(2,.5*T):T:H.length!==0&&H.indexOf(n[0].label)!==-1?T+Math.max(2,.5*T):T},exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{pathLength:0,d:St(n.filter(bn))||"",opacity:1,stroke:i.filter(wn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray},whileInView:{pathLength:1,d:St(n.filter(jn))||"",opacity:1,stroke:i.filter(On).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,transition:{duration:l.duration}}},initial:"initial",animate:m?"whileInView":"initial"}),n.map((o,y)=>s.jsxRuntimeExports.jsx(Ft.motion.g,{children:v.checkIfNullOrUndefined(o.y)?null:s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:se?s.jsxRuntimeExports.jsx(Ft.motion.circle,{r:p/n.length<5?0:p/n.length<20?2:4,exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:0,fill:i.filter(vn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,cx:u(o.date),cy:f(o.y)},whileInView:{opacity:1,fill:i.filter(yn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,transition:{duration:S?l.duration:.5,delay:S?0:l.duration},cx:u(o.date),cy:f(o.y)}},initial:"initial",animate:m?"whileInView":"initial"}):null})},y)),(H.indexOf(n[0].label)!==-1||x?.label===n[0].label)&&he?s.jsxRuntimeExports.jsx(Ft.motion.text,{className:"text-sm font-bold",dx:5,dy:4,exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:0,fill:i.filter(gn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,x:u(n[n.length-1].date),y:f(n[n.length-1].y)},whileInView:{opacity:1,fill:i.filter(hn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,x:u(n[n.length-1].date),y:f(n[n.length-1].y),transition:{duration:S?l.duration:.5,delay:S?0:l.duration}}},initial:"initial",animate:m?"whileInView":"initial",children:n[0].label}):null]},n[0].label)),x?s.jsxRuntimeExports.jsx("text",{y:f(x.y)-8,x:u(x.date),className:s.mo("graph-value text-sm font-bold",R?.graphObjectValues),style:{fill:i.filter(dn).length===0?c[0]:x.color?c[L.indexOf(x.color)]:B.Colors.gray,textAnchor:"middle",...j?.graphObjectValues||{}},children:Ie.numberFormattingFunction(x.y,ge,Q,g,U)}):null]}),He,we,be,Ce]})}),Re]})}function mn(e){return e.layer}function xn(e){return e.position==="after"}function pn(e){return!v.checkIfNullOrUndefined(e.y)}function dn(e){return e.color}function hn(e){return e.color}function gn(e){return e.color}function yn(e){return e.color}function vn(e){return e.color}function On(e){return e.color}function jn(e){return!v.checkIfNullOrUndefined(e.y)}function wn(e){return e.color}function bn(e){return!v.checkIfNullOrUndefined(e.y)}function Cn(e){return!v.checkIfNullOrUndefined(e.y)}function Rn(e){return e.layer}function An(e){return e.position==="before"}function En(e){return e!==0}function kn(e){return e!==0}function Nn(e){return e.date}function Dn(e){return!v.checkIfNullOrUndefined(e.date)&&!v.checkIfNullOrUndefined(e.y)}function Ln(e){return!v.checkIfNullOrUndefined(e)}function qn(e){return e.y}function Sn(e){return!v.checkIfNullOrUndefined(e)}function Mn(e){return e.y}function Tn(e){return!v.checkIfNullOrUndefined(e)}function In(e){return e.y}function $n(e){return!v.checkIfNullOrUndefined(e)}function Vn(e){return e.y}function Un(e){return!v.checkIfNullOrUndefined(e)}function Hn(e){return e.y}function Gn(e,t){return ke.ascending(e,t)}function Wn(e){return!v.checkIfNullOrUndefined(e.y)}function Yn(e){const t=s.compilerRuntimeExports.c(106),{data:i,graphTitle:O,showNAColor:E,colors:c,colorDomain:r,suffix:wt,sources:st,prefix:Pt,graphDescription:lt,height:U,width:g,footNote:C,noOfXTicks:bt,dateFormat:at,padding:ct,backgroundColor:Bt,leftMargin:z,rightMargin:Ct,topMargin:H,bottomMargin:l,showColorScale:J,tooltip:T,relativeHeight:se,onSeriesMouseOver:Rt,showLabels:zt,refValues:K,highlightAreaSettings:Jt,graphID:Kt,minValue:Qt,maxValue:ut,highlightedLines:j,graphDownload:L,dataDownload:At,animate:R,language:he,colorLegendTitle:q,minHeight:Q,strokeWidth:ge,showDots:Z,annotations:Et,customHighlightAreaSettings:_,theme:m,ariaLabel:S,yAxisTitle:le,noOfYTicks:kt,minDate:ft,maxDate:ae,curveType:Nt,styles:a,classNames:d,dimmedOpacity:Dt,precision:Zt,customLayers:x,naLabel:mt}=e,xt=E===void 0?!0:E,tt=wt===void 0?"":wt,pt=Pt===void 0?"":Pt,et=bt===void 0?10:bt,Lt=at===void 0?"yyyy":at,dt=Bt===void 0?!1:Bt,h=z===void 0?30:z,ce=Ct===void 0?50:Ct,ue=H===void 0?20:H,ht=l===void 0?25:l,qt=J===void 0?!0:J,gt=zt===void 0?!0:zt;let _t;t[0]!==K?(_t=K===void 0?[]:K,t[0]=K,t[1]=_t):_t=t[1];const p=_t;let k;t[2]!==Jt?(k=Jt===void 0?[]:Jt,t[2]=Jt,t[3]=k):k=t[3];const fe=k;let te;t[4]!==j?(te=j===void 0?[]:j,t[4]=j,t[5]=te):te=t[5];const w=te,G=L===void 0?!1:L,u=At===void 0?!1:At,nt=R===void 0?!1:R,M=he===void 0?"en":he,f=Q===void 0?0:Q,me=ge===void 0?2:ge,St=Z===void 0?!0:Z;let Mt;t[6]!==Et?(Mt=Et===void 0?[]:Et,t[6]=Et,t[7]=Mt):Mt=t[7];const ee=Mt;let ot;t[8]!==_?(ot=_===void 0?[]:_,t[8]=_,t[9]=ot):ot=t[9];const Tt=ot,N=m===void 0?"light":m,yt=kt===void 0?5:kt,It=Nt===void 0?"curve":Nt,$t=Dt===void 0?.3:Dt,vt=Zt===void 0?2:Zt;let Ot;t[10]!==x?(Ot=x===void 0?[]:x,t[10]=x,t[11]=Ot):Ot=t[11];const Vt=Ot,Ut=mt===void 0?"NA":mt,[it,xe]=A.useState(0),[I,pe]=A.useState(0),[Ht,de]=A.useState(void 0),W=A.useRef(null),ne=A.useRef(null);let jt,$;t[12]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{const Yt=new ResizeObserver(ye=>{xe(ye[0].target.clientWidth||620),pe(ye[0].target.clientHeight||480)});return W.current&&Yt.observe(W.current),()=>Yt.disconnect()},$=[],t[12]=jt,t[13]=$):(jt=t[12],$=t[13]),A.useEffect(jt,$);const Gt=d?.graphContainer,Wt=a?.graphContainer;let D;t[14]!==d?.description||t[15]!==d?.title||t[16]!==i||t[17]!==u||t[18]!==lt||t[19]!==G||t[20]!==O||t[21]!==a?.description||t[22]!==a?.title||t[23]!==g?(D=O||lt||G||u?s.jsxRuntimeExports.jsx(on.GraphHeader,{styles:{title:a?.title,description:a?.description},classNames:{title:d?.title,description:d?.description},graphTitle:O,graphDescription:lt,width:g,graphDownload:G?ne:void 0,dataDownload:u?i.map(Qn).filter(Kn).length>0?i.map(Jn).filter(zn):i.filter(Bn):null}):null,t[14]=d?.description,t[15]=d?.title,t[16]=i,t[17]=u,t[18]=lt,t[19]=G,t[20]=O,t[21]=a?.description,t[22]=a?.title,t[23]=g,t[24]=D):D=t[24];let V;t[25]!==d?.colorLegend||t[26]!==r||t[27]!==q||t[28]!==c||t[29]!==i||t[30]!==qt||t[31]!==xt||t[32]!==N||t[33]!==g?(V=qt&&i.filter(Pn).length!==0&&i.length>0?s.jsxRuntimeExports.jsx(sn.ColorLegendWithMouseOver,{width:g,colorLegendTitle:q,colors:c||B.Colors[N].categoricalColors.colors,colorDomain:r||Ee.uniqBy(i,"color",!0),setSelectedColor:de,showNAColor:xt,className:d?.colorLegend}):null,t[25]=d?.colorLegend,t[26]=r,t[27]=q,t[28]=c,t[29]=i,t[30]=qt,t[31]=xt,t[32]=N,t[33]=g,t[34]=V):V=t[34];let Y;t[35]!==i.length?(Y=i.length===0&&s.jsxRuntimeExports.jsx(rn.EmptyState,{}),t[35]=i.length,t[36]=Y):Y=t[36];let X;t[37]!==nt||t[38]!==ee||t[39]!==ht||t[40]!==d||t[41]!==r||t[42]!==c||t[43]!==It||t[44]!==Tt||t[45]!==Vt||t[46]!==i||t[47]!==Lt||t[48]!==$t||t[49]!==fe||t[50]!==w||t[51]!==M||t[52]!==h||t[53]!==ae||t[54]!==ut||t[55]!==ft||t[56]!==Qt||t[57]!==Ut||t[58]!==et||t[59]!==yt||t[60]!==Rt||t[61]!==vt||t[62]!==pt||t[63]!==p||t[64]!==ce||t[65]!==Ht||t[66]!==St||t[67]!==gt||t[68]!==me||t[69]!==a||t[70]!==tt||t[71]!==I||t[72]!==it||t[73]!==N||t[74]!==T||t[75]!==ue||t[76]!==le?(X=it&&I&&i.length>0?s.jsxRuntimeExports.jsx(fn,{data:i,lineColors:i.filter(Fn).length===0?c?[c]:[B.Colors.primaryColors["blue-600"]]:c||B.Colors[N].categoricalColors.colors,width:it,height:I,dateFormat:Lt,noOfXTicks:et??ln.getNoOfTicks(it),leftMargin:h,rightMargin:ce,topMargin:ue,bottomMargin:ht,tooltip:T,onSeriesMouseOver:Rt,suffix:tt,prefix:pt,highlightAreaSettings:fe,refValues:p,minValue:Qt,maxValue:ut,highlightedLines:w,animate:nt===!0?{duration:.5,once:!0,amount:.5}:nt||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:me,showDots:St,annotations:ee,customHighlightAreaSettings:Tt,yAxisTitle:le,noOfYTicks:yt,minDate:ft,maxDate:ae,curveType:It,styles:a,classNames:d,selectedColor:Ht,showLabels:gt,colorDomain:i.filter(Xn).length===0?[]:r||Ee.uniqBy(i,"color",!0),dimmedOpacity:$t,precision:vt,customLayers:Vt,naLabel:Ut}):null,t[37]=nt,t[38]=ee,t[39]=ht,t[40]=d,t[41]=r,t[42]=c,t[43]=It,t[44]=Tt,t[45]=Vt,t[46]=i,t[47]=Lt,t[48]=$t,t[49]=fe,t[50]=w,t[51]=M,t[52]=h,t[53]=ae,t[54]=ut,t[55]=ft,t[56]=Qt,t[57]=Ut,t[58]=et,t[59]=yt,t[60]=Rt,t[61]=vt,t[62]=pt,t[63]=p,t[64]=ce,t[65]=Ht,t[66]=St,t[67]=gt,t[68]=me,t[69]=a,t[70]=tt,t[71]=I,t[72]=it,t[73]=N,t[74]=T,t[75]=ue,t[76]=le,t[77]=X):X=t[77];let F;t[78]!==Y||t[79]!==X?(F=s.jsxRuntimeExports.jsxs(Ve.GraphArea,{ref:W,children:[Y,X]}),t[78]=Y,t[79]=X,t[80]=F):F=t[80];let P;t[81]!==d?.footnote||t[82]!==d?.source||t[83]!==C||t[84]!==st||t[85]!==a?.footnote||t[86]!==a?.source||t[87]!==g?(P=st||C?s.jsxRuntimeExports.jsx(nn.GraphFooter,{styles:{footnote:a?.footnote,source:a?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:st,footNote:C,width:g}):null,t[81]=d?.footnote,t[82]=d?.source,t[83]=C,t[84]=st,t[85]=a?.footnote,t[86]=a?.source,t[87]=g,t[88]=P):P=t[88];let rt;return t[89]!==S||t[90]!==dt||t[91]!==Kt||t[92]!==U||t[93]!==M||t[94]!==f||t[95]!==ct||t[96]!==se||t[97]!==Gt||t[98]!==Wt||t[99]!==D||t[100]!==V||t[101]!==F||t[102]!==P||t[103]!==N||t[104]!==g?(rt=s.jsxRuntimeExports.jsxs(Ve.GraphContainer,{className:Gt,style:Wt,id:Kt,ref:ne,"aria-label":S,backgroundColor:dt,theme:N,language:M,minHeight:f,width:g,height:U,relativeHeight:se,padding:ct,children:[D,V,F,P]}),t[89]=S,t[90]=dt,t[91]=Kt,t[92]=U,t[93]=M,t[94]=f,t[95]=ct,t[96]=se,t[97]=Gt,t[98]=Wt,t[99]=D,t[100]=V,t[101]=F,t[102]=P,t[103]=N,t[104]=g,t[105]=rt):rt=t[105],rt}function Xn(e){return e.color}function Fn(e){return e.color}function Pn(e){return e.color}function Bn(e){return e!==void 0}function zn(e){return e!==void 0}function Jn(e){return e.data}function Kn(e){return e!==void 0}function Qn(e){return e.data}exports.MultiLineAltChart=Yn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),b=require("./parse-xYI9yrvL.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Ie=require("./numberFormattingFunction-02t-wJta.cjs"),Ye=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Se=require("./customArea-B1LWQBmM.cjs"),Xe=require("./AxisTitle-DV4n0RxE.cjs"),Fe=require("./Axis-Jt_tmhxS.cjs"),Pe=require("./XTicksAndGridLines-CekrPykD.cjs"),Be=require("./ReferenceLine-M9aP3dj-.cjs"),ze=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Je=require("./index-D69M6klB.cjs"),B=require("./Colors.cjs"),Ee=require("./uniqBy-O05lp2S5.cjs"),ke=require("./init-DU0ybBc_.cjs"),Ke=require("./time-CkcKbhwe.cjs"),Qe=require("./linear-CgUCbw9F.cjs"),Ze=require("./delaunay-rcy0HhZi.cjs"),$e=require("./line-DaEMhXmx.cjs"),Ae=require("./step-BZ3C8QFW.cjs"),_e=require("./select-Bnfk0lJx.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),tn=require("./pointer-Dkq5NV1q.cjs"),en=require("./use-in-view-C3o_ntMv.cjs"),nn=require("./GraphFooter.cjs"),on=require("./GraphHeader.cjs"),rn=require("./EmptyState-N1eHt3vq.cjs"),sn=require("./ColorLegendWithMouseOver.cjs"),Ve=require("./GraphContainer-B1EDxJ0S.cjs"),ln=require("./getNoOfTicks-C_1CFXv_.cjs");function an(e,t){return Array.from(t,i=>e[i])}function cn(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[i]=t;if(i&&i.length!==2||t.length>1){const O=Uint32Array.from(e,(E,c)=>c);return t.length>1?(t=t.map(E=>e.map(E)),O.sort((E,c)=>{for(const r of t){const wt=Me(r[E],r[c]);if(wt)return wt}})):(i=e.map(i),O.sort((E,c)=>Me(i[E],i[c]))),an(e,O)}return e.sort(un(i))}function un(e=ke.ascending){if(e===ke.ascending)return Me;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,i)=>{const O=e(t,i);return O||O===0?O:(e(i,i)===0)-(e(t,t)===0)}}function Me(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}function fn(e){const t=s.compilerRuntimeExports.c(128),{data:i,width:O,height:E,lineColors:c,dateFormat:r,noOfXTicks:wt,rightMargin:st,topMargin:Pt,bottomMargin:lt,suffix:U,prefix:g,leftMargin:C,tooltip:bt,onSeriesMouseOver:at,refValues:ct,highlightAreaSettings:Bt,minValue:z,maxValue:Ct,highlightedLines:H,animate:l,rtl:J,strokeWidth:T,showDots:se,annotations:Rt,customHighlightAreaSettings:zt,yAxisTitle:K,noOfYTicks:Jt,minDate:Kt,maxDate:Qt,curveType:ut,styles:j,colorDomain:L,selectedColor:At,classNames:R,showLabels:he,dimmedOpacity:q,precision:Q,naLabel:ge,customLayers:Z}=e,Et=A.useRef(null);let _;t[0]!==l.amount||t[1]!==l.once?(_={once:l.once,amount:l.amount},t[0]=l.amount,t[1]=l.once,t[2]=_):_=t[2];const m=en.useInView(Et,_),[S,le]=A.useState(!1);let kt,ft;t[3]!==l.duration||t[4]!==S||t[5]!==m?(kt=()=>{if(m&&!S){const n=setTimeout(()=>{le(!0)},(l.duration+.5)*1e3);return()=>clearTimeout(n)}},ft=[m,S,l.duration],t[3]=l.duration,t[4]=S,t[5]=m,t[6]=kt,t[7]=ft):(kt=t[6],ft=t[7]),A.useEffect(kt,ft);const ae=ut==="linear"?$e.curveLinear:ut==="step"?Ae.curveStep:ut==="stepAfter"?Ae.stepAfter:ut==="stepBefore"?Ae.stepBefore:Ae.monotoneX;let Nt;t[8]!==r?(Nt=n=>({...n,date:b.parse(`${n.date}`,r,new Date)}),t[8]=r,t[9]=Nt):Nt=t[9];const a=Te.orderBy(i.map(Nt),["date"],["asc"]).filter(Wn),d=Ee.uniqBy(a,"label",!0);let Dt;t[10]!==r?(Dt=n=>b.parse(`${n}`,r,new Date),t[10]=r,t[11]=Dt):Dt=t[11];const Zt=cn(Ee.uniqBy(i,"date",!0).map(Dt),Gn),[x,mt]=A.useState(void 0),[xt,tt]=A.useState(void 0),[pt,et]=A.useState(void 0),Lt=K?C+30:C;let dt;t[12]!==lt||t[13]!==st||t[14]!==Lt||t[15]!==Pt?(dt={top:Pt,bottom:lt,left:Lt,right:st},t[12]=lt,t[13]=st,t[14]=Lt,t[15]=Pt,t[16]=dt):dt=t[16];const h=dt,ce=A.useRef(null),ue=d.map(n=>Te.orderBy(a.filter(o=>o.label==n),["date"],["asc"]));let ht;if(t[17]!==r||t[18]!==Bt){let n;t[20]!==r?(n=o=>({...o,coordinates:[o.coordinates[0]===null?null:b.parse(`${o.coordinates[0]}`,r,new Date),o.coordinates[1]===null?null:b.parse(`${o.coordinates[1]}`,r,new Date)]}),t[20]=r,t[21]=n):n=t[21],ht=Bt.map(n),t[17]=r,t[18]=Bt,t[19]=ht}else ht=t[19];const qt=ht;let gt;if(t[22]!==zt||t[23]!==r){let n;t[25]!==r?(n=o=>({...o,coordinates:o.coordinates.map((y,Xt)=>Xt%2===0?b.parse(`${y}`,r,new Date):y)}),t[25]=r,t[26]=n):n=t[26],gt=zt.map(n),t[22]=zt,t[23]=r,t[24]=gt}else gt=t[24];const _t=gt,p=O-h.left-h.right,k=E-h.top-h.bottom,fe=Kt?b.parse(`${Kt}`,r,new Date):Zt[0],te=Qt?b.parse(`${Qt}`,r,new Date):Zt[Zt.length-1],w=v.checkIfNullOrUndefined(z)?Math.min(...a.map(Hn).filter(Un))?Math.min(...a.map(Vn).filter($n))>0?0:Math.min(...a.map(In).filter(Tn)):0:z,G=Math.max(...a.map(Mn).filter(Sn))?Math.max(...a.map(qn).filter(Ln)):0,u=Ke.time().domain([fe,te]).range([0,p]);let nt;t[27]!==w||t[28]!==z?(nt=v.checkIfNullOrUndefined(z)?w:z,t[27]=w,t[28]=z,t[29]=nt):nt=t[29];let M;t[30]!==G||t[31]!==Ct?(M=v.checkIfNullOrUndefined(Ct)?G>0?G:0:Ct,t[30]=G,t[31]=Ct,t[32]=M):M=t[32];const f=Qe.linear().domain([nt,M]).range([k,0]).nice(),me=Ze.Delaunay.from(a.filter(Dn),n=>u(n.date),n=>f(n.y)).voronoi([0,0,p<0?0:p,k<0?0:k]),St=$e.line().x(n=>u(n.date)).y(n=>f(n.y)).curve(ae),Mt=f.ticks(Jt),ee=u.ticks(wt);A.useEffect(()=>{const n=y=>{const Xt=a[ke.bisectCenter(a.map(Nn),u.invert(tn.pointer(y)[0]),0)];mt(Xt||a[a.length-1]),et(y.clientY),tt(y.clientX),at?.(Xt||a[a.length-1])},o=()=>{mt(void 0),tt(void 0),et(void 0)};_e.select(ce.current).on("mousemove",n).on("mouseout",o),at?.(void 0)},[u,a,at]);let ot;t[33]!==l||t[34]!==k||t[35]!==p||t[36]!==qt||t[37]!==m||t[38]!==u?(ot=s.jsxRuntimeExports.jsx(Je.HighlightArea,{areaSettings:qt,width:p,height:k,scale:u,animate:l,isInView:m}),t[33]=l,t[34]=k,t[35]=p,t[36]=qt,t[37]=m,t[38]=u,t[39]=ot):ot=t[39];const Tt=j?.yAxis?.gridLines,N=j?.yAxis?.labels;let yt;t[40]!==Tt||t[41]!==N?(yt={gridLines:Tt,labels:N},t[40]=Tt,t[41]=N,t[42]=yt):yt=t[42];const It=R?.yAxis?.gridLines,$t=R?.yAxis?.labels;let vt;t[43]!==It||t[44]!==$t?(vt={gridLines:It,labels:$t},t[43]=It,t[44]=$t,t[45]=vt):vt=t[45];const Ot=f(w<0?0:w),Vt=f(w<0?0:w),Ut=0-C,it=p+h.right,xe=w<0?0:w;let I;t[46]!==Q||t[47]!==g||t[48]!==U||t[49]!==xe?(I=Ie.numberFormattingFunction(xe,"NA",Q,g,U),t[46]=Q,t[47]=g,t[48]=U,t[49]=xe,t[50]=I):I=t[50];const pe=0-C,Ht=f(w<0?0:w),de=G<0?"1em":-5;let W;t[51]!==pe||t[52]!==Ht||t[53]!==de?(W={x:pe,y:Ht,dx:0,dy:de},t[51]=pe,t[52]=Ht,t[53]=de,t[54]=W):W=t[54];const ne=R?.xAxis?.axis,jt=R?.yAxis?.labels;let $;t[55]!==ne||t[56]!==jt?($={axis:ne,label:jt},t[55]=ne,t[56]=jt,t[57]=$):$=t[57];const Gt=j?.xAxis?.axis,Wt=j?.yAxis?.labels;let D;t[58]!==Gt||t[59]!==Wt?(D={axis:Gt,label:Wt},t[58]=Gt,t[59]=Wt,t[60]=D):D=t[60];let V;t[61]!==Ot||t[62]!==Vt||t[63]!==Ut||t[64]!==it||t[65]!==I||t[66]!==W||t[67]!==$||t[68]!==D?(V=s.jsxRuntimeExports.jsx(Fe.Axis,{y1:Ot,y2:Vt,x1:Ut,x2:it,label:I,labelPos:W,classNames:$,styles:D}),t[61]=Ot,t[62]=Vt,t[63]=Ut,t[64]=it,t[65]=I,t[66]=W,t[67]=$,t[68]=D,t[69]=V):V=t[69];const Y=0-C-15,X=k/2,F=j?.yAxis?.title,P=R?.yAxis?.title;let rt;t[70]!==Y||t[71]!==X||t[72]!==F||t[73]!==P||t[74]!==K?(rt=s.jsxRuntimeExports.jsx(Xe.AxisTitle,{x:Y,y:X,style:F,className:P,text:K,rotate90:!0}),t[70]=Y,t[71]=X,t[72]=F,t[73]=P,t[74]=K,t[75]=rt):rt=t[75];let Yt;t[76]!==r?(Yt=n=>b.format(n,r),t[76]=r,t[77]=Yt):Yt=t[77];const ye=ee.map(Yt),Ue=ee.map(n=>u(n)),Ne=j?.xAxis?.gridLines,De=j?.xAxis?.labels;let ve;t[78]!==Ne||t[79]!==De?(ve={gridLines:Ne,labels:De},t[78]=Ne,t[79]=De,t[80]=ve):ve=t[80];const Le=R?.xAxis?.gridLines;let oe;t[81]!==Le?(oe=s.mo("opacity-0",Le),t[81]=Le,t[82]=oe):oe=t[82];const qe=R?.xAxis?.labels;let ie;t[83]!==qe?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",qe),t[83]=qe,t[84]=ie):ie=t[84];let Oe;t[85]!==oe||t[86]!==ie?(Oe={gridLines:oe,labels:ie},t[85]=oe,t[86]=ie,t[87]=Oe):Oe=t[87];let je;t[88]!==Z?(je=Z.filter(An).map(Rn),t[88]=Z,t[89]=je):je=t[89];const He=a.filter(pn).map((n,o)=>s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsx("path",{d:me.renderCell(a.findIndex(y=>y.label===n.label&&y.date===n.date)),opacity:0,onMouseEnter:y=>{mt(n),et(y.clientY),tt(y.clientX),at?.(n)},onMouseMove:y=>{mt(n),et(y.clientY),tt(y.clientX)},onMouseLeave:()=>{mt(void 0),tt(void 0),et(void 0),at?.(void 0)}})},o));let we;t[90]!==l||t[91]!==p||t[92]!==m||t[93]!==C||t[94]!==h.right||t[95]!==ct||t[96]!==f?(we=ct?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:ct.map((n,o)=>s.jsxRuntimeExports.jsx(Be.RefLineY,{text:n.text,color:n.color,y:f(n.value),x1:0-C,x2:p+h.right,classNames:n.classNames,styles:n.styles,animate:l,isInView:m},o))}):null,t[90]=l,t[91]=p,t[92]=m,t[93]=C,t[94]=h.right,t[95]=ct,t[96]=f,t[97]=we):we=t[97];let re;if(t[98]!==l||t[99]!==Rt||t[100]!==r||t[101]!==p||t[102]!==m||t[103]!==h.right||t[104]!==J||t[105]!==u||t[106]!==f){let n;t[108]!==l||t[109]!==r||t[110]!==p||t[111]!==m||t[112]!==h.right||t[113]!==J||t[114]!==u||t[115]!==f?(n=(o,y)=>{const Xt=Se.getLineEndPoint({x:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),y:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8},{x:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date)):0,y:o.yCoordinate?f(o.yCoordinate):0},v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius),Ge=o.showConnector?{y1:Xt.y,x1:Xt.x,y2:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0):0+(o.yOffset||0),x2:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),cy:o.yCoordinate?f(o.yCoordinate):0,cx:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date)):0,circleRadius:v.checkIfNullOrUndefined(o.connectorRadius)?3.5:o.connectorRadius,strokeWidth:o.showConnector===!0?2:Math.min(o.showConnector||0,1)}:void 0,We={y:o.yCoordinate?f(o.yCoordinate)+(o.yOffset||0)-8:0+(o.yOffset||0)-8,x:J?0:o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0),width:J?o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0):p+h.right-(o.xCoordinate?u(b.parse(`${o.xCoordinate}`,r,new Date))+(o.xOffset||0):0+(o.xOffset||0)),maxWidth:o.maxWidth,fontWeight:o.fontWeight,align:o.align};return s.jsxRuntimeExports.jsx(Se.Annotation,{color:o.color,connectorsSettings:Ge,labelSettings:We,text:o.text,classNames:o.classNames,styles:o.styles,animate:l,isInView:m},y)},t[108]=l,t[109]=r,t[110]=p,t[111]=m,t[112]=h.right,t[113]=J,t[114]=u,t[115]=f,t[116]=n):n=t[116],re=Rt.map(n),t[98]=l,t[99]=Rt,t[100]=r,t[101]=p,t[102]=m,t[103]=h.right,t[104]=J,t[105]=u,t[106]=f,t[107]=re}else re=t[107];let be;t[117]!==re?(be=s.jsxRuntimeExports.jsx("g",{children:re}),t[117]=re,t[118]=be):be=t[118];let Ce;t[119]!==Z?(Ce=Z.filter(xn).map(mn),t[119]=Z,t[120]=Ce):Ce=t[120];let Re;return t[121]!==R?.tooltip||t[122]!==xt||t[123]!==pt||t[124]!==x||t[125]!==j?.tooltip||t[126]!==bt?(Re=x&&bt&&xt&&pt?s.jsxRuntimeExports.jsx(Ye.Tooltip,{data:x,body:bt,xPos:xt,yPos:pt,backgroundStyle:j?.tooltip,className:R?.tooltip}):null,t[121]=R?.tooltip,t[122]=xt,t[123]=pt,t[124]=x,t[125]=j?.tooltip,t[126]=bt,t[127]=Re):Re=t[127],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(Ft.motion.svg,{width:`${O}px`,height:`${E}px`,viewBox:`0 0 ${O} ${E}`,direction:"ltr",ref:Et,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[ot,s.jsxRuntimeExports.jsx(Se.CustomArea,{areaSettings:_t,scaleX:u,scaleY:f,animate:l,isInView:m}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(ze.YTicksAndGridLines,{values:Mt.filter(kn),y:Mt.filter(En).map(n=>f(n)),x1:0-C,x2:p+h.right,styles:yt,classNames:vt,suffix:U,prefix:g,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Q}),V,rt]}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsx(Pe.XTicksAndGridLines,{values:ye,x:Ue,y1:0,y2:k,styles:ve,classNames:Oe,suffix:U,prefix:g,labelType:"primary",showGridLines:!0,precision:Q})}),je,s.jsxRuntimeExports.jsxs(Ft.motion.g,{children:[ue.map(n=>s.jsxRuntimeExports.jsxs(Ft.motion.g,{exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:x?n[0].label===x.label?1:q:At?n[0].color&&c[L.indexOf(n[0].color)]===At?1:q:H.length!==0?H.indexOf(n[0].label)!==-1?1:q:1},whileInView:{opacity:x?n[0].label===x.label?1:q:At?n[0].color&&c[L.indexOf(n[0].color)]===At?1:q:H.length!==0?H.indexOf(n[0].label)!==-1?1:q:1,transition:{duration:l.duration}}},initial:"initial",animate:m?"whileInView":"initial",children:[s.jsxRuntimeExports.jsx(Ft.motion.path,{d:St(n.filter(Cn))||"",style:{fill:"none",strokeWidth:x?n[0].label===x.label?T+Math.max(2,.5*T):T:H.length!==0&&H.indexOf(n[0].label)!==-1?T+Math.max(2,.5*T):T},exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{pathLength:0,d:St(n.filter(bn))||"",opacity:1,stroke:i.filter(wn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray},whileInView:{pathLength:1,d:St(n.filter(jn))||"",opacity:1,stroke:i.filter(On).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,transition:{duration:l.duration}}},initial:"initial",animate:m?"whileInView":"initial"}),n.map((o,y)=>s.jsxRuntimeExports.jsx(Ft.motion.g,{children:v.checkIfNullOrUndefined(o.y)?null:s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:se?s.jsxRuntimeExports.jsx(Ft.motion.circle,{r:p/n.length<5?0:p/n.length<20?2:4,exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:0,fill:i.filter(vn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,cx:u(o.date),cy:f(o.y)},whileInView:{opacity:1,fill:i.filter(yn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,transition:{duration:S?l.duration:.5,delay:S?0:l.duration},cx:u(o.date),cy:f(o.y)}},initial:"initial",animate:m?"whileInView":"initial"}):null})},y)),(H.indexOf(n[0].label)!==-1||x?.label===n[0].label)&&he?s.jsxRuntimeExports.jsx(Ft.motion.text,{className:"text-sm font-bold",dx:5,dy:4,exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{opacity:0,fill:i.filter(gn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,x:u(n[n.length-1].date),y:f(n[n.length-1].y)},whileInView:{opacity:1,fill:i.filter(hn).length===0?c[0]:n[0].color?c[L.indexOf(n[0].color)]:B.Colors.gray,x:u(n[n.length-1].date),y:f(n[n.length-1].y),transition:{duration:S?l.duration:.5,delay:S?0:l.duration}}},initial:"initial",animate:m?"whileInView":"initial",children:n[0].label}):null]},n[0].label)),x?s.jsxRuntimeExports.jsx("text",{y:f(x.y)-8,x:u(x.date),className:s.mo("graph-value text-sm font-bold",R?.graphObjectValues),style:{fill:i.filter(dn).length===0?c[0]:x.color?c[L.indexOf(x.color)]:B.Colors.gray,textAnchor:"middle",...j?.graphObjectValues||{}},children:Ie.numberFormattingFunction(x.y,ge,Q,g,U)}):null]}),He,we,be,Ce]})}),Re]})}function mn(e){return e.layer}function xn(e){return e.position==="after"}function pn(e){return!v.checkIfNullOrUndefined(e.y)}function dn(e){return e.color}function hn(e){return e.color}function gn(e){return e.color}function yn(e){return e.color}function vn(e){return e.color}function On(e){return e.color}function jn(e){return!v.checkIfNullOrUndefined(e.y)}function wn(e){return e.color}function bn(e){return!v.checkIfNullOrUndefined(e.y)}function Cn(e){return!v.checkIfNullOrUndefined(e.y)}function Rn(e){return e.layer}function An(e){return e.position==="before"}function En(e){return e!==0}function kn(e){return e!==0}function Nn(e){return e.date}function Dn(e){return!v.checkIfNullOrUndefined(e.date)&&!v.checkIfNullOrUndefined(e.y)}function Ln(e){return!v.checkIfNullOrUndefined(e)}function qn(e){return e.y}function Sn(e){return!v.checkIfNullOrUndefined(e)}function Mn(e){return e.y}function Tn(e){return!v.checkIfNullOrUndefined(e)}function In(e){return e.y}function $n(e){return!v.checkIfNullOrUndefined(e)}function Vn(e){return e.y}function Un(e){return!v.checkIfNullOrUndefined(e)}function Hn(e){return e.y}function Gn(e,t){return ke.ascending(e,t)}function Wn(e){return!v.checkIfNullOrUndefined(e.y)}function Yn(e){const t=s.compilerRuntimeExports.c(106),{data:i,graphTitle:O,showNAColor:E,colors:c,colorDomain:r,suffix:wt,sources:st,prefix:Pt,graphDescription:lt,height:U,width:g,footNote:C,noOfXTicks:bt,dateFormat:at,padding:ct,backgroundColor:Bt,leftMargin:z,rightMargin:Ct,topMargin:H,bottomMargin:l,showColorScale:J,tooltip:T,relativeHeight:se,onSeriesMouseOver:Rt,showLabels:zt,refValues:K,highlightAreaSettings:Jt,graphID:Kt,minValue:Qt,maxValue:ut,highlightedLines:j,graphDownload:L,dataDownload:At,animate:R,language:he,colorLegendTitle:q,minHeight:Q,strokeWidth:ge,showDots:Z,annotations:Et,customHighlightAreaSettings:_,theme:m,ariaLabel:S,yAxisTitle:le,noOfYTicks:kt,minDate:ft,maxDate:ae,curveType:Nt,styles:a,classNames:d,dimmedOpacity:Dt,precision:Zt,customLayers:x,naLabel:mt}=e,xt=E===void 0?!0:E,tt=wt===void 0?"":wt,pt=Pt===void 0?"":Pt,et=bt===void 0?10:bt,Lt=at===void 0?"yyyy":at,dt=Bt===void 0?!1:Bt,h=z===void 0?30:z,ce=Ct===void 0?50:Ct,ue=H===void 0?20:H,ht=l===void 0?25:l,qt=J===void 0?!0:J,gt=zt===void 0?!0:zt;let _t;t[0]!==K?(_t=K===void 0?[]:K,t[0]=K,t[1]=_t):_t=t[1];const p=_t;let k;t[2]!==Jt?(k=Jt===void 0?[]:Jt,t[2]=Jt,t[3]=k):k=t[3];const fe=k;let te;t[4]!==j?(te=j===void 0?[]:j,t[4]=j,t[5]=te):te=t[5];const w=te,G=L===void 0?!1:L,u=At===void 0?!1:At,nt=R===void 0?!1:R,M=he===void 0?"en":he,f=Q===void 0?0:Q,me=ge===void 0?2:ge,St=Z===void 0?!0:Z;let Mt;t[6]!==Et?(Mt=Et===void 0?[]:Et,t[6]=Et,t[7]=Mt):Mt=t[7];const ee=Mt;let ot;t[8]!==_?(ot=_===void 0?[]:_,t[8]=_,t[9]=ot):ot=t[9];const Tt=ot,N=m===void 0?"light":m,yt=kt===void 0?5:kt,It=Nt===void 0?"curve":Nt,$t=Dt===void 0?.3:Dt,vt=Zt===void 0?2:Zt;let Ot;t[10]!==x?(Ot=x===void 0?[]:x,t[10]=x,t[11]=Ot):Ot=t[11];const Vt=Ot,Ut=mt===void 0?"NA":mt,[it,xe]=A.useState(0),[I,pe]=A.useState(0),[Ht,de]=A.useState(void 0),W=A.useRef(null),ne=A.useRef(null);let jt,$;t[12]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{const Yt=new ResizeObserver(ye=>{xe(ye[0].target.clientWidth||620),pe(ye[0].target.clientHeight||480)});return W.current&&Yt.observe(W.current),()=>Yt.disconnect()},$=[],t[12]=jt,t[13]=$):(jt=t[12],$=t[13]),A.useEffect(jt,$);const Gt=d?.graphContainer,Wt=a?.graphContainer;let D;t[14]!==d?.description||t[15]!==d?.title||t[16]!==i||t[17]!==u||t[18]!==lt||t[19]!==G||t[20]!==O||t[21]!==a?.description||t[22]!==a?.title||t[23]!==g?(D=O||lt||G||u?s.jsxRuntimeExports.jsx(on.GraphHeader,{styles:{title:a?.title,description:a?.description},classNames:{title:d?.title,description:d?.description},graphTitle:O,graphDescription:lt,width:g,graphDownload:G?ne:void 0,dataDownload:u?i.map(Qn).filter(Kn).length>0?i.map(Jn).filter(zn):i.filter(Bn):null}):null,t[14]=d?.description,t[15]=d?.title,t[16]=i,t[17]=u,t[18]=lt,t[19]=G,t[20]=O,t[21]=a?.description,t[22]=a?.title,t[23]=g,t[24]=D):D=t[24];let V;t[25]!==d?.colorLegend||t[26]!==r||t[27]!==q||t[28]!==c||t[29]!==i||t[30]!==qt||t[31]!==xt||t[32]!==N||t[33]!==g?(V=qt&&i.filter(Pn).length!==0&&i.length>0?s.jsxRuntimeExports.jsx(sn.ColorLegendWithMouseOver,{width:g,colorLegendTitle:q,colors:c||B.Colors[N].categoricalColors.colors,colorDomain:r||Ee.uniqBy(i,"color",!0),setSelectedColor:de,showNAColor:xt,className:d?.colorLegend}):null,t[25]=d?.colorLegend,t[26]=r,t[27]=q,t[28]=c,t[29]=i,t[30]=qt,t[31]=xt,t[32]=N,t[33]=g,t[34]=V):V=t[34];let Y;t[35]!==i.length?(Y=i.length===0&&s.jsxRuntimeExports.jsx(rn.EmptyState,{}),t[35]=i.length,t[36]=Y):Y=t[36];let X;t[37]!==nt||t[38]!==ee||t[39]!==ht||t[40]!==d||t[41]!==r||t[42]!==c||t[43]!==It||t[44]!==Tt||t[45]!==Vt||t[46]!==i||t[47]!==Lt||t[48]!==$t||t[49]!==fe||t[50]!==w||t[51]!==M||t[52]!==h||t[53]!==ae||t[54]!==ut||t[55]!==ft||t[56]!==Qt||t[57]!==Ut||t[58]!==et||t[59]!==yt||t[60]!==Rt||t[61]!==vt||t[62]!==pt||t[63]!==p||t[64]!==ce||t[65]!==Ht||t[66]!==St||t[67]!==gt||t[68]!==me||t[69]!==a||t[70]!==tt||t[71]!==I||t[72]!==it||t[73]!==N||t[74]!==T||t[75]!==ue||t[76]!==le?(X=it&&I&&i.length>0?s.jsxRuntimeExports.jsx(fn,{data:i,lineColors:i.filter(Fn).length===0?c?[c]:[B.Colors.primaryColors["blue-600"]]:c||B.Colors[N].categoricalColors.colors,width:it,height:I,dateFormat:Lt,noOfXTicks:et??ln.getNoOfTicks(it),leftMargin:h,rightMargin:ce,topMargin:ue,bottomMargin:ht,tooltip:T,onSeriesMouseOver:Rt,suffix:tt,prefix:pt,highlightAreaSettings:fe,refValues:p,minValue:Qt,maxValue:ut,highlightedLines:w,animate:nt===!0?{duration:.5,once:!0,amount:.5}:nt||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:me,showDots:St,annotations:ee,customHighlightAreaSettings:Tt,yAxisTitle:le,noOfYTicks:yt,minDate:ft,maxDate:ae,curveType:It,styles:a,classNames:d,selectedColor:Ht,showLabels:gt,colorDomain:i.filter(Xn).length===0?[]:r||Ee.uniqBy(i,"color",!0),dimmedOpacity:$t,precision:vt,customLayers:Vt,naLabel:Ut}):null,t[37]=nt,t[38]=ee,t[39]=ht,t[40]=d,t[41]=r,t[42]=c,t[43]=It,t[44]=Tt,t[45]=Vt,t[46]=i,t[47]=Lt,t[48]=$t,t[49]=fe,t[50]=w,t[51]=M,t[52]=h,t[53]=ae,t[54]=ut,t[55]=ft,t[56]=Qt,t[57]=Ut,t[58]=et,t[59]=yt,t[60]=Rt,t[61]=vt,t[62]=pt,t[63]=p,t[64]=ce,t[65]=Ht,t[66]=St,t[67]=gt,t[68]=me,t[69]=a,t[70]=tt,t[71]=I,t[72]=it,t[73]=N,t[74]=T,t[75]=ue,t[76]=le,t[77]=X):X=t[77];let F;t[78]!==Y||t[79]!==X?(F=s.jsxRuntimeExports.jsxs(Ve.GraphArea,{ref:W,children:[Y,X]}),t[78]=Y,t[79]=X,t[80]=F):F=t[80];let P;t[81]!==d?.footnote||t[82]!==d?.source||t[83]!==C||t[84]!==st||t[85]!==a?.footnote||t[86]!==a?.source||t[87]!==g?(P=st||C?s.jsxRuntimeExports.jsx(nn.GraphFooter,{styles:{footnote:a?.footnote,source:a?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:st,footNote:C,width:g}):null,t[81]=d?.footnote,t[82]=d?.source,t[83]=C,t[84]=st,t[85]=a?.footnote,t[86]=a?.source,t[87]=g,t[88]=P):P=t[88];let rt;return t[89]!==S||t[90]!==dt||t[91]!==Kt||t[92]!==U||t[93]!==M||t[94]!==f||t[95]!==ct||t[96]!==se||t[97]!==Gt||t[98]!==Wt||t[99]!==D||t[100]!==V||t[101]!==F||t[102]!==P||t[103]!==N||t[104]!==g?(rt=s.jsxRuntimeExports.jsxs(Ve.GraphContainer,{className:Gt,style:Wt,id:Kt,ref:ne,"aria-label":S,backgroundColor:dt,theme:N,language:M,minHeight:f,width:g,height:U,relativeHeight:se,padding:ct,children:[D,V,F,P]}),t[89]=S,t[90]=dt,t[91]=Kt,t[92]=U,t[93]=M,t[94]=f,t[95]=ct,t[96]=se,t[97]=Gt,t[98]=Wt,t[99]=D,t[100]=V,t[101]=F,t[102]=P,t[103]=N,t[104]=g,t[105]=rt):rt=t[105],rt}function Xn(e){return e.color}function Fn(e){return e.color}function Pn(e){return e.color}function Bn(e){return e!==void 0}function zn(e){return e!==void 0}function Jn(e){return e.data}function Kn(e){return e!==void 0}function Qn(e){return e.data}exports.MultiLineAltChart=Yn;
|
|
2
2
|
//# sourceMappingURL=MultiLineAltChart.cjs.map
|
|
@@ -26,7 +26,7 @@ import { p as mo } from "./pointer-CWRWOsrb.js";
|
|
|
26
26
|
import { u as uo } from "./use-in-view-Dl5L8LtP.js";
|
|
27
27
|
import { GraphFooter as po } from "./GraphFooter.js";
|
|
28
28
|
import { GraphHeader as ho } from "./GraphHeader.js";
|
|
29
|
-
import { E as go } from "./EmptyState-
|
|
29
|
+
import { E as go } from "./EmptyState-dScPFkLy.js";
|
|
30
30
|
import { ColorLegendWithMouseOver as xo } from "./ColorLegendWithMouseOver.js";
|
|
31
31
|
import { a as yo, G as vo } from "./GraphContainer-CF6ws3pd.js";
|
|
32
32
|
import { g as wo } from "./getNoOfTicks-CpmRjcRF.js";
|
package/dist/MultiLineChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),R=require("./parse-xYI9yrvL.cjs"),Be=require("./index-Cno4Q0YE.cjs"),Ue=require("./numberFormattingFunction-02t-wJta.cjs"),ze=require("./Tooltip-BLa2EfMs.cjs"),C=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ge=require("./customArea-B1LWQBmM.cjs"),Je=require("./AxisTitle-DV4n0RxE.cjs"),Ke=require("./Axis-Jt_tmhxS.cjs"),Qe=require("./XTicksAndGridLines-CekrPykD.cjs"),Ze=require("./ReferenceLine-M9aP3dj-.cjs"),_e=require("./YTicksAndGridLines-UzVC5eBM.cjs"),ti=require("./index-D69M6klB.cjs"),ei=require("./time-CkcKbhwe.cjs"),ii=require("./linear-CgUCbw9F.cjs"),Pe=require("./line-DaEMhXmx.cjs"),qe=require("./step-BZ3C8QFW.cjs"),ni=require("./select-Bnfk0lJx.cjs"),Bt=require("./proxy-C4-uo6nS.cjs"),oi=require("./init-DU0ybBc_.cjs"),si=require("./pointer-Dkq5NV1q.cjs"),ri=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./GraphFooter.cjs"),li=require("./GraphHeader.cjs"),ci=require("./ColorLegend.cjs"),ui=require("./Colors.cjs"),di=require("./EmptyState-DX0t62iF.cjs"),xi=require("./generateRandomString-B5zBiJzS.cjs"),We=require("./GraphContainer-B1EDxJ0S.cjs"),fi=require("./getNoOfTicks-C_1CFXv_.cjs");function mi(i){const t=o.compilerRuntimeExports.c(153),{data:y,width:rt,height:zt,lineColors:k,dateFormat:r,noOfXTicks:ge,labels:S,rightMargin:St,topMargin:E,bottomMargin:at,suffix:X,prefix:B,leftMargin:j,tooltip:lt,onSeriesMouseOver:Jt,showValues:ye,showColorLegendAtTop:ve,refValues:Nt,highlightAreaSettings:Kt,minValue:z,maxValue:ct,highlightedLines:ut,animate:s,rtl:J,strokeWidth:Qt,showDots:Zt,annotations:Tt,customHighlightAreaSettings:Dt,yAxisTitle:dt,noOfYTicks:_t,minDate:ce,maxDate:ue,curveType:It,styles:v,classNames:g,dimmedOpacity:de,precision:K,customLayers:Q,dashedLines:xt,dashSettings:qt,labelsToBeHidden:je,revealClipId:ft}=i,te=A.useRef(null);let Mt;t[0]!==s.amount||t[1]!==s.once?(Mt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=Mt):Mt=t[2];const u=ri.useInView(te,Mt),[O,we]=A.useState(!1);let m,d;t[3]!==s.duration||t[4]!==O||t[5]!==u?(m=()=>{if(u&&!O){const n=setTimeout(()=>{we(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(n)}},d=[u,O,s.duration],t[3]=s.duration,t[4]=O,t[5]=u,t[6]=m,t[7]=d):(m=t[6],d=t[7]),A.useEffect(m,d);const Oe=It==="linear"?Pe.curveLinear:It==="step"?qe.curveStep:It==="stepAfter"?qe.stepAfter:It==="stepBefore"?qe.stepBefore:qe.monotoneX,[L,Vt]=A.useState(void 0),[Z,$t]=A.useState(void 0),[_,xe]=A.useState(void 0),q=dt?j+30:j;let mt;t[8]!==at||t[9]!==St||t[10]!==q||t[11]!==E?(mt={top:E,bottom:at,left:q,right:St},t[8]=at,t[9]=St,t[10]=q,t[11]=E,t[12]=mt):mt=t[12];const h=mt,ht=A.useRef(null);let pt;t[13]!==r?(pt=n=>({...n,date:R.parse(`${n.date}`,r,new Date)}),t[13]=r,t[14]=pt):pt=t[14];const x=Be.orderBy(y.map(pt),["date"],["asc"]),fe=x[0].y.map((n,e)=>x.map(f=>({...f,y:f.y[e]})).filter(Ii));let gt;if(t[15]!==r||t[16]!==Kt){let n;t[18]!==r?(n=e=>({...e,coordinates:[e.coordinates[0]===null?null:R.parse(`${e.coordinates[0]}`,r,new Date),e.coordinates[1]===null?null:R.parse(`${e.coordinates[1]}`,r,new Date)]}),t[18]=r,t[19]=n):n=t[19],gt=Kt.map(n),t[15]=r,t[16]=Kt,t[17]=gt}else gt=t[17];const Ht=gt;let yt;if(t[20]!==Dt||t[21]!==r){let n;t[23]!==r?(n=e=>({...e,coordinates:e.coordinates.map((f,st)=>st%2===0?R.parse(`${f}`,r,new Date):f)}),t[23]=r,t[24]=n):n=t[24],yt=Dt.map(n),t[20]=Dt,t[21]=r,t[22]=yt}else yt=t[22];const me=yt,c=rt-h.left-h.right,p=zt-h.top-h.bottom,he=ce?R.parse(`${ce}`,r,new Date):x[0].date,ee=ue?R.parse(`${ue}`,r,new Date):x[x.length-1].date,w=C.checkIfNullOrUndefined(z)?Math.min(...x.map(Ti))?Math.min(...x.map(Si))>0?0:Math.min(...x.map(Li)):0:z,M=Math.max(...x.map(bi))?Math.max(...x.map(Ci)):0,a=ei.time().domain([he,ee]).range([0,c]);let tt;t[25]!==w||t[26]!==z?(tt=C.checkIfNullOrUndefined(z)?w:z,t[25]=w,t[26]=z,t[27]=tt):tt=t[27];let et;t[28]!==M||t[29]!==ct?(et=C.checkIfNullOrUndefined(ct)?M>0?M:0:ct,t[28]=M,t[29]=ct,t[30]=et):et=t[30];const l=ii.linear().domain([tt,et]).range([p,0]).nice(),V=Pe.line().x(n=>a(n.date)).y(n=>l(n.y)).curve(Oe),ie=l.ticks(_t),ne=a.ticks(ge);A.useEffect(()=>{const n=f=>{const st=x[oi.bisectCenter(x.map(Ri),a.invert(si.pointer(f)[0]),0)];Vt(st||x[x.length-1]),xe(f.clientY),$t(f.clientX),Jt?.(st||x[x.length-1])},e=()=>{Vt(void 0),$t(void 0),xe(void 0)};ni.select(ht.current).on("mousemove",n).on("mouseout",e),Jt?.(void 0)},[a,x,Jt]);let vt;t[31]===Symbol.for("react.memo_cache_sentinel")?(vt={width:0},t[31]=vt):vt=t[31];let N;t[32]!==s.duration?(N={duration:s.duration},t[32]=s.duration,t[33]=N):N=t[33];let $;t[34]!==c||t[35]!==N?($={initial:vt,whileInView:{width:c,transition:N}},t[34]=c,t[35]=N,t[36]=$):$=t[36];const jt=u?"whileInView":"initial";let H;t[37]!==p||t[38]!==$||t[39]!==jt?(H=o.jsxRuntimeExports.jsx(Bt.motion.rect,{x:0,y:0,height:p,variants:$,initial:"initial",animate:jt}),t[37]=p,t[38]=$,t[39]=jt,t[40]=H):H=t[40];let wt;t[41]!==ft||t[42]!==H?(wt=o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsx("clipPath",{id:ft,children:H})}),t[41]=ft,t[42]=H,t[43]=wt):wt=t[43];let Ot;t[44]!==s||t[45]!==p||t[46]!==c||t[47]!==Ht||t[48]!==u||t[49]!==a?(Ot=o.jsxRuntimeExports.jsx(ti.HighlightArea,{areaSettings:Ht,width:c,height:p,scale:a,animate:s,isInView:u}),t[44]=s,t[45]=p,t[46]=c,t[47]=Ht,t[48]=u,t[49]=a,t[50]=Ot):Ot=t[50];const Ft=v?.yAxis?.gridLines,Gt=v?.yAxis?.labels;let Rt;t[51]!==Ft||t[52]!==Gt?(Rt={gridLines:Ft,labels:Gt},t[51]=Ft,t[52]=Gt,t[53]=Rt):Rt=t[53];const Ct=g?.yAxis?.gridLines,Ut=g?.yAxis?.labels;let it;t[54]!==Ct||t[55]!==Ut?(it={gridLines:Ct,labels:Ut},t[54]=Ct,t[55]=Ut,t[56]=it):it=t[56];const Pt=l(w<0?0:w),Et=l(w<0?0:w),Wt=0-j,bt=c+h.right,F=w<0?0:w;let b;t[57]!==K||t[58]!==B||t[59]!==X||t[60]!==F?(b=Ue.numberFormattingFunction(F,"NA",K,B,X),t[57]=K,t[58]=B,t[59]=X,t[60]=F,t[61]=b):b=t[61];const nt=0-j,pe=l(w<0?0:w),At=M<0?"1em":-5;let Lt;t[62]!==nt||t[63]!==pe||t[64]!==At?(Lt={x:nt,y:pe,dx:0,dy:At},t[62]=nt,t[63]=pe,t[64]=At,t[65]=Lt):Lt=t[65];const Yt=g?.xAxis?.axis,oe=g?.yAxis?.labels;let T;t[66]!==Yt||t[67]!==oe?(T={axis:Yt,label:oe},t[66]=Yt,t[67]=oe,t[68]=T):T=t[68];const kt=v?.xAxis?.axis,Xt=v?.yAxis?.labels;let G;t[69]!==kt||t[70]!==Xt?(G={axis:kt,label:Xt},t[69]=kt,t[70]=Xt,t[71]=G):G=t[71];let D;t[72]!==Pt||t[73]!==Et||t[74]!==Wt||t[75]!==bt||t[76]!==b||t[77]!==Lt||t[78]!==T||t[79]!==G?(D=o.jsxRuntimeExports.jsx(Ke.Axis,{y1:Pt,y2:Et,x1:Wt,x2:bt,label:b,labelPos:Lt,classNames:T,styles:G}),t[72]=Pt,t[73]=Et,t[74]=Wt,t[75]=bt,t[76]=b,t[77]=Lt,t[78]=T,t[79]=G,t[80]=D):D=t[80];const U=0-j-15,P=p/2,W=v?.yAxis?.title,Y=g?.yAxis?.title;let I;t[81]!==U||t[82]!==P||t[83]!==W||t[84]!==Y||t[85]!==dt?(I=o.jsxRuntimeExports.jsx(Je.AxisTitle,{x:U,y:P,style:W,className:Y,text:dt,rotate90:!0}),t[81]=U,t[82]=P,t[83]=W,t[84]=Y,t[85]=dt,t[86]=I):I=t[86];let ot;t[87]!==r?(ot=n=>R.format(n,r),t[87]=r,t[88]=ot):ot=t[88];const Re=ne.map(ot),Ce=ne.map(n=>a(n)),Me=v?.xAxis?.gridLines,Ve=v?.xAxis?.labels;let Ee;t[89]!==Me||t[90]!==Ve?(Ee={gridLines:Me,labels:Ve},t[89]=Me,t[90]=Ve,t[91]=Ee):Ee=t[91];const $e=g?.xAxis?.gridLines;let se;t[92]!==$e?(se=o.mo("opacity-0",$e),t[92]=$e,t[93]=se):se=t[93];const He=g?.xAxis?.labels;let re;t[94]!==He?(re=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",He),t[94]=He,t[95]=re):re=t[95];let be;t[96]!==se||t[97]!==re?(be={gridLines:se,labels:re},t[96]=se,t[97]=re,t[98]=be):be=t[98];let Ae;t[99]!==Q?(Ae=Q.filter(ji).map(vi),t[99]=Q,t[100]=Ae):Ae=t[100];const Fe=fe.map((n,e)=>o.jsxRuntimeExports.jsxs(Bt.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:ut.length!==0?ut.indexOf(S[e])!==-1?1:de:1},whileInView:{opacity:ut.length!==0?ut.indexOf(S[e])!==-1?1:de:1,transition:{duration:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:[o.jsxRuntimeExports.jsx(Bt.motion.path,{style:{fill:"none",strokeWidth:Qt},clipPath:`url(#${ft})`,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{...xt.length===0?{pathLength:0}:{},d:V(n.filter(yi))||"",opacity:1,stroke:k[e]},whileInView:{...xt.length===0?{pathLength:1}:{},d:V(n.filter(gi))||"",opacity:1,stroke:k[e],transition:{duration:s.duration}}},strokeDasharray:xt.includes(S[e])?qt[e%qt.length]:void 0,initial:"initial",animate:u?"whileInView":"initial"}),n.map((f,st)=>o.jsxRuntimeExports.jsx("g",{children:C.checkIfNullOrUndefined(f.y)?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[Zt?o.jsxRuntimeExports.jsx(Bt.motion.circle,{r:c/x.length<5?0:c/x.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],cx:a(f.date),cy:l(f.y)},whileInView:{opacity:1,fill:k[e],transition:{duration:O?s.duration:.5,delay:O?0:s.duration},cx:a(f.date),cy:l(f.y)}},initial:"initial",animate:u?"whileInView":"initial"}):null,ye?o.jsxRuntimeExports.jsx(Bt.motion.text,{dy:-8,style:{textAnchor:"middle",...v?.graphObjectValues||{}},className:o.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(f.date),y:l(f.y)},whileInView:{opacity:1,fill:k[e],x:a(f.date),y:l(f.y),transition:{duration:O?s.duration:.5,delay:O?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:Ue.numberFormattingFunction(f.y,"NA",K,B,X)}):null]})},st)),ve||je.includes(S[e])?null:o.jsxRuntimeExports.jsx(Bt.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y)},whileInView:{opacity:1,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y),transition:{duration:O?s.duration:.5,delay:O?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:S[e]})]},S[e]));let ae;t[101]!==g?.mouseOverLine||t[102]!==p||t[103]!==L||t[104]!==v?.mouseOverLine||t[105]!==a?(ae=L?o.jsxRuntimeExports.jsx("line",{y1:0,y2:p,x1:a(L.date),x2:a(L.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:v?.mouseOverLine}):null,t[101]=g?.mouseOverLine,t[102]=p,t[103]=L,t[104]=v?.mouseOverLine,t[105]=a,t[106]=ae):ae=t[106];let Le;t[107]!==Fe||t[108]!==ae?(Le=o.jsxRuntimeExports.jsxs("g",{children:[Fe,ae]}),t[107]=Fe,t[108]=ae,t[109]=Le):Le=t[109];let ke;t[110]!==s||t[111]!==c||t[112]!==u||t[113]!==j||t[114]!==h.right||t[115]!==Nt||t[116]!==l?(ke=Nt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Nt.map((n,e)=>o.jsxRuntimeExports.jsx(Ze.RefLineY,{text:n.text,color:n.color,y:l(n.value),x1:0-j,x2:c+h.right,classNames:n.classNames,styles:n.styles,animate:s,isInView:u},e))}):null,t[110]=s,t[111]=c,t[112]=u,t[113]=j,t[114]=h.right,t[115]=Nt,t[116]=l,t[117]=ke):ke=t[117];let le;if(t[118]!==s||t[119]!==Tt||t[120]!==r||t[121]!==c||t[122]!==u||t[123]!==h.right||t[124]!==J||t[125]!==a||t[126]!==l){let n;t[128]!==s||t[129]!==r||t[130]!==c||t[131]!==u||t[132]!==h.right||t[133]!==J||t[134]!==a||t[135]!==l?(n=(e,f)=>{const st=Ge.getLineEndPoint({x:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},C.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Ye=e.showConnector?{y1:st.y,x1:st.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date)):0,circleRadius:C.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Xe={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:J?0:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:J?e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0):c+h.right-(e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(Ge.Annotation,{color:e.color,connectorsSettings:Ye,labelSettings:Xe,text:e.text,classNames:e.classNames,styles:e.styles,animate:s,isInView:u},f)},t[128]=s,t[129]=r,t[130]=c,t[131]=u,t[132]=h.right,t[133]=J,t[134]=a,t[135]=l,t[136]=n):n=t[136],le=Tt.map(n),t[118]=s,t[119]=Tt,t[120]=r,t[121]=c,t[122]=u,t[123]=h.right,t[124]=J,t[125]=a,t[126]=l,t[127]=le}else le=t[127];let Se;t[137]!==le?(Se=o.jsxRuntimeExports.jsx("g",{children:le}),t[137]=le,t[138]=Se):Se=t[138];let Ne;t[139]!==Q?(Ne=Q.filter(pi).map(hi),t[139]=Q,t[140]=Ne):Ne=t[140];let Te;t[141]===Symbol.for("react.memo_cache_sentinel")?(Te={fill:"none",pointerEvents:"all"},t[141]=Te):Te=t[141];let De;t[142]!==ht||t[143]!==p||t[144]!==c?(De=o.jsxRuntimeExports.jsx("rect",{ref:ht,style:Te,width:c,height:p}),t[142]=ht,t[143]=p,t[144]=c,t[145]=De):De=t[145];let Ie;return t[146]!==g?.tooltip||t[147]!==Z||t[148]!==_||t[149]!==L||t[150]!==v?.tooltip||t[151]!==lt?(Ie=L&<&&Z&&_?o.jsxRuntimeExports.jsx(ze.Tooltip,{data:L,body:lt,xPos:Z,yPos:_,backgroundStyle:v?.tooltip,className:g?.tooltip}):null,t[146]=g?.tooltip,t[147]=Z,t[148]=_,t[149]=L,t[150]=v?.tooltip,t[151]=lt,t[152]=Ie):Ie=t[152],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Bt.motion.svg,{width:`${rt}px`,height:`${zt}px`,viewBox:`0 0 ${rt} ${zt}`,direction:"ltr",ref:te,children:o.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[wt,Ot,o.jsxRuntimeExports.jsx(Ge.CustomArea,{areaSettings:me,scaleX:a,scaleY:l,animate:s,isInView:u}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(_e.YTicksAndGridLines,{values:ie.filter(Oi),y:ie.filter(wi).map(n=>l(n)),x1:0-j,x2:c+h.right,styles:Rt,classNames:it,suffix:X,prefix:B,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:K}),D,I]}),o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:Re,x:Ce,y1:0,y2:p,styles:Ee,classNames:be,suffix:X,prefix:B,labelType:"primary",showGridLines:!0,precision:K})}),Ae,Le,ke,Se,Ne,De]})}),Ie]})}function hi(i){return i.layer}function pi(i){return i.position==="after"}function gi(i){return!C.checkIfNullOrUndefined(i.y)}function yi(i){return!C.checkIfNullOrUndefined(i.y)}function vi(i){return i.layer}function ji(i){return i.position==="before"}function wi(i){return i!==0}function Oi(i){return i!==0}function Ri(i){return i.date}function Ci(i){return Math.max(...i.y.filter(Ei))}function Ei(i){return!C.checkIfNullOrUndefined(i)}function bi(i){return Math.max(...i.y.filter(Ai))}function Ai(i){return!C.checkIfNullOrUndefined(i)}function Li(i){return Math.min(...i.y.filter(ki))}function ki(i){return!C.checkIfNullOrUndefined(i)}function Si(i){return Math.min(...i.y.filter(Ni))}function Ni(i){return!C.checkIfNullOrUndefined(i)}function Ti(i){return Math.min(...i.y.filter(Di))}function Di(i){return!C.checkIfNullOrUndefined(i)}function Ii(i){return!C.checkIfNullOrUndefined(i.y)}function qi(i){const t=o.compilerRuntimeExports.c(113),{data:y,graphTitle:rt,lineColors:zt,suffix:k,sources:r,prefix:ge,graphDescription:S,height:St,width:E,footNote:at,noOfXTicks:X,dateFormat:B,labels:j,padding:lt,showValues:Jt,backgroundColor:ye,leftMargin:ve,rightMargin:Nt,topMargin:Kt,bottomMargin:z,tooltip:ct,relativeHeight:ut,onSeriesMouseOver:s,showColorLegendAtTop:J,refValues:Qt,highlightAreaSettings:Zt,graphID:Tt,minValue:Dt,maxValue:dt,highlightedLines:_t,graphDownload:ce,dataDownload:ue,animate:It,language:v,colorLegendTitle:g,minHeight:de,strokeWidth:K,showDots:Q,annotations:xt,customHighlightAreaSettings:qt,theme:je,ariaLabel:ft,yAxisTitle:te,noOfYTicks:Mt,minDate:u,maxDate:O,curveType:we,styles:m,classNames:d,dimmedOpacity:Oe,precision:L,customLayers:Vt,dashedLines:Z,dashSettings:$t,labelsToBeHidden:_,showColorScale:xe}=i,q=zt===void 0?ui.Colors.light.categoricalColors.colors:zt,mt=k===void 0?"":k,h=ge===void 0?"":ge,ht=X===void 0?10:X,pt=B===void 0?"yyyy":B,x=Jt===void 0?!1:Jt,fe=ye===void 0?!1:ye,gt=ve===void 0?30:ve,Ht=Nt===void 0?50:Nt,yt=Kt===void 0?20:Kt,me=z===void 0?25:z,c=J===void 0?!1:J;let p;t[0]!==Qt?(p=Qt===void 0?[]:Qt,t[0]=Qt,t[1]=p):p=t[1];const he=p;let ee;t[2]!==Zt?(ee=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=ee):ee=t[3];const w=ee;let M;t[4]!==_t?(M=_t===void 0?[]:_t,t[4]=_t,t[5]=M):M=t[5];const a=M,tt=ce===void 0?!1:ce,et=ue===void 0?!1:ue,l=It===void 0?!1:It,V=v===void 0?"en":v,ie=de===void 0?0:de,ne=K===void 0?2:K,vt=Q===void 0?!0:Q;let N;t[6]!==xt?(N=xt===void 0?[]:xt,t[6]=xt,t[7]=N):N=t[7];const $=N;let jt;t[8]!==qt?(jt=qt===void 0?[]:qt,t[8]=qt,t[9]=jt):jt=t[9];const H=jt,wt=je===void 0?"light":je,Ot=Mt===void 0?5:Mt,Ft=we===void 0?"curve":we,Gt=Oe===void 0?.3:Oe,Rt=L===void 0?2:L;let Ct;t[10]!==Vt?(Ct=Vt===void 0?[]:Vt,t[10]=Vt,t[11]=Ct):Ct=t[11];const Ut=Ct;let it;t[12]!==Z?(it=Z===void 0?[]:Z,t[12]=Z,t[13]=it):it=t[13];const Pt=it;let Et;t[14]!==$t?(Et=$t===void 0?["5 5"]:$t,t[14]=$t,t[15]=Et):Et=t[15];const Wt=Et;let bt;t[16]!==_?(bt=_===void 0?[]:_,t[16]=_,t[17]=bt):bt=t[17];const F=bt,b=xe===void 0?!0:xe,[nt,pe]=A.useState(0),[At,Lt]=A.useState(0),Yt=A.useRef(null),oe=A.useRef(null);let T,kt;t[18]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const Re=new ResizeObserver(Ce=>{pe(Ce[0].target.clientWidth||620),Lt(Ce[0].target.clientHeight||480)});return Yt.current&&Re.observe(Yt.current),()=>Re.disconnect()},kt=[],t[18]=T,t[19]=kt):(T=t[18],kt=t[19]),A.useEffect(T,kt);const Xt=d?.graphContainer,G=m?.graphContainer;let D;t[20]!==d?.description||t[21]!==d?.title||t[22]!==y||t[23]!==et||t[24]!==S||t[25]!==tt||t[26]!==rt||t[27]!==m?.description||t[28]!==m?.title||t[29]!==E?(D=rt||S||tt||et?o.jsxRuntimeExports.jsx(li.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:d?.title,description:d?.description},graphTitle:rt,graphDescription:S,width:E,graphDownload:tt?oe:void 0,dataDownload:et?y.map(Fi).filter(Hi).length>0?y.map($i).filter(Vi):y.filter(Mi):null}):null,t[20]=d?.description,t[21]=d?.title,t[22]=y,t[23]=et,t[24]=S,t[25]=tt,t[26]=rt,t[27]=m?.description,t[28]=m?.title,t[29]=E,t[30]=D):D=t[30];let U;t[31]!==d?.colorLegend||t[32]!==g||t[33]!==y.length||t[34]!==j||t[35]!==F||t[36]!==q||t[37]!==c||t[38]!==b?(U=c&&b&&y.length>0?o.jsxRuntimeExports.jsx(ci.ColorLegend,{colorDomain:j,colorLegendTitle:g,labelsToBeHidden:F,colors:q,showNAColor:!1,className:d?.colorLegend}):null,t[31]=d?.colorLegend,t[32]=g,t[33]=y.length,t[34]=j,t[35]=F,t[36]=q,t[37]=c,t[38]=b,t[39]=U):U=t[39];let P;t[40]!==y.length?(P=y.length===0&&o.jsxRuntimeExports.jsx(di.EmptyState,{}),t[40]=y.length,t[41]=P):P=t[41];let W;t[42]!==l||t[43]!==$||t[44]!==me||t[45]!==d||t[46]!==Ft||t[47]!==H||t[48]!==Ut||t[49]!==Wt||t[50]!==Pt||t[51]!==y||t[52]!==pt||t[53]!==Gt||t[54]!==w||t[55]!==a||t[56]!==j||t[57]!==F||t[58]!==V||t[59]!==gt||t[60]!==q||t[61]!==O||t[62]!==dt||t[63]!==u||t[64]!==Dt||t[65]!==ht||t[66]!==Ot||t[67]!==s||t[68]!==Rt||t[69]!==h||t[70]!==he||t[71]!==Ht||t[72]!==c||t[73]!==b||t[74]!==vt||t[75]!==x||t[76]!==ne||t[77]!==m||t[78]!==mt||t[79]!==At||t[80]!==nt||t[81]!==ct||t[82]!==yt||t[83]!==te?(W=nt&&At&&y.length>0?o.jsxRuntimeExports.jsx(mi,{data:y,lineColors:q,width:nt,height:At,dateFormat:pt,noOfXTicks:ht??fi.getNoOfTicks(nt),leftMargin:gt,rightMargin:Ht,topMargin:yt,bottomMargin:me,labels:j,tooltip:ct,onSeriesMouseOver:s,showColorLegendAtTop:b?c:!0,showValues:x,suffix:mt,prefix:h,highlightAreaSettings:w,refValues:he,minValue:Dt,maxValue:dt,highlightedLines:a,animate:l===!0?{duration:.5,once:!0,amount:.5}:l||{duration:0,once:!0,amount:0},rtl:V==="he"||V==="ar",strokeWidth:ne,showDots:vt,annotations:$,customHighlightAreaSettings:H,yAxisTitle:te,noOfYTicks:Ot,minDate:u,maxDate:O,curveType:Ft,styles:m,classNames:d,dimmedOpacity:Gt,precision:Rt,customLayers:Ut,labelsToBeHidden:F,dashedLines:Pt,dashSettings:Wt,revealClipId:xi.generateRandomString(8)}):null,t[42]=l,t[43]=$,t[44]=me,t[45]=d,t[46]=Ft,t[47]=H,t[48]=Ut,t[49]=Wt,t[50]=Pt,t[51]=y,t[52]=pt,t[53]=Gt,t[54]=w,t[55]=a,t[56]=j,t[57]=F,t[58]=V,t[59]=gt,t[60]=q,t[61]=O,t[62]=dt,t[63]=u,t[64]=Dt,t[65]=ht,t[66]=Ot,t[67]=s,t[68]=Rt,t[69]=h,t[70]=he,t[71]=Ht,t[72]=c,t[73]=b,t[74]=vt,t[75]=x,t[76]=ne,t[77]=m,t[78]=mt,t[79]=At,t[80]=nt,t[81]=ct,t[82]=yt,t[83]=te,t[84]=W):W=t[84];let Y;t[85]!==P||t[86]!==W?(Y=o.jsxRuntimeExports.jsxs(We.GraphArea,{ref:Yt,children:[P,W]}),t[85]=P,t[86]=W,t[87]=Y):Y=t[87];let I;t[88]!==d?.footnote||t[89]!==d?.source||t[90]!==at||t[91]!==r||t[92]!==m?.footnote||t[93]!==m?.source||t[94]!==E?(I=r||at?o.jsxRuntimeExports.jsx(ai.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:r,footNote:at,width:E}):null,t[88]=d?.footnote,t[89]=d?.source,t[90]=at,t[91]=r,t[92]=m?.footnote,t[93]=m?.source,t[94]=E,t[95]=I):I=t[95];let ot;return t[96]!==ft||t[97]!==fe||t[98]!==Tt||t[99]!==St||t[100]!==V||t[101]!==ie||t[102]!==lt||t[103]!==ut||t[104]!==Xt||t[105]!==G||t[106]!==D||t[107]!==U||t[108]!==Y||t[109]!==I||t[110]!==wt||t[111]!==E?(ot=o.jsxRuntimeExports.jsxs(We.GraphContainer,{className:Xt,style:G,id:Tt,ref:oe,"aria-label":ft,backgroundColor:fe,theme:wt,language:V,minHeight:ie,width:E,height:St,relativeHeight:ut,padding:lt,children:[D,U,Y,I]}),t[96]=ft,t[97]=fe,t[98]=Tt,t[99]=St,t[100]=V,t[101]=ie,t[102]=lt,t[103]=ut,t[104]=Xt,t[105]=G,t[106]=D,t[107]=U,t[108]=Y,t[109]=I,t[110]=wt,t[111]=E,t[112]=ot):ot=t[112],ot}function Mi(i){return i!==void 0}function Vi(i){return i!==void 0}function $i(i){return i.data}function Hi(i){return i!==void 0}function Fi(i){return i.data}exports.MultiLineChart=qi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),R=require("./parse-xYI9yrvL.cjs"),Be=require("./index-Cno4Q0YE.cjs"),Ue=require("./numberFormattingFunction-02t-wJta.cjs"),ze=require("./Tooltip-BLa2EfMs.cjs"),C=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ge=require("./customArea-B1LWQBmM.cjs"),Je=require("./AxisTitle-DV4n0RxE.cjs"),Ke=require("./Axis-Jt_tmhxS.cjs"),Qe=require("./XTicksAndGridLines-CekrPykD.cjs"),Ze=require("./ReferenceLine-M9aP3dj-.cjs"),_e=require("./YTicksAndGridLines-UzVC5eBM.cjs"),ti=require("./index-D69M6klB.cjs"),ei=require("./time-CkcKbhwe.cjs"),ii=require("./linear-CgUCbw9F.cjs"),Pe=require("./line-DaEMhXmx.cjs"),qe=require("./step-BZ3C8QFW.cjs"),ni=require("./select-Bnfk0lJx.cjs"),Bt=require("./proxy-C4-uo6nS.cjs"),oi=require("./init-DU0ybBc_.cjs"),si=require("./pointer-Dkq5NV1q.cjs"),ri=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./GraphFooter.cjs"),li=require("./GraphHeader.cjs"),ci=require("./ColorLegend.cjs"),ui=require("./Colors.cjs"),di=require("./EmptyState-N1eHt3vq.cjs"),xi=require("./generateRandomString-B5zBiJzS.cjs"),We=require("./GraphContainer-B1EDxJ0S.cjs"),fi=require("./getNoOfTicks-C_1CFXv_.cjs");function mi(i){const t=o.compilerRuntimeExports.c(153),{data:y,width:rt,height:zt,lineColors:k,dateFormat:r,noOfXTicks:ge,labels:S,rightMargin:St,topMargin:E,bottomMargin:at,suffix:X,prefix:B,leftMargin:j,tooltip:lt,onSeriesMouseOver:Jt,showValues:ye,showColorLegendAtTop:ve,refValues:Nt,highlightAreaSettings:Kt,minValue:z,maxValue:ct,highlightedLines:ut,animate:s,rtl:J,strokeWidth:Qt,showDots:Zt,annotations:Tt,customHighlightAreaSettings:Dt,yAxisTitle:dt,noOfYTicks:_t,minDate:ce,maxDate:ue,curveType:It,styles:v,classNames:g,dimmedOpacity:de,precision:K,customLayers:Q,dashedLines:xt,dashSettings:qt,labelsToBeHidden:je,revealClipId:ft}=i,te=A.useRef(null);let Mt;t[0]!==s.amount||t[1]!==s.once?(Mt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=Mt):Mt=t[2];const u=ri.useInView(te,Mt),[O,we]=A.useState(!1);let m,d;t[3]!==s.duration||t[4]!==O||t[5]!==u?(m=()=>{if(u&&!O){const n=setTimeout(()=>{we(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(n)}},d=[u,O,s.duration],t[3]=s.duration,t[4]=O,t[5]=u,t[6]=m,t[7]=d):(m=t[6],d=t[7]),A.useEffect(m,d);const Oe=It==="linear"?Pe.curveLinear:It==="step"?qe.curveStep:It==="stepAfter"?qe.stepAfter:It==="stepBefore"?qe.stepBefore:qe.monotoneX,[L,Vt]=A.useState(void 0),[Z,$t]=A.useState(void 0),[_,xe]=A.useState(void 0),q=dt?j+30:j;let mt;t[8]!==at||t[9]!==St||t[10]!==q||t[11]!==E?(mt={top:E,bottom:at,left:q,right:St},t[8]=at,t[9]=St,t[10]=q,t[11]=E,t[12]=mt):mt=t[12];const h=mt,ht=A.useRef(null);let pt;t[13]!==r?(pt=n=>({...n,date:R.parse(`${n.date}`,r,new Date)}),t[13]=r,t[14]=pt):pt=t[14];const x=Be.orderBy(y.map(pt),["date"],["asc"]),fe=x[0].y.map((n,e)=>x.map(f=>({...f,y:f.y[e]})).filter(Ii));let gt;if(t[15]!==r||t[16]!==Kt){let n;t[18]!==r?(n=e=>({...e,coordinates:[e.coordinates[0]===null?null:R.parse(`${e.coordinates[0]}`,r,new Date),e.coordinates[1]===null?null:R.parse(`${e.coordinates[1]}`,r,new Date)]}),t[18]=r,t[19]=n):n=t[19],gt=Kt.map(n),t[15]=r,t[16]=Kt,t[17]=gt}else gt=t[17];const Ht=gt;let yt;if(t[20]!==Dt||t[21]!==r){let n;t[23]!==r?(n=e=>({...e,coordinates:e.coordinates.map((f,st)=>st%2===0?R.parse(`${f}`,r,new Date):f)}),t[23]=r,t[24]=n):n=t[24],yt=Dt.map(n),t[20]=Dt,t[21]=r,t[22]=yt}else yt=t[22];const me=yt,c=rt-h.left-h.right,p=zt-h.top-h.bottom,he=ce?R.parse(`${ce}`,r,new Date):x[0].date,ee=ue?R.parse(`${ue}`,r,new Date):x[x.length-1].date,w=C.checkIfNullOrUndefined(z)?Math.min(...x.map(Ti))?Math.min(...x.map(Si))>0?0:Math.min(...x.map(Li)):0:z,M=Math.max(...x.map(bi))?Math.max(...x.map(Ci)):0,a=ei.time().domain([he,ee]).range([0,c]);let tt;t[25]!==w||t[26]!==z?(tt=C.checkIfNullOrUndefined(z)?w:z,t[25]=w,t[26]=z,t[27]=tt):tt=t[27];let et;t[28]!==M||t[29]!==ct?(et=C.checkIfNullOrUndefined(ct)?M>0?M:0:ct,t[28]=M,t[29]=ct,t[30]=et):et=t[30];const l=ii.linear().domain([tt,et]).range([p,0]).nice(),V=Pe.line().x(n=>a(n.date)).y(n=>l(n.y)).curve(Oe),ie=l.ticks(_t),ne=a.ticks(ge);A.useEffect(()=>{const n=f=>{const st=x[oi.bisectCenter(x.map(Ri),a.invert(si.pointer(f)[0]),0)];Vt(st||x[x.length-1]),xe(f.clientY),$t(f.clientX),Jt?.(st||x[x.length-1])},e=()=>{Vt(void 0),$t(void 0),xe(void 0)};ni.select(ht.current).on("mousemove",n).on("mouseout",e),Jt?.(void 0)},[a,x,Jt]);let vt;t[31]===Symbol.for("react.memo_cache_sentinel")?(vt={width:0},t[31]=vt):vt=t[31];let N;t[32]!==s.duration?(N={duration:s.duration},t[32]=s.duration,t[33]=N):N=t[33];let $;t[34]!==c||t[35]!==N?($={initial:vt,whileInView:{width:c,transition:N}},t[34]=c,t[35]=N,t[36]=$):$=t[36];const jt=u?"whileInView":"initial";let H;t[37]!==p||t[38]!==$||t[39]!==jt?(H=o.jsxRuntimeExports.jsx(Bt.motion.rect,{x:0,y:0,height:p,variants:$,initial:"initial",animate:jt}),t[37]=p,t[38]=$,t[39]=jt,t[40]=H):H=t[40];let wt;t[41]!==ft||t[42]!==H?(wt=o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsx("clipPath",{id:ft,children:H})}),t[41]=ft,t[42]=H,t[43]=wt):wt=t[43];let Ot;t[44]!==s||t[45]!==p||t[46]!==c||t[47]!==Ht||t[48]!==u||t[49]!==a?(Ot=o.jsxRuntimeExports.jsx(ti.HighlightArea,{areaSettings:Ht,width:c,height:p,scale:a,animate:s,isInView:u}),t[44]=s,t[45]=p,t[46]=c,t[47]=Ht,t[48]=u,t[49]=a,t[50]=Ot):Ot=t[50];const Ft=v?.yAxis?.gridLines,Gt=v?.yAxis?.labels;let Rt;t[51]!==Ft||t[52]!==Gt?(Rt={gridLines:Ft,labels:Gt},t[51]=Ft,t[52]=Gt,t[53]=Rt):Rt=t[53];const Ct=g?.yAxis?.gridLines,Ut=g?.yAxis?.labels;let it;t[54]!==Ct||t[55]!==Ut?(it={gridLines:Ct,labels:Ut},t[54]=Ct,t[55]=Ut,t[56]=it):it=t[56];const Pt=l(w<0?0:w),Et=l(w<0?0:w),Wt=0-j,bt=c+h.right,F=w<0?0:w;let b;t[57]!==K||t[58]!==B||t[59]!==X||t[60]!==F?(b=Ue.numberFormattingFunction(F,"NA",K,B,X),t[57]=K,t[58]=B,t[59]=X,t[60]=F,t[61]=b):b=t[61];const nt=0-j,pe=l(w<0?0:w),At=M<0?"1em":-5;let Lt;t[62]!==nt||t[63]!==pe||t[64]!==At?(Lt={x:nt,y:pe,dx:0,dy:At},t[62]=nt,t[63]=pe,t[64]=At,t[65]=Lt):Lt=t[65];const Yt=g?.xAxis?.axis,oe=g?.yAxis?.labels;let T;t[66]!==Yt||t[67]!==oe?(T={axis:Yt,label:oe},t[66]=Yt,t[67]=oe,t[68]=T):T=t[68];const kt=v?.xAxis?.axis,Xt=v?.yAxis?.labels;let G;t[69]!==kt||t[70]!==Xt?(G={axis:kt,label:Xt},t[69]=kt,t[70]=Xt,t[71]=G):G=t[71];let D;t[72]!==Pt||t[73]!==Et||t[74]!==Wt||t[75]!==bt||t[76]!==b||t[77]!==Lt||t[78]!==T||t[79]!==G?(D=o.jsxRuntimeExports.jsx(Ke.Axis,{y1:Pt,y2:Et,x1:Wt,x2:bt,label:b,labelPos:Lt,classNames:T,styles:G}),t[72]=Pt,t[73]=Et,t[74]=Wt,t[75]=bt,t[76]=b,t[77]=Lt,t[78]=T,t[79]=G,t[80]=D):D=t[80];const U=0-j-15,P=p/2,W=v?.yAxis?.title,Y=g?.yAxis?.title;let I;t[81]!==U||t[82]!==P||t[83]!==W||t[84]!==Y||t[85]!==dt?(I=o.jsxRuntimeExports.jsx(Je.AxisTitle,{x:U,y:P,style:W,className:Y,text:dt,rotate90:!0}),t[81]=U,t[82]=P,t[83]=W,t[84]=Y,t[85]=dt,t[86]=I):I=t[86];let ot;t[87]!==r?(ot=n=>R.format(n,r),t[87]=r,t[88]=ot):ot=t[88];const Re=ne.map(ot),Ce=ne.map(n=>a(n)),Me=v?.xAxis?.gridLines,Ve=v?.xAxis?.labels;let Ee;t[89]!==Me||t[90]!==Ve?(Ee={gridLines:Me,labels:Ve},t[89]=Me,t[90]=Ve,t[91]=Ee):Ee=t[91];const $e=g?.xAxis?.gridLines;let se;t[92]!==$e?(se=o.mo("opacity-0",$e),t[92]=$e,t[93]=se):se=t[93];const He=g?.xAxis?.labels;let re;t[94]!==He?(re=o.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",He),t[94]=He,t[95]=re):re=t[95];let be;t[96]!==se||t[97]!==re?(be={gridLines:se,labels:re},t[96]=se,t[97]=re,t[98]=be):be=t[98];let Ae;t[99]!==Q?(Ae=Q.filter(ji).map(vi),t[99]=Q,t[100]=Ae):Ae=t[100];const Fe=fe.map((n,e)=>o.jsxRuntimeExports.jsxs(Bt.motion.g,{exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:ut.length!==0?ut.indexOf(S[e])!==-1?1:de:1},whileInView:{opacity:ut.length!==0?ut.indexOf(S[e])!==-1?1:de:1,transition:{duration:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:[o.jsxRuntimeExports.jsx(Bt.motion.path,{style:{fill:"none",strokeWidth:Qt},clipPath:`url(#${ft})`,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{...xt.length===0?{pathLength:0}:{},d:V(n.filter(yi))||"",opacity:1,stroke:k[e]},whileInView:{...xt.length===0?{pathLength:1}:{},d:V(n.filter(gi))||"",opacity:1,stroke:k[e],transition:{duration:s.duration}}},strokeDasharray:xt.includes(S[e])?qt[e%qt.length]:void 0,initial:"initial",animate:u?"whileInView":"initial"}),n.map((f,st)=>o.jsxRuntimeExports.jsx("g",{children:C.checkIfNullOrUndefined(f.y)?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[Zt?o.jsxRuntimeExports.jsx(Bt.motion.circle,{r:c/x.length<5?0:c/x.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],cx:a(f.date),cy:l(f.y)},whileInView:{opacity:1,fill:k[e],transition:{duration:O?s.duration:.5,delay:O?0:s.duration},cx:a(f.date),cy:l(f.y)}},initial:"initial",animate:u?"whileInView":"initial"}):null,ye?o.jsxRuntimeExports.jsx(Bt.motion.text,{dy:-8,style:{textAnchor:"middle",...v?.graphObjectValues||{}},className:o.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(f.date),y:l(f.y)},whileInView:{opacity:1,fill:k[e],x:a(f.date),y:l(f.y),transition:{duration:O?s.duration:.5,delay:O?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:Ue.numberFormattingFunction(f.y,"NA",K,B,X)}):null]})},st)),ve||je.includes(S[e])?null:o.jsxRuntimeExports.jsx(Bt.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y)},whileInView:{opacity:1,fill:k[e],x:a(n[n.length-1].date),y:l(n[n.length-1].y),transition:{duration:O?s.duration:.5,delay:O?0:s.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:S[e]})]},S[e]));let ae;t[101]!==g?.mouseOverLine||t[102]!==p||t[103]!==L||t[104]!==v?.mouseOverLine||t[105]!==a?(ae=L?o.jsxRuntimeExports.jsx("line",{y1:0,y2:p,x1:a(L.date),x2:a(L.date),className:o.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:v?.mouseOverLine}):null,t[101]=g?.mouseOverLine,t[102]=p,t[103]=L,t[104]=v?.mouseOverLine,t[105]=a,t[106]=ae):ae=t[106];let Le;t[107]!==Fe||t[108]!==ae?(Le=o.jsxRuntimeExports.jsxs("g",{children:[Fe,ae]}),t[107]=Fe,t[108]=ae,t[109]=Le):Le=t[109];let ke;t[110]!==s||t[111]!==c||t[112]!==u||t[113]!==j||t[114]!==h.right||t[115]!==Nt||t[116]!==l?(ke=Nt?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Nt.map((n,e)=>o.jsxRuntimeExports.jsx(Ze.RefLineY,{text:n.text,color:n.color,y:l(n.value),x1:0-j,x2:c+h.right,classNames:n.classNames,styles:n.styles,animate:s,isInView:u},e))}):null,t[110]=s,t[111]=c,t[112]=u,t[113]=j,t[114]=h.right,t[115]=Nt,t[116]=l,t[117]=ke):ke=t[117];let le;if(t[118]!==s||t[119]!==Tt||t[120]!==r||t[121]!==c||t[122]!==u||t[123]!==h.right||t[124]!==J||t[125]!==a||t[126]!==l){let n;t[128]!==s||t[129]!==r||t[130]!==c||t[131]!==u||t[132]!==h.right||t[133]!==J||t[134]!==a||t[135]!==l?(n=(e,f)=>{const st=Ge.getLineEndPoint({x:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},C.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Ye=e.showConnector?{y1:st.y,x1:st.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date)):0,circleRadius:C.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Xe={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:J?0:e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:J?e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0):c+h.right-(e.xCoordinate?a(R.parse(`${e.xCoordinate}`,r,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return o.jsxRuntimeExports.jsx(Ge.Annotation,{color:e.color,connectorsSettings:Ye,labelSettings:Xe,text:e.text,classNames:e.classNames,styles:e.styles,animate:s,isInView:u},f)},t[128]=s,t[129]=r,t[130]=c,t[131]=u,t[132]=h.right,t[133]=J,t[134]=a,t[135]=l,t[136]=n):n=t[136],le=Tt.map(n),t[118]=s,t[119]=Tt,t[120]=r,t[121]=c,t[122]=u,t[123]=h.right,t[124]=J,t[125]=a,t[126]=l,t[127]=le}else le=t[127];let Se;t[137]!==le?(Se=o.jsxRuntimeExports.jsx("g",{children:le}),t[137]=le,t[138]=Se):Se=t[138];let Ne;t[139]!==Q?(Ne=Q.filter(pi).map(hi),t[139]=Q,t[140]=Ne):Ne=t[140];let Te;t[141]===Symbol.for("react.memo_cache_sentinel")?(Te={fill:"none",pointerEvents:"all"},t[141]=Te):Te=t[141];let De;t[142]!==ht||t[143]!==p||t[144]!==c?(De=o.jsxRuntimeExports.jsx("rect",{ref:ht,style:Te,width:c,height:p}),t[142]=ht,t[143]=p,t[144]=c,t[145]=De):De=t[145];let Ie;return t[146]!==g?.tooltip||t[147]!==Z||t[148]!==_||t[149]!==L||t[150]!==v?.tooltip||t[151]!==lt?(Ie=L&<&&Z&&_?o.jsxRuntimeExports.jsx(ze.Tooltip,{data:L,body:lt,xPos:Z,yPos:_,backgroundStyle:v?.tooltip,className:g?.tooltip}):null,t[146]=g?.tooltip,t[147]=Z,t[148]=_,t[149]=L,t[150]=v?.tooltip,t[151]=lt,t[152]=Ie):Ie=t[152],o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Bt.motion.svg,{width:`${rt}px`,height:`${zt}px`,viewBox:`0 0 ${rt} ${zt}`,direction:"ltr",ref:te,children:o.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[wt,Ot,o.jsxRuntimeExports.jsx(Ge.CustomArea,{areaSettings:me,scaleX:a,scaleY:l,animate:s,isInView:u}),o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(_e.YTicksAndGridLines,{values:ie.filter(Oi),y:ie.filter(wi).map(n=>l(n)),x1:0-j,x2:c+h.right,styles:Rt,classNames:it,suffix:X,prefix:B,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:K}),D,I]}),o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:Re,x:Ce,y1:0,y2:p,styles:Ee,classNames:be,suffix:X,prefix:B,labelType:"primary",showGridLines:!0,precision:K})}),Ae,Le,ke,Se,Ne,De]})}),Ie]})}function hi(i){return i.layer}function pi(i){return i.position==="after"}function gi(i){return!C.checkIfNullOrUndefined(i.y)}function yi(i){return!C.checkIfNullOrUndefined(i.y)}function vi(i){return i.layer}function ji(i){return i.position==="before"}function wi(i){return i!==0}function Oi(i){return i!==0}function Ri(i){return i.date}function Ci(i){return Math.max(...i.y.filter(Ei))}function Ei(i){return!C.checkIfNullOrUndefined(i)}function bi(i){return Math.max(...i.y.filter(Ai))}function Ai(i){return!C.checkIfNullOrUndefined(i)}function Li(i){return Math.min(...i.y.filter(ki))}function ki(i){return!C.checkIfNullOrUndefined(i)}function Si(i){return Math.min(...i.y.filter(Ni))}function Ni(i){return!C.checkIfNullOrUndefined(i)}function Ti(i){return Math.min(...i.y.filter(Di))}function Di(i){return!C.checkIfNullOrUndefined(i)}function Ii(i){return!C.checkIfNullOrUndefined(i.y)}function qi(i){const t=o.compilerRuntimeExports.c(113),{data:y,graphTitle:rt,lineColors:zt,suffix:k,sources:r,prefix:ge,graphDescription:S,height:St,width:E,footNote:at,noOfXTicks:X,dateFormat:B,labels:j,padding:lt,showValues:Jt,backgroundColor:ye,leftMargin:ve,rightMargin:Nt,topMargin:Kt,bottomMargin:z,tooltip:ct,relativeHeight:ut,onSeriesMouseOver:s,showColorLegendAtTop:J,refValues:Qt,highlightAreaSettings:Zt,graphID:Tt,minValue:Dt,maxValue:dt,highlightedLines:_t,graphDownload:ce,dataDownload:ue,animate:It,language:v,colorLegendTitle:g,minHeight:de,strokeWidth:K,showDots:Q,annotations:xt,customHighlightAreaSettings:qt,theme:je,ariaLabel:ft,yAxisTitle:te,noOfYTicks:Mt,minDate:u,maxDate:O,curveType:we,styles:m,classNames:d,dimmedOpacity:Oe,precision:L,customLayers:Vt,dashedLines:Z,dashSettings:$t,labelsToBeHidden:_,showColorScale:xe}=i,q=zt===void 0?ui.Colors.light.categoricalColors.colors:zt,mt=k===void 0?"":k,h=ge===void 0?"":ge,ht=X===void 0?10:X,pt=B===void 0?"yyyy":B,x=Jt===void 0?!1:Jt,fe=ye===void 0?!1:ye,gt=ve===void 0?30:ve,Ht=Nt===void 0?50:Nt,yt=Kt===void 0?20:Kt,me=z===void 0?25:z,c=J===void 0?!1:J;let p;t[0]!==Qt?(p=Qt===void 0?[]:Qt,t[0]=Qt,t[1]=p):p=t[1];const he=p;let ee;t[2]!==Zt?(ee=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=ee):ee=t[3];const w=ee;let M;t[4]!==_t?(M=_t===void 0?[]:_t,t[4]=_t,t[5]=M):M=t[5];const a=M,tt=ce===void 0?!1:ce,et=ue===void 0?!1:ue,l=It===void 0?!1:It,V=v===void 0?"en":v,ie=de===void 0?0:de,ne=K===void 0?2:K,vt=Q===void 0?!0:Q;let N;t[6]!==xt?(N=xt===void 0?[]:xt,t[6]=xt,t[7]=N):N=t[7];const $=N;let jt;t[8]!==qt?(jt=qt===void 0?[]:qt,t[8]=qt,t[9]=jt):jt=t[9];const H=jt,wt=je===void 0?"light":je,Ot=Mt===void 0?5:Mt,Ft=we===void 0?"curve":we,Gt=Oe===void 0?.3:Oe,Rt=L===void 0?2:L;let Ct;t[10]!==Vt?(Ct=Vt===void 0?[]:Vt,t[10]=Vt,t[11]=Ct):Ct=t[11];const Ut=Ct;let it;t[12]!==Z?(it=Z===void 0?[]:Z,t[12]=Z,t[13]=it):it=t[13];const Pt=it;let Et;t[14]!==$t?(Et=$t===void 0?["5 5"]:$t,t[14]=$t,t[15]=Et):Et=t[15];const Wt=Et;let bt;t[16]!==_?(bt=_===void 0?[]:_,t[16]=_,t[17]=bt):bt=t[17];const F=bt,b=xe===void 0?!0:xe,[nt,pe]=A.useState(0),[At,Lt]=A.useState(0),Yt=A.useRef(null),oe=A.useRef(null);let T,kt;t[18]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const Re=new ResizeObserver(Ce=>{pe(Ce[0].target.clientWidth||620),Lt(Ce[0].target.clientHeight||480)});return Yt.current&&Re.observe(Yt.current),()=>Re.disconnect()},kt=[],t[18]=T,t[19]=kt):(T=t[18],kt=t[19]),A.useEffect(T,kt);const Xt=d?.graphContainer,G=m?.graphContainer;let D;t[20]!==d?.description||t[21]!==d?.title||t[22]!==y||t[23]!==et||t[24]!==S||t[25]!==tt||t[26]!==rt||t[27]!==m?.description||t[28]!==m?.title||t[29]!==E?(D=rt||S||tt||et?o.jsxRuntimeExports.jsx(li.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:d?.title,description:d?.description},graphTitle:rt,graphDescription:S,width:E,graphDownload:tt?oe:void 0,dataDownload:et?y.map(Fi).filter(Hi).length>0?y.map($i).filter(Vi):y.filter(Mi):null}):null,t[20]=d?.description,t[21]=d?.title,t[22]=y,t[23]=et,t[24]=S,t[25]=tt,t[26]=rt,t[27]=m?.description,t[28]=m?.title,t[29]=E,t[30]=D):D=t[30];let U;t[31]!==d?.colorLegend||t[32]!==g||t[33]!==y.length||t[34]!==j||t[35]!==F||t[36]!==q||t[37]!==c||t[38]!==b?(U=c&&b&&y.length>0?o.jsxRuntimeExports.jsx(ci.ColorLegend,{colorDomain:j,colorLegendTitle:g,labelsToBeHidden:F,colors:q,showNAColor:!1,className:d?.colorLegend}):null,t[31]=d?.colorLegend,t[32]=g,t[33]=y.length,t[34]=j,t[35]=F,t[36]=q,t[37]=c,t[38]=b,t[39]=U):U=t[39];let P;t[40]!==y.length?(P=y.length===0&&o.jsxRuntimeExports.jsx(di.EmptyState,{}),t[40]=y.length,t[41]=P):P=t[41];let W;t[42]!==l||t[43]!==$||t[44]!==me||t[45]!==d||t[46]!==Ft||t[47]!==H||t[48]!==Ut||t[49]!==Wt||t[50]!==Pt||t[51]!==y||t[52]!==pt||t[53]!==Gt||t[54]!==w||t[55]!==a||t[56]!==j||t[57]!==F||t[58]!==V||t[59]!==gt||t[60]!==q||t[61]!==O||t[62]!==dt||t[63]!==u||t[64]!==Dt||t[65]!==ht||t[66]!==Ot||t[67]!==s||t[68]!==Rt||t[69]!==h||t[70]!==he||t[71]!==Ht||t[72]!==c||t[73]!==b||t[74]!==vt||t[75]!==x||t[76]!==ne||t[77]!==m||t[78]!==mt||t[79]!==At||t[80]!==nt||t[81]!==ct||t[82]!==yt||t[83]!==te?(W=nt&&At&&y.length>0?o.jsxRuntimeExports.jsx(mi,{data:y,lineColors:q,width:nt,height:At,dateFormat:pt,noOfXTicks:ht??fi.getNoOfTicks(nt),leftMargin:gt,rightMargin:Ht,topMargin:yt,bottomMargin:me,labels:j,tooltip:ct,onSeriesMouseOver:s,showColorLegendAtTop:b?c:!0,showValues:x,suffix:mt,prefix:h,highlightAreaSettings:w,refValues:he,minValue:Dt,maxValue:dt,highlightedLines:a,animate:l===!0?{duration:.5,once:!0,amount:.5}:l||{duration:0,once:!0,amount:0},rtl:V==="he"||V==="ar",strokeWidth:ne,showDots:vt,annotations:$,customHighlightAreaSettings:H,yAxisTitle:te,noOfYTicks:Ot,minDate:u,maxDate:O,curveType:Ft,styles:m,classNames:d,dimmedOpacity:Gt,precision:Rt,customLayers:Ut,labelsToBeHidden:F,dashedLines:Pt,dashSettings:Wt,revealClipId:xi.generateRandomString(8)}):null,t[42]=l,t[43]=$,t[44]=me,t[45]=d,t[46]=Ft,t[47]=H,t[48]=Ut,t[49]=Wt,t[50]=Pt,t[51]=y,t[52]=pt,t[53]=Gt,t[54]=w,t[55]=a,t[56]=j,t[57]=F,t[58]=V,t[59]=gt,t[60]=q,t[61]=O,t[62]=dt,t[63]=u,t[64]=Dt,t[65]=ht,t[66]=Ot,t[67]=s,t[68]=Rt,t[69]=h,t[70]=he,t[71]=Ht,t[72]=c,t[73]=b,t[74]=vt,t[75]=x,t[76]=ne,t[77]=m,t[78]=mt,t[79]=At,t[80]=nt,t[81]=ct,t[82]=yt,t[83]=te,t[84]=W):W=t[84];let Y;t[85]!==P||t[86]!==W?(Y=o.jsxRuntimeExports.jsxs(We.GraphArea,{ref:Yt,children:[P,W]}),t[85]=P,t[86]=W,t[87]=Y):Y=t[87];let I;t[88]!==d?.footnote||t[89]!==d?.source||t[90]!==at||t[91]!==r||t[92]!==m?.footnote||t[93]!==m?.source||t[94]!==E?(I=r||at?o.jsxRuntimeExports.jsx(ai.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:d?.footnote,source:d?.source},sources:r,footNote:at,width:E}):null,t[88]=d?.footnote,t[89]=d?.source,t[90]=at,t[91]=r,t[92]=m?.footnote,t[93]=m?.source,t[94]=E,t[95]=I):I=t[95];let ot;return t[96]!==ft||t[97]!==fe||t[98]!==Tt||t[99]!==St||t[100]!==V||t[101]!==ie||t[102]!==lt||t[103]!==ut||t[104]!==Xt||t[105]!==G||t[106]!==D||t[107]!==U||t[108]!==Y||t[109]!==I||t[110]!==wt||t[111]!==E?(ot=o.jsxRuntimeExports.jsxs(We.GraphContainer,{className:Xt,style:G,id:Tt,ref:oe,"aria-label":ft,backgroundColor:fe,theme:wt,language:V,minHeight:ie,width:E,height:St,relativeHeight:ut,padding:lt,children:[D,U,Y,I]}),t[96]=ft,t[97]=fe,t[98]=Tt,t[99]=St,t[100]=V,t[101]=ie,t[102]=lt,t[103]=ut,t[104]=Xt,t[105]=G,t[106]=D,t[107]=U,t[108]=Y,t[109]=I,t[110]=wt,t[111]=E,t[112]=ot):ot=t[112],ot}function Mi(i){return i!==void 0}function Vi(i){return i!==void 0}function $i(i){return i.data}function Hi(i){return i!==void 0}function Fi(i){return i.data}exports.MultiLineChart=qi;
|
|
2
2
|
//# sourceMappingURL=MultiLineChart.cjs.map
|
package/dist/MultiLineChart.js
CHANGED
|
@@ -25,7 +25,7 @@ import { GraphFooter as xi } from "./GraphFooter.js";
|
|
|
25
25
|
import { GraphHeader as yi } from "./GraphHeader.js";
|
|
26
26
|
import { ColorLegend as vi } from "./ColorLegend.js";
|
|
27
27
|
import { Colors as wi } from "./Colors.js";
|
|
28
|
-
import { E as Ci } from "./EmptyState-
|
|
28
|
+
import { E as Ci } from "./EmptyState-dScPFkLy.js";
|
|
29
29
|
import { g as Ai } from "./generateRandomString-za3IQGfQ.js";
|
|
30
30
|
import { a as bi, G as Oi } from "./GraphContainer-CF6ws3pd.js";
|
|
31
31
|
import { g as Li } from "./getNoOfTicks-CpmRjcRF.js";
|