@arcgis/charts-components 5.2.0-next.17 → 5.2.0-next.18

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.
@@ -43,7 +43,7 @@ import{a as to}from"./3VMHKSYP.js";import{b as jx}from"./P4HSSZRL.js";import p f
43
43
  </table>`,i})}getHTMLRow(t,e,i,r=!1,s=!1){let n=" <tr>";e.rowClass&&(n=' <tr class="'+e.rowClass+'">'),i||(i=t);let o=this.get("dataFieldsOrder",[]),l=s?"th":"td",h=!0;return Wl(i,(u,c)=>{let d=this.convertEmptyValue(u,t[u],e),A=r?d:this.convertToSpecialFormat(u,d,e);A=""+A,A=A.replace(/[\u00A0-\u9999<>\&]/gim,function(f){return"&#"+f.charCodeAt(0)+";"});let p=l;e.pivot&&h&&(p="th"),e.cellClass?n+=`
44
44
  <`+p+' class="'+e.cellClass+'">'+A+"</"+p+">":n+=`
45
45
  <`+p+">"+A+"</"+p+">",h=!1},(u,c)=>{let d=o.indexOf(u),A=o.indexOf(c);return d>A?1:d<A?-1:0}),n+=`
46
- </tr>`,n}exportXLSX(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("xlsx")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getXLSX(t))})}getXLSX(t){return Xe(this,void 0,void 0,function*(){let e=this._getFormatOptions("xlsx",t),i=yield this.getXLSXLib(),r={bookType:"xlsx",bookSST:!1,type:"base64"},s=this._normalizeExcelSheetName(this.get("title",this._t("Data"))),n={SheetNames:[s],Sheets:{}},o=[],l=this.getData("html",e),h=this.getDataFields(l);if(e.pivot){let u=this.get("dataFieldsOrder",[]);Wl(h,(c,d)=>{let A=[];e.addColumnNames&&A.push(d);for(let p=l.length,f=0;f<p;f++){let m=l[f][c];A.push(this.convertToSpecialFormat(c,m,e,!0))}o.push(this.getXLSXRow(A,e,void 0,!0))},(c,d)=>{let A=u.indexOf(c),p=u.indexOf(d);return A>p?1:A<p?-1:0})}else{e.addColumnNames&&o.push(this.getXLSXRow(h,e,void 0,!0));for(let u=l.length,c=0;c<u;c++)o.push(this.getXLSXRow(l[c],e,h))}return n.Sheets[s]=i.utils.aoa_to_sheet(o),this.events.dispatch("workbookready",{type:"workbookready",format:"xlsx",options:e,workbook:n,workbookOptions:r,xlsx:i,target:this}),i.write(n,r)})}_normalizeExcelSheetName(t){return t=t.replace(/([:\\\/?*\[\]]+)/g," "),t.length>30?t.substr(0,30)+"...":t}getXLSXRow(t,e,i,r=!1){let s=[];i||(i=t);let n=this.get("dataFieldsOrder",[]);return Wl(i,(o,l)=>{let h=this.convertEmptyValue(o,t[o],e),u=r?h:this.convertToSpecialFormat(o,h,e,!0);s.push(u)},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0}),s}_xlsx(){return Xe(this,void 0,void 0,function*(){return yield import("./FFS73X36.js")})}getXLSXLib(){return this._xlsx()}exportPDF(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(t,!0))})}exportPDFData(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(t,!1,!0))})}getPDF(t,e=!0,i=!1){return Xe(this,void 0,void 0,function*(){let r=this._getFormatOptions("pdf",t),s=this._getFormatOptions("pdfdata",t),n=r.pageOrientation||"portrait",o,l={width:0,height:0};if(e){let g=r.imageFormat||"png",y=this._getFormatOptions(g,r),x=yield this.getCanvas(y);l.width=x.clientWidth,l.height=x.clientHeight,o=x.toDataURL(this.getContentType(g),r.quality||1),this.disposeCanvas(x)}let h=yield this.getPdfmake(),u=[30,30,30,30],c={pageSize:r.pageSize||"A4",pageOrientation:n,pageMargins:r.pageMargins||u,defaultStyle:{font:r.font?r.font.name:void 0},content:[]},d=this.get("title"),A=0;if(d&&(c.content.push({text:d,fontSize:r.fontSize||14,bold:!0,margin:[0,0,0,15]}),A+=50),r.addURL&&(c.content.push({text:this._t("Saved from")+": "+document.location.href,fontSize:r.fontSize,margin:[0,0,0,15]}),A+=50),e&&o){let g=this.getPageSizeFit(c.pageSize,c.pageMargins,A,n);l.width>g[0]||l.height>g[1]?c.content.push({image:o,alignment:r.align||"left",fit:g}):c.content.push({image:o,alignment:r.align||"left"})}(i||r.includeData)&&this.hasData()&&c.content.push({table:yield this.getPDFData(s),fontSize:r.fontSize||14});let p=null,f=null;function m(g){let y={};y.normal=g.normal.path,f[g.normal.path]=g.normal.bytes,g.bold?(y.bold=g.bold.path,f[g.bold.path]=g.bold.bytes):y.bold=g.normal.path,g.italics?(y.italics=g.italics.path,f[g.italics.path]=g.italics.bytes):y.italics=g.normal.path,g.bolditalics?(y.bolditalics=g.bolditalics.path,f[g.bolditalics.path]=g.bolditalics.bytes):y.bolditalics=g.normal.path,p[g.name]=y}return r.font&&(p={},f={},m(r.font),r.extraFonts&&J(r.extraFonts,m),h.addFonts(p),h.addVirtualFileSystem(f)),this.events.dispatch("pdfdocready",{type:"pdfdocready",format:"pdf",options:r,doc:c,target:this}),yield h.createPdf(c,{}).getBase64()})}getPDFData(t){return Xe(this,void 0,void 0,function*(){let e=this._getFormatOptions("pdfdata",t),i={body:[]},r=this.getData("html",e),s=this.getDataFields(r);if(e.pivot){let n=this.get("dataFieldsOrder",[]);Wl(s,(o,l)=>{let h=[];e.addColumnNames&&h.push(l);for(let u=r.length,c=0;c<u;c++){let d=r[c][o];h.push(this.convertToSpecialFormat(o,d,e,!0))}i.body.push(this.getPDFDataRow(h,e,void 0,!0))},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0})}else{e.addColumnNames&&(i.body.push(this.getPDFDataRow(s,e,void 0,!0)),i.headerRows=1);for(let n=r.length,o=0;o<n;o++)i.body.push(this.getPDFDataRow(r[o],e,s))}return i})}getPDFDataRow(t,e,i,r=!1){let s=[];i||(i=t);let n=this.get("dataFieldsOrder",[]);return Wl(i,(o,l)=>{let h=this.convertEmptyValue(o,t[o],e),u=r?h:this.convertToSpecialFormat(o,h,e);u=""+u,s.push(u)},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0}),s}getPdfmake(){return jC===void 0&&(jC=_N()),jC}getPageSizeFit(t,e,i=0,r="portrait"){let s=[0,0,0,0];ie(e)?s=[e,e,e,e]:e.length==2?s=[e[0],e[1],e[0],e[1]]:e.length==4&&(s=e);let o={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}[t];return r=="landscape"&&o.reverse(),o[0]-=s[0]+s[2],o[1]-=s[1]+s[3]+i,o}hasData(){let t=this.get("dataSource");return!!(Fy(t)&&t.length)}getData(t,e,i=!1){let r=this._getFormatOptions(t,e),s=this.get("dataSource",[]),n=s,o=this.get("dataFields");o&&Fy(s)&&(n=[],J(s,h=>{if(Un(h)){let u={};Ot(o,(c,d)=>{o[c]!=null&&(u[i?d:c]=this.convertToSpecialFormat(c,h[c],r))}),n.push(u)}}));let l={type:"dataprocessed",format:t,options:r,data:n,target:this};return this.events.dispatch("dataprocessed",l),l.data}getDataFields(t){let e=this.get("dataFields");return e||(e={},Fy(t)&&t.length&&J(t,i=>{Ot(i,(r,s)=>{e[r]==null&&(e[r]=r)})})),e}convertEmptyValue(t,e,i){return e??i.emptyAs}convertToSpecialFormat(t,e,i,r){if(typeof e=="number")if(this.isDateField(t))e=new Date(e);else{if(this.isNumericField(t)&&this.get("numberFormat"))return this._root.numberFormatter.format(e,this.get("numberFormat"));if(this.isDurationField(t))return this._root.durationFormatter.format(e,this.get("durationFormat"),this.get("durationUnit"))}return e instanceof Date&&(i.useTimestamps?e=e.getTime():i.useLocale?r||(e=e.toLocaleString()):e=this._root.dateFormatter.format(e,this.get("dateFormat"))),e}isDateField(t){return this.get("dateFields").indexOf(t)!==-1}isNumericField(t){return this.get("numericFields").indexOf(t)!==-1}isDurationField(t){return this.get("durationFields").indexOf(t)!==-1}getContentType(t){let e="";switch(t){case"png":e="image/"+t;break;case"jpg":e="image/jpeg";break;case"csv":e="text/csv";break;case"json":e="application/json";break;case"html":e="text/html";break;case"pdf":case"pdfdata":e="application/pdf";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;default:e="application/octet-stream"}return e}getDisposableCanvas(){let t=document.createElement("canvas");return t.style.position="fixed",t.style.top="-10000px",this._root.dom.appendChild(t),t}disposeCanvas(t){this._root.dom.removeChild(t)}findBackgroundColor(t){let e=1,i=getComputedStyle(t,"background-color").getPropertyValue("background-color");if((i.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||i=="transparent")&&(e=0),e==0){let r=t.parentElement;return r?this.findBackgroundColor(r):ot.fromHex(16777215)}else return ot.fromCSS(i)}streamFile(t,e,i=!1){if(this.blobDownloadSupport()){let r=document.createElement("a");r.download=e,document.body.appendChild(r);let s=t.split(";"),n=s.shift().replace(/data:/,"");if(t=decodeURIComponent(s.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(n)==-1)try{t=atob(t)}catch{return!1}else{i&&(t="\uFEFF"+t);let u=new Blob([t],{type:n}),c=window.URL.createObjectURL(u);return r.href=c,r.download=e,r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(c)},100),!0}let o=new Array(t.length);for(let u=0;u<t.length;++u){let c=t.charCodeAt(u);o[u]=c}i&&(o=[239,187,191].concat(o));let l=new Blob([new Uint8Array(o)],{type:n}),h=window.URL.createObjectURL(l);r.href=h,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),setTimeout(()=>{window.URL.revokeObjectURL(h)},100)}else if(this.linkDownloadSupport()){let r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}else window.location.href=t;return!0}downloadSupport(){return this.linkDownloadSupport()}linkDownloadSupport(){return typeof document.createElement("a").download<"u"}blobDownloadSupport(){return window.Blob!=null}initiatePrint(t,e,i){let r=this._getFormatOptions("print",e);r.printMethod=="css"?this._printViaCSS(t,r,i):this._printViaIframe(t,r,i)}_printViaCSS(t,e,i){let s=this._getFormatOptions("print",e).delay||500,n=document.documentElement.scrollTop||document.body.scrollTop,o=new pf(L_(this._root.dom),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"},this._root.nonce),l=new pf(L_(this._root.dom),"body",{padding:"0",margin:"0"},this._root.nonce),h;i&&document&&document.title&&(h=document.title,document.title=i);let u=new Image;u.src=t,u.style.maxWidth="100%",u.style.display="block",u.style.position="relative",u.style.visibility="visible",u.style.opacity="1",u.style.clipPath="none",document.body.appendChild(u),this.setTimeout(()=>{window.print()},50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(u),o.dispose(),l.dispose(),h&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=n},s||500)}_printViaIframe(t,e,i){let s=this._getFormatOptions("print",e).delay||500,n=document.createElement("iframe");n.style.visibility="hidden",document.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close();let o=new Image;o.src=t,o.style.maxWidth="100%",o.style.height="auto",i&&(n.contentWindow.document.title=i),n.contentWindow.document.body.appendChild(o),n.load=function(){n.contentWindow.document.body.appendChild(o)},this.setTimeout(()=>{try{n.contentWindow.document.execCommand("print",!1,null)||n.contentWindow.print()}catch{n.contentWindow.print()}},s||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(n)},s+50||100)}supportedFormats(){let t=[],e=this.hasData(),i=this.downloadSupport();return J(["png","jpg","canvas","pdf","xlsx","csv","json","html","pdfdata","print"],r=>{this._getFormatOptions(r).disabled!==!0&&(["xlsx","csv","json","html","pdfdata"].indexOf(r)==-1||e&&i)&&t.push(r)}),t}supportedExportTypes(){let t=["image","print"];return this.downloadSupport()&&this.hasData()&&t.push("data"),t}};hu.className="Exporting";hu.classNames=pi.classNames.concat([hu.className]);var bv=new Map;function Gn(a){a!==void 0&&bv.delete(a)}function Hc(a,t){let e=bv.get(a)??{};bv.set(a,{...e,...t})}function jc(a,t){return bv.get(a)?.[t]}function BN(a,t){return jc(a,t)}function SN(a,t){Hc(a,t)}function FN(a,t){return jc(a,t)}function TN(a,t){Hc(a,t)}function ye(a,t){return jc(a,t)}function ai(a,t){Hc(a,t)}function sa(a,t){return jc(a,t)}function Zn(a,t){Hc(a,t)}function Ns(a,t){return jc(a,t)}function Ds(a,t){Hc(a,t)}function PN(a,t){return jc(a,t)}function DN(a,t){Hc(a,t)}function gs(a,t){return jc(a,t)}function fu(a,t){Hc(a,t)}function Ui(a,t){t===!1&&!a.isHiding?(a.visible=!1,a.hide()):a.isShowing||(a.visible=!0,a.show())}function LN(a,t){for(let e=0;e<t.length;e+=1){let i=t[e][0],r=t[e][1],s=a.length;i>=0&&i<s&&r>=0&&r<s&&a.swap(t[e][0],t[e][1])}}function RI(a,t){let e;if(a!==void 0&&"rgb"in a&&a.rgb!==void 0){let i=a.rgb;if(i!==void 0){let{r,g:s,b:n}=i;e=[r,s,n,255]}}return e}function Nc(a){let t=a??[0,0,0,255];return new xt({a:t[3]/255,b:t[2],g:t[1],r:t[0]})}function zr(a){return a.bullets.values.find(t=>PN(t.uid,"isBulletMarker"))}function qn(a){return a!=null&&!a.isDisposed()}function Of(a){return(a.isShowing||a.visible)&&!a.isHidden&&!a.isHiding&&!a.disabled&&!a.__disabled}function UI(a,t){return a.pixelX<0||a.pixelX>t?.plotContainer?.measuredWidth||a.pixelY<0||a.pixelY>t?.plotContainer?.measuredHeight}function IN(a){let t;return a.baseSprite instanceof Vt||a.baseSprite instanceof pr?t=a.baseSprite:(a instanceof Eh||a instanceof Kd)&&(t=a.axis.chart),t}function kN(a){return RI(a.background.fill)}var re={...pt};function $N(a){let{fill:t,rotation:e,isLinePattern:i,chartBackgroundColor:r}=a,s;return i!==!1?(s=new vc,s.width=re.patternLineProperties.width??Number.NaN,s.height=re.patternLineProperties.height??Number.NaN,s.strokeWidth=re.patternLineProperties.strokeWidth??Number.NaN,s.stroke=t,s.rotation=e??Number.NaN):(s=new bc,s.rectWidth=re.patternRectProperties.rectWidth??Number.NaN,s.rectHeight=re.patternRectProperties.rectHeight??Number.NaN,s.width=re.patternRectProperties.width??Number.NaN,s.height=re.patternRectProperties.height??Number.NaN,s.fillOpacity=re.patternRectProperties.fillOpacity??Number.NaN,s.strokeWidth=re.patternRectProperties.strokeWidth??Number.NaN,s.fill=Nc(r),s.stroke=t,s.rotation=e??Number.NaN),s}function HL(a){let t=Number.NaN;if(typeof a=="number")t=a;else if(a.includes("%")){let e=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(e)&&(t=he(e))}return t}function ON(a){let{fill:t,style:e,chartBackgroundColor:i}=a,r,s,n=!0;switch(e){case bs.Horizontal:{s=0;break}case bs.Vertical:{s=90;break}case bs.ForwardDiagonal:{s=45;break}case bs.BackwardDiagonal:{s=135;break}case bs.Cross:{s=0,n=!1;break}case bs.DiagonalCross:{s=135,n=!1;break}case bs.Solid:}return s!==void 0&&(r=$N({fill:t,rotation:s,isLinePattern:n,chartBackgroundColor:i})),r}function vn(a,t){let e;t!==void 0&&(e=Nc(t));let i=e??new xt({r:0,g:0,b:0,a:0});if(a!=null){let[r,s,n,o]=a;i=new xt({r,g:s,b:n,a:o/255})}return i}function VI(a,t=0){return(a??t)%360}function EN(a,t){return t!==!0||a?.includes("Dot")===!0?"round":"square"}function NI(a,t){let e="none";switch(a??t){case"justify":case"center":e="center";break;case"left":e="left";break;case"right":e="right";break}return e}function yw(a,t){let e="middle";switch(a??t){case"right":e="left";break;case"left":e="right";break}return e}function MN(a,t){let e="none";switch(a??t){case"baseline":case"middle":e="middle";break;case"top":e="top";break;case"bottom":e="bottom";break}return e}function QI(a,t){let e="middle";switch(a??t){case"top":e="bottom";break;case"bottom":e="top";break;default:e="middle";break}return e}function RN(a,t){let e=a??hs.Solid,i=t??re.lineWidth,r={[hs.Solid]:"none",[hs.Dot]:[1,i],[hs.DashDotDot]:[4*i,i,1,i,1,i],[hs.Dash]:[4*i,3*i],[hs.DashDot]:[4*i,3*i,1,3*i],[hs.Null]:"none"};return(r[e]??r[hs.Null]).toString()}function HI(a,t){let e={stroke:vn(),strokeWidth:re.lineWidth,strokeDasharray:"",strokeLinecap:t!==!0?"round":"square",strokeOpacity:hd};return a!=null&&(e.stroke=vn(a.color),e.strokeOpacity=1,a.width!==void 0&&(e.strokeWidth=a.width),a.style!==void 0&&a.style!==hs.Null&&(e.strokeDasharray=RN(a.style,e.strokeWidth),e.strokeLinecap=EN(a.style,t))),e}function jI(a,t){let e=a,[i,r,s,n]=a?.color??t??re.color,o=[i,r,s,n];return e==null?e={type:Rt.SLS,color:o}:e.color===void 0&&(e.color=o),HI(e,!1)}function UN(a,t){let{color:e,outline:i,style:r}=a,s=vn(e);return{pattern:ON({fill:s,style:r,chartBackgroundColor:t}),fill:s,outline:jI(i,e)}}function VN(a){let{color:t,outline:e,xoffset:i,yoffset:r,style:s,size:n,angle:o}=a,l=s!==void 0?sx(s,n):"",h=VI(o);return{path:l,fill:vn(t),outline:jI(e,t),xOffset:i??0,yOffset:r??0,angle:h}}function vw(a){let{symbol:t,defaultToColorFromRamp:e,colorRampIndex:i,isChartFillSymbol:r=!1,chartBackgroundColor:s}=a,n;if(e===!0){let o=r?Vm:hd;if(t.color=t.color??gh({colorIndex:i,opacity:o}),fd(t)||np(t)){let{outline:l}=t;l!==void 0&&(l.color=l?.color??gh({colorIndex:i}),t.outline={...l})}}return Fx(t)?n=HI(t,!0):np(t)?(t.style??=re.lineSeries.marker.markerStyle,t.size??=re.lineSeries.marker.markerBigSize,n=VN(t)):fd(t)&&(n=UN(t,s)),n}function xv(a,t,e){let i=yw(a.horizontalAlignment,e?.horizontalCenter),r=NI(a.horizontalAlignment,e?.align),s=QI(a.verticalAlignment,e?.verticalCenter),n=MN(a.verticalAlignment,e?.valign);return{fill:vn(a.color,re.color),fontFamily:a.font?.family??"Arial, Helvetica, sans-serif",fontSize:a.font?.size??re.generalFontSize,fontWeight:a.font?.weight??"400",textDecoration:a.font?.decoration??"none",align:r,valign:n,verticalCenter:s,horizontalCenter:i,text:xa({textSymbol:a,format:"amChartsV4"}),angle:VI(a.angle,e?.rotation),xOffset:a.xoffset??e?.dx??0,yOffset:a.yoffset??e?.dy??0,backgroundFill:vn(a.backgroundColor),borderFill:vn(a.borderLineColor),borderWidth:a.borderLineSize??1,haloSize:a.haloSize??-1,haloColor:vn(a.haloColor),rtl:a.rightToLeft??t,wrap:e?.wrap??!1,maxWidth:e?.maxWidth??Number.NaN}}function WI(a,t,e){e!==void 0&&a.tooltip!==void 0&&(a.tooltip.getFillFromObject=!1,a.tooltip.background.fill=t),a.fill=e??t,a.fillOpacity=Ne(a.fill.toString()).alpha===0?0:1}function fA(a,t){a.stroke=t.stroke,a.strokeOpacity=t.stroke.alpha===0?0:1,a.strokeDasharray=t.strokeDasharray,a.strokeLinecap=t.strokeLinecap,a.strokeWidth=t.strokeWidth}function _v(a){let{element:t,markerSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return e!==void 0?(n=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(t.path=n.path,t.rotation=n.angle,t.dx=n.xOffset,t.dy=n.yOffset,WI(t,n.fill),fA(t,n.outline)),Ui(t,i),t.disabled=i===!1):t.disabled=!0,n}function Vc(a){let{element:t,lineSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return e!==void 0?(n=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&fA(t,n),Ui(t,i)):Ui(t,!1),n}function Ef(a){let{element:t,fillSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:n}=a,o,l;if(e!==void 0){if(e.style===bs.Cross||e.style===bs.DiagonalCross){let h=IN(t);h!==void 0&&(l=kN(h))}o=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:n,chartBackgroundColor:l}),o!==void 0&&(WI(t,o.fill,o.pattern),fA(t,o.outline)),t.disabled=i===!1}else t.disabled=!0;return o}function du(a){let{element:t,seriesIndex:e,colorMatch:i,seriesSymbol:r,isChartFillSymbol:s,rendererSymbol:n,seriesConfig:o}=a,l,h;i===!0&&n&&(l=fx({rendererSymbol:n,seriesSymbol:r,colorIndex:e}));let u={element:t,defaultToColorFromRamp:!0,colorRampIndex:e,seriesConfig:o},c=l??{...r};switch(r.type){case Rt.SLS:h=Vc({...u,lineSymbol:c});break;case Rt.SFS:h=Ef({...u,fillSymbol:c,isChartFillSymbol:s});break;case Rt.SMS:h=_v({...u,markerSymbol:c});break}return{symbolWithColorInfo:c,stylingInfo:h}}function jL(a,t){if(t!==void 0){let e=a.properties,{elementColor:i,elementOutlineColor:r,elementOutlineWidth:s,rotation:n,transformation:o}=t,{opacity:l,scale:h}=o??{};i!==void 0&&(e.fill=Nc(i),e.fillOpacity=Ne(e.fill.toString()).alpha===0?0:1),r!==void 0&&(e.stroke=Nc(r)),s!==void 0&&(e.strokeWidth=s),n!==void 0&&(e.rotation=n),h!==void 0&&(e.scale=h),l!==void 0&&(e.fillOpacity=(e.fillOpacity??1)*l,e.strokeOpacity=(e.strokeOpacity??1)*l)}}function NN(a,t,e){let i=new Set(Array.from(t)),r=a.findIndex(s=>!i.has(ZC(s)));return r!==-1?r:e}function ZC(a){return`${a[0]},${a[1]},${a[2]}`}function QN(a){let{chartConfig:t,queryObject:e,popupTemplateFieldInfosEnabled:i,labelUpdateNeeded:r,utilsStrings:s}=a,{series:n}=t,o=n[0],{x:l}=o,h=!BF({chartConfig:t}),u=It([o]),c=u===ke.PieFromFields,d=$s(e),A=xh(d).idField,p=_a(e,i);return{x:l,isNonAggregatedChart:h,objectIdField:A,isPieFromFields:c,seriesConfig:o,fieldList:p,labelUpdateNeeded:r,chartSubType:u,colorMatch:Fl(t),utilsStrings:s}}function HN(a){let{dataContext:t,seriesConfig:e,existingSlicesColors:i,isGroupOfSlices:r,sliceFromConfig:s,dataIndex:n,colorMatch:o,chartSubType:l}=a,h=r?{...pt.pieChart.sliceGrouping.fillSymbol,...e.sliceGrouping?.fillSymbol}:Fr(s?.fillSymbol??e.fillSymbol),u=nn({dataItem:t,seriesConfig:e,chartSubType:l,colorMatch:o}),c=n;h?.color||(c=NN(lF,i,n));let d={dataItem:{dataContext:t}},{symbolWithColorInfo:A}=du({element:d,seriesConfig:e,y:e.y,seriesSymbol:h??Xm(),seriesIndex:c,rendererSymbol:u,colorMatch:o,isChartFillSymbol:!0});return A}function WL(a,t){let{x:e,isNonAggregatedChart:i,objectIdField:r,isPieFromFields:s,seriesConfig:n,fieldList:o,labelUpdateNeeded:l,colorMatch:h,chartSubType:u,utilsStrings:c}=a,d=[],A,p,f=new Set;return t?.forEach((m,g)=>{let y=zN({dataContext:m,x:e,isNonAggregatedChart:i,dataIndex:g,objectIdField:r,isPieFromFields:s});m[pt.pieChart.technicalFieldSliceId]=y;let x=qC(n.slices,y);x?.fillSymbol?.color!==void 0&&f.add(ZC(x.fillSymbol.color))}),t?.forEach((m,g)=>{let y=m[pt.pieChart.technicalFieldSliceId],x=qC(n.slices,y),w=ih(m),S=HN({dataContext:m,seriesConfig:n,existingSlicesColors:f,isGroupOfSlices:w,sliceFromConfig:x,dataIndex:g,colorMatch:h,chartSubType:u});S.color&&f.add(ZC(S.color));let F=GN({dataContext:m,sliceFromConfig:x,isGroupOfSlices:w,seriesConfig:n,fieldList:o,isPieFromFields:s,labelUpdateNeeded:l,colorMatch:h,utilsStrings:c}),T={sliceId:y,label:F,fillSymbol:S};T.originalLabel=x?.originalLabel??(m?.[pt.originalCategoryValue]!==void 0?m?.[pt.originalCategoryValue]:T.label),w?(p=m[pt.pieChart.technicalFieldGroupedSlices],n.sliceGrouping!==void 0&&(A={sliceId:n.sliceGrouping.sliceId,percentageThreshold:n.sliceGrouping.percentageThreshold,label:F,originalLabel:n.sliceGrouping.originalLabel??F,fillSymbol:S})):d.push(T)}),{slices:d,groupOfSlicesSymbols:A,groupOfSlices:p}}function XI(a){let{creation:t,dataInfo:e,pieChartDataActuallyChanged:i,chartConfig:r,previousConfig:s,queryObject:n,popupTemplateFieldInfosEnabled:o,utilsStrings:l}=a,h;if(r.series[0].type===V.PieSeries){let u=Pn(e.data),c=hx({oldConfig:s,newConfig:r}),d=lx(s,r),A=qm(s,r),p=QN({chartConfig:r,queryObject:n,popupTemplateFieldInfosEnabled:o,labelUpdateNeeded:t||i||c||A||d,utilsStrings:l}),{slices:f,groupOfSlicesSymbols:m,groupOfSlices:g}=WL(p,u),{slices:y}=WL(p,g??[]);h={slices:f,groupedSlices:y,groupOfSlices:m}}return h}async function jN(a){let{creation:t,dataInfo:e,dataInfo:{data:i},pieChartDataActuallyChanged:r,chartConfig:s,previousConfig:n,pieSlicesSymbols:o,queryObject:l,options:h,utilsStrings:u}=a,{slices:c}=o??{},{chartWillRender:d}=h??{},A=ze(s.series),p=!1,f=s,m=Fr(o),g,y;if(d&&(A===V.PieSeries||A===V.GaugeSeries)){p=!0,f=Fr(s);let x=cg({data:i,seriesConfig:s.series});f=await d({chartConfig:f,data:x,slices:c}),!cs(l)&&A===V.PieSeries&&i&&"dataItems"in i&&({colorMatchApplied:g,rendererFieldNames:y}=await Cx({data:i.dataItems,queryObject:l,chartConfig:f,allowColorMatch:px({chartConfig:f,queryObject:l})}),m=XI({creation:t,dataInfo:e,chartConfig:f,previousConfig:n,queryObject:l,pieChartDataActuallyChanged:r,popupTemplateFieldInfosEnabled:h?.popupTemplateFieldInfosEnabled,utilsStrings:u}))}return{changesApplied:p,alteredConfig:f,alteredPieSlicesSymbols:m,colorMatchApplied:g,rendererFieldNames:y}}function ih(a){return a?.[sn.defaultGroupOfSlicesId]===!0}function WN(a){let{dataContext:t,dataIndex:e,objectIdField:i}=a;return`${sn.sliceIdPrefix}-${t[i??""]?.toString()??e}`}function XN(a){let{chartConfig:t,chartData:e,fieldList:i}=a,r=It(t.series)===ke.PieFromFields;if(t.orderOptions?.data!==void 0||r){lg({arrayToSort:e,chartConfig:t,fieldList:i});let{slices:s}=t.series[0];s!==void 0&&s.sort((n,o)=>{let l=e.findIndex(u=>u[pt.pieChart.technicalFieldSliceId]===n.sliceId),h=e.findIndex(u=>u[pt.pieChart.technicalFieldSliceId]===o.sliceId);return l-h})}}function qC(a,t){let e;return a!==void 0&&t!==void 0&&(e=a.find(i=>i.sliceId===t)),e}function zN(a){let{dataContext:t,isNonAggregatedChart:e,x:i,dataIndex:r,objectIdField:s,isPieFromFields:n}=a,o="";return n===!0?o=t[pt.originalCategoryValue]??t[ao]:e?o=WN({dataContext:t,dataIndex:r,objectIdField:s}):(o=t[pt.originalCategoryValue],o===void 0||o===""?o=sn.emptySliceId:o===null&&(o=sn.nullSliceId),o=o??t[i]),o===void 0&&(o=sn.undefinedSliceId),o.toString()}function GN(a){let{dataContext:t,sliceFromConfig:e,isGroupOfSlices:i,seriesConfig:r,fieldList:s,isPieFromFields:n,labelUpdateNeeded:o,colorMatch:l,utilsStrings:h}=a,{sliceGrouping:u}=r,{x:c}=r;n&&(c=ao);let d=t[c]??t[pt.originalCategoryValue],A=t[pt.originalCategoryValue]??d,p=d;return o&&(i?p=u?.label??u?.originalLabel?.toString()??h.pieChart.defaultSliceGroupingLabel:l&&t[pt.rendererSymbolField]?.label!==void 0?p=t[pt.rendererSymbolField].label:e!==void 0||s!==void 0?(e?.label&&e.label!==e?.sliceId&&(p=e?.label),p===A&&A!==void 0&&A!==null&&(p=Or(s,A))):e===void 0&&(p=A),p===pt.nullValue?p="null":p!=null&&(p=p.toString())),p}function bw(a,t){return a?.[0]?.sliceGrouping?.percentageThreshold!==t?.[0]?.sliceGrouping?.percentageThreshold}function Nf(a){let{groupOfSlicesDataContext:t,chartData:e}=a;return(t??e?.find(i=>i[sn.defaultGroupOfSlicesId]===!0))?.[pt.pieChart.technicalFieldGroupedSlices]}function xw(a){let{dataContext:t,pieSlicesSymbols:e,seriesConfig:i}=a,r=i.fillSymbol?{...i.fillSymbol}:Xm();if(ih(t))r={...pt.pieChart.sliceGrouping.fillSymbol,...e?.groupOfSlices?.fillSymbol};else{let s=t[pt.pieChart.technicalFieldSliceId],n=e?.slices?.find(o=>o.sliceId===s);r=Fr(n?.fillSymbol??i.fillSymbol??Xm())}return r}function YN(a){let{data:t,seriesConfig:e,utilsStrings:i}=a,r=e[0],s=t?.reduce((d,A)=>{let p=A[Ru]??A[r.y];return Number.isFinite(p)||(p=0),p+d},0),n=r?.sliceGrouping?.percentageThreshold??0,o=[],l,h=0,u=t?.find(d=>d[sn.defaultGroupOfSlicesId]===!0)?.[pt.pieChart.technicalFieldGroupedSlices]??[],c=[...t,...u].filter(d=>{let A=!0,p=d[Ru]??d[r.y];if(Number.isFinite(p)){let f=p/s*100;d[pt.pieChart.technicalFieldSlicePercent]=f,f<=n&&d[sn.defaultGroupOfSlicesId]!==!0&&(h+=p,o.push(d),A=!1)}else d[sn.defaultGroupOfSlicesId]!==!0&&(o.push(d),A=n===0||n===void 0);return d[sn.defaultGroupOfSlicesId]===!0&&(l=d,A=!1),A});if(n>0&&o.length>0){let d=h/s*100,A=It(e)===ke.PieFromFields,p={...l,[sn.defaultGroupOfSlicesId]:!0,[A?ao:r.x]:r.sliceGrouping?.label??i?.pieChart.defaultSliceGroupingLabel,[A?Ru:r.y]:h,[pt.pieChart.technicalFieldSlicePercent]:d,[pt.pieChart.technicalFieldGroupedSlices]:o};c.push(p)}return c}function XL(a){let{creation:t,previousConfig:e,newConfig:i,dataInfo:r,dataUpdateNeeded:s,utilsStrings:n}=a,o=!1;if(r.data&&"dataItems"in r.data&&(t||e&&dg(e.series))&&i&&dg(i.series)){let l=t||e&&dg(e.series)&&bw(e.series,i.series);(s||l)&&(r.data.dataItems=YN({data:r.data.dataItems,seriesConfig:i.series,utilsStrings:n}),lg({arrayToSort:r.data.dataItems,chartConfig:i}),o=!0)}return o}function KN(a,t){let e=a.reduce((i,r)=>{if(r[sn.defaultGroupOfSlicesId]===!0){let s=r[pt.pieChart.technicalFieldGroupedSlices];s!==void 0&&s.forEach(n=>{i.push(n)})}else i.push(r);return i},[]);return lg({arrayToSort:e,chartConfig:t}),e=cg({data:{dataItems:e},seriesConfig:t.series})?.dataItems??[],e}function zI(a,t){let e=a?.filter(i=>!ih(i));return!rn(e,t)}function ZN(a){let{dataContext:t,newLabel:e,x:i}=a;e===void 0?t[pt.originalCategoryValue]!==void 0&&(t[i]=t[pt.originalCategoryValue]):t[i]!==e&&(t[pt.originalCategoryValue]===void 0&&(t[pt.originalCategoryValue]=t[i]),t[i]=e)}function qN(a){let{data:t,newChartConfig:e,pieSlicesSymbols:i,fieldList:r}=a,s=e.series[0],n=It(e.series)===ke.PieFromFields?ao:s.x;t.forEach(o=>{let l=ih(o),h=o[pt.pieChart.technicalFieldSliceId],u=l?s.sliceGrouping?.label:qC(i?.slices,h)?.label;ZN({dataContext:o,x:n,newLabel:u})}),XN({chartConfig:e,chartData:t,fieldList:r})}var Hi={SelectXY:"selectXY",SelectX:"selectX",SelectY:"selectY",ZoomXY:"zoomXY",ZoomX:"zoomX",ZoomY:"zoomY",None:"none"},ji={Top:"top",Bottom:"bottom",Median:"median",Outliers:"outliers"};function fl(a){let{type:t,iLocale:e,formatLocale:i=Ad(document.documentElement)}=a,r;switch(t){case V.NumberAxisFormat:{r=new Rl,r.language.locale=e,r.intlLocales=i;break}case V.DateAxisFormat:{r=new hn,r.language!==void 0&&(r.language.locale=e),r.intlLocales=i;break}}return r}function JC(a){let{axis:t,valueFormat:e,chartType:i}=a,r=Ym({isXAxis:!0,chartType:i,valueFormat:e}),s=ro(e)&&t instanceof Ct,n=ba(e)&&t instanceof Qe&&!(t instanceof Ct),o=r&&t instanceof $t;return!s&&!n&&!o}function GI(a,t){let e=typeof t=="number"?`${t}`:t,i=Ns(a.uid,"numberFormatter");return i!==void 0&&(e=i(t)),zi(e)&&(e=re.htmlEmptyContent),Zr(e)}function JN(a){a.renderer.labels.template.html=re.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>GI(a,e?.dataItem?.value??t),0)}function YI(a){let{axis:t,defaultOutput:e,dataItem:i}=a,r=e,s=Ns(t.uid,"categoryFormatter"),n=Ns(t.uid,"numberFormatter");if((n!==void 0||s!==void 0)&&i instanceof Jo){let o=ye(t.chart.uid,"config"),l=It(o?.series),h=ye(t.chart.uid,"rendererFieldNames"),u=no({value:qA(l,o?.series?.[0]),dataContext:i.dataContext,useRendererLabel:Qu(o,h),config:o});if(typeof u=="number"&&n!==void 0)r=n(u);else if(s!==void 0){if([ke.BoxPlotMonoField,ke.BoxPlotMultiFields,ke.BoxPlotMonoFieldAndSplitBy,ke.BoxPlotMultiFieldsAndSplitBy,ke.BarAndLineFromFields].includes(l)&&typeof u=="string"){let d=ye(t.chart.uid,"fieldList");u=Or(d,u)}let c=oo(i.dataContext);c===void 0&&(c=u),r=s(u,c)}}return zi(r)&&(r=re.htmlEmptyContent),Zr(r)}function eQ(a){a.renderer.labels.template.html=re.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>YI({axis:a,defaultOutput:t,dataItem:e?.dataItem}),0)}function tQ(a){let{axis:t,defaultOutput:e,dataItem:i}=a,r=e,s=Ns(t.uid,"dateFormatter");return s!==void 0&&i instanceof Uh&&(r=s(i.value??e)),zi(r)&&(r=re.htmlEmptyContent),Zr(r)}function iQ(a){a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>tQ({axis:a,dataItem:e?.dataItem,defaultOutput:t}),0),a.renderer.labels.template.adapter.disableKey("htmlOutput")}function rQ(a){a.renderer.labels.template.adapter.add("htmlOutput",t=>{let e=t,i=Ns(a.uid,"fontStyleCallback");return i!==void 0&&(e=i(e)),Zr(e)},1)}function sQ(a){a instanceof Qe&&!(a instanceof Ct)?JN(a):a instanceof $t?eQ(a):a instanceof Ct&&iQ(a),rQ(a)}function aQ(a){let{axis:t,formatOptions:e,dateAxisFormatter:i,isTimeOnlyField:r,setTimeZone:s,outTimeZone:n}=a;if(Ds(t.uid,{dateFormatter:i}),i===void 0){t.renderer.labels.template.adapter.isEnabled("htmlOutput")&&(t.renderer.labels.template.adapter.disableKey("htmlOutput"),t.renderer.labels.each(u=>{u.element instanceof kp&&u.element.removeChildren()}));let o={...$o(e)};r&&(o={hour:r?"numeric":void 0,minute:r?"numeric":void 0,...o});let l=["year","month","day","hour","minute","second"],h=o.timeZone??n;s&&t.timezone!==h&&(t.setPropertyValue("timezone",h),t.chart.validateData()),t.dateFormatter.timezone=h,delete o.timeZone;for(let u=0;u<l.length;u+=1){let c=l[u],d=u===0?c:l[u-1],A=e?.formatPerDateTimeUnit?.[c]??o,p=e?.formatPerDateTimeUnit?.[d];Iu(A)||(t.dateFormats.setKey(c,A),t.periodChangeDateFormats.setKey(c,p??A))}t.dateFormats.getKey("day")||t.dateFormats.setKey("day",re.dayDefaultFormat),t.periodChangeDateFormats.getKey("day")||t.periodChangeDateFormats.setKey("day",re.dayDefaultFormat),t.dateFormats.getKey("week")||t.dateFormats.setKey("week",t.dateFormats.getKey("day")??re.weekDefaultFormat),t.periodChangeDateFormats.getKey("week")||t.periodChangeDateFormats.setKey("week",t.periodChangeDateFormats.getKey("day")??re.weekDefaultFormat),t.invalidateLabels()}else t.renderer.labels.template.html=re.htmlEmptyContent,t.renderer.labels.template.adapter.enableKey("htmlOutput")}function nQ(a,t,e,i){let r=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:e});return r.numberFormat=a,s=>{let n=0;return s instanceof Date?s.toLocaleString(void 0,a):(n=typeof s!="string"?s??0:_x(s,r.intlLocales),i===!0&&a.style==="percent"&&(n/=100),r.format(n))}}function zL(a){let{axis:t,formatOptions:e,overridePercentMultiplication:i,valueAxisFormatter:r}=a,s=$o(e),n=ye(t.chart.uid,"formatLocale");Ds(t.uid,{numberFormatter:r??nQ(s,t.chart.language.locale,n,i)})}function oQ(a){let{axis:t,formatOptions:e,categoryAxisFormatter:i}=a,r=i!==void 0?i:Jm(e.characterLimit);Ds(t.uid,{categoryFormatter:r})}function lQ(a){let{axis:t,labelsTextSymbol:e,axisValueFormatter:i}=a,r=ye(t.chart.uid,"config")?.horizontalAxisLabelsBehavior;if(Ds(t.uid,{axisLabelsBehavior:r}),i!==void 0)Ds(t.uid,{fontStyleCallback:void 0});else if(Ns(t.uid,"fontStyleCallback")===void 0){let s=n=>{let o=Ns(t.uid,"axisLabelsBehavior");return xa({textSymbol:e,placeholderString:n,format:"html",axisLabelsBehavior:o,defaults:{maxWidth:t.renderer.labels.template.maxWidth}})};Ds(t.uid,{fontStyleCallback:s})}}function hQ(a){let{axis:t,isXAxis:e,formatOptions:i,labelsTextSymbol:r,overridePercentMultiplication:s,chartType:n,axisValueFormatter:o,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u,errorStrings:c}=a,d=Ym({isXAxis:e,chartType:n,valueFormat:i}),A=!1;!(t instanceof Ct)&&ba(i)?zL({axis:t,formatOptions:i,overridePercentMultiplication:s,valueAxisFormatter:o}):t instanceof Ct&&ro(i)?aQ({axis:t,formatOptions:i,dateAxisFormatter:o,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u}):t instanceof $t?ud(i)||d?(oQ({axis:t,formatOptions:i,categoryAxisFormatter:o}),Ds(t.uid,{numberFormatter:void 0})):ba(i)?(zL({axis:t,formatOptions:i,overridePercentMultiplication:s,valueAxisFormatter:o}),Ds(t.uid,{categoryFormatter:void 0})):A=!0:A=!0,A&&Gm("mismatchAxisAndValueFormat",c),lQ({axis:t,labelsTextSymbol:r,axisValueFormatter:o}),t.invalidateLabels()}function uQ(a){let t=a;return a>=1?t=10**(a.toFixed(0).length-1):a<1&&a>0&&(t=10**-Math.abs(Math.floor(Math.log10(a)))),t}function KI(a){let{minimumFromConfig:t,maximumFromConfig:e,isLogarithmic:i}=a,r=i===!0&&t!==null&&t!==void 0&&t<=0,s=!Number.isFinite(t)||!Number.isFinite(e);return r||s}var Wt={XAxisTitle:"XAxisTitle",YAxisTitle:"YAxisTitle",ChartTitle:"ChartTitle",ChartSubTitle:"ChartSubTitle",ChartFooter:"ChartFooter",GuideLabel:"GuideLabel",LegendTitle:"LegendTitle"},Ie={Ready:"ready",Hidden:"hidden",Shown:"shown",Hit:"hit",DoubleHit:"doublehit",Up:"up",SelectEnded:"selectended",Over:"over",Out:"out",SizeChanged:"sizechanged",VisibilityChanged:"visibilitychanged",PositionChanged:"positionchanged",Validated:"validated",DataItemsValidated:"dataitemsvalidated",Inited:"inited",ChildAdded:"childadded",DataRangeChanged:"datarangechanged",LayoutValidated:"layoutvalidated"};function ZI(a){let{actionMode:t,cursorRange:e,isRotated:i}=a,r=Hi.None;switch(e){case zm.MultiAxes:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=Hi.SelectXY:t===Ut.Zoom&&(r=Hi.ZoomXY);break;case zm.XAxis:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=i===!0?Hi.SelectY:Hi.SelectX:t===Ut.Zoom&&(r=i===!0?Hi.ZoomY:Hi.ZoomX);break;case zm.YAxis:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=i===!0?Hi.SelectX:Hi.SelectY:t===Ut.Zoom&&(r=i===!0?Hi.ZoomX:Hi.ZoomY);break}return r}function cQ(a,t){let e=re.cursorCrosshair.style,i={type:Rt.SLS,style:t.style??e.style,color:t.color??e.color,width:t.width??e.width};Vc({element:a.cursor.lineX,lineSymbol:i}),Vc({element:a.cursor.lineY,lineSymbol:i})}function qI(a){if(!(a instanceof Ys)&&!(a instanceof pr)){a.cursor=new yc;let t="userAgentData"in navigator&&navigator.userAgentData&&typeof navigator.userAgentData=="object"&&"mobile"in navigator.userAgentData&&navigator.userAgentData.mobile===!0||/Mobi|Android/iu.test(navigator.userAgent);a.cursor.hideSeriesTooltipsOnSelection=!t}}function JI(a,t){if(!(a instanceof Ys)&&!(a instanceof pr)){let e=a,i=e.cursor??new yc;t?.style!==void 0&&cQ(e,t.style);let r=re.cursorCrosshair;i.lineX.disabled=r.verticalLineVisible?t?.verticalLineVisible===!1:t?.verticalLineVisible!==!0,i.lineY.disabled=r.horizontalLineVisible?t?.horizontalLineVisible===!1:t?.horizontalLineVisible!==!0,e.cursor=i}}function dQ(a){return!(a instanceof Ys)&&a.cursor===void 0&&qI(a),a.cursor}function ew(a,t){let e=a.renderer.labels.template;e.events.hasListenersByType(Ie.Hit)&&(e.cursorOverStyle=t),a.renderer.labels.each(i=>{i.cursorOverStyle=t})}function AQ(a){let{chart:t,chartType:e,showMean:i,enabled:r}=a,s=r?si.pointer:si.default;switch(e){case V.ComboLineAndBarSeries:case V.BarSeries:case V.PieSeries:t.series.each(n=>{(n instanceof Xi||n instanceof ws)&&(n.cursorOverStyle=s)});break;case V.BoxPlotSeries:t.series.each(n=>{let o=s;if(n instanceof Ti){let l=zr(n);l!==void 0&&(i&&sa(n.uid,"isBoxPlotOutliersSeries")&&(o=si.default),l.cursorOverStyle=o,l.clones.each(h=>{h.cursorOverStyle=o}))}else n.cursorOverStyle=i?si.default:s});break;case V.LineSeries:t.series.each(n=>{if(n instanceof Ti){let o=zr(n);o!==void 0&&(o.cursorOverStyle=s,o.clones.each(l=>{l.cursorOverStyle=s}))}});break}}function pQ(a){let{chart:t,actionMode:e,cursorRange:i}=a,r=ye(t.uid,"isRotated"),s=ye(t.uid,"config"),n=oa(s),o=ze(s?.series),l=o===V.LineSeries&&ba(s?.axes?.[0]?.valueFormat),h=o===V.LineSeries&&ud(s?.axes?.[0]?.valueFormat),u=o===V.LineSeries&&ro(s?.axes?.[0]?.valueFormat),c,d=!1,A=e??ye(t.uid,"actionMode")??re.actionMode;if(ye(t.uid,"filterBySelection")===!0)c=Hi.None,d=!1;else if(i!==void 0)c=ZI({actionMode:A,cursorRange:i,isRotated:r});else switch(A){case Ut.Zoom:l||u?c=Hi.ZoomXY:c=r===!0?Hi.ZoomY:Hi.ZoomX,d=!1;break;case Ut.MultiSelection:case Ut.MultiSelectionWithCtrlKey:h?c=r===!0?Hi.SelectY:Hi.SelectX:c=Hi.SelectXY,d=!0;break;case Ut.MonoSelection:c=Hi.None,d=!0;break;case Ut.None:c=Hi.None,d=!1;break}t instanceof Vt&&t.cursor!==void 0&&c!==void 0&&(t.cursor.behavior=c),AQ({chart:t,chartType:o,enabled:d,showMean:n})}function e1(a){let t="";return a instanceof Qr?t=a.dataFields?.categoryX??a.dataFields?.dateX??a.dataFields?.valueX??"":a instanceof ws&&(t=a.dataFields?.category??""),t}function t1(a){let t="";return a instanceof Qr?t=a.dataFields?.categoryY??a.dataFields?.dateY??a.dataFields?.valueY??"":a instanceof ws&&(t=a.dataFields?.value??""),t}function i1(a){return ye(a.chart.uid,"isRotated")===!0?t1(a):e1(a)}function xu(a){return ye(a.chart.uid,"isRotated")===!0?e1(a):t1(a)}function Dv(a,t=0){let e=ye(a.chart.uid,"config");return ze(e?.series,t)}function*fQ(a){let{filterList:t,queryObject:e,queryConfig:i,errorStrings:r}=a;for(let s=0;s<t.length;s+=1){let n={...i};n.where=ag([n.where,t[s]]),yield JF({queryObject:e,queryConfig:n,uniqueFeature:!0,errorStrings:r})}}async function r1(a){let{whereList:t,queryObject:e,queryFilter:i,queryConfig:r,errorStrings:s}=a,n=[];if(t.length>0){let o=mF().maxElementsPerSelectionQuery,l=[],h=Math.ceil(t.length/o);for(let c=0;c<h;c+=1){let d=c*o,A=(c+1)*o,p=t.slice(d===0?0:d-1,A),f=ag(p,"OR");f=ag([i,f]),l.push(f)}let u=fQ({filterList:l,queryObject:e,queryConfig:r,errorStrings:s});n=(await Promise.all(u)).flat(),n=Array.from(new Set(n))}return n}var cu={Outlier:"outlier",Box:"box",OutlierToOutlier:"outlier-outlier",OutlierToBox:"outlier-box",BoxToOutlier:"box-outlier",BoxToBox:"box-box"};function mQ(a,t){let e=a[pt.boxPlot.boxPlotOutlierId]===!0?cu.Outlier:cu.Box,i=typeof t=="number"?cu.Outlier:cu.Box;return`${e}-${i}`}function gQ(a){let{oneSelectedItem:t,dataContext:e,selectedOutlierKey:i}=a;return t[i]===e[i]}function yQ(a){let{elementMin:t,elementMax:e,selectedOutlierValue:i}=a,r;return typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(r=i>=t&&i<=e),r}function vQ(a){let{selectedMin:t,selectedMax:e,elementOutlierValue:i,oneSelectedItem:r,iqrField:s}=a,n;typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(n=i>=t&&i<=e);let o=s in r;return n!==!1&&o}function bQ(a){let{selectedMin:t,selectedMax:e,elementMin:i,oneSelectedItem:r,elementMax:s,iqrField:n}=a,o;typeof i=="number"&&typeof s=="number"&&typeof t=="number"&&typeof e=="number"&&(o=!(i>=e||s<=t));let l=n in r;return o!==!1&&l}function xQ(a){let{oneSelectedItem:t,dataContext:e,xAxisField:i}=a,r=e[pt.originalCategoryValue]??e[pt.boxPlot.boxPlotCategory]??e[i],s=t[pt.originalCategoryValue]??t[pt.boxPlot.boxPlotCategory]??t[i];return r===s}function _Q(a){let{chartSubType:t,yAxisField:e,splitBy:i,showOutliers:r}=a,s=t===ke.BoxPlotMultiFieldsAndCategory?e:void 0,n={y:s,splitBy:i},o=Zi({...n,key:Yt.Outlier}),l=Zi({...n,key:Yt.Max,showOutliers:r}),h=Zi({...n,key:Yt.Min,showOutliers:r}),u=Zi({...n,key:Yt.Max,showOutliers:!1}),c=Zi({...n,key:Yt.Min,showOutliers:!1}),d=Zi({...n,key:Yt.Max,showOutliers:!0}),A=Zi({...n,key:Yt.Min,showOutliers:!0}),p=Zi({splitBy:i,y:s,key:Yt.IQR});return{selectedOutlierKey:o,maxField:l,minField:h,selectedMaxFieldWoOutliers:u,selectedMinFieldWoOutliers:c,selectedMaxFieldWithOutliers:d,selectedMinFieldWithOutliers:A,iqrField:p}}function CQ(a){let{elementDataContext:t,layerOidField:e,xAxisField:i,splitBy:r,yAxisField:s,chartSubType:n,showOutliers:o}=a,l=t,h;if(l?.[pt.boxPlot.boxPlotMeanLineMarkerId]===!0){let u=Zi({splitBy:r,key:Yt.Average});h=c=>{let d=!i||!(i in c&&i in l)||c[i]===l[i],A=u in c&&u in l;return d&&A}}else i!==void 0&&s!==void 0&&(h=u=>{let c;if(e!==void 0&&e in u&&e in l)c=u[e]===l[e];else{let{selectedOutlierKey:d,maxField:A,minField:p,selectedMaxFieldWoOutliers:f,selectedMinFieldWoOutliers:m,selectedMaxFieldWithOutliers:g,selectedMinFieldWithOutliers:y,iqrField:x}=_Q({chartSubType:n,yAxisField:s,splitBy:r,showOutliers:o}),w=l[d],S=u[d],F=l[p],T=l[A],L=u[m]??u[y],O=u[f]??u[g],I=xQ({oneSelectedItem:u,dataContext:l,xAxisField:i});if(I)switch(mQ(u,w)){case cu.OutlierToOutlier:I=gQ({oneSelectedItem:u,dataContext:l,selectedOutlierKey:d});break;case cu.OutlierToBox:I=yQ({elementMin:F,elementMax:T,selectedOutlierValue:S});break;case cu.BoxToOutlier:I=vQ({selectedMin:L,selectedMax:O,elementOutlierValue:w,oneSelectedItem:u,iqrField:x});break;case cu.BoxToBox:I=bQ({selectedMin:L,selectedMax:O,elementMin:F,oneSelectedItem:u,elementMax:T,iqrField:x});break}c=I===!0}return c});return h}function _w(a){let{layerOidField:t,sliceDataContext:e,selectionDataContext:i,xAxisField:r}=a,s=!1;if(t!==void 0&&t in e&&t in i)s=i[t]?.toString()===e[t]?.toString();else{let n=e[pt.originalCategoryValue];n===void 0&&(n=e[r]),n===void 0&&(n=e[ao]);let o=i[pt.originalCategoryValue];o===void 0&&(o=i[r]),o===void 0&&(o=i[ao]),s=n!==void 0&&o!==void 0&&n===o}return s}function pv(a){let{dataContext:t,specificField:e,xOrY:i}=a,r=t[i==="x"?pt.originalCategoryValue:pt.originalYCategoryValue];return r===void 0&&e&&(r=t[e]),r===void 0&&(r=t[i==="x"?xr.xField:xr.yField]),r}function Lv(a){let{options:t,elementDataContext:e,selectionDataItems:i,layerOidField:r,xAxisField:s,yAxisField:n,chartType:o,splitBy:l,chartSubType:h}=a,u=!1,c;if(e!==void 0&&i!==void 0)switch(o){case V.HeatSeries:let d=e,A=pv({dataContext:d,specificField:s,xOrY:"x"}),p=pv({dataContext:d,specificField:n,xOrY:"y"});c=f=>{let m=pv({dataContext:f,specificField:s,xOrY:"x"}),g=pv({dataContext:f,specificField:n,xOrY:"y"});return A===m&&p===g};break;case V.RadarSeries:case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:if(s!==void 0&&n!==void 0){let f=e;c=m=>{let g,y=r;if(h===ke.BarAndLineSplitByNoAggregation){let x=vh({where:l,keepSurroundingQuotes:!1,escape:!1});y=`${r}_${x}`}if(r!==void 0&&r in m&&r in f)g=m[r]===f[r];else if(y!==void 0&&y in m&&y in f)g=m[y]===f[y];else if(pt.dateBinningRange in f&&typeof m[s]=="number"){let x=m[s],w=m[pt.dateBinningRange],S=Array.isArray(w)&&Number.isFinite(w[0])&&Number.isFinite(w[1]),[F,T]=S?w:[0,0],[L,O]=f[pt.dateBinningRange],I=f[pt.lastTemporalBin]===!0?x<=O:x<O;g=(S?F<O&&L<T:x>=L&&I)&&n in m&&Number.isFinite(m[n])}else{let x=S=>{let F=S[pt.originalCategoryValue];return F===void 0&&(F=S[s]),F=F===null?pt.nullValue:F,F},w=x(f);g=x(m)===w&&n in m}return g}}break;case V.BoxPlotSeries:c=CQ(a);break;case V.ScatterSeries:if(s!==void 0&&n!==void 0){let f=e;if(!wF({dataContext:f,chartLimits:t?.chartLimits}))c=m=>{let g;return r!==void 0&&r in f&&r in m?g=m[r]===f[r]:g=m[s]===f[s]&&m[n]===f[n],g};else{let{dataContextXMinField:m,dataContextXMaxField:g,dataContextYMinField:y,dataContextYMaxField:x}=pt.scatterplotAggregationFields,{[m]:w,[g]:S}=f,F=s!==n?f[y]:w,T=s!==n?f[x]:S,L=I=>{let U=I[s]??Number.NaN,P=w??Number.NaN,Q=S??Number.NaN;return w===S?U===P:(U??Number.NaN)>=P&&(U??Number.NaN)<Q},O=I=>{let U=I[n]??Number.NaN,P=F??Number.NaN,Q=T??Number.NaN;return F===T?U===P:U>=P&&U<Q};c=I=>L(I)&&O(I)}}break;case V.HistogramSeries:c=f=>{let m=!1,{minValue:g,maxValue:y}=e,{isLastBin:x}=e;if(s!==void 0&&s in f){let w=f[s];m=typeof w=="number"&&w>=g&&(x&&w<=y||!x&&w<y)}else if("minValue"in f&&"maxValue"in f){let{minValue:w,maxValue:S}=f;m=!(g>=S||y<=w)}return m};break;case V.PieSeries:s!==void 0&&(c=f=>{let m=e,g=ih(m),y=[m];return g&&y.push(...Nf({groupOfSlicesDataContext:m})??[]),y.some(x=>_w({sliceDataContext:x,selectionDataContext:f,layerOidField:r,xAxisField:s}))});break}return c!==void 0&&(u=i.some(c)),u}function th(a){let{isFeatureCollectionLayer:t,dataContext:e,yAxisField:i,yList:r,xAxisField:s,splitBy:n,chartType:o,chartSubType:l,showOutliers:h}=a,u={...e};if(e!==void 0){if(o===V.RadarSeries||o===V.BarSeries||o===V.LineSeries||o===V.ComboLineAndBarSeries||o===V.PieSeries){o!==V.PieSeries&&(t||l!==ke.BarAndLineNoAggregation&&l!==ke.BarAndLineSplitByNoAggregation)&&r.forEach(d=>{d!==i&&delete u[d]});let c=no({value:e[s],dataContext:e,keepNullValues:!0});u[s]=c,!zi(n)&&!CF(n)&&(u[Tn(n)]=vh({where:n,escape:!1}))}else if(o===V.BoxPlotSeries){u={[s]:e[s]},[Ou.uniqueIdsName,pt.boxPlot.boxPlotMeanLineMarkerId,pt.boxPlot.boxPlotOutlierId,pt.originalCategoryValue,pt.originalYCategoryValue].forEach(d=>{e[d]&&(u[d]=e[d])});let c=l===ke.BoxPlotMultiFieldsAndCategory?i:void 0;Object.values(Yt).forEach(d=>{let A=Zi({key:d,y:c,splitBy:n,showOutliers:h});e[A]!==void 0&&(u[A]=e[A])})}}return u}function s1(a){let{data:t,colorMatch:e,chartSubType:i,rendererType:r}=a;return t!==void 0&&e&&r!==void 0&&(i===ke.BoxPlotMultiFields&&(r===Um.UniqueValue||r===Um.PieChart)||i===ke.BoxPlotMonoFieldAndCategory&&r===Um.UniqueValue)&&t.some(s=>Object.keys(s).some(n=>n.includes(pt.rendererSymbolField)))}function wQ(a){return!!/^data:[a-z]+\/[a-z+.-]+;base64/u.test(a)}function a1(a,t=512){if(!wQ(a))throw new Error("Cannot convert a string that is not a data uri to a blob");let e=a.split(",")[0].split(":")[1].split(";")[0],i=atob(a.split(",")[1]),r=[];for(let s=0;s<i.length;s+=t){let n=i.slice(s,s+t),o=new Array(n.length);for(let h=0;h<n.length;h++)o[h]=n.charCodeAt(h);let l=new Uint8Array(o);r.push(l)}return new Blob(r,{type:e})}function Mf(a){let{value:t,valueFormat:e,iLocale:i,formatLocale:r}=a,s=t?.toString(),n=fl({type:e.type,iLocale:i,formatLocale:r});return typeof t=="number"&&e.type===V.NumberAxisFormat?s=n.format(t,$o(e)):(typeof t=="number"||t instanceof Date)&&e.type===V.DateAxisFormat&&(s=n.format(t,$o(e))),s}function bn(a){let{chart:t,config:e}=a,i=e;return e===void 0&&t!==void 0&&(i=ye(t.uid,"config")),us(i)}function BQ(a){a instanceof Vl&&a.series.each(t=>{Gn(t.uid),t instanceof Ti&&Gn(zr(t)?.uid),t.bullets.each(e=>{Gn(e.uid)}),t instanceof Xi&&t.columns.template.children.each(e=>{Gn(e.uid)})}),a instanceof Vt&&[a.xAxes.getIndex(0),a.xAxes.getIndex(1),a.yAxes.getIndex(0),a.yAxes.getIndex(1)].forEach(t=>{t!==void 0&&(Gn(t.uid??""),t.axisRanges.each(e=>{Gn(e.label?.uid)}))}),a instanceof Ys&&a.radarContainer.children.each(t=>{Gn(t.uid)}),a instanceof pr&&a.series.getIndex(0)?.slices.each(t=>{Gn(t.uid)}),"cursor"in a&&a.cursor instanceof sA&&Gn(a.cursor?.uid),"legend"in a&&a.legend!==void 0&&(Gn(a.legend.uid),Gn(a.legend.valueLabels?.template?.uid)),Gn(a.uid)}function fv(a){return typeof a=="number"?a:a.value}async function SQ(a){let{chart:t,exportOptions:e}=a,{format:i,quality:r=1,...s}=e,n=r<0||r>1?1:r,o=await t.exporting.getImage(i,{quality:n,...s}),l=a1(o),h=i==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${i}`,{type:h})}function Iv(a,t){t!==void 0&&(t.marginBottom!==void 0&&(a.marginBottom=t.marginBottom),t.marginTop!==void 0&&(a.marginTop=t.marginTop),t.marginRight!==void 0&&(a.marginRight=t.marginRight),t.marginLeft!==void 0&&(a.marginLeft=t.marginLeft),t.verticalCenter!==void 0&&(a.verticalCenter=QI(t.verticalCenter)),t.horizontalCenter!==void 0&&(a.horizontalCenter=yw(t.horizontalCenter)),t.strokeWidth!==void 0&&(a.strokeWidth=t.strokeWidth),t.wrap!==void 0&&(a.wrap=t.wrap),t.truncate!==void 0&&(a.truncate=t.truncate),t.maxWidth!==void 0&&(a.maxWidth=t.maxWidth),t.applyOnClones!==void 0&&(a.applyOnClones=t.applyOnClones,a.background.applyOnClones=t.applyOnClones))}function ml(a,t){let e=t?.createChild(Mi)??new Mi;return Iv(e,a),e}function FQ(a){let t=a.push(new zd);t.dx=1,t.dy=1,t.opacity=1}function TQ(a,t,e){if(e.alpha>0&&t>=0){a.length===0&&FQ(a);let i=a.getIndex(0);i.blur=t,i.color=e}else a.clear()}function PQ(a,t){let e=gs(a.uid,"isGuide"),i=t.visible===!1;return!i&&(e===!0||!(a instanceof Ko))&&t.content.text===""&&(i=!0),i}function GL(a){let{label:t,offset:e,offsetProperty:i}=a,r=99;if(t.adapter.remove(i,r),typeof e=="string"&&!Number.isFinite(Number(e))){let s=ip(e);s!==void 0&&(s/=100,t.adapter.add(i,()=>(t.parent?.[i==="dx"?"measuredWidth":"measuredHeight"]??0)*s,r))}else t[i]=e}function xn(a){let{label:t,labelConfig:e,defaults:i,skipSettingText:r}=a;if(e!==void 0){let s=xv(e.content,t.rtl,i);t.fill=s.fill,t.fontFamily=s.fontFamily,t.fontWeight=s.fontWeight,t.fontSize=s.fontSize,t.textDecoration=s.textDecoration,t.align=s.align,t.valign=s.valign,t.verticalCenter=s.verticalCenter,t.horizontalCenter=s.horizontalCenter,t.background.fill=s.backgroundFill,t.background.stroke=s.borderFill,t.background.strokeWidth=s.borderWidth,t.rotation=s.angle,GL({label:t,offset:s.xOffset,offsetProperty:"dx"}),GL({label:t,offset:s.yOffset,offsetProperty:"dy"}),t.rtl=s.rtl,t.wrap=s.wrap,t instanceof Ko||(t.maxWidth=s.maxWidth),r||(t.text=s.text),TQ(t.filters,s.haloSize,s.haloColor);let n=PQ(t,e);t.disabled=n,Ui(t,e.visible!==!1&&!n)}else t.disabled=!0}function n1(a,t){t!==void 0&&(a===V.BarSeries||a===V.LineSeries)&&t.adapter.add("dy",(e,i)=>{let r=i.dataItem,{chart:s}=r?.component??{};return s instanceof Vt&&(i.visible=!UI(i,s)),e??0})}function o1(a,t){t!==void 0&&(a===V.BarSeries&&t.adapter.add("dx",(e,i)=>{let r=e??0,s=i.dataItem,{chart:n}=s?.component??{};return(n!==void 0?ye(n.uid,"isRotated"):!1)===!0&&(s.valueX??s.valueY)<0&&(r-=i.measuredWidth+re.dataLabelNegative.paddingRight),r}),(a===V.BarSeries||a===V.LineSeries)&&t.adapter.add("dy",(e,i)=>{let r=e??0,s=i.dataItem,{chart:n}=s?.component??{};return(n!==void 0?ye(n.uid,"isRotated"):!1)!==!0&&(s.valueX??s.valueY)<0&&(r+=i.measuredHeight+re.dataLabelNegative.paddingTop),r}))}function tw(a){a.bulletsContainer.invalidateLabels(),a instanceof Xi&&a.columns?.template.invalidateLabels()}function DQ(a){let{dataValue:t,series:e,seriesType:i,stackedType:r,axisMin:s}=a,n=t===void 0;return t!==void 0&&(s!==void 0&&t<s?n=!0:e instanceof Xi&&(i===V.BarSeries||i===V.ComboLineAndBarSeries)&&(n=t===0&&r!==void 0&&r!==$i.Side)),n}function iw(a,t){let e,i=r=>gs(r.uid,"isDataLabel")??!1;return t==="bullets"?e=a.bullets.values.find(i):a instanceof Xi&&(e=a.columns.template.children.values.find(i)),e}function rw(a,t){a.adapter.add("htmlOutput",(e,i)=>{let r=e,{dataItem:s}=i;if(Of(a)&&(t instanceof Xi&&s instanceof Bs||t instanceof Ti&&s instanceof Wa)){let n=sa(t.uid,t instanceof Xi?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(n!==void 0){let o=ye(t.chart.uid,"isRotated"),l=ye(t.chart.uid,"config"),h=ks(l),u=o===!0?s.valueX:s.valueY,c=o===!0?s.values?.valueX?.totalPercent:s.values?.valueY?.totalPercent,d=o===!0?(s.component?.xAxis).min:(s.component?.yAxis).min;r=DQ({dataValue:u,series:t,seriesType:t instanceof Xi?V.BarSeries:V.LineSeries,stackedType:h,axisMin:d})?"":n(u,c)}}return Zr(r)},0)}function l1(a){let{numberFormatter:t,dataLabelsConfigContent:e,stackedType:i}=a;return(r,s)=>{let n=i===$i.Stacked100&&s!==void 0?s:r;return t.numberFormat.style==="percent"&&(n/=100),xa({textSymbol:{...e,text:t.format(n)},format:"html"})}}function h1(a){a.tabindex=-1}function u1(a){let{series:t,seriesType:e,dataLabel:i,labelDefaults:r,dataLabelsConfig:s,yAxisValueFormat:n,stackedType:o,isRotated:l,defaultDataLabelFormatter:h,customDataLabelFormatter:u}=a;if(i!==void 0){let c=u,d=s?.content??{type:Rt.TS};if(u===void 0&&h!==void 0&&n?.type===V.NumberAxisFormat){let p=ye(t.chart.uid,"formatLocale"),f=fl({type:n.type,iLocale:t.chart.language.locale,formatLocale:p});f.numberFormat=n.intlOptions,c=h({numberFormatter:f,dataLabelsConfigContent:d,stackedType:o})}let A;switch(e){case V.BarSeries:A="barSeriesDataLabelFormatter";break;case V.LineSeries:A="lineSeriesDataLabelFormatter";break}A!==void 0&&Zn(t.uid,{[A]:c}),s!==void 0&&(s.content.text=l===!0?"{valueX}":"{valueY}",s.visible=s.visible!==!1),xn({label:i,labelConfig:s,defaults:r??re.dataLabel}),tw(t)}}function kv(a,t){let e=t;e===void 0&&(e=ye(a.uid,"config"));let i=ye(a.uid,"colorMatchApplied")??!1;return(e?.colorMatch??!1)&&i}function c1(a,t){let e;return a instanceof Ct?e=t===!0?"dateY":"dateX":a instanceof $t?e=t===!0?"categoryY":"categoryX":e=t===!0?"valueY":"valueX",e}function _A(a,t){a.name=t}function Cw(a){let{chart:t,lineSeries:e,applyPropertiesToClones:i}=a,r=e.bullets.push(new Ee);return DN(r.uid,{isBulletMarker:!0}),i!==!1&&(r.applyOnClones=!0),e.bulletsContainer.parent=t.seriesContainer,r}function ww(a){let{series:t,seriesConfig:e,rotationChanged:i,stackedType:r,isRotated:s}=a;switch(r){case $i.Stacked:{t.stacked=!0,t instanceof Ti&&(t.stackToNegative=e.stackNegativeValuesToBaseline??re.lineSeries.stackNegativeValuesToBaseline),i===s?t.dataFields.valueYShow=void 0:t.dataFields.valueXShow=void 0,t.updateStacking();break}case $i.Stacked100:{t.stacked=!0,s?t.dataFields.valueXShow="totalPercent":t.dataFields.valueYShow="totalPercent",t.updateStacking();break}case $i.Side:default:{t.stacked=!1,i===s?t.dataFields.valueYShow=void 0:t.dataFields.valueXShow=void 0;break}}}function LQ(a){return()=>{let{chart:t,marker:e}=a;e.clones.each(i=>{Ui(i,!UI(i,t))})}}function IQ(a){let{chart:t,series:e,seriesType:i,marker:r,numberOfChartSeries:s,ignoreSmoothRenderingLimit:n}=a,o=LQ({marker:r,chart:t}),l=s??1,h=t.data.length*l+l;n!==!0&&h>re.elementLimitForSmoothRendering&&(o=Is(o,re.debounceTime)),t.xAxes.getIndex(0)?.events.on(Ie.Validated,o),t.yAxes.getIndex(0)?.events.on(Ie.Validated,o),i===V.LineSeries&&(t.xAxes.getIndex(0)?.events.on(Ie.Validated,()=>{tw(e)}),t.yAxes.getIndex(0)?.events.on(Ie.Validated,()=>{tw(e)}))}function d1(a,t){a.series.each(e=>{let i=sa(e.uid,t);i!==void 0&&!i.isDisposed()&&i.dispose()})}function kQ(a){let t;return a!==void 0&&a.series.length>0&&(t=a.series.values.map(e=>e.visible?e.id:"").filter(e=>e!=="")),t}function WC(a){let{dataItem:t,y:e,splitBy:i,showOutliers:r}=a,s=Zi({key:Yt.Min,y:e,splitBy:i,showOutliers:r}),n=Zi({key:Yt.Max,y:e,splitBy:i,showOutliers:r}),o=Zi({key:Yt.FirstQuartile,y:e,splitBy:i,showOutliers:r}),l=Zi({key:Yt.ThirdQuartile,y:e,splitBy:i,showOutliers:r});return Number.isFinite(t[s])&&Number.isFinite(t[n])&&Number.isFinite(t[o])&&Number.isFinite(t[l])}function $Q(a,t){let e=0;if(a!==void 0&&t!==void 0){let i=Mo(t.series),r=It(t.series),s=Eo(t);a.data.forEach(n=>{switch(r){case ke.BoxPlotMonoField:case ke.BoxPlotMultiFields:case ke.BoxPlotMonoFieldAndCategory:WC({dataItem:n,showOutliers:s})&&(e+=1);break;case ke.BoxPlotMultiFieldsAndCategory:i.forEach(o=>{WC({dataItem:n,y:o,showOutliers:s})&&(e+=1)});break;case ke.BoxPlotMonoFieldAndSplitBy:case ke.BoxPlotMultiFieldsAndSplitBy:case ke.BoxPlotMonoFieldAndCategoryAndSplitBy:t.series.forEach(o=>{WC({dataItem:n,splitBy:o.query?.where,showOutliers:s})&&(e+=1)});break}})}return e}function YL(){return a=>{let t=ye(a.chart.uid,"config"),e=!1;if(t!==void 0&&a instanceof Qr){let i=$Q(a.chart,t),r=0,s=0,n=0,o=0,l=0;a.chart.series.values.forEach(c=>{if(c instanceof Cr)r+=c.columns.length;else if(c instanceof Ti&&!(c instanceof Aa)){let d=zr(c);if(d!==void 0&&!d.disabled){let A=d.clones.values.filter(p=>!(p.dataItem instanceof Go))?.length??0;if(sa(c.uid,"isBoxPlotMeanLineSeries")===!0){o+=A;let p=c.data.filter(f=>Number.isFinite(f[c.dataFields.valueX??c.dataFields.valueY??""])).length;l+=p}else{let p=c.data.filter(f=>Number.isFinite(f[c.dataFields.valueX??c.dataFields.valueY??""])).length;n+=p,s+=A}}}});let h=n===0||s>=n,u=l===0||o>=l;e=r>=i&&h&&u&&a.chart.appeared&&a.isReady()&&a.chart.isReady()}return e}}function OQ(a,t){let e;switch(a){case V.BarSeries:e=(i,r)=>{let s=!1;if(i instanceof Xi){let n=bn({chart:i.chart}),o=0;if(r.type===V.BarSeries){let l=(n?i.dataFields.valueX:i.dataFields.valueY)??r.y;o=i.chart?.data?.filter(h=>Number.isFinite(h[l])).length}s=i.chart.isReady()&&i.columns.length===o}return s};break;case V.LineSeries:t===!0?e=YL():e=(i,r)=>{let s=!1;if(i instanceof Ti){let n=bn({chart:i.chart}),o=zr(i),l=0;if(r.type===V.LineSeries){let{y:h}=r,u=(n?i.dataFields.valueX:i.dataFields.valueY)??[h].flat()[0];l=i.chart?.data?.filter(c=>Number.isFinite(c[u])).length}s=i.chart.appeared&&i.chart.isReady()&&o!==void 0&&o.clones.values.length>=l}return s};break;case V.PieSeries:e=i=>i instanceof ws&&i.slices.length>0;break;case V.BoxPlotSeries:e=YL();break}return e}function A1(a){let{series:t,callbackInfo:e,seriesConfig:i}=a,{type:r}=e,s=ze([i]),n=sa(t.uid,"isBoxPlotMeanLineSeries"),o=ye(t.chart.uid,"config"),l=bF(o),h=r==="style"?"updateStyleCallbackDisposer":"updateSelectionCallbackDisposer",u=A=>{let{type:p}=A;p==="selection"?p2(A.callbackProps):A.styleCallback!==void 0&&(Ui(t,i.visible),A.styleCallback())};t.events.once(Ie.Ready,()=>u(e)),l?t.chart.events.once(Ie.Ready,()=>u(e)):t.events.once(Ie.Ready,()=>u(e)),sa(t.uid,h)?.dispose();let c=OQ(s,n),d=(s===V.PieSeries?t.chart:t).events.on(Ie.Validated,()=>{c!==void 0&&c(t,i)&&(d!==void 0&&d.dispose(),u(e))});t.dispatchImmediately(Ie.Validated),Zn(t.uid,{[h]:d})}function $v(a){let{series:t,styleCallback:e,seriesConfig:i}=a;A1({callbackInfo:{styleCallback:e,type:"style"},series:t,seriesConfig:i})}function EQ(a){let{series:t,callbackProps:e,seriesConfig:i}=a;A1({callbackInfo:{callbackProps:e,type:"selection"},series:t,seriesConfig:i})}function Wc(a){let{defaultChartItemRole:t}=re.aria;a instanceof Cr||a instanceof Xi?(a.columns.template.properties.role=t,a.columns.template.focusable=!0,a.columns.template.hoverOnFocus=!0,a.itemReaderText=sp()):a instanceof Aa?a.segments.template.properties.role=t:a instanceof Ti?a.bullets.values.forEach(e=>{e.focusable=!0,e.properties.role=t,e.readerTitle=sp(),e.hoverOnFocus=!0}):a instanceof ws&&(a.slices.template.properties.role=t,a.slices.template.hoverOnFocus=!0,a.itemReaderText="{category} {value.formatNumber('#.#')} {value.percent.formatNumber('#.#')}%")}function MQ(a){let t=ye(a.uid,"config");a.series.each(e=>{let i=t?.series?.find(r=>r.id===e.id);i!==void 0&&i.visible!==!1&&!e.visible&&Ui(e)})}function Rf(a,t){let e=ze(t?.series);return t?.series.find(i=>{let r=!1;return e!==V.BoxPlotSeries||a instanceof Cr?r=a.id===i.id:a instanceof Aa?r=a.id.replace(`_${ji.Top}`,"")===i.id||a.id.replace(`_${ji.Median}`,"")===i.id||a.id.replace(`_${ji.Bottom}`,"")===i.id:a instanceof Ti&&(r=a.id.replace(`_${ji.Outliers}`,"")===i.id),r})}var ia={CustomActive:"custom-active",CustomInactive:"custom-inactive",Default:"default",Active:"active"};function RQ(a,t){let e=!1;if(t!==void 0&&Of(a)){let i=Pt.spriteRectToSvg(a.bbox,a),r=t.x,s=t.y,n=t.x+t.width,o=t.y+t.height,l=i.x,h=i.y,u=i.x+i.width,c=i.y+i.height;e=!(l>n||u<r||h>o||c<s)}return e}function Xc(a){let{element:t,customSelectionTheme:e,useNativeState:i}=a,r=i===!0?ia.Active:ia.CustomActive,s=t.states.getKey(r)??t.states.create(r),n=t.states.getKey(ia.CustomInactive)??t.states.create(ia.CustomInactive),{selectedElementsTheme:o,nonSelectedElementsTheme:l}=e??re.selectionTheme??{};jL(s,o),jL(n,l)}function Yn(a){let{element:t,selected:e,multiSelect:i,isDateOrCategoryAxis:r,useNativeState:s,backToDefaultState:n}=a;if(t!==void 0){let o=t.isActive;i!==!0?r===!0?o=t.isActive?!1:t.isActive!==e:o=e:o=t.isActive!==e,o!==t.isActive&&(t.isActive=o);let l=s===!0?ia.Active:ia.CustomActive,h=n===!0?ia.Default:ia.CustomInactive;t.setState(t.isActive?l:h,0),t.isActive&&(t.toFront(),t.dataItem?.component instanceof go&&t.dataItem.component.toFront())}return t?.isActive??!1}function Ov(a,t){let e=!1;if(t instanceof Vt||t instanceof pr){let i=ye(t.uid,"actionMode");i!==void 0&&(e=i===Ut.MultiSelection||i===Ut.MultiSelectionWithCtrlKey&&(a?.event?.ctrlKey||a?.event?.metaKey))}return e}function p1(a){let t=a instanceof Vt&&a.zoomOutButton.isHover,e=a.legend.isHover,i=!1,r=!1,s=!1,n=!1;if(a instanceof Vt){i=a.xAxes.values.some(l=>l.renderer.labels.template.events.has(Ie.Hit)&&l.renderer.isHover),r=a.yAxes.values.some(l=>l.renderer.labels.template.events.has(Ie.Hit)&&l.renderer.isHover),s=i||r;let o=ye(a.uid,"config");oa(o)&&(n=a.series.values.find(l=>l instanceof Cr)?.isHover??!1)}return!t&&!e&&!s&&!n}function Bw(a,t){return a.values.filter(e=>{let i=!1,r=!e.isActive;if(!(e.dataItem instanceof Go)){e.isActive=!e.isActive;let s=ye(t.uid,"filterBySelection")!==!0&&r;Yn({element:e,selected:s}),i=r}return i})}function KL(a,t){let e=[],{columns:i,chart:r}=a,s=ye(r.uid,"config");if(s&&i!==void 0&&a.visible){let n=s?.series[0].x,o=a?.dataFields?.customValue??"",l=Dv(a,t),h=Rf(a,s),u=l===V.BoxPlotSeries?h?.y:xu(a),c={element:{},yAxisField:u,xAxisField:n,splitBy:o,seriesIndex:t,chartConfig:s};e=Bw(i,r).map(d=>({...c,element:d,elementDataContext:d.dataItem?.dataContext,elementIndex:d.dataItem?.index}))}return e}function ZL(a,t){let e=[];if(a.visible){let i=zr(a)?.clones;if(i!==void 0){let{chart:r}=a,s=ye(r.uid,"config");if(s){let n=s.series[0].x??"",o=xu(a),l=a?.dataFields?.customValue??"",h={element:{},xAxisField:n,yAxisField:o,splitBy:l,seriesIndex:t,chartConfig:s};e=Bw(i,r).map(u=>({...h,element:u,elementDataContext:u.dataItem?.dataContext,elementIndex:u.dataItem?.index}))}}}return e}function UQ(a){let t=[];if(a.visible){let{chart:e}=a,i=ye(e.uid,"config");if(i){let r=i1(a),s=xu(a),n={element:{},xAxisField:r,yAxisField:s,seriesIndex:0,chartConfig:i},o;t=Bw(a.slices,e).map(l=>{let h=l.dataItem?.dataContext??{};return ih(h)&&(o=Nf({groupOfSlicesDataContext:h})),{...n,element:l,elementIndex:l.dataItem?.index,elementDataContext:h}}),o!==void 0&&o.forEach((l,h)=>{t.push({...n,elementIndex:h,elementDataContext:l})})}}return t}function VQ(a){let{chart:t,selectionSource:e,chartConfig:i}=a,r=!1,s=[];if(Dl(i)){if(r=oa(i),s=t.series.values.filter(n=>!(n instanceof Aa)),e===Tr.SelectionByClick){let n=new Set,o=s.find(l=>l instanceof Cr&&l.isHover);o===void 0?s.forEach(l=>{l instanceof Ti&&(l.id.includes(ji.Outliers)&&l.tooltip?.visible===!0||sa(l.uid,"isBoxPlotMeanLineSeries"))&&n.add(l)}):n.add(o),s=Array.from(n)}}else s=t.series.values;return s=s.filter(n=>n.visible&&(!r||!(n instanceof Cr||sa(n.uid,"isBoxPlotOutliersSeries")))),s}async function f1(a){let{chart:t,cursorSelectionRectangle:e,multiSelect:i,selectionSource:r,hitElement:s,queryObject:n,errorStrings:o}=a,l=ye(t.uid,"config"),h=l?.series[0]?.x??"",u=[];ai(t.uid,{pendingSelectionQueries:!0});let c=[],d=!0;VQ({chart:t,selectionSource:r,chartConfig:l}).forEach((A,p)=>{let f=Rf(A,l);if(l&&A.visible&&A instanceof Qr){let m=Dv(A,p)===V.BoxPlotSeries?f?.y:xu(A),g=A.dataFields?.customValue??"",y={element:{},yAxisField:m,xAxisField:h,splitBy:g,seriesIndex:p,chartConfig:l},x;A instanceof Xi||A instanceof Cr?x=A.columns?.values:A instanceof Aa?x=A.segments.values:A instanceof Ti&&(x=zr(A)?.clones?.values,y.uniqueFeature=!0),x!==void 0&&(c=[...c,...x],x.forEach((w,S)=>{if(!(w.dataItem instanceof Go)){let F=w.isActive,T=w===s||RQ(w,e);T&&(d=!1);let L=!1;F?T?L=r!==Tr.SelectionByClick:L=i===!0:L=T,L&&u.push({...y,element:w,elementDataContext:w.dataItem?.dataContext,elementIndex:S}),Yn({element:w,selected:L})}}))}}),d&&(u=[]),await jf({chart:t,listSelectedElements:u,selectionSource:r,queryObject:n,errorStrings:o})}function NQ(a){let{chart:t,queryObject:e,errorStrings:i}=a,r=async s=>{let n=s.target.cursor;if(n.xRange!==void 0){n.selection.isMeasured=!0,n.validate(),n.selection.validate();let o=Pt.spriteRectToSvg(n.selection.bbox,n.selection);if(n.selection.hide(),o.width>0||o.height>0){let l=Ov(s,t);await f1({chart:t,cursorSelectionRectangle:o,multiSelect:l,selectionSource:Tr.SelectionByRange,queryObject:e,errorStrings:i})}}n.selection.hide()};qn(t)&&t.events.on(Ie.Up,async s=>{let n=s.target.cursor,o=BN(t.uid,"selectEndedCallbackDisposer");if(o!==void 0&&o.dispose(),n.xRange!==void 0&&s.event instanceof TouchEvent)await r(s);else{let l=n.events.once(Ie.SelectEnded,async()=>{await r(s)});SN(t.uid,{selectEndedCallbackDisposer:l})}})}async function Cv(a){let{hitEvent:t,chart:e,queryObject:i,errorStrings:r}=a,{target:s}=t,n=ye(e.uid,"actionMode");if(e!==void 0&&p1(e)&&n!==Ut.None&&n!==Ut.Zoom&&(s instanceof Vt||t.point===void 0)){let o=t.svgPoint?{x:t.svgPoint.x,y:t.svgPoint.y,width:0,height:0}:void 0,l=Ov(t,e);await f1({chart:e,cursorSelectionRectangle:o,multiSelect:l,selectionSource:Tr.SelectionByClick,hitElement:s,queryObject:i,errorStrings:r})}}function QQ(a){let{chart:t,queryObject:e,errorStrings:i}=a;qn(t)&&(t.zoomOutButton.hoverable=!0,t.events.on(Ie.Hit,async r=>await Cv({hitEvent:r,chart:t,queryObject:e,errorStrings:i})),t.events.on(Ie.DoubleHit,async r=>await Cv({hitEvent:r,chart:t,queryObject:e,errorStrings:i})))}function Qf(a){let{chart:t,element:e,queryObject:i,errorStrings:r}=a;e.events.on(Ie.Hit,async s=>await Cv({hitEvent:s,chart:t,queryObject:i,errorStrings:r})),e.events.on(Ie.DoubleHit,async s=>await Cv({hitEvent:s,chart:t,queryObject:i,errorStrings:r}))}async function HQ(a){let{chart:t,queryObject:e,errorStrings:i}=a,{series:r}=t;if(r.length>0){ai(t.uid,{pendingSelectionQueries:!0});let s=ye(t.uid,"config"),n=r.values.map((o,l)=>{let h=[];if(o.visible){let u=ze(s?.series,l);u===V.BarSeries?h=KL(o,l):u===V.LineSeries?h=ZL(o,l):u===V.PieSeries?h=UQ(o):u===V.BoxPlotSeries&&(o instanceof Cr?h=KL(o,l):o instanceof Ti&&!(o instanceof Aa)&&(h=ZL(o,l)))}return h}).flat();await jf({chart:t,listSelectedElements:n,selectionSource:Tr.ProgrammaticSelection,queryObject:e,errorStrings:i}),t instanceof pr&&t.feedLegend()}}function XC(a){if(qn(a))if(a.events.disableType(Ie.Hit),a.events.disableType(Ie.DoubleHit),a instanceof pr){let t=a.series.getIndex(0);t!==void 0&&(t.slices.template.clickable=!1,t.slices.template.togglable=!1,t.slices.template.events.disableType(Ie.Hit),t.slices.template.events.disableType(Ie.DoubleHit),t.labels.template.clickable=!1,t.labels.template.togglable=!1,t.labels.template.events.disableType(Ie.Hit),t.labels.template.events.disableType(Ie.DoubleHit))}else a instanceof Vt&&(a.xAxes.each(t=>wv(t,!0)),a.yAxes.each(t=>wv(t,!0)),a.events.disableType(Ie.Up))}function jQ(a){if(qn(a))if(a.events.enableType(Ie.Hit),a.events.enableType(Ie.DoubleHit),a instanceof pr){let t=a.series.getIndex(0);t!==void 0&&(t.slices.template.clickable=!0,t.slices.template.togglable=!0,t.slices.template.events.enableType(Ie.Hit),t.slices.template.events.enableType(Ie.DoubleHit),t.labels.template.clickable=!0,t.labels.template.togglable=!0,t.labels.template.events.enableType(Ie.Hit),t.labels.template.events.enableType(Ie.DoubleHit))}else a instanceof Vt&&(a.xAxes.each(t=>wv(t,!1)),a.yAxes.each(t=>wv(t,!1)),a.events.enableType(Ie.Up))}function gA(a){let{element:t,stylingInfo:e,stateKey:i="default"}=a;if(t!==void 0&&e!==void 0){let r=t.states.getKey(i)?.properties??t.defaultState.properties;if(r.fill=e.pattern??e.fill,r.fillOpacity=Ne(r.fill.toString()).alpha===0?0:1,e.outline!==void 0){let{outline:s}=e;r.stroke=s.stroke,r.strokeOpacity=s.stroke.alpha===0?0:1,r.strokeDasharray=s.strokeDasharray,r.strokeLinecap=s.strokeLinecap,r.strokeWidth=s.strokeWidth}}}function yA(a,t){return t!=null&&t!==""?t:a}function m1(a,t){let e;switch(a){case Fn.Average:{e=t.statistics.mean;break}case Fn.ContinuousPercentile:{e=t.statistics.median;break}case Fn.Sum:{e=t.statistics.sum;break}case Fn.Minimum:{e=t.statistics.minimum;break}case Fn.Maximum:{e=t.statistics.maximum;break}case Fn.Variance:{e=t.statistics.variance;break}case Fn.DiscretePercentile:{e=t.statistics.discretePercentile;break}case Fn.NoAggregation:{e=t.statistics.noAggregation;break}case Fn.Count:default:{e=t.statistics.count;break}}return e}function Sw(a){let{config:t,fieldName:e="",utilsStrings:i}=a,r=t.series[0].query?.outStatistics?.[0].statisticType??Nb.statisticType,s=m1(r,i);return Uc(i.statistics.aggregation,{statistics:s,fieldName:e})}function g1(a){let{config:t,fieldList:e,objectIdField:i,seriesIndex:r,isStacked100:s,utilsStrings:n}=a,o="",l=t.series[r].name,h=t.series[r],u=[h.y].flat()[0],c=t.axes,d=It(t.series),A=i??Ou.outStatistics.onStatisticField,p=h.query?.outStatistics?.[0].onStatisticField??A,f=Or(e,p),m=h.query?.outStatistics?.[0].statisticType??Nb.statisticType,g=m1(m,n);return d===ke.BarAndLineNoAggregation?o=l??Or(e,u):d===ke.BarAndLineSplitByNoAggregation?o=Or(e,u):(o=m===Fn.Count&&p===A?n.statistics.count:Uc(n.statistics.aggregation,{statistics:g,fieldName:f??l}),d===ke.BarAndLineMonoField&&!s&&(o=yA(o,c[1].title?.content?.text))),o}function y1(a,t){let{dataTooltipStyle:e,dataTooltipStyleReversed:i}=re;if(t===!0){let r=a.background.fill;if(r!==void 0){a.background.stroke=r,a.background.strokeWidth=i?.outline?.width??Number.NaN,a.background.fill=vn(i?.color);let s=a.background.fill.rgb;if(s!==void 0){let n=a.label.fill;a.label.fill=Dg(s)?n?.darkColor:n?.lightColor}}}else a.getStrokeFromObject=!0,a.getFillFromObject=!0,a.background.strokeWidth=e?.outline?.width??Number.NaN,a.background.stroke=vn(e?.outline?.color)}function Ev(a,t){if(a.tooltip){let e=t.dataTooltipFontSize??re.tooltipFontSize,i=sa(a.uid,"tooltipFontSize")!==e;a.tooltip.label.fontSize=e,i&&!a.tooltip.visible&&(a.tooltip.label.html=""),a.tooltip.label.invalidate(),Zn(a.uid,{tooltipFontSize:e})}}function WQ(a){let t=a.tooltip??new fo;t.pointerOrientation="vertical",a instanceof Cr||a instanceof Aa?t.label.maxWidth=re.boxPlot.boxPlotTooltipLabelWidth:t.label.maxWidth=re.tooltipWidth,t.label.wrap=!0;let e=ye(a.chart?.uid,"config"),i=e?Rf(a,e):void 0;i!==void 0&&Ev(a,i),t.events.on(Ie.Shown,r=>{let s=ye(a.chart.uid,"config");if(s!==void 0){let n=Rf(a,s),{dataTooltipReverseColor:o}=n??{};y1(r.target,o)}})}function XQ(a){a instanceof Ys||a.series.each(t=>{WQ(t)})}function v1(a,t){a.tooltipHTML=re.htmlEmptyContent,a.adapter.add("tooltipHTML",(e,i)=>{let r=e??"",{chart:s}=t;if(s!==void 0){let n=ye(s.uid,"config"),{dataTooltipVisible:o}=n?.series[0]??{};if(o===!1)r="";else{let l=sa(t.uid,"barAndLineTooltipFormatter");if(l!==void 0&&t.isReady()){let{dataItem:h}=i;if(h instanceof Bs||h instanceof Wa){let u=n?.series.find(c=>c.id===t.id);if(u!==void 0){let c=bn({config:n}),d=c?h.valueX:h.valueY,A=(c?h.values.valueX.totalPercent:h.values.valueY.totalPercent)/100,p=h.dataContext??{};if(p!==void 0){let f=ye(s.uid,"rendererFieldNames"),m=no({value:qA(It([u]),u),dataContext:p,useRendererLabel:Qu(n,f),config:n}),g=oo(p);g===void 0&&(g=m);let y=p[re.dateBinningRange];r=l({seriesName:t.name,xValue:m,originalXValue:g,dateBinningRange:y,statValue:d,percentValue:A})}}}}}}return Zr(r)}),a.tooltipPosition=t instanceof Ti?re.markerTooltipPosition:re.columnTooltipPosition,t.cursorTooltipEnabled=!1}function zQ(a){let{isStacked100:t,series:e,statValue:i,percentValue:r,yAxisValueFormat:s,dataTooltipValueFormat:n,dataTooltipPercentFormat:o}=a,l=n;l===void 0&&(ba(s)&&s?(l=s,t&&(l.intlOptions.style="decimal")):l=Hm());let h=ye(e.chart.uid,"formatLocale"),u=i!==void 0?Mf({value:i,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:h}):"",c="";if(t&&r!==void 0){let d=o;d===void 0&&(d=jm(),d.intlOptions.minimumFractionDigits=2,d.intlOptions.maximumFractionDigits=2),c=Mf({value:r,valueFormat:d,iLocale:e.chart.language.locale,formatLocale:h})}return{formattedStatValue:u,formattedPercentValue:c}}function GQ(a){let{series:t,dateRange:e,xAxisValueFormat:i}=a,r;if(e!==void 0&&e.length>0){let s=t.chart?.uid,n=ye(s,"timeIntervalInfo"),o=ye(s,"config"),l=ye(s,"options"),h=ye(s,"queryObject"),u=o&&bh(o.series[0])?o.series[0].temporalBinning?.outTimeZone:void 0,c={};switch(n?.unit){case Ji.Second:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};break;case Ji.Minute:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ji.Hour:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ji.Day:case Ji.Week:case Ji.Month:case Ji.Year:c={month:"numeric",day:"numeric",year:"numeric"};break}ep({chartConfig:o,queryObject:h,options:l})&&(c.timeZone=u??i.intlOptions.timeZone);let d=new Date(e[0]),A=new Date(e[1]);if(!Number.isNaN(d.valueOf())){let p=ye(t.chart.uid,"formatLocale"),f=fl({type:V.DateAxisFormat,iLocale:t.chart.language.locale,formatLocale:p}),m=f.format(d,c);if(r=m,!Number.isNaN(A.valueOf())){let g=f.format(A,c);g!==m&&(r=`${r} - ${g}`)}}}return r?.toString()??""}function b1(a){let{seriesConfig:t,xAxisValueFormat:e,setTimeBinningInfoWhenNotProvided:i,dataTooltipValueFormat:r,dataTooltipDateFormat:s,series:n,xValue:o,dateBinningRange:l,isTimeOnlyField:h,queryObject:u}=a,c,d=ye(n.chart.uid,"formatLocale");return Zm({seriesConfig:t,xAxisValueFormatType:e?.type,setTimeBinningInfoWhenNotProvided:i,queryObject:u})&&l!==void 0&&e?.type===V.DateAxisFormat?c=GQ({series:n,dateRange:l,xAxisValueFormat:e}):ro(e)?h&&typeof o=="number"?c=new Date(o).toLocaleTimeString(d):(o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(c=Mf({value:o,valueFormat:s??e,iLocale:n.chart.language.locale,formatLocale:d})):typeof o=="number"&&ba(e)?c=Mf({value:o,valueFormat:r??e,iLocale:n.chart.language.locale,formatLocale:d}):c=o,c?.toString()??""}function YQ(a){let{series:t,fieldList:e,queryObject:i,setTimeBinningInfoWhenNotProvided:r,seriesIndex:s,seriesConfig:n,utilsStrings:o}=a,{dataTooltipValueFormat:l,dataTooltipPercentFormat:h,dataTooltipDateFormat:u}=n,c=()=>"",{chart:d}=t;if(d!==void 0){let A=ye(d.uid,"config");if(A!==void 0){let{dataTooltipVisible:p}=n,f=t instanceof Ti?n.markerVisible:void 0;if(p===!1||f===!1)c=()=>"";else{let m=A.axes,g=m[0].valueFormat,y=m[1].valueFormat,x=It(A.series),w=e?.find(U=>U.name===n.x)?.type===GA.TimeOnly,S=ks(A)===$i.Stacked100,F=xh($s(i)).idField,T=Or(e,n.x),L=yA(T,m[0].title?.content.text),O=g1({config:A,fieldList:e,objectIdField:F,seriesIndex:s,utilsStrings:o,isStacked100:S}),I=Ra(d.rtl);c=U=>{let{statValue:P,percentValue:Q,xValue:G,dateBinningRange:Y}=U,ee=b1({seriesConfig:n,xAxisValueFormat:g,dataTooltipValueFormat:l,dataTooltipDateFormat:u,setTimeBinningInfoWhenNotProvided:r,series:t,xValue:G,dateBinningRange:Y,isTimeOnlyField:w,queryObject:i}),{formattedStatValue:te,formattedPercentValue:le}=zQ({isStacked100:S,yAxisValueFormat:y,dataTooltipValueFormat:l,dataTooltipPercentFormat:h,series:t,statValue:P,percentValue:Q}),z=[`<b>${L}${I} </b>${ee}`];switch(x){case ke.BarAndLineFromFields:{z.pop();let K=Sw({config:A,fieldName:Or(e,ee??""),utilsStrings:o});z.push(`<b>${K}${I} </b>${te}`);break}case ke.BarAndLineMonoField:case ke.BarAndLineNoAggregation:case ke.BarAndLineMultiFields:z.push(`<b>${O}${I} </b>${te}`);break;case ke.BarAndLineSplitByNoAggregation:case ke.BarAndLineSplitBy:{let K=Tn(n.query?.where,!1),we=Jb({value:Or(e,K),escape:!0});z.push(`<b>${we}${I} </b>${t.name}<br /><b>${O}${I} </b>${te}`)}break}return S&&z.push(`<b>${o.statistics.percent}${I} </b>${le}`),z.join("<br />")}}}}return c}function x1(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{barAndLineTooltipFormatter:i??YQ(a)}),Ev(t,e)}function Fw(a){let{target:t,defaultTooltipHTML:e,candleStickSeries:i,meanLineSeries:r,outliersSeries:s,tooltipCallback:n}=a,o=e,l=i??r;if(l!==void 0){let{chart:h}=l;if(h!==void 0){let u=ye(h.uid,"config"),{dataTooltipVisible:c}=u?.series[0]??{};if(c===!1)o="";else{let d=sa(l.uid,"boxPlotTooltipFormatter");d!==void 0&&l.isReady()&&u&&(o=n({target:t,defaultTooltipHTML:e,config:u,candleStickSeries:i,meanLineSeries:r,outliersSeries:s,boxPlotTooltipFormatter:d}))}}}return Zr(o)}function KQ(a){let{target:t,defaultTooltipHTML:e,config:i,candleStickSeries:r,outliersSeries:s,boxPlotTooltipFormatter:n}=a,o=e;if(r!==void 0&&s!==void 0){let l=r.dataItems.values.find(u=>(u.categories.categoryX??u.categories.categoryY)===(t.dataItem?.categories.categoryX??t.dataItem?.categories.categoryY)),h=i.series.find(u=>u.id===r.id);if(h!==void 0){let u=l?.dataContext??{};if(u!==void 0){let c=no({value:u[h.x],dataContext:u,useRendererLabel:Fl(i),specificField:pt.xAxisField}),d=oo(u);d===void 0&&(d=c),o=n({seriesName:s.name,xValue:c,originalXValue:d,dataContext:u})}}}return o}function ZQ(a){let{target:t,defaultTooltipHTML:e,config:i,meanLineSeries:r,boxPlotTooltipFormatter:s}=a,n=e;if(r!==void 0){let o=r.dataItems.values.find(l=>(l.categories.categoryX??l.categories.categoryY)===(t.dataItem?.categories.categoryX??t.dataItem?.categories.categoryY));if(o instanceof Wa){let l=i.series.find(h=>h.id===r.id);if(l!==void 0){let h=o.dataContext??{};if(h!==void 0){let u=no({value:h[l.x],dataContext:h,useRendererLabel:Fl(i),specificField:pt.xAxisField}),c=oo(h);c===void 0&&(c=u),n=s({seriesName:r.name,xValue:u,originalXValue:c,dataContext:h})}}}}return n}function qQ(a){let{target:t,defaultTooltipHTML:e,config:i,candleStickSeries:r,boxPlotTooltipFormatter:s}=a,n=e;if(r!==void 0){let o=t.dataItem;if(o instanceof gc){let l=i.series.find(h=>h.id===r.id);if(l!==void 0){let h=o.dataContext??{};if(h!==void 0){let u=no({value:h[l.x],dataContext:h,useRendererLabel:Fl(i),specificField:pt.xAxisField}),c=oo(h);c===void 0&&(c=u),n=s({seriesName:r.name,xValue:u,originalXValue:c,dataContext:h})}}}}return n}function JQ(a){a.cursorTooltipEnabled=!1,a.tooltipPosition=re.columnTooltipPosition,a.columns.template.tooltipHTML=re.htmlEmptyContent,a.columns.template.adapter.add("tooltipHTML",(t,e)=>Fw({target:e,defaultTooltipHTML:t??"",candleStickSeries:a,tooltipCallback:qQ}))}function eH(a,t){let e=zr(a);e!==void 0&&(e.tooltipPosition=re.markerTooltipPosition,e.tooltipHTML=re.htmlEmptyContent,a.cursorTooltipEnabled=!1,e.adapter.add("tooltipHTML",(i,r)=>Fw({target:r,defaultTooltipHTML:i??"",candleStickSeries:t,outliersSeries:a,tooltipCallback:KQ})))}function tH(a){let t=zr(a);t!==void 0&&(a.cursorTooltipEnabled=!1,t.tooltipPosition=re.markerTooltipPosition,t.tooltipHTML=re.htmlEmptyContent,t.adapter.add("tooltipHTML",(e,i)=>Fw({target:i,defaultTooltipHTML:e??"",meanLineSeries:a,tooltipCallback:ZQ})))}function uu(a){let{label:t,value:e,strongColon:i,useTable:r}=a,s=`<b>${t}${i}</b> ${e}`;return r!==!1?`<tr><td>${s}</td></tr>`:s}function iH(a){let{dataContext:t,series:e,dataTooltipValueFormat:i,y:r,splitBy:s,utilsStrings:n,useTable:o}=a,l=i??Hm(),h=Object.values(Yt),u=Ra(e.rtl),c=o!==!1?['<tr><td colspan="2"><hr style="border-top: solid black;"></td></tr>']:[""];return h.forEach(d=>{let A=Zi({key:d,y:r,splitBy:s}),p=t[A];if(p!=null&&typeof p=="number"){let f=ye(e.chart.uid,"formatLocale"),m=Mf({value:p,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:f}),g="";switch(d){case Yt.Min:g=n.statistics.minimum;break;case Yt.FirstQuartile:g=n.statistics.firstQuartile;break;case Yt.Median:g=n.statistics.median;break;case Yt.ThirdQuartile:g=n.statistics.thirdQuartile;break;case Yt.Max:g=n.statistics.maximum;break;case Yt.IQR:g=n.statistics.iqr;break;case Yt.Average:g=n.statistics.mean;break;case Yt.StandardDeviation:}Iu(g)||c.push(uu({label:g,value:m,strongColon:u,useTable:o}))}}),c}function rH(a){let{series:t,fieldList:e,seriesConfig:i,utilsStrings:r,queryObject:s}=a,{dataTooltipValueFormat:n}=i,o=()=>"",{chart:l}=t;if(l!==void 0){let h=ye(l.uid,"config");if(h!==void 0){let u=h.axes,c=u?.[0].valueFormat,{showMean:d}=h,A=It(h.series),p=Tn(i.query?.where),f=Or(e,p),m=vh({where:i.query?.where,escape:!1}),g=Or(e,i.x),y;i.x!==Qm&&(y=yA(g,u?.[0].title?.content.text));let x=Ra(l.rtl);o=w=>{let{dataContext:S,xValue:F}=w,T=b1({seriesConfig:i,xAxisValueFormat:c,series:t,xValue:F,queryObject:s}),L=[],O=T!==void 0&&!Iu(T)?Or(e,T):"",I=d===!0?[h.series[0].y].flat()[0]:[i.y].flat()[0],U=Or(e,I);switch(A){case ke.BoxPlotMonoField:case ke.BoxPlotMultiFields:case ke.BoxPlotMonoFieldAndSplitBy:case ke.BoxPlotMultiFieldsAndSplitBy:{if(T!==void 0&&!Iu(T)){let ee=A===ke.BoxPlotMonoField?i.name??O:O;L.push(uu({label:r.field,strongColon:x,value:ee}))}zi(f)||L.push(uu({label:f,strongColon:x,value:i.name??m?.toString()}));break}case ke.BoxPlotMonoFieldAndCategory:case ke.BoxPlotMultiFieldsAndCategory:{L.push(uu({label:r.field,strongColon:x,value:i.name??U})),T!==void 0&&!Iu(T)&&L.push(uu({label:y,strongColon:x,value:O}));break}case ke.BoxPlotMonoFieldAndCategoryAndSplitBy:L.push(uu({label:r.field,strongColon:x,value:U})),T!==void 0&&!Iu(T)&&L.push(uu({label:y,strongColon:x,value:O})),zi(f)||L.push(uu({label:f,strongColon:x,value:i.name??m?.toString()}));break}let P=[ke.BoxPlotMultiFieldsAndCategory],Q=S[re.boxPlot.boxPlotMeanLineMarkerId]!==void 0,G=L.length>0&&!Q,Y=iH({dataContext:S,series:t,dataTooltipValueFormat:n,splitBy:i.query?.where,y:P.includes(A)?[i.y].flat()[0]:void 0,utilsStrings:r,useTable:G});return G?`${L.join("<br>")}<table>${Y.join("")}</table>`:`${L.join("<br>")}${Y.join("<br>")}`}}}return o}function sH(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{boxPlotTooltipFormatter:i??rH(a)}),Ev(t,e)}function aH(a){let t=ml(re.dataLabelInitialize);return fu(t.uid,{isDataLabel:!0}),a.bullets.push(t),h1(t),n1(V.LineSeries,t),o1(V.LineSeries,t),rw(t,a),t.html="{valueX}",t}function nH(a){let{series:t}=a,e=iw(t,"bullets");u1({...a,dataLabel:e,defaultDataLabelFormatter:l1})}var B={Rotated:0,NonRotated:1,RTL:2,LTR:3,Stacked:4,Stacked100:5,SideBySide:6,LegendTop:7,LegendBottom:8,LegendLeft:9,LegendRight:10,DateAxis:11,ValueAxis:12,CategoryAxis:13,OrderByFieldsASC:14,OrderByFieldsDESC:15},_1=new Set([`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`]);function oH(a,t){t!==void 0&&(t.layout!==void 0&&(a.layout=t.layout),t.width!==void 0&&(a.width=HL(t.width)),t.height!==void 0&&(a.height=HL(t.height)),t.paddingTop!==void 0&&(a.paddingTop=t.paddingTop),t.paddingBottom!==void 0&&(a.paddingBottom=t.paddingBottom))}function lH(a){let t=!1,e=a.legend?.visible,i=a.legend?.title?.content.text,r=a.legend?.title?.visible;return t=e!==!1&&r!==!1&&i!==void 0&&i.length>0,t}function C1(a,t){let e=new Pe;return oH(e,a),e.parent=t,e}function w1(a,t){a.disabled=t}function hH(a,t){a.toBack()}function uH(a){if(a instanceof Ys){let{paddingTop:t,paddingRight:e,paddingBottom:i,paddingLeft:r}=re.gauge;a.padding(t,e,i,r)}else{let{paddingMinSize:t,marginMinSize:e,chartPaddingMinSize:i,chartContainer:r}=re;a.padding(i,i,i,i),a.chartAndLegendContainer.margin(e,e,e,e),a.chartAndLegendContainer.padding(t,t,t,t),a.chartContainer.margin(e,e,e,e),a.chartContainer.padding(r.paddingTop,t,t,t)}}function cH(a,t){let e=(i,r)=>{let{chartContainer:s,chartAndLegendContainer:n}=re,o=ye(i.uid,"config");if(o!==void 0){let l=lH(o),h=o.legend?.position;if(l)switch(h){case st.Top:i.chartAndLegendContainer.paddingTop=r.bbox.height??0,i.chartContainer.paddingBottom=s.paddingBottom??0;break;case st.Bottom:i.chartContainer.paddingBottom=r.bbox.height??0,i.chartAndLegendContainer.paddingTop=n.paddingTop??0;break;default:i.chartAndLegendContainer.paddingTop=n.paddingTop??0,i.chartContainer.paddingBottom=s.paddingBottom??0;break}else i.chartAndLegendContainer.paddingTop=n.paddingTop??0,i.chartContainer.paddingBottom=s.paddingBottom??0}};t.events.on(Ie.PositionChanged,()=>{e(a,t)})}function Tw(a){let{iLocale:t,pieChart:e,valueIntlOptions:i,percentageIntlOptions:r,displayNumericValue:s,displayPercentage:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}=a,c=ye(e.uid,"formatLocale"),d=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:c}),A=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:c});d.numberFormat={...i},A.numberFormat={...r,style:"percent"};let p=Ra(e.rtl," ");return(f,m,g)=>{let y="";if(m!==void 0&&g!==void 0){let x=`${o??""}${d.format(m)}${l??""}`,w=`${h??""}${A.format(Math.abs(g/100))}${u??""}`;Number.isFinite(m)?s===!0&&n===!0?y=`${w}${p}(${x})`:s===!0?y=x:n===!0&&(y=w):y=""}return y}}function B1(a){let t=!1;if(a.position===st.Right||a.position===st.Left)t=!0;else{let e=a.labels.getIndex(0)?.parent?.x;e!==void 0&&(t=!a.labels.values.some(i=>i.parent?.x!==e))}return t}function dH(a){let t=!1,e=a.labels.getIndex(0)?.parent?.y;return e!==void 0&&(t=!a.labels.values.some(i=>i.parent?.y!==e)),t}function AH(a){a.events.on(Ie.LayoutValidated,()=>{let t=B1(a),e=dH(a),i=t||!e?"right":"center";a.valueLabels.template.horizontalCenter=yw(i),a.valueLabels.template.align=NI(i)})}function pH(a){fu(a.valueLabels.template.uid,{isLegendValueLabel:!0}),a.valueLabels.template.adapter.add("htmlOutput",(t,e)=>{let i=t,r=FN(a.uid,"pieChartLegendValueLabelsFormatter");if(r!==void 0&&(i=r(e.dataItem?.values?.value?.value??0,e.dataItem?.values?.value?.percent??0)),zi(i)&&(i=re.htmlEmptyContent),a.baseSprite instanceof Vl){let s=ye(a.baseSprite.uid,"config");s?.legend?.body!==void 0&&(i=xa({textSymbol:{...s.legend.body,text:i},format:"html"}))}return Zr(i)}),a.valueLabels.template.html=re.htmlEmptyContent,AH(a)}function fH(a){let{legendElements:{legend:t},seriesConfig:e,webChartLegend:i,pieChartLegendValueLabelFormatter:r}=a,{visible:s,body:n,displayNumericValue:o,displayPercentage:l,displayCategory:h}=i??{};if(ze(e)===V.PieSeries){let{numericValueFormat:u,percentValueFormat:c,valuePrefix:d,valueSuffix:A,percentagePrefix:p,percentageSuffix:f}=e[0],m=h??re.pieChart.displayCategoryOnLegend,g=o??re.pieChart.displayNumericValueOnLegend,y=l??re.pieChart.displayPercentageOnLegend,x=r;if(r===void 0){let F=Tw({iLocale:t.language.locale,pieChart:t.baseSprite,valueIntlOptions:u?.intlOptions,percentageIntlOptions:c?.intlOptions,displayNumericValue:g,displayPercentage:y,valuePrefix:d,valueSuffix:A,percentagePrefix:p,percentageSuffix:f});x=(T,L)=>F("",T,L)}TN(t.uid,{pieChartLegendValueLabelsFormatter:x});let w=B1(t),S={type:V.Text,visible:s,content:{...n,type:Rt.TS,text:".",verticalAlignment:"middle",horizontalAlignment:w?"right":"center"}};xn({label:t.valueLabels.template,labelConfig:S,defaults:re.legendProperties.valueLabels}),t.labels.template.disabled=m===!1,t.valueLabels.template.disabled=g===!1&&y===!1}}function mH(a){let{dataContext:t}=a.target.dataItem??{};if(t instanceof Fa){let{component:e}=t;e instanceof ws&&e.showTooltip()}}function gH(a){let t=()=>{let e=a.children.values.find(i=>i.className==="Container");if(e?.children.length===3){let i=e.children.values.findIndex(r=>r.className==="Container");if(i!==-1){let r=i!==0?0:2,s=e.children.getIndex(r)?.clonedFrom;s!==void 0&&gs(s.uid,"isLegendValueLabel")!==!0&&a.children.each(n=>{n.className==="Container"&&n.children.swap(1,r)})}}};a.events.on(Ie.Validated,t),t()}function qL(a,t){let{legendLabelReducedOpacity:e}=re.legendProperties;a!==void 0&&(a.fillOpacity=t===!1?e:1)}function If(a){let{labels:t,seriesId:e,sliceCategory:i}=a;t.each(r=>{i!==void 0?i===r.dataItem.category&&qL(r,r.dataItem.slice.visible??!0):e===r.dataItem?.component?.id&&qL(r,r.dataItem?.component?.visible??!0)})}function Pw(a){a instanceof ws?(a.slices.template.events.on(Ie.Shown,t=>{let e=t.target.dataItem.category;If({labels:a.chart?.legend?.labels,sliceCategory:e}),If({labels:a.chart?.legend?.valueLabels,sliceCategory:e})}),a.slices.template.events.on(Ie.Hidden,t=>{let e=t.target.dataItem.category;If({labels:a.chart?.legend?.labels,sliceCategory:e}),If({labels:a.chart?.legend?.valueLabels,sliceCategory:e})})):a.events.on(Ie.VisibilityChanged,t=>{let e=t.target.id;If({labels:a.chart?.legend?.labels,seriesId:e})})}function S1(a){let{title:t,visible:e}=a;return t!==void 0&&e!==!1&&t?.visible!==!1}function yH(a,t){let{legendProperties:e}=re;if(a.position===st.Bottom)a.marginTop=e.marginTop??0,a.marginBottom=0,a.dy=0;else if(a.position===st.Top)a.marginBottom=e.marginBottom??0,a.marginTop=0,a.dy=0;else if(a.marginTop=0,a.marginBottom=0,!(a.baseSprite instanceof pr)){let i=S1(t),r=t.title?.content?.font?.size??re.generalFontSize;a.dy=-(i?r:15)}}function vH(a){let t=a.baseSprite,e;if(t!==void 0){let i=ye(t?.uid,"config");e=t?.rtl&&(i?.legend?.position===st.Top||i?.legend?.position===st.Bottom)}return e??!1}function bH(a){let t=a.baseSprite,e="";if(t instanceof Vt){let i=ye(t.uid,"config"),r=us(i),s=r?B.Rotated:B.NonRotated,n=ks(i),o=B.SideBySide;n===$i.Stacked?o=B.Stacked:n===$i.Stacked100&&(o=B.Stacked100);let l=t.rtl?B.RTL:B.LTR,h;switch(i?.legend?.position){case st.Left:h=B.LegendLeft;break;case st.Top:h=B.LegendTop;break;case st.Bottom:h=B.LegendBottom;break;case st.Right:default:h=B.LegendRight;break}let u=r?t.yAxes.getIndex(0):t.xAxes.getIndex(0),c;u instanceof Ct?c=B.DateAxis:u instanceof Qe?c=B.ValueAxis:c=B.CategoryAxis;let d=i?.orderOptions?.data&&"orderBy"in i.orderOptions.data&&i.orderOptions.data.orderBy===zA.Descending?B.OrderByFieldsDESC:B.OrderByFieldsASC;e=`${s}-${l}-${o}-${h}-${c}-${d}`}return e}function xH(a){let t=bH(a);return _1.has(t)}function F1(a,t){let{legend:e,legendTitle:i}=a??{};switch(t){case V.PieSeries:e.reverseOrder=vH(e);break;case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:e.reverseOrder=xH(e);break}let r=e.reverseOrder===!0?e.children.length-1:0;e.children.moveValue(i,r)}function _H(a){if(a.visible){let t=ye(a.chart.uid,"config")?.series.find(e=>e.id===a.id);if(t!==void 0&&ze([t])===V.LineSeries){let{markerVisible:e}=t;e!==!1&&a.bulletsContainer.show()}}}function CH(a,t){let e=a.target.dataItem,i=a.target.isActive;if(e?.dataContext!==void 0){let{dataContext:r}=e,s={visible:i};if(r instanceof Fa)ye(t.uid,"isNonAggregatedChart")===!0?s.sliceData=r.dataContext:s.sliceId=r.category;else if(r instanceof Cr){let o=r.id,l=Hf(t,o);if(l!==void 0){let d=ye(t.uid,"config"),A=Lw(d?.showOutliers,i),p=zr(l);p!==void 0&&(p.disabled=!A),Ui(l,A)}let{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t,o);h!==void 0&&Ui(h,i),u!==void 0&&Ui(u,i),c!==void 0&&Ui(c,i),s.seriesId=r.id}else s.seriesId=r.id;let n=r instanceof Fa?r.component:r;(n instanceof Qr||n instanceof ws)&&n.events.once(Ie.Validated,()=>{n instanceof Qr&&(R1(n),n.events.dispatchImmediately(Ie.Validated,{type:Ie.Validated,target:n}));let o=n instanceof ws,l=ye(t.uid,"currentSelectionDataItems"),h=l!==void 0&&l.length>0,u=ye(t.uid,"actionMode")??re.actionMode,c;n instanceof Xi?c=n.columns:o?c=n.slices:n instanceof Ti&&(_H(n),c=zr(n)?.clones),c?.each(d=>{d.dataItem instanceof Go||(Yn({element:d,selected:d.isActive,useNativeState:o,backToDefaultState:!h}),o&&u===Ut.None&&(d.clickable=!1))})}),ax(s,t.htmlContainer)}}function wH(a){let{legendProperties:t,legendProperties:e}=re;a.adapter.add("paddingRight",()=>a.scrollbar.visible?e.legendPaddingRightWithScrollbarVisible:t.paddingRight),a.adapter.add("paddingLeft",()=>t.paddingLeft),a.adapter.add("paddingTop",()=>t.paddingTop),a.adapter.add("paddingBottom",()=>t.paddingBottom)}function BH(a){a.scrollable=!0}function SH(a){let t=ml(void 0,a);return t.adapter.add("paddingTop",e=>{let i=e,r=t.bbox.height;return r>0&&(i=-r),i}),t.adapter.add("x",e=>{let i=e,{marginLeft:r,marginRight:s}=re.legendProperties.legendTitle;switch(ye(a.baseSprite.uid,"config")?.legend?.title?.content?.horizontalAlignment){case"left":i=t.measuredWidth+(r??0);break;case"right":i=a.measuredWidth-t.measuredWidth-(s??0);break;default:i=a.measuredWidth/2;break}return i}),t.adapter.add("disabled",e=>(e===!1&&t.validate(),e)),t}function FH(a){let{legendConfig:t,legendTitle:e}=a,{title:i,position:r}=t,{legendTitle:s}=re.legendProperties,n=S1(t);if(i!==void 0){let o={...i,visible:n};xn({label:e,labelConfig:o,defaults:s}),e.marginLeft=s.marginLeft??0}r===st.Top||r===st.Bottom?(e.maxWidth=Number.NaN,e.isMeasured=!1):(e.maxWidth=s.maxWidth??Number.NaN,e.marginTop=n?e.bbox?.height??i?.content?.font?.size??re.generalFontSize:0,e.isMeasured=!0)}function TH(a){let t=re.legendProperties;a.labels.template=ml(t.legendLabels),a.valueLabels.template=ml(t.legendLabels),a.markers.template.width=t.legendMarkersSize,a.markers.template.height=t.legendMarkersSize,a.labels.template.adapter.add("wrap",()=>!0),a.labels.template.adapter.add("maxWidth",e=>{let i=e,r;if(a.baseSprite instanceof pr&&(r=ye(a.baseSprite.uid,"config")?.legend?.labelMaxWidth),a.position===st.Right||a.position===st.Left)i=r??re.legendProperties.legendLabels.maxWidth;else if(r!==void 0)i=r;else{let s=0;a.valueLabels.template.disabled||a.valueLabels.each(n=>{s=Math.max(s,n.measuredWidth)}),i=a.measuredWidth-s-45}return i}),a.labels.template.adapter.add("textOutput",(e,i)=>{let r=i.dataItem?.label?.currentText,s,n=ye(a.baseSprite.uid,"config");if(n!==void 0){let{series:o}=n;if(ze(o)===V.PieSeries){let l=It(o)===ke.PieFromFields?ao:o[0].x,h=i.dataItem?.dataContext?.[l];typeof h=="string"?s=h:h&&typeof h!="object"&&(s=h.toString())}else i.dataItem?.component instanceof go&&(s=i.dataItem.component.name)}return(s!==void 0&&!zi(s)?eg(s):s)??r}),a.valueLabels.template.adapter.add("maxWidth",e=>{let i=e,r;return a.baseSprite instanceof pr&&(r=ye(a.baseSprite.uid,"config")?.legend?.valueLabelMaxWidth),a.position===st.Right||a.position===st.Left?i=r??re.legendProperties.valueLabels.maxWidth:i=r??Number.NaN,i})}function PH(a,t){a.itemContainers.template.events.on(Ie.Hit,e=>CH(e,t)),t instanceof pr&&a.itemContainers.template.events.on(Ie.Over,e=>mH(e))}function DH(a){a.itemContainers.template.reverseOrder=a.rtl}function mv(a,t){a.adapter.keys().includes(t)||a.adapter.add(t,e=>{let i=e,r=a.dataItem?.dataContext;if(r!==void 0){let s=r instanceof Fa?r.component?.chart:r.chart;if(s!==void 0){let n=ye(s.uid,"config"),{rectangleMarkerRadius:o,roundedMarkerRadius:l}=re.legendProperties;i=n?.legend?.roundMarkers===!0?l:o}}return i})}function JL(a){a.markers.each(t=>{let e=t.children.getIndex(0);e instanceof Nr&&(mv(e,"cornerRadiusBottomLeft"),mv(e,"cornerRadiusBottomRight"),mv(e,"cornerRadiusTopLeft"),mv(e,"cornerRadiusTopRight"),e.validate())})}function LH(a){a.markers.template.events.on(Ie.Inited,()=>{JL(a)}),a.events.once(Ie.Validated,()=>{JL(a)})}function IH(a){let{legendElements:{legend:t},seriesConfig:e,webChartLegend:i}=a,{visible:r,body:s}=i??{},n=ze(e),o={type:V.Text,visible:r,content:{...s,type:Rt.TS,text:" "}};xn({label:t.labels.template,labelConfig:o,defaults:re.legendProperties.legendLabels}),t.labels.template.valign="middle",t.valueLabels.template.valign="middle",n===V.PieSeries&&fH(a),t.valueLabels.template.width=Number.NaN}function kH(a,t){t.chartContainer.events.on(Ie.SizeChanged,Is(()=>{let e=ye(t.uid,"config")?.legend?.maxHeight??Number.NaN;Number.isFinite(e)||(a.position===st.Top||a.position===st.Bottom?e=re.legendProperties.maxHeight:e=t instanceof pr?t.chartContainer.measuredHeight:t.seriesContainer.measuredHeight),a.maxHeight=e,a.invalidateLayout()}),re.debounceTime)}function $H(a,t){let{position:e}=t;e===st.Top||e===st.Bottom?a.contentAlign="center":a.contentAlign="none"}function OH(a,t){let{legend:e}=a;e.events.on(Ie.DataItemsValidated,()=>{e.dataItems.length>0&&F1(a,t)})}function EH(a,t){t===st.Right||t===st.Left?a.width=Number.NaN:a.maxWidth=Number.MAX_SAFE_INTEGER}function T1(a,t){let e=si.pointer;t===!0?(a.itemContainers.template.clickable=!1,a.itemContainers.template.focusable=!1,e=si.default):(a.itemContainers.template.clickable=!0,a.itemContainers.template.focusable=!0),a.itemContainers.values.forEach(i=>{i.cursorOverStyle=e})}function MH(a,t){let e=new oc;a.legend=e,BH(e);let i=SH(e);return TH(e),pH(e),PH(e,a),DH(e),wH(e),OH({legend:e,legendTitle:i},ze(t)),kH(e,a),cH(a,i),gH(e),a.legend.events.on(Ie.ChildAdded,()=>{let r=ye(a.uid,"options");T1(e,r?.togglingLegendItemsDisabled)}),{legend:e,legendTitle:i}}function Dw(a){let{legendElements:t,seriesConfig:e,webChartLegend:i}=a,{legend:r,legendTitle:s}=t,n=r.baseSprite,o=(n===void 0?!0:ex(e))&&i?.visible!==!1;if(n&&i&&o){let{position:l=re.legendProperties.position}=i;Ui(r,!0),FH({legendConfig:i,legendTitle:s}),LH(r),IH(a),$H(r,i),F1(t,ze(e)),r.position=l,EH(r,l),yH(r,i),T1(r,ye(n.uid,"options")?.togglingLegendItemsDisabled)}else r.position=st.Right,r.width=0,Ui(r,!1)}function RH(a){let{chart:t,chartConfig:e,seriesIndex:i,axisList:r=[],queryObject:s,selectionTheme:n,ignoreSmoothRenderingLimit:o,errorStrings:l}=a,h=e.series.length,{rotated:u}=e,c=e.series[i],{y:d,name:A,id:p,assignToSecondValueAxis:f}=c,m=new Ti;m.id=p,_A(m,A);let g,y;u!==!0?(g=r[0],y=f===!0&&r[2]?r[2]:r[1]):(g=f===!0&&r[2]?r[2]:r[0],y=r[1]),g!==void 0&&(m.xAxis=g),y!==void 0&&(m.yAxis=y);let x=bn({chart:t}),w=It(e.series),S=w===ke.BarAndLineSplitByNoAggregation?`${d.toString()}_${vh({where:c.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:[d].flat()[0];x?m.dataFields.valueX=S:m.dataFields.valueY=S;let F=x?r[1]:r[0];if(F!==void 0){let O=c1(F,x);m.dataFields[O]=re.xAxisField}m.dataFields.customValue=c?.query?.where;let T=$s(s);P1({series:m,seriesConfig:c,seriesIndex:i,chartSubType:w,colorMatch:e.colorMatch===!0,rendererType:tg(e.chartRenderer,T?.renderer)}),D1(c,m);let L=Cw({chart:t,lineSeries:m,applyPropertiesToClones:!1});return v1(L,m),aH(m),Xc({element:L,customSelectionTheme:n}),Qf({chart:t,element:L,queryObject:s,errorStrings:l}),IQ({chart:t,numberOfChartSeries:h,series:m,seriesType:V.LineSeries,marker:L,ignoreSmoothRenderingLimit:o}),Pw(m),Wc(m),m}function UH(a){let{series:t,seriesIndex:e,chartSubType:i,seriesConfig:r,colorMatch:s,lineColor:n,rendererType:o}=a,l=zr(t),h=!1,u;if(l!==void 0){r.markerVisible!==!1&&r.visible!==!1?t.bulletsContainer.show():t.bulletsContainer.hide();let{markerSymbol:c}=r;c===void 0&&(c=Gb(),c.color=n),s?c.color=n:c.color??=n;let d=new Set,A;_v({element:l,markerSymbol:c}),l.clones.each(p=>{if(p.dataItem instanceof Go)_v({element:p,markerSymbol:c}),p.states.getKey(ia.CustomActive)?.reset(),p.states.getKey(ia.CustomInactive)?.reset();else{let f=p.dataItem?.dataContext,m=nn({seriesConfig:r,dataItem:f,chartSubType:i,colorMatch:s,rendererType:o}),g=du({seriesConfig:r,seriesIndex:e,seriesSymbol:c,element:p,colorMatch:s,rendererSymbol:m});u=g.symbolWithColorInfo,A=g.stylingInfo,gA({element:p,stylingInfo:A}),d.add(JSON.stringify(A))}}),h=d.size>1,h||gA({element:l,stylingInfo:A})}return h?void 0:u}function VH(a){let{series:t,seriesConfig:e,chartSubType:i,colorMatch:r,rendererType:s}=a,n;return t.dataItems?.values.every(o=>{let l=!0,h=o.dataContext;return n=nn({seriesConfig:e,dataItem:h,chartSubType:i,colorMatch:r,rendererType:s}),n!==void 0&&(l=!1),l}),n}function P1(a){let{series:t,seriesIndex:e,seriesConfig:i,chartSubType:r,colorMatch:s,rendererType:n}=a,o=t,l=VH({series:o,seriesConfig:i,chartSubType:r,colorMatch:s,rendererType:n}),h=du({seriesConfig:i,seriesIndex:e,seriesSymbol:i.lineSymbol??Yb(e),element:o,colorMatch:s,rendererSymbol:l});return Ui(o,i.visible),h.symbolWithColorInfo}function D1(a,t){a.showArea===!0?a.areaColor!==void 0?(t.fill=vn(a.areaColor),t.fillOpacity=t.fill.alpha===0?0:1):(t.fill=Ne(t.stroke.hex,1),t.fillOpacity=re.lineSeries.areaOpacity):t.fillOpacity=0}function L1(a){let{series:t,seriesIndexMapper:e,seriesSymbolMapForEvent:i,seriesIndex:r,colorMatch:s,rendererType:n}=a,o=a.seriesConfig,l=ye(t.chart.uid,"config"),h=l?.series.length??0,u=It(l?.series);Ui(t,o.visible);let c=P1({series:t,seriesConfig:o,seriesIndex:r,chartSubType:u,colorMatch:s,rendererType:n}),d=UH({series:t,seriesIndex:r,seriesConfig:o,chartSubType:u,colorMatch:s,lineColor:c.color,rendererType:n});i.set(e.get(o.id)??r,{lineSymbol:c,markerSymbol:d}),D1(o,t),i.size===h&&(an({data:i,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)}),t.chart.feedLegend())}function NH(a){let{seriesConfig:t,lineSeries:e,isRotated:i}=a;t.lineSmoothed===!0?e.smoothing=i?Qb.MonotoneY:Qb.MonotoneX:e.smoothing=re.lineSeries.lineSmoothedKind}function QH(a,t){let{connectLines:e,temporalBinning:i}=t,r=i?.nullPolicy;a.connect=e!==!1&&r!==Hb.Null}function HH(a){let{seriesConfig:t,series:e,axes:i,rotationChanged:r,seriesIndex:s,fieldList:n,stackedType:o,queryObject:l,options:h,utilsStrings:u}=a,{visible:c,name:d}=t,A=i[1].valueFormat,p=ye(e.chart.uid,"config"),f=bn({config:p}),m=It(p?.series);e.id=t.id,Ui(e,c);let g=d,y=e.dataFields?.customValue??"";(m===ke.BarAndLineSplitBy||m===ke.BarAndLineSplitByNoAggregation)&&(g=rg({queryObject:l,fieldName:Tn(y),fieldValue:g})??g),_A(e,g),ww({series:e,seriesConfig:t,rotationChanged:r,stackedType:o,isRotated:f}),QH(e,t),$v({styleCallback:()=>L1(a),series:e,seriesConfig:t}),NH({seriesConfig:t,lineSeries:e,isRotated:f}),x1({series:e,seriesConfig:t,fieldList:n,queryObject:l,seriesIndex:s,setTimeBinningInfoWhenNotProvided:h?.setTimeBinningInfoWhenNotProvided,utilsStrings:u,tooltipFormatter:h?.tooltipFormatter}),nH({series:e,seriesType:V.LineSeries,stackedType:o,dataLabelsConfig:t.dataLabels,yAxisValueFormat:A,customDataLabelFormatter:h?.dataLabelFormatter})}function Mv(a,t){let e=a.series.values.find(s=>s.id===`${t}_${ji.Top}`),i=a.series.values.find(s=>s.id===`${t}_${ji.Median}`),r=a.series.values.find(s=>s.id===`${t}_${ji.Bottom}`);return{topStepLineSeries:e,medianStepLineSeries:i,bottomStepLineSeries:r}}function Hf(a,t){return a.series.values.find(e=>e.id===`${t}_${ji.Outliers}`)}function Lw(a,t){return(a??re.boxPlot.boxPlotOutliersVisibility)&&t!==!1}function jH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=oa(i),h=i.series[r],[u,c]=e,d=new Cr;return d.hoverable=!0,l||(Xc({element:d.columns.template,customSelectionTheme:s}),Qf({chart:t,element:d.columns.template,queryObject:n,errorStrings:o})),d.id=h.id,u!==void 0&&(d.xAxis=u),c!==void 0&&(d.yAxis=c),d.simplifiedProcessing=!0,d.columns.template.applyOnClones=!0,d.riseFromOpenState.reset(),d.riseFromPreviousState.reset(),d.dropFromOpenState.reset(),d.dropFromPreviousState.reset(),_A(d,h.name),Wc(d),d}function zC(a){let{axisList:t=[],chartConfig:e,seriesIndex:i,type:r,selectionTheme:s}=a,n=e.series[i],[o,l]=t,h=new Aa;return h.hoverable=!0,h.id=`${n.id}_${r}`,o!==void 0&&(h.xAxis=o),l!==void 0&&(h.yAxis=l),h.noRisers=!0,h.simplifiedProcessing=!0,Xc({element:h.segments.template,customSelectionTheme:s}),h.hiddenInLegend=!0,Wc(h),h}function WH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=i.series[r],h=oa(i),[u,c]=e,d=new Ti;Zn(d.uid,{isBoxPlotOutliersSeries:!0}),d.id=`${l.id}_${ji.Outliers}`,u!==void 0&&(d.xAxis=u),c!==void 0&&(d.yAxis=c),d.simplifiedProcessing=!0,d.hiddenInLegend=!0,d.strokeOpacity=0;let A=Cw({chart:t,lineSeries:d});return h||(Xc({element:A,customSelectionTheme:s}),Qf({chart:t,element:A,queryObject:n,errorStrings:o})),Wc(d),d}function CA(a){let{chartConfig:t,seriesConfig:e,meanLineSeries:i,candleStickSeries:r,topStepLineSeries:s,medianStepLineSeries:n,bottomStepLineSeries:o,outliersSeries:l,creation:h=!1,rotationChanged:u,outliersVisibilityChanged:c,standardizeValuesVisibilityChanged:d}=a,{x:A,y:p}=e,f=h||u===!0||d===!0,m=f||c===!0,g=f,y=f;if(t!==void 0){let{showOutliers:x,standardizeValues:w,showMean:S}=t,F=bn({config:t});if(i instanceof Ti&&y){let P=It(t.series),Q=e?.query?.where,G=Zi({y:P===ke.BoxPlotMultiFieldsAndCategory?p:void 0,chartSubType:P,splitBy:Q,showOutliers:x,standardizeValues:pd(P)?w:!1,key:Yt.Average});F?(i.dataFields.valueX=G,i.dataFields.categoryY=A):(i.dataFields.valueY=G,i.dataFields.categoryX=A),i.dataFields.customValue=Q}let T=og(t),L=It(T.series),O=S===!0?void 0:e?.query?.where,I={y:L===ke.BoxPlotMultiFieldsAndCategory?p:void 0,chartSubType:L,splitBy:O,showOutliers:x,standardizeValues:pd(L)?w:!1};if(m){if(r instanceof Cr){let P=Zi({...I,key:Yt.Min}),Q=Zi({...I,key:Yt.FirstQuartile}),G=Zi({...I,key:Yt.Max}),Y=Zi({...I,key:Yt.ThirdQuartile});F?(r.dataFields.lowValueX=P,r.dataFields.openValueX=Q,r.dataFields.highValueX=G,r.dataFields.valueX=Y,r.dataFields.categoryY=A):(r.dataFields.lowValueY=P,r.dataFields.openValueY=Q,r.dataFields.highValueY=G,r.dataFields.valueY=Y,r.dataFields.categoryX=A),r.dataFields.customValue=O}if(s instanceof Aa&&n instanceof Aa&&o instanceof Aa){let P=Zi({key:Yt.Max,...I}),Q=Zi({key:Yt.Median,...I}),G=Zi({key:Yt.Min,...I});F?(s.dataFields.valueX=P,n.dataFields.valueX=Q,o.dataFields.valueX=G,s.dataFields.categoryY=A,n.dataFields.categoryY=A,o.dataFields.categoryY=A):(s.dataFields.valueY=P,n.dataFields.valueY=Q,o.dataFields.valueY=G,s.dataFields.categoryX=A,n.dataFields.categoryX=A,o.dataFields.categoryX=A),s.dataFields.customValue=O,o.dataFields.customValue=O,n.dataFields.customValue=O}}if(l instanceof Ti&&g){let P=Zi({...I,key:Yt.Outlier});F?(l.dataFields.valueX=P,l.dataFields.categoryY=A):(l.dataFields.valueY=P,l.dataFields.categoryX=A),l.dataFields.customValue=O,l.invalidateRawData()}let U=i?.chart??r?.chart;U!==void 0&&(m||y)&&U.invalidateRawData()}}function XH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=i.series[r],[h,u]=e,c=new Ti;Zn(c.uid,{isBoxPlotMeanLineSeries:!0}),c.id=l.id,h!==void 0&&(c.xAxis=h),u!==void 0&&(c.yAxis=u),c.simplifiedProcessing=!0;let d=Cw({chart:t,lineSeries:c});return Xc({element:d,customSelectionTheme:s}),Qf({chart:t,element:d,queryObject:n,errorStrings:o}),Wc(c),tH(c),CA({chartConfig:i,seriesConfig:l,meanLineSeries:c,creation:!0}),c}function zH(a){let{chartConfig:t,seriesIndex:e}=a,i=t.series[e],r=ze([i]),s=[];if(r===V.BoxPlotSeries){let n=jH(a),o=zC({...a,type:ji.Top}),l=zC({...a,type:ji.Median}),h=zC({...a,type:ji.Bottom}),u=WH(a);JQ(n),eH(u,n),CA({chartConfig:t,seriesConfig:i,candleStickSeries:n,topStepLineSeries:o,medianStepLineSeries:l,bottomStepLineSeries:h,outliersSeries:u,creation:!0}),s.push(n,o,l,h,u)}else if(r===V.LineSeries){let n=XH(a);s.push(n)}return s}function GH(a){let{candleStickSeries:t,seriesConfig:e,stylingInfo:i,chartSubType:r,colorMatch:s,rendererType:n}=a;if(i!==void 0){let o={...i},l=s1({data:t.chart.data,colorMatch:s,chartSubType:r,rendererType:n});i?.outline!==void 0&&l&&(o.outline.stroke=Nc(re.boxPlot.boxPlotWhiskersColor));let{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t.chart,t.id);if(h!==void 0&&u!==void 0&&c!==void 0&&o.outline!==void 0){o.outline.strokeWidth=re.boxPlot.boxPlotLineWidth,fA(h,o.outline),fA(u,o.outline),fA(c,o.outline);let d=e.visible!==!1;Ui(h,d),Ui(u,d),Ui(c,d)}}}function YH(a){let{candleStickSeries:t,seriesConfig:e,showOutliers:i,seriesSymbol:r}=a;if(r!==void 0){let s=Hf(t.chart,t.id);if(s!==void 0){let n=zr(s);if(n!==void 0){let o=Lw(i,e.visible),l={type:Rt.SMS,style:YA.Circle,color:r.color,size:re.boxPlot.boxPlotOutliersSize};n.clones.each(h=>{let u=t.dataItems.values.find(c=>(c.categories.categoryX??c.categories.categoryY)===(h.dataItem?.categories.categoryX??h.dataItem?.categories.categoryY))?.column?.fill;_v({element:h,markerSymbol:{...l,color:RI(u)??l.color},visible:o})})}}}}function KH(a){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:s,colorMatch:n,showMean:o,rendererType:l}=a,h,u,c,d=new Set,A=!1,p=e.fillSymbol??Wm(i);if(t.columns.length===0?(c=du({seriesConfig:e,seriesIndex:i,seriesSymbol:p,element:new Ee,colorMatch:n,isChartFillSymbol:!0}),h=c.symbolWithColorInfo,u=c.stylingInfo):t.columns.each(f=>{c=du({seriesConfig:e,seriesIndex:i,seriesSymbol:p,element:f,colorMatch:n,isChartFillSymbol:!0,rendererSymbol:o?void 0:nn({dataItem:f.dataItem?.dataContext,seriesConfig:e,chartSubType:s,colorMatch:n,rendererType:l})}),h=c.symbolWithColorInfo,u=c.stylingInfo,d.add(JSON.stringify(h))}),A=d.size>1,r>1){let f=t.legendDataItem?.marker.children.getIndex(0);f!==void 0?gA({element:f,stylingInfo:u}):t.chart.legend.events.once(Ie.Validated,()=>{gA({element:t.legendDataItem?.marker.children.getIndex(0),stylingInfo:u}),t.chart.legend.invalidate()})}return{multipleSymbolsForOneSeries:A,seriesSymbol:h,stylingInfo:u}}function ZH(a){let{series:t,showOutliers:e,colorMatch:i,seriesIndex:r,seriesIndexMapper:s,seriesSymbolMapForEvent:n,seriesConfig:o,rendererType:l,queryObject:h}=a,u=ye(t.chart.uid,"config"),c=oa(u),d=u?.series.length??0,A=It(u?.series),p=!1,f;if(t instanceof Cr&&o.type===V.BoxPlotSeries){let m=KH({series:t,seriesConfig:o,seriesIndex:r,numberOfSeries:d,chartSubType:A,colorMatch:i,showMean:c,rendererType:l}),{stylingInfo:g}=m;({multipleSymbolsForOneSeries:p,seriesSymbol:f}=m),n.set(s.get(o.id)??r,p?void 0:{fillSymbol:f??o.fillSymbol}),GH({candleStickSeries:t,seriesConfig:o,colorMatch:i,stylingInfo:g,chartSubType:A,rendererType:l}),YH({candleStickSeries:t,seriesConfig:o,showOutliers:e,seriesSymbol:f})}else t instanceof Ti&&o.type===V.LineSeries&&L1({series:t,seriesConfig:o,seriesIndexMapper:s,seriesSymbolMapForEvent:n,seriesIndex:r,colorMatch:i,rendererType:l});n.size===d&&an({data:n,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)})}function qH(a){let{numberOfSeries:t,chart:e,showMean:i}=a,r=bn({chart:e}),s=r?e.yAxes.getIndex(0)?.renderer:e.xAxes.getIndex(0)?.renderer;if(s!==void 0){let{cellStartLocation:n,cellEndLocation:o}=s,l=n/(i===!0?1:t),h=e.series.values.filter(u=>u instanceof Cr);h.forEach((u,c)=>{let d=n+c/h.length*(o-n)+l,A=n+(c+1)/h.length*(o-n)-l,{topStepLineSeries:p,medianStepLineSeries:f,bottomStepLineSeries:m}=Mv(e,u.id);p!==void 0&&(p.startLocation=d,p.endLocation=A),f!==void 0&&(f.startLocation=d,f.endLocation=A),m!==void 0&&(m.startLocation=d,m.endLocation=A);let g=Hf(e,u.id);if(g!==void 0){let y=(d+A)/2;r?g.dataItems.template.locations.categoryY=y:g.dataItems.template.locations.categoryX=y}})}}function JH(a){let{outliersSeries:t,chartData:e,dataWasUpdated:i,rotationChanged:r,seriesReordered:s,seriesWereReinitialized:n}=a;(r||i||s||n)&&(t.data=e?.outliers??[])}function e2(a){let{meanLineSeries:t,chartData:e,rotationChanged:i,sortChanged:r,dataWasUpdated:s,seriesReordered:n,seriesWereReinitialized:o}=a;(i||s||r||n||o)&&(t.data=e?.meanLines??[],t.invalidateData())}function t2(a){let{chart:t,chartConfig:e,seriesConfig:i,chartData:r,candleStickSeriesId:s,showOutliers:n,dataWasUpdated:o,rotationChanged:l,seriesReordered:h,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c,seriesWereReinitialized:d}=a,A=Hf(t,s);if(A!==void 0){let p=zr(A);if(p!==void 0){let f=Lw(n,i.visible);p.disabled=!f,JH({outliersSeries:A,chartData:r,dataWasUpdated:o,rotationChanged:l,seriesReordered:h,seriesWereReinitialized:d})}CA({chartConfig:e,seriesConfig:i,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c,rotationChanged:l,outliersSeries:A})}}function i2(a){let{meanLineSeries:t,seriesConfig:e,chartData:i,dataWasUpdated:r,seriesReordered:s,sortChanged:n,rotationChanged:o,chartConfig:l,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u}=a;_A(t,e?.name),CA({chartConfig:l,seriesConfig:e,meanLineSeries:t,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u,rotationChanged:o}),e2({meanLineSeries:t,chartData:i,dataWasUpdated:r,seriesReordered:s,sortChanged:n,rotationChanged:o})}function r2(a){let{series:t,chartConfig:e,seriesConfig:i,rotationChanged:r,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n}=a;_A(t,i?.name),t.hiddenInLegend=oa(e),CA({chartConfig:e,seriesConfig:i,candleStickSeries:t,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:r})}function s2(a){let{chart:t,chartConfig:e,seriesConfig:i,candleStickSeriesId:r,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:o}=a,l=i.visible!==!1,{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t,r);h!==void 0&&Ui(h,l),u!==void 0&&Ui(u,l),c!==void 0&&Ui(c,l),CA({chartConfig:e,seriesConfig:i,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:o,topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c})}function a2(a){let{chart:t,series:e,chartData:i,utilsStrings:r,dataWasUpdated:s,sortChanged:n,seriesReordered:o,fieldList:l,outliersVisibilityChanged:h,showMean:u,seriesConfig:c,showOutliers:d,standardizeValuesVisibilityChanged:A,rotationChanged:p,seriesWereReinitialized:f,options:m,queryObject:g}=a,{tooltipFormatter:y}=m??{};qH({numberOfSeries:a.numberOfSeries,chart:t,showMean:u});let x=ye(t.uid,"config");if(x!==void 0){if(e instanceof Cr&&c.type===V.BoxPlotSeries){let{id:w}=e;r2({series:e,chartConfig:x,seriesConfig:c,rotationChanged:p,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A}),s2({chart:t,chartConfig:x,seriesConfig:c,candleStickSeriesId:w,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A,rotationChanged:p}),t2({chart:t,chartConfig:x,seriesConfig:c,chartData:i,showOutliers:d,candleStickSeriesId:w,dataWasUpdated:s,rotationChanged:p,seriesReordered:o,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A,seriesWereReinitialized:f})}else e instanceof Ti&&c.type===V.LineSeries&&i2({chartConfig:x,chartData:i,meanLineSeries:e,seriesConfig:c,dataWasUpdated:s,seriesReordered:o,sortChanged:n,rotationChanged:p,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A});$v({styleCallback:()=>ZH(a),series:e,seriesConfig:c}),sH({series:e,seriesConfig:c,fieldList:l,tooltipFormatter:y,utilsStrings:r,queryObject:g})}}function n2(a){let t=a.series.getIndex(0);if(t!==void 0){let e=!1;t.slices.each(i=>{i.isActive&&(e=!0),Yn({element:i,selected:!1,backToDefaultState:!0})}),e&&a.feedLegend()}}function o2(a,t=!0){let e;a.series.each((i,r)=>{if(!t||i.visible){e=Dv(i,r);let s=[];if(e===V.BarSeries)s=i.columns?.values;else if(e===V.LineSeries)s=zr(i)?.clones?.values;else if(e===V.BoxPlotSeries){if(i instanceof Cr)s.push(...i.columns.values);else if(i instanceof Aa)s.push(...i.segments.values);else if(i instanceof Ti){let n=zr(i)?.clones?.values;n!==void 0&&s.push(...n)}}s!==void 0&&s.forEach(n=>{Yn({element:n,selected:!1,backToDefaultState:!0})})}})}function wA(a){let{chart:t,selectionSource:e,clearOnlyVisibleSeries:i,disposeStyleAndSelection:r}=a,s=ye(t.uid,"currentSelectionDataItems");r!==!1&&d1(t,"updateSelectionCallbackDisposer"),ai(t.uid,{currentSelectionDataItems:void 0,currentSelectionOIDs:void 0,currentSelectionIndexes:void 0,computedSelectionDataItems:void 0,computedSelectionIndexes:void 0,pendingSelectionQueries:!1}),qn(t)&&(t instanceof Vt?o2(t,i??!0):t instanceof pr&&n2(t)),s&&Vu({data:{selectionSource:e??Tr.ClearSelection},htmlContainer:t.htmlContainer})}function l2(a){gx(),nx(a.htmlContainer),wA({chart:a})}function h2(a){let{chart:t,chartType:e,showMean:i}=a;return t.series.values.filter(r=>e!==V.BoxPlotSeries||!i&&r instanceof Cr||i&&sa(r.uid,"isBoxPlotMeanLineSeries")).every(r=>sa(r.uid,"isSelectionApplied")===!0)}function u2(a){a.series.each(t=>Zn(t.uid,{isSelectionApplied:void 0}))}function I1(a,t){let e=ye(a.uid,"actionMode");if((e===Ut.MonoSelection||e===Ut.None)&&t.length>1)wA({chart:a});else{let i=a instanceof pr;t.forEach(r=>{Yn({element:r,useNativeState:i,selected:!0})})}}function c2(a){let{chart:t,chartConfig:e,series:i,options:r,elementsToApplySelectionTo:s,selectionDataItems:n,layerOidField:o,xAxisField:l,yAxisField:h,queryObject:u}=a,c=ze(e.series),d=It(e.series),A=Eo(e),p=[],f=[],m=[],g=Mo(e.series),y=i instanceof Qr?i.dataFields?.customValue??"":"";return s.forEach(x=>{if(!(x instanceof Go)){let w=x.dataItem?.dataContext;if(w!==void 0&&(c===V.BoxPlotSeries&&w[re.boxPlot.boxPlotOutlierId]!==!0||d===ke.BarAndLineMultiFields)&&(w=th({dataContext:w,yAxisField:h,yList:g,xAxisField:l,splitBy:y,chartType:c,chartSubType:d,showOutliers:A,isFeatureCollectionLayer:Oo(u)})),Lv({elementDataContext:w,options:r,selectionDataItems:n,layerOidField:o,xAxisField:l,yAxisField:h,chartType:c,splitBy:y,chartSubType:d,showOutliers:A}))if(p.push(x),x.dataItem!==void 0&&f.push(x.dataItem.index),x?.dataItem instanceof Wa&&w!==void 0)m.push(w);else{let S=new Set;c===V.PieSeries&&ih(w)?(Nf({groupOfSlicesDataContext:w})??[]).forEach(F=>{n.forEach(T=>{_w({layerOidField:o,sliceDataContext:F,selectionDataContext:T,xAxisField:l})&&S.add(F)})}):S.add(w),Array.from(S)?.forEach(F=>{let T=th({dataContext:F,yAxisField:h,yList:g,xAxisField:l,splitBy:y,chartType:c,chartSubType:d,showOutliers:A,isFeatureCollectionLayer:Oo(u)});T!==void 0&&m.push(T)})}else Yn({element:x,useNativeState:t instanceof pr,selected:!1})}}),I1(t,p),{selectedIndexes:f,newSelectionDataItems:m}}function d2(a){let{chart:t,selectionIndexes:e,queryObject:i}=a,r=[],s=[],n=ye(t.uid,"config"),o=Eo(n),l=Mo(n?.series??[]),h=It(n?.series);return t.series.each((u,c)=>{if(n&&u.visible){let d=n.series[0].x,A=xu(u),p=u instanceof Qr?u.dataFields?.customValue??"":"",f=Dv(u,c),m=e.get(c);if(m!==void 0){let g;if(u instanceof Xi?g=u.columns:u instanceof ws?g=u.slices:g=zr(u)?.clones,g!==void 0){let{indexesToSelect:y}=m;g.each((x,w)=>{if(x&&(y===void 0||y.includes(w))){let S;f===V.BoxPlotSeries&&x.dataItem instanceof Wa?S=x.dataItem.dataContext:x.dataItem instanceof Go||(S=th({dataContext:x.dataItem?.dataContext,yList:l,yAxisField:A,xAxisField:d,splitBy:p,chartType:f,chartSubType:h,showOutliers:o,isFeatureCollectionLayer:Oo(i)})),S!==void 0&&r.push(S),s.push(x)}else Yn({element:x,useNativeState:t instanceof pr,selected:!1})})}}}}),I1(t,s),r}function A2(a){let{series:t,chartType:e,showMean:i}=a,r;switch(e){case V.ComboLineAndBarSeries:if(t instanceof Xi)r=t.columns.values;else if(t instanceof Ti){let s=zr(t);s!==void 0&&(r=s.clones.values)}break;case V.BarSeries:t instanceof Xi&&(r=t.columns.values);break;case V.LineSeries:if(t instanceof Ti){let s=zr(t);s!==void 0&&(r=s.clones.values)}break;case V.PieSeries:r=t.slices.values;break;case V.BoxPlotSeries:if(t.chart instanceof Vt){if(t instanceof Cr&&i!==!0){r=[...t.columns.values];let s=Hf(t.chart,t.id);if(s!==void 0&&s.visible){let n=zr(s);n!==void 0&&r.push(...n.clones.values)}}else if(i===!0&&t instanceof Ti&&sa(t.uid,"isBoxPlotMeanLineSeries")){let s=zr(t);s!==void 0&&(r=s.clones.values)}}break}return r}function p2(a){let{series:t,seriesIndex:e,queryObject:i,options:r,dataWasUpdated:s,sortChanged:n,groupOfSlicesWasUpdated:o,xAxisField:l,yAxisField:h,rotationChanged:u}=a,{filterBySelection:c,selectionData:d,returnSelectionIndexes:A,returnSelectionOIDs:p}=r??{},{selectionIndexes:f}=d??{},{chart:m}=t,g=ye(m.uid,"config"),y=cs(i),x=Eo(g),w=oa(g),S=ze(g?.series);if(c!==!0&&g!==void 0){let F=A2({series:t,chartType:S,showMean:w}),T=It(g?.series),L=$s(i),O=xh(L).idField,I=ye(m.uid,"currentSelectionDataItems"),U=!1,P=!1,Q,G=!1;if(F?.[0]!==void 0){if(r?.viewExtentUpdated!==!0){Q=r?.selectionData?.selectionItems??I;let Y=ye(m.uid,"currentSelectionIndexes");G=wx({itemsA:Q,itemsB:I,isPieFromFields:T===ke.PieFromFields,x:g.series[0].x});let ee=f?.keys.length!==Y?.keys.length||!rn(f,Y);U=n===!0||s===!0||o===!0||u===!0||Q!==void 0&&G;let te=!0;if(f!==void 0&&f.size>0){let{indexesToSelect:le}=f.get(e??0)??{};te=le!==void 0&&le[0]===void 0}P=s===!0||o===!0||u===!0||!te&&ee}if(U&&Q!==void 0&&Q.length>0){let{selectedIndexes:Y,newSelectionDataItems:ee}=c2({chart:m,chartConfig:g,options:r,series:t,elementsToApplySelectionTo:F,selectionDataItems:Q,layerOidField:O,xAxisField:l,yAxisField:h}),te=ye(m.uid,"computedSelectionDataItems")??[];if(te.push(...ee),g.series.length>1&&T!==ke.BarAndLineNoAggregation&&T!==ke.BarAndLineSplitByNoAggregation&&(te=ap({data:te,x:g.series[0].x,splitByField:Tn(g.series[0].query?.where)})),ai(m.uid,{computedSelectionDataItems:te}),A===!0){let le=Array.from(new Set(Y)),z=ye(m.uid,"computedSelectionIndexes");z===void 0&&(z=new Map),le.length===F.length?z.set(e??0,{}):z.set(e??0,{indexesToSelect:le}),ai(m.uid,{computedSelectionIndexes:z})}}else if(f!==void 0&&P)Q=d2({chart:m,selectionIndexes:f,queryObject:i});else{let Y=Q===void 0||Q.length===0,ee=t instanceof Qr?t.dataFields?.customValue??"":"",te=le=>{let z=le.dataItem?.dataContext;return z!==void 0&&S===V.BoxPlotSeries&&z[re.boxPlot.boxPlotOutlierId]!==!0&&(z=th({dataContext:z,yAxisField:h,yList:Mo(g.series),xAxisField:l,splitBy:ee,chartType:S,chartSubType:T,showOutliers:x,isFeatureCollectionLayer:Oo(i)})),Lv({elementDataContext:z,options:r,selectionDataItems:Q??I??[],layerOidField:O,xAxisField:l,yAxisField:h,chartType:S,splitBy:ee,chartSubType:T,showOutliers:x})};F.forEach(le=>{let z=le.isActive||te(le);Yn({element:le,selected:z,useNativeState:m instanceof pr,backToDefaultState:Y})})}}if(Zn(t.uid,{isSelectionApplied:!0}),h2({chart:m,chartType:S,showMean:w})&&(u2(m),G||P)){let Y=ye(m.uid,"computedSelectionDataItems")??Q;Y=Array.from(new Set(Y?.map(te=>JSON.stringify(te)))).map(te=>JSON.parse(te)),Q!==void 0&&ai(m.uid,{currentSelectionDataItems:Y}),d?.selectionOIDs!==void 0&&ai(m.uid,{currentSelectionOIDs:d.selectionOIDs});let ee;if(A===!0&&(ee=ye(m.uid,"computedSelectionIndexes")??f,ee!==void 0&&ai(m.uid,{currentSelectionIndexes:ee})),Y===void 0||Y.length===0)wA({chart:m,selectionSource:Tr.ProgrammaticSelection});else{let te={selectionItems:Y,selectionSource:Tr.ProgrammaticSelection};A===!0&&(te.selectionIndexes=ee),p!==!1&&(te.selectionOIDs=d?.selectionOIDs??ye(m.uid,"currentSelectionOIDs")),y&&(te.selectionPixelTarget=ig({chartConfig:g,layer:i,selectionDataItems:Y})),Vu({data:te,htmlContainer:m.htmlContainer})}ai(m.uid,{computedSelectionIndexes:void 0,computedSelectionDataItems:void 0})}}}function f2(a){let{chart:t,chartConfig:e}=a;for(let i=0;i<t.series.length;i+=1){let r=t.series.getIndex(i);if(r){let s=Rf(r,e);if(s){let n=ze([s]);if(n===V.BoxPlotSeries&&(r=t.series.values.find(o=>o.id===s.id)),r!==void 0){let o=s.x,l=n===V.BoxPlotSeries?s.y.toString():xu(r);EQ({callbackProps:{...a,series:r,seriesIndex:i,xAxisField:o,yAxisField:l},series:r,seriesConfig:s})}}}}}async function jf(a){let{chart:t,listSelectedElements:e,selectionSource:i,queryObject:r,errorStrings:s}=a,n=ye(t.uid,"options"),o=ye(t.uid,"config"),l=cs(r);if(o)if(e.length===0)wA({chart:t,selectionSource:i,clearOnlyVisibleSeries:!1,disposeStyleAndSelection:!1});else try{d1(t,"updateSelectionCallbackDisposer");let h=Eo(o),u=[],c=[],d=[],A=new Map,{xAxisField:p}=e[0]??{},f=ze(o?.series),m=It(o?.series),g=Mo(o?.series??[]),y=_a(r).find(w=>w.name===p)?.type;if(e.forEach(w=>{let{elementDataContext:S,yAxisField:F,splitBy:T}=w,L=th({dataContext:S,yAxisField:F,yList:g,xAxisField:p,splitBy:T,chartType:f,chartSubType:m,showOutliers:h,isFeatureCollectionLayer:Oo(r)});L!==void 0&&c.push(L);let{seriesIndex:O,elementIndex:I}=w;if(I!==void 0){let U=A.get(O)?.indexesToSelect??[];U.push(I),A.set(O,{indexesToSelect:Array.from(new Set(U))})}if(!l&&S!==void 0){let U=S[Ou.uniqueIdsName]!==void 0?[S[Ou.uniqueIdsName]].flat():[];if(U.length>0)d.push(...U);else if(n?.returnSelectionOIDs!==!1){let P=Bx({dataContext:S,options:n,xAxisField:p,yAxisField:F??"",splitBy:T,xAxisFieldType:y,chartConfig:o,queryObject:r});u.push(P)}}}),!l&&n?.returnSelectionOIDs!==!1&&u.length>0){let w={...ye(t.uid,"queryConfig")};delete w.groupByFieldsForStatistics,delete w.orderByFields,delete w.outStatistics;let S=await r1({whereList:u,queryObject:r,queryConfig:w,errorStrings:s});if(u.length===e.length)d=S;else for(let F=0;F<S.length;F+=1)d.push(S[F])}o.series.length>1&&m!==ke.BarAndLineNoAggregation&&m!==ke.BarAndLineSplitByNoAggregation&&(c=ap({data:c,x:o.series[0].x,splitByField:Tn(o.series[0].query?.where)})),ai(t.uid,{currentSelectionDataItems:c,currentSelectionOIDs:d,currentSelectionIndexes:A});let x={selectionItems:c,selectionSource:i};n?.returnSelectionIndexes===!0&&(x.selectionIndexes=A),n?.returnSelectionOIDs!==!1&&(x.selectionOIDs=d),l&&(x.selectionPixelTarget=ig({chartConfig:o,layer:r,selectionDataItems:c})),Vu({data:x,htmlContainer:t.htmlContainer})}catch(h){ai(t.uid,{pendingSelectionQueries:!1});let{httpStatus:u}=h instanceof Tl?h.details.details:h.details??{};if(u===429)l2(t);else throw h}ai(t.uid,{pendingSelectionQueries:!1})}function m2(a){let{axis:t}=a,e=t.chart;return{axis:t,chart:e}}async function g2(a,t,e){let i=a.target,{axis:r,chart:s}=m2(i),n=[],{seriesDataItems:o}=a.target.dataItem;Object.keys(o).forEach(d=>{if(Object.hasOwn(o,d)){let A=o[d];for(let p of A)if(p instanceof Bs)n.push(p.column);else{let f=p.sprites.find(m=>!(m instanceof Mi));f!==void 0&&n.push(f)}}});let l=Ov(a,s),h=r instanceof Ct||r instanceof $t,u=[],c=ye(s.uid,"config");if(c){let d=c.series[0].x??"";s.series.each((A,p)=>{let f;if(A instanceof Xi?f=A.columns:f=zr(A)?.clones,A.visible){let m=xu(A),g=A.dataFields?.customValue??"";f?.each((y,x)=>{let w=n.includes(y);Yn({element:y,selected:w,multiSelect:l,isDateOrCategoryAxis:h})&&u.push({element:y,elementDataContext:y.dataItem?.dataContext,yAxisField:m,xAxisField:d,splitBy:g,seriesIndex:p,elementIndex:x,chartConfig:c})})}}),await jf({chart:s,listSelectedElements:u,selectionSource:Tr.SelectionByClick,queryObject:t,errorStrings:e})}}function y2(a){let{axis:t,queryObject:e,errorStrings:i}=a;if(qn(t.renderer.labels.template)){t.renderer.labels.template.events.on(Ie.Hit,async s=>{t.renderer.labels.template.events.isEnabled(Ie.Hit)&&await g2(s,e,i)});let r=ye(t.chart.uid,"filterBySelection")===!0?si.default:si.pointer;ew(t,r)}}function wv(a,t){if(qn(a?.renderer?.labels?.template)&&(a instanceof $t||a instanceof Ct))if(t)a.renderer.labels.template.events.disableType(Ie.Hit),ew(a,si.default);else{a.renderer.labels.template.events.enableType(Ie.Hit);let e=ye(a.chart.uid,"filterBySelection")===!0?si.default:si.pointer;ew(a,e)}}var gr={Guides:"guides",Ticks:"ticks",GaugeFirstAndLastGuides:"firstAndLast",GaugeTicksWithLabels:"gaugeTicksWithLabels"};function mu(a){let{chart:t,label:e,labelType:i}=a,r=Number.NaN;switch(i){case Wt.GuideLabel:!(t instanceof Ys)&&t instanceof Vt&&(e.rotation===90||e.rotation===270?r=t.seriesContainer.measuredHeight:r=t.seriesContainer.measuredWidth);break;case Wt.XAxisTitle:t instanceof Vt&&(r=t.seriesContainer.measuredWidth);break;case Wt.YAxisTitle:t instanceof Vt&&(r=t.seriesContainer.measuredHeight);break;case Wt.ChartTitle:case Wt.ChartSubTitle:case Wt.ChartFooter:r=t.measuredWidth-20;break}r>0&&(e.maxWidth=r,t.invalidateLabels(),t instanceof Vt&&(t.xAxes.getIndex(0)?.invalidateLabels(),t.xAxes.getIndex(1)?.invalidateLabels(),t.yAxes.getIndex(0)?.invalidateLabels(),t.yAxes.getIndex(1)?.invalidateLabels()))}function Uf(a){let{chart:t,labelType:e}=a;mu(a);let i=e===Wt.YAxisTitle?1:0,r=Is(()=>mu(a),re.debounceTime);t.events.on(Ie.Validated,r,i),(e===Wt.YAxisTitle||e===Wt.XAxisTitle)&&t instanceof Vt&&t.seriesContainer.events.on(Ie.SizeChanged,r,i)}function Bv(a,t){a.events.on(Ie.Validated,Is(()=>{t.visible=a.measuredWidth!==0},re.debounceTime))}function v2(a,t){a.chart instanceof Ys||(t.adapter.add("dx",e=>{let i=e;return(t.rotation===90||t.rotation===270)&&(i=t.bbox.height,t.dataItem.value!==t.dataItem.endValue&&(i/=2)),i}),t.padding(0,10,0,10))}function b2(a,t){let e=a.renderer instanceof Hl?new Rn:new Ko;return e.disabled=!0,e.axis=a,Iv(e),fu(e.uid,{isGuide:t}),Uf({chart:a.chart,label:e,labelType:Wt.GuideLabel}),v2(a,e),e}function x2(a){let{label:t,labelConfig:e,guideType:i}=a,r=t.axis.renderer instanceof sr,s;t instanceof Rn||(r?i===Rt.SFS?s=re.verticalSurfaceGuideLabels:s=re.verticalLineGuideLabels:i===Rt.SFS?s=re.horizontalSurfaceGuideLabels:s=re.horizontalLineGuideLabels);let n={...e};n.content.rightToLeft=t.axis.rtl,xn({label:t,labelConfig:n,defaults:s}),t.axis.invalidateLabels()}function _2(a,t,e){let i=e.chart;a.axisFill.tooltip=new fo,a.axisFill.interactionsEnabled=!0,a.axisFill.tooltipPosition=re.guideTooltipPosition,a.axisFill.tooltip.label.wrap=!0,a.axisFill.tooltip.adapter.add("maxWidth",()=>Math.min(re.tooltipWidth,i.seriesContainer.maxWidth)),a.axisFill.tooltip.boundingContainer=i.chartAndLegendContainer,a.axisFill.adapter.add("tooltipHTML",(r,s)=>{let n=r,{dataItem:o,axis:l}=s;if(!(l.renderer instanceof Hl)){let h=Ns(l.uid,"guideTooltipFormatter");if(h!==void 0){let u="",c;o instanceof vo?(u=o.value,c=o.endValue):o instanceof Jo?(u=o.category,c=o.endCategory):o instanceof Uh&&(u=o.date,c=o.endDate),n=h({guideName:o.id??"",start:u,end:c,guideIndex:t})}}return n}),a.axisFill.tooltip.events.on(Ie.Shown,r=>{let s=ye(a.axisFill.axis.chart.uid,"config");if(s!==void 0){let n=ye(a.axisFill.axis.chart.uid,"isRotated"),o=Wf(a.axisFill.axis.renderer,n)?0:1,l=s.axes?.[o]?.guides,{tooltipReverseColor:h}=l?.[t]??{};y1(r.target,h)}})}function C2(a,t){return e=>{let{guideName:i,start:r,end:s,guideIndex:n}=e,{chart:o}=a,l="";if(o!==void 0){let h=ye(o.uid,"config"),u=ye(o.uid,"isRotated"),c=Wf(a.renderer,u)?0:1,d=h?.axes?.[c]?.guides,A=r,p=s;if(a instanceof Ct){let y=new hn,x;if(o!==void 0){let w=ye(a.chart.uid,"formatLocale");y=fl({type:V.DateAxisFormat,iLocale:o.language.locale,formatLocale:w}),x=h?.axes?.[0]?.valueFormat?.intlOptions}A=y.format(r,x),s!==void 0&&(p=y.format(s,x))}else if(a instanceof Qe&&!(r instanceof Date)&&!(s instanceof Date)){let{start:y,end:x}=Iw(a,d?.[n]);Number.isFinite(y)&&(A=y),Number.isFinite(x)&&(p=x);let w=Ns(a.uid,"numberFormatter")??(S=>new Rl().format(S));A=w(A),p!==void 0&&(p=w(p))}else a instanceof $t&&(A=r,p=s);let f=A.toString(),m=p?.toString()??"";!zi(m)&&f!==m?l=Uc(t.guideTooltipLabel,{guideStart:f,guideEnd:m}):l=f;let g=Ra(o.rtl);l=`${i}${g} ${l}`}return l}}function w2(a){let{axis:t,guideTooltipFormatter:e,utilsStrings:i}=a;Ds(t.uid,{guideTooltipFormatter:e??C2(t,i)})}function B2(a){let t=$u.Value;return a instanceof Ct?t=$u.Date:a instanceof $t&&(t=$u.Category),t}function eI(a){let{inputValue:t,axisType:e,axisMin:i,axisMax:r}=a,s=t;if(t!=null)switch(e){case $u.Date:s=t instanceof Date?t:new Date(t);break;case $u.Category:s=t.toString();break;case $u.Value:if(typeof t!="number"){let n=t.toString().trim(),o=ip(n);o!==void 0?i!==void 0&&r!==void 0?s=o/100*(r-i)+i:s=null:s=Number.parseFloat(n)}break}return s}function Iw(a,t){let{start:e,end:i}=t??{},r;if(t!==void 0&&e!==void 0&&e!==null){let s=B2(a),n=a instanceof Qe?a.min:void 0,o=a instanceof Qe?a.max:void 0,l=eI({inputValue:e,axisType:s,axisMin:n,axisMax:o}),h=t.style?.type===Rt.SFS&&i!==null&&i!==void 0?eI({inputValue:i,axisType:s,axisMin:n,axisMax:o}):l;r={isValidGuide:l!=null&&h!=null,start:l,end:h}}else r={isValidGuide:!1,start:void 0,end:void 0};return r}function S2(a){let{axis:t,tickOrGuide:e,numberOfElementsToBeDeleted:i}=a,r=[],s=t.axisRanges.length-1,n=i;for(;n>0&&s>=0;){let o=t.axisRanges.getIndex(s);o!==void 0&&(gs(o.label?.uid,"isGuide")??!1)===!0&&e===gr.Guides&&(r.push(o),n-=1),s-=1}for(let o=0;o<r.length;o+=1)t.axisRanges.removeValue(r[o])}function en(a,t){return a.axisRanges?.values?.filter(e=>{let i=gs(e.label?.uid,"isGuide")??!1,r=gs(e.label?.uid,"isGaugeAxisLabel")??!1,s=!1;switch(t){case gr.Ticks:s=i===!1;break;case gr.Guides:s=i===!0;break;case gr.GaugeTicksWithLabels:s=r===!0&&e.value!==void 0;break;case gr.GaugeFirstAndLastGuides:s=i===!0&&(e.id===re.gaugeFirstLabelId||e.id===re.gaugeLastLabelId);break}return s})??[]}function F2(a,t){let e=a.axisRanges.length;{let r=a.axisRanges.values.findIndex(s=>s.id===re.gaugeFirstLabelId);r!==-1&&(e=r)}let i;return a instanceof $t?i=new Jo:a instanceof Ct?i=new Uh:i=new vo,a.axisRanges.insertIndex(e,i),i.label=b2(a,t),i.axisFill.fillOpacity=1,i.axisFill.disabled=!0,i.grid.strokeOpacity=1,i}function T2(a,t){let e=F2(a,!0);_2(e,t,a),e.tick!==void 0&&(e.tick.disabled=!0),e.label!==void 0&&(e.label.inside=!0),e.grid!==void 0&&(e.grid.disabled=!0)}function P2(a,t){let{start:e,end:i}=t,r=ye(a.uid,"config"),s=ng(r),n=e!==null?e:void 0;n=a.data.find(l=>l[re.originalCategoryValue]===e)?.[s]??n;let o=i!==null?i:void 0;if(o!==void 0)for(let l=a.data.length-1;l>=0;l-=1){let h=a.data[l];if(h[re.originalCategoryValue]===i){o=h[s];break}}return{modifiedStart:n,modifiedEnd:o}}function D2(a,t){let{start:e,end:i}=t;if(e!==void 0){let{chart:r}=a?.component??{},s;if(a instanceof Jo&&r instanceof Vt&&ye(r.uid,"isNonAggregatedChart")===!0){let{modifiedStart:n,modifiedEnd:o}=P2(r,t);s={isValidGuide:!0,start:n??e,end:o??i}}else s=Iw(a.axisFill.axis,t);s.isValidGuide&&(a instanceof Jo?(a.category=`${s.start?.toString()}`,a.endCategory=`${s.end?.toString()}`):a instanceof Uh?(a.date=s.start,a.endDate=s.end):(a.value=s.start,a.endValue=s.end))}}function L2(a,t){a.axisFill.above=t??re.guideAbove,a.grid.above=t??re.guideAbove}function I2(a,t){let{axisFill:e,label:i}=a;if(t!==void 0){if(a.id=t.name,a.visible=t.visible!==void 0?t.visible:a.visible,D2(a,t),t.style.type===Rt.SLS?Ef({element:e,fillSymbol:{type:Rt.SFS,color:t.style?.color,outline:t.style},visible:t.visible}):t.style.type===Rt.SFS&&Ef({element:e,fillSymbol:t.style,visible:t.visible}),L2(a,t.above),t.label!==void 0){let s={type:V.Text,visible:t.visible,content:t.label};x2({label:i,labelConfig:s,guideType:t.style.type})}let r=a.component?.chart;r!==void 0&&mu({chart:r,label:i,labelType:Wt.GuideLabel})}else e.disabled=!0,i.disabled=!0}function k2(a,t){let e=en(a,gr.Guides).length,i=t?.length??e;for(let r=e;r<i;r+=1)T2(a,r)}function $2(a){let{axis:t,guides:e,guideTooltipFormatter:i,utilsStrings:r}=a;if(e!==void 0){for(let s=0;s<e.length;s+=1){let n=en(t,gr.Guides)[s];n!==void 0&&I2(n,e[s])}w2({axis:t,guideTooltipFormatter:i,utilsStrings:r})}}function O2(a,t){let e=en(a,gr.Guides).length,i=t?.length??0,r=e-i;S2({axis:a,numberOfElementsToBeDeleted:r,tickOrGuide:gr.Guides})}function E2(a){let{axis:t,guides:e}=a;k2(t,e),$2(a),O2(t,e)}function M2(a){let{axis:t,labels:e,restoreLabelsVisibility:i=!0}=a;(e??t.renderer.labels.values).forEach(r=>{r.x instanceof et?r.x.value:r.x,i&&Ui(r,!0)})}function k1(a){let t=a.renderer.labels.values.filter(e=>gs(e.uid,"isGuide")!==!0&&e.measuredWidth>0).length;return a.pixelWidth/t}function R2(a){let{target:t}=a;if((ye(t.chart.uid,"config")?.horizontalAxisLabelsBehavior??er.Rotate)===er.Wrap){let e=Number.MAX_SAFE_INTEGER;t.renderer.labels.each(r=>{gs(r.uid,"isGuide")!==!0&&r.measuredWidth>0&&(e=Math.min(e,r.bbox.width))});let i=t instanceof Ct?t.pixelWidth/re.maxNumberOfXAxisLabelsInWrapModeForDateAxis:t.pixelWidth/re.maxNumberOfXAxisLabelsInWrapMode;t.renderer.minGridDistance=Math.max(e+1,i)}}function U2(a){let{axis:t,labelsConfig:e,horizontalAxisLabelsBehavior:i,isSecondValueAxis:r,tickSpacing:s}=a,n=t.renderer.minGridDistance;if(typeof s=="number"&&Number.isFinite(s))n=s;else if(t.renderer instanceof Hl)n=re.gauge.gaugeMinGridDistance;else if(t instanceof Qe)n=t.renderer instanceof sr?re.xAxisMinGridDistance:re.yAxisMinGridDistance;else if(t.renderer instanceof sr)if(r===!0)n=re.secondRotatedValueAxisMinGridDistance;else if(i===void 0||i===er.Rotate){let o=e.content.font?.size??re.generalFontSize,l=t instanceof $t?re.categoryAxisLabelPadding:re.axisLabelPadding;n=o*l}else if(i===er.Wrap){let o=Is(R2,re.debounceTime);Ds(t.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:o}),t.events.on(Ie.SizeChanged,o),t.dispatchImmediately(Ie.SizeChanged)}else i===er.Stagger?n=re.staggerMinGridDistance:n=t instanceof $t?re.xCategoryAxisMinGridDistance:re.xAxisMinGridDistance;else n=t instanceof $t?re.yCategoryAxisMinGridDistance:re.yAxisMinGridDistance;t.renderer.minGridDistance=n}function V2(a){let t=a.renderer.labels.template;qn(t)&&(t.adapter.add("rotation",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.angle??e:e),t.adapter.add("verticalCenter",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.verticalCenter??e:e),t.adapter.add("horizontalCenter",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.horizontalCenter??e:e),t.adapter.add("dy",(e,i)=>{let r=re.axisLabel.dy??e??0;return i.dataItem?.tick?.length>re.axisTickLength?r=e??0:r=Number(gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.yOffset??r:r),r}))}function N2(a){let{target:t}=a;if(t.chart!==void 0){let e=ye(t.chart.uid,"config")?.axes?.[0].labels;if((e?.visible??!0)&&e!==void 0&&t.renderer.labels.length>1){let i=0;t.renderer.labels.each(n=>{if(gs(n.uid,"isGuide")!==!0&&n.measuredWidth>0){let o=n.bbox.width;o>i&&(i=o)}});let r=Ns(t.uid,"labelsSymbol")?.angle??0,s=k1(t)>=i+5;if(!s&&r===0||s&&r===re.rotatedAxisLabel.rotation){let n=s?xv(e.content,t.rtl,re.axisLabel):xv({type:Rt.TS},t.rtl,re.rotatedAxisLabel);Ds(t.uid,{labelsSymbol:n}),t.renderer.invalidateLabels()}}}}function Q2(a,t=1){let{target:e}=a,i=k1(e);Number.isFinite(i)&&(e.renderer.labels.template.maxWidth=Math.min(i*t,e.renderer.minGridDistance))}function H2(a){let{target:t}=a;if(ye(t.chart.uid,"config")?.axes?.[0].labels?.visible!==!1){let e=0;t.dataItems.each(i=>{let{label:r,itemIndex:s}=i;gs(r.uid,"isGuide")!==!0&&r.currentText!==void 0&&r.measuredWidth>0&&s%2===0&&r.bbox.height>e&&(e=r.bbox.height)}),t.dataItems.each(i=>{let{tick:r,label:s,itemIndex:n}=i;if(gs(s.uid,"isGuide")!==!0&&s.currentText!==void 0&&s.measuredWidth>0){let o=n%2===1;r.length=o?e+5:re.axisTickLength,r.dataItem.label.dy=re.axisLabel.dy+(o?e:0)}}),e!==void 0&&(t.renderer.labels.template.paddingBottom=e+5),t.validate()}}function j2(a){let{chart:t}=a;a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let e=Ns(a.uid,"debouncedAxisLabelRotationCallback");if(e!==void 0&&(a.events.off(Ie.Validated,e),Ds(a.uid,{debouncedAxisLabelRotationCallback:void 0})),t!==void 0){let i=ye(t.uid,"config")?.axes?.[0].labels;if(i!==void 0){let r=xv(i.content,t.rtl,re.axisLabel),s=a.renderer.labels.template;s.rotation=r.angle,s.verticalCenter=r.verticalCenter,s.horizontalCenter=r.horizontalCenter,Number.isFinite(r.yOffset)&&(s.dy=r.yOffset)}Ds(a.uid,{labelsSymbol:void 0})}}function $1(a){a.renderer.labels.template.wrap=!1,a.renderer.labels.template.textAlign="start"}function W2(a){$1(a),a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let t=Ns(a.uid,"debouncedAxisLabelWrapCallback");t!==void 0&&(a.events.off(Ie.DataRangeChanged,t),Ds(a.uid,{debouncedAxisLabelWrapCallback:void 0}))}function X2(a){$1(a);let t=Ns(a.uid,"debouncedUpdateMinGridDistanceForWrapBehavior");t!==void 0&&(a.events.off(Ie.SizeChanged,t),Ds(a.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:void 0}))}function z2(a){let t=Ns(a.uid,"debouncedAxisLabelStaggerCallback");t!==void 0&&(a.events.off(Ie.DataRangeChanged,t),Ds(a.uid,{debouncedAxisLabelStaggerCallback:void 0})),a.renderer.ticks.each(e=>{e.length=re.axisTickLength,e.dataItem?.label&&(e.dataItem.label.dy=re.axisLabel.dy??0)})}function G2(a){j2(a),W2(a),z2(a)}function tI(a){V2(a),a.renderer.labels.template.paddingLeft=0,a.renderer.labels.template.paddingRight=0,a.renderer.labels.template.maxWidth=Number.NaN;let t=Is(N2,re.debounceTime,{leading:!0});Ds(a.uid,{debouncedAxisLabelRotationCallback:t}),a.events.on(Ie.Validated,t),a.dispatchImmediately(Ie.Validated)}function iI(a,t=1){a.renderer.labels.template.wrap=!0,a.renderer.labels.template.paddingLeft=.5,a.renderer.labels.template.paddingRight=.5,a.renderer.labels.template.textAlign="middle";let e=Is(i=>Q2(i,t),re.debounceTime);Ds(a.uid,{debouncedAxisLabelWrapCallback:e}),a.events.on(Ie.DataRangeChanged,e)}function Y2(a){a.renderer.labels.template.maxWidth=re.yAxisLabelMaxWidth,a.renderer.labels.template.wrap=!0,a.renderer.labels.template.textAlign="end"}function K2(a){let t=Is(H2,re.debounceTime);Ds(a.uid,{debouncedAxisLabelStaggerCallback:t}),a.events.on(Ie.DataRangeChanged,t)}function Z2(a){let{axis:t,horizontalAxisLabelsBehavior:e,verticalAxisLabelsBehavior:i,labelsConfig:r,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}=a;if(t.renderer instanceof sr&&s?.[0]!==!1){if(G2(t),n!==!0)switch(e){case er.Hide:break;case er.Stagger:K2(t),iI(t,1.5);break;case er.Wrap:iI(t);break;case er.Rotate:tI(t);break;default:r.content.angle!==null&&r.content.angle===void 0&&tI(t);break}}else t.renderer instanceof _r&&(i!==er.Hide?Y2(t):X2(t))}function q2(a){let{axis:t,axisConfig:e,horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}=a,o=t.renderer.labels.template;o.axis=t;let{labels:l}=e,h=t.renderer instanceof sr&&o.rotation===re.rotatedAxisLabel.rotation,u=l,c;h?(u.content.angle=void 0,u.content.horizontalAlignment=void 0,u.content.verticalAlignment=void 0,u.content.yoffset=void 0,c=re.rotatedAxisLabel):t.renderer instanceof sr&&(i===er.Stagger||i===er.Wrap)&&(c={wrap:!0,dy:re.axisLabel.dy}),t.renderer instanceof _r&&r!==er.Hide&&(c={wrap:!0}),xn({label:o,labelConfig:u,defaults:c}),t.renderer.labels.template.paddingTop=t.renderer instanceof sr?0:re.axisLabel.dy,o.align="none",o.valign="none",Z2({axis:t,horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,labelsConfig:l,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}),o.axis.invalidateLabels()}function kw(a){return(a??qb())===$i.Side}function O1(a,t){let e,i,r=iw(a,"bullets"),s=iw(a,"columns"),n=kw(t);return n&&r!==void 0?(e=r,i=s):n||(e=s,i=r),{labelToRender:e,labelToHide:i}}function J2(a,t=!0){a.hideOversized=t}function ej(a,t){let e,i,r=ml(re.dataLabelInitialize);fu(r.uid,{isDataLabel:!0}),a.bullets.push(r);let s=ml(re.dataLabelInitialize,a.columns.template);return fu(s.uid,{isDataLabel:!0}),rw(s,a),rw(r,a),a.events.on(Ie.Validated,Is(()=>{Of(s)&&s.clones.each(n=>{Of(n)&&n.validate()})},re.debounceTime)),s.html="{valueX}",r.html="{valueX}",h1(r),kw(t)?(e=r,i=s):(e=s,i=r),n1(V.BarSeries,r),o1(V.BarSeries,e),{newLabelToRender:e,newLabelToHide:i}}function tj(a){let{series:t,stackedType:e,isRotated:i,hideOversizedStackedLabels:r,hideOversizedSideBySideLabels:s}=a,{labelToRender:n,labelToHide:o}=O1(t,e);if(n===void 0){let{newLabelToRender:u,newLabelToHide:c}=ej(t,e);n=u,o=c}let l=re.dataLabel,h=!0;kw(e)?(l=i===!0?re.dataLabelRotated:re.dataLabel,h=s===!0):(l=i===!0?re.dataLabelStackedRotated:re.dataLabelStackedNonRotated,h=r!==!1),J2(n,h),o!==void 0&&(o.visible=!1,o.disabled=!0),n.html="{valueX}",u1({...a,dataLabel:n,labelDefaults:l,defaultDataLabelFormatter:l1})}function ij(a){let t=a.tooltip;t!==void 0&&!(a instanceof Ct)&&(t.label.adapter.add("html",(e,i)=>{let r=e??"";return a instanceof Qe?r=GI(a,i.properties?.text??e??""):a instanceof $t&&(r=YI({axis:a,defaultOutput:e??"",dataItem:t.dataItem})),Zr(r)}),t.label.html=re.htmlEmptyContent)}function rj(a){let t=a.title,e=98;if(a.renderer instanceof _r)t.adapter.add("y",i=>{let r=t.parent?.measuredHeight??0;return r>0?r/2:i},e);else if(a.renderer instanceof sr)if(a.renderer.opposite){let i=a.title;i.adapter.add("rotation",()=>0,e),i.adapter.add("y",()=>{let r=i.measuredHeight;return r>0?r/2:0},e)}else t.adapter.add("x",i=>{let r=t.parent?.measuredWidth??0;return r>0?r/2:i},e)}function sw(a){let{axis:t,start:e,end:i}=a;t.zoom({start:e??0,end:i??1})}function rI(a){a!==void 0&&(a.start=0,a.end=1)}function Rv(a){a!==void 0&&(a.xAxes!==void 0&&a.xAxes.each(t=>sw({axis:t})),a.yAxes!==void 0&&a.yAxes.each(t=>sw({axis:t})),rI(a.scrollbarX),rI(a.scrollbarY),Ui(a.zoomOutButton,!1))}function Wf(a,t){return a instanceof sr&&t!==!0||a instanceof _r&&t===!0}function sj(a){qn(a.labels.template)&&(a.labels.template.events.on(Ie.Over,t=>{let{axisLabelOveredOpacity:e}=re;t.target.fillOpacity=(t.target.fillOpacity??1)*e}),a.labels.template.events.on(Ie.Out,t=>{let{axisLabelOveredOpacity:e}=re;t.target.fillOpacity=(t.target.fillOpacity??.5)/e}))}function aj(a){let{axis:t,valueFormat:e,axisRenderer:i,queryObject:r,errorStrings:s}=a;i.grid.template.applyOnClones=!0,i.ticks.template.applyOnClones=!0,i.labels.template.applyOnClones=!0,i.hoverable=!0,i.line.strokeOpacity=1,i.grid.template.strokeOpacity=1,i.ticks.template.strokeOpacity=1,Iv(i.labels.template,re.axisLabel),i.ticks.template.disabled=!1,i.labels.template.disabled=!0,ij(t),ud(e)&&(sj(i),y2({axis:t,queryObject:r,errorStrings:s})),Bv(t.chart,t.title),Uf({chart:t.chart,label:t.title,labelType:t.renderer instanceof sr?Wt.XAxisTitle:Wt.YAxisTitle}),rj(t),t.renderer instanceof sr&&(t.events.on(Ie.SizeChanged,Is(()=>{mu({chart:t.chart,label:t.title,labelType:Wt.XAxisTitle})},re.debounceTime)),t.events.on(Ie.Validated,Is(()=>{M2({axis:t,restoreLabelsVisibility:!0})},re.debounceTime)))}function nj(a){let t=a.target,e=ye(t.chart.uid,"isRotated"),i=[];if(t instanceof Qe){if(t.renderer instanceof Hl)i.push({isXAxis:!0,minimum:t.min,maximum:t.max});else if(t.renderer instanceof(e!==!0?_r:sr)){t.maxZoomFactor=1;let r=a.target,s=r.chart,n=e!==!0?s.xAxes.getIndex(0):s.yAxes.getIndex(0),o=s.yAxes.getIndex(1)??s.xAxes.getIndex(1);i=[{isXAxis:!1,minimum:r.min,maximum:r.max},{isXAxis:!0,minimum:n instanceof Qe?n.min:void 0,maximum:n instanceof Qe?n.max:void 0}],o instanceof Qe&&i.push({isXAxis:!1,isSecondValueAxis:!0,minimum:o.min,maximum:o.max})}i.length>0&&i.every(r=>!Number.isNaN(r.minimum)&&!Number.isNaN(r.maximum))&&ox(i,t.chart.htmlContainer)}}function oj(a){a.events.on(Ie.Validated,Is(nj,re.debounceTime))}function lj(a){let{axis:t,isNonAggregatedChart:e}=a,i,r,s,n=t.dataItems.values,o=t.axisRanges.values;if(t instanceof $t)for(let l=0;l<o.length;l+=1){i=!1,r=!1,s=!1;let h=o[l],{category:u,endCategory:c,axisFill:d,grid:A,label:p}=h;if(h instanceof Jo&&h.visible)for(let f=0;f<n.length;f+=1){let m;e===!0?m=no({value:n[f].category,dataContext:n[f].dataContext}):m=n[f].category.toString(),u===m&&(r=!0),c===m&&(s=!0)}r&&s&&(i=!0),Ui(d,i),Ui(A,i),Ui(p,i)}}function sI(a){let{axis:t,axisMinimum:e,axisMaximum:i}=a,r;if(t instanceof Qe&&i!==void 0&&e!==void 0){let s=t.axisRanges.values,n=ye(t.chart.uid,"config"),o=ye(t.chart.uid,"isRotated"),l=Wf(t.renderer,o)?0:1,h=n?.axes?.[l]?.guides;for(let u=0;u<s.length;u+=1){let c=s[u],{value:d,endValue:A,axisFill:p,grid:f,label:m}=c;if(gs(m?.uid,"isGuide")===!0){if(r=c.visible,r&&c instanceof vo){let{start:g,end:y}=Iw(t,h?.[u]),x=Math.min(d,A,g??d,y??A),w=Math.max(d,A,g??d,y??A);x<e&&w<e||x>i&&w>i?r=!1:(c.value=x<e?e:x,c.endValue=w>i?i:w)}Ui(p,r),Ui(f,r),Ui(m,r)}}}}function hj(a){a instanceof Qe?(a.adapter.add("min",t=>(sI({axis:a,axisMinimum:t,axisMaximum:a.max}),t)),a.adapter.add("max",t=>(sI({axis:a,axisMinimum:a.min,axisMaximum:t}),t))):a instanceof $t&&a.events.on(Ie.Validated,()=>{let t=ye(a.chart.uid,"isNonAggregatedChart");lj({axis:a,isNonAggregatedChart:t})})}function $f(a){let{axes:t,isSecondValueAxis:e=!1,isXAxis:i,valueFormat:r,chartType:s,queryObject:n,errorStrings:o}=a,l;if(Ym({isXAxis:i,chartType:s,valueFormat:r})&&!e)l=t.push(new $t);else if(ro(r))l=t.push(new Ct);else if(ba(r)){l=t.push(new Qe);let h=ye(l.chart.uid,"formatLocale");l.numberFormatter=fl({type:V.NumberAxisFormat,iLocale:l.chart.language.locale,formatLocale:h}),l.numberFormatter.numberFormat="#",e?(l.renderer.opposite=!0,l.renderer.grid.template.disabled=!0):oj(l)}l!==void 0&&(sQ(l),aj({axis:l,valueFormat:r,axisRenderer:l.renderer,queryObject:n,errorStrings:o}),hj(l))}function E1(a){let{chart:t,axesConfig:e,isRotated:i,chartType:r,queryObject:s,errorStrings:n}=a;ai(t.uid,{isRotated:i===!0});let o=i===!0?e?.[1]:e?.[0],l=i===!0?e?.[0]:e?.[1],h=o?.valueFormat,u=l?.valueFormat;h!==void 0&&u!==void 0&&(t.xAxes.clear(),t.yAxes.clear(),$f({chartType:r,isXAxis:i!==!0,axes:t.xAxes,valueFormat:h,queryObject:s,errorStrings:n}),$f({chartType:r,isXAxis:i===!0,axes:t.yAxes,valueFormat:u,queryObject:s,errorStrings:n}),e?.[2]!==void 0&&$f({chartType:r,isXAxis:i===!0,axes:i===!0?t.xAxes:t.yAxes,valueFormat:e[2].valueFormat,isSecondValueAxis:!0,queryObject:s,errorStrings:n}))}function uj(a){let{axis:t,isLogarithmic:e,axisConfigIndex:i}=a,r=ye(t.chart.uid,"config"),s=e===!0&&ug({chartConfig:r,chartData:t.chart.data,axisConfigIndex:i});(t instanceof Ct||t instanceof Qe)&&(t.logarithmic=s,t.treatZeroAs=s?re.treatZeroValueAs:0)}function cj(a,t){let{minimum:e,maximum:i,isLogarithmic:r}=t??{},{buffer:s}=t??{};return s??=re.buffer,a instanceof Qe&&!(a instanceof Ct)&&!s&&(r!==!0||i!=null||e!=null)}function dj(a,t){let e=!1;return a instanceof Qe&&!(a instanceof Ct)&&(e=cj(a,t),a.strictMinMax=e),e}function Aj(a){let{axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r}=a,s=e?.minimum,n=e?.maximum,o=e?.isLogarithmic??!1,l=s,h=n,{chart:u}=t,c=ye(u.uid,"isRotated"),d=ye(u.uid,"config"),A=0;if(u instanceof Vt&&d!==void 0){let p=ks(d),f=Wf(t.renderer,c),m=kQ(u),g=hg({chartConfig:d,isSecondValueAxis:r,seriesIds:m}),y=Sx({chartConfig:d,chartData:u.data,filteredSeriesIds:g});if(p===$i.Stacked100)l=Number.NaN,h=Number.NaN;else{let{minX:x,maxX:w,minY:S,maxY:F}=y,[T,L]=f?[x??Number.NaN,w??Number.NaN]:[S,F];A=T,i===V.BarSeries||i===V.ComboLineAndBarSeries||i===V.LineSeries&&p===$i.Stacked&&!f?(l=Math.min(T,0),h=Math.max(L,0)):(l=T,h=L)}l=s??l,h=n??h}return o&&l!==void 0&&l!==null&&l<=0&&(l=uQ(A)),{min:l,max:h}}function M1(a){let{axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r}=a,{minimum:s,maximum:n,isLogarithmic:o}=e??{};if(t instanceof Qe||t instanceof Ct)if(dj(t,e)){let l=s,h=n;if(KI({minimumFromConfig:s,maximumFromConfig:n,isLogarithmic:o})){let u=Aj({axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r});l=u.min,h=u.max}l=l??Number.NaN,h=h??Number.NaN,Number.isNaN(l)||Number.isNaN(h)||l<h?(t.min=l,t.max=h):(t.min=Number.NaN,t.max=Number.NaN),i===V.GaugeSeries&&t.validate()}else t.min=Number.NaN,t.max=Number.NaN}function pj(a){let{axis:t,timeIntervalInfo:e,dateBaseInterval:i}=a;if(t instanceof Ct){let{size:r,unit:s}=e??{};if(s||({size:r,unit:s}=i??{}),r&&s!==void 0){let n;switch(s){case Ji.Second:n="second";break;case Ji.Minute:n="minute";break;case Ji.Hour:n="hour";break;case Ji.Day:n="day";break;case Ji.Week:n="week";break;case Ji.Month:n="month";break;case Ji.Year:n="year";break}n!==void 0&&(t.baseInterval={timeUnit:n,count:r})}}}function fj(a,t){a instanceof Qe&&(a.renderer.baseGrid.disabled=t!==!0)}function mj(a,t){a.cursorTooltipEnabled=t===!0}function gj(a,t){let e=a.renderer instanceof sr;a.events.once(Ie.Validated,()=>{let i=a.renderer instanceof _r?re.yAxisTitleLabel:re.xAxisTitleLabel;e&&(i={...i,dy:i.dy??0}),xn({label:a.title,labelConfig:t,defaults:i}),mu({chart:a.chart,label:a.title,labelType:a.renderer instanceof sr?Wt.XAxisTitle:Wt.YAxisTitle})})}function yj(a,t){let e=!0;return t===V.BoxPlotSeries&&(e=a instanceof Cr),e}function R1(a){let t=Is(()=>{let{chart:e}=a,i=ye(e.uid,"config");if(e!==void 0&&i!==void 0){let r=ze(i?.series);if(yj(a,r)){let s=ye(e.uid,"isRotated"),n=ks(i);n===$i.Stacked100&&!a.visible&&Ui(a,!1);let o=e.xAxes.getIndex(0),l=e.yAxes.getIndex(0),h=e.yAxes.getIndex(1),u=s===!0?1:0,c=i.axes?.[u],d=s===!0?0:1,A=i.axes?.[d],p=i.axes?.[2];[{axis:o,axisConfig:c,updateLabels:!1},{axis:l,axisConfig:A,updateLabels:!0},{axis:h,axisConfig:p,updateLabels:!0,isSecondValueAxis:!0}].forEach(f=>{let{axis:m,axisConfig:g,updateLabels:y,isSecondValueAxis:x}=f;m!==void 0&&(M1({axis:m,chartType:r,axisConfig:g,isSecondValueAxis:x}),y!==void 0&&m.events.once(Ie.Validated,()=>{let{labelToRender:w}=O1(a,n);w&&(w.html=s===!0?"{valueX}":"{valueY}")}))})}}},re.debounceTime);a.events.once(Ie.Validated,t)}function vj(a,t){if(a instanceof Qe){let{integerOnlyValues:e,valueFormat:i}=t,r=Tx(i)?i.intlOptions.maximumFractionDigits:void 0;a.maxPrecision=e===!0||r===0?0:Number.NaN}}function yv(a){let{axis:t,axisConfig:e,axisConfigIndex:i,timeIntervalInfo:r,chartType:s,horizontalAxisLabelsBehavior:n,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,guideTooltipFormatter:h,stackedType:u,axisValueFormatter:c,isSecondValueAxis:d,isRotated:A,isTimeOnlyField:p,setTimeZone:f,outTimeZone:m,utilsStrings:g,errorStrings:y}=a,{visible:x,isLogarithmic:w,title:S,grid:F,lineSymbol:T,labels:L,guides:O,valueFormat:I,displayZeroLine:U,displayCursorTooltip:P,tickSpacing:Q,dateBaseInterval:G}=e;pj({axis:t,timeIntervalInfo:r,dateBaseInterval:G}),Vc({element:t.renderer.grid.template,lineSymbol:F,visible:x}),Vc({element:t.renderer.line,lineSymbol:{color:[...re.color],...T??KA()},visible:x}),Vc({element:t.renderer.ticks.template,lineSymbol:T,visible:x}),q2({axis:t,axisConfig:e,horizontalAxisLabelsBehavior:n,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,isSecondValueAxis:d}),vj(t,e),U2({axis:t,labelsConfig:L,horizontalAxisLabelsBehavior:n,isSecondValueAxis:d,tickSpacing:Q}),hQ({axis:t,isXAxis:Wf(t.renderer,A),chartType:s,labelsTextSymbol:e.labels.content,formatOptions:I,overridePercentMultiplication:u===$i.Stacked100,axisValueFormatter:c,isTimeOnlyField:p,setTimeZone:f,outTimeZone:m,errorStrings:y}),M1({axis:t,axisConfig:e,chartType:s,isSecondValueAxis:d}),uj({axis:t,isLogarithmic:w,axisConfigIndex:i}),gj(t,S),mj(t,P),d!==!0&&(E2({axis:t,guides:O,guideTooltipFormatter:h,utilsStrings:g}),fj(t,U))}function bj(a){let{chart:t,rotationChanged:e,isRotated:i,dualAxisChanged:r,timeIntervalInfoWasReset:s,timeIntervalInfo:n,guideTooltipFormatter:o,xAxisLabelFormatter:l,yAxisLabelFormatter:h,secondaryYAxisLabelFormatter:u,options:c,utilsStrings:d,errorStrings:A,queryObject:p}=a,{axisLabelsBehaviorChanged:f}=a,m=ye(t.uid,"config"),g=m.axes,{horizontalAxisLabelsBehavior:y,verticalAxisLabelsBehavior:x}=m,w=ze(m.series),S=ks(m),F=ye(t.uid,"fieldList")?.some(de=>de.name===m.series[0].x&&de.type===GA.TimeOnly)??!1,T=ep({chartConfig:m,queryObject:p,options:c}),L=bh(m.series[0])?m.series[0].temporalBinning?.outTimeZone:void 0,O=i===!0?1:0,I=i===!0?0:1,U=g?.[O],P=g?.[I],Q=t.xAxes.getIndex(0);U1({chart:t,dualAxisChanged:r,rotationChanged:e,timeIntervalInfoWasReset:s,axisLabelsBehaviorChanged:f})&&(E1({chart:t,axesConfig:g,isRotated:i,chartType:w,queryObject:p,errorStrings:A}),f=[!0,!0]),Q=t.xAxes.getIndex(0);let G=t.yAxes.getIndex(0),Y=t.xAxes.getIndex(1)??t.yAxes.getIndex(1),ee=Q?.start,te=Q?.end,le=G?.start,z=G?.end,K=Y?.start,we=Y?.end,se={timeIntervalInfo:n,chartType:w,horizontalAxisLabelsBehavior:y,verticalAxisLabelsBehavior:x,axisLabelsBehaviorChanged:f,guideTooltipFormatter:o,stackedType:S,isRotated:i,setTimeZone:T,outTimeZone:L,utilsStrings:d,errorStrings:A};Q!==void 0&&U!==void 0&&yv({...se,axis:Q,axisConfig:U,axisConfigIndex:O,axisValueFormatter:O===0?l:h,isTimeOnlyField:F}),G!==void 0&&P!==void 0&&yv({...se,axis:G,axisConfig:P,axisConfigIndex:I,axisValueFormatter:I===1?h:l,isTimeOnlyField:F}),Y!==void 0&&g?.[2]!==void 0&&yv({...se,axis:Y,axisConfig:g[2],axisConfigIndex:2,axisValueFormatter:u,isSecondValueAxis:!0,isTimeOnlyField:F}),e===!0&&[{axis:Q,start:ee,end:te},{axis:G,start:le,end:z},{axis:Y,start:K,end:we}].forEach(de=>{let{axis:$e,start:Ye,end:He}=de;$e!==void 0&&$e.events.once(Ie.Validated,()=>{sw({axis:$e,start:Ye,end:He})})}),Q!==void 0&&Q.ghostLabel.setPropertyValue("disabled",!0),G!==void 0&&G.ghostLabel.setPropertyValue("disabled",!0),Y!==void 0&&Y.ghostLabel.setPropertyValue("disabled",!0)}function U1(a){let{chart:t,dualAxisChanged:e,rotationChanged:i,timeIntervalInfoWasReset:r,axisLabelsBehaviorChanged:s}=a,n=ye(t.uid,"config"),{rotated:o,series:l}=n,h=n.axes,u=ze(l),c=o===!0?1:0,d=o===!0?0:1,A=h?.[c]?.valueFormat,p=h?.[d]?.valueFormat,f=t.xAxes.getIndex(0),m=t.yAxes.getIndex(0),g=f===void 0||i||A!==void 0&&JC({axis:f,valueFormat:A,chartType:u}),y=m===void 0||i||p!==void 0&&JC({axis:m,valueFormat:p,chartType:u});return e===!0||i===!0||r===!0||s?.[0]||s?.[1]||g||y}function xj(a){E1(a)}function _j(a){let{chart:t,chartConfig:e,rotationChanged:i,axisLabelsBehaviorChanged:r,isRotated:s,dualAxisChanged:n,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:h,xAxisLabelFormatter:u,yAxisLabelFormatter:c,secondaryYAxisLabelFormatter:d,options:A,utilsStrings:p,errorStrings:f,queryObject:m}=a,g=ks(e);bj({chart:t,rotationChanged:i,axisLabelsBehaviorChanged:r,isRotated:s,dualAxisChanged:n,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:h,xAxisLabelFormatter:u,yAxisLabelFormatter:c,secondaryYAxisLabelFormatter:d,options:A,utilsStrings:p,errorStrings:f,queryObject:m});let y=s===!0?t.yAxes.getIndex(0):t.xAxes.getIndex(0);if(y!==void 0){y instanceof $t&&(y.dataFields.category=ng(e));let S=y.renderer,F=S.grid.template;F.location=0,S.cellStartLocation=.1,S.cellEndLocation=.9;let T=e.orderOptions?.data&&"orderBy"in e.orderOptions.data&&e.orderOptions.data.orderBy===zA.Descending,L=s===!0;T&&y instanceof Ct&&(L=!L),S.inversed=L}let x=s===!0?t.xAxes.getIndex(0):t.yAxes.getIndex(0),w=s===!0?t.xAxes.getIndex(1):t.yAxes.getIndex(1);g===$i.Stacked100?(x instanceof Qe&&(x.calculateTotals=!0),w instanceof Qe&&(w.calculateTotals=!0)):(x instanceof Qe&&(x.calculateTotals=!1),w instanceof Qe&&(w.calculateTotals=!1))}function Vf(a){let{value:t,axisMin:e,axisMax:i}=a,r=Number.NaN,s=i-e;return s!==0&&(r=(t-e)/s),r}function aw(a){return a!=null&&a!==0}function V1(a){let{minimum:t,maximum:e,labelsIncrement:i,minimumValueConversion:r,maximumValueConversion:s}=a,n=t??pt.gauge.axisMinimum,o=e??pt.gauge.axisMaximum;n=dx(n,r),o=dx(o,s);let l=aw(i),h=aw(i)?i:Math.abs(o-n)/pt.gauge.numberOfLabelIntervals,u=l?Math.round(Math.abs(o-n)/h):pt.gauge.numberOfLabelIntervals;if(l)if(u>pt.gauge.maximumNumberOfLabelIntervals)h=Math.abs(o-n),u=1;else{let c=n+u*h;c<o?(u+=1,o=n+u*h):c>o&&(o=c)}return{min:n,max:o,labelsIncrement:h,numberOfIntervals:u}}function N1(a){let{axisConfig:t,axisMin:e,axisMax:i}=a;typeof e=="number"&&typeof i=="number"&&i-e!==0&&t.guides?.forEach(r=>{let{start:s,end:n}=r;typeof s=="number"&&(r.start=Vf({value:s,axisMin:e,axisMax:i})),typeof n=="number"&&(r.end=Vf({value:n,axisMin:e,axisMax:i}))})}function Cj(a){let{featureIndex:t,chartData:e,chartConfig:i}=a,{minimumFromField:r,maximumFromField:s}=i?.axes?.[0]??{},n,o;if(t>=0&&t<e.length){let l=e[t];typeof r=="string"&&!zi(r)&&Number.isFinite(l[r])&&(n=l[r]),typeof s=="string"&&!zi(s)&&Number.isFinite(l[s])&&(o=l[s])}return{minimumFromData:n,maximumFromData:o}}function wj(a){let{featureIndex:t,chartData:e,x:i}=a,r=Number.NaN;if(t>=0&&t<e.length){let s=e[t];i!==void 0&&!zi(i)&&Number.isFinite(s[i])&&(r=s[i])}return r}function $w(a){let{featureIndex:t=0,chartData:e,queryConfig:i,chartConfig:r,gaugeMinMaxFromData:s}=a,{axes:n,series:o}=r,l=Hu(r),{minimum:h,maximum:u}=n?.[0]??{},{x:c}=o?.[0]??{},d=pt.gauge,A,p;l?{minimumFromData:A,maximumFromData:p}=Cj({featureIndex:t,chartData:e,chartConfig:r}):i!==void 0&&({minimumFromData:A,maximumFromData:p}=s);let f=A??h??d.axisMinimum,m=p??u??d.axisMaximum,g=wj({chartData:e,featureIndex:t,x:c});return{minimum:f,maximum:m,dataValue:g}}function Bj(a){let{oldConfig:t,axisMax:e,min:i,max:r,labelsIncrement:s,numberOfIntervals:n,valueFormat:o,minimumFromField:l}=a,h=Mu(o),u=!0;if(t!==void 0){let{minimum:c,minimumFromField:d,labelsIncrement:A,valueFormat:p}=t.axes[0],f=p?.intlOptions?.style!==o?.intlOptions?.style,m=aw(A)?A!==s:n!==pt.gauge.numberOfLabelIntervals;u=f||i!==c||l!==d||!h&&r!==e||m}return u}var Ps={InnerLabel:0,InnerLabelSecondary:1,AxisLabels:2,FirstAndLastLabels:3};function Au(a,t){let e;switch(t){case Ps.InnerLabel:e="gaugeAutoResizeInnerLabelFirstDisposer";break;case Ps.InnerLabelSecondary:e="gaugeAutoResizeInnerLabelSecondDisposer";break;case Ps.AxisLabels:e="gaugeAutoResizeAxisLabelsDisposer";break;case Ps.FirstAndLastLabels:e="gaugeAutoResizeFirstAndLastLabelsDisposer";break}if(e!==void 0){let i=ye(a.uid,e);i!==void 0&&(i.dispose(),i=void 0,ai(a.uid,{[e]:void 0}))}}function Sj(a){let{chart:t,labelList:e,scaleToAdjust:i,fontSize:r,type:s,axisConfig:n}=a,o=Number.NaN,l=Number.NaN,h=i;if(s===Ps.InnerLabel){let c=e[0],d=n?.innerLabel?.content?.verticalAlignment??"middle",A=c.dy??0,p=Math.round(t.chartContainer.measuredHeight-t.radarContainer.pixelY-A),f=c.bbox.height*i,m=0;switch(d){case"bottom":m=f;break;case"top":m=-f;break;case"middle":case"baseline":m=f*.5;break}m>p&&(h=i*(p/m)),o=re.gauge.innerLabelAutoMinFontSize,l=re.gauge.innerLabelAutoMaxFontSize}else o=re.gauge.axisLabelAutoMinFontSize,l=re.gauge.axisLabelAutoMaxFontSize;let u=r*h;return u<o?h*=o/u:u>l&&(h*=l/u),h}function Ow(a){let{chart:t,type:e,labelList:i,currentScale:r,currentFontSize:s,axisConfig:n}=a,o=Number.NaN,l=Number.NaN;if(e===Ps.InnerLabel){let h=typeof t.innerRadius=="number"?t.innerRadius:t.innerRadius.value;l=(t.xAxes.getIndex(0)?.measuredWidth!==0?t.xAxes.getIndex(0)?.measuredWidth??1:1)*h}else l=t.xAxes.getIndex(0)?.measuredHeight??1;if(l>1){let h=e===Ps.InnerLabel?i[0]?.measuredWidth??0:i.find(u=>u.measuredWidth>0&&u.measuredHeight>0)?.measuredHeight??0;if(h>0){let u=h/l;if(u>0){let{axisLabelToInnerChartRatio:c,innerLabelToInnerChartRatio:d}=re.gauge,A=e===Ps.InnerLabel?d:c;o=r*(A/u),o=Sj({chart:t,labelList:i,axisConfig:n,scaleToAdjust:o,fontSize:s,type:e}),o=Number(o.toFixed(2))}}}return Number.isFinite(o)||(o=r),o}function Fj(a){return a?.labels.content.font?.size===void 0||a?.innerLabel?.visible!==!1&&a?.innerLabel?.content?.font?.size===void 0}function Uv(a){return a.some(t=>op(t)&&t.value!==void 0)}function Tj(a){let{chart:t,axisConfig:e,axis:i}=a;if(e.labels.content.font?.size===void 0&&e.onlyShowFirstAndLastLabels!==!0){Au(t,Ps.AxisLabels),Au(t,Ps.FirstAndLastLabels);let r=()=>{i.events.once(Ie.Validated,()=>{let n=en(i,gr.GaugeTicksWithLabels);if(Uv(n)){let o=n.map(d=>d.label),l=o[0].scale,h=o[0].fontSize,u=Ow({chart:t,type:Ps.AxisLabels,labelList:o,currentScale:l,currentFontSize:h,axisConfig:e}),c=u/l;Number.isFinite(u)&&u>0&&(c<=.98||c>1.02)&&o.forEach(d=>{d.scale=u})}}),i.validate()};t.events.once(Ie.Validated,r);let s=t.events.on(Ie.SizeChanged,r);ai(t.uid,{gaugeAutoResizeAxisLabelsDisposer:s}),r()}else{Au(t,Ps.AxisLabels);let r=en(i,gr.GaugeTicksWithLabels);r.length>0&&r.map(s=>s.label).forEach(s=>{s.scale=1})}}function Pj(a,t){let e=ye(a.uid,"config")?.axes?.[0];if(e?.innerLabel?.visible!==!1&&e?.innerLabel?.content?.font?.size===void 0){let i=a.xAxes.getIndex(0)?.measuredWidth;if(i!==void 0&&i>0){let r=Ow({chart:a,type:Ps.InnerLabel,labelList:[t],currentScale:t.scale,currentFontSize:t.fontSize,axisConfig:e});Number.isFinite(r)&&Math.abs(t.scale-r)>.25&&(t.scale=r,t.validate())}}else t.scale=1}function Dj(a,t){Au(a,Ps.InnerLabel),Au(a,Ps.InnerLabelSecondary);let e=a.xAxes.getIndex(0),i=()=>{e?.events.once(Ie.Validated,()=>{Pj(a,t)})},r=a.events.on(Ie.Validated,i),s=a.events.on(Ie.SizeChanged,i);ai(a.uid,{gaugeAutoResizeInnerLabelFirstDisposer:s,gaugeAutoResizeInnerLabelSecondDisposer:r}),i()}function nw(a){return a?.labels.content.font?.size===void 0&&a?.onlyShowFirstAndLastLabels===!0}function Lj(a){let t=a.chart,e=ye(t.uid,"config")?.axes?.[0],i=en(a,gr.GaugeFirstAndLastGuides);if(Uv(i)){let r=i.map(l=>l.label),s=r[0].scale,n=r[0].fontSize,o=Ow({chart:t,type:Ps.FirstAndLastLabels,labelList:r,currentScale:s,currentFontSize:n,axisConfig:e});Number.isFinite(o)&&o>0&&r.forEach(l=>{fu(l.uid,{originalWidth:l.measuredWidth/l.scale,originalHeight:l.measuredHeight/l.scale}),l.scale=o,l.validate()})}}function Ij(a){let{chart:t,axisConfig:e,axis:i}=a;if(nw(e)){Au(t,Ps.AxisLabels),Au(t,Ps.FirstAndLastLabels);let r=()=>{i.events.once(Ie.Validated,()=>{Lj(i)})},s=t.events.on(Ie.SizeChanged,r);ai(t.uid,{gaugeAutoResizeFirstAndLastLabelsDisposer:s}),r()}else Au(t,Ps.FirstAndLastLabels),en(i,gr.GaugeFirstAndLastGuides).map(r=>r.label).forEach(r=>{r.scale=1})}function ow(a,t){let e=a.xAxes.getIndex(0);if(e!==void 0){let i=t??ye(a.uid,"config"),{onlyShowFirstAndLastLabels:r}=i?.axes?.[0]??{};if(!e.renderer.labels.template.visible||r===!0)a.radius=new et(re.gauge.radius);else{let s=en(e,gr.GaugeTicksWithLabels),{furthestLabelX:n,furthestLabelY:o}=s.reduce(({furthestLabelX:l,furthestLabelY:h,furthestPixelX:u,furthestPixelY:c},{label:d})=>{if(d?.visible&&d.bbox.width>0&&d.bbox.height>0){let A=d.pixelX,p=d.bbox.width*d.scale,f=0;A<0?f=Math.abs(A):f=A+p,f>u&&(u=f,l=d);let m=d.pixelY,g=d.bbox.height*d.scale,y=0;m<0?y=Math.abs(m):y=m+g,y>c&&(c=y,h=d)}return{furthestLabelX:l,furthestLabelY:h,furthestPixelX:u,furthestPixelY:c}},{furthestLabelX:void 0,furthestPixelX:0,furthestLabelY:void 0,furthestPixelY:0});if(n!==void 0&&o!==void 0){let l=(n.bbox.width+5)*n.scale,h=(o.bbox.height+5)*o.scale,u=typeof e.renderer.labels.template.radius=="number"?e.renderer.labels.template.radius:e.renderer.labels.template.radius.value,c=(l+u)*2+a.radarContainer.measuredWidth+fv(a.paddingLeft)+fv(a.paddingRight),d=80,A=170,p=a.htmlContainer?.clientHeight??0,f=Math.max(0,Math.min(1,(p-d)/(A-d))),m=a.radarContainer.measuredHeight+(h+u*f)*2+fv(a.paddingTop)+fv(a.paddingBottom),g=a.measuredWidth,y=a.measuredHeight,x=g/c,w=y/m,S=(typeof a.radius=="number"?a.radius:a.radius.value)*100,F=Number((S*x).toFixed(2)),T=Number((S*w).toFixed(2)),L=F/S,O=T/S,I=a.radarContainer.measuredWidth*L,U=a.radarContainer.measuredWidth*O,[P,Q]=I<U?[F,L]:[T,O];Number.isFinite(P)&&P>=10&&P<=re.gauge.radius&&(Q<.98||Q>1.02)&&(a.radius=new et(P))}}}}function kj(a){let t=a.xAxes.getIndex(0);t!==void 0&&(t.events.on(Ie.SizeChanged,()=>ow(a)),t.events.on(Ie.Validated,Is(()=>ow(a),re.debounceTime)))}function Q1(a){let t=a.hands.push(new qd),e=re.gaugeNeedle,{startWidth:i,endWidth:r,innerRadius:s}=e;t.pin.disabled=!0,t.startWidth=i??Number.NaN,t.endWidth=r??Number.NaN,t.innerRadius=he(s??Number.NaN);let n=a.xAxes.getIndex(0);return n!==void 0&&(t.axis=n),t}function $j(a){let{x:t,data:e,chart:i,valueFormat:r,minimum:s,maximum:n}=a,o=Number.NaN;if(e!==void 0&&t!==void 0){let l=e.find(u=>t in u),h=Number.parseFloat(l[t]);Number.isFinite(h)&&(o=h,ai(i.uid,{gaugeData:o}))}else{let l=ye(i.uid,"gaugeData");Number.isFinite(l)&&(o=l)}return Mu(r)&&s!==void 0&&n!==void 0&&s!==null&&n!==null&&o!==null&&n-s!==0&&(o=Vf({value:o,axisMin:s,axisMax:n})),o}function Oj(a,t){let e=t??null;if(t!=null){let i=a.xAxes.getIndex(0),r=ye(a.uid,"config"),s=i.min??r?.axes?.[0].minimum??re.gauge.axisMinimum,n=i.max??r?.axes?.[0].maximum??re.gauge.axisMaximum;t<s?e=s:t>n&&(e=n)}return e}function Ej(a){let{chart:t,needle:e,gaugeValue:i}=a,r=t.hands.getIndex(0)??Q1(t);if(r!==void 0){Ef({element:r,fillSymbol:e?.symbol});let{startWidth:s,endWidth:n,innerRadius:o}=re.gaugeNeedle;r.value=Oj(t,i),r.pin.disabled=e?.displayPin!==!0,r.visible=e?.visible??!0,r.startWidth=e?.startWidth??s,r.endWidth=e?.endWidth??n,r.innerRadius=he(e?.innerRadius??o)}}function Mj(a){let t=ml(void 0,a.radarContainer);t.isMeasured=!1,fu(t.uid,{isGaugeAxisInnerLabel:!0}),Dj(a,t)}function Rj(a){let{chart:t,innerLabelConfig:e,valueFormat:i,gaugeValue:r,gaugeInnerLabelFormatter:s}=a,n=t.radarContainer.children.values.find(o=>gs(o.uid,"isGaugeAxisInnerLabel")===!0);if(n!==void 0){xn({label:n,labelConfig:e,defaults:re.gaugeInnerLabel});let o=ye(t.uid,"formatLocale");n.html=Yj({valueFormat:i,iLocale:t.language.locale,formatLocale:o,gaugeValue:r,innerLabelConfigContent:e?.content,gaugeInnerLabelFormatter:s}),t.radarContainer.invalidateLabels()}}function Uj(a){let t=a.axisRanges.create();return t.axisFill.fillOpacity=1,t.axisFill.disabled=!0,t.grid.strokeOpacity=1,t.grid.disabled=!1,t.tick.length=re.gaugeTicksLength,t}function Vj(a){let t=new Rn;return t.disabled=!0,t.axis=a,Iv(t),t.padding(10,10,10,10),fu(t.uid,{isGaugeAxisLabel:!0}),t}function Nj(a){let{axis:t,min:e,max:i,labelsIncrement:r,numberOfIntervals:s,valueFormat:n}=a,o=Mu(n),l=1,h=en(t,gr.Ticks);h.length>0&&(l=h[0].label?.scale,h.forEach(d=>{if(op(d)){let A=t.axisRanges.values.indexOf(d);A>=0&&t.axisRanges.removeIndex(A)}}));let u=re.gauge.numberOfTicksBetweenTwoLabels+1,c=s*u+1;for(let d=0;d<c;d+=1){let A=d===c-1,p=Uj(t),f=A?i:e+d/u*r;p.value=o?Vf({value:f,axisMin:e,axisMax:i}):f,d%u===0&&(p.label=Vj(t),p.label.text=String(f),p.grid.disabled=!0,Number.isFinite(l)&&(p.label.scale=l))}}function Qj(a){let{chart:t,axis:e,onlyShowFirstAndLastLabels:i,valueFormat:r,axisLabelConfigContent:s,axisValueFormatter:n}=a;if(!i){let o=en(e,gr.GaugeTicksWithLabels);if(Uv(o)){let l=ye(t.uid,"formatLocale");o.forEach(h=>{xn({label:h.label,labelConfig:s}),op(h)&&(h.label.html=H1({valueFormat:r,iLocale:t.language.locale,formatLocale:l,gaugeLabelConfigContent:s?.content,itemLabelValue:h.value,axisValueFormatter:n}))})}}}function Hj(a,t){let e=t?.ticks?.visible??!0,i=en(a,gr.Ticks);for(let r=0;r<i.length;r+=1){let s=i[r];Ui(s.tick,e)}}function jj(a,t){if(a instanceof Qe&&a.chart instanceof Ys){let e=en(a,gr.GaugeTicksWithLabels);if(Uv(e)){let{onlyShowFirstAndLastLabels:i,labels:r}=t,s=(r?.visible??!0)&&i!==!0;e.forEach(n=>{Ui(n.label,s)})}}}function Wj(a){let{labels:t,guides:e,onlyShowFirstAndLastLabels:i}=a,r=e??[];if(i===!0){let s={type:V.Guide,start:Number.NaN,style:{type:"esriSLS"},name:""};r.push({...s,start:a.minimum??Number.NaN,name:re.gaugeFirstLabelId,label:{...t.content,text:`${a.minimum}`}},{...s,start:a.maximum??Number.NaN,name:re.gaugeLastLabelId,label:{...t.content,text:`${a.maximum}`}})}a.guides=r}function Xj(a){en(a,gr.GaugeFirstAndLastGuides).forEach(t=>{t.label.adapter.keys().includes("dx")||t.label.adapter.add("dx",e=>{let i=e;if(t.label.measuredWidth>0){let r=ye(a.chart.uid,"config")?.axes?.[0],s=gs(t.label.uid,"originalWidth"),n=nw(r)&&s!==void 0&&s===t.label.measuredWidth&&t.label.scale!==1;i=Math.round((n?s*t.label.scale:t.label.measuredWidth)/2),t.id===re.gaugeLastLabelId&&(i*=-1)}return i}),t.label.adapter.keys().includes("dy")||t.label.adapter.add("dy",e=>{let i=e;if(t.label.measuredHeight>0){let r=ye(a.chart.uid,"config")?.axes?.[0],s=gs(t.label.uid,"originalHeight"),n=nw(r)&&s!==void 0&&s===t.label.measuredHeight&&t.label.scale!==1;i=Math.round((n?s*t.label.scale:t.label.measuredHeight)/2)}return i})})}function zj(a){let{chart:t,axis:e,onlyShowFirstAndLastLabels:i,valueFormat:r,gaugeLabelConfigContent:s,axisValueFormatter:n}=a;if(i){let o=en(e,gr.GaugeFirstAndLastGuides),l=ye(t.uid,"formatLocale");o.forEach(h=>{h?.label!==void 0&&op(h)&&(h.label.html=H1({valueFormat:r,iLocale:t.language.locale,formatLocale:l,gaugeLabelConfigContent:s?.content,itemLabelValue:h.value,axisValueFormatter:n}))}),Xj(e)}}function Gj(a){let{chart:t,valueFormat:e,queryObject:i,errorStrings:r}=a;t.xAxes.clear(),$f({isXAxis:!0,axes:t.xAxes,valueFormat:e,queryObject:i,errorStrings:r});let s=t.xAxes.getIndex(0);s instanceof Qe&&(s.renderer.labels.template.disabled=!0,s.renderer.ticks.template.disabled=!0,Q1(t),Mj(t),kj(t),s.maxZoomFactor=1)}function Yj(a){let{valueFormat:t,iLocale:e,formatLocale:i,innerLabelConfigContent:r,gaugeValue:s,gaugeInnerLabelFormatter:n}=a,o="";if(Number.isFinite(s))if(n!==void 0)o=n(s);else{let l=$o(t),h=fl({type:V.NumberAxisFormat,iLocale:e,formatLocale:i});h.numberFormat=l,o=h.format(`${s}`),o=xa({textSymbol:{type:Rt.TS,...r,text:o},format:"html"}),o=Zr(o)}return o}function H1(a){let{valueFormat:t,iLocale:e,formatLocale:i,gaugeLabelConfigContent:r,itemLabelValue:s,axisValueFormatter:n}=a,o="";if(Number.isFinite(s))if(n!==void 0)o=n(s);else{let l=$o(t),h=fl({type:V.NumberAxisFormat,iLocale:e,formatLocale:i});h.numberFormat=l,o=h.format(`${s}`),o=xa({textSymbol:{type:Rt.TS,...r,text:o},format:"html"}),o=Zr(o)}return o}function Kj(a){let{gaugeBands:t}=a,e={base:AF(),target:pF()};return t.type===V.FixedProgressBands&&(e.target=t.bands?.target??e.target,e.base=t.bands?.base??e.base),e}function Zj(a){let{axis:t,axisConfig:e,gaugeValue:i}=a,r=e.progressBands;if(r?.type===V.FixedProgressBands&&r.visible!==!1){let s=e.minimum??t.min,n=e.maximum??t.max;if(i!=null&&s!==void 0&&s!==null&&n!==void 0&&n!==null){let o=Math.min(Math.max(i,s),n),l=Kj({gaugeBands:r});e.guides=[{type:V.Guide,start:s,end:o,style:l.target,name:"progressTargetBand"},{type:V.Guide,start:o,end:n,style:l.base,name:"progressBaseBand"}]}}}function qj(a){let{chart:t,chartConfig:e,data:i,queryObject:r,axisValueFormatter:s,gaugeInnerLabelFormatter:n,utilsStrings:o,errorStrings:l,gaugeMinMaxFromData:h}=a,{axes:u,series:c}=e,d=Hu(e),A=ze(e.series),{featureIndex:p,x:f}=c[0],m=u?.[0],g=t.xAxes.getIndex(0),y={...m};if(g!==void 0&&y!==void 0){let{valueFormat:x,needle:w,innerLabel:S,onlyShowFirstAndLastLabels:F}=y;JC({axis:g,valueFormat:x,chartType:A})&&$f({isXAxis:!0,axes:t.xAxes,valueFormat:x,queryObject:r,errorStrings:l});let T=$w({featureIndex:p,chartData:t.data,chartConfig:e,gaugeMinMaxFromData:h,queryConfig:ye(t.uid,"queryConfig")});y.minimum=T.minimum,y.maximum=T.maximum;let{min:L,max:O,labelsIncrement:I,numberOfIntervals:U}=V1(y);Bj({oldConfig:ye(g.chart.uid,"config"),axisMax:g.max,min:L,max:O,labelsIncrement:I,numberOfIntervals:U,valueFormat:x})&&Nj({axis:g,min:L,max:O,labelsIncrement:I,numberOfIntervals:U,valueFormat:x});let P={...y};Mu(x)?(P.minimum=0,P.maximum=1,N1({axisConfig:P,axisMin:y.minimum,axisMax:y.maximum})):(P.minimum=L,P.maximum=O);let Q=d?T?.dataValue:$j({x:f,data:i,chart:t,minimum:y.minimum,maximum:y.maximum,valueFormat:x});Zj({axis:g,axisConfig:P,gaugeValue:Q??Number.NaN}),Wj(P),yv({axis:g,axisConfig:P,axisConfigIndex:0,chartType:V.GaugeSeries,axisValueFormatter:s,isTimeOnlyField:!1,setTimeZone:!1,utilsStrings:o,errorStrings:l}),g.renderer.labels.template.disabled||(g.renderer.labels.template.disabled=!0),g.renderer.ticks.template.disabled||(g.renderer.ticks.template.disabled=!0),Tj({chart:g.chart,axis:g,axisConfig:y}),Ij({chart:t,axis:g,axisConfig:y}),Hj(g,y),Qj({chart:t,axis:g,onlyShowFirstAndLastLabels:F??!1,valueFormat:x,axisLabelConfigContent:y.labels,axisValueFormatter:s}),zj({chart:t,axis:g,onlyShowFirstAndLastLabels:F??!1,valueFormat:x,gaugeLabelConfigContent:y.labels,axisValueFormatter:s}),Ej({chart:t,needle:w,gaugeValue:Q}),Rj({chart:t,innerLabelConfig:S,valueFormat:x,gaugeValue:Q,gaugeInnerLabelFormatter:n}),jj(g,y),ow(t,e),t.validateData()}}function Jj(a){a.background.fill=vn(re.backgroundColor)}function Vv(a,t){a.background.fill=vn(t??re.backgroundColor)}function eW(a){let t=C1(re.headerContainer,a),e=ml(re.title,t),i=ml(re.subtitle,t);return a instanceof cn&&(Bv(a,e),Bv(a,i),Uf({chart:a,label:e,labelType:Wt.ChartTitle}),Uf({chart:a,label:i,labelType:Wt.ChartSubTitle})),hH(t),{headerContainer:t,title:e,subtitle:i}}function Nv(a,t){let{title:e,subtitle:i,headerContainer:r}=a;xn({label:e,labelConfig:t?.title,defaults:re.titleLabel}),xn({label:i,labelConfig:t?.subtitle,defaults:re.titleLabel}),w1(r,e.disabled&&i.disabled),mu({chart:e.parent,label:e,labelType:Wt.ChartTitle}),mu({chart:i.parent,label:i,labelType:Wt.ChartSubTitle})}function tW(a){let t=C1(re.footerContainer,a),e=ml(re.footer,t);return a instanceof cn&&(Bv(a,e),Uf({chart:a,label:e,labelType:Wt.ChartFooter})),{footerContainer:t,footer:e}}function Qv(a,t){let{footer:e,footerContainer:i}=a;xn({label:e,labelConfig:t,defaults:re.footer}),w1(i,e.disabled||t?.content.text===""),mu({chart:e.parent,label:e,labelType:Wt.ChartFooter})}function Ew(a){return a.values.every(t=>t.isReady())}function iW(a){a.events.on(Ie.Ready,()=>{let{chart:t}=a;t&&Ew(a.chart.series)&&(MQ(t),Uu(a.chart.htmlContainer))})}function j1(a){if(a instanceof Vt){let t=new mo,e=new mo;t.disabled=!0,e.disabled=!0,t.marginTop=-10,e.marginRight=0,a.scrollbarX=t,a.scrollbarY=e}}function rW(a,t){let e=t?0:-1;a.thumb.tabindex=e,a.startGrip.tabindex=e,a.endGrip.tabindex=e}function sW(a,t){if(t!==void 0){let e=Nc(t);[a.background,a.startGrip.background,a.endGrip.background,a.thumb.background,a.background.states.getKey("default")?.properties,a.startGrip.background.states.getKey("default")?.properties,a.endGrip.background.states.getKey("default")?.properties,a.thumb.background.states.getKey("default")?.properties,a.startGrip.background.states.getKey("hover")?.properties,a.endGrip.background.states.getKey("hover")?.properties,a.thumb.background.states.getKey("hover")?.properties,a.startGrip.background.states.getKey("down")?.properties,a.endGrip.background.states.getKey("down")?.properties,a.thumb.background.states.getKey("down")?.properties].forEach(i=>{i!==void 0&&(i.fill=e)})}}function aW(a,t){typeof t=="number"&&Number.isFinite(t)&&(a.orientation==="horizontal"?(a.height=t,a.minHeight=t):(a.width=t,a.minWidth=t))}function nW(a,t){if(typeof t=="number"&&Number.isFinite(t)){let e=t/30;a.startGrip.scale=e,a.endGrip.scale=e}}function oW(a,t){typeof t=="number"&&Number.isFinite(t)&&(a.orientation==="horizontal"?a.marginBottom=t:a.marginLeft=t,a.parent?.invalidateLayout())}function W1(a){let{chart:t,scrollbarXConfig:e,scrollbarYConfig:i}=a;if(t instanceof Vt){let r=ye(t.uid,"isRotated");(t.scrollbarX===void 0||t.scrollbarY===void 0)&&j1(t);let{scrollbarX:s,scrollbarY:n}=t;[s,n].forEach(o=>{let l=o.orientation==="horizontal"&&r!==!0||o.orientation==="vertical"&&r===!0?e:i,h=l?.visible!==!0;if(o.disabled=h,rW(o,!h),l!==void 0&&!h){let{width:u,color:c,gripSize:d,margin:A}=l;oW(o,A),sW(o,c),nW(o,d),aW(o,u)}})}}function lW(a,t){a.columns.each(e=>{(e.dataItem?.dataContext)[t]===0&&(e.strokeOpacity=0)})}function hW(a){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:s,colorMatch:n,rendererType:o}=a,l=t.dataFields.valueY??t.dataFields.valueX??e.y,h=new Set,u,c=e.fillSymbol,d={seriesConfig:e,seriesIndex:i,seriesSymbol:c,colorMatch:n,isChartFillSymbol:!0},A={},p={},f=Zb(i);return t.columns.length===0?A=du({seriesConfig:e,seriesIndex:i,seriesSymbol:c??f,element:new Ee,colorMatch:n,isChartFillSymbol:!0}):(t.columns.each(m=>{let g=m.dataItem?.dataContext;if(Number.isFinite(g?.[l])){let y=nn({dataItem:g,seriesConfig:e,chartSubType:s,colorMatch:n,rendererType:o}),x=g[re.xAxisField]===re.nullValue,w=(x&&e.nullCategory?.symbol!==void 0?e.nullCategory.symbol:c)??f;A=du({...d,seriesSymbol:w,element:m,rendererSymbol:y}),gA({element:m,stylingInfo:A.stylingInfo}),x||(h.add(JSON.stringify(A.symbolWithColorInfo)),p=A)}}),r>1&&A.symbolWithColorInfo&&du({...d,seriesSymbol:A.symbolWithColorInfo,element:t.columns.template})),h.size<=1&&(u=p.symbolWithColorInfo??c),lW(t,l),u}function uW(a){let{series:t,seriesSymbolMapForEvent:e,seriesIndexMapper:i,seriesIndex:r,colorMatch:s,rendererType:n}=a,o=a.seriesConfig,l=ye(t.chart.uid,"config"),h=l?.series.length??0,u=It(l?.series),c=hW({series:t,seriesConfig:o,seriesIndex:r,numberOfSeries:h,chartSubType:u,colorMatch:s,rendererType:n});e.set(i.get(o.id)??r,c),e.size===h&&an({data:e,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)})}function X1(a){let{seriesConfig:t,series:e,seriesIndexMapper:i,rotationChanged:r,colorMatch:s,stackedType:n,rendererType:o,seriesIndex:l,seriesSymbolMapForEvent:h,queryObject:u}=a,{name:c}=t,d=ye(e.chart.uid,"config"),A=bn({config:d}),p=It(d?.series);Ui(e,t.visible);let f=c,m=e.dataFields?.customValue??"";(p===ke.BarAndLineSplitBy||p===ke.BarAndLineSplitByNoAggregation)&&(f=rg({queryObject:u,fieldName:Tn(m),fieldValue:f})??f),_A(e,f),ww({series:e,seriesConfig:t,rotationChanged:r,stackedType:n,isRotated:A}),uW({series:e,seriesConfig:t,seriesIndex:l,seriesIndexMapper:i,colorMatch:s,rendererType:o,seriesSymbolMapForEvent:h}),Zn(e.uid,{barSeriesLastUpdate:{numberOfColumnsUpdated:e.columns.length,updateProps:a}})}function cW(a){a.events.on(Ie.Validated,()=>{let t=sa(a.uid,"barSeriesLastUpdate");if(t!==void 0){let{numberOfColumnsUpdated:e,updateProps:i}=t;a.columns.length>e&&X1(i)}})}function dW(a){let{chart:t,chartConfig:e,seriesIndex:i,axisList:r=[],selectionTheme:s,queryObject:n,errorStrings:o}=a,{rotated:l}=e,h=e.series[i],{y:u,assignToSecondValueAxis:c}=h,d=new Xi;d.id=h.id;let A,p;l!==!0?(A=r[0],p=c===!0&&r[2]?r[2]:r[1]):(A=c===!0&&r[2]?r[2]:r[0],p=r[1]),A!==void 0&&(d.xAxis=A),p!==void 0&&(d.yAxis=p);let f=t instanceof Vt?bn({chart:t}):!1,m=It(e.series)!==ke.BarAndLineSplitByNoAggregation?u:`${u}_${vh({where:h.query?.where,keepSurroundingQuotes:!1,escape:!1})}`;f?d.dataFields.valueX=m:d.dataFields.valueY=m;let g=f?r[1]:r[0];if(g!==void 0){let y=c1(g,f);d.dataFields[y]=re.xAxisField,d.baseAxis=g}return ww({series:d,seriesConfig:h,rotationChanged:!1,stackedType:e.stackedType,isRotated:f}),d.dataFields.customValue=h?.query?.where,v1(d.columns.template,d),d.columns.template.width=he(100),Xc({element:d.columns.template,customSelectionTheme:s}),Qf({chart:t,element:d.columns.template,queryObject:n,errorStrings:o}),Pw(d),cW(d),Wc(d),d}function AW(a){let{seriesConfig:t,series:e,seriesIndex:i,axes:r,utilsStrings:s,fieldList:n,queryObject:o,stackedType:l,options:h}=a;e.id=t.id;let u=bn({chart:e.chart});tj({series:e,seriesType:V.BarSeries,isRotated:u,stackedType:l,hideOversizedSideBySideLabels:t.hideOversizedSideBySideLabels,hideOversizedStackedLabels:t.hideOversizedStackedLabels,dataLabelsConfig:t.dataLabels,yAxisValueFormat:r[1].valueFormat,customDataLabelFormatter:h?.dataLabelFormatter}),$v({styleCallback:()=>X1(a),series:e,seriesConfig:t}),x1({series:e,seriesConfig:t,fieldList:n,queryObject:o,utilsStrings:s,seriesIndex:i,tooltipFormatter:h?.tooltipFormatter})}function pW(a){a.labels.template.adapter.add("html",(t,e)=>{let i=sa(a.uid,"pieChartDataLabelFormatter"),r=t??"",{dataItem:s}=e;if(s instanceof Fa){let{slice:n}=s;if(n!==void 0&&!Of(n))r="";else if(i!==void 0){let{value:o,percent:l}=s.values?.value??{};if(o!==void 0&&o!==0){let h=`${s.properties?.category??t}`;r=i(h,o,l)}}}return zi(r)&&(r=re.htmlEmptyContent),Zr(r)})}function fW(a){let t=a.labels.template;t.maxWidth=re.pieChart.dataLabels.maxWidth??Number.NaN,t.wrap=re.pieChart.dataLabels.wrap??!0,t.events.on(Ie.Over,e=>{let{dataItem:i}=e.target??{};i instanceof Fa&&i.slice.showTooltip()}),pW(a)}function mW(a,t){let{numericValueFormat:e,percentValueFormat:i,displayCategoryOnDataLabel:r,displayNumericValueOnDataLabel:s,displayPercentageOnDataLabel:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u,dataLabelsCharacterLimit:c}=t,d=Tw({iLocale:a.chart.language.locale,pieChart:a.chart,valueIntlOptions:e?.intlOptions,percentageIntlOptions:i?.intlOptions,displayNumericValue:s??re.pieChart.displayNumericValueOnDataLabel,displayPercentage:n??re.pieChart.displayPercentageOnDataLabel,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}),A=Jm(c),p=Ra(a.rtl," ");return(f,m,g)=>{let y=d(f,m,g),x=r??re.pieChart.displayCategoryOnDataLabel?A(f):"",w=zi(x)?"":`${x}${p}`;return w=`${w}${y}`,t.dataLabels?.content!==void 0&&(w=xa({textSymbol:{...t.dataLabels.content,text:w},format:"html",defaults:{...re.pieChart.dataLabels,wrap:t.optimizeDataLabelsOverlapping??re.pieChart.dataLabels.wrap}})),w}}function gW(a){let{pieSeries:t,seriesConfig:e,dataLabelFormatter:i}=a,{dataLabels:r}=e,s=e.dataLabelsOffset??re.pieChart.dataLabelsOffset,n=e.dataLabelsInside??re.pieChart.dataLabelsInside;Zn(t.uid,{pieChartDataLabelFormatter:i??mW(t,e)}),xn({label:t.labels.template,labelConfig:r,defaults:{...re.pieChart.dataLabels,wrap:e.optimizeDataLabelsOverlapping??re.pieChart.alignDataLabels},skipSettingText:!0}),t.alignLabels=!n&&(e.alignDataLabels??re.pieChart.alignDataLabels);let o=t.labels.template.radius;t.chart.invalidateData(),(n&&o!==he(-40)||!n&&o===he(-40)||s!==void 0&&Number.isFinite(s)&&o!==s)&&(t.labels.template.radius=n?he(-40):s,t.invalidate())}function yW(a,t){let e=(p,f,m)=>re.htmlEmptyContent,{numericValueFormat:i,percentValueFormat:r,dataTooltipValueFormat:s,dataTooltipPercentFormat:n,displayCategoryOnTooltip:o,displayNumericValueOnTooltip:l,displayPercentageOnTooltip:h,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A}=t;return e=(p,f,m)=>{let g=re.htmlEmptyContent,y=Tw({iLocale:a.chart.language.locale,pieChart:a.chart,valueIntlOptions:(s??i)?.intlOptions,percentageIntlOptions:(n??r)?.intlOptions,displayNumericValue:l??re.pieChart.displayNumericValueOnTooltip,displayPercentage:h??re.pieChart.displayPercentageOnTooltip,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A})("",f,m),x=!zi(p)&&(o??re.pieChart.displayCategoryOnTooltip);if(x&&(g=`<b>${p}</b>`),!zi(y)){let w=eg(y);g=x?`${g}<br />${w}`:w}return g},e}function vW(a){if(a.tooltip!==void 0){let t=a.fill;t instanceof vc?t=t.stroke:t instanceof bc&&(t=t.backgroundFill),a.tooltip.background.fill=t}}function bW(a){let t=a.slices.template;t.tooltipHTML=re.htmlEmptyContent,t.adapter.add("tooltipHTML",(e,i)=>{let r=e??"",{chart:s}=a;if(s!==void 0&&i.tooltip!==void 0){let n=ye(s.uid,"config"),{dataTooltipVisible:o}=n?.series[0]??{};if(o===!1)i.tooltip.disabled=!0;else{let l=sa(a.uid,"pieChartTooltipFormatter");if(l!==void 0){let{dataItem:h}=i;if(h instanceof Fa){let u=h.properties.category??"",c=h.dataContext,d=oo(c);d===void 0&&(d=u);let A=h.values?.value?.value,p=h.values?.value?.percent;typeof A=="number"&&A!==0&&n?.series?.[0]?.dataTooltipVisible!==!1?(i.tooltip.disabled=!1,vW(i),r=l(`${u}`,A,p,d)):i.tooltip.disabled=!0}}}}return Zr(r)})}function xW(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{pieChartTooltipFormatter:i??yW(t,e)}),Ev(t,e)}function _W(a){a.ticks.template.adapter.add("disabled",(t,e)=>e.dataItem?.values?.value?.value===0||!Number.isFinite(e.dataItem?.values?.value?.value)||t===!0)}function CW(a){let{chartData:t,pieSeries:e,pieSlicesSymbols:i,seriesConfig:r}=a;if(e.slices.length===0){let s=[];t?.forEach(n=>{let o=xw({dataContext:n,pieSlicesSymbols:i,seriesConfig:r});s.push(Nc(o.color))}),s.length>0&&(e.colors.list=s)}}function wW(a){let{seriesConfig:t,selectionTheme:e}=a,{x:i,y:r,id:s,visible:n}=t,o=new ws;o.id=s,o.dataFields.value=r,o.dataFields.category=i;let l=re.pieChart;o.startAngle=l.min,o.endAngle=360+o.startAngle,_W(o),bW(o),fW(o);let h=e!==void 0&&e.selectedElementsTheme?.transformation?.opacity===void 0?{...e,selectedElementsTheme:{...e?.selectedElementsTheme,transformation:{...e?.selectedElementsTheme?.transformation,opacity:1}}}:e;return Xc({element:o.slices.template,useNativeState:!0,customSelectionTheme:h}),o.slices.template.states.removeKey("hover"),Wc(o),o.hidden=n===!1,Pw(o),o}function BW(a){let{series:t,pieSlicesSymbols:e,seriesConfig:i,selectionTheme:r}=a;t.defaultState.reset(),t.slices.each((s,n)=>{let o=s.dataItem?.dataContext,l=xw({dataContext:o,pieSlicesSymbols:e,seriesConfig:i}),h=Ef({element:s,fillSymbol:l,defaultToColorFromRamp:!0,colorRampIndex:n,isChartFillSymbol:!0});r!==void 0&&r.selectedElementsTheme===void 0&&gA({element:s,stylingInfo:h,stateKey:ia.Active})})}function SW(a,t){let{ticks:e}=t,i=e?.visible===!1||t.dataLabelsInside===!0||t.dataLabels===void 0||t.dataLabels?.visible===!1||t.dataLabelsOffset!==void 0&&t.dataLabelsOffset<=0;a.ticks.template.disabled=i,a.ticks.template.strokeOpacity=re.pieChart.ticksOpacity;let r=e?.lineSymbol??KA({color:Nm});i&&(r.width=0),Vc({element:a.ticks.template,lineSymbol:r,visible:!i})}function FW(a){let{chart:t,seriesConfig:e,series:i,pieSlicesSymbols:r,options:s}=a,{tooltipFormatter:n,dataLabelFormatter:o}=s??{},{x:l,y:h,id:u,innerRadius:c,startAngle:d,endAngle:A}=e;i.id=u;let p=It([e]),f=re.pieChart;i.dataFields.value=p!==ke.PieFromFields?h:Ru,i.dataFields.category=p!==ke.PieFromFields?l:ao;let m=t.radius instanceof et?t.radius.value:t.radius;t.innerRadius=he((c??f.innerRadius)*m),i.startAngle=d??f.min,i.endAngle=A??360+i.startAngle,gW({pieSeries:i,seriesConfig:e,dataLabelFormatter:o}),CW({chartData:t.data,pieSeries:i,pieSlicesSymbols:r,seriesConfig:e}),$v({styleCallback:()=>BW(a),series:i,seriesConfig:e}),SW(i,e),xW({series:i,seriesConfig:e,tooltipFormatter:n})}async function aI(a){let{chart:t,hitSlice:e,multiSelect:i=!1,queryObject:r,errorStrings:s}=a,n=[],o=ye(t.uid,"config"),l=t.series.getIndex(0);if(o&&l!==void 0){let h=i1(l),u=xu(l),c={element:{},xAxisField:h,yAxisField:u,seriesIndex:0,chartConfig:o};l.slices.each((d,A)=>{d.isActive&&(d===e||i||d.dataItem instanceof Fa&&d.dataItem.label.isHover)?ih(d.dataItem?.dataContext)?(Nf({groupOfSlicesDataContext:d.dataItem?.dataContext})??[]).forEach(p=>{n.push({...c,element:void 0,elementDataContext:p,elementIndex:A})}):n.push({...c,element:d,elementDataContext:d.dataItem?.dataContext,elementIndex:A}):Yn({element:d,selected:!1,useNativeState:!0})}),n.forEach(d=>{Yn({element:d.element,selected:!0,useNativeState:!0})}),await jf({chart:t,listSelectedElements:n,selectionSource:Tr.SelectionByClick,queryObject:r,errorStrings:s})}t.feedLegend()}function TW(a,t,e){let i=async n=>{let{target:o}=n;if(p1(a)&&a.series.getIndex(0)?.slices.template.togglable){let l=Ov(n,a);if(o instanceof Sa)await aI({chart:a,multiSelect:l,hitSlice:o,queryObject:t,errorStrings:e});else if(o instanceof Mi){let h=o.dataItem;if(h instanceof Fa){let{slice:u}=h;u.isActive=!u.isActive,await aI({chart:a,multiSelect:l,hitSlice:u,queryObject:t,errorStrings:e})}}else o===a.background&&await jf({chart:a,listSelectedElements:[],selectionSource:Tr.SelectionByClick,queryObject:t,errorStrings:e})}},r=a.series.getIndex(0)?.slices.template;r!==void 0&&(r.events.on(Ie.Hit,i),r.events.on(Ie.DoubleHit,i));let s=a.series.getIndex(0)?.labels.template;s!==void 0&&s.events.on(Ie.Hit,i),a.background.events.on(Ie.Hit,i),a.background.events.on(Ie.DoubleHit,i)}function nI(a){let t;return typeof a=="number"&&Number.isFinite(a)&&a>0&&(t=a),t}function PW(a){let{chartContainer:t}=a,e=nI(t.measuredWidth),i=nI(t.measuredHeight),r;return e!==void 0&&i!==void 0&&(r={width:e,minSide:Math.min(e,i)}),r}function oI(a){return a?.offsetParent!==null}function DW(a,t){a!==void 0&&t!==void 0&&window.IntersectionObserver!==void 0&&new IntersectionObserver(e=>{e[0].intersectionRatio>0&&(ye(a.uid,"chartWasCreatedWhileHidden")===!0?(a.reinit(),a.events.once(Ie.Validated,()=>{a.reinit()}),a instanceof Vt&&Rv(a),ai(a.uid,{chartWasCreatedWhileHidden:!1})):ye(a.uid,"chartWasUpdatedWhileHidden")===!0&&(a.reinit(),ai(a.uid,{chartWasUpdatedWhileHidden:!1})))},{root:null}).observe(t)}function LW(a,t){let e=re.pieChart.dataLabels.maxWidth??100,i=e;if(a!=null){let{alignDataLabels:r,dataLabelsOffset:s=re.pieChart.dataLabelsOffset,optimizeDataLabelsOverlapping:n,dataLabels:o,dataLabelsInside:l}=a;if(o?.visible===!0&&r===!0&&l!==!0&&n===!0){let h=e,u=PW(t),c=typeof t.radius=="number"?t.radius/100:t.radius.value;if(u!==void 0&&Number.isFinite(c)){let{width:d,minSide:A}=u,p=c*A,f=5,m=Math.floor((d-p)/2)-f-s;if(Number.isFinite(m)){h=Math.min(m,e-f);let g=30;h<g&&(h=g),Number.isFinite(h)||(h=e)}}i=h}}return i}function z1(a){if(qn(a)){let t=typeof a.radius=="number"?a.radius:a.radius.percent;ai(a.uid,{pieChartRadius:t});let e=()=>{let i=he(ye(a.uid,"pieChartRadius")??re.pieChart.chartOptimizedRadius),r=i,s=ye(a.uid,"config");if(s!==void 0){let{series:n}=s,{innerRadius:o,optimizeDataLabelsOverlapping:l,alignDataLabels:h,dataLabelsOffset:u=re.pieChart.dataLabelsOffset,dataLabels:c,dataLabelsInside:d}=n[0];if(c?.visible===!0&&h===!0&&l===!0&&d!==!0){let p=re.pieChart.chartOptimizedRadius/100,f=500,m=150,g=.6,y=.5,x=1,w=a.chartContainer.measuredWidth-u*2,S=Math.max(w-m,0)/(f-m),F=S<1?Math.max(S**x*g,.4):Math.min(S**y*g,p);r=he(F*100)}else r=he(re.pieChart.chartRadius);i.value.toFixed(1)!==r.value.toFixed(1)&&(ai(a.uid,{pieChartRadius:r.percent}),a.radius=r,a.innerRadius=he((o??re.pieChart.innerRadius)*r.value));let A=a.series?.values?.[0];A instanceof ws&&(A.labels.template.maxWidth=LW(s?.series[0],a))}return r};a.events.on(Ie.SizeChanged,Is(e,re.debounceTime)),e(),a.validate()}}function G1(a){if(a instanceof pr)z1(a);else if(!(a instanceof Ys)){let t=()=>{let i=ye(a.uid,"config"),{chartPaddingMinSize:r,chartPaddingRightWhenLegendNotOnRight:s,chartContainerPaddingTopWhenRotated:n,chartContainer:o}=re,l=i?.series,h=ze(l),u=bn({config:i}),c=l?.[0]?.dataLabels?.visible??!0,d=re.chartDefaultPaddingRight;if(u&&c&&(h===V.LineSeries||h===V.ComboLineAndBarSeries||h===V.BarSeries&&(i?.stackedType??qb())===$i.Side)){let p=0,f=m=>gs(m.uid,"isDataLabel")??!1;a.series.each(m=>{let g=m.bullets.values.find(f);g!==void 0&&g.clones.each(y=>{let x=y.measuredWidth;switch(y.horizontalCenter){case"middle":x/=2;break;case"right":x*=-1;break}let w=y.pixelX+x;w>p&&(p=w,d=x)})})}d>=0&&(a.chartContainer.paddingRight=d),a.chartContainer.paddingTop=u?n:o.paddingTop;let A=i?.legend?.visible!==!1&&i?.legend?.position===st.Right;a.paddingRight=A?r:s},e=0;a.series.each(i=>{i.events.once(Ie.Validated,()=>{e+=1,e===a.series.length&&t()})})}}function IW(a,t){a.adapter.add("criticalError",e=>(e.message=t.errors.simpleError,e))}it.classNamePrefix="arcgis-charts-";function Mw(a){let{chart:t,localeInfo:e,chartLocale:i}=a;it.defaultLocale=i,t.language.locale=i,ai(t.uid,{formatLocale:e.formatLocale}),t.rtl=e.rtl}function Hv(a){let{chart:t,actionMode:e,cursorRange:i}=a;if(qn(t)){let r=e??ye(t.uid,"actionMode")??re.actionMode;ai(t.uid,{actionMode:r});let s=ye(t.uid,"filterBySelection");switch(r){case Ut.MonoSelection:case Ut.MultiSelection:case Ut.MultiSelectionWithCtrlKey:s!==!0?jQ(t):XC(t);break;case Ut.Zoom:XC(t);break;case Ut.None:wA({chart:t,selectionSource:Tr.ClearSelection,clearOnlyVisibleSeries:!1,disposeStyleAndSelection:!1}),XC(t);break}pQ({chart:t,actionMode:r,cursorRange:i})}}function kW(a,t){t&&(a.tapToActivate=!0,a.tapTimeout=3e3,a.responsive.enabled=!0)}function $W(a){let{chart:t,axesConfig:e,chartType:i,isRotated:r,errorStrings:s,queryObject:n}=a;switch(Pl({chartType:i,axesConfig:e,errorStrings:s}),i){case V.GaugeSeries:{io(n),t instanceof Ys&&e?.[0]?.valueFormat!==void 0&&Gj({chart:t,valueFormat:e[0].valueFormat,queryObject:n,errorStrings:s});break}case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:case V.BoxPlotSeries:{xj({chart:t,chartType:i,isRotated:r,axesConfig:e,queryObject:n,errorStrings:s});break}}}function Rw(a){let{chart:t,chartConfig:e,chartConfig:{axes:i},rotationChanged:r,axisLabelsBehaviorChanged:s,chartType:n,isRotated:o,dualAxisChanged:l,timeIntervalInfoWasReset:h,data:u,queryObject:c,guideTooltipFormatter:d,xAxisLabelFormatter:A,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:f,gaugeInnerLabelFormatter:m,options:g,utilsStrings:y,errorStrings:x,gaugeMinMaxFromData:w}=a;switch(Pl({chartType:n,axesConfig:i,errorStrings:x}),n){case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:case V.BoxPlotSeries:{t instanceof Vt&&_j({chart:t,chartConfig:e,rotationChanged:r,axisLabelsBehaviorChanged:s,isRotated:o,dualAxisChanged:l,timeIntervalInfoWasReset:h,timeIntervalInfo:u?.timeIntervalInfo??ye(t.uid,"timeIntervalInfo"),guideTooltipFormatter:d,xAxisLabelFormatter:A,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:f,options:g,utilsStrings:y,errorStrings:x,queryObject:c});break}case V.GaugeSeries:{t instanceof Ys&&(io(c),qj({chart:t,chartConfig:e,data:(u??t.data).dataItems,queryObject:c,axisValueFormatter:A,gaugeInnerLabelFormatter:m,utilsStrings:y,errorStrings:x,gaugeMinMaxFromData:w}));break}}}function Y1(a){let{chart:t,chartConfig:e,options:i,utilsStrings:r,errorStrings:s,queryObject:n}=a,{selectionTheme:o,ignoreSmoothRenderingLimit:l}=i??{};t.series.clear();let h,u,c=[],d=t instanceof Vt?[t.xAxes.getIndex(0),t.yAxes.getIndex(0),t.xAxes.getIndex(1)??t.yAxes.getIndex(1)]:void 0,A={selectionTheme:o,utilsStrings:r},p={...A,axisList:d};if(t instanceof Vt)for(let m=0;m<e.series.length;m+=1){let g=e.series[m];if(u=ze([g]),Dl(e))h=zH({...p,chart:t,axisList:d,chartConfig:e,seriesIndex:m,queryObject:n,errorStrings:s}),c.push(...h.flat());else switch(u){case V.BarSeries:{h=dW({...p,chart:t,chartConfig:e,seriesIndex:m,queryObject:n,errorStrings:s}),c.push(h);break}case V.LineSeries:{io(n),h=RH({...p,chart:t,chartConfig:e,seriesIndex:m,ignoreSmoothRenderingLimit:l,queryObject:n,errorStrings:s}),c.push(h);break}}}else t instanceof pr&&e.series[0].type===V.PieSeries&&(h=wW({...A,seriesConfig:e.series[0]}),c.push(h));c.forEach(m=>{iW(m)});let f=YF({chartConfig:e,queryObject:n,chartData:t.data});f.length>0&&(t.colors.list=f.map(m=>{let[g,y,x,w]=m;return new xt({r:g,g:y,b:x,a:w})})),c.length>0&&t.series.pushAll(c),XQ(t)}function Uw(a){let{chart:t,chartConfig:e,chartConfig:{series:i,axes:r,chartRenderer:s},seriesIndexMapper:n,rotationChanged:o,seriesReordered:l,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u,chartData:c,queryObject:d,options:A,dataWasUpdated:p,sortChanged:f,groupOfSlicesWasUpdated:m,pieSlicesSymbols:g,seriesWereReinitialized:y,utilsStrings:x,errorStrings:w}=a,S=t.series.values,F=new Map,T=e.series.length,L=Fl(e),O=ks(e),I=_a(d,A?.popupTemplateFieldInfosEnabled),U=$s(d),P=tg(s,cs(U)?void 0:U?.renderer);for(let[Q,G]of i.entries()){let Y=ze([G]),ee=S[Q],te={numberOfSeries:T,series:ee,seriesConfig:G,seriesIndex:Q,colorMatch:L,queryObject:d,rendererType:P,options:A,dataWasUpdated:p,fieldList:I,sortChanged:f,utilsStrings:x},le={...te,axes:r,seriesIndexMapper:n},z=ee;if(t instanceof Vt&&Dl(e))z=S.find(K=>K.id===G.id),ee!==void 0&&(z instanceof Cr||z instanceof Ti)&&a2({...te,chart:t,series:z,seriesIndexMapper:n,seriesSymbolMapForEvent:F,chartData:c,showOutliers:e.showOutliers,showMean:e.showMean,outliersVisibilityChanged:h,seriesReordered:l,standardizeValuesVisibilityChanged:u,rotationChanged:o,seriesWereReinitialized:y,options:A});else switch(Y){case V.BarSeries:AW({...le,stackedType:O,seriesSymbolMapForEvent:F,rotationChanged:o});break;case V.LineSeries:HH({...le,stackedType:O,seriesSymbolMapForEvent:F,rotationChanged:o});break;case V.PieSeries:FW({...te,chart:t,pieSlicesSymbols:g,selectionTheme:A?.selectionTheme});break}}f2({chart:t,options:A,dataWasUpdated:p,chartData:c,chartConfig:e,queryObject:d,sortChanged:f,groupOfSlicesWasUpdated:m,errorStrings:w})}function Vw(a){let{chartConfig:t}=a,{chart:e,options:i,globalOptions:r,colorMatchApplied:s,pieSlicesSymbols:n,queryObject:o,utilsStrings:l,errorStrings:h,dataInfo:u}=a,{togglingLegendItemsDisabled:c,cursorRange:d,actionMode:A,pieChartLegendValueLabelFormatter:p,guideTooltipFormatter:f,xAxisLabelFormatter:m,yAxisLabelFormatter:g,secondaryYAxisLabelFormatter:y,gaugeInnerLabelFormatter:x,popupTemplateFieldInfosEnabled:w}=i??{},{data:S,count:F,queryConfig:T,gaugeMinMaxFromData:L={}}=u??{},O,I,U,P=ze(t.series),Q=_a(o,w);ai(e.uid,{fieldList:Q,options:i,elementCount:F,queryConfig:T,timeIntervalInfo:S?.timeIntervalInfo,serverLimitReached:S?.serverLimitReached});let G=new Map;t.series.forEach(($e,Ye)=>{G.set($e.id,Ye)});let Y=Pn(S);Y!==void 0&&(e.data=Y);let ee=It(t.series);e instanceof pr&&an({data:n,htmlContainer:e.htmlContainer,chartId:e.id,colorMatchApplied:s===!0});let{title:te,subtitle:le,footer:z,series:K,background:we}=t;O=eW(e),Nv(O,{title:te,subtitle:le}),I=tW(e),Qv(I,z),U=MH(e,K),uH(e);let se=bn({config:t});ai(e.uid,{config:t,isRotated:se,isNonAggregatedChart:!rp(ee)}),t.axes!==void 0&&($W({chart:e,axesConfig:t.axes,chartType:P,isRotated:se,errorStrings:h,queryObject:o}),Rw({chart:e,chartConfig:t,chartType:P,isRotated:se,data:S,queryObject:o,guideTooltipFormatter:f,xAxisLabelFormatter:m,yAxisLabelFormatter:g,secondaryYAxisLabelFormatter:y,gaugeInnerLabelFormatter:x,options:i,utilsStrings:l,errorStrings:h,gaugeMinMaxFromData:L})),Y1({chart:e,chartConfig:t,utilsStrings:l,options:i,queryObject:o,errorStrings:h}),Uw({chart:e,chartConfig:t,seriesIndexMapper:G,rotationChanged:!1,queryObject:o,chartData:S,groupOfSlicesWasUpdated:!0,pieSlicesSymbols:n,dataWasUpdated:!0,seriesWereReinitialized:!0,options:i,utilsStrings:l,errorStrings:h}),Dw({legendElements:U,seriesConfig:K,webChartLegend:t.legend,pieChartLegendValueLabelFormatter:p}),j1(e),Jj(e),Vv(e,we),W1({chart:e,scrollbarXConfig:t.axes?.[0]?.scrollbar,scrollbarYConfig:t.axes?.[1]?.scrollbar}),qI(e),JI(e,t?.cursorCrosshair),Hv({chart:e,actionMode:A,cursorRange:d});let de=Ad(e.htmlContainer??document.documentElement);return e.dateFormatter.intlLocales=de,kW(e,r?.enableResponsiveFeatures),(e instanceof Ys||Ew(e.series))&&Uu(e.htmlContainer),G1(e),O!==void 0&&I!==void 0&&U!==void 0?{headerElements:O,footerElements:I,legendElements:U}:void 0}function K1(a){a.series.each(t=>{t.events.on(Ie.Ready,()=>{Ew(a.series)&&Rv(a)})})}function OW(a){let{chartContainer:t,chartConfig:e,queryObject:i,colorMatchApplied:r,dataInfo:s,t9nStrings:n,options:o,globalOptions:l}=a,{errorStrings:h,utilsStrings:u,amChartsStrings:c}=n,d=nf(t,Vt);d.id=e?.id??d.uid,ai(d.uid,{queryObject:i});let{t9nLocale:A}=Lu(d.htmlContainer??document.documentElement),p=Ad(d.htmlContainer??document.documentElement),f=Mm(d.htmlContainer??document.documentElement)==="rtl";Mw({chart:d,localeInfo:{locale:A,formatLocale:p,rtl:f},chartLocale:c}),d.events.on(Ie.Inited,()=>d.zoomOutButton.deepInvalidate());let m=ze(e?.series);d instanceof Vt&&m!==V.BoxPlotSeries&&(d.maskBullets=!1);let g=Vw({chartConfig:e,chart:d,queryObject:i,colorMatchApplied:r,options:o,globalOptions:l,utilsStrings:u,errorStrings:h,dataInfo:s});return ai(d.uid,{config:Fr(e)}),K1(d),NQ({chart:d,queryObject:i,errorStrings:h}),QQ({chart:d,queryObject:i,errorStrings:h}),{chart:d,chartElements:g}}function EW(a){let{chartContainer:t,chartConfig:e,queryObject:i,dataInfo:r,colorMatchApplied:s,pieSlicesSymbols:n,t9nStrings:{errorStrings:o,utilsStrings:l,amChartsStrings:h},options:u,globalOptions:c}=a,d=nf(t,pr);d.id=e?.id??d.uid;let A=xx(d.htmlContainer);Mw({chart:d,localeInfo:A,chartLocale:h}),d.radius=he(re.pieChart.chartRadius);let p=Vw({chartConfig:e,chart:d,queryObject:i,colorMatchApplied:s,pieSlicesSymbols:n,dataInfo:r,options:u,globalOptions:c,utilsStrings:l,errorStrings:o});return ai(d.uid,{config:Fr(e),filterBySelection:u?.filterBySelection}),TW(d,i,o),{chart:d,chartElements:p}}function MW(a){let{chartContainer:t,chartConfig:e,queryObject:i,dataInfo:r,t9nStrings:{errorStrings:s,utilsStrings:n,amChartsStrings:o},options:l,globalOptions:h}=a,u=nf(t,Ys);u.id=e?.id??u.uid;let c=xx(u.htmlContainer);Mw({chart:u,localeInfo:c,chartLocale:o}),u.maskBullets=!1;let d=re.gauge,A=Number.isFinite(e?.innerRadius)?e?.innerRadius:d.innerRadius,p=Number.isFinite(e?.startAngle)?e?.startAngle:d.startAngle,f=Number.isFinite(e?.endAngle)?e?.endAngle:d.endAngle;u.radius=he(d.radius),typeof A=="number"&&(u.innerRadius=he(A)),typeof p=="number"&&(u.startAngle=p),typeof f=="number"&&(u.endAngle=f);let m=Vw({chartConfig:e,chart:u,queryObject:i,dataInfo:r,options:l,globalOptions:h,utilsStrings:n,errorStrings:s});return ai(u.uid,{config:Fr(e)}),K1(u),t?.ownerDocument.addEventListener("visibilitychange",()=>{let g=t.ownerDocument.hidden;u&&!g&&Fj(e?.axes?.[0])&&(u.svgContainer?.measure(),u.invalidateData())}),{chart:u,chartElements:m}}function RW(a){let{newConfig:t}=a,{chart:e,chartElements:i,dataWasUpdated:r,dataUpdateDetails:s,dataInfo:n,options:o,configWithAllSeries:l,hasSeriesFilteredOut:h,queryObject:u,utilsStrings:c,errorStrings:d}=a,{guideTooltipFormatter:A}=o??{},{gaugeMinMaxFromData:p={}}=n,f=ye(e.uid,"config"),m=f?.series,g=t.series,y=ze(g),x=bn({config:t});ai(e.uid,{config:Fr(t),isRotated:x}),ai(e.uid,{filterBySelection:o?.filterBySelection}),Hv({chart:e,actionMode:o?.actionMode,cursorRange:o?.cursorRange});let{xOrYChanged:w,layerChanged:S}=s?.common??{},{numberOfSeriesChanged:F}=s?.common??{},T=ux(f,t),L=cx(f,t),O=EF(f,t),I=MF(f,t),U=JSON.stringify(ZA(m))!==JSON.stringify(ZA(g)),P=!1,Q=!1;Dl(t)&&Dl(f)&&(P=UF(f,t),Q=VF(f,t));let G=tp({oldConfig:h?l:f,newConfig:t,dataWasUpdated:r}),Y=ix({oldConfig:f,newConfig:t,rotationChanged:L}),ee=U1({chart:e,dualAxisChanged:O,rotationChanged:L,timeIntervalInfoWasReset:T,axisLabelsBehaviorChanged:Y}),te=!1,le=Pn(n?.data),z=It(g);if(ai(e.uid,{isNonAggregatedChart:!rp(z)}),r){let{count:Ye,data:He,queryConfig:qe}=n??{};ai(e.uid,{elementCount:Ye,queryConfig:qe,timeIntervalInfo:He?.timeIntervalInfo,serverLimitReached:He?.serverLimitReached})}else if(y===V.BarSeries||y===V.LineSeries||y===V.RadarSeries||y===V.ComboLineAndBarSeries||y===V.BoxPlotSeries){let Ye=bx(m,g);if(Ye.length>0&&(LN(e.series,Ye),e.feedLegend(),te=!0),bh(g[0])){let{binTemporalData:He}=g[0],{unit:qe,size:Tt}=g[0].temporalBinning??{};He===!1&&qe!==void 0&&Tt!==void 0&&ai(e.uid,{timeIntervalInfo:{unit:qe,size:Tt}})}}let K=G&&!r,we=new Map;(l??t).series.forEach((Ye,He)=>{we.set(Ye.id,He)}),F=F||h,le&&(r||G)&&(e.data=le),t.axes!==void 0&&Rw({chart:e,chartConfig:t,rotationChanged:L,timeIntervalInfoWasReset:T,axisLabelsBehaviorChanged:Y,chartType:y,isRotated:x,dualAxisChanged:O,guideTooltipFormatter:A,xAxisLabelFormatter:o?.xAxisLabelFormatter,yAxisLabelFormatter:o?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:o?.secondaryYAxisLabelFormatter,queryObject:u,options:o,utilsStrings:c,errorStrings:d,gaugeMinMaxFromData:p});let se=y===V.BoxPlotSeries&&(OF(g,m)||$F(g,m)),de=!1;(e.series===void 0||e.series.length===0||w||S||F||U||(y===V.BarSeries||y===V.LineSeries||y===V.RadarSeries||y===V.ComboLineAndBarSeries)&&e.series.length!==t.series.length||ee||I||se||s?.boxPlot?.showMeanChanged)&&(de=!0,!r&&(L||se||ee)&&e.invalidateData(),Y1({chart:e,chartConfig:t,utilsStrings:c,queryObject:u,options:o,errorStrings:d})),Uw({chart:e,chartConfig:t,seriesIndexMapper:we,rotationChanged:L,seriesReordered:te,outliersVisibilityChanged:P,standardizeValuesVisibilityChanged:Q,queryObject:u,chartData:n.data,options:o,dataWasUpdated:r,sortChanged:G,seriesWereReinitialized:de,utilsStrings:c,errorStrings:d}),K&&(e.validateData(),y===V.BoxPlotSeries&&e.series.each(Ye=>{Ye instanceof Ti&&!(Ye instanceof Aa)&&Ye.id.includes(ji.Outliers)&&Ye.validateData()})),Nv(i.headerElements,{title:t.title,subtitle:t.subtitle}),Qv(i.footerElements,t.footer),Dw({legendElements:i.legendElements,seriesConfig:t.series,webChartLegend:t.legend,togglingLegendItemsDisabled:o?.togglingLegendItemsDisabled}),Vv(e,t.background),W1({chart:e,scrollbarXConfig:t.axes?.[0]?.scrollbar,scrollbarYConfig:t.axes?.[1]?.scrollbar}),JI(e,t?.cursorCrosshair);let $e=dQ(e);($e.behavior===Hi.SelectX||$e.behavior===Hi.SelectXY||$e.behavior===Hi.SelectY||$e.behavior===Hi.None)&&e.scrollbarX.start===0&&e.scrollbarX.end===1&&e.scrollbarY.start===0&&e.scrollbarY.end===1&&Rv(e),G1(e),R1(e.series.values[0])}function UW(a){let{chart:t,chartElements:e,dataWasUpdated:i,newConfig:r,pieSlicesSymbols:s,queryObject:n,options:o,dataInfo:l,utilsStrings:h,errorStrings:u}=a,c=ye(t.uid,"config"),d=c?.series,A=r?.series,p=tp({oldConfig:c,newConfig:r,dataWasUpdated:i}),f=bw(d,A),{count:m,data:g,queryConfig:y}=l??{},x=Pn(g);ai(t.uid,{filterBySelection:o?.filterBySelection,config:Fr(r)});let w=x!==void 0&&(t.data.length!==x.length||zI(t.data,x));w&&(ai(t.uid,{elementCount:m,queryConfig:y}),t.data=x,Uu(t.htmlContainer)),(p||f)&&t.validateData(),an({data:s,htmlContainer:t.htmlContainer,chartId:t.id,colorMatchApplied:kv(t,r)}),Uw({chart:t,queryObject:n,chartConfig:r,seriesIndexMapper:new Map,options:o,dataWasUpdated:w,sortChanged:p,chartData:g,groupOfSlicesWasUpdated:f,pieSlicesSymbols:s,seriesWereReinitialized:!1,utilsStrings:h,errorStrings:u}),Nv(e.headerElements,{title:r.title,subtitle:r.subtitle}),Qv(e.footerElements,r.footer),Dw({legendElements:e.legendElements,seriesConfig:r.series,webChartLegend:r.legend,togglingLegendItemsDisabled:o?.togglingLegendItemsDisabled,pieChartLegendValueLabelFormatter:o?.pieChartLegendValueLabelFormatter}),Vv(t,r.background),Hv({chart:t,actionMode:o?.actionMode,cursorRange:o?.cursorRange}),z1(t)}function VW(a){let{chart:t,chartElements:e,newConfig:i,queryObject:r,dataInfo:s,dataWasUpdated:n,options:o,utilsStrings:l,errorStrings:h}=a,{gaugeMinMaxFromData:u={}}=s??{},{xAxisLabelFormatter:c,gaugeInnerLabelFormatter:d,guideTooltipFormatter:A}=o??{},p=i.series,f=ze(p),m;if(n){let{count:S,data:F,queryConfig:T}=s??{};m=F,m?.dataItems!==void 0&&(t.data=m.dataItems),Uu(t.htmlContainer),ai(t.uid,{elementCount:S,queryConfig:T})}i.axes!==void 0&&Rw({chart:t,chartConfig:i,chartType:f,data:m,queryObject:r,xAxisLabelFormatter:c,gaugeInnerLabelFormatter:d,guideTooltipFormatter:A,options:o,utilsStrings:l,errorStrings:h,gaugeMinMaxFromData:u});let g=re.gauge,y=Number.isFinite(i?.innerRadius)?i.innerRadius:g.innerRadius,x=Number.isFinite(i?.startAngle)?i.startAngle:g.startAngle,w=Number.isFinite(i?.endAngle)?i.endAngle:g.endAngle;t.innerRadius=he(y),t.startAngle=x,t.endAngle=w,Nv(e.headerElements,{title:i.title,subtitle:i.subtitle}),Qv(e.footerElements,i.footer),Vv(t,i.background),ai(t.uid,{config:Fr(i)})}function NW(a){let{chartContainer:t,chartConfig:e,colorMatchApplied:i,pieSlicesSymbols:r,queryObject:s,dataInfo:n,t9nStrings:o,options:l,globalOptions:h}=a;it.commercialLicense=!(h?.showLicenseWatermark??h?.hideLicenseWatermark===!1),it.queue=h?.queueChartCreation!==!1,it.autoDispose=h?.autoDisposeChart===!0,h?.animationEnabled?B_(By):S_(By);let u;switch(ze(e?.series)){case V.PieSeries:io(s),u=EW({chartContainer:t,chartConfig:e,queryObject:s,dataInfo:n,colorMatchApplied:i,pieSlicesSymbols:r,options:l,globalOptions:h,t9nStrings:o});break;case V.GaugeSeries:io(s),u=MW({chartContainer:t,chartConfig:e,queryObject:s,dataInfo:n,options:l,globalOptions:h,t9nStrings:o});break;default:u=OW({chartContainer:t,chartConfig:e,dataInfo:n,colorMatchApplied:i,queryObject:s,options:l,globalOptions:h,t9nStrings:o});break}return u}function QW(a){let{chartContainer:t,chartConfig:e,t9nStrings:i,queryObject:r,options:s,colorMatchApplied:n,rendererFieldNames:o,pieSlicesSymbols:l,globalOptions:h,dataInfo:u,uniqueInternalID:c}=a,{errorStrings:d}=i,A=!oI(t),p=NW({chartContainer:t,chartConfig:e,dataInfo:u,colorMatchApplied:n,pieSlicesSymbols:l,queryObject:r,t9nStrings:i,options:s,globalOptions:h}),{chart:f,chartElements:m}=p;ai(f.uid,{chartWasCreatedWhileHidden:A,queryObject:r,filterBySelection:s?.filterBySelection,options:s,colorMatchApplied:n,rendererFieldNames:o}),IW(f,d),DW(f,t);function g(){c&&KF.delete(c),f.isDisposed()||(BQ(f),m!==void 0&&(p.chartElements=void 0),f.dispose())}function y(F){let{chartConfig:T,dataWasUpdated:L,dataUpdateDetails:O,queryObject:I,options:U,t9nStrings:{utilsStrings:P},configWithAllSeries:Q,hasSeriesFilteredOut:G,pieSlicesSymbols:Y,dataInfo:ee}=F,te=ye(f.uid,"config"),le=T?.series,z=le!==void 0?ze(le):void 0;if(f.isDisposed()||m===void 0||!mx(te,T))throw new Tl(cd.ChartDisposed);switch(z){case V.BoxPlotSeries:case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:f instanceof Vt&&RW({chart:f,chartElements:m,queryObject:I,dataWasUpdated:L,dataUpdateDetails:O,dataInfo:ee,newConfig:T,configWithAllSeries:Q,hasSeriesFilteredOut:G,options:U,utilsStrings:P,errorStrings:d});break;case V.PieSeries:io(I),UW({chart:f,chartElements:m,queryObject:I,dataWasUpdated:L,dataInfo:ee,newConfig:T,pieSlicesSymbols:Y,options:U,utilsStrings:P,errorStrings:d});break;case V.GaugeSeries:io(I),VW({chart:f,chartElements:m,newConfig:T,queryObject:I,dataWasUpdated:L,dataInfo:ee,options:U,utilsStrings:P,errorStrings:d});break}}function x(F){let{chartConfig:T,options:L,dataWasUpdated:O,dataUpdateDetails:I,configWithAllSeries:U,hasSeriesFilteredOut:P,pieSlicesSymbols:Q,colorMatchApplied:G,rendererFieldNames:Y,globalOptions:ee,t9nStrings:te,queryObject:le,dataInfo:z}=F,K=!oI(t),we=_a(le,L?.popupTemplateFieldInfosEnabled);ai(f.uid,{chartWasUpdatedWhileHidden:K,options:L,fieldList:we,queryObject:le,colorMatchApplied:G,rendererFieldNames:Y}),y({chartConfig:T,options:L,dataWasUpdated:O,dataUpdateDetails:I,pieSlicesSymbols:Q,t9nStrings:te,configWithAllSeries:U,hasSeriesFilteredOut:P,queryObject:le,dataInfo:z})}async function w(F,T){if(qn(f)&&(f instanceof Vt||f instanceof pr)){let L=ye(f.uid,"actionMode");L!==Ut.MonoSelection&&L!==Ut.None&&await HQ({chart:f,queryObject:F,errorStrings:T})}}function S(){Rv(f)}return{update:x,dispose:g,resetZoom:S,clearSelection:()=>wA({chart:f}),switchSelection:async F=>await w(F,i.errorStrings),exportImage:async F=>await SQ({chart:f,exportOptions:F}),setActionMode:(F,T)=>Hv({chart:f,actionMode:F,cursorRange:T})}}var HW="AM5C241025748",qi={SelectEnded:"selectended",DataValidated:"datavalidated",BoundsChanged:"boundschanged",PointerUp:"pointerup",FrameEnded:"frameended",Click:"click"},lw=new Map;function jW(a,t){return Gc(a,t)}function WW(a,t){zc(a,t)}function zc(a,t){let e=lw.get(a)??{};lw.set(a,{...e,...t})}function Gc(a,t){return lw.get(a)?.[t]}function fe(a,t){return Gc(a,t)}function Xr(a,t){zc(a,t)}function bi(a,t){return Gc(a,t)}function Gr(a,t){zc(a,t)}function gu(a,t){return Gc(a,t)}function BA(a,t){zc(a,t)}function yl(a,t){return Gc(a,t)}function XW(a,t){zc(a,t)}function ka(a,t){return Gc(a,t)}function Nw(a,t){zc(a,t)}function zW(a,t){return Gc(a,t)}function GW(a,t){zc(a,t)}function YW(a){let{chartSeries:t,oldSeries:e,newSeries:i}=a,r=bx(e,i);for(let s=0;s<r.length;s+=1){let n=r[s][0],o=r[s][1],l=t.length;n>=0&&n<l&&o>=0&&o<l&&t.swap(r[s][0],r[s][1])}}function KW(a){return a.get("renderer")instanceof ya?xr.yField:xr.xField}function ZW(a){let t="";return a instanceof ga?t=a.get("categoryXField")??a.get("valueXField")??"":a instanceof Ur&&(t=a.get("categoryField")??""),t}function qW(a){let t="";return a instanceof ga?t=a.get("categoryYField")??a.get("valueYField")??"":a instanceof Ur&&(t=a.get("categoryField")??""),t}function Xf(a){let t="",{chart:e}=a;return e!==void 0&&(t=fe(e.uid,"isRotated")===!0?ZW(a):qW(a)),t}function Qw(a){return a!=null&&!a.isDisposed()}function JW(a){let t;if(a!=null){let e=a;if(e instanceof Wr)t=e.chart;else{let i=e.dataItem?.component;i instanceof Wr&&(t=i.chart)}}return t}function Z1(a){let t;if(a){let e=a.get("background")?.get("fill");if(e){let{r:i,g:r,b:s}=e;t=[Math.round(i),Math.round(r),Math.round(s),255]}}return t}function q1(a){let t=qs(a),{r:e,g:i,b:r}=t;return{r:e,g:i,b:r}}function e4(a,t){t&&a.setThemes([NL.new(a)])}function t4(a,t){t===!0&&a.setThemes([VL.new(a)])}function Xt(a){let t=qs("#000000"),e=hd;if(a!=null){let[i,r,s,n]=a;e=n/255,t=qs(`rgba(${i}, ${r}, ${s}, ${e})`)}return{color:t,opacity:e}}function Li(a,t){t===!1&&(!("isHiding"in a)||!a.isHiding())?(a.set("visible",!1),"hide"in a&&a.hide()):t!==!1&&(!("isShowing"in a)||!a.isShowing())&&(a.set("visible",!0),"show"in a&&a.show())}function Di(a){let{childId:t,parent:e,useChildId:i}=a,r=i?t:Qs(t,e.uid);return e.children.values.find(s=>s.get("id")===r)}function Qs(a,t){return`${a}${t}`}function yu(a,t=100){return setTimeout(()=>a(),t)}function J1(a){let{series:t,chartConfig:e,whenReadyCallback:i}=a,r=ze(e.series);if(t){let s=t.root.events.on(qi.FrameEnded,()=>{let n=!1,o=!1;switch(!0){case t instanceof Ri:n=t.columns.length===t.dataItems.length;break;case(!(t instanceof Bo)&&t instanceof ei):let l=bi(t.uid,"bulletTemplate");if(l)if(r===V.ScatterSeries)n=l.entities.length===t.data.length&&t.dataItems[t.dataItems.length-1]?.bullets?.[0]?.get("sprite")!==void 0;else{o=!0;let h=Xf(t)??"",u=e?.series[0]?.x??"";n=t.dataItems.filter(c=>{let d=c.dataContext;return h in d&&u in d&&d[u]!==void 0}).every(c=>!Number.isFinite(c.dataContext[h])||c?.bullets?.[0]?.get("sprite"))}break;default:n=!0;break}n&&(s.dispose(),i(),o&&t.markDirtySize())})}}function ek(a){let{chart:t,chartConfig:e,delayCallback:i}=a,{root:r}=t;if(ze(e.series)===V.GaugeSeries||!i)Uu(r.dom);else if(t instanceof ms&&i){let s=()=>{r.events.once(qi.FrameEnded,()=>{Uu(r.dom)})};J1({series:t.series.getIndex(0),chartConfig:e,whenReadyCallback:s})}}function lI(a){let t=Number.NaN;if(typeof a=="number")t=a;else if(a.includes("%")){let e=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(e)&&(t=Bt(e))}return t}function i4(a,t){return t!==!0||a?.includes("Dot")===!0?"round":"square"}function r4(a,t){let e=a??hs.Solid,i=t??q.lineWidth,r={[hs.Solid]:[],[hs.Dot]:[1,i],[hs.DashDotDot]:[4*i,i,1,i,1,i],[hs.Dash]:[4*i,3*i],[hs.DashDot]:[4*i,3*i,1,3*i],[hs.Null]:[]};return r[e]??r[hs.Null]}function s4(a){let{root:t,fill:e,rotation:i,isLinePattern:r,chartBackgroundFill:s}=a,n;if(r!==!1){let{tileSize:o,diagonalTileSize:l}=q.patternLineProperties,h=i===45||i===135,u=h?l:o;n=Jl.new(t,{width:u,height:u,strokeWidth:q.patternLineProperties.strokeWidth??1,gap:6,color:e,...h?{angle:i}:{rotation:i??Number.NaN},...s!==void 0&&{fill:s,fillOpacity:1}})}else{let o=s!==void 0?1:q.patternRectProperties.fillOpacity??Number.NaN;n=iu.new(t,{width:q.patternRectProperties.width??Number.NaN,height:q.patternRectProperties.height??Number.NaN,strokeWidth:q.patternRectProperties.strokeWidth??Number.NaN,fillOpacity:o,color:s??e,fill:e,gap:1,maxWidth:q.patternRectProperties.rectWidth??Number.NaN,maxHeight:q.patternRectProperties.rectHeight??Number.NaN,rotation:i??Number.NaN})}return n}function a4(a){let{fill:t,root:e,style:i,chartBackgroundFill:r}=a,s,n,o=!0;switch(i){case bs.Horizontal:{n=0;break}case bs.Vertical:{n=90;break}case bs.ForwardDiagonal:{n=135;break}case bs.BackwardDiagonal:{n=45;break}case bs.Cross:{n=0,o=!1;break}case bs.DiagonalCross:{n=135,o=!1;break}case bs.Solid:}return n!==void 0&&e!==void 0&&(s=s4({root:e,fill:t,rotation:n,isLinePattern:o,chartBackgroundFill:r})),s}function tk(a,t=0){return(a??t)%360}function ik(a,t){let e={stroke:Xt().color,strokeWidth:q.lineWidth,strokeDasharray:[],linecap:t!==!0?"round":"square",strokeOpacity:hd};if(a!=null){let i=Xt(a.color);e.stroke=i.color,e.strokeOpacity=i.opacity,a.width!==void 0&&(e.strokeWidth=a.width,e.strokeOpacity=a.width===0?0:i.opacity),a.style!==void 0&&a.style!==hs.Null&&(e.strokeDasharray=r4(a.style,e.strokeWidth),e.linecap=i4(a.style,t))}return e}function rk(a,t){let e=a,[i,r,s,n]=a?.color??t??q.color,o=[i,r,s,n];return e==null?e={type:Rt.SLS,color:o}:e.color===void 0&&(e.color=o),ik(e,!1)}function n4(a,t,e){let{color:i,outline:r,style:s}=a,n=Xt(i),o=rx(s),l;return e!==void 0?l=Xt(e).color:o&&(l=Xt(q.backgroundColor).color),{pattern:a4({root:t,fill:n.color,style:s,chartBackgroundFill:l}),fill:n.color,outline:rk(r,i),fillOpacity:n.opacity}}function o4(a){let{color:t,style:e,size:i,outline:r,xoffset:s,yoffset:n,angle:o}=a,l=tk(o),h=Xt(t),u=r,c=e!==YA.Cross&&e!==YA.X&&i!==void 0&&i<q.lineSeries.marker.markerSizeThresholdForTooltipDisplay&&(r?.width===void 0||r.width===0),d=i;return c&&(u={type:Rt.SLS,style:r?.style??hs.Solid,color:[0,0,0,0],width:q.lineSeries.marker.markerSizeThresholdForTooltipDisplay-i},d=i+1),{path:e!==void 0?sx(e,d):"",fill:h.color,outline:rk(u,t),xOffset:s??0,yOffset:n??0,angle:l,fillOpacity:h.opacity}}function l4(a){let t;switch(a){case"line-through":case"underline":t=a;break}return t}function h4(a){return a===!0?"wrap":"none"}function sk(a,t){let e=je;switch(a??t){case"right":e=ge;break;case"left":e=Hr;break}return e}function ak(a,t){let e=je;switch(a??t){case"top":e=Hr;break;case"bottom":e=ge;break}return e}function u4(a){let{angle:t,mappedHAlignment:e,mappedVAlignment:i,isGuideLabel:r}=a,s=e,n=i,o=e,l=i;return(Math.abs(t)===270||Math.abs(t)===90)&&(r||(o=void 0,n=void 0),l===Hr?s=ge:l===ge?s=Hr:l===je&&(s=je)),{align:s,valign:n,horizontalCenter:o,verticalCenter:l}}function Hw(a){let{root:t,symbol:e,defaultToColorFromRamp:i,colorRampIndex:r,isChartFillSymbol:s=!1,chartBackgroundColor:n}=a,o;if(i===!0){let l=s?Vm:hd;if(e.color=e.color??gh({colorIndex:r,opacity:l}),fd(e)||np(e)){let{outline:h}=e;h!==void 0&&(h.color=h?.color??gh({colorIndex:r}),e.outline={...h})}}return Fx(e)?o=ik(e,!0):np(e)?(e.style??=q.lineSeries.marker.markerStyle,e.size??=q.lineSeries.marker.markerBigSize,o=o4(e)):fd(e)&&(o=n4(e,t,n)),o}function c4(a){let{root:t,input:e,isGuideLabel:i,defaults:r}=a,s=tk(e.angle,r?.rotation),n=sk(e.horizontalAlignment,r?.horizontalCenter),o=ak(e.verticalAlignment,r?.verticalCenter),{align:l,valign:h,horizontalCenter:u,verticalCenter:c}=u4({angle:s,mappedHAlignment:n,mappedVAlignment:o,isGuideLabel:i}),d=e.rightToLeft??(t?.dom?Mm(t.dom)==="rtl":!1);return{fill:Xt(e.color).color,fontFamily:e.font?.family??"Arial, Helvetica, sans-serif",fontSize:e.font?.size??q.generalFontSize,fontWeight:e.font?.weight??"400",textDecoration:l4(e.font?.decoration),align:l,valign:h,verticalCenter:c,horizontalCenter:u,text:xa({textSymbol:e,format:"amChartsV5"}),angle:s,xOffset:e.xoffset??r?.dx??0,yOffset:e.yoffset??r?.dy??0,backgroundFill:Xt(e.backgroundColor).color,borderFill:Xt(e.borderLineColor).color,borderWidth:e.borderLineSize??1,haloColor:Xt(e.haloColor).color,rtl:d?"rtl":"ltr",wrap:h4(r?.wrap),maxWidth:r?.maxWidth??Number.NaN}}function nk(a,t){t!==void 0&&(t.marginBottom!==void 0&&a.set("marginBottom",t.marginBottom),t.marginTop!==void 0&&a.set("marginTop",t.marginTop),t.marginRight!==void 0&&a.set("marginRight",t.marginRight),t.marginLeft!==void 0&&a.set("marginLeft",t.marginLeft),t.verticalCenter!==void 0&&a.set("y",ak(t.verticalCenter)),t.horizontalCenter!==void 0&&a.set("x",sk(t.horizontalCenter)),t.strokeWidth!==void 0&&a.get("background")?.set("strokeWidth",t.strokeWidth),t.paddingBottom!==void 0&&a.set("paddingBottom",t.paddingBottom),t.paddingTop!==void 0&&a.set("paddingTop",t.paddingTop),t.paddingLeft!==void 0&&a.set("paddingLeft",t.paddingLeft),t.paddingRight!==void 0&&a.set("paddingRight",t.paddingRight),t.maxWidth!==void 0&&a.set("maxWidth",t.maxWidth))}function vA(a){let{root:t,parent:e,defaults:i,index:r,id:s}=a,n=Kt.new(t,{text:"",textAlign:"center",background:nr.new(t,{}),paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0});return s!==void 0&&n.set("id",s),nk(n,i),e!==void 0&&e.children.insertIndex(r??e.children.length,n),n}function hI(a){let{label:t,offset:e,offsetProperty:i}=a;t.adapters.remove(i),(t instanceof Kt?[t]:t.entities).forEach(r=>{if(typeof e=="string"&&!Number.isFinite(Number(e))){let s=ip(e);typeof s=="number"&&(s/=100,r.adapters.add(i,()=>(i==="dx"?r.width():r.height())*(s??0)))}else{let s=Number(e);Number.isFinite(s)&&r.set(i,s)}})}function _n(a){let{label:t,labelConfig:e,defaults:i,skipSettingText:r,skipSettingXAndY:s}=a,n=t instanceof Kt?t.root:t.entities[0]?.root,o=e?.visible??!0;if(t!==void 0&&!t.isDisposed()&&e!==void 0){let l=t instanceof Kt&&ka(t.uid,"isGuide"),h=c4({root:n,input:e.content,isGuideLabel:l,defaults:i});t.setAll({fill:h.fill,fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontSize:h.fontSize,textDecoration:h.textDecoration,rotation:h.angle,direction:h.rtl,oversizedBehavior:h.wrap,maxWidth:h.maxWidth}),r||t.setAll({text:h.text}),s||(hI({label:t,offset:h.xOffset,offsetProperty:"dx"}),hI({label:t,offset:h.yOffset,offsetProperty:"dy"}),t.setAll({centerX:h.align,centerY:h.valign,x:h.horizontalCenter,y:h.verticalCenter})),t.get("background")?.setAll({strokeWidth:h.borderWidth,strokeOpacity:1}),t.set("visible",o),t instanceof Kt?Li(t,o):t.entities.forEach(u=>{Li(u,o)})}}function gl(a){let{chart:t,label:e,labelType:i}=a,{legendTitle:r}=q.legendProperties,s=fe(t.uid,"config"),n=r.maxWidth??Number.NaN;switch(i){case Wt.GuideLabel:if(t instanceof vi){let o=e.get("rotation");o===90||o===270?n=t.seriesContainer.height():n=t.seriesContainer.width()}break;case Wt.XAxisTitle:t instanceof vi&&(n=t.seriesContainer.width());break;case Wt.YAxisTitle:t instanceof vi&&(n=t.seriesContainer.height());break;case Wt.ChartTitle:case Wt.ChartSubTitle:case Wt.ChartFooter:n=t.chartContainer.width()-20;break;case Wt.LegendTitle:s?.legend?.position!==void 0&&(s?.legend?.position===st.Top||s?.legend?.position===st.Bottom)&&(n=t.chartContainer.width()-20);break}if(n>0)if(i===Wt.YAxisTitle){let o=Number(e.get("fontSize"))||q.generalFontSize,l=o*2.4,h=Math.max(1,Math.floor(n/Math.max(o*.5,1)));e.adapters.remove("text"),e.adapters.add("text",u=>WF({input:u??"",charsPerLine:h})),e.setAll({maxHeight:Math.min(n,l),maxWidth:n,breakWords:!1,oversizedBehavior:"none"})}else e.setAll({maxWidth:n,oversizedBehavior:"wrap"})}function Qc(a){let{chart:t}=a;gl(a),t.events.onDebounced(qi.BoundsChanged,()=>gl(a),q.debounceTime)}function Sv(a,t){let e=t.get("axisFill"),i=t.get("label");if(e!==void 0&&i!==void 0){let r=ka(i.uid,"guideLabelConfig"),s=a.get("renderer")instanceof as,n=Math.round(e.width()),o=Math.round(e.height()),l=Math.round(i.height()),h=Math.round(i.width()),{horizontalAlignment:u,verticalAlignment:c}=r??{},d=0,A=0;if(s){let p=n!==0;switch(u){case"left":p?d=-h/2:d=-h;break;case"right":p?d=h/2:d=h;break;case"center":case"justify":break;default:p||(d=h/2);break}switch(c){case"bottom":p?A=-l:A=-l/2;break;case"middle":A=-o/2;break;default:A=-o+l/2;break}}else{let p=o!==0;switch(u){case"center":d=n/2;break;case"left":d=h/2;break;default:d=n-h/2;break}switch(c){case"bottom":p?A=o/2:A=l;break;case"top":p?A=-o/2+l/2:A=-l;break;default:p||(A=-l/2);break}}i.setAll({dx:d,dy:A})}}function d4(a){let{axis:t,guide:e,label:i}=a,{chart:r}=t;if(r){let s=t.get("renderer")instanceof as?r.yAxes.getIndex(0):r.xAxes.getIndex(0);s&&(s.events.onDebounced(qi.BoundsChanged,()=>Sv(t,e),q.debounceTime),t.events.onDebounced(qi.BoundsChanged,()=>Sv(t,e),q.debounceTime))}i.setAll({paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})}function A4(a){let{guide:t,axis:e,guideLabelConfig:i}=a,r=t.get("label");if(r!==void 0){nk(r),Nw(r.uid,{isGuide:!0,guideLabelConfig:i});let{chart:s}=e;s!==void 0&&Qc({chart:s,label:r,labelType:Wt.GuideLabel}),d4({axis:e,guide:t,label:r})}}function p4(a){let{axis:t,guide:e,guideConfig:i,guideType:r}=a,s=e?.get("label");if(s!==void 0)if(i.label!==void 0){let n=t.get("renderer")instanceof as,o;t instanceof Vs||(n?r===Rt.SFS?o=q.verticalSurfaceGuideLabels:o=q.verticalLineGuideLabels:r===Rt.SFS?o=q.horizontalSurfaceGuideLabels:o=q.horizontalLineGuideLabels),Nw(s.uid,{guideLabelConfig:i.label});let l={type:V.Text,visible:i.visible,content:{...i.label,verticalAlignment:"middle",horizontalAlignment:"center",rightToLeft:s.get("direction")==="rtl"}};_n({label:s,labelConfig:l,defaults:o}),s.events.once(qi.BoundsChanged,()=>{Sv(t,e)}),Sv(t,e)}else Li(s,!1)}function f4(a){let t=a.dataItem?.component;t instanceof ei?(t.uid!==void 0?bi(t.uid,"bulletTemplate"):void 0)?.adapters?.remove?.("fill"):t instanceof Ri?t.columns?.template?.adapters?.remove?.("fill"):t instanceof Ur&&t.slices?.template?.adapters?.remove?.("fill")}function ok(a){let{element:t,fill:e,fillOpacity:i,pattern:r,chartBackgroundFill:s}=a,n=t.get("tooltip"),o=!0,l=t;if(r!==void 0){n!==void 0&&(o=!1,n.get("background")?.set("fill",e)),l.set("fillPattern",r);let h=s??e;l.set("fill",h),l.set("fillOpacity",1),f4(l)}else l.set("fill",e),l.remove("fillPattern"),l.set("fillOpacity",i);n!==void 0&&n.set("getFillFromSprite",o)}function Fv(a,t){a.setAll({stroke:t.stroke,strokeDasharray:t.strokeDasharray,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth,lineCap:t.linecap})}function lk(a){let{element:t,markerSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return t!==void 0&&e!==void 0&&(n=Hw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(t.setAll({svgPath:n.path,rotation:n.angle,dx:n.xOffset,dy:n.yOffset}),ok({element:t,fill:n.fill,fillOpacity:n.fillOpacity}),Fv(t,n.outline)),Li(t,i)),n}function vu(a){let{root:t,element:e,fillSymbol:i,visible:r,defaultToColorFromRamp:s,colorRampIndex:n,isChartFillSymbol:o,keepCurrentVisibility:l,chartBackgroundColor:h}=a,u=rx(i?.style),c=JW(e),d=h??(u?Z1(c)??[...q.backgroundColor]:void 0),A;if(e!==void 0&&!e.isDisposed()){if(i!==void 0&&(A=Hw({root:t,symbol:i,defaultToColorFromRamp:s,colorRampIndex:n,isChartFillSymbol:o,chartBackgroundColor:d}),A!==void 0)){let p=d!==void 0?Xt(d).color:void 0;ok({element:e,fill:A.fill,fillOpacity:A.fillOpacity,pattern:A.pattern,chartBackgroundFill:p}),Fv(e,A.outline)}l||Li(e,r)}return A}function Fo(a){let{element:t,lineSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return t!==void 0&&!t.isDisposed()&&(e!==void 0&&(n=Hw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(Fv(t,n),t instanceof ei&&Fv(t.strokes.template,n))),Li(t,i)),n}function Ja(a){let{root:t,element:e,seriesIndex:i,seriesSymbol:r,isChartFillSymbol:s,colorMatch:n,rendererSymbol:o,keepCurrentVisibility:l}=a,h,u;n&&o!==void 0&&(h=fx({rendererSymbol:o,seriesSymbol:r,colorIndex:i}));let c={root:t,element:e,defaultToColorFromRamp:!0,colorRampIndex:i},d=h??{...r};switch(r.type){case Rt.SLS:u=Fo({...c,lineSymbol:d});break;case Rt.SFS:u=vu({...c,fillSymbol:d,isChartFillSymbol:s,keepCurrentVisibility:l});break;case Rt.SMS:u=lk({...c,markerSymbol:d});break}return{symbolWithColorInfo:d,stylingInfo:u}}function uI(a,t){if(t!==void 0){let{elementColor:e,elementOutlineColor:i,elementOutlineWidth:r,rotation:s,transformation:n}=t,{opacity:o,scale:l}=n??{};e!==void 0&&a.setAll({fill:Xt(e).color,fillOpacity:1}),i!==void 0&&a.setAll({stroke:Xt(i).color,strokeOpacity:1}),r!==void 0&&a.setAll({strokeWidth:r}),s!==void 0&&a.setAll({rotation:s}),l!==void 0&&a.setAll({scale:l}),o!==void 0&&a.setAll({fillOpacity:o,strokeOpacity:o})}}function Kn(a){let{root:t,type:e,intlOptions:i,formatLocale:r}=a,s;switch(e){case V.NumberAxisFormat:{s=Zh.new(t,{}),s.set("intlLocales",r),s.set("numberFormat",i);break}case V.DateAxisFormat:{s=Tc.new(t,{}),s.set("intlLocales",r);break}}return s}function m4(a,t,e){let i=t-a,r=[];if(i!==0){if(e===1)r=[a];else if(e>1){let s=i/(e-1);r=[...qF(a,t,s),t]}}return r}function g4({x:a,mean:t,stddev:e,scalingFactor:i}){let r=-1/(2*e**2);return(i??1)*Math.exp(r*(a-t)**2)}function y4(a){let t=0;if(a.length>0)for(let e=0;e<a.length;e+=1)a[e].count>t&&(t=a[e].count);return t}function hk(a){let t=!1,e;if(a.target.dataItem?.component instanceof Wr?{chart:e}=a.target.dataItem.component:(a.target instanceof zn||a.target instanceof Al)&&({chart:e}=a.target),e instanceof vi||e instanceof Us){let i=fe(e.uid,"actionMode");if(i!==void 0){let{originalEvent:r}=a;t=i===Ut.MultiSelection||i===Ut.MultiSelectionWithCtrlKey&&("ctrlKey"in r&&r.ctrlKey||"metaKey"in r&&r.metaKey)}}return t}function ra(a){let{element:t,selected:e,multiSelect:i,isDateOrCategoryAxis:r,backToDefaultState:s}=a,n=!1;if(t!==void 0){let o=yl(t.uid,"selected")??!1;n=o,i!==!0?r===!0?n=o?!1:o!==e:n=e:n=o!==e;let l=s===!0?ia.Default:ia.CustomInactive;t.states.apply(ia.Default),t.states.apply(n?ia.CustomActive:l),n!==o&&(XW(t.uid,{selected:n}),n&&(t.toFront(),t.dataItem?.component instanceof Wr&&t.dataItem.component.toFront()))}return n}function v4(a,t){let e=fe(t.chart?.uid??Number.NaN,"actionMode"),i=hk(a);return e===Ut.MonoSelection||e===Ut.MultiSelectionWithCtrlKey&&!i}function ns(a,t){let{selectedElementsTheme:e,nonSelectedElementsTheme:i}=t??q.selectionTheme??{},r=a.states.create(ia.CustomActive,{}),s=a.states.create(ia.CustomInactive,{});uI(r,e),uI(s,i)}function bA(a){let{value:t,valueFormat:e,formatLocale:i,root:r}=a,s=t?.toString(),n=Kn({type:e.type,intlOptions:e.intlOptions,formatLocale:i,root:r});return typeof t=="number"&&e.type===V.NumberAxisFormat?s=n.format(t,$o(e)):(typeof t=="number"||t instanceof Date)&&e.type===V.DateAxisFormat&&(s=n.format(t,$o(e))),s}async function b4(a){let{root:t,exportOptions:e}=a,{format:i,quality:r=1,...s}=e,n=r<0||r>1?1:r,o=await hu.new(t,{}).exportImage(i,{quality:n,...s}),l=a1(o),h=i==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${i}`,{type:h})}function mA(a,t){if(a!==void 0&&t!==void 0&&(a.states.lookup("default")?.setAll({fill:t.fill,fillOpacity:t.fillOpacity}),t.outline!==void 0)){let{outline:e}=t;a.states.lookup("default")?.setAll({stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeDasharray:e.strokeDasharray,lineCap:e.linecap,strokeWidth:e.strokeWidth})}}function uk(a){let{numberFormatter:t,dataLabelsConfigContent:e,stackedType:i,externalDataLabelFormatter:r}=a;return(s,n)=>{let o=i===$i.Stacked100&&n!==void 0?n:s;return t.get("numberFormat").style==="percent"&&(o/=100),xa({textSymbol:{...e,text:t.format(o)},format:r===void 0?"amChartsV5":"html"})}}function x4(a,t){let e=a.dataItem,i;switch(t){case V.LineSeries:case V.ScatterSeries:i=e.get("point");break;case V.HistogramSeries:case V.BarSeries:case V.HeatSeries:i=e.get("graphics");break}let r=i??a,s=i?.x??r?.get("x")??0,n=i?.y??r?.get("y")??0;return{x:s,y:n}}function ck(a){let{label:t,chart:e,seriesType:i}=a,r=n=>{if(e instanceof vi){let o=x4(n,i),l=e.plotContainer,h=l.x(),u=l.y(),c=o.x<h||o.x>h+l.width()||o.y<u||o.y>u+l.height();n.setAll({visible:!c,forceHidden:c})}},s=Is((n,o)=>{o&&r(o)},q.debounceTime);t.on("x",s),t.on("y",s)}function _4(a){let{series:t,label:e,isHeatChart:i}=a;e.adapters.add("y",(r,s)=>{let{chart:n}=t,o=n!==void 0?fe(n.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null){let u=h?.get("valueY"),c=s.localBounds().bottom;if(o!==!0){let d=q.dataLabelNegative?.paddingTop??0;if(t.get("stacked")||i)if(u<0)l+=c-d;else{let A=i?q.heatChartLabelPadding.paddingTop:0;l+=c/2+A}}else{let d=q.rotatedChartPadding?.paddingTop??0;l+=c/2+d}}return l}),e.adapters.add("x",(r,s)=>{let{chart:n}=t,o=n!==void 0?fe(n.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null&&o===!0){let u=h?.get("valueX"),c=s.width()/2,d=q.rotatedChartPadding?.paddingRight??0,A=c+d;t.get("stacked")||(u<0?l-=A:l+=A)}return l})}function C4(a){let{series:t,externalDataLabelFormatter:e}=a;t.bullets.push(()=>{let i=fe(t.chart?.uid??Number.NaN,"config"),r=i?.series?.find(h=>h.id===t.get("id"))?.dataLabels??a.dataLabelsConfig,s=us(i),n=t.get("stacked"),o=fa.new(t.root,{locationY:!n&&!s?1:void 0,locationX:!n&&s?1:void 0,sprite:Kt.new(t.root,{text:s?"{valueX}":"{valueY}",populateText:!0,centerY:ge,centerX:Hr,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:Xt(r?.content.color).color,fontSize:r?.content.font?.size})}),l=o.get("sprite");if(l){let h=l;B4({dataLabel:h,series:t,externalDataLabelFormatter:e}),Ak({...a,dataLabelsConfig:r,dataLabel:h,dataLabelFormatter:uk})}return o})}function jw(a,t=1){a.bullets.removeIndex(t)}function dk(a){let{textBackgroundColor:t,chartBackgroundColor:e,fillOpacity:i}=a,r;return JA({r:t.r,g:t.g,b:t.b,a:i})?r=JA({r:e.r,g:e.g,b:e.b,a:i})?Xt(uF).color:e:r=JA({r:e.r,g:e.g,b:e.b,a:i})?e:Xt(hF).color,r}function w4(a){let{dataLabel:t,labelConfigColor:e,seriesColor:i,backgroundColor:r,autoInverseDataLabelTextColor:s,isHeatChart:n}=a,o=r??Xt(q.backgroundColor).color;s===!0&&i&&t.adapters.add("fill",(l,h,u)=>{let c=e??h.text.get("fill"),d=(h.dataItem?.component).get("stacked"),A=c;if(c&&(d||n)){let p=h.dataItem.get("graphics"),f=p?.get("fillOpacity");A=dk({textBackgroundColor:p?.get("fill")??i,chartBackgroundColor:o,fillOpacity:f})}return A})}function B4(a){let{dataLabel:t,series:e,externalDataLabelFormatter:i}=a;t.adapters.remove("text"),t.adapters.remove("html");let r=i!==void 0?"html":"text";t.adapters.add(r,(s,n)=>{let o=s??"",l=n.dataItem,h=bi(e.uid,e instanceof Ri?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(h!==void 0&&e.chart&&l){let u=fe(e.chart.uid,"config"),c=us(u),d=c?l.get("valueX"):l.get("valueY"),A=c?l.get("valueXTotalPercent"):l.get("valueYTotalPercent");o=h(ks(u)===$i.Stacked100?A:d)}return r==="html"?Zr(o):o})}function jv(a){let{series:t,seriesConfig:e,dataLabel:i,labelDefaults:r,dataLabelsConfig:s,isRotated:n,seriesType:o,defaultDataLabelFormatter:l,externalDataLabelFormatter:h}=a;if(i!==void 0){let{chart:u}=t,c=h,d=s?.content??{type:Rt.TS},A=u?fe(u.uid,"config"):void 0;if(u&&h===void 0&&l!==void 0&&A?.axes?.[1]?.valueFormat?.type===V.NumberAxisFormat){let y=fe(u.uid,"formatLocale"),x=o===V.HeatSeries?{type:V.NumberAxisFormat,intlOptions:{}}:A?.axes?.[1]?.valueFormat,w=ks(A),S=w===$i.Stacked100?{...jm().intlOptions,...x.intlOptions,style:"percent"}:{...x.intlOptions},F=Kn({root:u.root,type:x.type,formatLocale:y,intlOptions:S});c=l({numberFormatter:F,dataLabelsConfigContent:d,stackedType:w,externalDataLabelFormatter:h})}let p;switch(o){case V.BarSeries:p="barSeriesDataLabelFormatter";break;case V.LineSeries:p="lineSeriesDataLabelFormatter";break;case V.HistogramSeries:p="histogramDataLabelFormatter";break;case V.ScatterSeries:p="scatterplotDataLabelFormatter";break;case V.HeatSeries:p="heatChartDataLabelFormatter";break}p!==void 0&&Gr(t.uid,{[p]:c}),s!==void 0&&(o===V.HeatSeries?s.content.text="{value}":s.content.text=n===!0?"{valueX}":"{valueY}",s.visible=s.visible!==!1),_n({label:i,labelConfig:s,defaults:r??q.dataLabel,skipSettingText:!0});let f=t.get("stacked"),m=f&&o===V.BarSeries&&e?.hideOversizedStackedLabels!==!1,g=!f&&o===V.BarSeries&&e?.hideOversizedSideBySideLabels===!0;g||m?i.setAll({oversizedBehavior:"hide",maxWidth:void 0,maxHeight:g?100:void 0}):i.setAll({oversizedBehavior:"none"})}}function S4(a){let{series:t,labelDefaults:e,externalDataLabelFormatter:i}=a;t.dataItems.forEach(r=>{let s=r.bullets?.[1];if(s){s.set("locationY",t.get("stacked")?void 0:1);let n=s.get("sprite");n&&jv({...a,dataLabel:n,labelDefaults:e,defaultDataLabelFormatter:uk,externalDataLabelFormatter:i})}})}function Ak(a){let{series:t,dataLabelsConfig:e,autoInverseDataLabelTextColor:i,externalDataLabelFormatter:r,labelDefaults:s,seriesType:n,dataLabel:o,isHeatChart:l,dataLabelFormatter:h}=a;o&&(t.chart&&e&&e?.visible!==!1&&ck({label:o,chart:t.chart,seriesType:n}),_4({series:t,label:o,isHeatChart:l}),jv({...a,dataLabel:o,labelDefaults:s,defaultDataLabelFormatter:h,externalDataLabelFormatter:r}),w4({dataLabel:o,labelConfigColor:Xt(e?.content.color).color,seriesColor:t.get("fill"),backgroundColor:t.chart?.get("background")?.get("fill"),autoInverseDataLabelTextColor:i,isHeatChart:l}))}function pk(a){let{series:t,dataLabelsConfig:e}=a,i=e&&e?.visible!==!1,r=t.bullets.hasIndex(1);i?(r||C4(a),S4(a)):r&&jw(t)}function F4(a){let{dataLabel:t,series:e,externalDataLabelFormatter:i}=a;t.adapters.remove("text"),t.adapters.remove("html");let r=i!==void 0?"html":"text";t.adapters.add(r,(s,n)=>{let o=s??"",l=n.dataItem,h=bi(e.uid,"heatChartDataLabelFormatter"),u=fe(e.chart?.uid??NaN,"config");if(h!==void 0&&l){let c=l.get("value"),d=l.get("categoryX"),A=l.get("categoryY");c===null?o=u?.series[0].emptyCells?.text??q.heatChart.emptyCells?.text??"":c!==void 0&&(o=h(c,d,A))}return r==="html"?Zr(o):o})}function T4(a){let{numberFormatter:t,dataLabelsConfigContent:e}=a;return i=>xa({textSymbol:{...e,text:t.format(i)},format:"amChartsV5"})}function P4(a){let{series:t,externalDataLabelFormatter:e}=a;t.bullets.push(()=>{let i=fe(t.chart?.uid??Number.NaN,"config")?.series?.[0]?.dataLabels??a.dataLabelsConfig,r=fa.new(t.root,{sprite:Kt.new(t.root,{text:"{value}",populateText:!0,centerY:ge,centerX:Hr,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:Xt(i?.content.color).color,fontSize:i?.content.font?.size,oversizedBehavior:"hide"})}),s=r.get("sprite");if(s){let n=s;F4({dataLabel:n,series:t,externalDataLabelFormatter:e}),Ak({...a,dataLabelsConfig:i,dataLabel:n,isHeatChart:!0,dataLabelFormatter:T4}),n.set("oversizedBehavior","hide"),n.set("maxWidth",void 0),n.set("maxHeight",void 0)}return r})}function D4(a){let{series:t,dataLabelsConfig:e}=a,i=e&&e?.visible!==!1;t.bullets.hasIndex(0)&&jw(t,0),i&&P4(a)}var Ts={nameField:"name",fillField:"fill",strokeField:"stroke",fillOpacityField:"fillOpacity",strokeOpacityField:"strokeOpacity"};function fk(a,t){let e=zf(a);a.columns.template.set("tooltip",e);let i=t!==void 0?"tooltipHTML":"tooltipText";a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove(i),a.columns.template.adapters.add(i,(r,s)=>Gf({element:s,series:a,isHTML:t!==void 0}))}function mk(a){let{axesConfig:t,currentSeries:e,tooltipValueFormat:i}=a,{root:r,chart:s}=e;if(s){let n=t?.[1]?.valueFormat,o=t?.[0].valueFormat,l=fe(s.uid,"formatLocale");if(n?.type===V.NumberAxisFormat){let h=Kn({root:r,type:n.type,formatLocale:l,intlOptions:n.intlOptions});Gr(e.uid,{tooltipValueYNumberFormatCallback:u=>h.format(u,i?.intlOptions??n.intlOptions)})}if(o?.type===V.NumberAxisFormat){let h=Kn({root:r,type:o.type,formatLocale:l,intlOptions:o.intlOptions});Gr(e.uid,{tooltipValueXNumberFormatCallback:u=>h.format(u,i?.intlOptions??o.intlOptions)})}}}function L4(a){let{axes:t,seriesConfig:e,series:i,fieldList:r,utilsStrings:s}=a,{dataTooltipVisible:n}=e,o,l=fe(i.chart?.uid??0,"rtl")??!1,h=Ra(l);return n===!1?o=(u,c,d)=>"":o=(u,c,d)=>{let A=Or(r,e.x),p=yA(A,t?.[0].title?.content?.text),f=yA(s?.statistics.count??"",t?.[1]?.title?.content?.text??""),m=bi(i.uid,"tooltipValueXNumberFormatCallback"),g=bi(i.uid,"tooltipValueYNumberFormatCallback"),y=m?m(c):c,x=m?m(d):d,w=g?g(u):u;return`[bold]${p}${h} [/]${y} - ${x}
46
+ </tr>`,n}exportXLSX(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("xlsx")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getXLSX(t))})}getXLSX(t){return Xe(this,void 0,void 0,function*(){let e=this._getFormatOptions("xlsx",t),i=yield this.getXLSXLib(),r={bookType:"xlsx",bookSST:!1,type:"base64"},s=this._normalizeExcelSheetName(this.get("title",this._t("Data"))),n={SheetNames:[s],Sheets:{}},o=[],l=this.getData("html",e),h=this.getDataFields(l);if(e.pivot){let u=this.get("dataFieldsOrder",[]);Wl(h,(c,d)=>{let A=[];e.addColumnNames&&A.push(d);for(let p=l.length,f=0;f<p;f++){let m=l[f][c];A.push(this.convertToSpecialFormat(c,m,e,!0))}o.push(this.getXLSXRow(A,e,void 0,!0))},(c,d)=>{let A=u.indexOf(c),p=u.indexOf(d);return A>p?1:A<p?-1:0})}else{e.addColumnNames&&o.push(this.getXLSXRow(h,e,void 0,!0));for(let u=l.length,c=0;c<u;c++)o.push(this.getXLSXRow(l[c],e,h))}return n.Sheets[s]=i.utils.aoa_to_sheet(o),this.events.dispatch("workbookready",{type:"workbookready",format:"xlsx",options:e,workbook:n,workbookOptions:r,xlsx:i,target:this}),i.write(n,r)})}_normalizeExcelSheetName(t){return t=t.replace(/([:\\\/?*\[\]]+)/g," "),t.length>30?t.substr(0,30)+"...":t}getXLSXRow(t,e,i,r=!1){let s=[];i||(i=t);let n=this.get("dataFieldsOrder",[]);return Wl(i,(o,l)=>{let h=this.convertEmptyValue(o,t[o],e),u=r?h:this.convertToSpecialFormat(o,h,e,!0);s.push(u)},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0}),s}_xlsx(){return Xe(this,void 0,void 0,function*(){return yield import("./FFS73X36.js")})}getXLSXLib(){return this._xlsx()}exportPDF(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(t,!0))})}exportPDFData(t){return Xe(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(t,!1,!0))})}getPDF(t,e=!0,i=!1){return Xe(this,void 0,void 0,function*(){let r=this._getFormatOptions("pdf",t),s=this._getFormatOptions("pdfdata",t),n=r.pageOrientation||"portrait",o,l={width:0,height:0};if(e){let g=r.imageFormat||"png",y=this._getFormatOptions(g,r),x=yield this.getCanvas(y);l.width=x.clientWidth,l.height=x.clientHeight,o=x.toDataURL(this.getContentType(g),r.quality||1),this.disposeCanvas(x)}let h=yield this.getPdfmake(),u=[30,30,30,30],c={pageSize:r.pageSize||"A4",pageOrientation:n,pageMargins:r.pageMargins||u,defaultStyle:{font:r.font?r.font.name:void 0},content:[]},d=this.get("title"),A=0;if(d&&(c.content.push({text:d,fontSize:r.fontSize||14,bold:!0,margin:[0,0,0,15]}),A+=50),r.addURL&&(c.content.push({text:this._t("Saved from")+": "+document.location.href,fontSize:r.fontSize,margin:[0,0,0,15]}),A+=50),e&&o){let g=this.getPageSizeFit(c.pageSize,c.pageMargins,A,n);l.width>g[0]||l.height>g[1]?c.content.push({image:o,alignment:r.align||"left",fit:g}):c.content.push({image:o,alignment:r.align||"left"})}(i||r.includeData)&&this.hasData()&&c.content.push({table:yield this.getPDFData(s),fontSize:r.fontSize||14});let p=null,f=null;function m(g){let y={};y.normal=g.normal.path,f[g.normal.path]=g.normal.bytes,g.bold?(y.bold=g.bold.path,f[g.bold.path]=g.bold.bytes):y.bold=g.normal.path,g.italics?(y.italics=g.italics.path,f[g.italics.path]=g.italics.bytes):y.italics=g.normal.path,g.bolditalics?(y.bolditalics=g.bolditalics.path,f[g.bolditalics.path]=g.bolditalics.bytes):y.bolditalics=g.normal.path,p[g.name]=y}return r.font&&(p={},f={},m(r.font),r.extraFonts&&J(r.extraFonts,m),h.addFonts(p),h.addVirtualFileSystem(f)),this.events.dispatch("pdfdocready",{type:"pdfdocready",format:"pdf",options:r,doc:c,target:this}),yield h.createPdf(c,{}).getBase64()})}getPDFData(t){return Xe(this,void 0,void 0,function*(){let e=this._getFormatOptions("pdfdata",t),i={body:[]},r=this.getData("html",e),s=this.getDataFields(r);if(e.pivot){let n=this.get("dataFieldsOrder",[]);Wl(s,(o,l)=>{let h=[];e.addColumnNames&&h.push(l);for(let u=r.length,c=0;c<u;c++){let d=r[c][o];h.push(this.convertToSpecialFormat(o,d,e,!0))}i.body.push(this.getPDFDataRow(h,e,void 0,!0))},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0})}else{e.addColumnNames&&(i.body.push(this.getPDFDataRow(s,e,void 0,!0)),i.headerRows=1);for(let n=r.length,o=0;o<n;o++)i.body.push(this.getPDFDataRow(r[o],e,s))}return i})}getPDFDataRow(t,e,i,r=!1){let s=[];i||(i=t);let n=this.get("dataFieldsOrder",[]);return Wl(i,(o,l)=>{let h=this.convertEmptyValue(o,t[o],e),u=r?h:this.convertToSpecialFormat(o,h,e);u=""+u,s.push(u)},(o,l)=>{let h=n.indexOf(o),u=n.indexOf(l);return h>u?1:h<u?-1:0}),s}getPdfmake(){return jC===void 0&&(jC=_N()),jC}getPageSizeFit(t,e,i=0,r="portrait"){let s=[0,0,0,0];ie(e)?s=[e,e,e,e]:e.length==2?s=[e[0],e[1],e[0],e[1]]:e.length==4&&(s=e);let o={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}[t];return r=="landscape"&&o.reverse(),o[0]-=s[0]+s[2],o[1]-=s[1]+s[3]+i,o}hasData(){let t=this.get("dataSource");return!!(Fy(t)&&t.length)}getData(t,e,i=!1){let r=this._getFormatOptions(t,e),s=this.get("dataSource",[]),n=s,o=this.get("dataFields");o&&Fy(s)&&(n=[],J(s,h=>{if(Un(h)){let u={};Ot(o,(c,d)=>{o[c]!=null&&(u[i?d:c]=this.convertToSpecialFormat(c,h[c],r))}),n.push(u)}}));let l={type:"dataprocessed",format:t,options:r,data:n,target:this};return this.events.dispatch("dataprocessed",l),l.data}getDataFields(t){let e=this.get("dataFields");return e||(e={},Fy(t)&&t.length&&J(t,i=>{Ot(i,(r,s)=>{e[r]==null&&(e[r]=r)})})),e}convertEmptyValue(t,e,i){return e??i.emptyAs}convertToSpecialFormat(t,e,i,r){if(typeof e=="number")if(this.isDateField(t))e=new Date(e);else{if(this.isNumericField(t)&&this.get("numberFormat"))return this._root.numberFormatter.format(e,this.get("numberFormat"));if(this.isDurationField(t))return this._root.durationFormatter.format(e,this.get("durationFormat"),this.get("durationUnit"))}return e instanceof Date&&(i.useTimestamps?e=e.getTime():i.useLocale?r||(e=e.toLocaleString()):e=this._root.dateFormatter.format(e,this.get("dateFormat"))),e}isDateField(t){return this.get("dateFields").indexOf(t)!==-1}isNumericField(t){return this.get("numericFields").indexOf(t)!==-1}isDurationField(t){return this.get("durationFields").indexOf(t)!==-1}getContentType(t){let e="";switch(t){case"png":e="image/"+t;break;case"jpg":e="image/jpeg";break;case"csv":e="text/csv";break;case"json":e="application/json";break;case"html":e="text/html";break;case"pdf":case"pdfdata":e="application/pdf";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;default:e="application/octet-stream"}return e}getDisposableCanvas(){let t=document.createElement("canvas");return t.style.position="fixed",t.style.top="-10000px",this._root.dom.appendChild(t),t}disposeCanvas(t){this._root.dom.removeChild(t)}findBackgroundColor(t){let e=1,i=getComputedStyle(t,"background-color").getPropertyValue("background-color");if((i.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||i=="transparent")&&(e=0),e==0){let r=t.parentElement;return r?this.findBackgroundColor(r):ot.fromHex(16777215)}else return ot.fromCSS(i)}streamFile(t,e,i=!1){if(this.blobDownloadSupport()){let r=document.createElement("a");r.download=e,document.body.appendChild(r);let s=t.split(";"),n=s.shift().replace(/data:/,"");if(t=decodeURIComponent(s.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(n)==-1)try{t=atob(t)}catch{return!1}else{i&&(t="\uFEFF"+t);let u=new Blob([t],{type:n}),c=window.URL.createObjectURL(u);return r.href=c,r.download=e,r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(c)},100),!0}let o=new Array(t.length);for(let u=0;u<t.length;++u){let c=t.charCodeAt(u);o[u]=c}i&&(o=[239,187,191].concat(o));let l=new Blob([new Uint8Array(o)],{type:n}),h=window.URL.createObjectURL(l);r.href=h,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),setTimeout(()=>{window.URL.revokeObjectURL(h)},100)}else if(this.linkDownloadSupport()){let r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}else window.location.href=t;return!0}downloadSupport(){return this.linkDownloadSupport()}linkDownloadSupport(){return typeof document.createElement("a").download<"u"}blobDownloadSupport(){return window.Blob!=null}initiatePrint(t,e,i){let r=this._getFormatOptions("print",e);r.printMethod=="css"?this._printViaCSS(t,r,i):this._printViaIframe(t,r,i)}_printViaCSS(t,e,i){let s=this._getFormatOptions("print",e).delay||500,n=document.documentElement.scrollTop||document.body.scrollTop,o=new pf(L_(this._root.dom),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"},this._root.nonce),l=new pf(L_(this._root.dom),"body",{padding:"0",margin:"0"},this._root.nonce),h;i&&document&&document.title&&(h=document.title,document.title=i);let u=new Image;u.src=t,u.style.maxWidth="100%",u.style.display="block",u.style.position="relative",u.style.visibility="visible",u.style.opacity="1",u.style.clipPath="none",document.body.appendChild(u),this.setTimeout(()=>{window.print()},50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(u),o.dispose(),l.dispose(),h&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=n},s||500)}_printViaIframe(t,e,i){let s=this._getFormatOptions("print",e).delay||500,n=document.createElement("iframe");n.style.visibility="hidden",document.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close();let o=new Image;o.src=t,o.style.maxWidth="100%",o.style.height="auto",i&&(n.contentWindow.document.title=i),n.contentWindow.document.body.appendChild(o),n.load=function(){n.contentWindow.document.body.appendChild(o)},this.setTimeout(()=>{try{n.contentWindow.document.execCommand("print",!1,null)||n.contentWindow.print()}catch{n.contentWindow.print()}},s||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(n)},s+50||100)}supportedFormats(){let t=[],e=this.hasData(),i=this.downloadSupport();return J(["png","jpg","canvas","pdf","xlsx","csv","json","html","pdfdata","print"],r=>{this._getFormatOptions(r).disabled!==!0&&(["xlsx","csv","json","html","pdfdata"].indexOf(r)==-1||e&&i)&&t.push(r)}),t}supportedExportTypes(){let t=["image","print"];return this.downloadSupport()&&this.hasData()&&t.push("data"),t}};hu.className="Exporting";hu.classNames=pi.classNames.concat([hu.className]);var bv=new Map;function Gn(a){a!==void 0&&bv.delete(a)}function Hc(a,t){let e=bv.get(a)??{};bv.set(a,{...e,...t})}function jc(a,t){return bv.get(a)?.[t]}function BN(a,t){return jc(a,t)}function SN(a,t){Hc(a,t)}function FN(a,t){return jc(a,t)}function TN(a,t){Hc(a,t)}function ye(a,t){return jc(a,t)}function ai(a,t){Hc(a,t)}function sa(a,t){return jc(a,t)}function Zn(a,t){Hc(a,t)}function Ns(a,t){return jc(a,t)}function Ds(a,t){Hc(a,t)}function PN(a,t){return jc(a,t)}function DN(a,t){Hc(a,t)}function gs(a,t){return jc(a,t)}function fu(a,t){Hc(a,t)}function Ui(a,t){t===!1&&!a.isHiding?(a.visible=!1,a.hide()):a.isShowing||(a.visible=!0,a.show())}function LN(a,t){for(let e=0;e<t.length;e+=1){let i=t[e][0],r=t[e][1],s=a.length;i>=0&&i<s&&r>=0&&r<s&&a.swap(t[e][0],t[e][1])}}function RI(a,t){let e;if(a!==void 0&&"rgb"in a&&a.rgb!==void 0){let i=a.rgb;if(i!==void 0){let{r,g:s,b:n}=i;e=[r,s,n,255]}}return e}function Nc(a){let t=a??[0,0,0,255];return new xt({a:t[3]/255,b:t[2],g:t[1],r:t[0]})}function zr(a){return a.bullets.values.find(t=>PN(t.uid,"isBulletMarker"))}function qn(a){return a!=null&&!a.isDisposed()}function Of(a){return(a.isShowing||a.visible)&&!a.isHidden&&!a.isHiding&&!a.disabled&&!a.__disabled}function UI(a,t){return a.pixelX<0||a.pixelX>t?.plotContainer?.measuredWidth||a.pixelY<0||a.pixelY>t?.plotContainer?.measuredHeight}function IN(a){let t;return a.baseSprite instanceof Vt||a.baseSprite instanceof pr?t=a.baseSprite:(a instanceof Eh||a instanceof Kd)&&(t=a.axis.chart),t}function kN(a){return RI(a.background.fill)}var re={...pt};function $N(a){let{fill:t,rotation:e,isLinePattern:i,chartBackgroundColor:r}=a,s;return i!==!1?(s=new vc,s.width=re.patternLineProperties.width??Number.NaN,s.height=re.patternLineProperties.height??Number.NaN,s.strokeWidth=re.patternLineProperties.strokeWidth??Number.NaN,s.stroke=t,s.rotation=e??Number.NaN):(s=new bc,s.rectWidth=re.patternRectProperties.rectWidth??Number.NaN,s.rectHeight=re.patternRectProperties.rectHeight??Number.NaN,s.width=re.patternRectProperties.width??Number.NaN,s.height=re.patternRectProperties.height??Number.NaN,s.fillOpacity=re.patternRectProperties.fillOpacity??Number.NaN,s.strokeWidth=re.patternRectProperties.strokeWidth??Number.NaN,s.fill=Nc(r),s.stroke=t,s.rotation=e??Number.NaN),s}function HL(a){let t=Number.NaN;if(typeof a=="number")t=a;else if(a.includes("%")){let e=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(e)&&(t=he(e))}return t}function ON(a){let{fill:t,style:e,chartBackgroundColor:i}=a,r,s,n=!0;switch(e){case bs.Horizontal:{s=0;break}case bs.Vertical:{s=90;break}case bs.ForwardDiagonal:{s=45;break}case bs.BackwardDiagonal:{s=135;break}case bs.Cross:{s=0,n=!1;break}case bs.DiagonalCross:{s=135,n=!1;break}case bs.Solid:}return s!==void 0&&(r=$N({fill:t,rotation:s,isLinePattern:n,chartBackgroundColor:i})),r}function vn(a,t){let e;t!==void 0&&(e=Nc(t));let i=e??new xt({r:0,g:0,b:0,a:0});if(a!=null){let[r,s,n,o]=a;i=new xt({r,g:s,b:n,a:o/255})}return i}function VI(a,t=0){return(a??t)%360}function EN(a,t){return t!==!0||a?.includes("Dot")===!0?"round":"square"}function NI(a,t){let e="none";switch(a??t){case"justify":case"center":e="center";break;case"left":e="left";break;case"right":e="right";break}return e}function yw(a,t){let e="middle";switch(a??t){case"right":e="left";break;case"left":e="right";break}return e}function MN(a,t){let e="none";switch(a??t){case"baseline":case"middle":e="middle";break;case"top":e="top";break;case"bottom":e="bottom";break}return e}function QI(a,t){let e="middle";switch(a??t){case"top":e="bottom";break;case"bottom":e="top";break;default:e="middle";break}return e}function RN(a,t){let e=a??hs.Solid,i=t??re.lineWidth,r={[hs.Solid]:"none",[hs.Dot]:[1,i],[hs.DashDotDot]:[4*i,i,1,i,1,i],[hs.Dash]:[4*i,3*i],[hs.DashDot]:[4*i,3*i,1,3*i],[hs.Null]:"none"};return(r[e]??r[hs.Null]).toString()}function HI(a,t){let e={stroke:vn(),strokeWidth:re.lineWidth,strokeDasharray:"",strokeLinecap:t!==!0?"round":"square",strokeOpacity:hd};return a!=null&&(e.stroke=vn(a.color),e.strokeOpacity=1,a.width!==void 0&&(e.strokeWidth=a.width),a.style!==void 0&&a.style!==hs.Null&&(e.strokeDasharray=RN(a.style,e.strokeWidth),e.strokeLinecap=EN(a.style,t))),e}function jI(a,t){let e=a,[i,r,s,n]=a?.color??t??re.color,o=[i,r,s,n];return e==null?e={type:Rt.SLS,color:o}:e.color===void 0&&(e.color=o),HI(e,!1)}function UN(a,t){let{color:e,outline:i,style:r}=a,s=vn(e);return{pattern:ON({fill:s,style:r,chartBackgroundColor:t}),fill:s,outline:jI(i,e)}}function VN(a){let{color:t,outline:e,xoffset:i,yoffset:r,style:s,size:n,angle:o}=a,l=s!==void 0?sx(s,n):"",h=VI(o);return{path:l,fill:vn(t),outline:jI(e,t),xOffset:i??0,yOffset:r??0,angle:h}}function vw(a){let{symbol:t,defaultToColorFromRamp:e,colorRampIndex:i,isChartFillSymbol:r=!1,chartBackgroundColor:s}=a,n;if(e===!0){let o=r?Vm:hd;if(t.color=t.color??gh({colorIndex:i,opacity:o}),fd(t)||np(t)){let{outline:l}=t;l!==void 0&&(l.color=l?.color??gh({colorIndex:i}),t.outline={...l})}}return Fx(t)?n=HI(t,!0):np(t)?(t.style??=re.lineSeries.marker.markerStyle,t.size??=re.lineSeries.marker.markerBigSize,n=VN(t)):fd(t)&&(n=UN(t,s)),n}function xv(a,t,e){let i=yw(a.horizontalAlignment,e?.horizontalCenter),r=NI(a.horizontalAlignment,e?.align),s=QI(a.verticalAlignment,e?.verticalCenter),n=MN(a.verticalAlignment,e?.valign);return{fill:vn(a.color,re.color),fontFamily:a.font?.family??"Arial, Helvetica, sans-serif",fontSize:a.font?.size??re.generalFontSize,fontWeight:a.font?.weight??"400",textDecoration:a.font?.decoration??"none",align:r,valign:n,verticalCenter:s,horizontalCenter:i,text:xa({textSymbol:a,format:"amChartsV4"}),angle:VI(a.angle,e?.rotation),xOffset:a.xoffset??e?.dx??0,yOffset:a.yoffset??e?.dy??0,backgroundFill:vn(a.backgroundColor),borderFill:vn(a.borderLineColor),borderWidth:a.borderLineSize??1,haloSize:a.haloSize??-1,haloColor:vn(a.haloColor),rtl:a.rightToLeft??t,wrap:e?.wrap??!1,maxWidth:e?.maxWidth??Number.NaN}}function WI(a,t,e){e!==void 0&&a.tooltip!==void 0&&(a.tooltip.getFillFromObject=!1,a.tooltip.background.fill=t),a.fill=e??t,a.fillOpacity=Ne(a.fill.toString()).alpha===0?0:1}function fA(a,t){a.stroke=t.stroke,a.strokeOpacity=t.stroke.alpha===0?0:1,a.strokeDasharray=t.strokeDasharray,a.strokeLinecap=t.strokeLinecap,a.strokeWidth=t.strokeWidth}function _v(a){let{element:t,markerSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return e!==void 0?(n=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(t.path=n.path,t.rotation=n.angle,t.dx=n.xOffset,t.dy=n.yOffset,WI(t,n.fill),fA(t,n.outline)),Ui(t,i),t.disabled=i===!1):t.disabled=!0,n}function Vc(a){let{element:t,lineSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return e!==void 0?(n=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&fA(t,n),Ui(t,i)):Ui(t,!1),n}function Ef(a){let{element:t,fillSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:n}=a,o,l;if(e!==void 0){if(e.style===bs.Cross||e.style===bs.DiagonalCross){let h=IN(t);h!==void 0&&(l=kN(h))}o=vw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:n,chartBackgroundColor:l}),o!==void 0&&(WI(t,o.fill,o.pattern),fA(t,o.outline)),t.disabled=i===!1}else t.disabled=!0;return o}function du(a){let{element:t,seriesIndex:e,colorMatch:i,seriesSymbol:r,isChartFillSymbol:s,rendererSymbol:n,seriesConfig:o}=a,l,h;i===!0&&n&&(l=fx({rendererSymbol:n,seriesSymbol:r,colorIndex:e}));let u={element:t,defaultToColorFromRamp:!0,colorRampIndex:e,seriesConfig:o},c=l??{...r};switch(r.type){case Rt.SLS:h=Vc({...u,lineSymbol:c});break;case Rt.SFS:h=Ef({...u,fillSymbol:c,isChartFillSymbol:s});break;case Rt.SMS:h=_v({...u,markerSymbol:c});break}return{symbolWithColorInfo:c,stylingInfo:h}}function jL(a,t){if(t!==void 0){let e=a.properties,{elementColor:i,elementOutlineColor:r,elementOutlineWidth:s,rotation:n,transformation:o}=t,{opacity:l,scale:h}=o??{};i!==void 0&&(e.fill=Nc(i),e.fillOpacity=Ne(e.fill.toString()).alpha===0?0:1),r!==void 0&&(e.stroke=Nc(r)),s!==void 0&&(e.strokeWidth=s),n!==void 0&&(e.rotation=n),h!==void 0&&(e.scale=h),l!==void 0&&(e.fillOpacity=(e.fillOpacity??1)*l,e.strokeOpacity=(e.strokeOpacity??1)*l)}}function NN(a,t,e){let i=new Set(Array.from(t)),r=a.findIndex(s=>!i.has(ZC(s)));return r!==-1?r:e}function ZC(a){return`${a[0]},${a[1]},${a[2]}`}function QN(a){let{chartConfig:t,queryObject:e,popupTemplateFieldInfosEnabled:i,labelUpdateNeeded:r,utilsStrings:s}=a,{series:n}=t,o=n[0],{x:l}=o,h=!BF({chartConfig:t}),u=It([o]),c=u===ke.PieFromFields,d=$s(e),A=xh(d).idField,p=_a(e,i);return{x:l,isNonAggregatedChart:h,objectIdField:A,isPieFromFields:c,seriesConfig:o,fieldList:p,labelUpdateNeeded:r,chartSubType:u,colorMatch:Fl(t),utilsStrings:s}}function HN(a){let{dataContext:t,seriesConfig:e,existingSlicesColors:i,isGroupOfSlices:r,sliceFromConfig:s,dataIndex:n,colorMatch:o,chartSubType:l}=a,h=r?{...pt.pieChart.sliceGrouping.fillSymbol,...e.sliceGrouping?.fillSymbol}:Fr(s?.fillSymbol??e.fillSymbol),u=nn({dataItem:t,seriesConfig:e,chartSubType:l,colorMatch:o}),c=n;h?.color||(c=NN(lF,i,n));let d={dataItem:{dataContext:t}},{symbolWithColorInfo:A}=du({element:d,seriesConfig:e,y:e.y,seriesSymbol:h??Xm(),seriesIndex:c,rendererSymbol:u,colorMatch:o,isChartFillSymbol:!0});return A}function WL(a,t){let{x:e,isNonAggregatedChart:i,objectIdField:r,isPieFromFields:s,seriesConfig:n,fieldList:o,labelUpdateNeeded:l,colorMatch:h,chartSubType:u,utilsStrings:c}=a,d=[],A,p,f=new Set;return t?.forEach((m,g)=>{let y=zN({dataContext:m,x:e,isNonAggregatedChart:i,dataIndex:g,objectIdField:r,isPieFromFields:s});m[pt.pieChart.technicalFieldSliceId]=y;let x=qC(n.slices,y);x?.fillSymbol?.color!==void 0&&f.add(ZC(x.fillSymbol.color))}),t?.forEach((m,g)=>{let y=m[pt.pieChart.technicalFieldSliceId],x=qC(n.slices,y),w=ih(m),S=HN({dataContext:m,seriesConfig:n,existingSlicesColors:f,isGroupOfSlices:w,sliceFromConfig:x,dataIndex:g,colorMatch:h,chartSubType:u});S.color&&f.add(ZC(S.color));let F=GN({dataContext:m,sliceFromConfig:x,isGroupOfSlices:w,seriesConfig:n,fieldList:o,isPieFromFields:s,labelUpdateNeeded:l,colorMatch:h,utilsStrings:c}),T={sliceId:y,label:F,fillSymbol:S};T.originalLabel=x?.originalLabel??(m?.[pt.originalCategoryValue]!==void 0?m?.[pt.originalCategoryValue]:T.label),w?(p=m[pt.pieChart.technicalFieldGroupedSlices],n.sliceGrouping!==void 0&&(A={sliceId:n.sliceGrouping.sliceId,percentageThreshold:n.sliceGrouping.percentageThreshold,label:F,originalLabel:n.sliceGrouping.originalLabel??F,fillSymbol:S})):d.push(T)}),{slices:d,groupOfSlicesSymbols:A,groupOfSlices:p}}function XI(a){let{creation:t,dataInfo:e,pieChartDataActuallyChanged:i,chartConfig:r,previousConfig:s,queryObject:n,popupTemplateFieldInfosEnabled:o,utilsStrings:l}=a,h;if(r.series[0].type===V.PieSeries){let u=Pn(e.data),c=hx({oldConfig:s,newConfig:r}),d=lx(s,r),A=qm(s,r),p=QN({chartConfig:r,queryObject:n,popupTemplateFieldInfosEnabled:o,labelUpdateNeeded:t||i||c||A||d,utilsStrings:l}),{slices:f,groupOfSlicesSymbols:m,groupOfSlices:g}=WL(p,u),{slices:y}=WL(p,g??[]);h={slices:f,groupedSlices:y,groupOfSlices:m}}return h}async function jN(a){let{creation:t,dataInfo:e,dataInfo:{data:i},pieChartDataActuallyChanged:r,chartConfig:s,previousConfig:n,pieSlicesSymbols:o,queryObject:l,options:h,utilsStrings:u}=a,{slices:c}=o??{},{chartWillRender:d}=h??{},A=ze(s.series),p=!1,f=s,m=Fr(o),g,y;if(d&&(A===V.PieSeries||A===V.GaugeSeries)){p=!0,f=Fr(s);let x=cg({data:i,seriesConfig:s.series});f=await d({chartConfig:f,data:x,slices:c}),!cs(l)&&A===V.PieSeries&&i&&"dataItems"in i&&({colorMatchApplied:g,rendererFieldNames:y}=await Cx({data:i.dataItems,queryObject:l,chartConfig:f,allowColorMatch:px({chartConfig:f,queryObject:l})}),m=XI({creation:t,dataInfo:e,chartConfig:f,previousConfig:n,queryObject:l,pieChartDataActuallyChanged:r,popupTemplateFieldInfosEnabled:h?.popupTemplateFieldInfosEnabled,utilsStrings:u}))}return{changesApplied:p,alteredConfig:f,alteredPieSlicesSymbols:m,colorMatchApplied:g,rendererFieldNames:y}}function ih(a){return a?.[sn.defaultGroupOfSlicesId]===!0}function WN(a){let{dataContext:t,dataIndex:e,objectIdField:i}=a;return`${sn.sliceIdPrefix}-${t[i??""]?.toString()??e}`}function XN(a){let{chartConfig:t,chartData:e,fieldList:i}=a,r=It(t.series)===ke.PieFromFields;if(t.orderOptions?.data!==void 0||r){lg({arrayToSort:e,chartConfig:t,fieldList:i});let{slices:s}=t.series[0];s!==void 0&&s.sort((n,o)=>{let l=e.findIndex(u=>u[pt.pieChart.technicalFieldSliceId]===n.sliceId),h=e.findIndex(u=>u[pt.pieChart.technicalFieldSliceId]===o.sliceId);return l-h})}}function qC(a,t){let e;return a!==void 0&&t!==void 0&&(e=a.find(i=>i.sliceId===t)),e}function zN(a){let{dataContext:t,isNonAggregatedChart:e,x:i,dataIndex:r,objectIdField:s,isPieFromFields:n}=a,o="";return n===!0?o=t[pt.originalCategoryValue]??t[ao]:e?o=WN({dataContext:t,dataIndex:r,objectIdField:s}):(o=t[pt.originalCategoryValue],o===void 0||o===""?o=sn.emptySliceId:o===null&&(o=sn.nullSliceId),o=o??t[i]),o===void 0&&(o=sn.undefinedSliceId),o.toString()}function GN(a){let{dataContext:t,sliceFromConfig:e,isGroupOfSlices:i,seriesConfig:r,fieldList:s,isPieFromFields:n,labelUpdateNeeded:o,colorMatch:l,utilsStrings:h}=a,{sliceGrouping:u}=r,{x:c}=r;n&&(c=ao);let d=t[c]??t[pt.originalCategoryValue],A=t[pt.originalCategoryValue]??d,p=d;return o&&(i?p=u?.label??u?.originalLabel?.toString()??h.pieChart.defaultSliceGroupingLabel:l&&t[pt.rendererSymbolField]?.label!==void 0?p=t[pt.rendererSymbolField].label:e!==void 0||s!==void 0?(e?.label&&e.label!==e?.sliceId&&(p=e?.label),p===A&&A!==void 0&&A!==null&&(p=Or(s,A))):e===void 0&&(p=A),p===pt.nullValue?p="null":p!=null&&(p=p.toString())),p}function bw(a,t){return a?.[0]?.sliceGrouping?.percentageThreshold!==t?.[0]?.sliceGrouping?.percentageThreshold}function Nf(a){let{groupOfSlicesDataContext:t,chartData:e}=a;return(t??e?.find(i=>i[sn.defaultGroupOfSlicesId]===!0))?.[pt.pieChart.technicalFieldGroupedSlices]}function xw(a){let{dataContext:t,pieSlicesSymbols:e,seriesConfig:i}=a,r=i.fillSymbol?{...i.fillSymbol}:Xm();if(ih(t))r={...pt.pieChart.sliceGrouping.fillSymbol,...e?.groupOfSlices?.fillSymbol};else{let s=t[pt.pieChart.technicalFieldSliceId],n=e?.slices?.find(o=>o.sliceId===s);r=Fr(n?.fillSymbol??i.fillSymbol??Xm())}return r}function YN(a){let{data:t,seriesConfig:e,utilsStrings:i}=a,r=e[0],s=t?.reduce((d,A)=>{let p=A[Ru]??A[r.y];return Number.isFinite(p)||(p=0),p+d},0),n=r?.sliceGrouping?.percentageThreshold??0,o=[],l,h=0,u=t?.find(d=>d[sn.defaultGroupOfSlicesId]===!0)?.[pt.pieChart.technicalFieldGroupedSlices]??[],c=[...t,...u].filter(d=>{let A=!0,p=d[Ru]??d[r.y];if(Number.isFinite(p)){let f=p/s*100;d[pt.pieChart.technicalFieldSlicePercent]=f,f<=n&&d[sn.defaultGroupOfSlicesId]!==!0&&(h+=p,o.push(d),A=!1)}else d[sn.defaultGroupOfSlicesId]!==!0&&(o.push(d),A=n===0||n===void 0);return d[sn.defaultGroupOfSlicesId]===!0&&(l=d,A=!1),A});if(n>0&&o.length>0){let d=h/s*100,A=It(e)===ke.PieFromFields,p={...l,[sn.defaultGroupOfSlicesId]:!0,[A?ao:r.x]:r.sliceGrouping?.label??i?.pieChart.defaultSliceGroupingLabel,[A?Ru:r.y]:h,[pt.pieChart.technicalFieldSlicePercent]:d,[pt.pieChart.technicalFieldGroupedSlices]:o};c.push(p)}return c}function XL(a){let{creation:t,previousConfig:e,newConfig:i,dataInfo:r,dataUpdateNeeded:s,utilsStrings:n}=a,o=!1;if(r.data&&"dataItems"in r.data&&(t||e&&dg(e.series))&&i&&dg(i.series)){let l=t||e&&dg(e.series)&&bw(e.series,i.series);(s||l)&&(r.data.dataItems=YN({data:r.data.dataItems,seriesConfig:i.series,utilsStrings:n}),lg({arrayToSort:r.data.dataItems,chartConfig:i}),o=!0)}return o}function KN(a,t){let e=a.reduce((i,r)=>{if(r[sn.defaultGroupOfSlicesId]===!0){let s=r[pt.pieChart.technicalFieldGroupedSlices];s!==void 0&&s.forEach(n=>{i.push(n)})}else i.push(r);return i},[]);return lg({arrayToSort:e,chartConfig:t}),e=cg({data:{dataItems:e},seriesConfig:t.series})?.dataItems??[],e}function zI(a,t){let e=a?.filter(i=>!ih(i));return!rn(e,t)}function ZN(a){let{dataContext:t,newLabel:e,x:i}=a;e===void 0?t[pt.originalCategoryValue]!==void 0&&(t[i]=t[pt.originalCategoryValue]):t[i]!==e&&(t[pt.originalCategoryValue]===void 0&&(t[pt.originalCategoryValue]=t[i]),t[i]=e)}function qN(a){let{data:t,newChartConfig:e,pieSlicesSymbols:i,fieldList:r}=a,s=e.series[0],n=It(e.series)===ke.PieFromFields?ao:s.x;t.forEach(o=>{let l=ih(o),h=o[pt.pieChart.technicalFieldSliceId],u=l?s.sliceGrouping?.label:qC(i?.slices,h)?.label;ZN({dataContext:o,x:n,newLabel:u})}),XN({chartConfig:e,chartData:t,fieldList:r})}var Hi={SelectXY:"selectXY",SelectX:"selectX",SelectY:"selectY",ZoomXY:"zoomXY",ZoomX:"zoomX",ZoomY:"zoomY",None:"none"},ji={Top:"top",Bottom:"bottom",Median:"median",Outliers:"outliers"};function fl(a){let{type:t,iLocale:e,formatLocale:i=Ad(document.documentElement)}=a,r;switch(t){case V.NumberAxisFormat:{r=new Rl,r.language.locale=e,r.intlLocales=i;break}case V.DateAxisFormat:{r=new hn,r.language!==void 0&&(r.language.locale=e),r.intlLocales=i;break}}return r}function JC(a){let{axis:t,valueFormat:e,chartType:i}=a,r=Ym({isXAxis:!0,chartType:i,valueFormat:e}),s=ro(e)&&t instanceof Ct,n=ba(e)&&t instanceof Qe&&!(t instanceof Ct),o=r&&t instanceof $t;return!s&&!n&&!o}function GI(a,t){let e=typeof t=="number"?`${t}`:t,i=Ns(a.uid,"numberFormatter");return i!==void 0&&(e=i(t)),zi(e)&&(e=re.htmlEmptyContent),Zr(e)}function JN(a){a.renderer.labels.template.html=re.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>GI(a,e?.dataItem?.value??t),0)}function YI(a){let{axis:t,defaultOutput:e,dataItem:i}=a,r=e,s=Ns(t.uid,"categoryFormatter"),n=Ns(t.uid,"numberFormatter");if((n!==void 0||s!==void 0)&&i instanceof Jo){let o=ye(t.chart.uid,"config"),l=It(o?.series),h=ye(t.chart.uid,"rendererFieldNames"),u=no({value:qA(l,o?.series?.[0]),dataContext:i.dataContext,useRendererLabel:Qu(o,h),config:o});if(typeof u=="number"&&n!==void 0)r=n(u);else if(s!==void 0){if([ke.BoxPlotMonoField,ke.BoxPlotMultiFields,ke.BoxPlotMonoFieldAndSplitBy,ke.BoxPlotMultiFieldsAndSplitBy,ke.BarAndLineFromFields].includes(l)&&typeof u=="string"){let d=ye(t.chart.uid,"fieldList");u=Or(d,u)}let c=oo(i.dataContext);c===void 0&&(c=u),r=s(u,c)}}return zi(r)&&(r=re.htmlEmptyContent),Zr(r)}function eQ(a){a.renderer.labels.template.html=re.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>YI({axis:a,defaultOutput:t,dataItem:e?.dataItem}),0)}function tQ(a){let{axis:t,defaultOutput:e,dataItem:i}=a,r=e,s=Ns(t.uid,"dateFormatter");return s!==void 0&&i instanceof Uh&&(r=s(i.value??e)),zi(r)&&(r=re.htmlEmptyContent),Zr(r)}function iQ(a){a.renderer.labels.template.adapter.add("htmlOutput",(t,e)=>tQ({axis:a,dataItem:e?.dataItem,defaultOutput:t}),0),a.renderer.labels.template.adapter.disableKey("htmlOutput")}function rQ(a){a.renderer.labels.template.adapter.add("htmlOutput",t=>{let e=t,i=Ns(a.uid,"fontStyleCallback");return i!==void 0&&(e=i(e)),Zr(e)},1)}function sQ(a){a instanceof Qe&&!(a instanceof Ct)?JN(a):a instanceof $t?eQ(a):a instanceof Ct&&iQ(a),rQ(a)}function aQ(a){let{axis:t,formatOptions:e,dateAxisFormatter:i,isTimeOnlyField:r,setTimeZone:s,outTimeZone:n}=a;if(Ds(t.uid,{dateFormatter:i}),i===void 0){t.renderer.labels.template.adapter.isEnabled("htmlOutput")&&(t.renderer.labels.template.adapter.disableKey("htmlOutput"),t.renderer.labels.each(u=>{u.element instanceof kp&&u.element.removeChildren()}));let o={...$o(e)};r&&(o={hour:r?"numeric":void 0,minute:r?"numeric":void 0,...o});let l=["year","month","day","hour","minute","second"],h=o.timeZone??n;s&&t.timezone!==h&&(t.setPropertyValue("timezone",h),t.chart.validateData()),delete o.timeZone;for(let u=0;u<l.length;u+=1){let c=l[u],d=u===0?c:l[u-1],A=e?.formatPerDateTimeUnit?.[c]??o,p=e?.formatPerDateTimeUnit?.[d];Iu(A)||(t.dateFormats.setKey(c,A),t.periodChangeDateFormats.setKey(c,p??A))}t.dateFormats.getKey("day")||t.dateFormats.setKey("day",re.dayDefaultFormat),t.periodChangeDateFormats.getKey("day")||t.periodChangeDateFormats.setKey("day",re.dayDefaultFormat),t.dateFormats.getKey("week")||t.dateFormats.setKey("week",t.dateFormats.getKey("day")??re.weekDefaultFormat),t.periodChangeDateFormats.getKey("week")||t.periodChangeDateFormats.setKey("week",t.periodChangeDateFormats.getKey("day")??re.weekDefaultFormat),t.invalidateLabels()}else t.renderer.labels.template.html=re.htmlEmptyContent,t.renderer.labels.template.adapter.enableKey("htmlOutput")}function nQ(a,t,e,i){let r=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:e});return r.numberFormat=a,s=>{let n=0;return s instanceof Date?s.toLocaleString(void 0,a):(n=typeof s!="string"?s??0:_x(s,r.intlLocales),i===!0&&a.style==="percent"&&(n/=100),r.format(n))}}function zL(a){let{axis:t,formatOptions:e,overridePercentMultiplication:i,valueAxisFormatter:r}=a,s=$o(e),n=ye(t.chart.uid,"formatLocale");Ds(t.uid,{numberFormatter:r??nQ(s,t.chart.language.locale,n,i)})}function oQ(a){let{axis:t,formatOptions:e,categoryAxisFormatter:i}=a,r=i!==void 0?i:Jm(e.characterLimit);Ds(t.uid,{categoryFormatter:r})}function lQ(a){let{axis:t,labelsTextSymbol:e,axisValueFormatter:i}=a,r=ye(t.chart.uid,"config")?.horizontalAxisLabelsBehavior;if(Ds(t.uid,{axisLabelsBehavior:r}),i!==void 0)Ds(t.uid,{fontStyleCallback:void 0});else if(Ns(t.uid,"fontStyleCallback")===void 0){let s=n=>{let o=Ns(t.uid,"axisLabelsBehavior");return xa({textSymbol:e,placeholderString:n,format:"html",axisLabelsBehavior:o,defaults:{maxWidth:t.renderer.labels.template.maxWidth}})};Ds(t.uid,{fontStyleCallback:s})}}function hQ(a){let{axis:t,isXAxis:e,formatOptions:i,labelsTextSymbol:r,overridePercentMultiplication:s,chartType:n,axisValueFormatter:o,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u,errorStrings:c}=a,d=Ym({isXAxis:e,chartType:n,valueFormat:i}),A=!1;!(t instanceof Ct)&&ba(i)?zL({axis:t,formatOptions:i,overridePercentMultiplication:s,valueAxisFormatter:o}):t instanceof Ct&&ro(i)?aQ({axis:t,formatOptions:i,dateAxisFormatter:o,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u}):t instanceof $t?ud(i)||d?(oQ({axis:t,formatOptions:i,categoryAxisFormatter:o}),Ds(t.uid,{numberFormatter:void 0})):ba(i)?(zL({axis:t,formatOptions:i,overridePercentMultiplication:s,valueAxisFormatter:o}),Ds(t.uid,{categoryFormatter:void 0})):A=!0:A=!0,A&&Gm("mismatchAxisAndValueFormat",c),lQ({axis:t,labelsTextSymbol:r,axisValueFormatter:o}),t.invalidateLabels()}function uQ(a){let t=a;return a>=1?t=10**(a.toFixed(0).length-1):a<1&&a>0&&(t=10**-Math.abs(Math.floor(Math.log10(a)))),t}function KI(a){let{minimumFromConfig:t,maximumFromConfig:e,isLogarithmic:i}=a,r=i===!0&&t!==null&&t!==void 0&&t<=0,s=!Number.isFinite(t)||!Number.isFinite(e);return r||s}var Wt={XAxisTitle:"XAxisTitle",YAxisTitle:"YAxisTitle",ChartTitle:"ChartTitle",ChartSubTitle:"ChartSubTitle",ChartFooter:"ChartFooter",GuideLabel:"GuideLabel",LegendTitle:"LegendTitle"},Ie={Ready:"ready",Hidden:"hidden",Shown:"shown",Hit:"hit",DoubleHit:"doublehit",Up:"up",SelectEnded:"selectended",Over:"over",Out:"out",SizeChanged:"sizechanged",VisibilityChanged:"visibilitychanged",PositionChanged:"positionchanged",Validated:"validated",DataItemsValidated:"dataitemsvalidated",Inited:"inited",ChildAdded:"childadded",DataRangeChanged:"datarangechanged",LayoutValidated:"layoutvalidated"};function ZI(a){let{actionMode:t,cursorRange:e,isRotated:i}=a,r=Hi.None;switch(e){case zm.MultiAxes:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=Hi.SelectXY:t===Ut.Zoom&&(r=Hi.ZoomXY);break;case zm.XAxis:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=i===!0?Hi.SelectY:Hi.SelectX:t===Ut.Zoom&&(r=i===!0?Hi.ZoomY:Hi.ZoomX);break;case zm.YAxis:t===Ut.MultiSelectionWithCtrlKey||t===Ut.MultiSelection?r=i===!0?Hi.SelectX:Hi.SelectY:t===Ut.Zoom&&(r=i===!0?Hi.ZoomX:Hi.ZoomY);break}return r}function cQ(a,t){let e=re.cursorCrosshair.style,i={type:Rt.SLS,style:t.style??e.style,color:t.color??e.color,width:t.width??e.width};Vc({element:a.cursor.lineX,lineSymbol:i}),Vc({element:a.cursor.lineY,lineSymbol:i})}function qI(a){if(!(a instanceof Ys)&&!(a instanceof pr)){a.cursor=new yc;let t="userAgentData"in navigator&&navigator.userAgentData&&typeof navigator.userAgentData=="object"&&"mobile"in navigator.userAgentData&&navigator.userAgentData.mobile===!0||/Mobi|Android/iu.test(navigator.userAgent);a.cursor.hideSeriesTooltipsOnSelection=!t}}function JI(a,t){if(!(a instanceof Ys)&&!(a instanceof pr)){let e=a,i=e.cursor??new yc;t?.style!==void 0&&cQ(e,t.style);let r=re.cursorCrosshair;i.lineX.disabled=r.verticalLineVisible?t?.verticalLineVisible===!1:t?.verticalLineVisible!==!0,i.lineY.disabled=r.horizontalLineVisible?t?.horizontalLineVisible===!1:t?.horizontalLineVisible!==!0,e.cursor=i}}function dQ(a){return!(a instanceof Ys)&&a.cursor===void 0&&qI(a),a.cursor}function ew(a,t){let e=a.renderer.labels.template;e.events.hasListenersByType(Ie.Hit)&&(e.cursorOverStyle=t),a.renderer.labels.each(i=>{i.cursorOverStyle=t})}function AQ(a){let{chart:t,chartType:e,showMean:i,enabled:r}=a,s=r?si.pointer:si.default;switch(e){case V.ComboLineAndBarSeries:case V.BarSeries:case V.PieSeries:t.series.each(n=>{(n instanceof Xi||n instanceof ws)&&(n.cursorOverStyle=s)});break;case V.BoxPlotSeries:t.series.each(n=>{let o=s;if(n instanceof Ti){let l=zr(n);l!==void 0&&(i&&sa(n.uid,"isBoxPlotOutliersSeries")&&(o=si.default),l.cursorOverStyle=o,l.clones.each(h=>{h.cursorOverStyle=o}))}else n.cursorOverStyle=i?si.default:s});break;case V.LineSeries:t.series.each(n=>{if(n instanceof Ti){let o=zr(n);o!==void 0&&(o.cursorOverStyle=s,o.clones.each(l=>{l.cursorOverStyle=s}))}});break}}function pQ(a){let{chart:t,actionMode:e,cursorRange:i}=a,r=ye(t.uid,"isRotated"),s=ye(t.uid,"config"),n=oa(s),o=ze(s?.series),l=o===V.LineSeries&&ba(s?.axes?.[0]?.valueFormat),h=o===V.LineSeries&&ud(s?.axes?.[0]?.valueFormat),u=o===V.LineSeries&&ro(s?.axes?.[0]?.valueFormat),c,d=!1,A=e??ye(t.uid,"actionMode")??re.actionMode;if(ye(t.uid,"filterBySelection")===!0)c=Hi.None,d=!1;else if(i!==void 0)c=ZI({actionMode:A,cursorRange:i,isRotated:r});else switch(A){case Ut.Zoom:l||u?c=Hi.ZoomXY:c=r===!0?Hi.ZoomY:Hi.ZoomX,d=!1;break;case Ut.MultiSelection:case Ut.MultiSelectionWithCtrlKey:h?c=r===!0?Hi.SelectY:Hi.SelectX:c=Hi.SelectXY,d=!0;break;case Ut.MonoSelection:c=Hi.None,d=!0;break;case Ut.None:c=Hi.None,d=!1;break}t instanceof Vt&&t.cursor!==void 0&&c!==void 0&&(t.cursor.behavior=c),AQ({chart:t,chartType:o,enabled:d,showMean:n})}function e1(a){let t="";return a instanceof Qr?t=a.dataFields?.categoryX??a.dataFields?.dateX??a.dataFields?.valueX??"":a instanceof ws&&(t=a.dataFields?.category??""),t}function t1(a){let t="";return a instanceof Qr?t=a.dataFields?.categoryY??a.dataFields?.dateY??a.dataFields?.valueY??"":a instanceof ws&&(t=a.dataFields?.value??""),t}function i1(a){return ye(a.chart.uid,"isRotated")===!0?t1(a):e1(a)}function xu(a){return ye(a.chart.uid,"isRotated")===!0?e1(a):t1(a)}function Dv(a,t=0){let e=ye(a.chart.uid,"config");return ze(e?.series,t)}function*fQ(a){let{filterList:t,queryObject:e,queryConfig:i,errorStrings:r}=a;for(let s=0;s<t.length;s+=1){let n={...i};n.where=ag([n.where,t[s]]),yield JF({queryObject:e,queryConfig:n,uniqueFeature:!0,errorStrings:r})}}async function r1(a){let{whereList:t,queryObject:e,queryFilter:i,queryConfig:r,errorStrings:s}=a,n=[];if(t.length>0){let o=mF().maxElementsPerSelectionQuery,l=[],h=Math.ceil(t.length/o);for(let c=0;c<h;c+=1){let d=c*o,A=(c+1)*o,p=t.slice(d===0?0:d-1,A),f=ag(p,"OR");f=ag([i,f]),l.push(f)}let u=fQ({filterList:l,queryObject:e,queryConfig:r,errorStrings:s});n=(await Promise.all(u)).flat(),n=Array.from(new Set(n))}return n}var cu={Outlier:"outlier",Box:"box",OutlierToOutlier:"outlier-outlier",OutlierToBox:"outlier-box",BoxToOutlier:"box-outlier",BoxToBox:"box-box"};function mQ(a,t){let e=a[pt.boxPlot.boxPlotOutlierId]===!0?cu.Outlier:cu.Box,i=typeof t=="number"?cu.Outlier:cu.Box;return`${e}-${i}`}function gQ(a){let{oneSelectedItem:t,dataContext:e,selectedOutlierKey:i}=a;return t[i]===e[i]}function yQ(a){let{elementMin:t,elementMax:e,selectedOutlierValue:i}=a,r;return typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(r=i>=t&&i<=e),r}function vQ(a){let{selectedMin:t,selectedMax:e,elementOutlierValue:i,oneSelectedItem:r,iqrField:s}=a,n;typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(n=i>=t&&i<=e);let o=s in r;return n!==!1&&o}function bQ(a){let{selectedMin:t,selectedMax:e,elementMin:i,oneSelectedItem:r,elementMax:s,iqrField:n}=a,o;typeof i=="number"&&typeof s=="number"&&typeof t=="number"&&typeof e=="number"&&(o=!(i>=e||s<=t));let l=n in r;return o!==!1&&l}function xQ(a){let{oneSelectedItem:t,dataContext:e,xAxisField:i}=a,r=e[pt.originalCategoryValue]??e[pt.boxPlot.boxPlotCategory]??e[i],s=t[pt.originalCategoryValue]??t[pt.boxPlot.boxPlotCategory]??t[i];return r===s}function _Q(a){let{chartSubType:t,yAxisField:e,splitBy:i,showOutliers:r}=a,s=t===ke.BoxPlotMultiFieldsAndCategory?e:void 0,n={y:s,splitBy:i},o=Zi({...n,key:Yt.Outlier}),l=Zi({...n,key:Yt.Max,showOutliers:r}),h=Zi({...n,key:Yt.Min,showOutliers:r}),u=Zi({...n,key:Yt.Max,showOutliers:!1}),c=Zi({...n,key:Yt.Min,showOutliers:!1}),d=Zi({...n,key:Yt.Max,showOutliers:!0}),A=Zi({...n,key:Yt.Min,showOutliers:!0}),p=Zi({splitBy:i,y:s,key:Yt.IQR});return{selectedOutlierKey:o,maxField:l,minField:h,selectedMaxFieldWoOutliers:u,selectedMinFieldWoOutliers:c,selectedMaxFieldWithOutliers:d,selectedMinFieldWithOutliers:A,iqrField:p}}function CQ(a){let{elementDataContext:t,layerOidField:e,xAxisField:i,splitBy:r,yAxisField:s,chartSubType:n,showOutliers:o}=a,l=t,h;if(l?.[pt.boxPlot.boxPlotMeanLineMarkerId]===!0){let u=Zi({splitBy:r,key:Yt.Average});h=c=>{let d=!i||!(i in c&&i in l)||c[i]===l[i],A=u in c&&u in l;return d&&A}}else i!==void 0&&s!==void 0&&(h=u=>{let c;if(e!==void 0&&e in u&&e in l)c=u[e]===l[e];else{let{selectedOutlierKey:d,maxField:A,minField:p,selectedMaxFieldWoOutliers:f,selectedMinFieldWoOutliers:m,selectedMaxFieldWithOutliers:g,selectedMinFieldWithOutliers:y,iqrField:x}=_Q({chartSubType:n,yAxisField:s,splitBy:r,showOutliers:o}),w=l[d],S=u[d],F=l[p],T=l[A],L=u[m]??u[y],O=u[f]??u[g],I=xQ({oneSelectedItem:u,dataContext:l,xAxisField:i});if(I)switch(mQ(u,w)){case cu.OutlierToOutlier:I=gQ({oneSelectedItem:u,dataContext:l,selectedOutlierKey:d});break;case cu.OutlierToBox:I=yQ({elementMin:F,elementMax:T,selectedOutlierValue:S});break;case cu.BoxToOutlier:I=vQ({selectedMin:L,selectedMax:O,elementOutlierValue:w,oneSelectedItem:u,iqrField:x});break;case cu.BoxToBox:I=bQ({selectedMin:L,selectedMax:O,elementMin:F,oneSelectedItem:u,elementMax:T,iqrField:x});break}c=I===!0}return c});return h}function _w(a){let{layerOidField:t,sliceDataContext:e,selectionDataContext:i,xAxisField:r}=a,s=!1;if(t!==void 0&&t in e&&t in i)s=i[t]?.toString()===e[t]?.toString();else{let n=e[pt.originalCategoryValue];n===void 0&&(n=e[r]),n===void 0&&(n=e[ao]);let o=i[pt.originalCategoryValue];o===void 0&&(o=i[r]),o===void 0&&(o=i[ao]),s=n!==void 0&&o!==void 0&&n===o}return s}function pv(a){let{dataContext:t,specificField:e,xOrY:i}=a,r=t[i==="x"?pt.originalCategoryValue:pt.originalYCategoryValue];return r===void 0&&e&&(r=t[e]),r===void 0&&(r=t[i==="x"?xr.xField:xr.yField]),r}function Lv(a){let{options:t,elementDataContext:e,selectionDataItems:i,layerOidField:r,xAxisField:s,yAxisField:n,chartType:o,splitBy:l,chartSubType:h}=a,u=!1,c;if(e!==void 0&&i!==void 0)switch(o){case V.HeatSeries:let d=e,A=pv({dataContext:d,specificField:s,xOrY:"x"}),p=pv({dataContext:d,specificField:n,xOrY:"y"});c=f=>{let m=pv({dataContext:f,specificField:s,xOrY:"x"}),g=pv({dataContext:f,specificField:n,xOrY:"y"});return A===m&&p===g};break;case V.RadarSeries:case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:if(s!==void 0&&n!==void 0){let f=e;c=m=>{let g,y=r;if(h===ke.BarAndLineSplitByNoAggregation){let x=vh({where:l,keepSurroundingQuotes:!1,escape:!1});y=`${r}_${x}`}if(r!==void 0&&r in m&&r in f)g=m[r]===f[r];else if(y!==void 0&&y in m&&y in f)g=m[y]===f[y];else if(pt.dateBinningRange in f&&typeof m[s]=="number"){let x=m[s],w=m[pt.dateBinningRange],S=Array.isArray(w)&&Number.isFinite(w[0])&&Number.isFinite(w[1]),[F,T]=S?w:[0,0],[L,O]=f[pt.dateBinningRange],I=f[pt.lastTemporalBin]===!0?x<=O:x<O;g=(S?F<O&&L<T:x>=L&&I)&&n in m&&Number.isFinite(m[n])}else{let x=S=>{let F=S[pt.originalCategoryValue];return F===void 0&&(F=S[s]),F=F===null?pt.nullValue:F,F},w=x(f);g=x(m)===w&&n in m}return g}}break;case V.BoxPlotSeries:c=CQ(a);break;case V.ScatterSeries:if(s!==void 0&&n!==void 0){let f=e;if(!wF({dataContext:f,chartLimits:t?.chartLimits}))c=m=>{let g;return r!==void 0&&r in f&&r in m?g=m[r]===f[r]:g=m[s]===f[s]&&m[n]===f[n],g};else{let{dataContextXMinField:m,dataContextXMaxField:g,dataContextYMinField:y,dataContextYMaxField:x}=pt.scatterplotAggregationFields,{[m]:w,[g]:S}=f,F=s!==n?f[y]:w,T=s!==n?f[x]:S,L=I=>{let U=I[s]??Number.NaN,P=w??Number.NaN,Q=S??Number.NaN;return w===S?U===P:(U??Number.NaN)>=P&&(U??Number.NaN)<Q},O=I=>{let U=I[n]??Number.NaN,P=F??Number.NaN,Q=T??Number.NaN;return F===T?U===P:U>=P&&U<Q};c=I=>L(I)&&O(I)}}break;case V.HistogramSeries:c=f=>{let m=!1,{minValue:g,maxValue:y}=e,{isLastBin:x}=e;if(s!==void 0&&s in f){let w=f[s];m=typeof w=="number"&&w>=g&&(x&&w<=y||!x&&w<y)}else if("minValue"in f&&"maxValue"in f){let{minValue:w,maxValue:S}=f;m=!(g>=S||y<=w)}return m};break;case V.PieSeries:s!==void 0&&(c=f=>{let m=e,g=ih(m),y=[m];return g&&y.push(...Nf({groupOfSlicesDataContext:m})??[]),y.some(x=>_w({sliceDataContext:x,selectionDataContext:f,layerOidField:r,xAxisField:s}))});break}return c!==void 0&&(u=i.some(c)),u}function th(a){let{isFeatureCollectionLayer:t,dataContext:e,yAxisField:i,yList:r,xAxisField:s,splitBy:n,chartType:o,chartSubType:l,showOutliers:h}=a,u={...e};if(e!==void 0){if(o===V.RadarSeries||o===V.BarSeries||o===V.LineSeries||o===V.ComboLineAndBarSeries||o===V.PieSeries){o!==V.PieSeries&&(t||l!==ke.BarAndLineNoAggregation&&l!==ke.BarAndLineSplitByNoAggregation)&&r.forEach(d=>{d!==i&&delete u[d]});let c=no({value:e[s],dataContext:e,keepNullValues:!0});u[s]=c,!zi(n)&&!CF(n)&&(u[Tn(n)]=vh({where:n,escape:!1}))}else if(o===V.BoxPlotSeries){u={[s]:e[s]},[Ou.uniqueIdsName,pt.boxPlot.boxPlotMeanLineMarkerId,pt.boxPlot.boxPlotOutlierId,pt.originalCategoryValue,pt.originalYCategoryValue].forEach(d=>{e[d]&&(u[d]=e[d])});let c=l===ke.BoxPlotMultiFieldsAndCategory?i:void 0;Object.values(Yt).forEach(d=>{let A=Zi({key:d,y:c,splitBy:n,showOutliers:h});e[A]!==void 0&&(u[A]=e[A])})}}return u}function s1(a){let{data:t,colorMatch:e,chartSubType:i,rendererType:r}=a;return t!==void 0&&e&&r!==void 0&&(i===ke.BoxPlotMultiFields&&(r===Um.UniqueValue||r===Um.PieChart)||i===ke.BoxPlotMonoFieldAndCategory&&r===Um.UniqueValue)&&t.some(s=>Object.keys(s).some(n=>n.includes(pt.rendererSymbolField)))}function wQ(a){return!!/^data:[a-z]+\/[a-z+.-]+;base64/u.test(a)}function a1(a,t=512){if(!wQ(a))throw new Error("Cannot convert a string that is not a data uri to a blob");let e=a.split(",")[0].split(":")[1].split(";")[0],i=atob(a.split(",")[1]),r=[];for(let s=0;s<i.length;s+=t){let n=i.slice(s,s+t),o=new Array(n.length);for(let h=0;h<n.length;h++)o[h]=n.charCodeAt(h);let l=new Uint8Array(o);r.push(l)}return new Blob(r,{type:e})}function Mf(a){let{value:t,valueFormat:e,iLocale:i,formatLocale:r}=a,s=t?.toString(),n=fl({type:e.type,iLocale:i,formatLocale:r});return typeof t=="number"&&e.type===V.NumberAxisFormat?s=n.format(t,$o(e)):(typeof t=="number"||t instanceof Date)&&e.type===V.DateAxisFormat&&(s=n.format(t,$o(e))),s}function bn(a){let{chart:t,config:e}=a,i=e;return e===void 0&&t!==void 0&&(i=ye(t.uid,"config")),us(i)}function BQ(a){a instanceof Vl&&a.series.each(t=>{Gn(t.uid),t instanceof Ti&&Gn(zr(t)?.uid),t.bullets.each(e=>{Gn(e.uid)}),t instanceof Xi&&t.columns.template.children.each(e=>{Gn(e.uid)})}),a instanceof Vt&&[a.xAxes.getIndex(0),a.xAxes.getIndex(1),a.yAxes.getIndex(0),a.yAxes.getIndex(1)].forEach(t=>{t!==void 0&&(Gn(t.uid??""),t.axisRanges.each(e=>{Gn(e.label?.uid)}))}),a instanceof Ys&&a.radarContainer.children.each(t=>{Gn(t.uid)}),a instanceof pr&&a.series.getIndex(0)?.slices.each(t=>{Gn(t.uid)}),"cursor"in a&&a.cursor instanceof sA&&Gn(a.cursor?.uid),"legend"in a&&a.legend!==void 0&&(Gn(a.legend.uid),Gn(a.legend.valueLabels?.template?.uid)),Gn(a.uid)}function fv(a){return typeof a=="number"?a:a.value}async function SQ(a){let{chart:t,exportOptions:e}=a,{format:i,quality:r=1,...s}=e,n=r<0||r>1?1:r,o=await t.exporting.getImage(i,{quality:n,...s}),l=a1(o),h=i==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${i}`,{type:h})}function Iv(a,t){t!==void 0&&(t.marginBottom!==void 0&&(a.marginBottom=t.marginBottom),t.marginTop!==void 0&&(a.marginTop=t.marginTop),t.marginRight!==void 0&&(a.marginRight=t.marginRight),t.marginLeft!==void 0&&(a.marginLeft=t.marginLeft),t.verticalCenter!==void 0&&(a.verticalCenter=QI(t.verticalCenter)),t.horizontalCenter!==void 0&&(a.horizontalCenter=yw(t.horizontalCenter)),t.strokeWidth!==void 0&&(a.strokeWidth=t.strokeWidth),t.wrap!==void 0&&(a.wrap=t.wrap),t.truncate!==void 0&&(a.truncate=t.truncate),t.maxWidth!==void 0&&(a.maxWidth=t.maxWidth),t.applyOnClones!==void 0&&(a.applyOnClones=t.applyOnClones,a.background.applyOnClones=t.applyOnClones))}function ml(a,t){let e=t?.createChild(Mi)??new Mi;return Iv(e,a),e}function FQ(a){let t=a.push(new zd);t.dx=1,t.dy=1,t.opacity=1}function TQ(a,t,e){if(e.alpha>0&&t>=0){a.length===0&&FQ(a);let i=a.getIndex(0);i.blur=t,i.color=e}else a.clear()}function PQ(a,t){let e=gs(a.uid,"isGuide"),i=t.visible===!1;return!i&&(e===!0||!(a instanceof Ko))&&t.content.text===""&&(i=!0),i}function GL(a){let{label:t,offset:e,offsetProperty:i}=a,r=99;if(t.adapter.remove(i,r),typeof e=="string"&&!Number.isFinite(Number(e))){let s=ip(e);s!==void 0&&(s/=100,t.adapter.add(i,()=>(t.parent?.[i==="dx"?"measuredWidth":"measuredHeight"]??0)*s,r))}else t[i]=e}function xn(a){let{label:t,labelConfig:e,defaults:i,skipSettingText:r}=a;if(e!==void 0){let s=xv(e.content,t.rtl,i);t.fill=s.fill,t.fontFamily=s.fontFamily,t.fontWeight=s.fontWeight,t.fontSize=s.fontSize,t.textDecoration=s.textDecoration,t.align=s.align,t.valign=s.valign,t.verticalCenter=s.verticalCenter,t.horizontalCenter=s.horizontalCenter,t.background.fill=s.backgroundFill,t.background.stroke=s.borderFill,t.background.strokeWidth=s.borderWidth,t.rotation=s.angle,GL({label:t,offset:s.xOffset,offsetProperty:"dx"}),GL({label:t,offset:s.yOffset,offsetProperty:"dy"}),t.rtl=s.rtl,t.wrap=s.wrap,t instanceof Ko||(t.maxWidth=s.maxWidth),r||(t.text=s.text),TQ(t.filters,s.haloSize,s.haloColor);let n=PQ(t,e);t.disabled=n,Ui(t,e.visible!==!1&&!n)}else t.disabled=!0}function n1(a,t){t!==void 0&&(a===V.BarSeries||a===V.LineSeries)&&t.adapter.add("dy",(e,i)=>{let r=i.dataItem,{chart:s}=r?.component??{};return s instanceof Vt&&(i.visible=!UI(i,s)),e??0})}function o1(a,t){t!==void 0&&(a===V.BarSeries&&t.adapter.add("dx",(e,i)=>{let r=e??0,s=i.dataItem,{chart:n}=s?.component??{};return(n!==void 0?ye(n.uid,"isRotated"):!1)===!0&&(s.valueX??s.valueY)<0&&(r-=i.measuredWidth+re.dataLabelNegative.paddingRight),r}),(a===V.BarSeries||a===V.LineSeries)&&t.adapter.add("dy",(e,i)=>{let r=e??0,s=i.dataItem,{chart:n}=s?.component??{};return(n!==void 0?ye(n.uid,"isRotated"):!1)!==!0&&(s.valueX??s.valueY)<0&&(r+=i.measuredHeight+re.dataLabelNegative.paddingTop),r}))}function tw(a){a.bulletsContainer.invalidateLabels(),a instanceof Xi&&a.columns?.template.invalidateLabels()}function DQ(a){let{dataValue:t,series:e,seriesType:i,stackedType:r,axisMin:s}=a,n=t===void 0;return t!==void 0&&(s!==void 0&&t<s?n=!0:e instanceof Xi&&(i===V.BarSeries||i===V.ComboLineAndBarSeries)&&(n=t===0&&r!==void 0&&r!==$i.Side)),n}function iw(a,t){let e,i=r=>gs(r.uid,"isDataLabel")??!1;return t==="bullets"?e=a.bullets.values.find(i):a instanceof Xi&&(e=a.columns.template.children.values.find(i)),e}function rw(a,t){a.adapter.add("htmlOutput",(e,i)=>{let r=e,{dataItem:s}=i;if(Of(a)&&(t instanceof Xi&&s instanceof Bs||t instanceof Ti&&s instanceof Wa)){let n=sa(t.uid,t instanceof Xi?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(n!==void 0){let o=ye(t.chart.uid,"isRotated"),l=ye(t.chart.uid,"config"),h=ks(l),u=o===!0?s.valueX:s.valueY,c=o===!0?s.values?.valueX?.totalPercent:s.values?.valueY?.totalPercent,d=o===!0?(s.component?.xAxis).min:(s.component?.yAxis).min;r=DQ({dataValue:u,series:t,seriesType:t instanceof Xi?V.BarSeries:V.LineSeries,stackedType:h,axisMin:d})?"":n(u,c)}}return Zr(r)},0)}function l1(a){let{numberFormatter:t,dataLabelsConfigContent:e,stackedType:i}=a;return(r,s)=>{let n=i===$i.Stacked100&&s!==void 0?s:r;return t.numberFormat.style==="percent"&&(n/=100),xa({textSymbol:{...e,text:t.format(n)},format:"html"})}}function h1(a){a.tabindex=-1}function u1(a){let{series:t,seriesType:e,dataLabel:i,labelDefaults:r,dataLabelsConfig:s,yAxisValueFormat:n,stackedType:o,isRotated:l,defaultDataLabelFormatter:h,customDataLabelFormatter:u}=a;if(i!==void 0){let c=u,d=s?.content??{type:Rt.TS};if(u===void 0&&h!==void 0&&n?.type===V.NumberAxisFormat){let p=ye(t.chart.uid,"formatLocale"),f=fl({type:n.type,iLocale:t.chart.language.locale,formatLocale:p});f.numberFormat=n.intlOptions,c=h({numberFormatter:f,dataLabelsConfigContent:d,stackedType:o})}let A;switch(e){case V.BarSeries:A="barSeriesDataLabelFormatter";break;case V.LineSeries:A="lineSeriesDataLabelFormatter";break}A!==void 0&&Zn(t.uid,{[A]:c}),s!==void 0&&(s.content.text=l===!0?"{valueX}":"{valueY}",s.visible=s.visible!==!1),xn({label:i,labelConfig:s,defaults:r??re.dataLabel}),tw(t)}}function kv(a,t){let e=t;e===void 0&&(e=ye(a.uid,"config"));let i=ye(a.uid,"colorMatchApplied")??!1;return(e?.colorMatch??!1)&&i}function c1(a,t){let e;return a instanceof Ct?e=t===!0?"dateY":"dateX":a instanceof $t?e=t===!0?"categoryY":"categoryX":e=t===!0?"valueY":"valueX",e}function _A(a,t){a.name=t}function Cw(a){let{chart:t,lineSeries:e,applyPropertiesToClones:i}=a,r=e.bullets.push(new Ee);return DN(r.uid,{isBulletMarker:!0}),i!==!1&&(r.applyOnClones=!0),e.bulletsContainer.parent=t.seriesContainer,r}function ww(a){let{series:t,seriesConfig:e,rotationChanged:i,stackedType:r,isRotated:s}=a;switch(r){case $i.Stacked:{t.stacked=!0,t instanceof Ti&&(t.stackToNegative=e.stackNegativeValuesToBaseline??re.lineSeries.stackNegativeValuesToBaseline),i===s?t.dataFields.valueYShow=void 0:t.dataFields.valueXShow=void 0,t.updateStacking();break}case $i.Stacked100:{t.stacked=!0,s?t.dataFields.valueXShow="totalPercent":t.dataFields.valueYShow="totalPercent",t.updateStacking();break}case $i.Side:default:{t.stacked=!1,i===s?t.dataFields.valueYShow=void 0:t.dataFields.valueXShow=void 0;break}}}function LQ(a){return()=>{let{chart:t,marker:e}=a;e.clones.each(i=>{Ui(i,!UI(i,t))})}}function IQ(a){let{chart:t,series:e,seriesType:i,marker:r,numberOfChartSeries:s,ignoreSmoothRenderingLimit:n}=a,o=LQ({marker:r,chart:t}),l=s??1,h=t.data.length*l+l;n!==!0&&h>re.elementLimitForSmoothRendering&&(o=Is(o,re.debounceTime)),t.xAxes.getIndex(0)?.events.on(Ie.Validated,o),t.yAxes.getIndex(0)?.events.on(Ie.Validated,o),i===V.LineSeries&&(t.xAxes.getIndex(0)?.events.on(Ie.Validated,()=>{tw(e)}),t.yAxes.getIndex(0)?.events.on(Ie.Validated,()=>{tw(e)}))}function d1(a,t){a.series.each(e=>{let i=sa(e.uid,t);i!==void 0&&!i.isDisposed()&&i.dispose()})}function kQ(a){let t;return a!==void 0&&a.series.length>0&&(t=a.series.values.map(e=>e.visible?e.id:"").filter(e=>e!=="")),t}function WC(a){let{dataItem:t,y:e,splitBy:i,showOutliers:r}=a,s=Zi({key:Yt.Min,y:e,splitBy:i,showOutliers:r}),n=Zi({key:Yt.Max,y:e,splitBy:i,showOutliers:r}),o=Zi({key:Yt.FirstQuartile,y:e,splitBy:i,showOutliers:r}),l=Zi({key:Yt.ThirdQuartile,y:e,splitBy:i,showOutliers:r});return Number.isFinite(t[s])&&Number.isFinite(t[n])&&Number.isFinite(t[o])&&Number.isFinite(t[l])}function $Q(a,t){let e=0;if(a!==void 0&&t!==void 0){let i=Mo(t.series),r=It(t.series),s=Eo(t);a.data.forEach(n=>{switch(r){case ke.BoxPlotMonoField:case ke.BoxPlotMultiFields:case ke.BoxPlotMonoFieldAndCategory:WC({dataItem:n,showOutliers:s})&&(e+=1);break;case ke.BoxPlotMultiFieldsAndCategory:i.forEach(o=>{WC({dataItem:n,y:o,showOutliers:s})&&(e+=1)});break;case ke.BoxPlotMonoFieldAndSplitBy:case ke.BoxPlotMultiFieldsAndSplitBy:case ke.BoxPlotMonoFieldAndCategoryAndSplitBy:t.series.forEach(o=>{WC({dataItem:n,splitBy:o.query?.where,showOutliers:s})&&(e+=1)});break}})}return e}function YL(){return a=>{let t=ye(a.chart.uid,"config"),e=!1;if(t!==void 0&&a instanceof Qr){let i=$Q(a.chart,t),r=0,s=0,n=0,o=0,l=0;a.chart.series.values.forEach(c=>{if(c instanceof Cr)r+=c.columns.length;else if(c instanceof Ti&&!(c instanceof Aa)){let d=zr(c);if(d!==void 0&&!d.disabled){let A=d.clones.values.filter(p=>!(p.dataItem instanceof Go))?.length??0;if(sa(c.uid,"isBoxPlotMeanLineSeries")===!0){o+=A;let p=c.data.filter(f=>Number.isFinite(f[c.dataFields.valueX??c.dataFields.valueY??""])).length;l+=p}else{let p=c.data.filter(f=>Number.isFinite(f[c.dataFields.valueX??c.dataFields.valueY??""])).length;n+=p,s+=A}}}});let h=n===0||s>=n,u=l===0||o>=l;e=r>=i&&h&&u&&a.chart.appeared&&a.isReady()&&a.chart.isReady()}return e}}function OQ(a,t){let e;switch(a){case V.BarSeries:e=(i,r)=>{let s=!1;if(i instanceof Xi){let n=bn({chart:i.chart}),o=0;if(r.type===V.BarSeries){let l=(n?i.dataFields.valueX:i.dataFields.valueY)??r.y;o=i.chart?.data?.filter(h=>Number.isFinite(h[l])).length}s=i.chart.isReady()&&i.columns.length===o}return s};break;case V.LineSeries:t===!0?e=YL():e=(i,r)=>{let s=!1;if(i instanceof Ti){let n=bn({chart:i.chart}),o=zr(i),l=0;if(r.type===V.LineSeries){let{y:h}=r,u=(n?i.dataFields.valueX:i.dataFields.valueY)??[h].flat()[0];l=i.chart?.data?.filter(c=>Number.isFinite(c[u])).length}s=i.chart.appeared&&i.chart.isReady()&&o!==void 0&&o.clones.values.length>=l}return s};break;case V.PieSeries:e=i=>i instanceof ws&&i.slices.length>0;break;case V.BoxPlotSeries:e=YL();break}return e}function A1(a){let{series:t,callbackInfo:e,seriesConfig:i}=a,{type:r}=e,s=ze([i]),n=sa(t.uid,"isBoxPlotMeanLineSeries"),o=ye(t.chart.uid,"config"),l=bF(o),h=r==="style"?"updateStyleCallbackDisposer":"updateSelectionCallbackDisposer",u=A=>{let{type:p}=A;p==="selection"?p2(A.callbackProps):A.styleCallback!==void 0&&(Ui(t,i.visible),A.styleCallback())};t.events.once(Ie.Ready,()=>u(e)),l?t.chart.events.once(Ie.Ready,()=>u(e)):t.events.once(Ie.Ready,()=>u(e)),sa(t.uid,h)?.dispose();let c=OQ(s,n),d=(s===V.PieSeries?t.chart:t).events.on(Ie.Validated,()=>{c!==void 0&&c(t,i)&&(d!==void 0&&d.dispose(),u(e))});t.dispatchImmediately(Ie.Validated),Zn(t.uid,{[h]:d})}function $v(a){let{series:t,styleCallback:e,seriesConfig:i}=a;A1({callbackInfo:{styleCallback:e,type:"style"},series:t,seriesConfig:i})}function EQ(a){let{series:t,callbackProps:e,seriesConfig:i}=a;A1({callbackInfo:{callbackProps:e,type:"selection"},series:t,seriesConfig:i})}function Wc(a){let{defaultChartItemRole:t}=re.aria;a instanceof Cr||a instanceof Xi?(a.columns.template.properties.role=t,a.columns.template.focusable=!0,a.columns.template.hoverOnFocus=!0,a.itemReaderText=sp()):a instanceof Aa?a.segments.template.properties.role=t:a instanceof Ti?a.bullets.values.forEach(e=>{e.focusable=!0,e.properties.role=t,e.readerTitle=sp(),e.hoverOnFocus=!0}):a instanceof ws&&(a.slices.template.properties.role=t,a.slices.template.hoverOnFocus=!0,a.itemReaderText="{category} {value.formatNumber('#.#')} {value.percent.formatNumber('#.#')}%")}function MQ(a){let t=ye(a.uid,"config");a.series.each(e=>{let i=t?.series?.find(r=>r.id===e.id);i!==void 0&&i.visible!==!1&&!e.visible&&Ui(e)})}function Rf(a,t){let e=ze(t?.series);return t?.series.find(i=>{let r=!1;return e!==V.BoxPlotSeries||a instanceof Cr?r=a.id===i.id:a instanceof Aa?r=a.id.replace(`_${ji.Top}`,"")===i.id||a.id.replace(`_${ji.Median}`,"")===i.id||a.id.replace(`_${ji.Bottom}`,"")===i.id:a instanceof Ti&&(r=a.id.replace(`_${ji.Outliers}`,"")===i.id),r})}var ia={CustomActive:"custom-active",CustomInactive:"custom-inactive",Default:"default",Active:"active"};function RQ(a,t){let e=!1;if(t!==void 0&&Of(a)){let i=Pt.spriteRectToSvg(a.bbox,a),r=t.x,s=t.y,n=t.x+t.width,o=t.y+t.height,l=i.x,h=i.y,u=i.x+i.width,c=i.y+i.height;e=!(l>n||u<r||h>o||c<s)}return e}function Xc(a){let{element:t,customSelectionTheme:e,useNativeState:i}=a,r=i===!0?ia.Active:ia.CustomActive,s=t.states.getKey(r)??t.states.create(r),n=t.states.getKey(ia.CustomInactive)??t.states.create(ia.CustomInactive),{selectedElementsTheme:o,nonSelectedElementsTheme:l}=e??re.selectionTheme??{};jL(s,o),jL(n,l)}function Yn(a){let{element:t,selected:e,multiSelect:i,isDateOrCategoryAxis:r,useNativeState:s,backToDefaultState:n}=a;if(t!==void 0){let o=t.isActive;i!==!0?r===!0?o=t.isActive?!1:t.isActive!==e:o=e:o=t.isActive!==e,o!==t.isActive&&(t.isActive=o);let l=s===!0?ia.Active:ia.CustomActive,h=n===!0?ia.Default:ia.CustomInactive;t.setState(t.isActive?l:h,0),t.isActive&&(t.toFront(),t.dataItem?.component instanceof go&&t.dataItem.component.toFront())}return t?.isActive??!1}function Ov(a,t){let e=!1;if(t instanceof Vt||t instanceof pr){let i=ye(t.uid,"actionMode");i!==void 0&&(e=i===Ut.MultiSelection||i===Ut.MultiSelectionWithCtrlKey&&(a?.event?.ctrlKey||a?.event?.metaKey))}return e}function p1(a){let t=a instanceof Vt&&a.zoomOutButton.isHover,e=a.legend.isHover,i=!1,r=!1,s=!1,n=!1;if(a instanceof Vt){i=a.xAxes.values.some(l=>l.renderer.labels.template.events.has(Ie.Hit)&&l.renderer.isHover),r=a.yAxes.values.some(l=>l.renderer.labels.template.events.has(Ie.Hit)&&l.renderer.isHover),s=i||r;let o=ye(a.uid,"config");oa(o)&&(n=a.series.values.find(l=>l instanceof Cr)?.isHover??!1)}return!t&&!e&&!s&&!n}function Bw(a,t){return a.values.filter(e=>{let i=!1,r=!e.isActive;if(!(e.dataItem instanceof Go)){e.isActive=!e.isActive;let s=ye(t.uid,"filterBySelection")!==!0&&r;Yn({element:e,selected:s}),i=r}return i})}function KL(a,t){let e=[],{columns:i,chart:r}=a,s=ye(r.uid,"config");if(s&&i!==void 0&&a.visible){let n=s?.series[0].x,o=a?.dataFields?.customValue??"",l=Dv(a,t),h=Rf(a,s),u=l===V.BoxPlotSeries?h?.y:xu(a),c={element:{},yAxisField:u,xAxisField:n,splitBy:o,seriesIndex:t,chartConfig:s};e=Bw(i,r).map(d=>({...c,element:d,elementDataContext:d.dataItem?.dataContext,elementIndex:d.dataItem?.index}))}return e}function ZL(a,t){let e=[];if(a.visible){let i=zr(a)?.clones;if(i!==void 0){let{chart:r}=a,s=ye(r.uid,"config");if(s){let n=s.series[0].x??"",o=xu(a),l=a?.dataFields?.customValue??"",h={element:{},xAxisField:n,yAxisField:o,splitBy:l,seriesIndex:t,chartConfig:s};e=Bw(i,r).map(u=>({...h,element:u,elementDataContext:u.dataItem?.dataContext,elementIndex:u.dataItem?.index}))}}}return e}function UQ(a){let t=[];if(a.visible){let{chart:e}=a,i=ye(e.uid,"config");if(i){let r=i1(a),s=xu(a),n={element:{},xAxisField:r,yAxisField:s,seriesIndex:0,chartConfig:i},o;t=Bw(a.slices,e).map(l=>{let h=l.dataItem?.dataContext??{};return ih(h)&&(o=Nf({groupOfSlicesDataContext:h})),{...n,element:l,elementIndex:l.dataItem?.index,elementDataContext:h}}),o!==void 0&&o.forEach((l,h)=>{t.push({...n,elementIndex:h,elementDataContext:l})})}}return t}function VQ(a){let{chart:t,selectionSource:e,chartConfig:i}=a,r=!1,s=[];if(Dl(i)){if(r=oa(i),s=t.series.values.filter(n=>!(n instanceof Aa)),e===Tr.SelectionByClick){let n=new Set,o=s.find(l=>l instanceof Cr&&l.isHover);o===void 0?s.forEach(l=>{l instanceof Ti&&(l.id.includes(ji.Outliers)&&l.tooltip?.visible===!0||sa(l.uid,"isBoxPlotMeanLineSeries"))&&n.add(l)}):n.add(o),s=Array.from(n)}}else s=t.series.values;return s=s.filter(n=>n.visible&&(!r||!(n instanceof Cr||sa(n.uid,"isBoxPlotOutliersSeries")))),s}async function f1(a){let{chart:t,cursorSelectionRectangle:e,multiSelect:i,selectionSource:r,hitElement:s,queryObject:n,errorStrings:o}=a,l=ye(t.uid,"config"),h=l?.series[0]?.x??"",u=[];ai(t.uid,{pendingSelectionQueries:!0});let c=[],d=!0;VQ({chart:t,selectionSource:r,chartConfig:l}).forEach((A,p)=>{let f=Rf(A,l);if(l&&A.visible&&A instanceof Qr){let m=Dv(A,p)===V.BoxPlotSeries?f?.y:xu(A),g=A.dataFields?.customValue??"",y={element:{},yAxisField:m,xAxisField:h,splitBy:g,seriesIndex:p,chartConfig:l},x;A instanceof Xi||A instanceof Cr?x=A.columns?.values:A instanceof Aa?x=A.segments.values:A instanceof Ti&&(x=zr(A)?.clones?.values,y.uniqueFeature=!0),x!==void 0&&(c=[...c,...x],x.forEach((w,S)=>{if(!(w.dataItem instanceof Go)){let F=w.isActive,T=w===s||RQ(w,e);T&&(d=!1);let L=!1;F?T?L=r!==Tr.SelectionByClick:L=i===!0:L=T,L&&u.push({...y,element:w,elementDataContext:w.dataItem?.dataContext,elementIndex:S}),Yn({element:w,selected:L})}}))}}),d&&(u=[]),await jf({chart:t,listSelectedElements:u,selectionSource:r,queryObject:n,errorStrings:o})}function NQ(a){let{chart:t,queryObject:e,errorStrings:i}=a,r=async s=>{let n=s.target.cursor;if(n.xRange!==void 0){n.selection.isMeasured=!0,n.validate(),n.selection.validate();let o=Pt.spriteRectToSvg(n.selection.bbox,n.selection);if(n.selection.hide(),o.width>0||o.height>0){let l=Ov(s,t);await f1({chart:t,cursorSelectionRectangle:o,multiSelect:l,selectionSource:Tr.SelectionByRange,queryObject:e,errorStrings:i})}}n.selection.hide()};qn(t)&&t.events.on(Ie.Up,async s=>{let n=s.target.cursor,o=BN(t.uid,"selectEndedCallbackDisposer");if(o!==void 0&&o.dispose(),n.xRange!==void 0&&s.event instanceof TouchEvent)await r(s);else{let l=n.events.once(Ie.SelectEnded,async()=>{await r(s)});SN(t.uid,{selectEndedCallbackDisposer:l})}})}async function Cv(a){let{hitEvent:t,chart:e,queryObject:i,errorStrings:r}=a,{target:s}=t,n=ye(e.uid,"actionMode");if(e!==void 0&&p1(e)&&n!==Ut.None&&n!==Ut.Zoom&&(s instanceof Vt||t.point===void 0)){let o=t.svgPoint?{x:t.svgPoint.x,y:t.svgPoint.y,width:0,height:0}:void 0,l=Ov(t,e);await f1({chart:e,cursorSelectionRectangle:o,multiSelect:l,selectionSource:Tr.SelectionByClick,hitElement:s,queryObject:i,errorStrings:r})}}function QQ(a){let{chart:t,queryObject:e,errorStrings:i}=a;qn(t)&&(t.zoomOutButton.hoverable=!0,t.events.on(Ie.Hit,async r=>await Cv({hitEvent:r,chart:t,queryObject:e,errorStrings:i})),t.events.on(Ie.DoubleHit,async r=>await Cv({hitEvent:r,chart:t,queryObject:e,errorStrings:i})))}function Qf(a){let{chart:t,element:e,queryObject:i,errorStrings:r}=a;e.events.on(Ie.Hit,async s=>await Cv({hitEvent:s,chart:t,queryObject:i,errorStrings:r})),e.events.on(Ie.DoubleHit,async s=>await Cv({hitEvent:s,chart:t,queryObject:i,errorStrings:r}))}async function HQ(a){let{chart:t,queryObject:e,errorStrings:i}=a,{series:r}=t;if(r.length>0){ai(t.uid,{pendingSelectionQueries:!0});let s=ye(t.uid,"config"),n=r.values.map((o,l)=>{let h=[];if(o.visible){let u=ze(s?.series,l);u===V.BarSeries?h=KL(o,l):u===V.LineSeries?h=ZL(o,l):u===V.PieSeries?h=UQ(o):u===V.BoxPlotSeries&&(o instanceof Cr?h=KL(o,l):o instanceof Ti&&!(o instanceof Aa)&&(h=ZL(o,l)))}return h}).flat();await jf({chart:t,listSelectedElements:n,selectionSource:Tr.ProgrammaticSelection,queryObject:e,errorStrings:i}),t instanceof pr&&t.feedLegend()}}function XC(a){if(qn(a))if(a.events.disableType(Ie.Hit),a.events.disableType(Ie.DoubleHit),a instanceof pr){let t=a.series.getIndex(0);t!==void 0&&(t.slices.template.clickable=!1,t.slices.template.togglable=!1,t.slices.template.events.disableType(Ie.Hit),t.slices.template.events.disableType(Ie.DoubleHit),t.labels.template.clickable=!1,t.labels.template.togglable=!1,t.labels.template.events.disableType(Ie.Hit),t.labels.template.events.disableType(Ie.DoubleHit))}else a instanceof Vt&&(a.xAxes.each(t=>wv(t,!0)),a.yAxes.each(t=>wv(t,!0)),a.events.disableType(Ie.Up))}function jQ(a){if(qn(a))if(a.events.enableType(Ie.Hit),a.events.enableType(Ie.DoubleHit),a instanceof pr){let t=a.series.getIndex(0);t!==void 0&&(t.slices.template.clickable=!0,t.slices.template.togglable=!0,t.slices.template.events.enableType(Ie.Hit),t.slices.template.events.enableType(Ie.DoubleHit),t.labels.template.clickable=!0,t.labels.template.togglable=!0,t.labels.template.events.enableType(Ie.Hit),t.labels.template.events.enableType(Ie.DoubleHit))}else a instanceof Vt&&(a.xAxes.each(t=>wv(t,!1)),a.yAxes.each(t=>wv(t,!1)),a.events.enableType(Ie.Up))}function gA(a){let{element:t,stylingInfo:e,stateKey:i="default"}=a;if(t!==void 0&&e!==void 0){let r=t.states.getKey(i)?.properties??t.defaultState.properties;if(r.fill=e.pattern??e.fill,r.fillOpacity=Ne(r.fill.toString()).alpha===0?0:1,e.outline!==void 0){let{outline:s}=e;r.stroke=s.stroke,r.strokeOpacity=s.stroke.alpha===0?0:1,r.strokeDasharray=s.strokeDasharray,r.strokeLinecap=s.strokeLinecap,r.strokeWidth=s.strokeWidth}}}function yA(a,t){return t!=null&&t!==""?t:a}function m1(a,t){let e;switch(a){case Fn.Average:{e=t.statistics.mean;break}case Fn.ContinuousPercentile:{e=t.statistics.median;break}case Fn.Sum:{e=t.statistics.sum;break}case Fn.Minimum:{e=t.statistics.minimum;break}case Fn.Maximum:{e=t.statistics.maximum;break}case Fn.Variance:{e=t.statistics.variance;break}case Fn.DiscretePercentile:{e=t.statistics.discretePercentile;break}case Fn.NoAggregation:{e=t.statistics.noAggregation;break}case Fn.Count:default:{e=t.statistics.count;break}}return e}function Sw(a){let{config:t,fieldName:e="",utilsStrings:i}=a,r=t.series[0].query?.outStatistics?.[0].statisticType??Nb.statisticType,s=m1(r,i);return Uc(i.statistics.aggregation,{statistics:s,fieldName:e})}function g1(a){let{config:t,fieldList:e,objectIdField:i,seriesIndex:r,isStacked100:s,utilsStrings:n}=a,o="",l=t.series[r].name,h=t.series[r],u=[h.y].flat()[0],c=t.axes,d=It(t.series),A=i??Ou.outStatistics.onStatisticField,p=h.query?.outStatistics?.[0].onStatisticField??A,f=Or(e,p),m=h.query?.outStatistics?.[0].statisticType??Nb.statisticType,g=m1(m,n);return d===ke.BarAndLineNoAggregation?o=l??Or(e,u):d===ke.BarAndLineSplitByNoAggregation?o=Or(e,u):(o=m===Fn.Count&&p===A?n.statistics.count:Uc(n.statistics.aggregation,{statistics:g,fieldName:f??l}),d===ke.BarAndLineMonoField&&!s&&(o=yA(o,c[1].title?.content?.text))),o}function y1(a,t){let{dataTooltipStyle:e,dataTooltipStyleReversed:i}=re;if(t===!0){let r=a.background.fill;if(r!==void 0){a.background.stroke=r,a.background.strokeWidth=i?.outline?.width??Number.NaN,a.background.fill=vn(i?.color);let s=a.background.fill.rgb;if(s!==void 0){let n=a.label.fill;a.label.fill=Dg(s)?n?.darkColor:n?.lightColor}}}else a.getStrokeFromObject=!0,a.getFillFromObject=!0,a.background.strokeWidth=e?.outline?.width??Number.NaN,a.background.stroke=vn(e?.outline?.color)}function Ev(a,t){if(a.tooltip){let e=t.dataTooltipFontSize??re.tooltipFontSize,i=sa(a.uid,"tooltipFontSize")!==e;a.tooltip.label.fontSize=e,i&&!a.tooltip.visible&&(a.tooltip.label.html=""),a.tooltip.label.invalidate(),Zn(a.uid,{tooltipFontSize:e})}}function WQ(a){let t=a.tooltip??new fo;t.pointerOrientation="vertical",a instanceof Cr||a instanceof Aa?t.label.maxWidth=re.boxPlot.boxPlotTooltipLabelWidth:t.label.maxWidth=re.tooltipWidth,t.label.wrap=!0;let e=ye(a.chart?.uid,"config"),i=e?Rf(a,e):void 0;i!==void 0&&Ev(a,i),t.events.on(Ie.Shown,r=>{let s=ye(a.chart.uid,"config");if(s!==void 0){let n=Rf(a,s),{dataTooltipReverseColor:o}=n??{};y1(r.target,o)}})}function XQ(a){a instanceof Ys||a.series.each(t=>{WQ(t)})}function v1(a,t){a.tooltipHTML=re.htmlEmptyContent,a.adapter.add("tooltipHTML",(e,i)=>{let r=e??"",{chart:s}=t;if(s!==void 0){let n=ye(s.uid,"config"),{dataTooltipVisible:o}=n?.series[0]??{};if(o===!1)r="";else{let l=sa(t.uid,"barAndLineTooltipFormatter");if(l!==void 0&&t.isReady()){let{dataItem:h}=i;if(h instanceof Bs||h instanceof Wa){let u=n?.series.find(c=>c.id===t.id);if(u!==void 0){let c=bn({config:n}),d=c?h.valueX:h.valueY,A=(c?h.values.valueX.totalPercent:h.values.valueY.totalPercent)/100,p=h.dataContext??{};if(p!==void 0){let f=ye(s.uid,"rendererFieldNames"),m=no({value:qA(It([u]),u),dataContext:p,useRendererLabel:Qu(n,f),config:n}),g=oo(p);g===void 0&&(g=m);let y=p[re.dateBinningRange];r=l({seriesName:t.name,xValue:m,originalXValue:g,dateBinningRange:y,statValue:d,percentValue:A})}}}}}}return Zr(r)}),a.tooltipPosition=t instanceof Ti?re.markerTooltipPosition:re.columnTooltipPosition,t.cursorTooltipEnabled=!1}function zQ(a){let{isStacked100:t,series:e,statValue:i,percentValue:r,yAxisValueFormat:s,dataTooltipValueFormat:n,dataTooltipPercentFormat:o}=a,l=n;l===void 0&&(ba(s)&&s?(l=s,t&&(l.intlOptions.style="decimal")):l=Hm());let h=ye(e.chart.uid,"formatLocale"),u=i!==void 0?Mf({value:i,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:h}):"",c="";if(t&&r!==void 0){let d=o;d===void 0&&(d=jm(),d.intlOptions.minimumFractionDigits=2,d.intlOptions.maximumFractionDigits=2),c=Mf({value:r,valueFormat:d,iLocale:e.chart.language.locale,formatLocale:h})}return{formattedStatValue:u,formattedPercentValue:c}}function GQ(a){let{series:t,dateRange:e,xAxisValueFormat:i}=a,r;if(e!==void 0&&e.length>0){let s=t.chart?.uid,n=ye(s,"timeIntervalInfo"),o=ye(s,"config"),l=ye(s,"options"),h=ye(s,"queryObject"),u=o&&bh(o.series[0])?o.series[0].temporalBinning?.outTimeZone:void 0,c={};switch(n?.unit){case Ji.Second:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};break;case Ji.Minute:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ji.Hour:c={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ji.Day:case Ji.Week:case Ji.Month:case Ji.Year:c={month:"numeric",day:"numeric",year:"numeric"};break}ep({chartConfig:o,queryObject:h,options:l})&&(c.timeZone=u??i.intlOptions.timeZone);let d=new Date(e[0]),A=new Date(e[1]);if(!Number.isNaN(d.valueOf())){let p=ye(t.chart.uid,"formatLocale"),f=fl({type:V.DateAxisFormat,iLocale:t.chart.language.locale,formatLocale:p}),m=f.format(d,c);if(r=m,!Number.isNaN(A.valueOf())){let g=f.format(A,c);g!==m&&(r=`${r} - ${g}`)}}}return r?.toString()??""}function b1(a){let{seriesConfig:t,xAxisValueFormat:e,setTimeBinningInfoWhenNotProvided:i,dataTooltipValueFormat:r,dataTooltipDateFormat:s,series:n,xValue:o,dateBinningRange:l,isTimeOnlyField:h,queryObject:u}=a,c,d=ye(n.chart.uid,"formatLocale");return Zm({seriesConfig:t,xAxisValueFormatType:e?.type,setTimeBinningInfoWhenNotProvided:i,queryObject:u})&&l!==void 0&&e?.type===V.DateAxisFormat?c=GQ({series:n,dateRange:l,xAxisValueFormat:e}):ro(e)?h&&typeof o=="number"?c=new Date(o).toLocaleTimeString(d):(o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(c=Mf({value:o,valueFormat:s??e,iLocale:n.chart.language.locale,formatLocale:d})):typeof o=="number"&&ba(e)?c=Mf({value:o,valueFormat:r??e,iLocale:n.chart.language.locale,formatLocale:d}):c=o,c?.toString()??""}function YQ(a){let{series:t,fieldList:e,queryObject:i,setTimeBinningInfoWhenNotProvided:r,seriesIndex:s,seriesConfig:n,utilsStrings:o}=a,{dataTooltipValueFormat:l,dataTooltipPercentFormat:h,dataTooltipDateFormat:u}=n,c=()=>"",{chart:d}=t;if(d!==void 0){let A=ye(d.uid,"config");if(A!==void 0){let{dataTooltipVisible:p}=n,f=t instanceof Ti?n.markerVisible:void 0;if(p===!1||f===!1)c=()=>"";else{let m=A.axes,g=m[0].valueFormat,y=m[1].valueFormat,x=It(A.series),w=e?.find(U=>U.name===n.x)?.type===GA.TimeOnly,S=ks(A)===$i.Stacked100,F=xh($s(i)).idField,T=Or(e,n.x),L=yA(T,m[0].title?.content.text),O=g1({config:A,fieldList:e,objectIdField:F,seriesIndex:s,utilsStrings:o,isStacked100:S}),I=Ra(d.rtl);c=U=>{let{statValue:P,percentValue:Q,xValue:G,dateBinningRange:Y}=U,ee=b1({seriesConfig:n,xAxisValueFormat:g,dataTooltipValueFormat:l,dataTooltipDateFormat:u,setTimeBinningInfoWhenNotProvided:r,series:t,xValue:G,dateBinningRange:Y,isTimeOnlyField:w,queryObject:i}),{formattedStatValue:te,formattedPercentValue:le}=zQ({isStacked100:S,yAxisValueFormat:y,dataTooltipValueFormat:l,dataTooltipPercentFormat:h,series:t,statValue:P,percentValue:Q}),z=[`<b>${L}${I} </b>${ee}`];switch(x){case ke.BarAndLineFromFields:{z.pop();let K=Sw({config:A,fieldName:Or(e,ee??""),utilsStrings:o});z.push(`<b>${K}${I} </b>${te}`);break}case ke.BarAndLineMonoField:case ke.BarAndLineNoAggregation:case ke.BarAndLineMultiFields:z.push(`<b>${O}${I} </b>${te}`);break;case ke.BarAndLineSplitByNoAggregation:case ke.BarAndLineSplitBy:{let K=Tn(n.query?.where,!1),we=Jb({value:Or(e,K),escape:!0});z.push(`<b>${we}${I} </b>${t.name}<br /><b>${O}${I} </b>${te}`)}break}return S&&z.push(`<b>${o.statistics.percent}${I} </b>${le}`),z.join("<br />")}}}}return c}function x1(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{barAndLineTooltipFormatter:i??YQ(a)}),Ev(t,e)}function Fw(a){let{target:t,defaultTooltipHTML:e,candleStickSeries:i,meanLineSeries:r,outliersSeries:s,tooltipCallback:n}=a,o=e,l=i??r;if(l!==void 0){let{chart:h}=l;if(h!==void 0){let u=ye(h.uid,"config"),{dataTooltipVisible:c}=u?.series[0]??{};if(c===!1)o="";else{let d=sa(l.uid,"boxPlotTooltipFormatter");d!==void 0&&l.isReady()&&u&&(o=n({target:t,defaultTooltipHTML:e,config:u,candleStickSeries:i,meanLineSeries:r,outliersSeries:s,boxPlotTooltipFormatter:d}))}}}return Zr(o)}function KQ(a){let{target:t,defaultTooltipHTML:e,config:i,candleStickSeries:r,outliersSeries:s,boxPlotTooltipFormatter:n}=a,o=e;if(r!==void 0&&s!==void 0){let l=r.dataItems.values.find(u=>(u.categories.categoryX??u.categories.categoryY)===(t.dataItem?.categories.categoryX??t.dataItem?.categories.categoryY)),h=i.series.find(u=>u.id===r.id);if(h!==void 0){let u=l?.dataContext??{};if(u!==void 0){let c=no({value:u[h.x],dataContext:u,useRendererLabel:Fl(i),specificField:pt.xAxisField}),d=oo(u);d===void 0&&(d=c),o=n({seriesName:s.name,xValue:c,originalXValue:d,dataContext:u})}}}return o}function ZQ(a){let{target:t,defaultTooltipHTML:e,config:i,meanLineSeries:r,boxPlotTooltipFormatter:s}=a,n=e;if(r!==void 0){let o=r.dataItems.values.find(l=>(l.categories.categoryX??l.categories.categoryY)===(t.dataItem?.categories.categoryX??t.dataItem?.categories.categoryY));if(o instanceof Wa){let l=i.series.find(h=>h.id===r.id);if(l!==void 0){let h=o.dataContext??{};if(h!==void 0){let u=no({value:h[l.x],dataContext:h,useRendererLabel:Fl(i),specificField:pt.xAxisField}),c=oo(h);c===void 0&&(c=u),n=s({seriesName:r.name,xValue:u,originalXValue:c,dataContext:h})}}}}return n}function qQ(a){let{target:t,defaultTooltipHTML:e,config:i,candleStickSeries:r,boxPlotTooltipFormatter:s}=a,n=e;if(r!==void 0){let o=t.dataItem;if(o instanceof gc){let l=i.series.find(h=>h.id===r.id);if(l!==void 0){let h=o.dataContext??{};if(h!==void 0){let u=no({value:h[l.x],dataContext:h,useRendererLabel:Fl(i),specificField:pt.xAxisField}),c=oo(h);c===void 0&&(c=u),n=s({seriesName:r.name,xValue:u,originalXValue:c,dataContext:h})}}}}return n}function JQ(a){a.cursorTooltipEnabled=!1,a.tooltipPosition=re.columnTooltipPosition,a.columns.template.tooltipHTML=re.htmlEmptyContent,a.columns.template.adapter.add("tooltipHTML",(t,e)=>Fw({target:e,defaultTooltipHTML:t??"",candleStickSeries:a,tooltipCallback:qQ}))}function eH(a,t){let e=zr(a);e!==void 0&&(e.tooltipPosition=re.markerTooltipPosition,e.tooltipHTML=re.htmlEmptyContent,a.cursorTooltipEnabled=!1,e.adapter.add("tooltipHTML",(i,r)=>Fw({target:r,defaultTooltipHTML:i??"",candleStickSeries:t,outliersSeries:a,tooltipCallback:KQ})))}function tH(a){let t=zr(a);t!==void 0&&(a.cursorTooltipEnabled=!1,t.tooltipPosition=re.markerTooltipPosition,t.tooltipHTML=re.htmlEmptyContent,t.adapter.add("tooltipHTML",(e,i)=>Fw({target:i,defaultTooltipHTML:e??"",meanLineSeries:a,tooltipCallback:ZQ})))}function uu(a){let{label:t,value:e,strongColon:i,useTable:r}=a,s=`<b>${t}${i}</b> ${e}`;return r!==!1?`<tr><td>${s}</td></tr>`:s}function iH(a){let{dataContext:t,series:e,dataTooltipValueFormat:i,y:r,splitBy:s,utilsStrings:n,useTable:o}=a,l=i??Hm(),h=Object.values(Yt),u=Ra(e.rtl),c=o!==!1?['<tr><td colspan="2"><hr style="border-top: solid black;"></td></tr>']:[""];return h.forEach(d=>{let A=Zi({key:d,y:r,splitBy:s}),p=t[A];if(p!=null&&typeof p=="number"){let f=ye(e.chart.uid,"formatLocale"),m=Mf({value:p,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:f}),g="";switch(d){case Yt.Min:g=n.statistics.minimum;break;case Yt.FirstQuartile:g=n.statistics.firstQuartile;break;case Yt.Median:g=n.statistics.median;break;case Yt.ThirdQuartile:g=n.statistics.thirdQuartile;break;case Yt.Max:g=n.statistics.maximum;break;case Yt.IQR:g=n.statistics.iqr;break;case Yt.Average:g=n.statistics.mean;break;case Yt.StandardDeviation:}Iu(g)||c.push(uu({label:g,value:m,strongColon:u,useTable:o}))}}),c}function rH(a){let{series:t,fieldList:e,seriesConfig:i,utilsStrings:r,queryObject:s}=a,{dataTooltipValueFormat:n}=i,o=()=>"",{chart:l}=t;if(l!==void 0){let h=ye(l.uid,"config");if(h!==void 0){let u=h.axes,c=u?.[0].valueFormat,{showMean:d}=h,A=It(h.series),p=Tn(i.query?.where),f=Or(e,p),m=vh({where:i.query?.where,escape:!1}),g=Or(e,i.x),y;i.x!==Qm&&(y=yA(g,u?.[0].title?.content.text));let x=Ra(l.rtl);o=w=>{let{dataContext:S,xValue:F}=w,T=b1({seriesConfig:i,xAxisValueFormat:c,series:t,xValue:F,queryObject:s}),L=[],O=T!==void 0&&!Iu(T)?Or(e,T):"",I=d===!0?[h.series[0].y].flat()[0]:[i.y].flat()[0],U=Or(e,I);switch(A){case ke.BoxPlotMonoField:case ke.BoxPlotMultiFields:case ke.BoxPlotMonoFieldAndSplitBy:case ke.BoxPlotMultiFieldsAndSplitBy:{if(T!==void 0&&!Iu(T)){let ee=A===ke.BoxPlotMonoField?i.name??O:O;L.push(uu({label:r.field,strongColon:x,value:ee}))}zi(f)||L.push(uu({label:f,strongColon:x,value:i.name??m?.toString()}));break}case ke.BoxPlotMonoFieldAndCategory:case ke.BoxPlotMultiFieldsAndCategory:{L.push(uu({label:r.field,strongColon:x,value:i.name??U})),T!==void 0&&!Iu(T)&&L.push(uu({label:y,strongColon:x,value:O}));break}case ke.BoxPlotMonoFieldAndCategoryAndSplitBy:L.push(uu({label:r.field,strongColon:x,value:U})),T!==void 0&&!Iu(T)&&L.push(uu({label:y,strongColon:x,value:O})),zi(f)||L.push(uu({label:f,strongColon:x,value:i.name??m?.toString()}));break}let P=[ke.BoxPlotMultiFieldsAndCategory],Q=S[re.boxPlot.boxPlotMeanLineMarkerId]!==void 0,G=L.length>0&&!Q,Y=iH({dataContext:S,series:t,dataTooltipValueFormat:n,splitBy:i.query?.where,y:P.includes(A)?[i.y].flat()[0]:void 0,utilsStrings:r,useTable:G});return G?`${L.join("<br>")}<table>${Y.join("")}</table>`:`${L.join("<br>")}${Y.join("<br>")}`}}}return o}function sH(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{boxPlotTooltipFormatter:i??rH(a)}),Ev(t,e)}function aH(a){let t=ml(re.dataLabelInitialize);return fu(t.uid,{isDataLabel:!0}),a.bullets.push(t),h1(t),n1(V.LineSeries,t),o1(V.LineSeries,t),rw(t,a),t.html="{valueX}",t}function nH(a){let{series:t}=a,e=iw(t,"bullets");u1({...a,dataLabel:e,defaultDataLabelFormatter:l1})}var B={Rotated:0,NonRotated:1,RTL:2,LTR:3,Stacked:4,Stacked100:5,SideBySide:6,LegendTop:7,LegendBottom:8,LegendLeft:9,LegendRight:10,DateAxis:11,ValueAxis:12,CategoryAxis:13,OrderByFieldsASC:14,OrderByFieldsDESC:15},_1=new Set([`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.LTR}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.DateAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.CategoryAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsASC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.SideBySide}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.LTR}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendLeft}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.NonRotated}-${B.RTL}-${B.Stacked100}-${B.LegendRight}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendTop}-${B.ValueAxis}-${B.OrderByFieldsDESC}`,`${B.Rotated}-${B.RTL}-${B.Stacked100}-${B.LegendBottom}-${B.ValueAxis}-${B.OrderByFieldsDESC}`]);function oH(a,t){t!==void 0&&(t.layout!==void 0&&(a.layout=t.layout),t.width!==void 0&&(a.width=HL(t.width)),t.height!==void 0&&(a.height=HL(t.height)),t.paddingTop!==void 0&&(a.paddingTop=t.paddingTop),t.paddingBottom!==void 0&&(a.paddingBottom=t.paddingBottom))}function lH(a){let t=!1,e=a.legend?.visible,i=a.legend?.title?.content.text,r=a.legend?.title?.visible;return t=e!==!1&&r!==!1&&i!==void 0&&i.length>0,t}function C1(a,t){let e=new Pe;return oH(e,a),e.parent=t,e}function w1(a,t){a.disabled=t}function hH(a,t){a.toBack()}function uH(a){if(a instanceof Ys){let{paddingTop:t,paddingRight:e,paddingBottom:i,paddingLeft:r}=re.gauge;a.padding(t,e,i,r)}else{let{paddingMinSize:t,marginMinSize:e,chartPaddingMinSize:i,chartContainer:r}=re;a.padding(i,i,i,i),a.chartAndLegendContainer.margin(e,e,e,e),a.chartAndLegendContainer.padding(t,t,t,t),a.chartContainer.margin(e,e,e,e),a.chartContainer.padding(r.paddingTop,t,t,t)}}function cH(a,t){let e=(i,r)=>{let{chartContainer:s,chartAndLegendContainer:n}=re,o=ye(i.uid,"config");if(o!==void 0){let l=lH(o),h=o.legend?.position;if(l)switch(h){case st.Top:i.chartAndLegendContainer.paddingTop=r.bbox.height??0,i.chartContainer.paddingBottom=s.paddingBottom??0;break;case st.Bottom:i.chartContainer.paddingBottom=r.bbox.height??0,i.chartAndLegendContainer.paddingTop=n.paddingTop??0;break;default:i.chartAndLegendContainer.paddingTop=n.paddingTop??0,i.chartContainer.paddingBottom=s.paddingBottom??0;break}else i.chartAndLegendContainer.paddingTop=n.paddingTop??0,i.chartContainer.paddingBottom=s.paddingBottom??0}};t.events.on(Ie.PositionChanged,()=>{e(a,t)})}function Tw(a){let{iLocale:t,pieChart:e,valueIntlOptions:i,percentageIntlOptions:r,displayNumericValue:s,displayPercentage:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}=a,c=ye(e.uid,"formatLocale"),d=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:c}),A=fl({type:V.NumberAxisFormat,iLocale:t,formatLocale:c});d.numberFormat={...i},A.numberFormat={...r,style:"percent"};let p=Ra(e.rtl," ");return(f,m,g)=>{let y="";if(m!==void 0&&g!==void 0){let x=`${o??""}${d.format(m)}${l??""}`,w=`${h??""}${A.format(Math.abs(g/100))}${u??""}`;Number.isFinite(m)?s===!0&&n===!0?y=`${w}${p}(${x})`:s===!0?y=x:n===!0&&(y=w):y=""}return y}}function B1(a){let t=!1;if(a.position===st.Right||a.position===st.Left)t=!0;else{let e=a.labels.getIndex(0)?.parent?.x;e!==void 0&&(t=!a.labels.values.some(i=>i.parent?.x!==e))}return t}function dH(a){let t=!1,e=a.labels.getIndex(0)?.parent?.y;return e!==void 0&&(t=!a.labels.values.some(i=>i.parent?.y!==e)),t}function AH(a){a.events.on(Ie.LayoutValidated,()=>{let t=B1(a),e=dH(a),i=t||!e?"right":"center";a.valueLabels.template.horizontalCenter=yw(i),a.valueLabels.template.align=NI(i)})}function pH(a){fu(a.valueLabels.template.uid,{isLegendValueLabel:!0}),a.valueLabels.template.adapter.add("htmlOutput",(t,e)=>{let i=t,r=FN(a.uid,"pieChartLegendValueLabelsFormatter");if(r!==void 0&&(i=r(e.dataItem?.values?.value?.value??0,e.dataItem?.values?.value?.percent??0)),zi(i)&&(i=re.htmlEmptyContent),a.baseSprite instanceof Vl){let s=ye(a.baseSprite.uid,"config");s?.legend?.body!==void 0&&(i=xa({textSymbol:{...s.legend.body,text:i},format:"html"}))}return Zr(i)}),a.valueLabels.template.html=re.htmlEmptyContent,AH(a)}function fH(a){let{legendElements:{legend:t},seriesConfig:e,webChartLegend:i,pieChartLegendValueLabelFormatter:r}=a,{visible:s,body:n,displayNumericValue:o,displayPercentage:l,displayCategory:h}=i??{};if(ze(e)===V.PieSeries){let{numericValueFormat:u,percentValueFormat:c,valuePrefix:d,valueSuffix:A,percentagePrefix:p,percentageSuffix:f}=e[0],m=h??re.pieChart.displayCategoryOnLegend,g=o??re.pieChart.displayNumericValueOnLegend,y=l??re.pieChart.displayPercentageOnLegend,x=r;if(r===void 0){let F=Tw({iLocale:t.language.locale,pieChart:t.baseSprite,valueIntlOptions:u?.intlOptions,percentageIntlOptions:c?.intlOptions,displayNumericValue:g,displayPercentage:y,valuePrefix:d,valueSuffix:A,percentagePrefix:p,percentageSuffix:f});x=(T,L)=>F("",T,L)}TN(t.uid,{pieChartLegendValueLabelsFormatter:x});let w=B1(t),S={type:V.Text,visible:s,content:{...n,type:Rt.TS,text:".",verticalAlignment:"middle",horizontalAlignment:w?"right":"center"}};xn({label:t.valueLabels.template,labelConfig:S,defaults:re.legendProperties.valueLabels}),t.labels.template.disabled=m===!1,t.valueLabels.template.disabled=g===!1&&y===!1}}function mH(a){let{dataContext:t}=a.target.dataItem??{};if(t instanceof Fa){let{component:e}=t;e instanceof ws&&e.showTooltip()}}function gH(a){let t=()=>{let e=a.children.values.find(i=>i.className==="Container");if(e?.children.length===3){let i=e.children.values.findIndex(r=>r.className==="Container");if(i!==-1){let r=i!==0?0:2,s=e.children.getIndex(r)?.clonedFrom;s!==void 0&&gs(s.uid,"isLegendValueLabel")!==!0&&a.children.each(n=>{n.className==="Container"&&n.children.swap(1,r)})}}};a.events.on(Ie.Validated,t),t()}function qL(a,t){let{legendLabelReducedOpacity:e}=re.legendProperties;a!==void 0&&(a.fillOpacity=t===!1?e:1)}function If(a){let{labels:t,seriesId:e,sliceCategory:i}=a;t.each(r=>{i!==void 0?i===r.dataItem.category&&qL(r,r.dataItem.slice.visible??!0):e===r.dataItem?.component?.id&&qL(r,r.dataItem?.component?.visible??!0)})}function Pw(a){a instanceof ws?(a.slices.template.events.on(Ie.Shown,t=>{let e=t.target.dataItem.category;If({labels:a.chart?.legend?.labels,sliceCategory:e}),If({labels:a.chart?.legend?.valueLabels,sliceCategory:e})}),a.slices.template.events.on(Ie.Hidden,t=>{let e=t.target.dataItem.category;If({labels:a.chart?.legend?.labels,sliceCategory:e}),If({labels:a.chart?.legend?.valueLabels,sliceCategory:e})})):a.events.on(Ie.VisibilityChanged,t=>{let e=t.target.id;If({labels:a.chart?.legend?.labels,seriesId:e})})}function S1(a){let{title:t,visible:e}=a;return t!==void 0&&e!==!1&&t?.visible!==!1}function yH(a,t){let{legendProperties:e}=re;if(a.position===st.Bottom)a.marginTop=e.marginTop??0,a.marginBottom=0,a.dy=0;else if(a.position===st.Top)a.marginBottom=e.marginBottom??0,a.marginTop=0,a.dy=0;else if(a.marginTop=0,a.marginBottom=0,!(a.baseSprite instanceof pr)){let i=S1(t),r=t.title?.content?.font?.size??re.generalFontSize;a.dy=-(i?r:15)}}function vH(a){let t=a.baseSprite,e;if(t!==void 0){let i=ye(t?.uid,"config");e=t?.rtl&&(i?.legend?.position===st.Top||i?.legend?.position===st.Bottom)}return e??!1}function bH(a){let t=a.baseSprite,e="";if(t instanceof Vt){let i=ye(t.uid,"config"),r=us(i),s=r?B.Rotated:B.NonRotated,n=ks(i),o=B.SideBySide;n===$i.Stacked?o=B.Stacked:n===$i.Stacked100&&(o=B.Stacked100);let l=t.rtl?B.RTL:B.LTR,h;switch(i?.legend?.position){case st.Left:h=B.LegendLeft;break;case st.Top:h=B.LegendTop;break;case st.Bottom:h=B.LegendBottom;break;case st.Right:default:h=B.LegendRight;break}let u=r?t.yAxes.getIndex(0):t.xAxes.getIndex(0),c;u instanceof Ct?c=B.DateAxis:u instanceof Qe?c=B.ValueAxis:c=B.CategoryAxis;let d=i?.orderOptions?.data&&"orderBy"in i.orderOptions.data&&i.orderOptions.data.orderBy===zA.Descending?B.OrderByFieldsDESC:B.OrderByFieldsASC;e=`${s}-${l}-${o}-${h}-${c}-${d}`}return e}function xH(a){let t=bH(a);return _1.has(t)}function F1(a,t){let{legend:e,legendTitle:i}=a??{};switch(t){case V.PieSeries:e.reverseOrder=vH(e);break;case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:e.reverseOrder=xH(e);break}let r=e.reverseOrder===!0?e.children.length-1:0;e.children.moveValue(i,r)}function _H(a){if(a.visible){let t=ye(a.chart.uid,"config")?.series.find(e=>e.id===a.id);if(t!==void 0&&ze([t])===V.LineSeries){let{markerVisible:e}=t;e!==!1&&a.bulletsContainer.show()}}}function CH(a,t){let e=a.target.dataItem,i=a.target.isActive;if(e?.dataContext!==void 0){let{dataContext:r}=e,s={visible:i};if(r instanceof Fa)ye(t.uid,"isNonAggregatedChart")===!0?s.sliceData=r.dataContext:s.sliceId=r.category;else if(r instanceof Cr){let o=r.id,l=Hf(t,o);if(l!==void 0){let d=ye(t.uid,"config"),A=Lw(d?.showOutliers,i),p=zr(l);p!==void 0&&(p.disabled=!A),Ui(l,A)}let{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t,o);h!==void 0&&Ui(h,i),u!==void 0&&Ui(u,i),c!==void 0&&Ui(c,i),s.seriesId=r.id}else s.seriesId=r.id;let n=r instanceof Fa?r.component:r;(n instanceof Qr||n instanceof ws)&&n.events.once(Ie.Validated,()=>{n instanceof Qr&&(R1(n),n.events.dispatchImmediately(Ie.Validated,{type:Ie.Validated,target:n}));let o=n instanceof ws,l=ye(t.uid,"currentSelectionDataItems"),h=l!==void 0&&l.length>0,u=ye(t.uid,"actionMode")??re.actionMode,c;n instanceof Xi?c=n.columns:o?c=n.slices:n instanceof Ti&&(_H(n),c=zr(n)?.clones),c?.each(d=>{d.dataItem instanceof Go||(Yn({element:d,selected:d.isActive,useNativeState:o,backToDefaultState:!h}),o&&u===Ut.None&&(d.clickable=!1))})}),ax(s,t.htmlContainer)}}function wH(a){let{legendProperties:t,legendProperties:e}=re;a.adapter.add("paddingRight",()=>a.scrollbar.visible?e.legendPaddingRightWithScrollbarVisible:t.paddingRight),a.adapter.add("paddingLeft",()=>t.paddingLeft),a.adapter.add("paddingTop",()=>t.paddingTop),a.adapter.add("paddingBottom",()=>t.paddingBottom)}function BH(a){a.scrollable=!0}function SH(a){let t=ml(void 0,a);return t.adapter.add("paddingTop",e=>{let i=e,r=t.bbox.height;return r>0&&(i=-r),i}),t.adapter.add("x",e=>{let i=e,{marginLeft:r,marginRight:s}=re.legendProperties.legendTitle;switch(ye(a.baseSprite.uid,"config")?.legend?.title?.content?.horizontalAlignment){case"left":i=t.measuredWidth+(r??0);break;case"right":i=a.measuredWidth-t.measuredWidth-(s??0);break;default:i=a.measuredWidth/2;break}return i}),t.adapter.add("disabled",e=>(e===!1&&t.validate(),e)),t}function FH(a){let{legendConfig:t,legendTitle:e}=a,{title:i,position:r}=t,{legendTitle:s}=re.legendProperties,n=S1(t);if(i!==void 0){let o={...i,visible:n};xn({label:e,labelConfig:o,defaults:s}),e.marginLeft=s.marginLeft??0}r===st.Top||r===st.Bottom?(e.maxWidth=Number.NaN,e.isMeasured=!1):(e.maxWidth=s.maxWidth??Number.NaN,e.marginTop=n?e.bbox?.height??i?.content?.font?.size??re.generalFontSize:0,e.isMeasured=!0)}function TH(a){let t=re.legendProperties;a.labels.template=ml(t.legendLabels),a.valueLabels.template=ml(t.legendLabels),a.markers.template.width=t.legendMarkersSize,a.markers.template.height=t.legendMarkersSize,a.labels.template.adapter.add("wrap",()=>!0),a.labels.template.adapter.add("maxWidth",e=>{let i=e,r;if(a.baseSprite instanceof pr&&(r=ye(a.baseSprite.uid,"config")?.legend?.labelMaxWidth),a.position===st.Right||a.position===st.Left)i=r??re.legendProperties.legendLabels.maxWidth;else if(r!==void 0)i=r;else{let s=0;a.valueLabels.template.disabled||a.valueLabels.each(n=>{s=Math.max(s,n.measuredWidth)}),i=a.measuredWidth-s-45}return i}),a.labels.template.adapter.add("textOutput",(e,i)=>{let r=i.dataItem?.label?.currentText,s,n=ye(a.baseSprite.uid,"config");if(n!==void 0){let{series:o}=n;if(ze(o)===V.PieSeries){let l=It(o)===ke.PieFromFields?ao:o[0].x,h=i.dataItem?.dataContext?.[l];typeof h=="string"?s=h:h&&typeof h!="object"&&(s=h.toString())}else i.dataItem?.component instanceof go&&(s=i.dataItem.component.name)}return(s!==void 0&&!zi(s)?eg(s):s)??r}),a.valueLabels.template.adapter.add("maxWidth",e=>{let i=e,r;return a.baseSprite instanceof pr&&(r=ye(a.baseSprite.uid,"config")?.legend?.valueLabelMaxWidth),a.position===st.Right||a.position===st.Left?i=r??re.legendProperties.valueLabels.maxWidth:i=r??Number.NaN,i})}function PH(a,t){a.itemContainers.template.events.on(Ie.Hit,e=>CH(e,t)),t instanceof pr&&a.itemContainers.template.events.on(Ie.Over,e=>mH(e))}function DH(a){a.itemContainers.template.reverseOrder=a.rtl}function mv(a,t){a.adapter.keys().includes(t)||a.adapter.add(t,e=>{let i=e,r=a.dataItem?.dataContext;if(r!==void 0){let s=r instanceof Fa?r.component?.chart:r.chart;if(s!==void 0){let n=ye(s.uid,"config"),{rectangleMarkerRadius:o,roundedMarkerRadius:l}=re.legendProperties;i=n?.legend?.roundMarkers===!0?l:o}}return i})}function JL(a){a.markers.each(t=>{let e=t.children.getIndex(0);e instanceof Nr&&(mv(e,"cornerRadiusBottomLeft"),mv(e,"cornerRadiusBottomRight"),mv(e,"cornerRadiusTopLeft"),mv(e,"cornerRadiusTopRight"),e.validate())})}function LH(a){a.markers.template.events.on(Ie.Inited,()=>{JL(a)}),a.events.once(Ie.Validated,()=>{JL(a)})}function IH(a){let{legendElements:{legend:t},seriesConfig:e,webChartLegend:i}=a,{visible:r,body:s}=i??{},n=ze(e),o={type:V.Text,visible:r,content:{...s,type:Rt.TS,text:" "}};xn({label:t.labels.template,labelConfig:o,defaults:re.legendProperties.legendLabels}),t.labels.template.valign="middle",t.valueLabels.template.valign="middle",n===V.PieSeries&&fH(a),t.valueLabels.template.width=Number.NaN}function kH(a,t){t.chartContainer.events.on(Ie.SizeChanged,Is(()=>{let e=ye(t.uid,"config")?.legend?.maxHeight??Number.NaN;Number.isFinite(e)||(a.position===st.Top||a.position===st.Bottom?e=re.legendProperties.maxHeight:e=t instanceof pr?t.chartContainer.measuredHeight:t.seriesContainer.measuredHeight),a.maxHeight=e,a.invalidateLayout()}),re.debounceTime)}function $H(a,t){let{position:e}=t;e===st.Top||e===st.Bottom?a.contentAlign="center":a.contentAlign="none"}function OH(a,t){let{legend:e}=a;e.events.on(Ie.DataItemsValidated,()=>{e.dataItems.length>0&&F1(a,t)})}function EH(a,t){t===st.Right||t===st.Left?a.width=Number.NaN:a.maxWidth=Number.MAX_SAFE_INTEGER}function T1(a,t){let e=si.pointer;t===!0?(a.itemContainers.template.clickable=!1,a.itemContainers.template.focusable=!1,e=si.default):(a.itemContainers.template.clickable=!0,a.itemContainers.template.focusable=!0),a.itemContainers.values.forEach(i=>{i.cursorOverStyle=e})}function MH(a,t){let e=new oc;a.legend=e,BH(e);let i=SH(e);return TH(e),pH(e),PH(e,a),DH(e),wH(e),OH({legend:e,legendTitle:i},ze(t)),kH(e,a),cH(a,i),gH(e),a.legend.events.on(Ie.ChildAdded,()=>{let r=ye(a.uid,"options");T1(e,r?.togglingLegendItemsDisabled)}),{legend:e,legendTitle:i}}function Dw(a){let{legendElements:t,seriesConfig:e,webChartLegend:i}=a,{legend:r,legendTitle:s}=t,n=r.baseSprite,o=(n===void 0?!0:ex(e))&&i?.visible!==!1;if(n&&i&&o){let{position:l=re.legendProperties.position}=i;Ui(r,!0),FH({legendConfig:i,legendTitle:s}),LH(r),IH(a),$H(r,i),F1(t,ze(e)),r.position=l,EH(r,l),yH(r,i),T1(r,ye(n.uid,"options")?.togglingLegendItemsDisabled)}else r.position=st.Right,r.width=0,Ui(r,!1)}function RH(a){let{chart:t,chartConfig:e,seriesIndex:i,axisList:r=[],queryObject:s,selectionTheme:n,ignoreSmoothRenderingLimit:o,errorStrings:l}=a,h=e.series.length,{rotated:u}=e,c=e.series[i],{y:d,name:A,id:p,assignToSecondValueAxis:f}=c,m=new Ti;m.id=p,_A(m,A);let g,y;u!==!0?(g=r[0],y=f===!0&&r[2]?r[2]:r[1]):(g=f===!0&&r[2]?r[2]:r[0],y=r[1]),g!==void 0&&(m.xAxis=g),y!==void 0&&(m.yAxis=y);let x=bn({chart:t}),w=It(e.series),S=w===ke.BarAndLineSplitByNoAggregation?`${d.toString()}_${vh({where:c.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:[d].flat()[0];x?m.dataFields.valueX=S:m.dataFields.valueY=S;let F=x?r[1]:r[0];if(F!==void 0){let O=c1(F,x);m.dataFields[O]=re.xAxisField}m.dataFields.customValue=c?.query?.where;let T=$s(s);P1({series:m,seriesConfig:c,seriesIndex:i,chartSubType:w,colorMatch:e.colorMatch===!0,rendererType:tg(e.chartRenderer,T?.renderer)}),D1(c,m);let L=Cw({chart:t,lineSeries:m,applyPropertiesToClones:!1});return v1(L,m),aH(m),Xc({element:L,customSelectionTheme:n}),Qf({chart:t,element:L,queryObject:s,errorStrings:l}),IQ({chart:t,numberOfChartSeries:h,series:m,seriesType:V.LineSeries,marker:L,ignoreSmoothRenderingLimit:o}),Pw(m),Wc(m),m}function UH(a){let{series:t,seriesIndex:e,chartSubType:i,seriesConfig:r,colorMatch:s,lineColor:n,rendererType:o}=a,l=zr(t),h=!1,u;if(l!==void 0){r.markerVisible!==!1&&r.visible!==!1?t.bulletsContainer.show():t.bulletsContainer.hide();let{markerSymbol:c}=r;c===void 0&&(c=Gb(),c.color=n),s?c.color=n:c.color??=n;let d=new Set,A;_v({element:l,markerSymbol:c}),l.clones.each(p=>{if(p.dataItem instanceof Go)_v({element:p,markerSymbol:c}),p.states.getKey(ia.CustomActive)?.reset(),p.states.getKey(ia.CustomInactive)?.reset();else{let f=p.dataItem?.dataContext,m=nn({seriesConfig:r,dataItem:f,chartSubType:i,colorMatch:s,rendererType:o}),g=du({seriesConfig:r,seriesIndex:e,seriesSymbol:c,element:p,colorMatch:s,rendererSymbol:m});u=g.symbolWithColorInfo,A=g.stylingInfo,gA({element:p,stylingInfo:A}),d.add(JSON.stringify(A))}}),h=d.size>1,h||gA({element:l,stylingInfo:A})}return h?void 0:u}function VH(a){let{series:t,seriesConfig:e,chartSubType:i,colorMatch:r,rendererType:s}=a,n;return t.dataItems?.values.every(o=>{let l=!0,h=o.dataContext;return n=nn({seriesConfig:e,dataItem:h,chartSubType:i,colorMatch:r,rendererType:s}),n!==void 0&&(l=!1),l}),n}function P1(a){let{series:t,seriesIndex:e,seriesConfig:i,chartSubType:r,colorMatch:s,rendererType:n}=a,o=t,l=VH({series:o,seriesConfig:i,chartSubType:r,colorMatch:s,rendererType:n}),h=du({seriesConfig:i,seriesIndex:e,seriesSymbol:i.lineSymbol??Yb(e),element:o,colorMatch:s,rendererSymbol:l});return Ui(o,i.visible),h.symbolWithColorInfo}function D1(a,t){a.showArea===!0?a.areaColor!==void 0?(t.fill=vn(a.areaColor),t.fillOpacity=t.fill.alpha===0?0:1):(t.fill=Ne(t.stroke.hex,1),t.fillOpacity=re.lineSeries.areaOpacity):t.fillOpacity=0}function L1(a){let{series:t,seriesIndexMapper:e,seriesSymbolMapForEvent:i,seriesIndex:r,colorMatch:s,rendererType:n}=a,o=a.seriesConfig,l=ye(t.chart.uid,"config"),h=l?.series.length??0,u=It(l?.series);Ui(t,o.visible);let c=P1({series:t,seriesConfig:o,seriesIndex:r,chartSubType:u,colorMatch:s,rendererType:n}),d=UH({series:t,seriesIndex:r,seriesConfig:o,chartSubType:u,colorMatch:s,lineColor:c.color,rendererType:n});i.set(e.get(o.id)??r,{lineSymbol:c,markerSymbol:d}),D1(o,t),i.size===h&&(an({data:i,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)}),t.chart.feedLegend())}function NH(a){let{seriesConfig:t,lineSeries:e,isRotated:i}=a;t.lineSmoothed===!0?e.smoothing=i?Qb.MonotoneY:Qb.MonotoneX:e.smoothing=re.lineSeries.lineSmoothedKind}function QH(a,t){let{connectLines:e,temporalBinning:i}=t,r=i?.nullPolicy;a.connect=e!==!1&&r!==Hb.Null}function HH(a){let{seriesConfig:t,series:e,axes:i,rotationChanged:r,seriesIndex:s,fieldList:n,stackedType:o,queryObject:l,options:h,utilsStrings:u}=a,{visible:c,name:d}=t,A=i[1].valueFormat,p=ye(e.chart.uid,"config"),f=bn({config:p}),m=It(p?.series);e.id=t.id,Ui(e,c);let g=d,y=e.dataFields?.customValue??"";(m===ke.BarAndLineSplitBy||m===ke.BarAndLineSplitByNoAggregation)&&(g=rg({queryObject:l,fieldName:Tn(y),fieldValue:g})??g),_A(e,g),ww({series:e,seriesConfig:t,rotationChanged:r,stackedType:o,isRotated:f}),QH(e,t),$v({styleCallback:()=>L1(a),series:e,seriesConfig:t}),NH({seriesConfig:t,lineSeries:e,isRotated:f}),x1({series:e,seriesConfig:t,fieldList:n,queryObject:l,seriesIndex:s,setTimeBinningInfoWhenNotProvided:h?.setTimeBinningInfoWhenNotProvided,utilsStrings:u,tooltipFormatter:h?.tooltipFormatter}),nH({series:e,seriesType:V.LineSeries,stackedType:o,dataLabelsConfig:t.dataLabels,yAxisValueFormat:A,customDataLabelFormatter:h?.dataLabelFormatter})}function Mv(a,t){let e=a.series.values.find(s=>s.id===`${t}_${ji.Top}`),i=a.series.values.find(s=>s.id===`${t}_${ji.Median}`),r=a.series.values.find(s=>s.id===`${t}_${ji.Bottom}`);return{topStepLineSeries:e,medianStepLineSeries:i,bottomStepLineSeries:r}}function Hf(a,t){return a.series.values.find(e=>e.id===`${t}_${ji.Outliers}`)}function Lw(a,t){return(a??re.boxPlot.boxPlotOutliersVisibility)&&t!==!1}function jH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=oa(i),h=i.series[r],[u,c]=e,d=new Cr;return d.hoverable=!0,l||(Xc({element:d.columns.template,customSelectionTheme:s}),Qf({chart:t,element:d.columns.template,queryObject:n,errorStrings:o})),d.id=h.id,u!==void 0&&(d.xAxis=u),c!==void 0&&(d.yAxis=c),d.simplifiedProcessing=!0,d.columns.template.applyOnClones=!0,d.riseFromOpenState.reset(),d.riseFromPreviousState.reset(),d.dropFromOpenState.reset(),d.dropFromPreviousState.reset(),_A(d,h.name),Wc(d),d}function zC(a){let{axisList:t=[],chartConfig:e,seriesIndex:i,type:r,selectionTheme:s}=a,n=e.series[i],[o,l]=t,h=new Aa;return h.hoverable=!0,h.id=`${n.id}_${r}`,o!==void 0&&(h.xAxis=o),l!==void 0&&(h.yAxis=l),h.noRisers=!0,h.simplifiedProcessing=!0,Xc({element:h.segments.template,customSelectionTheme:s}),h.hiddenInLegend=!0,Wc(h),h}function WH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=i.series[r],h=oa(i),[u,c]=e,d=new Ti;Zn(d.uid,{isBoxPlotOutliersSeries:!0}),d.id=`${l.id}_${ji.Outliers}`,u!==void 0&&(d.xAxis=u),c!==void 0&&(d.yAxis=c),d.simplifiedProcessing=!0,d.hiddenInLegend=!0,d.strokeOpacity=0;let A=Cw({chart:t,lineSeries:d});return h||(Xc({element:A,customSelectionTheme:s}),Qf({chart:t,element:A,queryObject:n,errorStrings:o})),Wc(d),d}function CA(a){let{chartConfig:t,seriesConfig:e,meanLineSeries:i,candleStickSeries:r,topStepLineSeries:s,medianStepLineSeries:n,bottomStepLineSeries:o,outliersSeries:l,creation:h=!1,rotationChanged:u,outliersVisibilityChanged:c,standardizeValuesVisibilityChanged:d}=a,{x:A,y:p}=e,f=h||u===!0||d===!0,m=f||c===!0,g=f,y=f;if(t!==void 0){let{showOutliers:x,standardizeValues:w,showMean:S}=t,F=bn({config:t});if(i instanceof Ti&&y){let P=It(t.series),Q=e?.query?.where,G=Zi({y:P===ke.BoxPlotMultiFieldsAndCategory?p:void 0,chartSubType:P,splitBy:Q,showOutliers:x,standardizeValues:pd(P)?w:!1,key:Yt.Average});F?(i.dataFields.valueX=G,i.dataFields.categoryY=A):(i.dataFields.valueY=G,i.dataFields.categoryX=A),i.dataFields.customValue=Q}let T=og(t),L=It(T.series),O=S===!0?void 0:e?.query?.where,I={y:L===ke.BoxPlotMultiFieldsAndCategory?p:void 0,chartSubType:L,splitBy:O,showOutliers:x,standardizeValues:pd(L)?w:!1};if(m){if(r instanceof Cr){let P=Zi({...I,key:Yt.Min}),Q=Zi({...I,key:Yt.FirstQuartile}),G=Zi({...I,key:Yt.Max}),Y=Zi({...I,key:Yt.ThirdQuartile});F?(r.dataFields.lowValueX=P,r.dataFields.openValueX=Q,r.dataFields.highValueX=G,r.dataFields.valueX=Y,r.dataFields.categoryY=A):(r.dataFields.lowValueY=P,r.dataFields.openValueY=Q,r.dataFields.highValueY=G,r.dataFields.valueY=Y,r.dataFields.categoryX=A),r.dataFields.customValue=O}if(s instanceof Aa&&n instanceof Aa&&o instanceof Aa){let P=Zi({key:Yt.Max,...I}),Q=Zi({key:Yt.Median,...I}),G=Zi({key:Yt.Min,...I});F?(s.dataFields.valueX=P,n.dataFields.valueX=Q,o.dataFields.valueX=G,s.dataFields.categoryY=A,n.dataFields.categoryY=A,o.dataFields.categoryY=A):(s.dataFields.valueY=P,n.dataFields.valueY=Q,o.dataFields.valueY=G,s.dataFields.categoryX=A,n.dataFields.categoryX=A,o.dataFields.categoryX=A),s.dataFields.customValue=O,o.dataFields.customValue=O,n.dataFields.customValue=O}}if(l instanceof Ti&&g){let P=Zi({...I,key:Yt.Outlier});F?(l.dataFields.valueX=P,l.dataFields.categoryY=A):(l.dataFields.valueY=P,l.dataFields.categoryX=A),l.dataFields.customValue=O,l.invalidateRawData()}let U=i?.chart??r?.chart;U!==void 0&&(m||y)&&U.invalidateRawData()}}function XH(a){let{chart:t,axisList:e=[],chartConfig:i,seriesIndex:r,selectionTheme:s,queryObject:n,errorStrings:o}=a,l=i.series[r],[h,u]=e,c=new Ti;Zn(c.uid,{isBoxPlotMeanLineSeries:!0}),c.id=l.id,h!==void 0&&(c.xAxis=h),u!==void 0&&(c.yAxis=u),c.simplifiedProcessing=!0;let d=Cw({chart:t,lineSeries:c});return Xc({element:d,customSelectionTheme:s}),Qf({chart:t,element:d,queryObject:n,errorStrings:o}),Wc(c),tH(c),CA({chartConfig:i,seriesConfig:l,meanLineSeries:c,creation:!0}),c}function zH(a){let{chartConfig:t,seriesIndex:e}=a,i=t.series[e],r=ze([i]),s=[];if(r===V.BoxPlotSeries){let n=jH(a),o=zC({...a,type:ji.Top}),l=zC({...a,type:ji.Median}),h=zC({...a,type:ji.Bottom}),u=WH(a);JQ(n),eH(u,n),CA({chartConfig:t,seriesConfig:i,candleStickSeries:n,topStepLineSeries:o,medianStepLineSeries:l,bottomStepLineSeries:h,outliersSeries:u,creation:!0}),s.push(n,o,l,h,u)}else if(r===V.LineSeries){let n=XH(a);s.push(n)}return s}function GH(a){let{candleStickSeries:t,seriesConfig:e,stylingInfo:i,chartSubType:r,colorMatch:s,rendererType:n}=a;if(i!==void 0){let o={...i},l=s1({data:t.chart.data,colorMatch:s,chartSubType:r,rendererType:n});i?.outline!==void 0&&l&&(o.outline.stroke=Nc(re.boxPlot.boxPlotWhiskersColor));let{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t.chart,t.id);if(h!==void 0&&u!==void 0&&c!==void 0&&o.outline!==void 0){o.outline.strokeWidth=re.boxPlot.boxPlotLineWidth,fA(h,o.outline),fA(u,o.outline),fA(c,o.outline);let d=e.visible!==!1;Ui(h,d),Ui(u,d),Ui(c,d)}}}function YH(a){let{candleStickSeries:t,seriesConfig:e,showOutliers:i,seriesSymbol:r}=a;if(r!==void 0){let s=Hf(t.chart,t.id);if(s!==void 0){let n=zr(s);if(n!==void 0){let o=Lw(i,e.visible),l={type:Rt.SMS,style:YA.Circle,color:r.color,size:re.boxPlot.boxPlotOutliersSize};n.clones.each(h=>{let u=t.dataItems.values.find(c=>(c.categories.categoryX??c.categories.categoryY)===(h.dataItem?.categories.categoryX??h.dataItem?.categories.categoryY))?.column?.fill;_v({element:h,markerSymbol:{...l,color:RI(u)??l.color},visible:o})})}}}}function KH(a){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:s,colorMatch:n,showMean:o,rendererType:l}=a,h,u,c,d=new Set,A=!1,p=e.fillSymbol??Wm(i);if(t.columns.length===0?(c=du({seriesConfig:e,seriesIndex:i,seriesSymbol:p,element:new Ee,colorMatch:n,isChartFillSymbol:!0}),h=c.symbolWithColorInfo,u=c.stylingInfo):t.columns.each(f=>{c=du({seriesConfig:e,seriesIndex:i,seriesSymbol:p,element:f,colorMatch:n,isChartFillSymbol:!0,rendererSymbol:o?void 0:nn({dataItem:f.dataItem?.dataContext,seriesConfig:e,chartSubType:s,colorMatch:n,rendererType:l})}),h=c.symbolWithColorInfo,u=c.stylingInfo,d.add(JSON.stringify(h))}),A=d.size>1,r>1){let f=t.legendDataItem?.marker.children.getIndex(0);f!==void 0?gA({element:f,stylingInfo:u}):t.chart.legend.events.once(Ie.Validated,()=>{gA({element:t.legendDataItem?.marker.children.getIndex(0),stylingInfo:u}),t.chart.legend.invalidate()})}return{multipleSymbolsForOneSeries:A,seriesSymbol:h,stylingInfo:u}}function ZH(a){let{series:t,showOutliers:e,colorMatch:i,seriesIndex:r,seriesIndexMapper:s,seriesSymbolMapForEvent:n,seriesConfig:o,rendererType:l,queryObject:h}=a,u=ye(t.chart.uid,"config"),c=oa(u),d=u?.series.length??0,A=It(u?.series),p=!1,f;if(t instanceof Cr&&o.type===V.BoxPlotSeries){let m=KH({series:t,seriesConfig:o,seriesIndex:r,numberOfSeries:d,chartSubType:A,colorMatch:i,showMean:c,rendererType:l}),{stylingInfo:g}=m;({multipleSymbolsForOneSeries:p,seriesSymbol:f}=m),n.set(s.get(o.id)??r,p?void 0:{fillSymbol:f??o.fillSymbol}),GH({candleStickSeries:t,seriesConfig:o,colorMatch:i,stylingInfo:g,chartSubType:A,rendererType:l}),YH({candleStickSeries:t,seriesConfig:o,showOutliers:e,seriesSymbol:f})}else t instanceof Ti&&o.type===V.LineSeries&&L1({series:t,seriesConfig:o,seriesIndexMapper:s,seriesSymbolMapForEvent:n,seriesIndex:r,colorMatch:i,rendererType:l});n.size===d&&an({data:n,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)})}function qH(a){let{numberOfSeries:t,chart:e,showMean:i}=a,r=bn({chart:e}),s=r?e.yAxes.getIndex(0)?.renderer:e.xAxes.getIndex(0)?.renderer;if(s!==void 0){let{cellStartLocation:n,cellEndLocation:o}=s,l=n/(i===!0?1:t),h=e.series.values.filter(u=>u instanceof Cr);h.forEach((u,c)=>{let d=n+c/h.length*(o-n)+l,A=n+(c+1)/h.length*(o-n)-l,{topStepLineSeries:p,medianStepLineSeries:f,bottomStepLineSeries:m}=Mv(e,u.id);p!==void 0&&(p.startLocation=d,p.endLocation=A),f!==void 0&&(f.startLocation=d,f.endLocation=A),m!==void 0&&(m.startLocation=d,m.endLocation=A);let g=Hf(e,u.id);if(g!==void 0){let y=(d+A)/2;r?g.dataItems.template.locations.categoryY=y:g.dataItems.template.locations.categoryX=y}})}}function JH(a){let{outliersSeries:t,chartData:e,dataWasUpdated:i,rotationChanged:r,seriesReordered:s,seriesWereReinitialized:n}=a;(r||i||s||n)&&(t.data=e?.outliers??[])}function e2(a){let{meanLineSeries:t,chartData:e,rotationChanged:i,sortChanged:r,dataWasUpdated:s,seriesReordered:n,seriesWereReinitialized:o}=a;(i||s||r||n||o)&&(t.data=e?.meanLines??[],t.invalidateData())}function t2(a){let{chart:t,chartConfig:e,seriesConfig:i,chartData:r,candleStickSeriesId:s,showOutliers:n,dataWasUpdated:o,rotationChanged:l,seriesReordered:h,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c,seriesWereReinitialized:d}=a,A=Hf(t,s);if(A!==void 0){let p=zr(A);if(p!==void 0){let f=Lw(n,i.visible);p.disabled=!f,JH({outliersSeries:A,chartData:r,dataWasUpdated:o,rotationChanged:l,seriesReordered:h,seriesWereReinitialized:d})}CA({chartConfig:e,seriesConfig:i,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c,rotationChanged:l,outliersSeries:A})}}function i2(a){let{meanLineSeries:t,seriesConfig:e,chartData:i,dataWasUpdated:r,seriesReordered:s,sortChanged:n,rotationChanged:o,chartConfig:l,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u}=a;_A(t,e?.name),CA({chartConfig:l,seriesConfig:e,meanLineSeries:t,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u,rotationChanged:o}),e2({meanLineSeries:t,chartData:i,dataWasUpdated:r,seriesReordered:s,sortChanged:n,rotationChanged:o})}function r2(a){let{series:t,chartConfig:e,seriesConfig:i,rotationChanged:r,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n}=a;_A(t,i?.name),t.hiddenInLegend=oa(e),CA({chartConfig:e,seriesConfig:i,candleStickSeries:t,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:r})}function s2(a){let{chart:t,chartConfig:e,seriesConfig:i,candleStickSeriesId:r,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:o}=a,l=i.visible!==!1,{topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c}=Mv(t,r);h!==void 0&&Ui(h,l),u!==void 0&&Ui(u,l),c!==void 0&&Ui(c,l),CA({chartConfig:e,seriesConfig:i,outliersVisibilityChanged:s,standardizeValuesVisibilityChanged:n,rotationChanged:o,topStepLineSeries:h,medianStepLineSeries:u,bottomStepLineSeries:c})}function a2(a){let{chart:t,series:e,chartData:i,utilsStrings:r,dataWasUpdated:s,sortChanged:n,seriesReordered:o,fieldList:l,outliersVisibilityChanged:h,showMean:u,seriesConfig:c,showOutliers:d,standardizeValuesVisibilityChanged:A,rotationChanged:p,seriesWereReinitialized:f,options:m,queryObject:g}=a,{tooltipFormatter:y}=m??{};qH({numberOfSeries:a.numberOfSeries,chart:t,showMean:u});let x=ye(t.uid,"config");if(x!==void 0){if(e instanceof Cr&&c.type===V.BoxPlotSeries){let{id:w}=e;r2({series:e,chartConfig:x,seriesConfig:c,rotationChanged:p,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A}),s2({chart:t,chartConfig:x,seriesConfig:c,candleStickSeriesId:w,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A,rotationChanged:p}),t2({chart:t,chartConfig:x,seriesConfig:c,chartData:i,showOutliers:d,candleStickSeriesId:w,dataWasUpdated:s,rotationChanged:p,seriesReordered:o,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A,seriesWereReinitialized:f})}else e instanceof Ti&&c.type===V.LineSeries&&i2({chartConfig:x,chartData:i,meanLineSeries:e,seriesConfig:c,dataWasUpdated:s,seriesReordered:o,sortChanged:n,rotationChanged:p,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:A});$v({styleCallback:()=>ZH(a),series:e,seriesConfig:c}),sH({series:e,seriesConfig:c,fieldList:l,tooltipFormatter:y,utilsStrings:r,queryObject:g})}}function n2(a){let t=a.series.getIndex(0);if(t!==void 0){let e=!1;t.slices.each(i=>{i.isActive&&(e=!0),Yn({element:i,selected:!1,backToDefaultState:!0})}),e&&a.feedLegend()}}function o2(a,t=!0){let e;a.series.each((i,r)=>{if(!t||i.visible){e=Dv(i,r);let s=[];if(e===V.BarSeries)s=i.columns?.values;else if(e===V.LineSeries)s=zr(i)?.clones?.values;else if(e===V.BoxPlotSeries){if(i instanceof Cr)s.push(...i.columns.values);else if(i instanceof Aa)s.push(...i.segments.values);else if(i instanceof Ti){let n=zr(i)?.clones?.values;n!==void 0&&s.push(...n)}}s!==void 0&&s.forEach(n=>{Yn({element:n,selected:!1,backToDefaultState:!0})})}})}function wA(a){let{chart:t,selectionSource:e,clearOnlyVisibleSeries:i,disposeStyleAndSelection:r}=a,s=ye(t.uid,"currentSelectionDataItems");r!==!1&&d1(t,"updateSelectionCallbackDisposer"),ai(t.uid,{currentSelectionDataItems:void 0,currentSelectionOIDs:void 0,currentSelectionIndexes:void 0,computedSelectionDataItems:void 0,computedSelectionIndexes:void 0,pendingSelectionQueries:!1}),qn(t)&&(t instanceof Vt?o2(t,i??!0):t instanceof pr&&n2(t)),s&&Vu({data:{selectionSource:e??Tr.ClearSelection},htmlContainer:t.htmlContainer})}function l2(a){gx(),nx(a.htmlContainer),wA({chart:a})}function h2(a){let{chart:t,chartType:e,showMean:i}=a;return t.series.values.filter(r=>e!==V.BoxPlotSeries||!i&&r instanceof Cr||i&&sa(r.uid,"isBoxPlotMeanLineSeries")).every(r=>sa(r.uid,"isSelectionApplied")===!0)}function u2(a){a.series.each(t=>Zn(t.uid,{isSelectionApplied:void 0}))}function I1(a,t){let e=ye(a.uid,"actionMode");if((e===Ut.MonoSelection||e===Ut.None)&&t.length>1)wA({chart:a});else{let i=a instanceof pr;t.forEach(r=>{Yn({element:r,useNativeState:i,selected:!0})})}}function c2(a){let{chart:t,chartConfig:e,series:i,options:r,elementsToApplySelectionTo:s,selectionDataItems:n,layerOidField:o,xAxisField:l,yAxisField:h,queryObject:u}=a,c=ze(e.series),d=It(e.series),A=Eo(e),p=[],f=[],m=[],g=Mo(e.series),y=i instanceof Qr?i.dataFields?.customValue??"":"";return s.forEach(x=>{if(!(x instanceof Go)){let w=x.dataItem?.dataContext;if(w!==void 0&&(c===V.BoxPlotSeries&&w[re.boxPlot.boxPlotOutlierId]!==!0||d===ke.BarAndLineMultiFields)&&(w=th({dataContext:w,yAxisField:h,yList:g,xAxisField:l,splitBy:y,chartType:c,chartSubType:d,showOutliers:A,isFeatureCollectionLayer:Oo(u)})),Lv({elementDataContext:w,options:r,selectionDataItems:n,layerOidField:o,xAxisField:l,yAxisField:h,chartType:c,splitBy:y,chartSubType:d,showOutliers:A}))if(p.push(x),x.dataItem!==void 0&&f.push(x.dataItem.index),x?.dataItem instanceof Wa&&w!==void 0)m.push(w);else{let S=new Set;c===V.PieSeries&&ih(w)?(Nf({groupOfSlicesDataContext:w})??[]).forEach(F=>{n.forEach(T=>{_w({layerOidField:o,sliceDataContext:F,selectionDataContext:T,xAxisField:l})&&S.add(F)})}):S.add(w),Array.from(S)?.forEach(F=>{let T=th({dataContext:F,yAxisField:h,yList:g,xAxisField:l,splitBy:y,chartType:c,chartSubType:d,showOutliers:A,isFeatureCollectionLayer:Oo(u)});T!==void 0&&m.push(T)})}else Yn({element:x,useNativeState:t instanceof pr,selected:!1})}}),I1(t,p),{selectedIndexes:f,newSelectionDataItems:m}}function d2(a){let{chart:t,selectionIndexes:e,queryObject:i}=a,r=[],s=[],n=ye(t.uid,"config"),o=Eo(n),l=Mo(n?.series??[]),h=It(n?.series);return t.series.each((u,c)=>{if(n&&u.visible){let d=n.series[0].x,A=xu(u),p=u instanceof Qr?u.dataFields?.customValue??"":"",f=Dv(u,c),m=e.get(c);if(m!==void 0){let g;if(u instanceof Xi?g=u.columns:u instanceof ws?g=u.slices:g=zr(u)?.clones,g!==void 0){let{indexesToSelect:y}=m;g.each((x,w)=>{if(x&&(y===void 0||y.includes(w))){let S;f===V.BoxPlotSeries&&x.dataItem instanceof Wa?S=x.dataItem.dataContext:x.dataItem instanceof Go||(S=th({dataContext:x.dataItem?.dataContext,yList:l,yAxisField:A,xAxisField:d,splitBy:p,chartType:f,chartSubType:h,showOutliers:o,isFeatureCollectionLayer:Oo(i)})),S!==void 0&&r.push(S),s.push(x)}else Yn({element:x,useNativeState:t instanceof pr,selected:!1})})}}}}),I1(t,s),r}function A2(a){let{series:t,chartType:e,showMean:i}=a,r;switch(e){case V.ComboLineAndBarSeries:if(t instanceof Xi)r=t.columns.values;else if(t instanceof Ti){let s=zr(t);s!==void 0&&(r=s.clones.values)}break;case V.BarSeries:t instanceof Xi&&(r=t.columns.values);break;case V.LineSeries:if(t instanceof Ti){let s=zr(t);s!==void 0&&(r=s.clones.values)}break;case V.PieSeries:r=t.slices.values;break;case V.BoxPlotSeries:if(t.chart instanceof Vt){if(t instanceof Cr&&i!==!0){r=[...t.columns.values];let s=Hf(t.chart,t.id);if(s!==void 0&&s.visible){let n=zr(s);n!==void 0&&r.push(...n.clones.values)}}else if(i===!0&&t instanceof Ti&&sa(t.uid,"isBoxPlotMeanLineSeries")){let s=zr(t);s!==void 0&&(r=s.clones.values)}}break}return r}function p2(a){let{series:t,seriesIndex:e,queryObject:i,options:r,dataWasUpdated:s,sortChanged:n,groupOfSlicesWasUpdated:o,xAxisField:l,yAxisField:h,rotationChanged:u}=a,{filterBySelection:c,selectionData:d,returnSelectionIndexes:A,returnSelectionOIDs:p}=r??{},{selectionIndexes:f}=d??{},{chart:m}=t,g=ye(m.uid,"config"),y=cs(i),x=Eo(g),w=oa(g),S=ze(g?.series);if(c!==!0&&g!==void 0){let F=A2({series:t,chartType:S,showMean:w}),T=It(g?.series),L=$s(i),O=xh(L).idField,I=ye(m.uid,"currentSelectionDataItems"),U=!1,P=!1,Q,G=!1;if(F?.[0]!==void 0){if(r?.viewExtentUpdated!==!0){Q=r?.selectionData?.selectionItems??I;let Y=ye(m.uid,"currentSelectionIndexes");G=wx({itemsA:Q,itemsB:I,isPieFromFields:T===ke.PieFromFields,x:g.series[0].x});let ee=f?.keys.length!==Y?.keys.length||!rn(f,Y);U=n===!0||s===!0||o===!0||u===!0||Q!==void 0&&G;let te=!0;if(f!==void 0&&f.size>0){let{indexesToSelect:le}=f.get(e??0)??{};te=le!==void 0&&le[0]===void 0}P=s===!0||o===!0||u===!0||!te&&ee}if(U&&Q!==void 0&&Q.length>0){let{selectedIndexes:Y,newSelectionDataItems:ee}=c2({chart:m,chartConfig:g,options:r,series:t,elementsToApplySelectionTo:F,selectionDataItems:Q,layerOidField:O,xAxisField:l,yAxisField:h}),te=ye(m.uid,"computedSelectionDataItems")??[];if(te.push(...ee),g.series.length>1&&T!==ke.BarAndLineNoAggregation&&T!==ke.BarAndLineSplitByNoAggregation&&(te=ap({data:te,x:g.series[0].x,splitByField:Tn(g.series[0].query?.where)})),ai(m.uid,{computedSelectionDataItems:te}),A===!0){let le=Array.from(new Set(Y)),z=ye(m.uid,"computedSelectionIndexes");z===void 0&&(z=new Map),le.length===F.length?z.set(e??0,{}):z.set(e??0,{indexesToSelect:le}),ai(m.uid,{computedSelectionIndexes:z})}}else if(f!==void 0&&P)Q=d2({chart:m,selectionIndexes:f,queryObject:i});else{let Y=Q===void 0||Q.length===0,ee=t instanceof Qr?t.dataFields?.customValue??"":"",te=le=>{let z=le.dataItem?.dataContext;return z!==void 0&&S===V.BoxPlotSeries&&z[re.boxPlot.boxPlotOutlierId]!==!0&&(z=th({dataContext:z,yAxisField:h,yList:Mo(g.series),xAxisField:l,splitBy:ee,chartType:S,chartSubType:T,showOutliers:x,isFeatureCollectionLayer:Oo(i)})),Lv({elementDataContext:z,options:r,selectionDataItems:Q??I??[],layerOidField:O,xAxisField:l,yAxisField:h,chartType:S,splitBy:ee,chartSubType:T,showOutliers:x})};F.forEach(le=>{let z=le.isActive||te(le);Yn({element:le,selected:z,useNativeState:m instanceof pr,backToDefaultState:Y})})}}if(Zn(t.uid,{isSelectionApplied:!0}),h2({chart:m,chartType:S,showMean:w})&&(u2(m),G||P)){let Y=ye(m.uid,"computedSelectionDataItems")??Q;Y=Array.from(new Set(Y?.map(te=>JSON.stringify(te)))).map(te=>JSON.parse(te)),Q!==void 0&&ai(m.uid,{currentSelectionDataItems:Y}),d?.selectionOIDs!==void 0&&ai(m.uid,{currentSelectionOIDs:d.selectionOIDs});let ee;if(A===!0&&(ee=ye(m.uid,"computedSelectionIndexes")??f,ee!==void 0&&ai(m.uid,{currentSelectionIndexes:ee})),Y===void 0||Y.length===0)wA({chart:m,selectionSource:Tr.ProgrammaticSelection});else{let te={selectionItems:Y,selectionSource:Tr.ProgrammaticSelection};A===!0&&(te.selectionIndexes=ee),p!==!1&&(te.selectionOIDs=d?.selectionOIDs??ye(m.uid,"currentSelectionOIDs")),y&&(te.selectionPixelTarget=ig({chartConfig:g,layer:i,selectionDataItems:Y})),Vu({data:te,htmlContainer:m.htmlContainer})}ai(m.uid,{computedSelectionIndexes:void 0,computedSelectionDataItems:void 0})}}}function f2(a){let{chart:t,chartConfig:e}=a;for(let i=0;i<t.series.length;i+=1){let r=t.series.getIndex(i);if(r){let s=Rf(r,e);if(s){let n=ze([s]);if(n===V.BoxPlotSeries&&(r=t.series.values.find(o=>o.id===s.id)),r!==void 0){let o=s.x,l=n===V.BoxPlotSeries?s.y.toString():xu(r);EQ({callbackProps:{...a,series:r,seriesIndex:i,xAxisField:o,yAxisField:l},series:r,seriesConfig:s})}}}}}async function jf(a){let{chart:t,listSelectedElements:e,selectionSource:i,queryObject:r,errorStrings:s}=a,n=ye(t.uid,"options"),o=ye(t.uid,"config"),l=cs(r);if(o)if(e.length===0)wA({chart:t,selectionSource:i,clearOnlyVisibleSeries:!1,disposeStyleAndSelection:!1});else try{d1(t,"updateSelectionCallbackDisposer");let h=Eo(o),u=[],c=[],d=[],A=new Map,{xAxisField:p}=e[0]??{},f=ze(o?.series),m=It(o?.series),g=Mo(o?.series??[]),y=_a(r).find(w=>w.name===p)?.type;if(e.forEach(w=>{let{elementDataContext:S,yAxisField:F,splitBy:T}=w,L=th({dataContext:S,yAxisField:F,yList:g,xAxisField:p,splitBy:T,chartType:f,chartSubType:m,showOutliers:h,isFeatureCollectionLayer:Oo(r)});L!==void 0&&c.push(L);let{seriesIndex:O,elementIndex:I}=w;if(I!==void 0){let U=A.get(O)?.indexesToSelect??[];U.push(I),A.set(O,{indexesToSelect:Array.from(new Set(U))})}if(!l&&S!==void 0){let U=S[Ou.uniqueIdsName]!==void 0?[S[Ou.uniqueIdsName]].flat():[];if(U.length>0)d.push(...U);else if(n?.returnSelectionOIDs!==!1){let P=Bx({dataContext:S,options:n,xAxisField:p,yAxisField:F??"",splitBy:T,xAxisFieldType:y,chartConfig:o,queryObject:r});u.push(P)}}}),!l&&n?.returnSelectionOIDs!==!1&&u.length>0){let w={...ye(t.uid,"queryConfig")};delete w.groupByFieldsForStatistics,delete w.orderByFields,delete w.outStatistics;let S=await r1({whereList:u,queryObject:r,queryConfig:w,errorStrings:s});if(u.length===e.length)d=S;else for(let F=0;F<S.length;F+=1)d.push(S[F])}o.series.length>1&&m!==ke.BarAndLineNoAggregation&&m!==ke.BarAndLineSplitByNoAggregation&&(c=ap({data:c,x:o.series[0].x,splitByField:Tn(o.series[0].query?.where)})),ai(t.uid,{currentSelectionDataItems:c,currentSelectionOIDs:d,currentSelectionIndexes:A});let x={selectionItems:c,selectionSource:i};n?.returnSelectionIndexes===!0&&(x.selectionIndexes=A),n?.returnSelectionOIDs!==!1&&(x.selectionOIDs=d),l&&(x.selectionPixelTarget=ig({chartConfig:o,layer:r,selectionDataItems:c})),Vu({data:x,htmlContainer:t.htmlContainer})}catch(h){ai(t.uid,{pendingSelectionQueries:!1});let{httpStatus:u}=h instanceof Tl?h.details.details:h.details??{};if(u===429)l2(t);else throw h}ai(t.uid,{pendingSelectionQueries:!1})}function m2(a){let{axis:t}=a,e=t.chart;return{axis:t,chart:e}}async function g2(a,t,e){let i=a.target,{axis:r,chart:s}=m2(i),n=[],{seriesDataItems:o}=a.target.dataItem;Object.keys(o).forEach(d=>{if(Object.hasOwn(o,d)){let A=o[d];for(let p of A)if(p instanceof Bs)n.push(p.column);else{let f=p.sprites.find(m=>!(m instanceof Mi));f!==void 0&&n.push(f)}}});let l=Ov(a,s),h=r instanceof Ct||r instanceof $t,u=[],c=ye(s.uid,"config");if(c){let d=c.series[0].x??"";s.series.each((A,p)=>{let f;if(A instanceof Xi?f=A.columns:f=zr(A)?.clones,A.visible){let m=xu(A),g=A.dataFields?.customValue??"";f?.each((y,x)=>{let w=n.includes(y);Yn({element:y,selected:w,multiSelect:l,isDateOrCategoryAxis:h})&&u.push({element:y,elementDataContext:y.dataItem?.dataContext,yAxisField:m,xAxisField:d,splitBy:g,seriesIndex:p,elementIndex:x,chartConfig:c})})}}),await jf({chart:s,listSelectedElements:u,selectionSource:Tr.SelectionByClick,queryObject:t,errorStrings:e})}}function y2(a){let{axis:t,queryObject:e,errorStrings:i}=a;if(qn(t.renderer.labels.template)){t.renderer.labels.template.events.on(Ie.Hit,async s=>{t.renderer.labels.template.events.isEnabled(Ie.Hit)&&await g2(s,e,i)});let r=ye(t.chart.uid,"filterBySelection")===!0?si.default:si.pointer;ew(t,r)}}function wv(a,t){if(qn(a?.renderer?.labels?.template)&&(a instanceof $t||a instanceof Ct))if(t)a.renderer.labels.template.events.disableType(Ie.Hit),ew(a,si.default);else{a.renderer.labels.template.events.enableType(Ie.Hit);let e=ye(a.chart.uid,"filterBySelection")===!0?si.default:si.pointer;ew(a,e)}}var gr={Guides:"guides",Ticks:"ticks",GaugeFirstAndLastGuides:"firstAndLast",GaugeTicksWithLabels:"gaugeTicksWithLabels"};function mu(a){let{chart:t,label:e,labelType:i}=a,r=Number.NaN;switch(i){case Wt.GuideLabel:!(t instanceof Ys)&&t instanceof Vt&&(e.rotation===90||e.rotation===270?r=t.seriesContainer.measuredHeight:r=t.seriesContainer.measuredWidth);break;case Wt.XAxisTitle:t instanceof Vt&&(r=t.seriesContainer.measuredWidth);break;case Wt.YAxisTitle:t instanceof Vt&&(r=t.seriesContainer.measuredHeight);break;case Wt.ChartTitle:case Wt.ChartSubTitle:case Wt.ChartFooter:r=t.measuredWidth-20;break}r>0&&(e.maxWidth=r,t.invalidateLabels(),t instanceof Vt&&(t.xAxes.getIndex(0)?.invalidateLabels(),t.xAxes.getIndex(1)?.invalidateLabels(),t.yAxes.getIndex(0)?.invalidateLabels(),t.yAxes.getIndex(1)?.invalidateLabels()))}function Uf(a){let{chart:t,labelType:e}=a;mu(a);let i=e===Wt.YAxisTitle?1:0,r=Is(()=>mu(a),re.debounceTime);t.events.on(Ie.Validated,r,i),(e===Wt.YAxisTitle||e===Wt.XAxisTitle)&&t instanceof Vt&&t.seriesContainer.events.on(Ie.SizeChanged,r,i)}function Bv(a,t){a.events.on(Ie.Validated,Is(()=>{t.visible=a.measuredWidth!==0},re.debounceTime))}function v2(a,t){a.chart instanceof Ys||(t.adapter.add("dx",e=>{let i=e;return(t.rotation===90||t.rotation===270)&&(i=t.bbox.height,t.dataItem.value!==t.dataItem.endValue&&(i/=2)),i}),t.padding(0,10,0,10))}function b2(a,t){let e=a.renderer instanceof Hl?new Rn:new Ko;return e.disabled=!0,e.axis=a,Iv(e),fu(e.uid,{isGuide:t}),Uf({chart:a.chart,label:e,labelType:Wt.GuideLabel}),v2(a,e),e}function x2(a){let{label:t,labelConfig:e,guideType:i}=a,r=t.axis.renderer instanceof sr,s;t instanceof Rn||(r?i===Rt.SFS?s=re.verticalSurfaceGuideLabels:s=re.verticalLineGuideLabels:i===Rt.SFS?s=re.horizontalSurfaceGuideLabels:s=re.horizontalLineGuideLabels);let n={...e};n.content.rightToLeft=t.axis.rtl,xn({label:t,labelConfig:n,defaults:s}),t.axis.invalidateLabels()}function _2(a,t,e){let i=e.chart;a.axisFill.tooltip=new fo,a.axisFill.interactionsEnabled=!0,a.axisFill.tooltipPosition=re.guideTooltipPosition,a.axisFill.tooltip.label.wrap=!0,a.axisFill.tooltip.adapter.add("maxWidth",()=>Math.min(re.tooltipWidth,i.seriesContainer.maxWidth)),a.axisFill.tooltip.boundingContainer=i.chartAndLegendContainer,a.axisFill.adapter.add("tooltipHTML",(r,s)=>{let n=r,{dataItem:o,axis:l}=s;if(!(l.renderer instanceof Hl)){let h=Ns(l.uid,"guideTooltipFormatter");if(h!==void 0){let u="",c;o instanceof vo?(u=o.value,c=o.endValue):o instanceof Jo?(u=o.category,c=o.endCategory):o instanceof Uh&&(u=o.date,c=o.endDate),n=h({guideName:o.id??"",start:u,end:c,guideIndex:t})}}return n}),a.axisFill.tooltip.events.on(Ie.Shown,r=>{let s=ye(a.axisFill.axis.chart.uid,"config");if(s!==void 0){let n=ye(a.axisFill.axis.chart.uid,"isRotated"),o=Wf(a.axisFill.axis.renderer,n)?0:1,l=s.axes?.[o]?.guides,{tooltipReverseColor:h}=l?.[t]??{};y1(r.target,h)}})}function C2(a,t){return e=>{let{guideName:i,start:r,end:s,guideIndex:n}=e,{chart:o}=a,l="";if(o!==void 0){let h=ye(o.uid,"config"),u=ye(o.uid,"isRotated"),c=Wf(a.renderer,u)?0:1,d=h?.axes?.[c]?.guides,A=r,p=s;if(a instanceof Ct){let y=new hn,x;if(o!==void 0){let w=ye(a.chart.uid,"formatLocale");y=fl({type:V.DateAxisFormat,iLocale:o.language.locale,formatLocale:w}),x=h?.axes?.[0]?.valueFormat?.intlOptions}A=y.format(r,x),s!==void 0&&(p=y.format(s,x))}else if(a instanceof Qe&&!(r instanceof Date)&&!(s instanceof Date)){let{start:y,end:x}=Iw(a,d?.[n]);Number.isFinite(y)&&(A=y),Number.isFinite(x)&&(p=x);let w=Ns(a.uid,"numberFormatter")??(S=>new Rl().format(S));A=w(A),p!==void 0&&(p=w(p))}else a instanceof $t&&(A=r,p=s);let f=A.toString(),m=p?.toString()??"";!zi(m)&&f!==m?l=Uc(t.guideTooltipLabel,{guideStart:f,guideEnd:m}):l=f;let g=Ra(o.rtl);l=`${i}${g} ${l}`}return l}}function w2(a){let{axis:t,guideTooltipFormatter:e,utilsStrings:i}=a;Ds(t.uid,{guideTooltipFormatter:e??C2(t,i)})}function B2(a){let t=$u.Value;return a instanceof Ct?t=$u.Date:a instanceof $t&&(t=$u.Category),t}function eI(a){let{inputValue:t,axisType:e,axisMin:i,axisMax:r}=a,s=t;if(t!=null)switch(e){case $u.Date:s=t instanceof Date?t:new Date(t);break;case $u.Category:s=t.toString();break;case $u.Value:if(typeof t!="number"){let n=t.toString().trim(),o=ip(n);o!==void 0?i!==void 0&&r!==void 0?s=o/100*(r-i)+i:s=null:s=Number.parseFloat(n)}break}return s}function Iw(a,t){let{start:e,end:i}=t??{},r;if(t!==void 0&&e!==void 0&&e!==null){let s=B2(a),n=a instanceof Qe?a.min:void 0,o=a instanceof Qe?a.max:void 0,l=eI({inputValue:e,axisType:s,axisMin:n,axisMax:o}),h=t.style?.type===Rt.SFS&&i!==null&&i!==void 0?eI({inputValue:i,axisType:s,axisMin:n,axisMax:o}):l;r={isValidGuide:l!=null&&h!=null,start:l,end:h}}else r={isValidGuide:!1,start:void 0,end:void 0};return r}function S2(a){let{axis:t,tickOrGuide:e,numberOfElementsToBeDeleted:i}=a,r=[],s=t.axisRanges.length-1,n=i;for(;n>0&&s>=0;){let o=t.axisRanges.getIndex(s);o!==void 0&&(gs(o.label?.uid,"isGuide")??!1)===!0&&e===gr.Guides&&(r.push(o),n-=1),s-=1}for(let o=0;o<r.length;o+=1)t.axisRanges.removeValue(r[o])}function en(a,t){return a.axisRanges?.values?.filter(e=>{let i=gs(e.label?.uid,"isGuide")??!1,r=gs(e.label?.uid,"isGaugeAxisLabel")??!1,s=!1;switch(t){case gr.Ticks:s=i===!1;break;case gr.Guides:s=i===!0;break;case gr.GaugeTicksWithLabels:s=r===!0&&e.value!==void 0;break;case gr.GaugeFirstAndLastGuides:s=i===!0&&(e.id===re.gaugeFirstLabelId||e.id===re.gaugeLastLabelId);break}return s})??[]}function F2(a,t){let e=a.axisRanges.length;{let r=a.axisRanges.values.findIndex(s=>s.id===re.gaugeFirstLabelId);r!==-1&&(e=r)}let i;return a instanceof $t?i=new Jo:a instanceof Ct?i=new Uh:i=new vo,a.axisRanges.insertIndex(e,i),i.label=b2(a,t),i.axisFill.fillOpacity=1,i.axisFill.disabled=!0,i.grid.strokeOpacity=1,i}function T2(a,t){let e=F2(a,!0);_2(e,t,a),e.tick!==void 0&&(e.tick.disabled=!0),e.label!==void 0&&(e.label.inside=!0),e.grid!==void 0&&(e.grid.disabled=!0)}function P2(a,t){let{start:e,end:i}=t,r=ye(a.uid,"config"),s=ng(r),n=e!==null?e:void 0;n=a.data.find(l=>l[re.originalCategoryValue]===e)?.[s]??n;let o=i!==null?i:void 0;if(o!==void 0)for(let l=a.data.length-1;l>=0;l-=1){let h=a.data[l];if(h[re.originalCategoryValue]===i){o=h[s];break}}return{modifiedStart:n,modifiedEnd:o}}function D2(a,t){let{start:e,end:i}=t;if(e!==void 0){let{chart:r}=a?.component??{},s;if(a instanceof Jo&&r instanceof Vt&&ye(r.uid,"isNonAggregatedChart")===!0){let{modifiedStart:n,modifiedEnd:o}=P2(r,t);s={isValidGuide:!0,start:n??e,end:o??i}}else s=Iw(a.axisFill.axis,t);s.isValidGuide&&(a instanceof Jo?(a.category=`${s.start?.toString()}`,a.endCategory=`${s.end?.toString()}`):a instanceof Uh?(a.date=s.start,a.endDate=s.end):(a.value=s.start,a.endValue=s.end))}}function L2(a,t){a.axisFill.above=t??re.guideAbove,a.grid.above=t??re.guideAbove}function I2(a,t){let{axisFill:e,label:i}=a;if(t!==void 0){if(a.id=t.name,a.visible=t.visible!==void 0?t.visible:a.visible,D2(a,t),t.style.type===Rt.SLS?Ef({element:e,fillSymbol:{type:Rt.SFS,color:t.style?.color,outline:t.style},visible:t.visible}):t.style.type===Rt.SFS&&Ef({element:e,fillSymbol:t.style,visible:t.visible}),L2(a,t.above),t.label!==void 0){let s={type:V.Text,visible:t.visible,content:t.label};x2({label:i,labelConfig:s,guideType:t.style.type})}let r=a.component?.chart;r!==void 0&&mu({chart:r,label:i,labelType:Wt.GuideLabel})}else e.disabled=!0,i.disabled=!0}function k2(a,t){let e=en(a,gr.Guides).length,i=t?.length??e;for(let r=e;r<i;r+=1)T2(a,r)}function $2(a){let{axis:t,guides:e,guideTooltipFormatter:i,utilsStrings:r}=a;if(e!==void 0){for(let s=0;s<e.length;s+=1){let n=en(t,gr.Guides)[s];n!==void 0&&I2(n,e[s])}w2({axis:t,guideTooltipFormatter:i,utilsStrings:r})}}function O2(a,t){let e=en(a,gr.Guides).length,i=t?.length??0,r=e-i;S2({axis:a,numberOfElementsToBeDeleted:r,tickOrGuide:gr.Guides})}function E2(a){let{axis:t,guides:e}=a;k2(t,e),$2(a),O2(t,e)}function M2(a){let{axis:t,labels:e,restoreLabelsVisibility:i=!0}=a;(e??t.renderer.labels.values).forEach(r=>{r.x instanceof et?r.x.value:r.x,i&&Ui(r,!0)})}function k1(a){let t=a.renderer.labels.values.filter(e=>gs(e.uid,"isGuide")!==!0&&e.measuredWidth>0).length;return a.pixelWidth/t}function R2(a){let{target:t}=a;if((ye(t.chart.uid,"config")?.horizontalAxisLabelsBehavior??er.Rotate)===er.Wrap){let e=Number.MAX_SAFE_INTEGER;t.renderer.labels.each(r=>{gs(r.uid,"isGuide")!==!0&&r.measuredWidth>0&&(e=Math.min(e,r.bbox.width))});let i=t instanceof Ct?t.pixelWidth/re.maxNumberOfXAxisLabelsInWrapModeForDateAxis:t.pixelWidth/re.maxNumberOfXAxisLabelsInWrapMode;t.renderer.minGridDistance=Math.max(e+1,i)}}function U2(a){let{axis:t,labelsConfig:e,horizontalAxisLabelsBehavior:i,isSecondValueAxis:r,tickSpacing:s}=a,n=t.renderer.minGridDistance;if(typeof s=="number"&&Number.isFinite(s))n=s;else if(t.renderer instanceof Hl)n=re.gauge.gaugeMinGridDistance;else if(t instanceof Qe)n=t.renderer instanceof sr?re.xAxisMinGridDistance:re.yAxisMinGridDistance;else if(t.renderer instanceof sr)if(r===!0)n=re.secondRotatedValueAxisMinGridDistance;else if(i===void 0||i===er.Rotate){let o=e.content.font?.size??re.generalFontSize,l=t instanceof $t?re.categoryAxisLabelPadding:re.axisLabelPadding;n=o*l}else if(i===er.Wrap){let o=Is(R2,re.debounceTime);Ds(t.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:o}),t.events.on(Ie.SizeChanged,o),t.dispatchImmediately(Ie.SizeChanged)}else i===er.Stagger?n=re.staggerMinGridDistance:n=t instanceof $t?re.xCategoryAxisMinGridDistance:re.xAxisMinGridDistance;else n=t instanceof $t?re.yCategoryAxisMinGridDistance:re.yAxisMinGridDistance;t.renderer.minGridDistance=n}function V2(a){let t=a.renderer.labels.template;qn(t)&&(t.adapter.add("rotation",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.angle??e:e),t.adapter.add("verticalCenter",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.verticalCenter??e:e),t.adapter.add("horizontalCenter",(e,i)=>gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.horizontalCenter??e:e),t.adapter.add("dy",(e,i)=>{let r=re.axisLabel.dy??e??0;return i.dataItem?.tick?.length>re.axisTickLength?r=e??0:r=Number(gs(i.uid,"isGuide")!==!0?Ns(a.uid,"labelsSymbol")?.yOffset??r:r),r}))}function N2(a){let{target:t}=a;if(t.chart!==void 0){let e=ye(t.chart.uid,"config")?.axes?.[0].labels;if((e?.visible??!0)&&e!==void 0&&t.renderer.labels.length>1){let i=0;t.renderer.labels.each(n=>{if(gs(n.uid,"isGuide")!==!0&&n.measuredWidth>0){let o=n.bbox.width;o>i&&(i=o)}});let r=Ns(t.uid,"labelsSymbol")?.angle??0,s=k1(t)>=i+5;if(!s&&r===0||s&&r===re.rotatedAxisLabel.rotation){let n=s?xv(e.content,t.rtl,re.axisLabel):xv({type:Rt.TS},t.rtl,re.rotatedAxisLabel);Ds(t.uid,{labelsSymbol:n}),t.renderer.invalidateLabels()}}}}function Q2(a,t=1){let{target:e}=a,i=k1(e);Number.isFinite(i)&&(e.renderer.labels.template.maxWidth=Math.min(i*t,e.renderer.minGridDistance))}function H2(a){let{target:t}=a;if(ye(t.chart.uid,"config")?.axes?.[0].labels?.visible!==!1){let e=0;t.dataItems.each(i=>{let{label:r,itemIndex:s}=i;gs(r.uid,"isGuide")!==!0&&r.currentText!==void 0&&r.measuredWidth>0&&s%2===0&&r.bbox.height>e&&(e=r.bbox.height)}),t.dataItems.each(i=>{let{tick:r,label:s,itemIndex:n}=i;if(gs(s.uid,"isGuide")!==!0&&s.currentText!==void 0&&s.measuredWidth>0){let o=n%2===1;r.length=o?e+5:re.axisTickLength,r.dataItem.label.dy=re.axisLabel.dy+(o?e:0)}}),e!==void 0&&(t.renderer.labels.template.paddingBottom=e+5),t.validate()}}function j2(a){let{chart:t}=a;a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let e=Ns(a.uid,"debouncedAxisLabelRotationCallback");if(e!==void 0&&(a.events.off(Ie.Validated,e),Ds(a.uid,{debouncedAxisLabelRotationCallback:void 0})),t!==void 0){let i=ye(t.uid,"config")?.axes?.[0].labels;if(i!==void 0){let r=xv(i.content,t.rtl,re.axisLabel),s=a.renderer.labels.template;s.rotation=r.angle,s.verticalCenter=r.verticalCenter,s.horizontalCenter=r.horizontalCenter,Number.isFinite(r.yOffset)&&(s.dy=r.yOffset)}Ds(a.uid,{labelsSymbol:void 0})}}function $1(a){a.renderer.labels.template.wrap=!1,a.renderer.labels.template.textAlign="start"}function W2(a){$1(a),a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let t=Ns(a.uid,"debouncedAxisLabelWrapCallback");t!==void 0&&(a.events.off(Ie.DataRangeChanged,t),Ds(a.uid,{debouncedAxisLabelWrapCallback:void 0}))}function X2(a){$1(a);let t=Ns(a.uid,"debouncedUpdateMinGridDistanceForWrapBehavior");t!==void 0&&(a.events.off(Ie.SizeChanged,t),Ds(a.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:void 0}))}function z2(a){let t=Ns(a.uid,"debouncedAxisLabelStaggerCallback");t!==void 0&&(a.events.off(Ie.DataRangeChanged,t),Ds(a.uid,{debouncedAxisLabelStaggerCallback:void 0})),a.renderer.ticks.each(e=>{e.length=re.axisTickLength,e.dataItem?.label&&(e.dataItem.label.dy=re.axisLabel.dy??0)})}function G2(a){j2(a),W2(a),z2(a)}function tI(a){V2(a),a.renderer.labels.template.paddingLeft=0,a.renderer.labels.template.paddingRight=0,a.renderer.labels.template.maxWidth=Number.NaN;let t=Is(N2,re.debounceTime,{leading:!0});Ds(a.uid,{debouncedAxisLabelRotationCallback:t}),a.events.on(Ie.Validated,t),a.dispatchImmediately(Ie.Validated)}function iI(a,t=1){a.renderer.labels.template.wrap=!0,a.renderer.labels.template.paddingLeft=.5,a.renderer.labels.template.paddingRight=.5,a.renderer.labels.template.textAlign="middle";let e=Is(i=>Q2(i,t),re.debounceTime);Ds(a.uid,{debouncedAxisLabelWrapCallback:e}),a.events.on(Ie.DataRangeChanged,e)}function Y2(a){a.renderer.labels.template.maxWidth=re.yAxisLabelMaxWidth,a.renderer.labels.template.wrap=!0,a.renderer.labels.template.textAlign="end"}function K2(a){let t=Is(H2,re.debounceTime);Ds(a.uid,{debouncedAxisLabelStaggerCallback:t}),a.events.on(Ie.DataRangeChanged,t)}function Z2(a){let{axis:t,horizontalAxisLabelsBehavior:e,verticalAxisLabelsBehavior:i,labelsConfig:r,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}=a;if(t.renderer instanceof sr&&s?.[0]!==!1){if(G2(t),n!==!0)switch(e){case er.Hide:break;case er.Stagger:K2(t),iI(t,1.5);break;case er.Wrap:iI(t);break;case er.Rotate:tI(t);break;default:r.content.angle!==null&&r.content.angle===void 0&&tI(t);break}}else t.renderer instanceof _r&&(i!==er.Hide?Y2(t):X2(t))}function q2(a){let{axis:t,axisConfig:e,horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}=a,o=t.renderer.labels.template;o.axis=t;let{labels:l}=e,h=t.renderer instanceof sr&&o.rotation===re.rotatedAxisLabel.rotation,u=l,c;h?(u.content.angle=void 0,u.content.horizontalAlignment=void 0,u.content.verticalAlignment=void 0,u.content.yoffset=void 0,c=re.rotatedAxisLabel):t.renderer instanceof sr&&(i===er.Stagger||i===er.Wrap)&&(c={wrap:!0,dy:re.axisLabel.dy}),t.renderer instanceof _r&&r!==er.Hide&&(c={wrap:!0}),xn({label:o,labelConfig:u,defaults:c}),t.renderer.labels.template.paddingTop=t.renderer instanceof sr?0:re.axisLabel.dy,o.align="none",o.valign="none",Z2({axis:t,horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,labelsConfig:l,axisLabelsBehaviorChanged:s,isSecondValueAxis:n}),o.axis.invalidateLabels()}function kw(a){return(a??qb())===$i.Side}function O1(a,t){let e,i,r=iw(a,"bullets"),s=iw(a,"columns"),n=kw(t);return n&&r!==void 0?(e=r,i=s):n||(e=s,i=r),{labelToRender:e,labelToHide:i}}function J2(a,t=!0){a.hideOversized=t}function ej(a,t){let e,i,r=ml(re.dataLabelInitialize);fu(r.uid,{isDataLabel:!0}),a.bullets.push(r);let s=ml(re.dataLabelInitialize,a.columns.template);return fu(s.uid,{isDataLabel:!0}),rw(s,a),rw(r,a),a.events.on(Ie.Validated,Is(()=>{Of(s)&&s.clones.each(n=>{Of(n)&&n.validate()})},re.debounceTime)),s.html="{valueX}",r.html="{valueX}",h1(r),kw(t)?(e=r,i=s):(e=s,i=r),n1(V.BarSeries,r),o1(V.BarSeries,e),{newLabelToRender:e,newLabelToHide:i}}function tj(a){let{series:t,stackedType:e,isRotated:i,hideOversizedStackedLabels:r,hideOversizedSideBySideLabels:s}=a,{labelToRender:n,labelToHide:o}=O1(t,e);if(n===void 0){let{newLabelToRender:u,newLabelToHide:c}=ej(t,e);n=u,o=c}let l=re.dataLabel,h=!0;kw(e)?(l=i===!0?re.dataLabelRotated:re.dataLabel,h=s===!0):(l=i===!0?re.dataLabelStackedRotated:re.dataLabelStackedNonRotated,h=r!==!1),J2(n,h),o!==void 0&&(o.visible=!1,o.disabled=!0),n.html="{valueX}",u1({...a,dataLabel:n,labelDefaults:l,defaultDataLabelFormatter:l1})}function ij(a){let t=a.tooltip;t!==void 0&&!(a instanceof Ct)&&(t.label.adapter.add("html",(e,i)=>{let r=e??"";return a instanceof Qe?r=GI(a,i.properties?.text??e??""):a instanceof $t&&(r=YI({axis:a,defaultOutput:e??"",dataItem:t.dataItem})),Zr(r)}),t.label.html=re.htmlEmptyContent)}function rj(a){let t=a.title,e=98;if(a.renderer instanceof _r)t.adapter.add("y",i=>{let r=t.parent?.measuredHeight??0;return r>0?r/2:i},e);else if(a.renderer instanceof sr)if(a.renderer.opposite){let i=a.title;i.adapter.add("rotation",()=>0,e),i.adapter.add("y",()=>{let r=i.measuredHeight;return r>0?r/2:0},e)}else t.adapter.add("x",i=>{let r=t.parent?.measuredWidth??0;return r>0?r/2:i},e)}function sw(a){let{axis:t,start:e,end:i}=a;t.zoom({start:e??0,end:i??1})}function rI(a){a!==void 0&&(a.start=0,a.end=1)}function Rv(a){a!==void 0&&(a.xAxes!==void 0&&a.xAxes.each(t=>sw({axis:t})),a.yAxes!==void 0&&a.yAxes.each(t=>sw({axis:t})),rI(a.scrollbarX),rI(a.scrollbarY),Ui(a.zoomOutButton,!1))}function Wf(a,t){return a instanceof sr&&t!==!0||a instanceof _r&&t===!0}function sj(a){qn(a.labels.template)&&(a.labels.template.events.on(Ie.Over,t=>{let{axisLabelOveredOpacity:e}=re;t.target.fillOpacity=(t.target.fillOpacity??1)*e}),a.labels.template.events.on(Ie.Out,t=>{let{axisLabelOveredOpacity:e}=re;t.target.fillOpacity=(t.target.fillOpacity??.5)/e}))}function aj(a){let{axis:t,valueFormat:e,axisRenderer:i,queryObject:r,errorStrings:s}=a;i.grid.template.applyOnClones=!0,i.ticks.template.applyOnClones=!0,i.labels.template.applyOnClones=!0,i.hoverable=!0,i.line.strokeOpacity=1,i.grid.template.strokeOpacity=1,i.ticks.template.strokeOpacity=1,Iv(i.labels.template,re.axisLabel),i.ticks.template.disabled=!1,i.labels.template.disabled=!0,ij(t),ud(e)&&(sj(i),y2({axis:t,queryObject:r,errorStrings:s})),Bv(t.chart,t.title),Uf({chart:t.chart,label:t.title,labelType:t.renderer instanceof sr?Wt.XAxisTitle:Wt.YAxisTitle}),rj(t),t.renderer instanceof sr&&(t.events.on(Ie.SizeChanged,Is(()=>{mu({chart:t.chart,label:t.title,labelType:Wt.XAxisTitle})},re.debounceTime)),t.events.on(Ie.Validated,Is(()=>{M2({axis:t,restoreLabelsVisibility:!0})},re.debounceTime)))}function nj(a){let t=a.target,e=ye(t.chart.uid,"isRotated"),i=[];if(t instanceof Qe){if(t.renderer instanceof Hl)i.push({isXAxis:!0,minimum:t.min,maximum:t.max});else if(t.renderer instanceof(e!==!0?_r:sr)){t.maxZoomFactor=1;let r=a.target,s=r.chart,n=e!==!0?s.xAxes.getIndex(0):s.yAxes.getIndex(0),o=s.yAxes.getIndex(1)??s.xAxes.getIndex(1);i=[{isXAxis:!1,minimum:r.min,maximum:r.max},{isXAxis:!0,minimum:n instanceof Qe?n.min:void 0,maximum:n instanceof Qe?n.max:void 0}],o instanceof Qe&&i.push({isXAxis:!1,isSecondValueAxis:!0,minimum:o.min,maximum:o.max})}i.length>0&&i.every(r=>!Number.isNaN(r.minimum)&&!Number.isNaN(r.maximum))&&ox(i,t.chart.htmlContainer)}}function oj(a){a.events.on(Ie.Validated,Is(nj,re.debounceTime))}function lj(a){let{axis:t,isNonAggregatedChart:e}=a,i,r,s,n=t.dataItems.values,o=t.axisRanges.values;if(t instanceof $t)for(let l=0;l<o.length;l+=1){i=!1,r=!1,s=!1;let h=o[l],{category:u,endCategory:c,axisFill:d,grid:A,label:p}=h;if(h instanceof Jo&&h.visible)for(let f=0;f<n.length;f+=1){let m;e===!0?m=no({value:n[f].category,dataContext:n[f].dataContext}):m=n[f].category.toString(),u===m&&(r=!0),c===m&&(s=!0)}r&&s&&(i=!0),Ui(d,i),Ui(A,i),Ui(p,i)}}function sI(a){let{axis:t,axisMinimum:e,axisMaximum:i}=a,r;if(t instanceof Qe&&i!==void 0&&e!==void 0){let s=t.axisRanges.values,n=ye(t.chart.uid,"config"),o=ye(t.chart.uid,"isRotated"),l=Wf(t.renderer,o)?0:1,h=n?.axes?.[l]?.guides;for(let u=0;u<s.length;u+=1){let c=s[u],{value:d,endValue:A,axisFill:p,grid:f,label:m}=c;if(gs(m?.uid,"isGuide")===!0){if(r=c.visible,r&&c instanceof vo){let{start:g,end:y}=Iw(t,h?.[u]),x=Math.min(d,A,g??d,y??A),w=Math.max(d,A,g??d,y??A);x<e&&w<e||x>i&&w>i?r=!1:(c.value=x<e?e:x,c.endValue=w>i?i:w)}Ui(p,r),Ui(f,r),Ui(m,r)}}}}function hj(a){a instanceof Qe?(a.adapter.add("min",t=>(sI({axis:a,axisMinimum:t,axisMaximum:a.max}),t)),a.adapter.add("max",t=>(sI({axis:a,axisMinimum:a.min,axisMaximum:t}),t))):a instanceof $t&&a.events.on(Ie.Validated,()=>{let t=ye(a.chart.uid,"isNonAggregatedChart");lj({axis:a,isNonAggregatedChart:t})})}function $f(a){let{axes:t,isSecondValueAxis:e=!1,isXAxis:i,valueFormat:r,chartType:s,queryObject:n,errorStrings:o}=a,l;if(Ym({isXAxis:i,chartType:s,valueFormat:r})&&!e)l=t.push(new $t);else if(ro(r))l=t.push(new Ct);else if(ba(r)){l=t.push(new Qe);let h=ye(l.chart.uid,"formatLocale");l.numberFormatter=fl({type:V.NumberAxisFormat,iLocale:l.chart.language.locale,formatLocale:h}),l.numberFormatter.numberFormat="#",e?(l.renderer.opposite=!0,l.renderer.grid.template.disabled=!0):oj(l)}l!==void 0&&(sQ(l),aj({axis:l,valueFormat:r,axisRenderer:l.renderer,queryObject:n,errorStrings:o}),hj(l))}function E1(a){let{chart:t,axesConfig:e,isRotated:i,chartType:r,queryObject:s,errorStrings:n}=a;ai(t.uid,{isRotated:i===!0});let o=i===!0?e?.[1]:e?.[0],l=i===!0?e?.[0]:e?.[1],h=o?.valueFormat,u=l?.valueFormat;h!==void 0&&u!==void 0&&(t.xAxes.clear(),t.yAxes.clear(),$f({chartType:r,isXAxis:i!==!0,axes:t.xAxes,valueFormat:h,queryObject:s,errorStrings:n}),$f({chartType:r,isXAxis:i===!0,axes:t.yAxes,valueFormat:u,queryObject:s,errorStrings:n}),e?.[2]!==void 0&&$f({chartType:r,isXAxis:i===!0,axes:i===!0?t.xAxes:t.yAxes,valueFormat:e[2].valueFormat,isSecondValueAxis:!0,queryObject:s,errorStrings:n}))}function uj(a){let{axis:t,isLogarithmic:e,axisConfigIndex:i}=a,r=ye(t.chart.uid,"config"),s=e===!0&&ug({chartConfig:r,chartData:t.chart.data,axisConfigIndex:i});(t instanceof Ct||t instanceof Qe)&&(t.logarithmic=s,t.treatZeroAs=s?re.treatZeroValueAs:0)}function cj(a,t){let{minimum:e,maximum:i,isLogarithmic:r}=t??{},{buffer:s}=t??{};return s??=re.buffer,a instanceof Qe&&!(a instanceof Ct)&&!s&&(r!==!0||i!=null||e!=null)}function dj(a,t){let e=!1;return a instanceof Qe&&!(a instanceof Ct)&&(e=cj(a,t),a.strictMinMax=e),e}function Aj(a){let{axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r}=a,s=e?.minimum,n=e?.maximum,o=e?.isLogarithmic??!1,l=s,h=n,{chart:u}=t,c=ye(u.uid,"isRotated"),d=ye(u.uid,"config"),A=0;if(u instanceof Vt&&d!==void 0){let p=ks(d),f=Wf(t.renderer,c),m=kQ(u),g=hg({chartConfig:d,isSecondValueAxis:r,seriesIds:m}),y=Sx({chartConfig:d,chartData:u.data,filteredSeriesIds:g});if(p===$i.Stacked100)l=Number.NaN,h=Number.NaN;else{let{minX:x,maxX:w,minY:S,maxY:F}=y,[T,L]=f?[x??Number.NaN,w??Number.NaN]:[S,F];A=T,i===V.BarSeries||i===V.ComboLineAndBarSeries||i===V.LineSeries&&p===$i.Stacked&&!f?(l=Math.min(T,0),h=Math.max(L,0)):(l=T,h=L)}l=s??l,h=n??h}return o&&l!==void 0&&l!==null&&l<=0&&(l=uQ(A)),{min:l,max:h}}function M1(a){let{axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r}=a,{minimum:s,maximum:n,isLogarithmic:o}=e??{};if(t instanceof Qe||t instanceof Ct)if(dj(t,e)){let l=s,h=n;if(KI({minimumFromConfig:s,maximumFromConfig:n,isLogarithmic:o})){let u=Aj({axis:t,axisConfig:e,chartType:i,isSecondValueAxis:r});l=u.min,h=u.max}l=l??Number.NaN,h=h??Number.NaN,Number.isNaN(l)||Number.isNaN(h)||l<h?(t.min=l,t.max=h):(t.min=Number.NaN,t.max=Number.NaN),i===V.GaugeSeries&&t.validate()}else t.min=Number.NaN,t.max=Number.NaN}function pj(a){let{axis:t,timeIntervalInfo:e,dateBaseInterval:i}=a;if(t instanceof Ct){let{size:r,unit:s}=e??{};if(s||({size:r,unit:s}=i??{}),r&&s!==void 0){let n;switch(s){case Ji.Second:n="second";break;case Ji.Minute:n="minute";break;case Ji.Hour:n="hour";break;case Ji.Day:n="day";break;case Ji.Week:n="week";break;case Ji.Month:n="month";break;case Ji.Year:n="year";break}n!==void 0&&(t.baseInterval={timeUnit:n,count:r})}}}function fj(a,t){a instanceof Qe&&(a.renderer.baseGrid.disabled=t!==!0)}function mj(a,t){a.cursorTooltipEnabled=t===!0}function gj(a,t){let e=a.renderer instanceof sr;a.events.once(Ie.Validated,()=>{let i=a.renderer instanceof _r?re.yAxisTitleLabel:re.xAxisTitleLabel;e&&(i={...i,dy:i.dy??0}),xn({label:a.title,labelConfig:t,defaults:i}),mu({chart:a.chart,label:a.title,labelType:a.renderer instanceof sr?Wt.XAxisTitle:Wt.YAxisTitle})})}function yj(a,t){let e=!0;return t===V.BoxPlotSeries&&(e=a instanceof Cr),e}function R1(a){let t=Is(()=>{let{chart:e}=a,i=ye(e.uid,"config");if(e!==void 0&&i!==void 0){let r=ze(i?.series);if(yj(a,r)){let s=ye(e.uid,"isRotated"),n=ks(i);n===$i.Stacked100&&!a.visible&&Ui(a,!1);let o=e.xAxes.getIndex(0),l=e.yAxes.getIndex(0),h=e.yAxes.getIndex(1),u=s===!0?1:0,c=i.axes?.[u],d=s===!0?0:1,A=i.axes?.[d],p=i.axes?.[2];[{axis:o,axisConfig:c,updateLabels:!1},{axis:l,axisConfig:A,updateLabels:!0},{axis:h,axisConfig:p,updateLabels:!0,isSecondValueAxis:!0}].forEach(f=>{let{axis:m,axisConfig:g,updateLabels:y,isSecondValueAxis:x}=f;m!==void 0&&(M1({axis:m,chartType:r,axisConfig:g,isSecondValueAxis:x}),y!==void 0&&m.events.once(Ie.Validated,()=>{let{labelToRender:w}=O1(a,n);w&&(w.html=s===!0?"{valueX}":"{valueY}")}))})}}},re.debounceTime);a.events.once(Ie.Validated,t)}function vj(a,t){if(a instanceof Qe){let{integerOnlyValues:e,valueFormat:i}=t,r=Tx(i)?i.intlOptions.maximumFractionDigits:void 0;a.maxPrecision=e===!0||r===0?0:Number.NaN}}function yv(a){let{axis:t,axisConfig:e,axisConfigIndex:i,timeIntervalInfo:r,chartType:s,horizontalAxisLabelsBehavior:n,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,guideTooltipFormatter:h,stackedType:u,axisValueFormatter:c,isSecondValueAxis:d,isRotated:A,isTimeOnlyField:p,setTimeZone:f,outTimeZone:m,utilsStrings:g,errorStrings:y}=a,{visible:x,isLogarithmic:w,title:S,grid:F,lineSymbol:T,labels:L,guides:O,valueFormat:I,displayZeroLine:U,displayCursorTooltip:P,tickSpacing:Q,dateBaseInterval:G}=e;pj({axis:t,timeIntervalInfo:r,dateBaseInterval:G}),Vc({element:t.renderer.grid.template,lineSymbol:F,visible:x}),Vc({element:t.renderer.line,lineSymbol:{color:[...re.color],...T??KA()},visible:x}),Vc({element:t.renderer.ticks.template,lineSymbol:T,visible:x}),q2({axis:t,axisConfig:e,horizontalAxisLabelsBehavior:n,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,isSecondValueAxis:d}),vj(t,e),U2({axis:t,labelsConfig:L,horizontalAxisLabelsBehavior:n,isSecondValueAxis:d,tickSpacing:Q}),hQ({axis:t,isXAxis:Wf(t.renderer,A),chartType:s,labelsTextSymbol:e.labels.content,formatOptions:I,overridePercentMultiplication:u===$i.Stacked100,axisValueFormatter:c,isTimeOnlyField:p,setTimeZone:f,outTimeZone:m,errorStrings:y}),M1({axis:t,axisConfig:e,chartType:s,isSecondValueAxis:d}),uj({axis:t,isLogarithmic:w,axisConfigIndex:i}),gj(t,S),mj(t,P),d!==!0&&(E2({axis:t,guides:O,guideTooltipFormatter:h,utilsStrings:g}),fj(t,U))}function bj(a){let{chart:t,rotationChanged:e,isRotated:i,dualAxisChanged:r,timeIntervalInfoWasReset:s,timeIntervalInfo:n,guideTooltipFormatter:o,xAxisLabelFormatter:l,yAxisLabelFormatter:h,secondaryYAxisLabelFormatter:u,options:c,utilsStrings:d,errorStrings:A,queryObject:p}=a,{axisLabelsBehaviorChanged:f}=a,m=ye(t.uid,"config"),g=m.axes,{horizontalAxisLabelsBehavior:y,verticalAxisLabelsBehavior:x}=m,w=ze(m.series),S=ks(m),F=ye(t.uid,"fieldList")?.some(de=>de.name===m.series[0].x&&de.type===GA.TimeOnly)??!1,T=ep({chartConfig:m,queryObject:p,options:c}),L=bh(m.series[0])?m.series[0].temporalBinning?.outTimeZone:void 0,O=i===!0?1:0,I=i===!0?0:1,U=g?.[O],P=g?.[I],Q=t.xAxes.getIndex(0);U1({chart:t,dualAxisChanged:r,rotationChanged:e,timeIntervalInfoWasReset:s,axisLabelsBehaviorChanged:f})&&(E1({chart:t,axesConfig:g,isRotated:i,chartType:w,queryObject:p,errorStrings:A}),f=[!0,!0]),Q=t.xAxes.getIndex(0);let G=t.yAxes.getIndex(0),Y=t.xAxes.getIndex(1)??t.yAxes.getIndex(1),ee=Q?.start,te=Q?.end,le=G?.start,z=G?.end,K=Y?.start,we=Y?.end,se={timeIntervalInfo:n,chartType:w,horizontalAxisLabelsBehavior:y,verticalAxisLabelsBehavior:x,axisLabelsBehaviorChanged:f,guideTooltipFormatter:o,stackedType:S,isRotated:i,setTimeZone:T,outTimeZone:L,utilsStrings:d,errorStrings:A};Q!==void 0&&U!==void 0&&yv({...se,axis:Q,axisConfig:U,axisConfigIndex:O,axisValueFormatter:O===0?l:h,isTimeOnlyField:F}),G!==void 0&&P!==void 0&&yv({...se,axis:G,axisConfig:P,axisConfigIndex:I,axisValueFormatter:I===1?h:l,isTimeOnlyField:F}),Y!==void 0&&g?.[2]!==void 0&&yv({...se,axis:Y,axisConfig:g[2],axisConfigIndex:2,axisValueFormatter:u,isSecondValueAxis:!0,isTimeOnlyField:F}),e===!0&&[{axis:Q,start:ee,end:te},{axis:G,start:le,end:z},{axis:Y,start:K,end:we}].forEach(de=>{let{axis:$e,start:Ye,end:He}=de;$e!==void 0&&$e.events.once(Ie.Validated,()=>{sw({axis:$e,start:Ye,end:He})})}),Q!==void 0&&Q.ghostLabel.setPropertyValue("disabled",!0),G!==void 0&&G.ghostLabel.setPropertyValue("disabled",!0),Y!==void 0&&Y.ghostLabel.setPropertyValue("disabled",!0)}function U1(a){let{chart:t,dualAxisChanged:e,rotationChanged:i,timeIntervalInfoWasReset:r,axisLabelsBehaviorChanged:s}=a,n=ye(t.uid,"config"),{rotated:o,series:l}=n,h=n.axes,u=ze(l),c=o===!0?1:0,d=o===!0?0:1,A=h?.[c]?.valueFormat,p=h?.[d]?.valueFormat,f=t.xAxes.getIndex(0),m=t.yAxes.getIndex(0),g=f===void 0||i||A!==void 0&&JC({axis:f,valueFormat:A,chartType:u}),y=m===void 0||i||p!==void 0&&JC({axis:m,valueFormat:p,chartType:u});return e===!0||i===!0||r===!0||s?.[0]||s?.[1]||g||y}function xj(a){E1(a)}function _j(a){let{chart:t,chartConfig:e,rotationChanged:i,axisLabelsBehaviorChanged:r,isRotated:s,dualAxisChanged:n,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:h,xAxisLabelFormatter:u,yAxisLabelFormatter:c,secondaryYAxisLabelFormatter:d,options:A,utilsStrings:p,errorStrings:f,queryObject:m}=a,g=ks(e);bj({chart:t,rotationChanged:i,axisLabelsBehaviorChanged:r,isRotated:s,dualAxisChanged:n,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:h,xAxisLabelFormatter:u,yAxisLabelFormatter:c,secondaryYAxisLabelFormatter:d,options:A,utilsStrings:p,errorStrings:f,queryObject:m});let y=s===!0?t.yAxes.getIndex(0):t.xAxes.getIndex(0);if(y!==void 0){y instanceof $t&&(y.dataFields.category=ng(e));let S=y.renderer,F=S.grid.template;F.location=0,S.cellStartLocation=.1,S.cellEndLocation=.9;let T=e.orderOptions?.data&&"orderBy"in e.orderOptions.data&&e.orderOptions.data.orderBy===zA.Descending,L=s===!0;T&&y instanceof Ct&&(L=!L),S.inversed=L}let x=s===!0?t.xAxes.getIndex(0):t.yAxes.getIndex(0),w=s===!0?t.xAxes.getIndex(1):t.yAxes.getIndex(1);g===$i.Stacked100?(x instanceof Qe&&(x.calculateTotals=!0),w instanceof Qe&&(w.calculateTotals=!0)):(x instanceof Qe&&(x.calculateTotals=!1),w instanceof Qe&&(w.calculateTotals=!1))}function Vf(a){let{value:t,axisMin:e,axisMax:i}=a,r=Number.NaN,s=i-e;return s!==0&&(r=(t-e)/s),r}function aw(a){return a!=null&&a!==0}function V1(a){let{minimum:t,maximum:e,labelsIncrement:i,minimumValueConversion:r,maximumValueConversion:s}=a,n=t??pt.gauge.axisMinimum,o=e??pt.gauge.axisMaximum;n=dx(n,r),o=dx(o,s);let l=aw(i),h=aw(i)?i:Math.abs(o-n)/pt.gauge.numberOfLabelIntervals,u=l?Math.round(Math.abs(o-n)/h):pt.gauge.numberOfLabelIntervals;if(l)if(u>pt.gauge.maximumNumberOfLabelIntervals)h=Math.abs(o-n),u=1;else{let c=n+u*h;c<o?(u+=1,o=n+u*h):c>o&&(o=c)}return{min:n,max:o,labelsIncrement:h,numberOfIntervals:u}}function N1(a){let{axisConfig:t,axisMin:e,axisMax:i}=a;typeof e=="number"&&typeof i=="number"&&i-e!==0&&t.guides?.forEach(r=>{let{start:s,end:n}=r;typeof s=="number"&&(r.start=Vf({value:s,axisMin:e,axisMax:i})),typeof n=="number"&&(r.end=Vf({value:n,axisMin:e,axisMax:i}))})}function Cj(a){let{featureIndex:t,chartData:e,chartConfig:i}=a,{minimumFromField:r,maximumFromField:s}=i?.axes?.[0]??{},n,o;if(t>=0&&t<e.length){let l=e[t];typeof r=="string"&&!zi(r)&&Number.isFinite(l[r])&&(n=l[r]),typeof s=="string"&&!zi(s)&&Number.isFinite(l[s])&&(o=l[s])}return{minimumFromData:n,maximumFromData:o}}function wj(a){let{featureIndex:t,chartData:e,x:i}=a,r=Number.NaN;if(t>=0&&t<e.length){let s=e[t];i!==void 0&&!zi(i)&&Number.isFinite(s[i])&&(r=s[i])}return r}function $w(a){let{featureIndex:t=0,chartData:e,queryConfig:i,chartConfig:r,gaugeMinMaxFromData:s}=a,{axes:n,series:o}=r,l=Hu(r),{minimum:h,maximum:u}=n?.[0]??{},{x:c}=o?.[0]??{},d=pt.gauge,A,p;l?{minimumFromData:A,maximumFromData:p}=Cj({featureIndex:t,chartData:e,chartConfig:r}):i!==void 0&&({minimumFromData:A,maximumFromData:p}=s);let f=A??h??d.axisMinimum,m=p??u??d.axisMaximum,g=wj({chartData:e,featureIndex:t,x:c});return{minimum:f,maximum:m,dataValue:g}}function Bj(a){let{oldConfig:t,axisMax:e,min:i,max:r,labelsIncrement:s,numberOfIntervals:n,valueFormat:o,minimumFromField:l}=a,h=Mu(o),u=!0;if(t!==void 0){let{minimum:c,minimumFromField:d,labelsIncrement:A,valueFormat:p}=t.axes[0],f=p?.intlOptions?.style!==o?.intlOptions?.style,m=aw(A)?A!==s:n!==pt.gauge.numberOfLabelIntervals;u=f||i!==c||l!==d||!h&&r!==e||m}return u}var Ps={InnerLabel:0,InnerLabelSecondary:1,AxisLabels:2,FirstAndLastLabels:3};function Au(a,t){let e;switch(t){case Ps.InnerLabel:e="gaugeAutoResizeInnerLabelFirstDisposer";break;case Ps.InnerLabelSecondary:e="gaugeAutoResizeInnerLabelSecondDisposer";break;case Ps.AxisLabels:e="gaugeAutoResizeAxisLabelsDisposer";break;case Ps.FirstAndLastLabels:e="gaugeAutoResizeFirstAndLastLabelsDisposer";break}if(e!==void 0){let i=ye(a.uid,e);i!==void 0&&(i.dispose(),i=void 0,ai(a.uid,{[e]:void 0}))}}function Sj(a){let{chart:t,labelList:e,scaleToAdjust:i,fontSize:r,type:s,axisConfig:n}=a,o=Number.NaN,l=Number.NaN,h=i;if(s===Ps.InnerLabel){let c=e[0],d=n?.innerLabel?.content?.verticalAlignment??"middle",A=c.dy??0,p=Math.round(t.chartContainer.measuredHeight-t.radarContainer.pixelY-A),f=c.bbox.height*i,m=0;switch(d){case"bottom":m=f;break;case"top":m=-f;break;case"middle":case"baseline":m=f*.5;break}m>p&&(h=i*(p/m)),o=re.gauge.innerLabelAutoMinFontSize,l=re.gauge.innerLabelAutoMaxFontSize}else o=re.gauge.axisLabelAutoMinFontSize,l=re.gauge.axisLabelAutoMaxFontSize;let u=r*h;return u<o?h*=o/u:u>l&&(h*=l/u),h}function Ow(a){let{chart:t,type:e,labelList:i,currentScale:r,currentFontSize:s,axisConfig:n}=a,o=Number.NaN,l=Number.NaN;if(e===Ps.InnerLabel){let h=typeof t.innerRadius=="number"?t.innerRadius:t.innerRadius.value;l=(t.xAxes.getIndex(0)?.measuredWidth!==0?t.xAxes.getIndex(0)?.measuredWidth??1:1)*h}else l=t.xAxes.getIndex(0)?.measuredHeight??1;if(l>1){let h=e===Ps.InnerLabel?i[0]?.measuredWidth??0:i.find(u=>u.measuredWidth>0&&u.measuredHeight>0)?.measuredHeight??0;if(h>0){let u=h/l;if(u>0){let{axisLabelToInnerChartRatio:c,innerLabelToInnerChartRatio:d}=re.gauge,A=e===Ps.InnerLabel?d:c;o=r*(A/u),o=Sj({chart:t,labelList:i,axisConfig:n,scaleToAdjust:o,fontSize:s,type:e}),o=Number(o.toFixed(2))}}}return Number.isFinite(o)||(o=r),o}function Fj(a){return a?.labels.content.font?.size===void 0||a?.innerLabel?.visible!==!1&&a?.innerLabel?.content?.font?.size===void 0}function Uv(a){return a.some(t=>op(t)&&t.value!==void 0)}function Tj(a){let{chart:t,axisConfig:e,axis:i}=a;if(e.labels.content.font?.size===void 0&&e.onlyShowFirstAndLastLabels!==!0){Au(t,Ps.AxisLabels),Au(t,Ps.FirstAndLastLabels);let r=()=>{i.events.once(Ie.Validated,()=>{let n=en(i,gr.GaugeTicksWithLabels);if(Uv(n)){let o=n.map(d=>d.label),l=o[0].scale,h=o[0].fontSize,u=Ow({chart:t,type:Ps.AxisLabels,labelList:o,currentScale:l,currentFontSize:h,axisConfig:e}),c=u/l;Number.isFinite(u)&&u>0&&(c<=.98||c>1.02)&&o.forEach(d=>{d.scale=u})}}),i.validate()};t.events.once(Ie.Validated,r);let s=t.events.on(Ie.SizeChanged,r);ai(t.uid,{gaugeAutoResizeAxisLabelsDisposer:s}),r()}else{Au(t,Ps.AxisLabels);let r=en(i,gr.GaugeTicksWithLabels);r.length>0&&r.map(s=>s.label).forEach(s=>{s.scale=1})}}function Pj(a,t){let e=ye(a.uid,"config")?.axes?.[0];if(e?.innerLabel?.visible!==!1&&e?.innerLabel?.content?.font?.size===void 0){let i=a.xAxes.getIndex(0)?.measuredWidth;if(i!==void 0&&i>0){let r=Ow({chart:a,type:Ps.InnerLabel,labelList:[t],currentScale:t.scale,currentFontSize:t.fontSize,axisConfig:e});Number.isFinite(r)&&Math.abs(t.scale-r)>.25&&(t.scale=r,t.validate())}}else t.scale=1}function Dj(a,t){Au(a,Ps.InnerLabel),Au(a,Ps.InnerLabelSecondary);let e=a.xAxes.getIndex(0),i=()=>{e?.events.once(Ie.Validated,()=>{Pj(a,t)})},r=a.events.on(Ie.Validated,i),s=a.events.on(Ie.SizeChanged,i);ai(a.uid,{gaugeAutoResizeInnerLabelFirstDisposer:s,gaugeAutoResizeInnerLabelSecondDisposer:r}),i()}function nw(a){return a?.labels.content.font?.size===void 0&&a?.onlyShowFirstAndLastLabels===!0}function Lj(a){let t=a.chart,e=ye(t.uid,"config")?.axes?.[0],i=en(a,gr.GaugeFirstAndLastGuides);if(Uv(i)){let r=i.map(l=>l.label),s=r[0].scale,n=r[0].fontSize,o=Ow({chart:t,type:Ps.FirstAndLastLabels,labelList:r,currentScale:s,currentFontSize:n,axisConfig:e});Number.isFinite(o)&&o>0&&r.forEach(l=>{fu(l.uid,{originalWidth:l.measuredWidth/l.scale,originalHeight:l.measuredHeight/l.scale}),l.scale=o,l.validate()})}}function Ij(a){let{chart:t,axisConfig:e,axis:i}=a;if(nw(e)){Au(t,Ps.AxisLabels),Au(t,Ps.FirstAndLastLabels);let r=()=>{i.events.once(Ie.Validated,()=>{Lj(i)})},s=t.events.on(Ie.SizeChanged,r);ai(t.uid,{gaugeAutoResizeFirstAndLastLabelsDisposer:s}),r()}else Au(t,Ps.FirstAndLastLabels),en(i,gr.GaugeFirstAndLastGuides).map(r=>r.label).forEach(r=>{r.scale=1})}function ow(a,t){let e=a.xAxes.getIndex(0);if(e!==void 0){let i=t??ye(a.uid,"config"),{onlyShowFirstAndLastLabels:r}=i?.axes?.[0]??{};if(!e.renderer.labels.template.visible||r===!0)a.radius=new et(re.gauge.radius);else{let s=en(e,gr.GaugeTicksWithLabels),{furthestLabelX:n,furthestLabelY:o}=s.reduce(({furthestLabelX:l,furthestLabelY:h,furthestPixelX:u,furthestPixelY:c},{label:d})=>{if(d?.visible&&d.bbox.width>0&&d.bbox.height>0){let A=d.pixelX,p=d.bbox.width*d.scale,f=0;A<0?f=Math.abs(A):f=A+p,f>u&&(u=f,l=d);let m=d.pixelY,g=d.bbox.height*d.scale,y=0;m<0?y=Math.abs(m):y=m+g,y>c&&(c=y,h=d)}return{furthestLabelX:l,furthestLabelY:h,furthestPixelX:u,furthestPixelY:c}},{furthestLabelX:void 0,furthestPixelX:0,furthestLabelY:void 0,furthestPixelY:0});if(n!==void 0&&o!==void 0){let l=(n.bbox.width+5)*n.scale,h=(o.bbox.height+5)*o.scale,u=typeof e.renderer.labels.template.radius=="number"?e.renderer.labels.template.radius:e.renderer.labels.template.radius.value,c=(l+u)*2+a.radarContainer.measuredWidth+fv(a.paddingLeft)+fv(a.paddingRight),d=80,A=170,p=a.htmlContainer?.clientHeight??0,f=Math.max(0,Math.min(1,(p-d)/(A-d))),m=a.radarContainer.measuredHeight+(h+u*f)*2+fv(a.paddingTop)+fv(a.paddingBottom),g=a.measuredWidth,y=a.measuredHeight,x=g/c,w=y/m,S=(typeof a.radius=="number"?a.radius:a.radius.value)*100,F=Number((S*x).toFixed(2)),T=Number((S*w).toFixed(2)),L=F/S,O=T/S,I=a.radarContainer.measuredWidth*L,U=a.radarContainer.measuredWidth*O,[P,Q]=I<U?[F,L]:[T,O];Number.isFinite(P)&&P>=10&&P<=re.gauge.radius&&(Q<.98||Q>1.02)&&(a.radius=new et(P))}}}}function kj(a){let t=a.xAxes.getIndex(0);t!==void 0&&(t.events.on(Ie.SizeChanged,()=>ow(a)),t.events.on(Ie.Validated,Is(()=>ow(a),re.debounceTime)))}function Q1(a){let t=a.hands.push(new qd),e=re.gaugeNeedle,{startWidth:i,endWidth:r,innerRadius:s}=e;t.pin.disabled=!0,t.startWidth=i??Number.NaN,t.endWidth=r??Number.NaN,t.innerRadius=he(s??Number.NaN);let n=a.xAxes.getIndex(0);return n!==void 0&&(t.axis=n),t}function $j(a){let{x:t,data:e,chart:i,valueFormat:r,minimum:s,maximum:n}=a,o=Number.NaN;if(e!==void 0&&t!==void 0){let l=e.find(u=>t in u),h=Number.parseFloat(l[t]);Number.isFinite(h)&&(o=h,ai(i.uid,{gaugeData:o}))}else{let l=ye(i.uid,"gaugeData");Number.isFinite(l)&&(o=l)}return Mu(r)&&s!==void 0&&n!==void 0&&s!==null&&n!==null&&o!==null&&n-s!==0&&(o=Vf({value:o,axisMin:s,axisMax:n})),o}function Oj(a,t){let e=t??null;if(t!=null){let i=a.xAxes.getIndex(0),r=ye(a.uid,"config"),s=i.min??r?.axes?.[0].minimum??re.gauge.axisMinimum,n=i.max??r?.axes?.[0].maximum??re.gauge.axisMaximum;t<s?e=s:t>n&&(e=n)}return e}function Ej(a){let{chart:t,needle:e,gaugeValue:i}=a,r=t.hands.getIndex(0)??Q1(t);if(r!==void 0){Ef({element:r,fillSymbol:e?.symbol});let{startWidth:s,endWidth:n,innerRadius:o}=re.gaugeNeedle;r.value=Oj(t,i),r.pin.disabled=e?.displayPin!==!0,r.visible=e?.visible??!0,r.startWidth=e?.startWidth??s,r.endWidth=e?.endWidth??n,r.innerRadius=he(e?.innerRadius??o)}}function Mj(a){let t=ml(void 0,a.radarContainer);t.isMeasured=!1,fu(t.uid,{isGaugeAxisInnerLabel:!0}),Dj(a,t)}function Rj(a){let{chart:t,innerLabelConfig:e,valueFormat:i,gaugeValue:r,gaugeInnerLabelFormatter:s}=a,n=t.radarContainer.children.values.find(o=>gs(o.uid,"isGaugeAxisInnerLabel")===!0);if(n!==void 0){xn({label:n,labelConfig:e,defaults:re.gaugeInnerLabel});let o=ye(t.uid,"formatLocale");n.html=Yj({valueFormat:i,iLocale:t.language.locale,formatLocale:o,gaugeValue:r,innerLabelConfigContent:e?.content,gaugeInnerLabelFormatter:s}),t.radarContainer.invalidateLabels()}}function Uj(a){let t=a.axisRanges.create();return t.axisFill.fillOpacity=1,t.axisFill.disabled=!0,t.grid.strokeOpacity=1,t.grid.disabled=!1,t.tick.length=re.gaugeTicksLength,t}function Vj(a){let t=new Rn;return t.disabled=!0,t.axis=a,Iv(t),t.padding(10,10,10,10),fu(t.uid,{isGaugeAxisLabel:!0}),t}function Nj(a){let{axis:t,min:e,max:i,labelsIncrement:r,numberOfIntervals:s,valueFormat:n}=a,o=Mu(n),l=1,h=en(t,gr.Ticks);h.length>0&&(l=h[0].label?.scale,h.forEach(d=>{if(op(d)){let A=t.axisRanges.values.indexOf(d);A>=0&&t.axisRanges.removeIndex(A)}}));let u=re.gauge.numberOfTicksBetweenTwoLabels+1,c=s*u+1;for(let d=0;d<c;d+=1){let A=d===c-1,p=Uj(t),f=A?i:e+d/u*r;p.value=o?Vf({value:f,axisMin:e,axisMax:i}):f,d%u===0&&(p.label=Vj(t),p.label.text=String(f),p.grid.disabled=!0,Number.isFinite(l)&&(p.label.scale=l))}}function Qj(a){let{chart:t,axis:e,onlyShowFirstAndLastLabels:i,valueFormat:r,axisLabelConfigContent:s,axisValueFormatter:n}=a;if(!i){let o=en(e,gr.GaugeTicksWithLabels);if(Uv(o)){let l=ye(t.uid,"formatLocale");o.forEach(h=>{xn({label:h.label,labelConfig:s}),op(h)&&(h.label.html=H1({valueFormat:r,iLocale:t.language.locale,formatLocale:l,gaugeLabelConfigContent:s?.content,itemLabelValue:h.value,axisValueFormatter:n}))})}}}function Hj(a,t){let e=t?.ticks?.visible??!0,i=en(a,gr.Ticks);for(let r=0;r<i.length;r+=1){let s=i[r];Ui(s.tick,e)}}function jj(a,t){if(a instanceof Qe&&a.chart instanceof Ys){let e=en(a,gr.GaugeTicksWithLabels);if(Uv(e)){let{onlyShowFirstAndLastLabels:i,labels:r}=t,s=(r?.visible??!0)&&i!==!0;e.forEach(n=>{Ui(n.label,s)})}}}function Wj(a){let{labels:t,guides:e,onlyShowFirstAndLastLabels:i}=a,r=e??[];if(i===!0){let s={type:V.Guide,start:Number.NaN,style:{type:"esriSLS"},name:""};r.push({...s,start:a.minimum??Number.NaN,name:re.gaugeFirstLabelId,label:{...t.content,text:`${a.minimum}`}},{...s,start:a.maximum??Number.NaN,name:re.gaugeLastLabelId,label:{...t.content,text:`${a.maximum}`}})}a.guides=r}function Xj(a){en(a,gr.GaugeFirstAndLastGuides).forEach(t=>{t.label.adapter.keys().includes("dx")||t.label.adapter.add("dx",e=>{let i=e;if(t.label.measuredWidth>0){let r=ye(a.chart.uid,"config")?.axes?.[0],s=gs(t.label.uid,"originalWidth"),n=nw(r)&&s!==void 0&&s===t.label.measuredWidth&&t.label.scale!==1;i=Math.round((n?s*t.label.scale:t.label.measuredWidth)/2),t.id===re.gaugeLastLabelId&&(i*=-1)}return i}),t.label.adapter.keys().includes("dy")||t.label.adapter.add("dy",e=>{let i=e;if(t.label.measuredHeight>0){let r=ye(a.chart.uid,"config")?.axes?.[0],s=gs(t.label.uid,"originalHeight"),n=nw(r)&&s!==void 0&&s===t.label.measuredHeight&&t.label.scale!==1;i=Math.round((n?s*t.label.scale:t.label.measuredHeight)/2)}return i})})}function zj(a){let{chart:t,axis:e,onlyShowFirstAndLastLabels:i,valueFormat:r,gaugeLabelConfigContent:s,axisValueFormatter:n}=a;if(i){let o=en(e,gr.GaugeFirstAndLastGuides),l=ye(t.uid,"formatLocale");o.forEach(h=>{h?.label!==void 0&&op(h)&&(h.label.html=H1({valueFormat:r,iLocale:t.language.locale,formatLocale:l,gaugeLabelConfigContent:s?.content,itemLabelValue:h.value,axisValueFormatter:n}))}),Xj(e)}}function Gj(a){let{chart:t,valueFormat:e,queryObject:i,errorStrings:r}=a;t.xAxes.clear(),$f({isXAxis:!0,axes:t.xAxes,valueFormat:e,queryObject:i,errorStrings:r});let s=t.xAxes.getIndex(0);s instanceof Qe&&(s.renderer.labels.template.disabled=!0,s.renderer.ticks.template.disabled=!0,Q1(t),Mj(t),kj(t),s.maxZoomFactor=1)}function Yj(a){let{valueFormat:t,iLocale:e,formatLocale:i,innerLabelConfigContent:r,gaugeValue:s,gaugeInnerLabelFormatter:n}=a,o="";if(Number.isFinite(s))if(n!==void 0)o=n(s);else{let l=$o(t),h=fl({type:V.NumberAxisFormat,iLocale:e,formatLocale:i});h.numberFormat=l,o=h.format(`${s}`),o=xa({textSymbol:{type:Rt.TS,...r,text:o},format:"html"}),o=Zr(o)}return o}function H1(a){let{valueFormat:t,iLocale:e,formatLocale:i,gaugeLabelConfigContent:r,itemLabelValue:s,axisValueFormatter:n}=a,o="";if(Number.isFinite(s))if(n!==void 0)o=n(s);else{let l=$o(t),h=fl({type:V.NumberAxisFormat,iLocale:e,formatLocale:i});h.numberFormat=l,o=h.format(`${s}`),o=xa({textSymbol:{type:Rt.TS,...r,text:o},format:"html"}),o=Zr(o)}return o}function Kj(a){let{gaugeBands:t}=a,e={base:AF(),target:pF()};return t.type===V.FixedProgressBands&&(e.target=t.bands?.target??e.target,e.base=t.bands?.base??e.base),e}function Zj(a){let{axis:t,axisConfig:e,gaugeValue:i}=a,r=e.progressBands;if(r?.type===V.FixedProgressBands&&r.visible!==!1){let s=e.minimum??t.min,n=e.maximum??t.max;if(i!=null&&s!==void 0&&s!==null&&n!==void 0&&n!==null){let o=Math.min(Math.max(i,s),n),l=Kj({gaugeBands:r});e.guides=[{type:V.Guide,start:s,end:o,style:l.target,name:"progressTargetBand"},{type:V.Guide,start:o,end:n,style:l.base,name:"progressBaseBand"}]}}}function qj(a){let{chart:t,chartConfig:e,data:i,queryObject:r,axisValueFormatter:s,gaugeInnerLabelFormatter:n,utilsStrings:o,errorStrings:l,gaugeMinMaxFromData:h}=a,{axes:u,series:c}=e,d=Hu(e),A=ze(e.series),{featureIndex:p,x:f}=c[0],m=u?.[0],g=t.xAxes.getIndex(0),y={...m};if(g!==void 0&&y!==void 0){let{valueFormat:x,needle:w,innerLabel:S,onlyShowFirstAndLastLabels:F}=y;JC({axis:g,valueFormat:x,chartType:A})&&$f({isXAxis:!0,axes:t.xAxes,valueFormat:x,queryObject:r,errorStrings:l});let T=$w({featureIndex:p,chartData:t.data,chartConfig:e,gaugeMinMaxFromData:h,queryConfig:ye(t.uid,"queryConfig")});y.minimum=T.minimum,y.maximum=T.maximum;let{min:L,max:O,labelsIncrement:I,numberOfIntervals:U}=V1(y);Bj({oldConfig:ye(g.chart.uid,"config"),axisMax:g.max,min:L,max:O,labelsIncrement:I,numberOfIntervals:U,valueFormat:x})&&Nj({axis:g,min:L,max:O,labelsIncrement:I,numberOfIntervals:U,valueFormat:x});let P={...y};Mu(x)?(P.minimum=0,P.maximum=1,N1({axisConfig:P,axisMin:y.minimum,axisMax:y.maximum})):(P.minimum=L,P.maximum=O);let Q=d?T?.dataValue:$j({x:f,data:i,chart:t,minimum:y.minimum,maximum:y.maximum,valueFormat:x});Zj({axis:g,axisConfig:P,gaugeValue:Q??Number.NaN}),Wj(P),yv({axis:g,axisConfig:P,axisConfigIndex:0,chartType:V.GaugeSeries,axisValueFormatter:s,isTimeOnlyField:!1,setTimeZone:!1,utilsStrings:o,errorStrings:l}),g.renderer.labels.template.disabled||(g.renderer.labels.template.disabled=!0),g.renderer.ticks.template.disabled||(g.renderer.ticks.template.disabled=!0),Tj({chart:g.chart,axis:g,axisConfig:y}),Ij({chart:t,axis:g,axisConfig:y}),Hj(g,y),Qj({chart:t,axis:g,onlyShowFirstAndLastLabels:F??!1,valueFormat:x,axisLabelConfigContent:y.labels,axisValueFormatter:s}),zj({chart:t,axis:g,onlyShowFirstAndLastLabels:F??!1,valueFormat:x,gaugeLabelConfigContent:y.labels,axisValueFormatter:s}),Ej({chart:t,needle:w,gaugeValue:Q}),Rj({chart:t,innerLabelConfig:S,valueFormat:x,gaugeValue:Q,gaugeInnerLabelFormatter:n}),jj(g,y),ow(t,e),t.validateData()}}function Jj(a){a.background.fill=vn(re.backgroundColor)}function Vv(a,t){a.background.fill=vn(t??re.backgroundColor)}function eW(a){let t=C1(re.headerContainer,a),e=ml(re.title,t),i=ml(re.subtitle,t);return a instanceof cn&&(Bv(a,e),Bv(a,i),Uf({chart:a,label:e,labelType:Wt.ChartTitle}),Uf({chart:a,label:i,labelType:Wt.ChartSubTitle})),hH(t),{headerContainer:t,title:e,subtitle:i}}function Nv(a,t){let{title:e,subtitle:i,headerContainer:r}=a;xn({label:e,labelConfig:t?.title,defaults:re.titleLabel}),xn({label:i,labelConfig:t?.subtitle,defaults:re.titleLabel}),w1(r,e.disabled&&i.disabled),mu({chart:e.parent,label:e,labelType:Wt.ChartTitle}),mu({chart:i.parent,label:i,labelType:Wt.ChartSubTitle})}function tW(a){let t=C1(re.footerContainer,a),e=ml(re.footer,t);return a instanceof cn&&(Bv(a,e),Uf({chart:a,label:e,labelType:Wt.ChartFooter})),{footerContainer:t,footer:e}}function Qv(a,t){let{footer:e,footerContainer:i}=a;xn({label:e,labelConfig:t,defaults:re.footer}),w1(i,e.disabled||t?.content.text===""),mu({chart:e.parent,label:e,labelType:Wt.ChartFooter})}function Ew(a){return a.values.every(t=>t.isReady())}function iW(a){a.events.on(Ie.Ready,()=>{let{chart:t}=a;t&&Ew(a.chart.series)&&(MQ(t),Uu(a.chart.htmlContainer))})}function j1(a){if(a instanceof Vt){let t=new mo,e=new mo;t.disabled=!0,e.disabled=!0,t.marginTop=-10,e.marginRight=0,a.scrollbarX=t,a.scrollbarY=e}}function rW(a,t){let e=t?0:-1;a.thumb.tabindex=e,a.startGrip.tabindex=e,a.endGrip.tabindex=e}function sW(a,t){if(t!==void 0){let e=Nc(t);[a.background,a.startGrip.background,a.endGrip.background,a.thumb.background,a.background.states.getKey("default")?.properties,a.startGrip.background.states.getKey("default")?.properties,a.endGrip.background.states.getKey("default")?.properties,a.thumb.background.states.getKey("default")?.properties,a.startGrip.background.states.getKey("hover")?.properties,a.endGrip.background.states.getKey("hover")?.properties,a.thumb.background.states.getKey("hover")?.properties,a.startGrip.background.states.getKey("down")?.properties,a.endGrip.background.states.getKey("down")?.properties,a.thumb.background.states.getKey("down")?.properties].forEach(i=>{i!==void 0&&(i.fill=e)})}}function aW(a,t){typeof t=="number"&&Number.isFinite(t)&&(a.orientation==="horizontal"?(a.height=t,a.minHeight=t):(a.width=t,a.minWidth=t))}function nW(a,t){if(typeof t=="number"&&Number.isFinite(t)){let e=t/30;a.startGrip.scale=e,a.endGrip.scale=e}}function oW(a,t){typeof t=="number"&&Number.isFinite(t)&&(a.orientation==="horizontal"?a.marginBottom=t:a.marginLeft=t,a.parent?.invalidateLayout())}function W1(a){let{chart:t,scrollbarXConfig:e,scrollbarYConfig:i}=a;if(t instanceof Vt){let r=ye(t.uid,"isRotated");(t.scrollbarX===void 0||t.scrollbarY===void 0)&&j1(t);let{scrollbarX:s,scrollbarY:n}=t;[s,n].forEach(o=>{let l=o.orientation==="horizontal"&&r!==!0||o.orientation==="vertical"&&r===!0?e:i,h=l?.visible!==!0;if(o.disabled=h,rW(o,!h),l!==void 0&&!h){let{width:u,color:c,gripSize:d,margin:A}=l;oW(o,A),sW(o,c),nW(o,d),aW(o,u)}})}}function lW(a,t){a.columns.each(e=>{(e.dataItem?.dataContext)[t]===0&&(e.strokeOpacity=0)})}function hW(a){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:s,colorMatch:n,rendererType:o}=a,l=t.dataFields.valueY??t.dataFields.valueX??e.y,h=new Set,u,c=e.fillSymbol,d={seriesConfig:e,seriesIndex:i,seriesSymbol:c,colorMatch:n,isChartFillSymbol:!0},A={},p={},f=Zb(i);return t.columns.length===0?A=du({seriesConfig:e,seriesIndex:i,seriesSymbol:c??f,element:new Ee,colorMatch:n,isChartFillSymbol:!0}):(t.columns.each(m=>{let g=m.dataItem?.dataContext;if(Number.isFinite(g?.[l])){let y=nn({dataItem:g,seriesConfig:e,chartSubType:s,colorMatch:n,rendererType:o}),x=g[re.xAxisField]===re.nullValue,w=(x&&e.nullCategory?.symbol!==void 0?e.nullCategory.symbol:c)??f;A=du({...d,seriesSymbol:w,element:m,rendererSymbol:y}),gA({element:m,stylingInfo:A.stylingInfo}),x||(h.add(JSON.stringify(A.symbolWithColorInfo)),p=A)}}),r>1&&A.symbolWithColorInfo&&du({...d,seriesSymbol:A.symbolWithColorInfo,element:t.columns.template})),h.size<=1&&(u=p.symbolWithColorInfo??c),lW(t,l),u}function uW(a){let{series:t,seriesSymbolMapForEvent:e,seriesIndexMapper:i,seriesIndex:r,colorMatch:s,rendererType:n}=a,o=a.seriesConfig,l=ye(t.chart.uid,"config"),h=l?.series.length??0,u=It(l?.series),c=hW({series:t,seriesConfig:o,seriesIndex:r,numberOfSeries:h,chartSubType:u,colorMatch:s,rendererType:n});e.set(i.get(o.id)??r,c),e.size===h&&an({data:e,htmlContainer:t.chart.htmlContainer,chartId:t.chart.id,colorMatchApplied:kv(t.chart)})}function X1(a){let{seriesConfig:t,series:e,seriesIndexMapper:i,rotationChanged:r,colorMatch:s,stackedType:n,rendererType:o,seriesIndex:l,seriesSymbolMapForEvent:h,queryObject:u}=a,{name:c}=t,d=ye(e.chart.uid,"config"),A=bn({config:d}),p=It(d?.series);Ui(e,t.visible);let f=c,m=e.dataFields?.customValue??"";(p===ke.BarAndLineSplitBy||p===ke.BarAndLineSplitByNoAggregation)&&(f=rg({queryObject:u,fieldName:Tn(m),fieldValue:f})??f),_A(e,f),ww({series:e,seriesConfig:t,rotationChanged:r,stackedType:n,isRotated:A}),uW({series:e,seriesConfig:t,seriesIndex:l,seriesIndexMapper:i,colorMatch:s,rendererType:o,seriesSymbolMapForEvent:h}),Zn(e.uid,{barSeriesLastUpdate:{numberOfColumnsUpdated:e.columns.length,updateProps:a}})}function cW(a){a.events.on(Ie.Validated,()=>{let t=sa(a.uid,"barSeriesLastUpdate");if(t!==void 0){let{numberOfColumnsUpdated:e,updateProps:i}=t;a.columns.length>e&&X1(i)}})}function dW(a){let{chart:t,chartConfig:e,seriesIndex:i,axisList:r=[],selectionTheme:s,queryObject:n,errorStrings:o}=a,{rotated:l}=e,h=e.series[i],{y:u,assignToSecondValueAxis:c}=h,d=new Xi;d.id=h.id;let A,p;l!==!0?(A=r[0],p=c===!0&&r[2]?r[2]:r[1]):(A=c===!0&&r[2]?r[2]:r[0],p=r[1]),A!==void 0&&(d.xAxis=A),p!==void 0&&(d.yAxis=p);let f=t instanceof Vt?bn({chart:t}):!1,m=It(e.series)!==ke.BarAndLineSplitByNoAggregation?u:`${u}_${vh({where:h.query?.where,keepSurroundingQuotes:!1,escape:!1})}`;f?d.dataFields.valueX=m:d.dataFields.valueY=m;let g=f?r[1]:r[0];if(g!==void 0){let y=c1(g,f);d.dataFields[y]=re.xAxisField,d.baseAxis=g}return ww({series:d,seriesConfig:h,rotationChanged:!1,stackedType:e.stackedType,isRotated:f}),d.dataFields.customValue=h?.query?.where,v1(d.columns.template,d),d.columns.template.width=he(100),Xc({element:d.columns.template,customSelectionTheme:s}),Qf({chart:t,element:d.columns.template,queryObject:n,errorStrings:o}),Pw(d),cW(d),Wc(d),d}function AW(a){let{seriesConfig:t,series:e,seriesIndex:i,axes:r,utilsStrings:s,fieldList:n,queryObject:o,stackedType:l,options:h}=a;e.id=t.id;let u=bn({chart:e.chart});tj({series:e,seriesType:V.BarSeries,isRotated:u,stackedType:l,hideOversizedSideBySideLabels:t.hideOversizedSideBySideLabels,hideOversizedStackedLabels:t.hideOversizedStackedLabels,dataLabelsConfig:t.dataLabels,yAxisValueFormat:r[1].valueFormat,customDataLabelFormatter:h?.dataLabelFormatter}),$v({styleCallback:()=>X1(a),series:e,seriesConfig:t}),x1({series:e,seriesConfig:t,fieldList:n,queryObject:o,utilsStrings:s,seriesIndex:i,tooltipFormatter:h?.tooltipFormatter})}function pW(a){a.labels.template.adapter.add("html",(t,e)=>{let i=sa(a.uid,"pieChartDataLabelFormatter"),r=t??"",{dataItem:s}=e;if(s instanceof Fa){let{slice:n}=s;if(n!==void 0&&!Of(n))r="";else if(i!==void 0){let{value:o,percent:l}=s.values?.value??{};if(o!==void 0&&o!==0){let h=`${s.properties?.category??t}`;r=i(h,o,l)}}}return zi(r)&&(r=re.htmlEmptyContent),Zr(r)})}function fW(a){let t=a.labels.template;t.maxWidth=re.pieChart.dataLabels.maxWidth??Number.NaN,t.wrap=re.pieChart.dataLabels.wrap??!0,t.events.on(Ie.Over,e=>{let{dataItem:i}=e.target??{};i instanceof Fa&&i.slice.showTooltip()}),pW(a)}function mW(a,t){let{numericValueFormat:e,percentValueFormat:i,displayCategoryOnDataLabel:r,displayNumericValueOnDataLabel:s,displayPercentageOnDataLabel:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u,dataLabelsCharacterLimit:c}=t,d=Tw({iLocale:a.chart.language.locale,pieChart:a.chart,valueIntlOptions:e?.intlOptions,percentageIntlOptions:i?.intlOptions,displayNumericValue:s??re.pieChart.displayNumericValueOnDataLabel,displayPercentage:n??re.pieChart.displayPercentageOnDataLabel,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}),A=Jm(c),p=Ra(a.rtl," ");return(f,m,g)=>{let y=d(f,m,g),x=r??re.pieChart.displayCategoryOnDataLabel?A(f):"",w=zi(x)?"":`${x}${p}`;return w=`${w}${y}`,t.dataLabels?.content!==void 0&&(w=xa({textSymbol:{...t.dataLabels.content,text:w},format:"html",defaults:{...re.pieChart.dataLabels,wrap:t.optimizeDataLabelsOverlapping??re.pieChart.dataLabels.wrap}})),w}}function gW(a){let{pieSeries:t,seriesConfig:e,dataLabelFormatter:i}=a,{dataLabels:r}=e,s=e.dataLabelsOffset??re.pieChart.dataLabelsOffset,n=e.dataLabelsInside??re.pieChart.dataLabelsInside;Zn(t.uid,{pieChartDataLabelFormatter:i??mW(t,e)}),xn({label:t.labels.template,labelConfig:r,defaults:{...re.pieChart.dataLabels,wrap:e.optimizeDataLabelsOverlapping??re.pieChart.alignDataLabels},skipSettingText:!0}),t.alignLabels=!n&&(e.alignDataLabels??re.pieChart.alignDataLabels);let o=t.labels.template.radius;t.chart.invalidateData(),(n&&o!==he(-40)||!n&&o===he(-40)||s!==void 0&&Number.isFinite(s)&&o!==s)&&(t.labels.template.radius=n?he(-40):s,t.invalidate())}function yW(a,t){let e=(p,f,m)=>re.htmlEmptyContent,{numericValueFormat:i,percentValueFormat:r,dataTooltipValueFormat:s,dataTooltipPercentFormat:n,displayCategoryOnTooltip:o,displayNumericValueOnTooltip:l,displayPercentageOnTooltip:h,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A}=t;return e=(p,f,m)=>{let g=re.htmlEmptyContent,y=Tw({iLocale:a.chart.language.locale,pieChart:a.chart,valueIntlOptions:(s??i)?.intlOptions,percentageIntlOptions:(n??r)?.intlOptions,displayNumericValue:l??re.pieChart.displayNumericValueOnTooltip,displayPercentage:h??re.pieChart.displayPercentageOnTooltip,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A})("",f,m),x=!zi(p)&&(o??re.pieChart.displayCategoryOnTooltip);if(x&&(g=`<b>${p}</b>`),!zi(y)){let w=eg(y);g=x?`${g}<br />${w}`:w}return g},e}function vW(a){if(a.tooltip!==void 0){let t=a.fill;t instanceof vc?t=t.stroke:t instanceof bc&&(t=t.backgroundFill),a.tooltip.background.fill=t}}function bW(a){let t=a.slices.template;t.tooltipHTML=re.htmlEmptyContent,t.adapter.add("tooltipHTML",(e,i)=>{let r=e??"",{chart:s}=a;if(s!==void 0&&i.tooltip!==void 0){let n=ye(s.uid,"config"),{dataTooltipVisible:o}=n?.series[0]??{};if(o===!1)i.tooltip.disabled=!0;else{let l=sa(a.uid,"pieChartTooltipFormatter");if(l!==void 0){let{dataItem:h}=i;if(h instanceof Fa){let u=h.properties.category??"",c=h.dataContext,d=oo(c);d===void 0&&(d=u);let A=h.values?.value?.value,p=h.values?.value?.percent;typeof A=="number"&&A!==0&&n?.series?.[0]?.dataTooltipVisible!==!1?(i.tooltip.disabled=!1,vW(i),r=l(`${u}`,A,p,d)):i.tooltip.disabled=!0}}}}return Zr(r)})}function xW(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Zn(t.uid,{pieChartTooltipFormatter:i??yW(t,e)}),Ev(t,e)}function _W(a){a.ticks.template.adapter.add("disabled",(t,e)=>e.dataItem?.values?.value?.value===0||!Number.isFinite(e.dataItem?.values?.value?.value)||t===!0)}function CW(a){let{chartData:t,pieSeries:e,pieSlicesSymbols:i,seriesConfig:r}=a;if(e.slices.length===0){let s=[];t?.forEach(n=>{let o=xw({dataContext:n,pieSlicesSymbols:i,seriesConfig:r});s.push(Nc(o.color))}),s.length>0&&(e.colors.list=s)}}function wW(a){let{seriesConfig:t,selectionTheme:e}=a,{x:i,y:r,id:s,visible:n}=t,o=new ws;o.id=s,o.dataFields.value=r,o.dataFields.category=i;let l=re.pieChart;o.startAngle=l.min,o.endAngle=360+o.startAngle,_W(o),bW(o),fW(o);let h=e!==void 0&&e.selectedElementsTheme?.transformation?.opacity===void 0?{...e,selectedElementsTheme:{...e?.selectedElementsTheme,transformation:{...e?.selectedElementsTheme?.transformation,opacity:1}}}:e;return Xc({element:o.slices.template,useNativeState:!0,customSelectionTheme:h}),o.slices.template.states.removeKey("hover"),Wc(o),o.hidden=n===!1,Pw(o),o}function BW(a){let{series:t,pieSlicesSymbols:e,seriesConfig:i,selectionTheme:r}=a;t.defaultState.reset(),t.slices.each((s,n)=>{let o=s.dataItem?.dataContext,l=xw({dataContext:o,pieSlicesSymbols:e,seriesConfig:i}),h=Ef({element:s,fillSymbol:l,defaultToColorFromRamp:!0,colorRampIndex:n,isChartFillSymbol:!0});r!==void 0&&r.selectedElementsTheme===void 0&&gA({element:s,stylingInfo:h,stateKey:ia.Active})})}function SW(a,t){let{ticks:e}=t,i=e?.visible===!1||t.dataLabelsInside===!0||t.dataLabels===void 0||t.dataLabels?.visible===!1||t.dataLabelsOffset!==void 0&&t.dataLabelsOffset<=0;a.ticks.template.disabled=i,a.ticks.template.strokeOpacity=re.pieChart.ticksOpacity;let r=e?.lineSymbol??KA({color:Nm});i&&(r.width=0),Vc({element:a.ticks.template,lineSymbol:r,visible:!i})}function FW(a){let{chart:t,seriesConfig:e,series:i,pieSlicesSymbols:r,options:s}=a,{tooltipFormatter:n,dataLabelFormatter:o}=s??{},{x:l,y:h,id:u,innerRadius:c,startAngle:d,endAngle:A}=e;i.id=u;let p=It([e]),f=re.pieChart;i.dataFields.value=p!==ke.PieFromFields?h:Ru,i.dataFields.category=p!==ke.PieFromFields?l:ao;let m=t.radius instanceof et?t.radius.value:t.radius;t.innerRadius=he((c??f.innerRadius)*m),i.startAngle=d??f.min,i.endAngle=A??360+i.startAngle,gW({pieSeries:i,seriesConfig:e,dataLabelFormatter:o}),CW({chartData:t.data,pieSeries:i,pieSlicesSymbols:r,seriesConfig:e}),$v({styleCallback:()=>BW(a),series:i,seriesConfig:e}),SW(i,e),xW({series:i,seriesConfig:e,tooltipFormatter:n})}async function aI(a){let{chart:t,hitSlice:e,multiSelect:i=!1,queryObject:r,errorStrings:s}=a,n=[],o=ye(t.uid,"config"),l=t.series.getIndex(0);if(o&&l!==void 0){let h=i1(l),u=xu(l),c={element:{},xAxisField:h,yAxisField:u,seriesIndex:0,chartConfig:o};l.slices.each((d,A)=>{d.isActive&&(d===e||i||d.dataItem instanceof Fa&&d.dataItem.label.isHover)?ih(d.dataItem?.dataContext)?(Nf({groupOfSlicesDataContext:d.dataItem?.dataContext})??[]).forEach(p=>{n.push({...c,element:void 0,elementDataContext:p,elementIndex:A})}):n.push({...c,element:d,elementDataContext:d.dataItem?.dataContext,elementIndex:A}):Yn({element:d,selected:!1,useNativeState:!0})}),n.forEach(d=>{Yn({element:d.element,selected:!0,useNativeState:!0})}),await jf({chart:t,listSelectedElements:n,selectionSource:Tr.SelectionByClick,queryObject:r,errorStrings:s})}t.feedLegend()}function TW(a,t,e){let i=async n=>{let{target:o}=n;if(p1(a)&&a.series.getIndex(0)?.slices.template.togglable){let l=Ov(n,a);if(o instanceof Sa)await aI({chart:a,multiSelect:l,hitSlice:o,queryObject:t,errorStrings:e});else if(o instanceof Mi){let h=o.dataItem;if(h instanceof Fa){let{slice:u}=h;u.isActive=!u.isActive,await aI({chart:a,multiSelect:l,hitSlice:u,queryObject:t,errorStrings:e})}}else o===a.background&&await jf({chart:a,listSelectedElements:[],selectionSource:Tr.SelectionByClick,queryObject:t,errorStrings:e})}},r=a.series.getIndex(0)?.slices.template;r!==void 0&&(r.events.on(Ie.Hit,i),r.events.on(Ie.DoubleHit,i));let s=a.series.getIndex(0)?.labels.template;s!==void 0&&s.events.on(Ie.Hit,i),a.background.events.on(Ie.Hit,i),a.background.events.on(Ie.DoubleHit,i)}function nI(a){let t;return typeof a=="number"&&Number.isFinite(a)&&a>0&&(t=a),t}function PW(a){let{chartContainer:t}=a,e=nI(t.measuredWidth),i=nI(t.measuredHeight),r;return e!==void 0&&i!==void 0&&(r={width:e,minSide:Math.min(e,i)}),r}function oI(a){return a?.offsetParent!==null}function DW(a,t){a!==void 0&&t!==void 0&&window.IntersectionObserver!==void 0&&new IntersectionObserver(e=>{e[0].intersectionRatio>0&&(ye(a.uid,"chartWasCreatedWhileHidden")===!0?(a.reinit(),a.events.once(Ie.Validated,()=>{a.reinit()}),a instanceof Vt&&Rv(a),ai(a.uid,{chartWasCreatedWhileHidden:!1})):ye(a.uid,"chartWasUpdatedWhileHidden")===!0&&(a.reinit(),ai(a.uid,{chartWasUpdatedWhileHidden:!1})))},{root:null}).observe(t)}function LW(a,t){let e=re.pieChart.dataLabels.maxWidth??100,i=e;if(a!=null){let{alignDataLabels:r,dataLabelsOffset:s=re.pieChart.dataLabelsOffset,optimizeDataLabelsOverlapping:n,dataLabels:o,dataLabelsInside:l}=a;if(o?.visible===!0&&r===!0&&l!==!0&&n===!0){let h=e,u=PW(t),c=typeof t.radius=="number"?t.radius/100:t.radius.value;if(u!==void 0&&Number.isFinite(c)){let{width:d,minSide:A}=u,p=c*A,f=5,m=Math.floor((d-p)/2)-f-s;if(Number.isFinite(m)){h=Math.min(m,e-f);let g=30;h<g&&(h=g),Number.isFinite(h)||(h=e)}}i=h}}return i}function z1(a){if(qn(a)){let t=typeof a.radius=="number"?a.radius:a.radius.percent;ai(a.uid,{pieChartRadius:t});let e=()=>{let i=he(ye(a.uid,"pieChartRadius")??re.pieChart.chartOptimizedRadius),r=i,s=ye(a.uid,"config");if(s!==void 0){let{series:n}=s,{innerRadius:o,optimizeDataLabelsOverlapping:l,alignDataLabels:h,dataLabelsOffset:u=re.pieChart.dataLabelsOffset,dataLabels:c,dataLabelsInside:d}=n[0];if(c?.visible===!0&&h===!0&&l===!0&&d!==!0){let p=re.pieChart.chartOptimizedRadius/100,f=500,m=150,g=.6,y=.5,x=1,w=a.chartContainer.measuredWidth-u*2,S=Math.max(w-m,0)/(f-m),F=S<1?Math.max(S**x*g,.4):Math.min(S**y*g,p);r=he(F*100)}else r=he(re.pieChart.chartRadius);i.value.toFixed(1)!==r.value.toFixed(1)&&(ai(a.uid,{pieChartRadius:r.percent}),a.radius=r,a.innerRadius=he((o??re.pieChart.innerRadius)*r.value));let A=a.series?.values?.[0];A instanceof ws&&(A.labels.template.maxWidth=LW(s?.series[0],a))}return r};a.events.on(Ie.SizeChanged,Is(e,re.debounceTime)),e(),a.validate()}}function G1(a){if(a instanceof pr)z1(a);else if(!(a instanceof Ys)){let t=()=>{let i=ye(a.uid,"config"),{chartPaddingMinSize:r,chartPaddingRightWhenLegendNotOnRight:s,chartContainerPaddingTopWhenRotated:n,chartContainer:o}=re,l=i?.series,h=ze(l),u=bn({config:i}),c=l?.[0]?.dataLabels?.visible??!0,d=re.chartDefaultPaddingRight;if(u&&c&&(h===V.LineSeries||h===V.ComboLineAndBarSeries||h===V.BarSeries&&(i?.stackedType??qb())===$i.Side)){let p=0,f=m=>gs(m.uid,"isDataLabel")??!1;a.series.each(m=>{let g=m.bullets.values.find(f);g!==void 0&&g.clones.each(y=>{let x=y.measuredWidth;switch(y.horizontalCenter){case"middle":x/=2;break;case"right":x*=-1;break}let w=y.pixelX+x;w>p&&(p=w,d=x)})})}d>=0&&(a.chartContainer.paddingRight=d),a.chartContainer.paddingTop=u?n:o.paddingTop;let A=i?.legend?.visible!==!1&&i?.legend?.position===st.Right;a.paddingRight=A?r:s},e=0;a.series.each(i=>{i.events.once(Ie.Validated,()=>{e+=1,e===a.series.length&&t()})})}}function IW(a,t){a.adapter.add("criticalError",e=>(e.message=t.errors.simpleError,e))}it.classNamePrefix="arcgis-charts-";function Mw(a){let{chart:t,localeInfo:e,chartLocale:i}=a;it.defaultLocale=i,t.language.locale=i,ai(t.uid,{formatLocale:e.formatLocale}),t.rtl=e.rtl}function Hv(a){let{chart:t,actionMode:e,cursorRange:i}=a;if(qn(t)){let r=e??ye(t.uid,"actionMode")??re.actionMode;ai(t.uid,{actionMode:r});let s=ye(t.uid,"filterBySelection");switch(r){case Ut.MonoSelection:case Ut.MultiSelection:case Ut.MultiSelectionWithCtrlKey:s!==!0?jQ(t):XC(t);break;case Ut.Zoom:XC(t);break;case Ut.None:wA({chart:t,selectionSource:Tr.ClearSelection,clearOnlyVisibleSeries:!1,disposeStyleAndSelection:!1}),XC(t);break}pQ({chart:t,actionMode:r,cursorRange:i})}}function kW(a,t){t&&(a.tapToActivate=!0,a.tapTimeout=3e3,a.responsive.enabled=!0)}function $W(a){let{chart:t,axesConfig:e,chartType:i,isRotated:r,errorStrings:s,queryObject:n}=a;switch(Pl({chartType:i,axesConfig:e,errorStrings:s}),i){case V.GaugeSeries:{io(n),t instanceof Ys&&e?.[0]?.valueFormat!==void 0&&Gj({chart:t,valueFormat:e[0].valueFormat,queryObject:n,errorStrings:s});break}case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:case V.BoxPlotSeries:{xj({chart:t,chartType:i,isRotated:r,axesConfig:e,queryObject:n,errorStrings:s});break}}}function Rw(a){let{chart:t,chartConfig:e,chartConfig:{axes:i},rotationChanged:r,axisLabelsBehaviorChanged:s,chartType:n,isRotated:o,dualAxisChanged:l,timeIntervalInfoWasReset:h,data:u,queryObject:c,guideTooltipFormatter:d,xAxisLabelFormatter:A,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:f,gaugeInnerLabelFormatter:m,options:g,utilsStrings:y,errorStrings:x,gaugeMinMaxFromData:w}=a;switch(Pl({chartType:n,axesConfig:i,errorStrings:x}),n){case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:case V.BoxPlotSeries:{t instanceof Vt&&_j({chart:t,chartConfig:e,rotationChanged:r,axisLabelsBehaviorChanged:s,isRotated:o,dualAxisChanged:l,timeIntervalInfoWasReset:h,timeIntervalInfo:u?.timeIntervalInfo??ye(t.uid,"timeIntervalInfo"),guideTooltipFormatter:d,xAxisLabelFormatter:A,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:f,options:g,utilsStrings:y,errorStrings:x,queryObject:c});break}case V.GaugeSeries:{t instanceof Ys&&(io(c),qj({chart:t,chartConfig:e,data:(u??t.data).dataItems,queryObject:c,axisValueFormatter:A,gaugeInnerLabelFormatter:m,utilsStrings:y,errorStrings:x,gaugeMinMaxFromData:w}));break}}}function Y1(a){let{chart:t,chartConfig:e,options:i,utilsStrings:r,errorStrings:s,queryObject:n}=a,{selectionTheme:o,ignoreSmoothRenderingLimit:l}=i??{};t.series.clear();let h,u,c=[],d=t instanceof Vt?[t.xAxes.getIndex(0),t.yAxes.getIndex(0),t.xAxes.getIndex(1)??t.yAxes.getIndex(1)]:void 0,A={selectionTheme:o,utilsStrings:r},p={...A,axisList:d};if(t instanceof Vt)for(let m=0;m<e.series.length;m+=1){let g=e.series[m];if(u=ze([g]),Dl(e))h=zH({...p,chart:t,axisList:d,chartConfig:e,seriesIndex:m,queryObject:n,errorStrings:s}),c.push(...h.flat());else switch(u){case V.BarSeries:{h=dW({...p,chart:t,chartConfig:e,seriesIndex:m,queryObject:n,errorStrings:s}),c.push(h);break}case V.LineSeries:{io(n),h=RH({...p,chart:t,chartConfig:e,seriesIndex:m,ignoreSmoothRenderingLimit:l,queryObject:n,errorStrings:s}),c.push(h);break}}}else t instanceof pr&&e.series[0].type===V.PieSeries&&(h=wW({...A,seriesConfig:e.series[0]}),c.push(h));c.forEach(m=>{iW(m)});let f=YF({chartConfig:e,queryObject:n,chartData:t.data});f.length>0&&(t.colors.list=f.map(m=>{let[g,y,x,w]=m;return new xt({r:g,g:y,b:x,a:w})})),c.length>0&&t.series.pushAll(c),XQ(t)}function Uw(a){let{chart:t,chartConfig:e,chartConfig:{series:i,axes:r,chartRenderer:s},seriesIndexMapper:n,rotationChanged:o,seriesReordered:l,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:u,chartData:c,queryObject:d,options:A,dataWasUpdated:p,sortChanged:f,groupOfSlicesWasUpdated:m,pieSlicesSymbols:g,seriesWereReinitialized:y,utilsStrings:x,errorStrings:w}=a,S=t.series.values,F=new Map,T=e.series.length,L=Fl(e),O=ks(e),I=_a(d,A?.popupTemplateFieldInfosEnabled),U=$s(d),P=tg(s,cs(U)?void 0:U?.renderer);for(let[Q,G]of i.entries()){let Y=ze([G]),ee=S[Q],te={numberOfSeries:T,series:ee,seriesConfig:G,seriesIndex:Q,colorMatch:L,queryObject:d,rendererType:P,options:A,dataWasUpdated:p,fieldList:I,sortChanged:f,utilsStrings:x},le={...te,axes:r,seriesIndexMapper:n},z=ee;if(t instanceof Vt&&Dl(e))z=S.find(K=>K.id===G.id),ee!==void 0&&(z instanceof Cr||z instanceof Ti)&&a2({...te,chart:t,series:z,seriesIndexMapper:n,seriesSymbolMapForEvent:F,chartData:c,showOutliers:e.showOutliers,showMean:e.showMean,outliersVisibilityChanged:h,seriesReordered:l,standardizeValuesVisibilityChanged:u,rotationChanged:o,seriesWereReinitialized:y,options:A});else switch(Y){case V.BarSeries:AW({...le,stackedType:O,seriesSymbolMapForEvent:F,rotationChanged:o});break;case V.LineSeries:HH({...le,stackedType:O,seriesSymbolMapForEvent:F,rotationChanged:o});break;case V.PieSeries:FW({...te,chart:t,pieSlicesSymbols:g,selectionTheme:A?.selectionTheme});break}}f2({chart:t,options:A,dataWasUpdated:p,chartData:c,chartConfig:e,queryObject:d,sortChanged:f,groupOfSlicesWasUpdated:m,errorStrings:w})}function Vw(a){let{chartConfig:t}=a,{chart:e,options:i,globalOptions:r,colorMatchApplied:s,pieSlicesSymbols:n,queryObject:o,utilsStrings:l,errorStrings:h,dataInfo:u}=a,{togglingLegendItemsDisabled:c,cursorRange:d,actionMode:A,pieChartLegendValueLabelFormatter:p,guideTooltipFormatter:f,xAxisLabelFormatter:m,yAxisLabelFormatter:g,secondaryYAxisLabelFormatter:y,gaugeInnerLabelFormatter:x,popupTemplateFieldInfosEnabled:w}=i??{},{data:S,count:F,queryConfig:T,gaugeMinMaxFromData:L={}}=u??{},O,I,U,P=ze(t.series),Q=_a(o,w);ai(e.uid,{fieldList:Q,options:i,elementCount:F,queryConfig:T,timeIntervalInfo:S?.timeIntervalInfo,serverLimitReached:S?.serverLimitReached});let G=new Map;t.series.forEach(($e,Ye)=>{G.set($e.id,Ye)});let Y=Pn(S);Y!==void 0&&(e.data=Y);let ee=It(t.series);e instanceof pr&&an({data:n,htmlContainer:e.htmlContainer,chartId:e.id,colorMatchApplied:s===!0});let{title:te,subtitle:le,footer:z,series:K,background:we}=t;O=eW(e),Nv(O,{title:te,subtitle:le}),I=tW(e),Qv(I,z),U=MH(e,K),uH(e);let se=bn({config:t});ai(e.uid,{config:t,isRotated:se,isNonAggregatedChart:!rp(ee)}),t.axes!==void 0&&($W({chart:e,axesConfig:t.axes,chartType:P,isRotated:se,errorStrings:h,queryObject:o}),Rw({chart:e,chartConfig:t,chartType:P,isRotated:se,data:S,queryObject:o,guideTooltipFormatter:f,xAxisLabelFormatter:m,yAxisLabelFormatter:g,secondaryYAxisLabelFormatter:y,gaugeInnerLabelFormatter:x,options:i,utilsStrings:l,errorStrings:h,gaugeMinMaxFromData:L})),Y1({chart:e,chartConfig:t,utilsStrings:l,options:i,queryObject:o,errorStrings:h}),Uw({chart:e,chartConfig:t,seriesIndexMapper:G,rotationChanged:!1,queryObject:o,chartData:S,groupOfSlicesWasUpdated:!0,pieSlicesSymbols:n,dataWasUpdated:!0,seriesWereReinitialized:!0,options:i,utilsStrings:l,errorStrings:h}),Dw({legendElements:U,seriesConfig:K,webChartLegend:t.legend,pieChartLegendValueLabelFormatter:p}),j1(e),Jj(e),Vv(e,we),W1({chart:e,scrollbarXConfig:t.axes?.[0]?.scrollbar,scrollbarYConfig:t.axes?.[1]?.scrollbar}),qI(e),JI(e,t?.cursorCrosshair),Hv({chart:e,actionMode:A,cursorRange:d});let de=Ad(e.htmlContainer??document.documentElement);return e.dateFormatter.intlLocales=de,kW(e,r?.enableResponsiveFeatures),(e instanceof Ys||Ew(e.series))&&Uu(e.htmlContainer),G1(e),O!==void 0&&I!==void 0&&U!==void 0?{headerElements:O,footerElements:I,legendElements:U}:void 0}function K1(a){a.series.each(t=>{t.events.on(Ie.Ready,()=>{Ew(a.series)&&Rv(a)})})}function OW(a){let{chartContainer:t,chartConfig:e,queryObject:i,colorMatchApplied:r,dataInfo:s,t9nStrings:n,options:o,globalOptions:l}=a,{errorStrings:h,utilsStrings:u,amChartsStrings:c}=n,d=nf(t,Vt);d.id=e?.id??d.uid,ai(d.uid,{queryObject:i});let{t9nLocale:A}=Lu(d.htmlContainer??document.documentElement),p=Ad(d.htmlContainer??document.documentElement),f=Mm(d.htmlContainer??document.documentElement)==="rtl";Mw({chart:d,localeInfo:{locale:A,formatLocale:p,rtl:f},chartLocale:c}),d.events.on(Ie.Inited,()=>d.zoomOutButton.deepInvalidate());let m=ze(e?.series);d instanceof Vt&&m!==V.BoxPlotSeries&&(d.maskBullets=!1);let g=Vw({chartConfig:e,chart:d,queryObject:i,colorMatchApplied:r,options:o,globalOptions:l,utilsStrings:u,errorStrings:h,dataInfo:s});return ai(d.uid,{config:Fr(e)}),K1(d),NQ({chart:d,queryObject:i,errorStrings:h}),QQ({chart:d,queryObject:i,errorStrings:h}),{chart:d,chartElements:g}}function EW(a){let{chartContainer:t,chartConfig:e,queryObject:i,dataInfo:r,colorMatchApplied:s,pieSlicesSymbols:n,t9nStrings:{errorStrings:o,utilsStrings:l,amChartsStrings:h},options:u,globalOptions:c}=a,d=nf(t,pr);d.id=e?.id??d.uid;let A=xx(d.htmlContainer);Mw({chart:d,localeInfo:A,chartLocale:h}),d.radius=he(re.pieChart.chartRadius);let p=Vw({chartConfig:e,chart:d,queryObject:i,colorMatchApplied:s,pieSlicesSymbols:n,dataInfo:r,options:u,globalOptions:c,utilsStrings:l,errorStrings:o});return ai(d.uid,{config:Fr(e),filterBySelection:u?.filterBySelection}),TW(d,i,o),{chart:d,chartElements:p}}function MW(a){let{chartContainer:t,chartConfig:e,queryObject:i,dataInfo:r,t9nStrings:{errorStrings:s,utilsStrings:n,amChartsStrings:o},options:l,globalOptions:h}=a,u=nf(t,Ys);u.id=e?.id??u.uid;let c=xx(u.htmlContainer);Mw({chart:u,localeInfo:c,chartLocale:o}),u.maskBullets=!1;let d=re.gauge,A=Number.isFinite(e?.innerRadius)?e?.innerRadius:d.innerRadius,p=Number.isFinite(e?.startAngle)?e?.startAngle:d.startAngle,f=Number.isFinite(e?.endAngle)?e?.endAngle:d.endAngle;u.radius=he(d.radius),typeof A=="number"&&(u.innerRadius=he(A)),typeof p=="number"&&(u.startAngle=p),typeof f=="number"&&(u.endAngle=f);let m=Vw({chartConfig:e,chart:u,queryObject:i,dataInfo:r,options:l,globalOptions:h,utilsStrings:n,errorStrings:s});return ai(u.uid,{config:Fr(e)}),K1(u),t?.ownerDocument.addEventListener("visibilitychange",()=>{let g=t.ownerDocument.hidden;u&&!g&&Fj(e?.axes?.[0])&&(u.svgContainer?.measure(),u.invalidateData())}),{chart:u,chartElements:m}}function RW(a){let{newConfig:t}=a,{chart:e,chartElements:i,dataWasUpdated:r,dataUpdateDetails:s,dataInfo:n,options:o,configWithAllSeries:l,hasSeriesFilteredOut:h,queryObject:u,utilsStrings:c,errorStrings:d}=a,{guideTooltipFormatter:A}=o??{},{gaugeMinMaxFromData:p={}}=n,f=ye(e.uid,"config"),m=f?.series,g=t.series,y=ze(g),x=bn({config:t});ai(e.uid,{config:Fr(t),isRotated:x}),ai(e.uid,{filterBySelection:o?.filterBySelection}),Hv({chart:e,actionMode:o?.actionMode,cursorRange:o?.cursorRange});let{xOrYChanged:w,layerChanged:S}=s?.common??{},{numberOfSeriesChanged:F}=s?.common??{},T=ux(f,t),L=cx(f,t),O=EF(f,t),I=MF(f,t),U=JSON.stringify(ZA(m))!==JSON.stringify(ZA(g)),P=!1,Q=!1;Dl(t)&&Dl(f)&&(P=UF(f,t),Q=VF(f,t));let G=tp({oldConfig:h?l:f,newConfig:t,dataWasUpdated:r}),Y=ix({oldConfig:f,newConfig:t,rotationChanged:L}),ee=U1({chart:e,dualAxisChanged:O,rotationChanged:L,timeIntervalInfoWasReset:T,axisLabelsBehaviorChanged:Y}),te=!1,le=Pn(n?.data),z=It(g);if(ai(e.uid,{isNonAggregatedChart:!rp(z)}),r){let{count:Ye,data:He,queryConfig:qe}=n??{};ai(e.uid,{elementCount:Ye,queryConfig:qe,timeIntervalInfo:He?.timeIntervalInfo,serverLimitReached:He?.serverLimitReached})}else if(y===V.BarSeries||y===V.LineSeries||y===V.RadarSeries||y===V.ComboLineAndBarSeries||y===V.BoxPlotSeries){let Ye=bx(m,g);if(Ye.length>0&&(LN(e.series,Ye),e.feedLegend(),te=!0),bh(g[0])){let{binTemporalData:He}=g[0],{unit:qe,size:Tt}=g[0].temporalBinning??{};He===!1&&qe!==void 0&&Tt!==void 0&&ai(e.uid,{timeIntervalInfo:{unit:qe,size:Tt}})}}let K=G&&!r,we=new Map;(l??t).series.forEach((Ye,He)=>{we.set(Ye.id,He)}),F=F||h,le&&(r||G)&&(e.data=le),t.axes!==void 0&&Rw({chart:e,chartConfig:t,rotationChanged:L,timeIntervalInfoWasReset:T,axisLabelsBehaviorChanged:Y,chartType:y,isRotated:x,dualAxisChanged:O,guideTooltipFormatter:A,xAxisLabelFormatter:o?.xAxisLabelFormatter,yAxisLabelFormatter:o?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:o?.secondaryYAxisLabelFormatter,queryObject:u,options:o,utilsStrings:c,errorStrings:d,gaugeMinMaxFromData:p});let se=y===V.BoxPlotSeries&&(OF(g,m)||$F(g,m)),de=!1;(e.series===void 0||e.series.length===0||w||S||F||U||(y===V.BarSeries||y===V.LineSeries||y===V.RadarSeries||y===V.ComboLineAndBarSeries)&&e.series.length!==t.series.length||ee||I||se||s?.boxPlot?.showMeanChanged)&&(de=!0,!r&&(L||se||ee)&&e.invalidateData(),Y1({chart:e,chartConfig:t,utilsStrings:c,queryObject:u,options:o,errorStrings:d})),Uw({chart:e,chartConfig:t,seriesIndexMapper:we,rotationChanged:L,seriesReordered:te,outliersVisibilityChanged:P,standardizeValuesVisibilityChanged:Q,queryObject:u,chartData:n.data,options:o,dataWasUpdated:r,sortChanged:G,seriesWereReinitialized:de,utilsStrings:c,errorStrings:d}),K&&(e.validateData(),y===V.BoxPlotSeries&&e.series.each(Ye=>{Ye instanceof Ti&&!(Ye instanceof Aa)&&Ye.id.includes(ji.Outliers)&&Ye.validateData()})),Nv(i.headerElements,{title:t.title,subtitle:t.subtitle}),Qv(i.footerElements,t.footer),Dw({legendElements:i.legendElements,seriesConfig:t.series,webChartLegend:t.legend,togglingLegendItemsDisabled:o?.togglingLegendItemsDisabled}),Vv(e,t.background),W1({chart:e,scrollbarXConfig:t.axes?.[0]?.scrollbar,scrollbarYConfig:t.axes?.[1]?.scrollbar}),JI(e,t?.cursorCrosshair);let $e=dQ(e);($e.behavior===Hi.SelectX||$e.behavior===Hi.SelectXY||$e.behavior===Hi.SelectY||$e.behavior===Hi.None)&&e.scrollbarX.start===0&&e.scrollbarX.end===1&&e.scrollbarY.start===0&&e.scrollbarY.end===1&&Rv(e),G1(e),R1(e.series.values[0])}function UW(a){let{chart:t,chartElements:e,dataWasUpdated:i,newConfig:r,pieSlicesSymbols:s,queryObject:n,options:o,dataInfo:l,utilsStrings:h,errorStrings:u}=a,c=ye(t.uid,"config"),d=c?.series,A=r?.series,p=tp({oldConfig:c,newConfig:r,dataWasUpdated:i}),f=bw(d,A),{count:m,data:g,queryConfig:y}=l??{},x=Pn(g);ai(t.uid,{filterBySelection:o?.filterBySelection,config:Fr(r)});let w=x!==void 0&&(t.data.length!==x.length||zI(t.data,x));w&&(ai(t.uid,{elementCount:m,queryConfig:y}),t.data=x,Uu(t.htmlContainer)),(p||f)&&t.validateData(),an({data:s,htmlContainer:t.htmlContainer,chartId:t.id,colorMatchApplied:kv(t,r)}),Uw({chart:t,queryObject:n,chartConfig:r,seriesIndexMapper:new Map,options:o,dataWasUpdated:w,sortChanged:p,chartData:g,groupOfSlicesWasUpdated:f,pieSlicesSymbols:s,seriesWereReinitialized:!1,utilsStrings:h,errorStrings:u}),Nv(e.headerElements,{title:r.title,subtitle:r.subtitle}),Qv(e.footerElements,r.footer),Dw({legendElements:e.legendElements,seriesConfig:r.series,webChartLegend:r.legend,togglingLegendItemsDisabled:o?.togglingLegendItemsDisabled,pieChartLegendValueLabelFormatter:o?.pieChartLegendValueLabelFormatter}),Vv(t,r.background),Hv({chart:t,actionMode:o?.actionMode,cursorRange:o?.cursorRange}),z1(t)}function VW(a){let{chart:t,chartElements:e,newConfig:i,queryObject:r,dataInfo:s,dataWasUpdated:n,options:o,utilsStrings:l,errorStrings:h}=a,{gaugeMinMaxFromData:u={}}=s??{},{xAxisLabelFormatter:c,gaugeInnerLabelFormatter:d,guideTooltipFormatter:A}=o??{},p=i.series,f=ze(p),m;if(n){let{count:S,data:F,queryConfig:T}=s??{};m=F,m?.dataItems!==void 0&&(t.data=m.dataItems),Uu(t.htmlContainer),ai(t.uid,{elementCount:S,queryConfig:T})}i.axes!==void 0&&Rw({chart:t,chartConfig:i,chartType:f,data:m,queryObject:r,xAxisLabelFormatter:c,gaugeInnerLabelFormatter:d,guideTooltipFormatter:A,options:o,utilsStrings:l,errorStrings:h,gaugeMinMaxFromData:u});let g=re.gauge,y=Number.isFinite(i?.innerRadius)?i.innerRadius:g.innerRadius,x=Number.isFinite(i?.startAngle)?i.startAngle:g.startAngle,w=Number.isFinite(i?.endAngle)?i.endAngle:g.endAngle;t.innerRadius=he(y),t.startAngle=x,t.endAngle=w,Nv(e.headerElements,{title:i.title,subtitle:i.subtitle}),Qv(e.footerElements,i.footer),Vv(t,i.background),ai(t.uid,{config:Fr(i)})}function NW(a){let{chartContainer:t,chartConfig:e,colorMatchApplied:i,pieSlicesSymbols:r,queryObject:s,dataInfo:n,t9nStrings:o,options:l,globalOptions:h}=a;it.commercialLicense=!(h?.showLicenseWatermark??h?.hideLicenseWatermark===!1),it.queue=h?.queueChartCreation!==!1,it.autoDispose=h?.autoDisposeChart===!0,h?.animationEnabled?B_(By):S_(By);let u;switch(ze(e?.series)){case V.PieSeries:io(s),u=EW({chartContainer:t,chartConfig:e,queryObject:s,dataInfo:n,colorMatchApplied:i,pieSlicesSymbols:r,options:l,globalOptions:h,t9nStrings:o});break;case V.GaugeSeries:io(s),u=MW({chartContainer:t,chartConfig:e,queryObject:s,dataInfo:n,options:l,globalOptions:h,t9nStrings:o});break;default:u=OW({chartContainer:t,chartConfig:e,dataInfo:n,colorMatchApplied:i,queryObject:s,options:l,globalOptions:h,t9nStrings:o});break}return u}function QW(a){let{chartContainer:t,chartConfig:e,t9nStrings:i,queryObject:r,options:s,colorMatchApplied:n,rendererFieldNames:o,pieSlicesSymbols:l,globalOptions:h,dataInfo:u,uniqueInternalID:c}=a,{errorStrings:d}=i,A=!oI(t),p=NW({chartContainer:t,chartConfig:e,dataInfo:u,colorMatchApplied:n,pieSlicesSymbols:l,queryObject:r,t9nStrings:i,options:s,globalOptions:h}),{chart:f,chartElements:m}=p;ai(f.uid,{chartWasCreatedWhileHidden:A,queryObject:r,filterBySelection:s?.filterBySelection,options:s,colorMatchApplied:n,rendererFieldNames:o}),IW(f,d),DW(f,t);function g(){c&&KF.delete(c),f.isDisposed()||(BQ(f),m!==void 0&&(p.chartElements=void 0),f.dispose())}function y(F){let{chartConfig:T,dataWasUpdated:L,dataUpdateDetails:O,queryObject:I,options:U,t9nStrings:{utilsStrings:P},configWithAllSeries:Q,hasSeriesFilteredOut:G,pieSlicesSymbols:Y,dataInfo:ee}=F,te=ye(f.uid,"config"),le=T?.series,z=le!==void 0?ze(le):void 0;if(f.isDisposed()||m===void 0||!mx(te,T))throw new Tl(cd.ChartDisposed);switch(z){case V.BoxPlotSeries:case V.BarSeries:case V.LineSeries:case V.ComboLineAndBarSeries:f instanceof Vt&&RW({chart:f,chartElements:m,queryObject:I,dataWasUpdated:L,dataUpdateDetails:O,dataInfo:ee,newConfig:T,configWithAllSeries:Q,hasSeriesFilteredOut:G,options:U,utilsStrings:P,errorStrings:d});break;case V.PieSeries:io(I),UW({chart:f,chartElements:m,queryObject:I,dataWasUpdated:L,dataInfo:ee,newConfig:T,pieSlicesSymbols:Y,options:U,utilsStrings:P,errorStrings:d});break;case V.GaugeSeries:io(I),VW({chart:f,chartElements:m,newConfig:T,queryObject:I,dataWasUpdated:L,dataInfo:ee,options:U,utilsStrings:P,errorStrings:d});break}}function x(F){let{chartConfig:T,options:L,dataWasUpdated:O,dataUpdateDetails:I,configWithAllSeries:U,hasSeriesFilteredOut:P,pieSlicesSymbols:Q,colorMatchApplied:G,rendererFieldNames:Y,globalOptions:ee,t9nStrings:te,queryObject:le,dataInfo:z}=F,K=!oI(t),we=_a(le,L?.popupTemplateFieldInfosEnabled);ai(f.uid,{chartWasUpdatedWhileHidden:K,options:L,fieldList:we,queryObject:le,colorMatchApplied:G,rendererFieldNames:Y}),y({chartConfig:T,options:L,dataWasUpdated:O,dataUpdateDetails:I,pieSlicesSymbols:Q,t9nStrings:te,configWithAllSeries:U,hasSeriesFilteredOut:P,queryObject:le,dataInfo:z})}async function w(F,T){if(qn(f)&&(f instanceof Vt||f instanceof pr)){let L=ye(f.uid,"actionMode");L!==Ut.MonoSelection&&L!==Ut.None&&await HQ({chart:f,queryObject:F,errorStrings:T})}}function S(){Rv(f)}return{update:x,dispose:g,resetZoom:S,clearSelection:()=>wA({chart:f}),switchSelection:async F=>await w(F,i.errorStrings),exportImage:async F=>await SQ({chart:f,exportOptions:F}),setActionMode:(F,T)=>Hv({chart:f,actionMode:F,cursorRange:T})}}var HW="AM5C241025748",qi={SelectEnded:"selectended",DataValidated:"datavalidated",BoundsChanged:"boundschanged",PointerUp:"pointerup",FrameEnded:"frameended",Click:"click"},lw=new Map;function jW(a,t){return Gc(a,t)}function WW(a,t){zc(a,t)}function zc(a,t){let e=lw.get(a)??{};lw.set(a,{...e,...t})}function Gc(a,t){return lw.get(a)?.[t]}function fe(a,t){return Gc(a,t)}function Xr(a,t){zc(a,t)}function bi(a,t){return Gc(a,t)}function Gr(a,t){zc(a,t)}function gu(a,t){return Gc(a,t)}function BA(a,t){zc(a,t)}function yl(a,t){return Gc(a,t)}function XW(a,t){zc(a,t)}function ka(a,t){return Gc(a,t)}function Nw(a,t){zc(a,t)}function zW(a,t){return Gc(a,t)}function GW(a,t){zc(a,t)}function YW(a){let{chartSeries:t,oldSeries:e,newSeries:i}=a,r=bx(e,i);for(let s=0;s<r.length;s+=1){let n=r[s][0],o=r[s][1],l=t.length;n>=0&&n<l&&o>=0&&o<l&&t.swap(r[s][0],r[s][1])}}function KW(a){return a.get("renderer")instanceof ya?xr.yField:xr.xField}function ZW(a){let t="";return a instanceof ga?t=a.get("categoryXField")??a.get("valueXField")??"":a instanceof Ur&&(t=a.get("categoryField")??""),t}function qW(a){let t="";return a instanceof ga?t=a.get("categoryYField")??a.get("valueYField")??"":a instanceof Ur&&(t=a.get("categoryField")??""),t}function Xf(a){let t="",{chart:e}=a;return e!==void 0&&(t=fe(e.uid,"isRotated")===!0?ZW(a):qW(a)),t}function Qw(a){return a!=null&&!a.isDisposed()}function JW(a){let t;if(a!=null){let e=a;if(e instanceof Wr)t=e.chart;else{let i=e.dataItem?.component;i instanceof Wr&&(t=i.chart)}}return t}function Z1(a){let t;if(a){let e=a.get("background")?.get("fill");if(e){let{r:i,g:r,b:s}=e;t=[Math.round(i),Math.round(r),Math.round(s),255]}}return t}function q1(a){let t=qs(a),{r:e,g:i,b:r}=t;return{r:e,g:i,b:r}}function e4(a,t){t&&a.setThemes([NL.new(a)])}function t4(a,t){t===!0&&a.setThemes([VL.new(a)])}function Xt(a){let t=qs("#000000"),e=hd;if(a!=null){let[i,r,s,n]=a;e=n/255,t=qs(`rgba(${i}, ${r}, ${s}, ${e})`)}return{color:t,opacity:e}}function Li(a,t){t===!1&&(!("isHiding"in a)||!a.isHiding())?(a.set("visible",!1),"hide"in a&&a.hide()):t!==!1&&(!("isShowing"in a)||!a.isShowing())&&(a.set("visible",!0),"show"in a&&a.show())}function Di(a){let{childId:t,parent:e,useChildId:i}=a,r=i?t:Qs(t,e.uid);return e.children.values.find(s=>s.get("id")===r)}function Qs(a,t){return`${a}${t}`}function yu(a,t=100){return setTimeout(()=>a(),t)}function J1(a){let{series:t,chartConfig:e,whenReadyCallback:i}=a,r=ze(e.series);if(t){let s=t.root.events.on(qi.FrameEnded,()=>{let n=!1,o=!1;switch(!0){case t instanceof Ri:n=t.columns.length===t.dataItems.length;break;case(!(t instanceof Bo)&&t instanceof ei):let l=bi(t.uid,"bulletTemplate");if(l)if(r===V.ScatterSeries)n=l.entities.length===t.data.length&&t.dataItems[t.dataItems.length-1]?.bullets?.[0]?.get("sprite")!==void 0;else{o=!0;let h=Xf(t)??"",u=e?.series[0]?.x??"";n=t.dataItems.filter(c=>{let d=c.dataContext;return h in d&&u in d&&d[u]!==void 0}).every(c=>!Number.isFinite(c.dataContext[h])||c?.bullets?.[0]?.get("sprite"))}break;default:n=!0;break}n&&(s.dispose(),i(),o&&t.markDirtySize())})}}function ek(a){let{chart:t,chartConfig:e,delayCallback:i}=a,{root:r}=t;if(ze(e.series)===V.GaugeSeries||!i)Uu(r.dom);else if(t instanceof ms&&i){let s=()=>{r.events.once(qi.FrameEnded,()=>{Uu(r.dom)})};J1({series:t.series.getIndex(0),chartConfig:e,whenReadyCallback:s})}}function lI(a){let t=Number.NaN;if(typeof a=="number")t=a;else if(a.includes("%")){let e=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(e)&&(t=Bt(e))}return t}function i4(a,t){return t!==!0||a?.includes("Dot")===!0?"round":"square"}function r4(a,t){let e=a??hs.Solid,i=t??q.lineWidth,r={[hs.Solid]:[],[hs.Dot]:[1,i],[hs.DashDotDot]:[4*i,i,1,i,1,i],[hs.Dash]:[4*i,3*i],[hs.DashDot]:[4*i,3*i,1,3*i],[hs.Null]:[]};return r[e]??r[hs.Null]}function s4(a){let{root:t,fill:e,rotation:i,isLinePattern:r,chartBackgroundFill:s}=a,n;if(r!==!1){let{tileSize:o,diagonalTileSize:l}=q.patternLineProperties,h=i===45||i===135,u=h?l:o;n=Jl.new(t,{width:u,height:u,strokeWidth:q.patternLineProperties.strokeWidth??1,gap:6,color:e,...h?{angle:i}:{rotation:i??Number.NaN},...s!==void 0&&{fill:s,fillOpacity:1}})}else{let o=s!==void 0?1:q.patternRectProperties.fillOpacity??Number.NaN;n=iu.new(t,{width:q.patternRectProperties.width??Number.NaN,height:q.patternRectProperties.height??Number.NaN,strokeWidth:q.patternRectProperties.strokeWidth??Number.NaN,fillOpacity:o,color:s??e,fill:e,gap:1,maxWidth:q.patternRectProperties.rectWidth??Number.NaN,maxHeight:q.patternRectProperties.rectHeight??Number.NaN,rotation:i??Number.NaN})}return n}function a4(a){let{fill:t,root:e,style:i,chartBackgroundFill:r}=a,s,n,o=!0;switch(i){case bs.Horizontal:{n=0;break}case bs.Vertical:{n=90;break}case bs.ForwardDiagonal:{n=135;break}case bs.BackwardDiagonal:{n=45;break}case bs.Cross:{n=0,o=!1;break}case bs.DiagonalCross:{n=135,o=!1;break}case bs.Solid:}return n!==void 0&&e!==void 0&&(s=s4({root:e,fill:t,rotation:n,isLinePattern:o,chartBackgroundFill:r})),s}function tk(a,t=0){return(a??t)%360}function ik(a,t){let e={stroke:Xt().color,strokeWidth:q.lineWidth,strokeDasharray:[],linecap:t!==!0?"round":"square",strokeOpacity:hd};if(a!=null){let i=Xt(a.color);e.stroke=i.color,e.strokeOpacity=i.opacity,a.width!==void 0&&(e.strokeWidth=a.width,e.strokeOpacity=a.width===0?0:i.opacity),a.style!==void 0&&a.style!==hs.Null&&(e.strokeDasharray=r4(a.style,e.strokeWidth),e.linecap=i4(a.style,t))}return e}function rk(a,t){let e=a,[i,r,s,n]=a?.color??t??q.color,o=[i,r,s,n];return e==null?e={type:Rt.SLS,color:o}:e.color===void 0&&(e.color=o),ik(e,!1)}function n4(a,t,e){let{color:i,outline:r,style:s}=a,n=Xt(i),o=rx(s),l;return e!==void 0?l=Xt(e).color:o&&(l=Xt(q.backgroundColor).color),{pattern:a4({root:t,fill:n.color,style:s,chartBackgroundFill:l}),fill:n.color,outline:rk(r,i),fillOpacity:n.opacity}}function o4(a){let{color:t,style:e,size:i,outline:r,xoffset:s,yoffset:n,angle:o}=a,l=tk(o),h=Xt(t),u=r,c=e!==YA.Cross&&e!==YA.X&&i!==void 0&&i<q.lineSeries.marker.markerSizeThresholdForTooltipDisplay&&(r?.width===void 0||r.width===0),d=i;return c&&(u={type:Rt.SLS,style:r?.style??hs.Solid,color:[0,0,0,0],width:q.lineSeries.marker.markerSizeThresholdForTooltipDisplay-i},d=i+1),{path:e!==void 0?sx(e,d):"",fill:h.color,outline:rk(u,t),xOffset:s??0,yOffset:n??0,angle:l,fillOpacity:h.opacity}}function l4(a){let t;switch(a){case"line-through":case"underline":t=a;break}return t}function h4(a){return a===!0?"wrap":"none"}function sk(a,t){let e=je;switch(a??t){case"right":e=ge;break;case"left":e=Hr;break}return e}function ak(a,t){let e=je;switch(a??t){case"top":e=Hr;break;case"bottom":e=ge;break}return e}function u4(a){let{angle:t,mappedHAlignment:e,mappedVAlignment:i,isGuideLabel:r}=a,s=e,n=i,o=e,l=i;return(Math.abs(t)===270||Math.abs(t)===90)&&(r||(o=void 0,n=void 0),l===Hr?s=ge:l===ge?s=Hr:l===je&&(s=je)),{align:s,valign:n,horizontalCenter:o,verticalCenter:l}}function Hw(a){let{root:t,symbol:e,defaultToColorFromRamp:i,colorRampIndex:r,isChartFillSymbol:s=!1,chartBackgroundColor:n}=a,o;if(i===!0){let l=s?Vm:hd;if(e.color=e.color??gh({colorIndex:r,opacity:l}),fd(e)||np(e)){let{outline:h}=e;h!==void 0&&(h.color=h?.color??gh({colorIndex:r}),e.outline={...h})}}return Fx(e)?o=ik(e,!0):np(e)?(e.style??=q.lineSeries.marker.markerStyle,e.size??=q.lineSeries.marker.markerBigSize,o=o4(e)):fd(e)&&(o=n4(e,t,n)),o}function c4(a){let{root:t,input:e,isGuideLabel:i,defaults:r}=a,s=tk(e.angle,r?.rotation),n=sk(e.horizontalAlignment,r?.horizontalCenter),o=ak(e.verticalAlignment,r?.verticalCenter),{align:l,valign:h,horizontalCenter:u,verticalCenter:c}=u4({angle:s,mappedHAlignment:n,mappedVAlignment:o,isGuideLabel:i}),d=e.rightToLeft??(t?.dom?Mm(t.dom)==="rtl":!1);return{fill:Xt(e.color).color,fontFamily:e.font?.family??"Arial, Helvetica, sans-serif",fontSize:e.font?.size??q.generalFontSize,fontWeight:e.font?.weight??"400",textDecoration:l4(e.font?.decoration),align:l,valign:h,verticalCenter:c,horizontalCenter:u,text:xa({textSymbol:e,format:"amChartsV5"}),angle:s,xOffset:e.xoffset??r?.dx??0,yOffset:e.yoffset??r?.dy??0,backgroundFill:Xt(e.backgroundColor).color,borderFill:Xt(e.borderLineColor).color,borderWidth:e.borderLineSize??1,haloColor:Xt(e.haloColor).color,rtl:d?"rtl":"ltr",wrap:h4(r?.wrap),maxWidth:r?.maxWidth??Number.NaN}}function nk(a,t){t!==void 0&&(t.marginBottom!==void 0&&a.set("marginBottom",t.marginBottom),t.marginTop!==void 0&&a.set("marginTop",t.marginTop),t.marginRight!==void 0&&a.set("marginRight",t.marginRight),t.marginLeft!==void 0&&a.set("marginLeft",t.marginLeft),t.verticalCenter!==void 0&&a.set("y",ak(t.verticalCenter)),t.horizontalCenter!==void 0&&a.set("x",sk(t.horizontalCenter)),t.strokeWidth!==void 0&&a.get("background")?.set("strokeWidth",t.strokeWidth),t.paddingBottom!==void 0&&a.set("paddingBottom",t.paddingBottom),t.paddingTop!==void 0&&a.set("paddingTop",t.paddingTop),t.paddingLeft!==void 0&&a.set("paddingLeft",t.paddingLeft),t.paddingRight!==void 0&&a.set("paddingRight",t.paddingRight),t.maxWidth!==void 0&&a.set("maxWidth",t.maxWidth))}function vA(a){let{root:t,parent:e,defaults:i,index:r,id:s}=a,n=Kt.new(t,{text:"",textAlign:"center",background:nr.new(t,{}),paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0});return s!==void 0&&n.set("id",s),nk(n,i),e!==void 0&&e.children.insertIndex(r??e.children.length,n),n}function hI(a){let{label:t,offset:e,offsetProperty:i}=a;t.adapters.remove(i),(t instanceof Kt?[t]:t.entities).forEach(r=>{if(typeof e=="string"&&!Number.isFinite(Number(e))){let s=ip(e);typeof s=="number"&&(s/=100,r.adapters.add(i,()=>(i==="dx"?r.width():r.height())*(s??0)))}else{let s=Number(e);Number.isFinite(s)&&r.set(i,s)}})}function _n(a){let{label:t,labelConfig:e,defaults:i,skipSettingText:r,skipSettingXAndY:s}=a,n=t instanceof Kt?t.root:t.entities[0]?.root,o=e?.visible??!0;if(t!==void 0&&!t.isDisposed()&&e!==void 0){let l=t instanceof Kt&&ka(t.uid,"isGuide"),h=c4({root:n,input:e.content,isGuideLabel:l,defaults:i});t.setAll({fill:h.fill,fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontSize:h.fontSize,textDecoration:h.textDecoration,rotation:h.angle,direction:h.rtl,oversizedBehavior:h.wrap,maxWidth:h.maxWidth}),r||t.setAll({text:h.text}),s||(hI({label:t,offset:h.xOffset,offsetProperty:"dx"}),hI({label:t,offset:h.yOffset,offsetProperty:"dy"}),t.setAll({centerX:h.align,centerY:h.valign,x:h.horizontalCenter,y:h.verticalCenter})),t.get("background")?.setAll({strokeWidth:h.borderWidth,strokeOpacity:1}),t.set("visible",o),t instanceof Kt?Li(t,o):t.entities.forEach(u=>{Li(u,o)})}}function gl(a){let{chart:t,label:e,labelType:i}=a,{legendTitle:r}=q.legendProperties,s=fe(t.uid,"config"),n=r.maxWidth??Number.NaN;switch(i){case Wt.GuideLabel:if(t instanceof vi){let o=e.get("rotation");o===90||o===270?n=t.seriesContainer.height():n=t.seriesContainer.width()}break;case Wt.XAxisTitle:t instanceof vi&&(n=t.seriesContainer.width());break;case Wt.YAxisTitle:t instanceof vi&&(n=t.seriesContainer.height());break;case Wt.ChartTitle:case Wt.ChartSubTitle:case Wt.ChartFooter:n=t.chartContainer.width()-20;break;case Wt.LegendTitle:s?.legend?.position!==void 0&&(s?.legend?.position===st.Top||s?.legend?.position===st.Bottom)&&(n=t.chartContainer.width()-20);break}if(n>0)if(i===Wt.YAxisTitle){let o=Number(e.get("fontSize"))||q.generalFontSize,l=o*2.4,h=Math.max(1,Math.floor(n/Math.max(o*.5,1)));e.adapters.remove("text"),e.adapters.add("text",u=>WF({input:u??"",charsPerLine:h})),e.setAll({maxHeight:Math.min(n,l),maxWidth:n,breakWords:!1,oversizedBehavior:"none"})}else e.setAll({maxWidth:n,oversizedBehavior:"wrap"})}function Qc(a){let{chart:t}=a;gl(a),t.events.onDebounced(qi.BoundsChanged,()=>gl(a),q.debounceTime)}function Sv(a,t){let e=t.get("axisFill"),i=t.get("label");if(e!==void 0&&i!==void 0){let r=ka(i.uid,"guideLabelConfig"),s=a.get("renderer")instanceof as,n=Math.round(e.width()),o=Math.round(e.height()),l=Math.round(i.height()),h=Math.round(i.width()),{horizontalAlignment:u,verticalAlignment:c}=r??{},d=0,A=0;if(s){let p=n!==0;switch(u){case"left":p?d=-h/2:d=-h;break;case"right":p?d=h/2:d=h;break;case"center":case"justify":break;default:p||(d=h/2);break}switch(c){case"bottom":p?A=-l:A=-l/2;break;case"middle":A=-o/2;break;default:A=-o+l/2;break}}else{let p=o!==0;switch(u){case"center":d=n/2;break;case"left":d=h/2;break;default:d=n-h/2;break}switch(c){case"bottom":p?A=o/2:A=l;break;case"top":p?A=-o/2+l/2:A=-l;break;default:p||(A=-l/2);break}}i.setAll({dx:d,dy:A})}}function d4(a){let{axis:t,guide:e,label:i}=a,{chart:r}=t;if(r){let s=t.get("renderer")instanceof as?r.yAxes.getIndex(0):r.xAxes.getIndex(0);s&&(s.events.onDebounced(qi.BoundsChanged,()=>Sv(t,e),q.debounceTime),t.events.onDebounced(qi.BoundsChanged,()=>Sv(t,e),q.debounceTime))}i.setAll({paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})}function A4(a){let{guide:t,axis:e,guideLabelConfig:i}=a,r=t.get("label");if(r!==void 0){nk(r),Nw(r.uid,{isGuide:!0,guideLabelConfig:i});let{chart:s}=e;s!==void 0&&Qc({chart:s,label:r,labelType:Wt.GuideLabel}),d4({axis:e,guide:t,label:r})}}function p4(a){let{axis:t,guide:e,guideConfig:i,guideType:r}=a,s=e?.get("label");if(s!==void 0)if(i.label!==void 0){let n=t.get("renderer")instanceof as,o;t instanceof Vs||(n?r===Rt.SFS?o=q.verticalSurfaceGuideLabels:o=q.verticalLineGuideLabels:r===Rt.SFS?o=q.horizontalSurfaceGuideLabels:o=q.horizontalLineGuideLabels),Nw(s.uid,{guideLabelConfig:i.label});let l={type:V.Text,visible:i.visible,content:{...i.label,verticalAlignment:"middle",horizontalAlignment:"center",rightToLeft:s.get("direction")==="rtl"}};_n({label:s,labelConfig:l,defaults:o}),s.events.once(qi.BoundsChanged,()=>{Sv(t,e)}),Sv(t,e)}else Li(s,!1)}function f4(a){let t=a.dataItem?.component;t instanceof ei?(t.uid!==void 0?bi(t.uid,"bulletTemplate"):void 0)?.adapters?.remove?.("fill"):t instanceof Ri?t.columns?.template?.adapters?.remove?.("fill"):t instanceof Ur&&t.slices?.template?.adapters?.remove?.("fill")}function ok(a){let{element:t,fill:e,fillOpacity:i,pattern:r,chartBackgroundFill:s}=a,n=t.get("tooltip"),o=!0,l=t;if(r!==void 0){n!==void 0&&(o=!1,n.get("background")?.set("fill",e)),l.set("fillPattern",r);let h=s??e;l.set("fill",h),l.set("fillOpacity",1),f4(l)}else l.set("fill",e),l.remove("fillPattern"),l.set("fillOpacity",i);n!==void 0&&n.set("getFillFromSprite",o)}function Fv(a,t){a.setAll({stroke:t.stroke,strokeDasharray:t.strokeDasharray,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth,lineCap:t.linecap})}function lk(a){let{element:t,markerSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return t!==void 0&&e!==void 0&&(n=Hw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(t.setAll({svgPath:n.path,rotation:n.angle,dx:n.xOffset,dy:n.yOffset}),ok({element:t,fill:n.fill,fillOpacity:n.fillOpacity}),Fv(t,n.outline)),Li(t,i)),n}function vu(a){let{root:t,element:e,fillSymbol:i,visible:r,defaultToColorFromRamp:s,colorRampIndex:n,isChartFillSymbol:o,keepCurrentVisibility:l,chartBackgroundColor:h}=a,u=rx(i?.style),c=JW(e),d=h??(u?Z1(c)??[...q.backgroundColor]:void 0),A;if(e!==void 0&&!e.isDisposed()){if(i!==void 0&&(A=Hw({root:t,symbol:i,defaultToColorFromRamp:s,colorRampIndex:n,isChartFillSymbol:o,chartBackgroundColor:d}),A!==void 0)){let p=d!==void 0?Xt(d).color:void 0;ok({element:e,fill:A.fill,fillOpacity:A.fillOpacity,pattern:A.pattern,chartBackgroundFill:p}),Fv(e,A.outline)}l||Li(e,r)}return A}function Fo(a){let{element:t,lineSymbol:e,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,n;return t!==void 0&&!t.isDisposed()&&(e!==void 0&&(n=Hw({symbol:e,defaultToColorFromRamp:r,colorRampIndex:s}),n!==void 0&&(Fv(t,n),t instanceof ei&&Fv(t.strokes.template,n))),Li(t,i)),n}function Ja(a){let{root:t,element:e,seriesIndex:i,seriesSymbol:r,isChartFillSymbol:s,colorMatch:n,rendererSymbol:o,keepCurrentVisibility:l}=a,h,u;n&&o!==void 0&&(h=fx({rendererSymbol:o,seriesSymbol:r,colorIndex:i}));let c={root:t,element:e,defaultToColorFromRamp:!0,colorRampIndex:i},d=h??{...r};switch(r.type){case Rt.SLS:u=Fo({...c,lineSymbol:d});break;case Rt.SFS:u=vu({...c,fillSymbol:d,isChartFillSymbol:s,keepCurrentVisibility:l});break;case Rt.SMS:u=lk({...c,markerSymbol:d});break}return{symbolWithColorInfo:d,stylingInfo:u}}function uI(a,t){if(t!==void 0){let{elementColor:e,elementOutlineColor:i,elementOutlineWidth:r,rotation:s,transformation:n}=t,{opacity:o,scale:l}=n??{};e!==void 0&&a.setAll({fill:Xt(e).color,fillOpacity:1}),i!==void 0&&a.setAll({stroke:Xt(i).color,strokeOpacity:1}),r!==void 0&&a.setAll({strokeWidth:r}),s!==void 0&&a.setAll({rotation:s}),l!==void 0&&a.setAll({scale:l}),o!==void 0&&a.setAll({fillOpacity:o,strokeOpacity:o})}}function Kn(a){let{root:t,type:e,intlOptions:i,formatLocale:r}=a,s;switch(e){case V.NumberAxisFormat:{s=Zh.new(t,{}),s.set("intlLocales",r),s.set("numberFormat",i);break}case V.DateAxisFormat:{s=Tc.new(t,{}),s.set("intlLocales",r);break}}return s}function m4(a,t,e){let i=t-a,r=[];if(i!==0){if(e===1)r=[a];else if(e>1){let s=i/(e-1);r=[...qF(a,t,s),t]}}return r}function g4({x:a,mean:t,stddev:e,scalingFactor:i}){let r=-1/(2*e**2);return(i??1)*Math.exp(r*(a-t)**2)}function y4(a){let t=0;if(a.length>0)for(let e=0;e<a.length;e+=1)a[e].count>t&&(t=a[e].count);return t}function hk(a){let t=!1,e;if(a.target.dataItem?.component instanceof Wr?{chart:e}=a.target.dataItem.component:(a.target instanceof zn||a.target instanceof Al)&&({chart:e}=a.target),e instanceof vi||e instanceof Us){let i=fe(e.uid,"actionMode");if(i!==void 0){let{originalEvent:r}=a;t=i===Ut.MultiSelection||i===Ut.MultiSelectionWithCtrlKey&&("ctrlKey"in r&&r.ctrlKey||"metaKey"in r&&r.metaKey)}}return t}function ra(a){let{element:t,selected:e,multiSelect:i,isDateOrCategoryAxis:r,backToDefaultState:s}=a,n=!1;if(t!==void 0){let o=yl(t.uid,"selected")??!1;n=o,i!==!0?r===!0?n=o?!1:o!==e:n=e:n=o!==e;let l=s===!0?ia.Default:ia.CustomInactive;t.states.apply(ia.Default),t.states.apply(n?ia.CustomActive:l),n!==o&&(XW(t.uid,{selected:n}),n&&(t.toFront(),t.dataItem?.component instanceof Wr&&t.dataItem.component.toFront()))}return n}function v4(a,t){let e=fe(t.chart?.uid??Number.NaN,"actionMode"),i=hk(a);return e===Ut.MonoSelection||e===Ut.MultiSelectionWithCtrlKey&&!i}function ns(a,t){let{selectedElementsTheme:e,nonSelectedElementsTheme:i}=t??q.selectionTheme??{},r=a.states.create(ia.CustomActive,{}),s=a.states.create(ia.CustomInactive,{});uI(r,e),uI(s,i)}function bA(a){let{value:t,valueFormat:e,formatLocale:i,root:r}=a,s=t?.toString(),n=Kn({type:e.type,intlOptions:e.intlOptions,formatLocale:i,root:r});return typeof t=="number"&&e.type===V.NumberAxisFormat?s=n.format(t,$o(e)):(typeof t=="number"||t instanceof Date)&&e.type===V.DateAxisFormat&&(s=n.format(t,$o(e))),s}async function b4(a){let{root:t,exportOptions:e}=a,{format:i,quality:r=1,...s}=e,n=r<0||r>1?1:r,o=await hu.new(t,{}).exportImage(i,{quality:n,...s}),l=a1(o),h=i==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${i}`,{type:h})}function mA(a,t){if(a!==void 0&&t!==void 0&&(a.states.lookup("default")?.setAll({fill:t.fill,fillOpacity:t.fillOpacity}),t.outline!==void 0)){let{outline:e}=t;a.states.lookup("default")?.setAll({stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeDasharray:e.strokeDasharray,lineCap:e.linecap,strokeWidth:e.strokeWidth})}}function uk(a){let{numberFormatter:t,dataLabelsConfigContent:e,stackedType:i,externalDataLabelFormatter:r}=a;return(s,n)=>{let o=i===$i.Stacked100&&n!==void 0?n:s;return t.get("numberFormat").style==="percent"&&(o/=100),xa({textSymbol:{...e,text:t.format(o)},format:r===void 0?"amChartsV5":"html"})}}function x4(a,t){let e=a.dataItem,i;switch(t){case V.LineSeries:case V.ScatterSeries:i=e.get("point");break;case V.HistogramSeries:case V.BarSeries:case V.HeatSeries:i=e.get("graphics");break}let r=i??a,s=i?.x??r?.get("x")??0,n=i?.y??r?.get("y")??0;return{x:s,y:n}}function ck(a){let{label:t,chart:e,seriesType:i}=a,r=n=>{if(e instanceof vi){let o=x4(n,i),l=e.plotContainer,h=l.x(),u=l.y(),c=o.x<h||o.x>h+l.width()||o.y<u||o.y>u+l.height();n.setAll({visible:!c,forceHidden:c})}},s=Is((n,o)=>{o&&r(o)},q.debounceTime);t.on("x",s),t.on("y",s)}function _4(a){let{series:t,label:e,isHeatChart:i}=a;e.adapters.add("y",(r,s)=>{let{chart:n}=t,o=n!==void 0?fe(n.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null){let u=h?.get("valueY"),c=s.localBounds().bottom;if(o!==!0){let d=q.dataLabelNegative?.paddingTop??0;if(t.get("stacked")||i)if(u<0)l+=c-d;else{let A=i?q.heatChartLabelPadding.paddingTop:0;l+=c/2+A}}else{let d=q.rotatedChartPadding?.paddingTop??0;l+=c/2+d}}return l}),e.adapters.add("x",(r,s)=>{let{chart:n}=t,o=n!==void 0?fe(n.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null&&o===!0){let u=h?.get("valueX"),c=s.width()/2,d=q.rotatedChartPadding?.paddingRight??0,A=c+d;t.get("stacked")||(u<0?l-=A:l+=A)}return l})}function C4(a){let{series:t,externalDataLabelFormatter:e}=a;t.bullets.push(()=>{let i=fe(t.chart?.uid??Number.NaN,"config"),r=i?.series?.find(h=>h.id===t.get("id"))?.dataLabels??a.dataLabelsConfig,s=us(i),n=t.get("stacked"),o=fa.new(t.root,{locationY:!n&&!s?1:void 0,locationX:!n&&s?1:void 0,sprite:Kt.new(t.root,{text:s?"{valueX}":"{valueY}",populateText:!0,centerY:ge,centerX:Hr,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:Xt(r?.content.color).color,fontSize:r?.content.font?.size})}),l=o.get("sprite");if(l){let h=l;B4({dataLabel:h,series:t,externalDataLabelFormatter:e}),Ak({...a,dataLabelsConfig:r,dataLabel:h,dataLabelFormatter:uk})}return o})}function jw(a,t=1){a.bullets.removeIndex(t)}function dk(a){let{textBackgroundColor:t,chartBackgroundColor:e,fillOpacity:i}=a,r;return JA({r:t.r,g:t.g,b:t.b,a:i})?r=JA({r:e.r,g:e.g,b:e.b,a:i})?Xt(uF).color:e:r=JA({r:e.r,g:e.g,b:e.b,a:i})?e:Xt(hF).color,r}function w4(a){let{dataLabel:t,labelConfigColor:e,seriesColor:i,backgroundColor:r,autoInverseDataLabelTextColor:s,isHeatChart:n}=a,o=r??Xt(q.backgroundColor).color;s===!0&&i&&t.adapters.add("fill",(l,h,u)=>{let c=e??h.text.get("fill"),d=(h.dataItem?.component).get("stacked"),A=c;if(c&&(d||n)){let p=h.dataItem.get("graphics"),f=p?.get("fillOpacity");A=dk({textBackgroundColor:p?.get("fill")??i,chartBackgroundColor:o,fillOpacity:f})}return A})}function B4(a){let{dataLabel:t,series:e,externalDataLabelFormatter:i}=a;t.adapters.remove("text"),t.adapters.remove("html");let r=i!==void 0?"html":"text";t.adapters.add(r,(s,n)=>{let o=s??"",l=n.dataItem,h=bi(e.uid,e instanceof Ri?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(h!==void 0&&e.chart&&l){let u=fe(e.chart.uid,"config"),c=us(u),d=c?l.get("valueX"):l.get("valueY"),A=c?l.get("valueXTotalPercent"):l.get("valueYTotalPercent");o=h(ks(u)===$i.Stacked100?A:d)}return r==="html"?Zr(o):o})}function jv(a){let{series:t,seriesConfig:e,dataLabel:i,labelDefaults:r,dataLabelsConfig:s,isRotated:n,seriesType:o,defaultDataLabelFormatter:l,externalDataLabelFormatter:h}=a;if(i!==void 0){let{chart:u}=t,c=h,d=s?.content??{type:Rt.TS},A=u?fe(u.uid,"config"):void 0;if(u&&h===void 0&&l!==void 0&&A?.axes?.[1]?.valueFormat?.type===V.NumberAxisFormat){let y=fe(u.uid,"formatLocale"),x=o===V.HeatSeries?{type:V.NumberAxisFormat,intlOptions:{}}:A?.axes?.[1]?.valueFormat,w=ks(A),S=w===$i.Stacked100?{...jm().intlOptions,...x.intlOptions,style:"percent"}:{...x.intlOptions},F=Kn({root:u.root,type:x.type,formatLocale:y,intlOptions:S});c=l({numberFormatter:F,dataLabelsConfigContent:d,stackedType:w,externalDataLabelFormatter:h})}let p;switch(o){case V.BarSeries:p="barSeriesDataLabelFormatter";break;case V.LineSeries:p="lineSeriesDataLabelFormatter";break;case V.HistogramSeries:p="histogramDataLabelFormatter";break;case V.ScatterSeries:p="scatterplotDataLabelFormatter";break;case V.HeatSeries:p="heatChartDataLabelFormatter";break}p!==void 0&&Gr(t.uid,{[p]:c}),s!==void 0&&(o===V.HeatSeries?s.content.text="{value}":s.content.text=n===!0?"{valueX}":"{valueY}",s.visible=s.visible!==!1),_n({label:i,labelConfig:s,defaults:r??q.dataLabel,skipSettingText:!0});let f=t.get("stacked"),m=f&&o===V.BarSeries&&e?.hideOversizedStackedLabels!==!1,g=!f&&o===V.BarSeries&&e?.hideOversizedSideBySideLabels===!0;g||m?i.setAll({oversizedBehavior:"hide",maxWidth:void 0,maxHeight:g?100:void 0}):i.setAll({oversizedBehavior:"none"})}}function S4(a){let{series:t,labelDefaults:e,externalDataLabelFormatter:i}=a;t.dataItems.forEach(r=>{let s=r.bullets?.[1];if(s){s.set("locationY",t.get("stacked")?void 0:1);let n=s.get("sprite");n&&jv({...a,dataLabel:n,labelDefaults:e,defaultDataLabelFormatter:uk,externalDataLabelFormatter:i})}})}function Ak(a){let{series:t,dataLabelsConfig:e,autoInverseDataLabelTextColor:i,externalDataLabelFormatter:r,labelDefaults:s,seriesType:n,dataLabel:o,isHeatChart:l,dataLabelFormatter:h}=a;o&&(t.chart&&e&&e?.visible!==!1&&ck({label:o,chart:t.chart,seriesType:n}),_4({series:t,label:o,isHeatChart:l}),jv({...a,dataLabel:o,labelDefaults:s,defaultDataLabelFormatter:h,externalDataLabelFormatter:r}),w4({dataLabel:o,labelConfigColor:Xt(e?.content.color).color,seriesColor:t.get("fill"),backgroundColor:t.chart?.get("background")?.get("fill"),autoInverseDataLabelTextColor:i,isHeatChart:l}))}function pk(a){let{series:t,dataLabelsConfig:e}=a,i=e&&e?.visible!==!1,r=t.bullets.hasIndex(1);i?(r||C4(a),S4(a)):r&&jw(t)}function F4(a){let{dataLabel:t,series:e,externalDataLabelFormatter:i}=a;t.adapters.remove("text"),t.adapters.remove("html");let r=i!==void 0?"html":"text";t.adapters.add(r,(s,n)=>{let o=s??"",l=n.dataItem,h=bi(e.uid,"heatChartDataLabelFormatter"),u=fe(e.chart?.uid??NaN,"config");if(h!==void 0&&l){let c=l.get("value"),d=l.get("categoryX"),A=l.get("categoryY");c===null?o=u?.series[0].emptyCells?.text??q.heatChart.emptyCells?.text??"":c!==void 0&&(o=h(c,d,A))}return r==="html"?Zr(o):o})}function T4(a){let{numberFormatter:t,dataLabelsConfigContent:e}=a;return i=>xa({textSymbol:{...e,text:t.format(i)},format:"amChartsV5"})}function P4(a){let{series:t,externalDataLabelFormatter:e}=a;t.bullets.push(()=>{let i=fe(t.chart?.uid??Number.NaN,"config")?.series?.[0]?.dataLabels??a.dataLabelsConfig,r=fa.new(t.root,{sprite:Kt.new(t.root,{text:"{value}",populateText:!0,centerY:ge,centerX:Hr,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:Xt(i?.content.color).color,fontSize:i?.content.font?.size,oversizedBehavior:"hide"})}),s=r.get("sprite");if(s){let n=s;F4({dataLabel:n,series:t,externalDataLabelFormatter:e}),Ak({...a,dataLabelsConfig:i,dataLabel:n,isHeatChart:!0,dataLabelFormatter:T4}),n.set("oversizedBehavior","hide"),n.set("maxWidth",void 0),n.set("maxHeight",void 0)}return r})}function D4(a){let{series:t,dataLabelsConfig:e}=a,i=e&&e?.visible!==!1;t.bullets.hasIndex(0)&&jw(t,0),i&&P4(a)}var Ts={nameField:"name",fillField:"fill",strokeField:"stroke",fillOpacityField:"fillOpacity",strokeOpacityField:"strokeOpacity"};function fk(a,t){let e=zf(a);a.columns.template.set("tooltip",e);let i=t!==void 0?"tooltipHTML":"tooltipText";a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove(i),a.columns.template.adapters.add(i,(r,s)=>Gf({element:s,series:a,isHTML:t!==void 0}))}function mk(a){let{axesConfig:t,currentSeries:e,tooltipValueFormat:i}=a,{root:r,chart:s}=e;if(s){let n=t?.[1]?.valueFormat,o=t?.[0].valueFormat,l=fe(s.uid,"formatLocale");if(n?.type===V.NumberAxisFormat){let h=Kn({root:r,type:n.type,formatLocale:l,intlOptions:n.intlOptions});Gr(e.uid,{tooltipValueYNumberFormatCallback:u=>h.format(u,i?.intlOptions??n.intlOptions)})}if(o?.type===V.NumberAxisFormat){let h=Kn({root:r,type:o.type,formatLocale:l,intlOptions:o.intlOptions});Gr(e.uid,{tooltipValueXNumberFormatCallback:u=>h.format(u,i?.intlOptions??o.intlOptions)})}}}function L4(a){let{axes:t,seriesConfig:e,series:i,fieldList:r,utilsStrings:s}=a,{dataTooltipVisible:n}=e,o,l=fe(i.chart?.uid??0,"rtl")??!1,h=Ra(l);return n===!1?o=(u,c,d)=>"":o=(u,c,d)=>{let A=Or(r,e.x),p=yA(A,t?.[0].title?.content?.text),f=yA(s?.statistics.count??"",t?.[1]?.title?.content?.text??""),m=bi(i.uid,"tooltipValueXNumberFormatCallback"),g=bi(i.uid,"tooltipValueYNumberFormatCallback"),y=m?m(c):c,x=m?m(d):d,w=g?g(u):u;return`[bold]${p}${h} [/]${y} - ${x}
47
47
  [bold]${f}${h} [/]${w}`},o}function I4(a){let{seriesConfig:t,series:e,tooltip:i}=a,{dataTooltipVisible:r}=t;if(r!==!1){let s=bi(e.uid,"histogramTooltipFormatter");if(s!==void 0){let n=i.dataItem;if(n!==void 0){let o=n.dataContext;return s(n.get("valueY")??0,o.minValue,o.maxValue)}}}return""}function gk(a,t){let e=zf(a);a.columns.template.set("tooltip",e);let i=t!==void 0?"tooltipHTML":"tooltipText";a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove(i),a.columns.template.adapters.add(i,(r,s)=>Gf({element:s,series:a,isHTML:t!==void 0}))}function k4(a){let{series:t,tooltipFormatter:e,axesConfig:i,seriesConfig:r}=a;mk({axesConfig:i,currentSeries:t,tooltipValueFormat:r.dataTooltipValueFormat}),Gr(t.uid,{histogramTooltipFormatter:e??L4(a)})}function Ww(a){let{pieChart:t,valueIntlOptions:e,percentageIntlOptions:i,displayNumericValue:r,displayPercentage:s,valuePrefix:n,valueSuffix:o,percentagePrefix:l,percentageSuffix:h}=a,{root:u}=t,c=fe(t.uid,"formatLocale"),d=Kn({root:u,type:V.NumberAxisFormat,intlOptions:e,formatLocale:c}),A=Kn({root:u,type:V.NumberAxisFormat,intlOptions:{...i,style:"percent"},formatLocale:c}),p=Ra(fe(t.uid,"rtl")??!1," ");return(f,m,g)=>{let y="";if(m!==void 0&&g!==void 0){let x=`${n??""}${d.format(m)}${o??""}`,w=`${l??""}${A.format(Math.abs(g/100))}${h??""}`;Number.isFinite(m)?r===!0&&s===!0?y=`${w}${p}(${x})`:r===!0?y=x:s===!0&&(y=w):y=""}return y}}function $4(a,t){let e=(p,f,m)=>"",{numericValueFormat:i,percentValueFormat:r,dataTooltipValueFormat:s,dataTooltipPercentFormat:n,displayCategoryOnTooltip:o,displayNumericValueOnTooltip:l,displayPercentageOnTooltip:h,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A}=t;return e=(p,f,m)=>{let g="",{chart:y}=a;if(y){let x=Ww({pieChart:y,valueIntlOptions:(s??i)?.intlOptions,percentageIntlOptions:(n??r)?.intlOptions,displayNumericValue:l??q.pieChart.displayNumericValueOnTooltip,displayPercentage:h??q.pieChart.displayPercentageOnTooltip,valuePrefix:u,valueSuffix:c,percentagePrefix:d,percentageSuffix:A})("",f,m),w=!zi(p)&&(o??q.pieChart.displayCategoryOnTooltip);if(w&&(g=`[bold]${p}[/]`),!zi(x)){let S=eg(x);g=w?`${g}
48
48
  ${S}`:S}}return g},e}function O4(a){let t=a.get("tooltip");if(t!==void 0){let e=a.get("fill");e instanceof Jl&&(e=e.get("fill")),t.get("background")?.set("fill",e)}}function E4(a){let{pieSeries:t,tooltip:e}=a,i="",{chart:r}=t;if(r!==void 0&&e!==void 0){let s=fe(r.uid,"config"),{dataTooltipVisible:n}=s?.series[0]??{};if(n!==!1){let o=bi(t.uid,"pieChartTooltipFormatter");if(o){let l=e.dataItem;if(l!==void 0){let h=l,u=h.get("category")??"",c=l.dataContext,d=oo(c);d===void 0&&(d=u);let A=h.get("value"),p=h.get("valuePercentTotal");typeof A=="number"&&A!==0&&s?.series?.[0]?.dataTooltipVisible!==!1?(e.set("disabled",!1),O4(h.get("slice")),i=o(u,A,p,d)):e.set("disabled",!0)}}}else return}return i}function yk(a,t){let e=a.slices.template,i=zf(a),r=t!==void 0?"tooltipHTML":"tooltipText";e.setAll({tooltip:i,tooltipText:" ",tooltipPosition:q.sliceTooltipPosition}),e.adapters.remove(r),e.adapters.add(r,(s,n)=>{let o=" ";try{let l=n.get("tooltip");l&&(l.dataItem=n.dataItem,o=Gf({element:l,series:a,isHTML:t!==void 0}))}catch{}return o}),e.set(r," ")}function M4(a){let{series:t,seriesConfig:e,tooltipFormatter:i}=a;Gr(t.uid,{pieChartTooltipFormatter:i??$4(t,e)})}function R4(a){let{axesConfig:t,seriesConfig:e,series:i,fieldList:r}=a,{dataTooltipVisible:s}=e,n,{chart:o}=i,l=o?.uid!==void 0?fe(o.uid,"rtl"):!1,h=Ra(l??!1);return s===!1?n=(u,c,d,A)=>"":n=(u,c,d,A)=>{let p=Or(r,e.x),f=zi(t?.[0].title?.content?.text)?p:t?.[0].title?.content?.text,m=Or(r,e.y),g=zi(t?.[1]?.title?.content?.text)?m:t?.[1]?.title?.content?.text,y=bi(i.uid,"tooltipValueXNumberFormatCallback"),x=y?y(u):u,w=bi(i.uid,"tooltipValueYNumberFormatCallback"),S=w?w(c):c,F=`[bold]${f}${h} [/]${x}
49
49
  [bold]${g}${h} [/]${S}`;if(d!==void 0&&e.sizePolicy?.field!==void 0){let T=Or(r,e.sizePolicy?.field),L=w?w(d):d;F+=`