define(['exports', 'preact/jsx-runtime', './layoutUtils-4304ffe4', './chartUtils-a85dd8f3', './useChartDnd-44674b7d', './LineSeries-ce197af6', './dataStyleUtils-a0ecedd5', './useUser-797287de', './colorUtils-bc5b1d84', './accUtils-93ee6f16', './Common/themes/themeContract.css', './Chart-79cfc878'], (function(e,t,i,n,s,r,o,a,l,d,g,c){"use strict";function h(e){return t.jsx(u,{datatip:()=>({content:""}),zoomAndScroll:"off",overview:"off",plotArea:{yMajorTick:{isRendered:!1}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},type:e.type})}const I=.2,x=.2;function u({width:e,height:d,selectedIds:u=[],hiddenIds:m=[],highlightedIds:f,hideAndShowBehavior:p="none",orientation:v="vertical",yAxis:S,series:y,groups:C,isStacked:A=!1,getDataItem:b,selectionMode:D="none",drilling:L="off",type:T="line",overview:k="off",dataLabelEffect:M="outline",...j}){const{direction:w,forcedColors:E}=a.useUser(),U="active"===E,F=void 0!==j.testId,R="rtl"===w,z="log"===S?.scale,W=j.xAxis?.timeAxisType,H=new Set(m),P=new Set(u),N=new Set(f),q="horizontal"===v,B=l.getColorRamp(),V=A?s.getCumulativeSeries(y.length,C.length,b,H,z):s.getSeriesData(y?.length,C?.length,b,H,z),G=(e,t)=>A?{...b(e,t),value:V[e][t]}:b(e,t),O=s.getMarkers(),J="lineWithArea"===T?x:1,K="area"===T||"lineWithArea"===T,Q="area"===T,X=[];return t.jsx(c.Chart,{width:e,height:d,selectedIds:P,hiddenIds:m,hideAndShowBehavior:p,orientation:v,yAxis:S,series:y,groups:C,selectionMode:D,drilling:L,isStacked:A,getDataItem:b,findNearest:(e,t)=>i.findNearestDataPoint(y,C,e,t,G,A,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),z,0,H,W),getDataItemPos:(e,t)=>(i,s)=>n.getLineAreaChartItemPosition(i,s,V,b,C,q,e,t,W),getMarkerInfo:(e,t)=>({color:o.getItemColor(e,t,y,b),type:o.getMarkerType(e,t,b)}),renderGridLinesInFront:K,getNavUtil:(e,t)=>o.getLineAreaChartNavUtil(b,y.length,e,t,A,R,q),getGapRatio:()=>1,offset:I,isRtl:R,overview:k,defaultOverviewContentRenderer:()=>t.jsx(h,{series:y,groups:C,getDataItem:b,type:T}),...j,children:({xStartIndex:e,xEndIndex:i,xScale:o,yScale:a,activeId:l,focusedItemInfo:d,hoveredItemInfo:c,isPointInsideMarquee:h,defaultFontSize:I,getTextDimensions:x})=>t.jsxs(t.Fragment,{children:[V.map(((u,m)=>{if(0===u.length)return;const p=y[m],S=s.getLineAreaSegments(a,o,u,e,i,q,z,C,m,G,W);X[m]=S[0];const T="curved"===p.lineType&&A&&V.length>1&&m>0,k=void 0===f||0===f.length||N.has(p.id),w=A&&0!=m?X.reduce(((e,t,i)=>i>=m?e:t.length>0?i:e),0):void 0;return t.jsxs(t.Fragment,{children:[K&&t.jsx(n.AreaSeries,{yScale:a,lineType:p.lineType,color:p.areaColor||B[m%B.length],isHorizontal:q,areaColorOpacity:J,isBottomSegmentCurved:T,bottomCoords:void 0!==w&&X[w].some((e=>null!=e))?X[w]:void 0,lineSegments:S,isLog:z,isHighlighted:k,seriesIndex:m}),t.jsx(r.LineSeries,{lineType:p.lineType,lineColor:Q?g.colorSchemeVars.dvt.contrastLine:p.lineColor,lineWidth:Q?A?2.5:1.25:p.lineWidth,lineStyle:p.lineStyle,color:p.lineColor||B[m%B.length],lineSegmentCoords:S,isHorizontal:q,isHighlighted:k,seriesIndex:m}),!A&&t.jsx(r.MarkersWithLabel,{yScale:a,xScale:o,groups:C,series:p,timeAxisType:W,color:p.lineColor||p.areaColor||B[m%B.length],seriesIndex:m,startIndex:e,endIndex:i,markerType:O[m%O.length],orientation:v,isLog:z,activeId:l,getDataItem:b,isPointInsideMarquee:h,selectedIds:P,highlightedIds:void 0!==f?N:void 0,focusedItemIndex:d.seriesIndex!==m||!d.isFocusVisible||j.isDataCursorEnabled&&j.dataCursorStyle?.isMarkerDisplayed?void 0:d.groupIndex,hoveredItemIndex:c?.isCurrent&&c.seriesIndex===m?c.groupIndex:void 0,isSelectionEnabled:"single"===D||"multiple"===D,isDrillEnabled:"on"===L,defaultFontSize:I,dataLabelEffect:M,isHighContrast:U,isTestEnv:F,getTextDimensions:x})]})})),A&&V.map(((n,s)=>{if(0===n.length)return;const g=y[s];return t.jsx(r.MarkersWithLabel,{yScale:a,series:y[s],xScale:o,groups:C,timeAxisType:W,color:g.lineColor||g.areaColor||B[s%B.length],seriesIndex:s,isPointInsideMarquee:h,startIndex:e,endIndex:i,markerType:O[s%O.length],orientation:v,isLog:z,activeId:l,getDataItem:G,selectedIds:P,focusedItemIndex:d.seriesIndex===s&&d.isFocusVisible?d.groupIndex:void 0,hoveredItemIndex:c?.isCurrent&&c.seriesIndex===s?c.groupIndex:void 0,isSelectionEnabled:"single"===D||"multiple"===D,isDrillEnabled:"on"===L,defaultFontSize:I,dataLabelEffect:M,isHighContrast:U,isTestEnv:F,getTextDimensions:x})}))]})})}e.LineAreaChart=u}));
//# sourceMappingURL=LineAreaChart-3aff0c1a.js.map
