UNPKG

ag-charts-enterprise

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

1 lines 769 kB
var ND=Object.defineProperty,ED=Object.getOwnPropertyDescriptor,p=(t,e,i,o)=>{for(var s=o>1?void 0:o?ED(e,i):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&ND(e,i,s),s};import{AgCharts as yr,VERSION as OD,_Scene as RD,_Theme as _D,_Util as BD,setupCommunityModules as FD}from"ag-charts-community";var zD=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let i=t[0],o=t[1],s=t[2],a=t[3];i=this.ff(i,o,s,a,e[0],7,-680876936),a=this.ff(a,i,o,s,e[1],12,-389564586),s=this.ff(s,a,i,o,e[2],17,606105819),o=this.ff(o,s,a,i,e[3],22,-1044525330),i=this.ff(i,o,s,a,e[4],7,-176418897),a=this.ff(a,i,o,s,e[5],12,1200080426),s=this.ff(s,a,i,o,e[6],17,-1473231341),o=this.ff(o,s,a,i,e[7],22,-45705983),i=this.ff(i,o,s,a,e[8],7,1770035416),a=this.ff(a,i,o,s,e[9],12,-1958414417),s=this.ff(s,a,i,o,e[10],17,-42063),o=this.ff(o,s,a,i,e[11],22,-1990404162),i=this.ff(i,o,s,a,e[12],7,1804603682),a=this.ff(a,i,o,s,e[13],12,-40341101),s=this.ff(s,a,i,o,e[14],17,-1502002290),o=this.ff(o,s,a,i,e[15],22,1236535329),i=this.gg(i,o,s,a,e[1],5,-165796510),a=this.gg(a,i,o,s,e[6],9,-1069501632),s=this.gg(s,a,i,o,e[11],14,643717713),o=this.gg(o,s,a,i,e[0],20,-373897302),i=this.gg(i,o,s,a,e[5],5,-701558691),a=this.gg(a,i,o,s,e[10],9,38016083),s=this.gg(s,a,i,o,e[15],14,-660478335),o=this.gg(o,s,a,i,e[4],20,-405537848),i=this.gg(i,o,s,a,e[9],5,568446438),a=this.gg(a,i,o,s,e[14],9,-1019803690),s=this.gg(s,a,i,o,e[3],14,-187363961),o=this.gg(o,s,a,i,e[8],20,1163531501),i=this.gg(i,o,s,a,e[13],5,-1444681467),a=this.gg(a,i,o,s,e[2],9,-51403784),s=this.gg(s,a,i,o,e[7],14,1735328473),o=this.gg(o,s,a,i,e[12],20,-1926607734),i=this.hh(i,o,s,a,e[5],4,-378558),a=this.hh(a,i,o,s,e[8],11,-2022574463),s=this.hh(s,a,i,o,e[11],16,1839030562),o=this.hh(o,s,a,i,e[14],23,-35309556),i=this.hh(i,o,s,a,e[1],4,-1530992060),a=this.hh(a,i,o,s,e[4],11,1272893353),s=this.hh(s,a,i,o,e[7],16,-155497632),o=this.hh(o,s,a,i,e[10],23,-1094730640),i=this.hh(i,o,s,a,e[13],4,681279174),a=this.hh(a,i,o,s,e[0],11,-358537222),s=this.hh(s,a,i,o,e[3],16,-722521979),o=this.hh(o,s,a,i,e[6],23,76029189),i=this.hh(i,o,s,a,e[9],4,-640364487),a=this.hh(a,i,o,s,e[12],11,-421815835),s=this.hh(s,a,i,o,e[15],16,530742520),o=this.hh(o,s,a,i,e[2],23,-995338651),i=this.ii(i,o,s,a,e[0],6,-198630844),a=this.ii(a,i,o,s,e[7],10,1126891415),s=this.ii(s,a,i,o,e[14],15,-1416354905),o=this.ii(o,s,a,i,e[5],21,-57434055),i=this.ii(i,o,s,a,e[12],6,1700485571),a=this.ii(a,i,o,s,e[3],10,-1894986606),s=this.ii(s,a,i,o,e[10],15,-1051523),o=this.ii(o,s,a,i,e[1],21,-2054922799),i=this.ii(i,o,s,a,e[8],6,1873313359),a=this.ii(a,i,o,s,e[15],10,-30611744),s=this.ii(s,a,i,o,e[6],15,-1560198380),o=this.ii(o,s,a,i,e[13],21,1309151649),i=this.ii(i,o,s,a,e[4],6,-145523070),a=this.ii(a,i,o,s,e[11],10,-1120210379),s=this.ii(s,a,i,o,e[2],15,718787259),o=this.ii(o,s,a,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(o,t[1]),t[2]=this.add32(s,t[2]),t[3]=this.add32(a,t[3])}cmn(t,e,i,o,s,a){return e=this.add32(this.add32(e,t),this.add32(o,a)),this.add32(e<<s|e>>>32-s,i)}ff(t,e,i,o,s,a,n){return this.cmn(e&i|~e&o,t,e,s,a,n)}gg(t,e,i,o,s,a,n){return this.cmn(e&o|i&~o,t,e,s,a,n)}hh(t,e,i,o,s,a,n){return this.cmn(e^i^o,t,e,s,a,n)}ii(t,e,i,o,s,a,n){return this.cmn(i^(e|~o),t,e,s,a,n)}md51(t){const e=t.length,i=[1732584193,-271733879,-1732584194,271733878];let o;for(o=64;o<=t.length;o+=64)this.md5cycle(i,this.md5blk(t.substring(o-64,o)));t=t.substring(o-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(o=0;o<t.length;o++)s[o>>2]|=t.charCodeAt(o)<<(o%4<<3);if(s[o>>2]|=128<<(o%4<<3),o>55)for(this.md5cycle(i,s),o=0;o<16;o++)s[o]=0;return s[14]=e*8,this.md5cycle(i,s),i}md5blk(t){const e=[];for(let i=0;i<64;i+=4)e[i>>2]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24);return e}rhex(t){const e="0123456789abcdef".split("");let i="",o=0;for(;o<4;o++)i+=e[t>>o*8+4&15]+e[t>>o*8&15];return i}hex(t){for(let e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")}md5(t){return this.hex(this.md51(t))}add32(t,e){return this.ieCompatibility?this.add32Compat(t,e):this.add32Std(t,e)}add32Std(t,e){return t+e&4294967295}add32Compat(t,e){const i=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(i>>16)<<16|i&65535}};function hh(t){return t==null||t.length===0}var mr={"01":"GRID","02":"CHARTS","0102":"BOTH"},Zu="https://www.ag-grid.com/charts/licensing/",ph=class Ut{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new zD,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(Ut.licenseKey,Ut.gridContext),i=`AG ${e.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let o="";if(e.suppliedLicenseType==="BOTH"?o="AG Grid and AG Charts Enterprise":e.suppliedLicenseType==="GRID"?o="AG Grid Enterprise":e.suppliedLicenseType!==void 0&&(o="AG Charts Enterprise"),e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(e.expired){const s=Ut.getChartsReleaseDate(),a=Ut.formatDate(s);this.outputExpiredKey(e.expiry,a,o)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,i,o):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,i,o)}static extractExpiry(e){const i=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(Ut.decode(i),10))}static extractLicenseComponents(e){let i=e.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),e.length<=32)return{md5:null,license:e,version:null,isTrial:null};const o=i.length-32,s=i.substring(o),a=i.substring(0,o),[n,r,l]=Ut.extractBracketedInformation(i);return{md5:s,license:a,version:n,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const o="CHARTS";if(hh(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:o};const s=Ut.getChartsReleaseDate(),{md5:a,license:n,version:r,isTrial:l,type:c}=Ut.extractLicenseComponents(e);let h=a===this.md5.md5(n)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,d,u,g=null,f=!1,y;function m(){d=g<new Date,u=void 0}if(h&&(g=Ut.extractExpiry(n),h=!isNaN(g.getTime()),h))switch(u=s>g,r){case"legacy":case"2":{h=!1;break}case"3":hh(c)?h=!1:(y=c,c!==mr["02"]&&c!==mr["0102"]?(h=!1,f=!0):l&&m())}return h?{licenseKey:e,valid:h,expiry:Ut.formatDate(g),expired:u,version:r,isTrial:l,trialExpired:d,invalidLicenseTypeForCombo:i?y!=="BOTH":void 0,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}:{licenseKey:e,valid:h,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isE2ETest()&&!this.isWebsiteUrl()&&!hh(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage??""}getHostname(){if(!this.document)return"localhost";const e=this.document.defaultView??window;if(!e)return"localhost";const i=e.location,{hostname:o=""}=i;return o}isForceWatermark(){if(!this.document)return!1;const e=this.document?.defaultView??typeof window<"u"?window:void 0;if(!e)return!1;const{pathname:i}=e.location;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){const e=this.getHostname();return/^((?:[\w-]+\.)?ag-grid\.com)$/.exec(e)!==null}isLocalhost(){const e=this.getHostname();return/^(?:127\.0\.0\.1|localhost)$/.exec(e)!==null}isE2ETest(){const e=this.getHostname();return/^(?:172\.17\.0\.1|host\.docker\.internal)$/.exec(e)!==null}static formatDate(e){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],o=e.getDate(),s=e.getMonth(),a=e.getFullYear();return o+" "+i[s]+" "+a}static getChartsReleaseDate(){return new Date(parseInt(Ut.decode(Ut.RELEASE_INFORMATION),10))}static decode(e){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let o="",s,a,n,r,l,c,h,d=0;const u=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)r=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),c=i.indexOf(u.charAt(d++)),h=i.indexOf(u.charAt(d++)),s=r<<2|l>>4,a=(l&15)<<4|c>>2,n=(c&3)<<6|h,o=o+String.fromCharCode(s),c!=64&&(o=o+String.fromCharCode(a)),h!=64&&(o=o+String.fromCharCode(n));return o=Ut.utf8_decode(o),o}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);s<128?i+=String.fromCharCode(s):s>127&&s<2048?(i+=String.fromCharCode(s>>6|192),i+=String.fromCharCode(s&63|128)):(i+=String.fromCharCode(s>>12|224),i+=String.fromCharCode(s>>6&63|128),i+=String.fromCharCode(s&63|128))}return i}static setGridContext(e=!1){Ut.gridContext=e}static setLicenseKey(e){Ut.licenseKey=e}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const i=e.match(/\[(.*?)\]/g).map(r=>r.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];const o=i.filter(r=>r==="TRIAL").length===1,s=i.filter(r=>r.startsWith("v"))[0],a=s?s.replace("v",""):"legacy",n=mr[i.filter(r=>mr[r])[0]];return[a,o,n]}centerPadAndOutput(e){const i=this.totalMessageLength-e.length;console.error(e.padStart(i/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,i="*",o=""){console.error(e.padEnd(this.totalMessageLength-o.length,i)+o)}outputInvalidLicenseKey(e,i,o){Ut.gridContext||(e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${o} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Zu}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Zu}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,o){Ut.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${o} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){Ut.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,i,o){Ut.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${o} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="License Expired"}};ph.RELEASE_INFORMATION="MTc1NDM4MTgyMTg0OA==",ph.gridContext=!1;var Zs=ph;import{VERSION as GD,_ModuleSupport as qs}from"ag-charts-community";import{_ModuleSupport as VD}from"ag-charts-community";import{isNumberEqual as qu}from"ag-charts-core";function dh(t,e,i){const o=(a,n,r,l)=>{let c=t[0];for(let h=a;r>0?h<=n:h>n;h+=r){const d=t[h];if(l(c,d))return!0;c=d}return!1},s=Math.floor(t.length/2);return o(e,s,e,i)?!0:o(t.length-e,s,-e,i)}import{_ModuleSupport as HD}from"ag-charts-community";var{AxisInterval:WD,Property:KD}=HD,uh=class extends WD{};p([KD],uh.prototype,"minSpacing",2);import{_ModuleSupport as xr}from"ag-charts-community";import{countFractionDigits as $D,isNumberEqual as Qs}from"ag-charts-core";import{_ModuleSupport as Qu}from"ag-charts-community";import{isNumberEqual as Ju}from"ag-charts-core";import{_ModuleSupport as jD}from"ag-charts-community";import{createId as YD}from"ag-charts-core";var{BaseProperties:tg,ChartAxisDirection:UD,Property:Pt,Group:gh,FONT_SIZE:XD}=jD,xi=class extends tg{constructor(){super(...arguments),this.fontSize=XD.LARGE,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};p([Pt],xi.prototype,"enabled",2),p([Pt],xi.prototype,"text",2),p([Pt],xi.prototype,"fontStyle",2),p([Pt],xi.prototype,"fontWeight",2),p([Pt],xi.prototype,"fontSize",2),p([Pt],xi.prototype,"fontFamily",2),p([Pt],xi.prototype,"padding",2),p([Pt],xi.prototype,"color",2),p([Pt],xi.prototype,"parallel",2);var be=class extends tg{constructor(){super(...arguments),this.id=YD(this),this.defaultColorRange=[],this.shape="polygon",this.label=new xi,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=UD.Angle,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new gh({name:this.id}),this.rangeGroup=new gh({name:this.id}),this.labelGroup=new gh({name:this.id}),this._isRange=void 0}assignCrossLineGroup(t,e){t!==this._isRange&&(t?this.rangeGroup.appendChild(e):this.lineGroup.appendChild(e)),this._isRange=t}setSectorNodeProps(t){t.fill=this.fill,t.fillOpacity=this.fillOpacity??1,t.stroke=this.stroke,t.strokeOpacity=this.strokeOpacity??1,t.strokeWidth=this.strokeWidth??1,t.lineDash=this.lineDash}setLabelNodeProps(t,e,i,o,s){const{label:a}=this;t.x=e,t.y=i,t.text=a.text,t.textAlign="center",t.textBaseline=o,t.rotation=s,t.rotationCenterX=e,t.rotationCenterY=i,t.fill=a.color,t.fontFamily=a.fontFamily,t.fontSize=a.fontSize,t.fontStyle=a.fontStyle,t.visible=!0}};p([Pt],be.prototype,"enabled",2),p([Pt],be.prototype,"type",2),p([Pt],be.prototype,"range",2),p([Pt],be.prototype,"value",2),p([Pt],be.prototype,"defaultColorRange",2),p([Pt],be.prototype,"fill",2),p([Pt],be.prototype,"fillOpacity",2),p([Pt],be.prototype,"stroke",2),p([Pt],be.prototype,"strokeWidth",2),p([Pt],be.prototype,"strokeOpacity",2),p([Pt],be.prototype,"lineDash",2),p([Pt],be.prototype,"shape",2),p([Pt],be.prototype,"label",2);var{ChartAxisDirection:ZD,getCrossLineValue:qD,validateCrossLineValue:QD,normalizeAngle360:fh,Group:JD,Path:eg,Sector:tM,RotatableText:eM,ContinuousScale:iM}=Qu,yh=class extends be{constructor(){super(),this.direction=ZD.Angle,this.polygonNode=new eg,this.sectorNode=new tM,this.lineNode=new eg,this.crossLineRange=new JD,this.labelNode=new eM,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!iM.is(this.scale))return!0;const[t,e]=this.scale.domain,i=qD(this);if(this.type==="range"){const[o,s]=i;return o>=t&&o<=e&&s>=o&&s<=e}else return i>=t&&i<=e}update(t){const{scale:e}=this;if(!e||!QD(this,e)||!this.visibilityCheck()){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateLineNode(t),this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t)}updateLineNode(t){const{scale:e,type:i,value:o,lineNode:s}=this;if(!t||i!=="line"||!e){s.visible=!1;return}const a=e.convert(o);if(isNaN(a)){s.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this;s.visible=!0,s.stroke=this.stroke,s.strokeOpacity=this.strokeOpacity??1,s.strokeWidth=this.strokeWidth??1,s.fill=void 0,s.lineDash=this.lineDash;const l=r*Math.cos(a),c=r*Math.sin(a),h=n*Math.cos(a),d=n*Math.sin(a);s.path.clear(!0),s.path.moveTo(h,d),s.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(t){const{polygonNode:e,range:i,scale:o,shape:s,type:a,ticks:n}=this;if(!t||a!=="range"||s!=="polygon"||!o||!i){e.visible=!1;return}const{axisInnerRadius:r,axisOuterRadius:l}=this,c=n.indexOf(i[0]),h=n.indexOf(i[1]),u=(c<=h?n.slice(c,h+1):n.slice(c).concat(n.slice(0,h+1))).map(f=>o.convert(f));e.visible=!0,this.setSectorNodeProps(e);const{path:g}=e;g.clear(!0),u.forEach((f,y)=>{const m=l*Math.cos(f),x=l*Math.sin(f);y===0?g.moveTo(m,x):g.lineTo(m,x)}),r===0?g.lineTo(0,0):u.slice().reverse().forEach(f=>{const y=r*Math.cos(f),m=r*Math.sin(f);g.lineTo(y,m)}),e.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(t){const{sectorNode:e,range:i,scale:o,shape:s,type:a}=this;if(!t||a!=="range"||s!=="circle"||!o||!i){e.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this,l=i.map(d=>o.convert(d)),c=o.step??0,h=o instanceof Qu.BandScale?c/2:0;e.visible=!0,this.setSectorNodeProps(e),e.centerX=0,e.centerY=0,e.innerRadius=n,e.outerRadius=r,e.startAngle=l[0]-h,e.endAngle=l[1]+h,this.assignCrossLineGroup(!0,this.crossLineRange)}updateLabelNode(t){const{label:e,labelNode:i,range:o,scale:s,type:a,ticks:n}=this;if(!t||e.enabled===!1||!e.text||!s||a==="range"&&!o){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:r,axisOuterRadius:l}=this;let c,h,d,u;if(a==="line"){const g=fh(s.convert(this.value)),f=1.5*Math.PI,y=Ju(g,f)||g>f||g<Math.PI/2,m=(r+l)/2*Math.cos(g),x=(r+l)/2*Math.sin(g);c=m+e.padding*Math.cos(g+Math.PI/2),h=x+e.padding*Math.sin(g+Math.PI/2),u=y?"top":"bottom",d=y?g:g-Math.PI}else{const[g,f]=o.map(v=>fh(s.convert(v)));let y=(g+f)/2;g>f&&(y-=Math.PI),y=fh(y);const m=(Ju(y,0)||y>0)&&y<Math.PI;let x;this.shape==="circle"||n.length<3?x=l-e.padding:x=l*Math.cos(Math.PI/n.length)-e.padding,c=x*Math.cos(y),h=x*Math.sin(y),u=m?"bottom":"top",d=m?y-Math.PI/2:y+Math.PI/2}this.setLabelNodeProps(i,c,h,u,d)}};yh.className="AngleCrossLine";var{ChartAxisDirection:oM,TextWrapper:sM,TextUtils:aM,Property:mh,toRadians:an,normalizeAngle360:vo,normalizeAngle360Inclusive:nM,Path:rM,RotatableText:lM,Transformable:cM,BBox:hM,Selection:ig,Line:og}=xr,xh=class extends xr.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};p([mh],xh.prototype,"orientation",2);var nn=class extends xr.PolarAxis{constructor(t,e){super(t,e),this.startAngle=0,this.endAngle=void 0,this.tickLineGroupSelection=ig.select(this.tickLineGroup,og,!1),this.gridLineGroupSelection=ig.select(this.gridLineGroup,og,!1),this.labelData=[],this.tickData=[],this.radiusLineGroup=this.axisGroup.appendChild(new xr.TransformableGroup),this.radiusLine=this.radiusLineGroup.appendChild(new rM),this.includeInvisibleDomains=!0}get direction(){return oM.Angle}createLabel(){return new xh}calculateRotations(){const t=an(this.startAngle),e=vo(t),i=vo(t-Math.PI/2);return{rotation:t,parallelFlipRotation:e,regularFlipRotation:i}}calculateTickLayout(t){const{nice:e,scale:i}=this,o={nice:e,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},s=e?i.niceDomain(o,t):t,a=this.generateAngleTicks(s);this.tickData=a;const n=a.map(l=>l.value),r=n.reduce((l,c)=>Math.max(typeof c=="number"?$D(c):0,l),0);return{niceDomain:s,tickDomain:s,ticks:n,rawTickCount:void 0,fractionDigits:r,timeInterval:void 0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine(),this.updateGridLines(),this.updateTickLines()}normalizedAngles(){const t=vo(-Math.PI/2+an(this.startAngle)),e=this.endAngle!=null?nM(an(this.endAngle)-an(this.startAngle)):2*Math.PI,i=t+e;return[t,i]}computeRange(){this.range=this.normalizedAngles()}updateSelections(){const t=this.tickData;this.gridLineGroupSelection.update(this.gridLength&&this.gridLine.enabled?t:[]),this.tickLineGroupSelection.update(this.tick.enabled?t:[]),this.tickLabelGroupSelection.update(this.label.enabled?t:[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup()}updatePosition(){super.updatePosition();const{translation:t,radiusLineGroup:e}=this,i=Math.floor(t.x),o=Math.floor(t.y);e.translationX=i,e.translationY=o}updateRadiusLine(){const t=this.radiusLine,{path:e}=t;e.clear(!0);const{points:i,closePath:o}=this.getAxisLinePoints();i.forEach(({x:s,y:a,moveTo:n,arc:r,radius:l=0,startAngle:c=0,endAngle:h=0})=>{r?e.arc(s,a,l,c,h):n?e.moveTo(s,a):e.lineTo(s,a)}),o&&e.closePath(),t.visible=this.line.enabled,t.stroke=this.line.stroke,t.strokeWidth=this.line.width,t.fill=void 0}getAxisLinePoints(){const{scale:t,shape:e,gridLength:i}=this,[o,s]=this.range,a=Qs(s-o,2*Math.PI),n=[];if(e==="circle")a?n.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):n.push({x:i*Math.cos(o),y:i*Math.sin(o),moveTo:!0},{x:0,y:0,radius:i,startAngle:vo(o),endAngle:vo(s),arc:!0,moveTo:!1});else if(e==="polygon"){const r=t.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(l=>t.convert(l));r&&r.length>2&&r.forEach((l,c)=>{const h=i*Math.cos(l),d=i*Math.sin(l),u=c===0;n.push({x:h,y:d,moveTo:u})})}return{points:n,closePath:a}}updateGridLines(){const{scale:t,gridLength:e,gridLine:{style:i,width:o},innerRadiusRatio:s}=this;if(!(i&&e>0))return;const a=e*s,n=i.length;this.gridLineGroupSelection.each((r,l,c)=>{const{value:h}=l,{stroke:d,lineDash:u}=i[c%n],g=t.convert(h);r.x1=a*Math.cos(g),r.y1=a*Math.sin(g),r.x2=e*Math.cos(g),r.y2=e*Math.sin(g),r.stroke=d,r.strokeWidth=o,r.lineDash=u,r.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:t,tickLabelGroupSelection:e}=this;e.each((i,o,s)=>{const a=this.labelData[s];if(!a||a.hidden){i.visible=!1;return}i.text=a.text,i.setFont(t),i.fill=t.color,i.x=a.x,i.y=a.y,i.setAlign(a),i.setBoxing(t),i.visible=!0,a.rotation?(i.rotation=a.rotation,i.rotationCenterX=a.x,i.rotationCenterY=a.y):i.rotation=0})}updateTickLines(){const{scale:t,gridLength:e,tick:i,tickLineGroupSelection:o}=this;o.each((s,a)=>{const{value:n}=a,r=t.convert(n),l=Math.cos(r),c=Math.sin(r);s.x1=e*l,s.y1=e*c,s.x2=(e+i.size)*l,s.y2=(e+i.size)*c,s.stroke=i.stroke,s.strokeWidth=i.width})}createLabelNodeData(t,e,i){const{label:o,gridLength:s,scale:a,tick:n}=this;if(!o.enabled)return[];const r=new lM,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,{fractionDigits:h}=this.layout.label,d=this.tickFormatter(this.scale.domain,this.tickData,!1,h),u=t.map((g,f)=>{const{value:y}=g,m=s+o.spacing+n.size,x=a.convert(y),v=Math.cos(x),S=Math.sin(x),b=m*v,D=m*S,{textAlign:k,textBaseline:A}=this.getLabelAlign(x),M=f===t.length-1&&y!==t[0]&&Qs(vo(x),vo(a.convert(t[0]))),L=this.getLabelRotation(x);let C=d(y,f);r.text=C,r.x=b,r.y=D,r.setFont(o),r.textAlign=k,r.textBaseline=A,r.rotation=L,L&&(r.rotationCenterX=b,r.rotationCenterY=D);let I=L?cM.toCanvas(r):r.getBBox();if(I&&e.hideWhenNecessary&&!L){const w=l-I.x,N=I.x+I.width-c,O=1;if(w>O||N>O){const T=I.width-Math.max(w,N);C=sM.wrapText(C,{maxWidth:T,font:o,textWrap:"never"}),C===aM.EllipsisChar&&(C=""),r.text=C,I=r.getBBox()}}return{text:C,x:b,y:D,textAlign:k,textBaseline:A,hidden:C===""||g.hidden||M,rotation:L,box:I}});return o.avoidCollisions&&this.avoidLabelCollisions(u),u}computeLabelsBBox(t,e){this.labelData=this.createLabelNodeData(this.tickData,t,e);const i=this.labelData.map(({box:o})=>o).filter(o=>o!=null);return!this.label.enabled||i.length===0?null:hM.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof xh?t.orientation:"fixed"}getLabelRotation(t){let e=an(this.label.rotation??0);t=vo(t);const i=this.getLabelOrientation();return i==="parallel"?(e+=t,t>=0&&t<Math.PI?e-=Math.PI/2:e+=Math.PI/2):i==="perpendicular"&&(e+=t,t>=Math.PI/2&&t<1.5*Math.PI&&(e+=Math.PI)),e}getLabelAlign(t){const e=Math.cos(t),i=Math.sin(t);let o,s;const a=this.getLabelOrientation(),n=Qs(e,0),r=Qs(i,0),l=Qs(e,1),c=Qs(i,-1),h=e>0&&!n,d=i>0&&!r;return a==="parallel"?(o="center",s=l&&r||d?"top":"bottom"):a==="perpendicular"?(o=c||h?"left":"right",s="middle"):(o="right",n?o="center":h&&(o="left"),s="bottom",r?s="middle":d&&(s="top")),{textAlign:o,textBaseline:s}}updateCrossLines(){const{shape:t,gridLength:e,innerRadiusRatio:i}=this;this.crossLines.forEach(o=>{o instanceof yh&&(o.ticks=this.tickData.map(s=>s.value),o.shape=t,o.axisOuterRadius=e,o.axisInnerRadius=e*i)}),super.updateCrossLines()}};nn.CrossLineConstructor=yh,p([mh],nn.prototype,"startAngle",2),p([mh],nn.prototype,"endAngle",2);var{Property:Sh,CategoryScale:pM}=VD,Do=class extends nn{constructor(t){super(t,new pM),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new uh}hasDefinedDomain(){return!1}generateAngleTicks(t){const{scale:e,gridLength:i}=this,{values:o,minSpacing:s}=this.interval,a={nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},n=o??e.ticks(a,t)?.ticks??[];if(n.length<2||s==null)return n.map(d=>({value:d,visible:!0}));const r=n[0],l=e.convert(r),c=i*Math.cos(l),h=i*Math.sin(l);for(let d=1;d<n.length-1;d++){const u=n[d],g=e.convert(u);if(g-l>Math.PI)break;const f=i*Math.cos(g),y=i*Math.sin(g);if(Math.sqrt((f-c)**2+(y-h)**2)>s){const x=new Set([r]);return dh(n,d,(v,S)=>{x.add(S)}),n.map(v=>{const S=x.has(v);return{value:v,visible:S}})}}return[{value:r,visible:!0}]}avoidLabelCollisions(t){const{minSpacing:e}=this.label;if(t.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;if(e==null)return l.box.collidesBBox(c.box);const h=l.box.clone().grow(e/2),d=c.box.clone().grow(e/2);return h.collidesBBox(d)},o=t[0],s=t.at(-1),a=new Set([o]),n=qu(o.x,s.x)&&qu(o.y,s.y),r=Math.floor(t.length/2);for(let l=1;l<=r;l++){const c=n?t.slice(0,-1):t;if(!dh(c,l,i)){dh(c,l,(d,u)=>{a.add(u)});break}}t.forEach(l=>{a.has(l)||(l.hidden=!0,l.box=void 0)})}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}}};Do.className="AngleCategoryAxis",Do.type="angle-category",p([Sh],Do.prototype,"groupPaddingInner",2),p([Sh],Do.prototype,"paddingInner",2),p([Sh],Do.prototype,"interval",2);var dM={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new Do(t)};import{_ModuleSupport as uM}from"ag-charts-community";import{isNumberEqual as sg}from"ag-charts-core";import{_ModuleSupport as gM}from"ag-charts-community";import{isNumberEqual as fM}from"ag-charts-core";var{range:ag,isDenseInterval:yM,LinearScale:bh}=gM,ng=class Yu extends bh{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[o,s]=i;let a=bh.getTickStep(o,s,e);const n=isNaN(e.maxTickCount)?1/0:e.maxTickCount,r=Math.abs(s-o)/a;let l=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2)));return l>n&&(l/=2,a*=2),{count:l,step:a}}ticks(e,i=this.domain){const{arcLength:o}=this;if(!i||i.length<2||i.some(c=>!isFinite(c))||o<=0)return{ticks:[],count:0};const{nice:s,interval:a}=e,[n,r]=i;if(a){const c=Math.abs(a),h=this.getPixelRange();if(!yM((r-n)/c,h))return ag(n,r,c)}let l;if(s&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=Yu.getNiceStepAndTickCount(e,c).step}else l=bh.getTickStep(n,r,e);return ag(n,r,l)}hasNiceRange(){const e=this.range.slice().sort((o,s)=>o-s);return[Math.PI,2*Math.PI].some(o=>fM(o,e[1]-e[0]))}niceDomain(e,i=this.domain){const o=super.niceDomain(e,i);if(!this.hasNiceRange())return o;const s=o[0]>o[1],a=s?o[1]:o[0],{step:n,count:r}=Yu.getNiceStepAndTickCount(e,o),l=1/n,c=n>=1?Math.ceil(a/n+r)*n:Math.ceil((a+r*n)*l)/l;return s?[c,a]:[a,c]}getPixelRange(){return this.arcLength}},{Property:vh,angleBetween:mM,normalisedExtentWithMetadata:xM,findMinMax:SM}=uM,as=class extends nn{constructor(t){super(t,new ng),this.shape="circle",this.interval=new uh}hasDefinedDomain(){const{min:t,max:e}=this;return t!=null&&e!=null&&t<e}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=xM(t,e,i);return{domain:o,clipped:s}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:t}=this,e=Math.min(...t),i=Math.max(...t),o=mM(e,i)||2*Math.PI,s=this.gridLength;return o*s}generateAngleTicks(t){const{scale:e,range:i,nice:o}=this,{values:s,step:a,minSpacing:n,maxSpacing:r}=this.interval;let l;if(s==null){const{arcLength:c}=e,h=r?Math.floor(c/r):1,d=n?Math.floor(c/n):1/0,u=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),g=Math.max(h,Math.min(d,u)),f={nice:o,interval:a,tickCount:g,minTickCount:h,maxTickCount:d};l=e.ticks(f,t)?.ticks??[]}else{const[c,h]=SM(t.map(Number));l=s.filter(d=>d>=c&&d<=h).sort((d,u)=>d-u)}return l.map(c=>({value:c,visible:!0}))}avoidLabelCollisions(t){const{minSpacing:e}=this.label,i=(a,n)=>{if(a.hidden||n.hidden)return!1;if(e==null)return a.box.collidesBBox(n.box);const r=a.box.clone().grow(e/2),l=n.box.clone().grow(e/2);return r.collidesBBox(l)},o=t[0],s=t.at(-1);o!==s&&sg(o.x,s.x)&&sg(o.y,s.y)&&(s.hidden=!0);for(let a=1;a<t.length;a*=2){let n=!1;for(let r=a;r<t.length;r+=a){const l=t[r],c=t[r-a];if(i(c,l)){n=!0;break}}if(!n){t.forEach((r,l)=>{l%a>0&&(r.hidden=!0,r.box=void 0)});return}}t.forEach((a,n)=>{n>0&&(a.hidden=!0,a.box=void 0)})}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};as.className="AngleNumberAxis",as.type="angle-number",p([vh],as.prototype,"min",2),p([vh],as.prototype,"max",2),p([vh],as.prototype,"interval",2);var bM={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new as(t)};import{_ModuleSupport as rg}from"ag-charts-community";var{OrdinalTimeScale:vM,Property:DM,TimeAxisParentLevel:MM,lowestGranularityUnitForTicks:kM,lowestGranularityUnitForValue:AM,minimumTimeAxisDatumGranularity:IM,dateTruncationForDomain:LM,intervalUnit:lg,intervalStep:cg,intervalEpoch:hg,intervalMilliseconds:pg}=rg,rn=class extends rg.DiscreteTimeAxis{constructor(t){super(t,new vM),this.parentLevel=new MM,this.minimumTimeGranularity=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}processData(){super.processData();const{boundSeries:t,direction:e}=this;this.minimumTimeGranularity=IM(t,e,void 0,void 0)}tickFormatParams(t,e,i,o){o??(o=kM(e));const s=LM(t),a=lg(o),n=cg(o),r=hg(o);return{type:"date",unit:a,step:n,epoch:r,truncateDate:s}}datumFormatParams(t,e,i,o,s){if(typeof t=="number"&&(t=new Date(t)),o==null){const{minimumTimeGranularity:m}=this,x=AM(t);m!=null&&pg(m)<pg(x)?o=m:o=x}const{datum:a,seriesId:n,legendItemName:r,key:l,source:c,property:h,domain:d,boundSeries:u}=e,g=lg(o),f=cg(o),y=hg(o);return{type:"date",value:t,datum:a,seriesId:n,legendItemName:r,key:l,source:c,property:h,domain:d,boundSeries:u,unit:g,step:f,epoch:y,style:s}}};rn.className="OrdinalTimeAxis",rn.type="ordinal-time",p([DM],rn.prototype,"parentLevel",2);var CM={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new rn(t)};import{_ModuleSupport as TM}from"ag-charts-community";import{_ModuleSupport as Sr}from"ag-charts-community";import{isNumberEqual as wM}from"ag-charts-core";import{_ModuleSupport as dg}from"ag-charts-community";import{clamp as ug,isNumberEqual as PM}from"ag-charts-core";var{ChartAxisDirection:NM,Property:EM,validateCrossLineValue:OM,normalizeAngle360FromDegrees:RM,Group:_M,Path:BM,Sector:FM,RotatableText:zM}=dg,gg=class extends xi{constructor(){super(...arguments),this.positionAngle=void 0}};p([EM],gg.prototype,"positionAngle",2);var Dh=class extends be{constructor(){super(),this.direction=NM.Radius,this.label=new gg,this.polygonNode=new BM,this.sectorNode=new FM,this.crossLineRange=new _M,this.labelNode=new zM,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(t){const{scale:e}=this;if(!e||!OM(this,e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:o}=this;t&&(t=i>=this.axisInnerRadius&&o<=this.axisOuterRadius),this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t),this.assignCrossLineGroup(this.type==="range",this.crossLineRange)}updateRadii(){const{range:t,scale:e,type:i,axisInnerRadius:o,axisOuterRadius:s}=this;if(!e)return{innerRadius:0,outerRadius:0};const a=l=>s+o-l;let n,r;if(i==="line")n=a(e.convert(this.value)),r=n;else{const l=Math.abs(e?.bandwidth??0),c=t.map(h=>e.convert(h));n=a(Math.max(...c)),r=a(Math.min(...c))+l}this.outerRadius=n,this.innerRadius=r}drawPolygon(t,e,i){e.forEach((o,s)=>{const a=t*Math.cos(o),n=t*Math.sin(o);s===0?i.path.moveTo(a,n):i.path.lineTo(a,n)}),i.path.closePath()}updatePolygonNode(t){const{gridAngles:e,polygonNode:i,scale:o,shape:s,type:a,innerRadius:n,outerRadius:r}=this;if(!t||s!=="polygon"||!o||!e){i.visible=!1;return}i.visible=!0;const l=this.getPadding();i.path.clear(!0),this.drawPolygon(r-l,e,i);const c=e.slice().reverse(),h=a==="line"?r-l:n+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(t){const{axisInnerRadius:e,axisOuterRadius:i,scale:o,sectorNode:s,shape:a,innerRadius:n,outerRadius:r}=this;if(!t||a!=="circle"||!o){s.visible=!1;return}s.visible=!0,s.startAngle=0,s.endAngle=2*Math.PI;const l=this.getPadding(),c=ug(e,n+l,i),h=ug(e,r-l,i);s.innerRadius=Math.min(c,h),s.outerRadius=Math.max(c,h),this.setSectorNodeProps(s)}updateLabelNode(t){const{innerRadius:e,label:i,labelNode:o,scale:s,shape:a,type:n}=this;if(!t||i.enabled===!1||!i.text||!s){o.visible=!1;return}const r=RM((i.positionAngle??0)-90),l=(PM(r,0)||r>0)&&r<Math.PI,c=l?r-Math.PI/2:r+Math.PI/2;let h;const d=this.gridAngles??[];n==="line"?h=e+i.padding:a==="circle"||d.length<3?h=e-i.padding:h=e*Math.cos(Math.PI/d.length)-i.padding;const u=h*Math.cos(r),g=h*Math.sin(r);let f;n==="line"?f=l?"top":"bottom":f=l?"bottom":"top",this.setLabelNodeProps(o,u,g,f,c)}getPadding(){const{scale:t}=this;if(!t)return 0;const e=Math.abs(t.bandwidth??0),i=Math.abs(t.step??0);return t instanceof dg.BandScale?(i-e)/2:0}};Dh.className="RadiusCrossLine";var{ChartAxisDirection:GM,ZIndexMap:VM,Property:Mh,normalizeAngle360:fg,toRadians:HM,Caption:WM,Group:KM,TransformableGroup:yg,Path:$M,Line:mg,Selection:xg,AxisTickGenerator:jM,AxisGroupZIndexMap:YM}=Sr,kh=class extends Sr.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};p([Mh],kh.prototype,"autoRotate",2),p([Mh],kh.prototype,"autoRotateAngle",2);var br=class extends Sr.PolarAxis{constructor(t,e){super(t,e),this.positionAngle=0,this.gridLineGroupSelection=xg.select(this.gridLineGroup,mg,!1),this.tickGenerator=new jM(this),this.generatedTicks=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new yg({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new yg({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new mg({name:`${this.id}-Axis-line`,zIndex:YM.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new KM({name:`${this.id}-gridPaths`,zIndex:VM.AXIS_GRID})),this.gridPathSelection=xg.select(this.gridPathGroup,$M),this.headingLabelGroup.appendChild(this.title.caption.node),this.cleanup.register(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return GM.Radius}getAxisTransform(){const t=this.scale.range[0],{translation:e,positionAngle:i,innerRadiusRatio:o}=this,s=t*o,a=HM(i);return{translationX:e.x,translationY:e.y-t-s,rotation:a,rotationCenterX:0,rotationCenterY:t+s}}update(){super.update(),this.updateTitle(),this.updateGridLines();const{enabled:t,stroke:e,width:i}=this.line;this.lineNode.setProperties({stroke:e,strokeWidth:t?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}updatePosition(){super.updatePosition();const t=this.getAxisTransform();this.tickLineGroup.setProperties(t),this.tickLabelGroup.setProperties(t),this.lineNodeGroup.setProperties(t),this.headingLabelGroup.setProperties(t)}calculateRotations(){return{rotation:0,parallelFlipRotation:0,regularFlipRotation:-Math.PI/2}}calculateTickLayout(t,e,i){const s=-Math.PI/2,a=[0,1],n=this.label.getSideFlag(),r=n*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),{range:l,reverse:c,defaultTickMinSpacing:h}=this,d=this.tickGenerator.generateTicks({domain:t,range:l,reverse:c,niceMode:e,visibleRange:a,primaryTickCount:void 0,defaultTickMinSpacing:h,parallelFlipRotation:0,regularFlipRotation:s,labelX:r,sideFlag:n,sizeLimit:void 0,removeOverflowLabels:!1}),{tickData:u}=d,{ticks:g,rawTicks:f,rawTickCount:y,tickDomain:m,fractionDigits:x,niceDomain:v=t}=u,S=g.map(b=>this.getTickLabelProps(b,d));return this.generatedTicks={ticks:g,labels:S},{ticks:f,tickDomain:m,niceDomain:v,rawTickCount:y,fractionDigits:x,timeInterval:void 0}}updateSelections(){const{generatedTicks:t}=this;if(!t)return;const{ticks:e,labels:i}=t;this.gridLineGroupSelection.update(this.gridLength?e:[]),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(e):[]),this.gridLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const t=Sr.resetAxisLabelSelectionFn();this.tickLabelGroupSelection.each((e,i)=>{e.fill=i.color,e.text=i.text,e.textBaseline=i.textBaseline,e.textAlign=i.textAlign??"center",e.setFont(i),e.setBoxing(i),e.setProperties(t(e,i))})}updateGridLines(){const{gridLine:{style:t,width:e},shape:i,generatedTicks:o}=this;if(!t||!o)return;const s=t.length,a=(u,g)=>{const{stroke:f,lineDash:y}=t[g%s];u.stroke=f,u.strokeWidth=e,u.lineDash=y,u.fill=void 0},[n,r]=this.gridRange??[0,2*Math.PI],l=wM(r-n,2*Math.PI),d=i==="circle"?(u,g)=>{const{path:f}=u;f.clear(!0);const y=this.getTickRadius(g);l?(f.moveTo(y,0),f.arc(0,0,y,0,2*Math.PI)):(f.moveTo(y*Math.cos(n),y*Math.sin(n)),f.arc(0,0,y,fg(n),fg(r))),l&&f.closePath()}:(u,g)=>{const{path:f}=u,y=this.gridAngles;if(f.clear(!0),!y||y.length<3)return;const m=this.getTickRadius(g);y.forEach((x,v)=>{const S=m*Math.cos(x),b=m*Math.sin(x);v===0?f.moveTo(S,b):f.lineTo(S,b),y.forEach((D,k)=>{const A=m*Math.cos(D),M=m*Math.sin(D);k===0?f.moveTo(A,M):f.lineTo(A,M)}),f.closePath()}),f.closePath()};this.gridPathSelection.each((u,g,f)=>{a(u,f),d(u,g)})}updateTitle(){const t=n=>n.defaultValue,{title:e,range:i}=this,{formatter:o=t}=this.title;e.caption.enabled=e.enabled,e.caption.fontFamily=e.fontFamily,e.caption.fontSize=e.fontSize,e.caption.fontStyle=e.fontStyle,e.caption.fontWeight=e.fontWeight,e.caption.color=e.color,e.caption.wrapping=e.wrapping;let s=!1;const a=e.caption.node;e.enabled&&(s=!0,a.rotation=Math.PI/2,a.x=Math.floor((i[0]+i[1])/2),a.y=-WM.SMALL_PADDING,a.textAlign="center",a.textBaseline="bottom",a.text=this.cachedCallWithContext(o,this.getTitleFormatterParams(this.scale.domain))),a.visible=s}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof Dh){const{shape:e,gridAngles:i,range:o,innerRadiusRatio:s}=this,a=o[0];t.shape=e,t.gridAngles=i,t.axisOuterRadius=a,t.axisInnerRadius=a*s}}),super.updateCrossLines()}createLabel(){return new kh}getTickLabelProps(t,e){const{label:i}=this,{rotation:o,textBaseline:s,textAlign:a}=e,n=this.scale.range,r=t.tickLabel??"",c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=r!==""&&r!=null,d=o;return{...this.getLabelStyles({value:t.tickLabel}),tickId:t.tickId,rotation:d,text:r,textAlign:a,textBaseline:s,visible:h,x:c,y:t.translation,rotationCenterX:c,rotationCenterY:t.translation,range:n}}};br.CrossLineConstructor=Dh,p([Mh],br.prototype,"positionAngle",2);var{ProxyPropertyOnWrite:Sg,Property:Ah,CategoryScale:bg}=TM,Mo=class extends br{constructor(t){super(t,new bg),this.shape="circle",this.groupPaddingInner=0,this.paddingInner=0,this.paddingOuter=0}hasDefinedDomain(){return!1}normaliseDataDomain(t){return{domain:t,clipped:!1}}prepareGridPathTickData(t){return t.slice().reverse()}getTickRadius(t){const{scale:e,innerRadiusRatio:i}=this,o=e.range[0],s=o*i;if(bg.is(e)){const a=e.domain,n=a.length-1-a.indexOf(t.tick);return n===0?s:e.inset+e.step*(n-.5)+e.bandwidth/2}else{const a=(o-s)/e.domain.length;return o-t.translation+s-a/2}}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}}};Mo.className="RadiusCategoryAxis",Mo.type="radius-category",p([Ah],Mo.prototype,"groupPaddingInner",2),p([Sg("scale","paddingInner"),Ah],Mo.prototype,"paddingInner",2),p([Sg("scale","paddingOuter"),Ah],Mo.prototype,"paddingOuter",2);var UM={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new Mo(t)};import{_ModuleSupport as XM}from"ag-charts-community";var{Property:vg,normalisedExtentWithMetadata:ZM,LinearScale:qM}=XM,Js=class extends br{constructor(t){super(t,new qM),this.shape="polygon"}hasDefinedDomain(){const{min:t,max:e}=this;return t!=null&&e!=null&&t<e}prepareGridPathTickData(t){const{scale:e}=this,i=e.domain[1];return t.filter(({tick:o})=>o!==i).sort((o,s)=>s.tick-o.tick)}getTickRadius(t){const{scale:e}=this,i=e.range[0],o=i*this.innerRadiusRatio;return i-t.translation+o}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=ZM(t,e,i);return{domain:o,clipped:s}}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};Js.className="RadiusNumberAxis",Js.type="radius-number",p([vg],Js.prototype,"min",2),p([vg],Js.prototype,"max",2);var QM={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new Js(t)};import{_ModuleSupport as Dg}from"ag-charts-community";var{ObserveChanges:Mg,Property:kg}=Dg,Ih=class extends Dg.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1),this.cleanup.register(()=>{t.animationManager.skip(!0)})}};p([Mg((t,e)=>{t.ctx.animationManager.skip(!e)}),kg],Ih.prototype,"enabled",2),p([Mg((t,e)=>{t.ctx.animationManager.defaultDuration=e}),kg],Ih.prototype,"duration",2);var JM={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","topology","standalone"],moduleFactory:t=>new Ih(t),themeTemplate:{animation:{enabled:!0}}};import{_ModuleSupport as vr}from"ag-charts-community";import{isValidDate as Lh}from"ag-charts-core";import{_ModuleSupport as Ch}from"ag-charts-community";import{attachListener as tk,setAttributes as ek}from"ag-charts-core";var ik='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',{focusCursorAtEnd:ok}=Ch,Ag="text-input",Ig="canvas-overlay",sk=class extends Ch.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1,this.element=t.domManager.addChild(Ig,Ag),this.element.classList.add("ag-charts-text-input"),this.cleanup.register(()=>t.domManager.removeChild(Ig,Ag))}setKeyDownHandler(t){this.cleanup.register(tk(this.element,"keydown",t))}show(t){this.element.innerHTML=ik;const e=this.element.firstElementChild;ek(e,{role:"textbox","data-preventdefault":!1}),e.isContentEditable||(e.contentEditable="true"),e.setAttribute("placeholder",this.ctx.localeManager.t(t.placeholderText??"inputTextareaPlaceholder")),t.styles?.placeholderColor&&e.style.setProperty("--placeholder-text-color",t.styles?.placeholderColor),e.innerText=t.text??"",e.style.color=t.styles?.color??"inherit",e.style.fontFamily=t.styles?.fontFamily??"inherit",e.style.fontSize=t.styles?.fontSize?`${t.styles.fontSize}px`:"inherit",e.style.fontStyle=t.styles?.fontStyle??"inherit",e.style.fontWeight=typeof t.styles?.fontWeight=="number"?`${t.styles.fontWeight}`:t.styles?.fontWeight??"inherit",ok(e),e.addEventListener("input",()=>{this.updatePosition(),t.onChange?.(this.getValue(),this.getBBox())}),e.addEventListener("click",i=>{i.stopPropagation()}),t.layout&&(this.layout=t.layout,this.updatePosition()),t.onChange?.(this.getValue(),this.getBBox()),this.visible=!0}hide(){this.element.innerHTML="",this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1}isVisible(){return this.visible}updateColor(t){this.element.firstElementChild&&(this.element.firstElementChild.style.color=t)}updateFontSize(t){if(this.element.firstElementChild)return this.element.firstElementChild.style.fontSize=`${t}px`,this.updatePosition(),this.getBBox()}getValue(){if(this.element.firstElementChild)return this.element.firstElementChild.innerText.trim()}updatePosition(){const{element:t}=this,e=t.firstElementChild;if(!e)return;const i=this.ctx.domManager.getBoundingClientRect(),{width:o,getTextInputCoords:s,getTextPosition:a,alignment:n,textAlign:r}=this.layout;t.style.setProperty("width",o?`${o}px`:"unset");const l=e.getBoundingClientRect(),c=s(l.height);let h=c.x;n==="center"?h-=(o??l.width)/2:n==="right"&&(h-=o??l.width);const d=a();let u=c.y;d==="center"?u-=l.height/2:d==="bottom"&&(u-=l.height),t.style.setProperty("top",`${u}px`),t.style.setProperty("left",`${h}px`),t.style.setProperty("max-width",`${i.width-h}px`),t.style.setProperty("text-align",n),e.style.setProperty("text-align",r)}getBBox(){const{left:t,top:e,width:i,height:o}=this.element.getBoundingClientRect();return new Ch.BBox(t,e,i,o)}};import{_ModuleSupport as ak}from"ag-charts-community";var{BaseProperties:nk,Property:Lg}=ak,Th=class extends nk{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};p([Lg],Th.prototype,"enabled",2),p([Lg],Th.prototype,"axes",2);import{_ModuleSupport as rk}from"ag-charts-community";var wh=(t=>(t.Line="line",t.HorizontalLine="horizontal-line",t.VerticalLine="vertical-line",t.DisjointChannel="disjoint-channel",t.ParallelChannel="parallel-channel",t.FibonacciRetracement="fibonacci-retracement",t.FibonacciRetracementTrendBased="fibonacci-retracement-trend-based",t.Callout="callout",t.Comment="comment",t.Note="note",t.Text="text",t.Arrow="arrow",t.ArrowUp="arrow-up",t.ArrowDown="arrow-down",t.DateRange="date-range",t.PriceRange="price-range",t.DatePriceRange="date-price-range",t.QuickDatePriceRange="quick-date-price-range",t))(wh||{}),lk=Object.values(wh);function ck(t){for(const e of lk)if(e===t)return e}import{isObject as hk}from"ag-charts-core";import{_ModuleSupport as pk}from"ag-charts-community";import{isObject as dk}from"ag-charts-core";import{_ModuleSupport as uk}from"ag-charts-community";import{generateUUID as gk}from"ag-charts-core";var{BaseProperties:ko,FONT_SIZE:fk,Property:ot}=uk,ln=class extends ko{};p([ot],ln.prototype,"x",2),p([ot],ln.prototype,"y",2);var yk=class extends he(Zi(Pg(ko))){},Ph=class extends he(Zi(Oi(Oh(ls(ko))))){constructor(){super(...arguments),this.cornerRadius=2}};p([ot],Ph.prototype,"enabled",2),p([ot],Ph.prototype,"cornerRadius",2);var mk=class extends Oi(ko){},xk=class extends he(Zi(Oi(ko))){},ns=class extends ls(ko){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};p([ot],ns.prototype,"label",2),p([ot],ns.prototype,"position",2),p([ot],ns.prototype,"alignment",2);var Sk=class extends ls(ko){},cn=class extends ls(ko){constructor(){super(...arguments),this.label=""}};p([ot],cn.prototype,"label",2),p([ot],cn.prototype,"position",2),p([ot],cn.prototype,"alignment",2);function rs(t){class e extends vk(Pg(t)){constructor(){super(...arguments),this.id=gk()}}return e}function Nh(t){class e extends t{constructor(){super(...arguments),this.start=new ln,this.end=new ln}}return p([ot],e.prototype,"start",2),p([ot],e.prototype,"end",2),e}function Cg(t){class e extends t{}return p([ot],e.prototype,"x",2),p([ot],e.prototype,"y",2),e}function Tg(t){class e extends t{}return p([ot],e.prototype,"value",2),e}function Eh(t){class e extends t{constructor(){super(...arguments),this.background=new mk}}return p([ot],e.prototype,"background",2),e}function Ao(t){class e extends t{constructor(){super(...arguments),this.handle=new xk}}return p([ot],e.prototype,"handle",2),e}function wg(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new Ph}}return p([ot],e.prototype,"axisLabel",2),e}function Oh(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return p([ot],e.prototype,"padding",2),p([ot],e.prototype,"textAlign",2),p([ot],e.prototype,"formatter",2),e}function bk(t){class e extends t{}return e}function Rh(t){class e extends t{}return p([ot],e.prototype,"extendStart",2),p([ot],e.prototype,"extendEnd",2),e}function vk(t){class e extends t{}return p([ot],e.prototype,"locked",2),e}function _h(t){class e extends t{setLocaleManager(o){this.localeManager??(this.localeManager=o)}}return e}function Pg(t){class e extends t{}return p([ot],e.prototype,"visible",2),e}function Oi(t){class e extends t{}return p([ot],e.prototype,"fill",2),p([ot],e.prototype,"fillOpacity",2),e}function he(t){class e extends t{}return p([ot],e.prototype,"stroke",2),p([ot],e.prototype,"strokeOpacity",2),p([ot],e.prototype,"strokeWidth",2),e}function Zi(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return p([ot],e.prototype,"lineDash",2),p([ot],e.prototype,"lineDashOffset",2),p([ot],e.prototype,"lineStyle",2),e}function ls(t){class e extends t{constructor(){super(...a