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', './BarGroup-d6909cb1', './Chart-79cfc878'], (function(e,t,i,r,s,o,n,a,d,l,c,g,h){"use strict";function p(e){return t.jsx(x,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const I=.5,m=.2,u=.2;function x({width:e,height:l,selectedIds:x=[],hiddenIds:f=[],highlightedIds:y,hideAndShowBehavior:S="none",orientation:v="vertical",yAxis:C,series:b,groups:A,isStacked:D=!1,getDataItem:T,selectionMode:L="none",drilling:k="off",dataItemGaps:j=.5,dataLabelEffect:M="outline",...R}){const{direction:w,forcedColors:U}=a.useUser(),W="active"===U,z=b.filter((e=>"bar"===e.type)),E="rtl"===w,G="log"===C?.scale,B=R.xAxis?.timeAxisType,F=new Set(f),P=new Set(x),H=new Set(y),N="horizontal"===v,q=d.getColorRamp(),O=s.getSeriesData(b.length,A.length,T,F,G),V=O.some(((e,t)=>"area"===b[t].type||"lineWithArea"===b[t].type)),J=O.some(((e,t)=>"bar"===b[t].type)),K=(e,t)=>D?{...T(e,t),value:O[e][t]}:T(e,t),Q=s.getMarkers(),X=[];return t.jsx(h.Chart,{width:e,height:l,selectedIds:P,hiddenIds:f,hideAndShowBehavior:S,orientation:v,yAxis:C,series:b,defaultOverviewContentRenderer:()=>t.jsx(p,{groups:A,series:b,getDataItem:T}),groups:A,selectionMode:L,drilling:k,isStacked:D,getDataItem:T,findNearest:(e,t)=>i.findNearestDataPoint(b,A,e,t,K,D,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),G,0,F,B),getDataItemPos:(e,t,i,s)=>{const o=J?g.getBarPosition(z,A,T,e,t,F,j,i,s,"log"===C?.scale,D,E,N,B):void 0;return(i,s)=>"bar"===b[i].type?o?o(i,s):void 0:r.getLineAreaChartItemPosition(i,s,O,T,A,N,e,t,B)},getMarkerInfo:(e,t)=>({color:n.getItemColor(e,t,b,T),markerType:n.getMarkerType(e,t,T)}),renderGridLinesInFront:V,getNavUtil:(e,t)=>n.getLineAreaChartNavUtil(T,b.length,e,t,D,E,N),getGapRatio:()=>1,offset:J?I:m,isRtl:E,...R,children:({xStartIndex:e,xEndIndex:i,xScale:n,yScale:a,activeId:d,focusedItemInfo:l,hoveredItemInfo:h,isPointInsideMarquee:p,getTextDimensions:I,defaultFontSize:m,groupWidth:x})=>{let f=-1;return t.jsx(t.Fragment,{children:O.map(((S,w)=>{const U=b[w],V="lineWithArea"===U.type?u:1,J="area"===U.type||"lineWithArea"===U.type,Y="area"===U.type;if(0===S.length)return;const Z=s.getLineAreaSegments(a,n,S,e,i,N,G,A,w,K,B);X[w]=Z[0];const $="bar"!==U.type?"curved"===U.lineType&&D&&O.length>1&&w>0:D&&O.length>1&&w>0,_=void 0===y||0===H.size||H.has(U.id),ee=D&&0!=w?X.reduce(((e,t,i)=>i>=w?e:t.length>0?i:e),0):void 0;return"bar"===U.type&&(f+=1),t.jsxs(t.Fragment,{children:["bar"===U.type&&A.slice(e,i+1).map(((r,s)=>t.jsx(g.BarGroup,{yScale:a,xScale:n,groupIndex:s+e,selectedIds:P,hiddenIds:F,highlightedIds:y?H:y,isDrillEnabled:"on"===k,series:z,barGapRatio:g.getBarGapRatio(D,e,i),dataItemGaps:j,isPointInsideMarquee:p,isStacked:D,groupWidth:x,group:A[s],timeAxisType:R.xAxis?.timeAxisType,colors:q,activeId:d,isLog:"log"===C?.scale,orientation:v,getDataItem:T,isSelectionEnabled:"none"!=L,isRtl:E,focusedItemInfo:l,hoveredItemInfo:h,getTextDimensions:I,defaultFontSize:m,seriesIndex:f}))),J&&t.jsx(r.AreaSeries,{yScale:a,lineType:U.lineType,color:U.areaColor||q[w%q.length],isHorizontal:N,areaColorOpacity:V,isBottomSegmentCurved:$,bottomCoords:void 0!==ee&&X[ee].some((e=>null!=e))?X[ee]:void 0,lineSegments:Z,isLog:G,isHighlighted:_,seriesIndex:w}),"line"===U.type&&t.jsx(o.LineSeries,{lineType:U.lineType,lineColor:Y?c.colorSchemeVars.dvt.contrastLine:U.lineColor,lineWidth:Y?1.25:U.lineWidth,lineStyle:U.lineStyle||"solid",color:U.lineColor||q[w%q.length],lineSegmentCoords:Z,isHorizontal:N,isHighlighted:_,seriesIndex:w}),!D&&("line"===U.type||J)&&t.jsx(o.MarkersWithLabel,{yScale:a,xScale:n,groups:A,series:U,timeAxisType:B,color:q[w%q.length],seriesIndex:w,startIndex:e,endIndex:i,markerType:Q[w%Q.length],orientation:v,isLog:G,activeId:d,getDataItem:T,isPointInsideMarquee:p,selectedIds:P,focusedItemIndex:l.seriesIndex!==w||!l.isFocusVisible||R.isDataCursorEnabled&&R.dataCursorStyle?.isMarkerDisplayed?void 0:l.groupIndex,hoveredItemIndex:h?.isCurrent&&h.seriesIndex===w?h.groupIndex:void 0,isSelectionEnabled:"single"===L||"multiple"===L,isDrillEnabled:"on"===k,defaultFontSize:m,dataLabelEffect:M,isHighContrast:W})]})}))})}})}e.ComboChart=x}));
//# sourceMappingURL=ComboChart-72eda15f.js.map
