UNPKG

sryd-charts-enterprise

Version:

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

2 lines 1.59 MB
(function(bu,Uo){typeof exports=="object"&&typeof module=="object"?module.exports=Uo():typeof define=="function"&&define.amd?define("agCharts",[],Uo):typeof exports=="object"?exports.agCharts=Uo():bu.agCharts=Uo()})(typeof self<"u"?self:typeof globalThis<"u"?globalThis:this,()=>{var bu={},Uo={exports:bu};if(typeof vpt>"u")var vpt=function(e){throw new Error("Unknown module: "+e)};var pf=Object.defineProperty,GT=Object.getOwnPropertyDescriptor,P_=Object.getOwnPropertyNames,B_=Object.prototype.hasOwnProperty,z_=(t,e)=>{for(var i in e)pf(t,i,{get:e[i],enumerable:!0})},F_=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of P_(e))!B_.call(t,n)&&n!==i&&pf(t,n,{get:()=>e[n],enumerable:!(s=GT(e,n))||s.enumerable});return t},__=t=>F_(pf({},"__esModule",{value:!0}),t),y=(t,e,i,s)=>{for(var n=s>1?void 0:s?GT(e,i):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&pf(e,i,n),n},jT={};z_(jT,{AG_CHARTS_LOCALE_EN_US:()=>CC,AgCharts:()=>Un,AgChartsCommunityModule:()=>yK,AgChartsEnterpriseModule:()=>bpt,AgErrorBarSupportedSeriesTypes:()=>xm,AgTooltipAnchorToType:()=>TM,AgTooltipPlacementType:()=>kM,AgTooltipPositionType:()=>CM,LicenseManager:()=>xpt,VERSION:()=>nc,_ModuleSupport:()=>T,_Scene:()=>Dm,_Theme:()=>Am,_Util:()=>Im,_Widget:()=>$M,setupCommunityModules:()=>ym,setupEnterpriseModules:()=>y_,time:()=>oL}),Uo.exports=__(jT);var G_=Object.defineProperty,VT=(t,e)=>{for(var i in e)G_(t,i,{get:e[i],enumerable:!0})},$={};VT($,{error:()=>HT,errorOnce:()=>H_,log:()=>j_,logGroup:()=>Y_,reset:()=>U_,table:()=>V_,warn:()=>WT,warnOnce:()=>W_});var Su=new Set;function j_(...t){console.log(...t)}function WT(t,...e){console.warn(`AG Charts - ${t}`,...e)}function HT(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function V_(...t){console.table(...t)}function W_(t,...e){const i=`Logger.warn: ${t}`;Su.has(i)||(WT(t,...e),Su.add(i))}function H_(t,...e){const i=`Logger.error: ${t}`;Su.has(i)||(HT(t,...e),Su.add(i))}function U_(){Su.clear()}function Y_(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var ln={};VT(ln,{detectChartDefinition:()=>Q_,getAxisModule:()=>J_,getSeriesModule:()=>q_,hasModule:()=>X_,listModulesByType:()=>Z_,register:()=>UT,registerMany:()=>K_,reset:()=>$_});var gf=(t=>(t.Axis="axis",t.Chart="chart",t.Preset="preset",t.Plugin="plugin",t.Series="series",t))(gf||{}),Or=new Map;function UT(t){const e=Or.get(t.name);if(e&&(e.enterprise||!t.enterprise))throw new Error(`AG Charts - Module '${t.name}' already registered`);Or.set(t.name,t)}function K_(t){for(const e of t)UT(e)}function $_(){Or.clear()}function X_(t){return Or.has(t)}function*Z_(t){for(const e of Or.values())e.type===t&&(yield e)}function Q_(t){for(const e of Or.values())if(tG(e)&&e.detect(t))return e;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function q_(t){const e=Or.get(t);if(iG(e))return e}function J_(t){const e=Or.get(t);if(eG(e))return e}function tG(t){return t?.type==="chart"}function eG(t){return t?.type==="axis"}function iG(t){return t?.type==="series"}var CS=class{constructor(){this.events=new Map}on(t,e){return this.events.has(t)||this.events.set(t,new Set),this.events.get(t)?.add(e),()=>this.off(t,e)}off(t,e){const i=this.events.get(t);i&&(i.delete(e),i.size===0&&this.events.delete(t))}emit(t,e){this.events.get(t)?.forEach(i=>i(e))}clear(t){t?this.events.delete(t):this.events.clear()}};function LS(t,e="and",i=String,s=1/0){if(t.length===1)return i(t[0]);t=t.map(i);const n=t.pop();if(t.length>=s){const o=t.length-(s-1);return`${t.slice(0,s-1).join(", ")}, and ${o} more ${e} ${n}`}return`${t.join(", ")} ${e} ${n}`}function NS(t,e=1/0){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}const i=JSON.stringify(t)??typeof t;return i.length>e?`${i.slice(0,e)}... (+${i.length-e} characters)`:i}function sG(t){let e=1;for(let i=0;i<t.length;i++)t.charCodeAt(i)===10&&e++;return e}function nG(t,e){if(t===e)return 0;const[i,s]=t.length<e.length?[t,e]:[e,t],n=i.length,o=s.length;let a=new Array(n+1).fill(0).map((l,c)=>c),r=new Array(n+1);for(let l=1;l<=o;l++){r[0]=l;for(let c=1;c<=n;c++){const h=s[l-1]===i[c-1]?0:1;r[c]=Math.min(a[c]+1,r[c-1]+1,a[c-1]+h)}[a,r]=[r,a]}return a[n]}var Yo={};typeof window<"u"?Yo.window=window:typeof global<"u"&&(Yo.window=global.window),typeof document<"u"?Yo.document=document:typeof global<"u"&&(Yo.document=global.document);function Ea(t){return t?Yo.document?.[t]:Yo.document}function re(t){return t?Yo.window?.[t]:Yo.window}function oG(t){Yo.document=t}function aG(t){Yo.window=t}function Mt(t,e,i){const s=Ea().createElement(t);if(typeof e=="object"&&(i=e,e=void 0),e)for(const n of e.split(" "))s.classList.add(n);return i&&Object.assign(s.style,i),s}function Bi(t){return Ea().createElementNS("http://www.w3.org/2000/svg",t)}function rG(t,e){const i=Ea("body"),s=Mt("a",{display:"none"});s.href=t,s.download=e,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}function lG(t){const e=re("Option"),{style:i}=new e;return i.color=t,i.color||null}function $e(t){return t!=null}function wt(t){return Array.isArray(t)}function YT(t){return typeof t=="boolean"}function Ko(t){return t instanceof Date}function Er(t){return Ko(t)&&!isNaN(Number(t))}function cG(t){return t instanceof RegExp}function Rr(t){return typeof t=="function"}function Rt(t){return typeof t=="object"&&t!==null&&!wt(t)}function Xe(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function Ti(t){return typeof t=="string"}function pe(t){return typeof t=="number"}function Pt(t){return Number.isFinite(t)}function hG(t){return typeof window<"u"&&t instanceof HTMLElement}function wS(t,e){return Object.values(t).includes(e)}function dG(t){return typeof t=="symbol"}function KT(t){return Ti(t)&&lG(t)!=null}var $l=Symbol("description"),$T=Symbol("required"),ff=class{constructor(t,e,i,s){this.message=t,this.path=e,this.required=i,this.unknown=s}toString(){return this.message}};function Nn(t,e,i=""){if(!Rt(t)){const l=XT(i,t,"an object",!0);return{valid:null,errors:[new ff(l,i,!0)]}}const s=[],n=new Set(Object.keys(t)),o=[],a={};function r(l){return wt(e)?`${i}[${l}]`:i?`${i}.${l}`:l}for(const l of Object.keys(e)){const c=e[l],h=t[l],d=c[$T];if(n.delete(l),typeof h>"u"&&(s.push(l),!d))continue;const u=r(l);if(Rr(c)){const p={options:t,path:u};if(c(h,p))a[l]=p.result?.valid??h;else if(!p.result){const g=XT(u,h,c,d);o.push(new ff(g,i,d))}p.result&&o.push(...p.result.errors)}else{const p=Nn(h,c,u);p.valid!=null&&(a[l]=p.valid),o.push(...p.errors)}}for(const l of n){if(typeof t[l]>"u")continue;const h=uG(l,r(l),s);o.push(new ff(h,i,void 0,!0))}return{valid:a,errors:o}}function XT(t,e,i,s){const n=Ti(i)?i:i[$l],o=n?`; expecting ${n}`:"",a=t?`Option \`${t}\``:"Value";return s&&e==null?`${a} is required and has not been provided${o}, ignoring.`:`${a} cannot be set to \`${NS(e,50)}\`${o}, ignoring.`}function uG(t,e,i){const s=pG(t,i),n=s?`; Did you mean \`${s}\`? Ignoring.`:", ignoring.";return`Unknown option \`${e}\`${n}`}function pG(t,e,i=2){let s=1/0;const n=t.toLowerCase();return e.reduce((o,a)=>{const r=nG(n,a.toLowerCase());return s>r&&r<=i?(s=r,a):o},null)}function ne(t,e){return Object.assign(Rr(t)?(i,s)=>t(i,s):{...t},{[$l]:e})}function K(t){return Object.assign(Rr(t)?(e,i)=>t(e,i):Ra(t),{[$T]:!0,[$l]:t[$l]})}var Ra=(t,e="an object")=>ne((i,s)=>(s.result=Nn(i,t,s.path),!s.result.errors.some(n=>n.required&&n.path===s.path)),e),gG=(t,e="an object")=>ne((i,s)=>(s.result=Nn(i,t,s.path),s.result.errors=s.result.errors.filter(n=>!n.unknown),!s.result.errors.some(n=>n.required&&n.path===s.path)),e),Ze=(...t)=>ne((e,i)=>t.every(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[$l]).filter(Boolean).join(" and ")),Qt=(...t)=>ne((e,i)=>t.some(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[$l]).filter(Boolean).join(" or ")),yf=t=>Pt(t)||Er(t),fG=t=>Ko(t)||(Pt(t)||Ti(t))&&Er(new Date(t)),wn=ne(wt,"an array"),V=ne(YT,"a boolean"),bt=ne(Rr,"a function"),dt=ne(KT,"a color string"),Xl=ne(fG,"a date"),cn=ne($e,"a defined value"),J=ne(Pt,"a number"),$o=ne(Rt,"an object"),E=ne(Ti,"a string"),vu=(t,e=1/0)=>{let i;return e===1/0?i=`an array of at least ${t} items`:t===e?i=`an array of exactly ${t} items`:t===0?i=`an array of no more than ${e} items`:i=`an array of at least ${t} and no more than ${e} items`,ne(s=>wt(s)&&s.length>=t&&s.length<=e,i)},ZT=(t,e=!0)=>ne(i=>Pt(i)&&(i>t||e&&i===t),`a number greater than ${e?"or equal to ":""}${t}`),yG=(t,e)=>ne(i=>Pt(i)&&i>=t&&i<=e,`a number between ${t} and ${e} inclusive`),H=ZT(0),mf=ZT(0,!1),Tt=yG(0,1),Zl=t=>ne((e,{options:i})=>!yf(e)||!yf(i[t])||e<i[t],`the value to be less than \`${t}\``),Mu=t=>ne((e,{options:i})=>!yf(e)||!yf(i[t])||e>i[t],`the value to be greater than \`${t}\``);function st(...t){Rt(t[0])&&(t=Object.values(t[0]));const e=LS(t,"or",i=>`'${i}'`);return ne(i=>t.includes(i),`a keyword such as ${e}`)}var Ct=t=>ne(e=>t===e,`the value ${JSON.stringify(t)}`),mG=(t,e)=>ne(i=>i instanceof t,e??`an instance of ${t.name}`),mt=(t,e)=>ne((i,s)=>wt(i)&&i.every(n=>{const o=t(n,s);return delete s.result,o}),e??`${t[$l]} array`),ps=(t,e="an object array")=>ne((i,s)=>{if(!wt(i))return!1;const n=[],o=[];for(let a=0;a<i.length;a++){const r=`${s.path}[${a}]`,l=Nn(i[a],t,r);o.push(...l.errors),l.errors.some(c=>c.required&&c.path===r)||n.push(l.valid)}return s.result={valid:n,errors:o},!0},e),Du=(t,e="an object")=>{const i=gG({type:K(st(...Object.keys(t)))});return ne((s,n)=>{if(i(s,n)){const o=s.type,a={type:K(Ct(o)),...t[o]},r=Ra(a)(s,n);if(n.result)for(const l of n.result.errors)l.message+=` (type="${o}")`;return r}return!1},e)},xG=Ra({color:dt,stop:Tt},""),bG=ne(t=>{let e=-1/0;for(const i of t)if(i?.stop!=null){if(i.stop<e)return!1;e=i.stop}return!0},"color stops to be defined in ascending order"),xf=Ze(vu(2),Ze(mt(xG),bG)),OS=st("axis","item","series"),ES=Du({gradient:{gradient:st("linear","radial","conic"),bounds:OS,colorStops:K(xf),rotation:J,reverse:V}},"a gradient object with color stops"),rt={stroke:dt,strokeWidth:H,strokeOpacity:Tt},bf=Ra({type:K(Ct("gradient")),gradient:K(st("linear","radial","conic")),bounds:K(OS),colorStops:K(Qt(xf,Ze(vu(2),mt(dt)))),rotation:K(J),reverse:K(V)}),Sf=Ra({type:K(Ct("pattern")),pattern:K(st("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),width:K(H),height:K(H),fill:K(dt),fillOpacity:K(Tt),backgroundFill:K(dt),backgroundFillOpacity:K(Tt),padding:K(H),rotation:K(J),stroke:K(dt),strokeWidth:K(H),strokeOpacity:K(Tt)}),SG={gradient:st("linear","radial","conic"),bounds:OS,reverse:V},vG={rotation:J,padding:H},MG=Du({gradient:{...SG,colorStops:xf,rotation:J},pattern:{...vG,pattern:st("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),width:H,height:H,fill:dt,fillOpacity:Tt,backgroundFill:dt,backgroundFillOpacity:Tt,...rt}},"a color object"),Xo=Qt(dt,MG),St={fill:Xo,fillOpacity:Tt};St.fillGradientDefaults=bf,St.fillPatternDefaults=Sf;var Ot={lineDash:mt(H),lineDashOffset:J},ge={color:dt,fontFamily:E,fontSize:H,fontStyle:st("normal","italic","oblique"),fontWeight:Qt(H,st("normal","bold","bolder","lighter"))};function vf(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function QT(t){return Array.from(new Set(t))}function RS(t,e){return t.reduce((i,s)=>{const n=e(s);return i[n]??(i[n]=[]),i[n].push(s),i},{})}function Zo(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(Array.isArray(t[i])&&Array.isArray(e[i])){if(!Zo(t[i],e[i]))return!1}else if(t[i]!==e[i])return!1;return!0}function Au(t,e,i=0){if(t.length===0)return[];const s=[];for(let n=0;n<e;n++)s.push(t.at((n+i)%t.length));return s}function DG(t,e){const i=new Map;return e.forEach((s,n)=>{i.set(s,n)}),t.sort((s,n)=>{const o=i.get(s)??1/0,a=i.get(n)??1/0;return o-a})}function qT(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2);i(n)?(s=n,t=n+1):e=n-1}return s}function JT(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2);i(n)?(s=n,e=n-1):t=n+1}return s}function tk(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2),o=i(n);o==null?e=n-1:(s=o,t=n+1)}return s}function AG(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2),o=i(n);o==null?t=n+1:(s=o,e=n-1)}return s}function IG(t,e){const i=Math.max(t.length,e.length),s=new Set,n=new Set;for(let o=0;o<i;o++){const a=t[o],r=e[o];a!==r&&(n.has(r)?n.delete(r):r&&s.add(r),s.has(a)?s.delete(a):a&&n.add(a))}return{changed:s.size>0||n.size>0,added:s,removed:n}}function TG(t,e=0,i){const{leading:s=!1,trailing:n=!0,maxWait:o=1/0}=i??{};let a,r;if(o<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function l(...c){if(s&&!r){r=Date.now(),a=setTimeout(()=>r=null,e),t(...c);return}let h=e;if(o!==1/0&&r){const d=Date.now()-r;e>o-d&&(h=o-d)}clearTimeout(a),r??(r=Date.now()),a=setTimeout(()=>{r=null,n&&t(...c)},h)}return Object.assign(l,{cancel(){clearTimeout(a),r=null}})}function ek(t,e,i){const{leading:s=!0,trailing:n=!0}=i??{};let o,a,r=!1;function l(){n&&a?(o=setTimeout(l,e),t(...a)):r=!1,a=null}function c(...h){r?a=h:(r=!0,o=setTimeout(l,e),s?t(...h):a=h)}return Object.assign(c,{cancel(){clearTimeout(o),r=!1,a=null}})}function*Pr(...t){for(const e of t)yield*e}function kG(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function Iu(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*ke(t){const e=[void 0,void 0];for(const i of Object.keys(t))e[0]=i,e[1]=t[i],yield e}function ft(t,e,i){return Math.min(i,Math.max(t,e))}function CG(t,e,i=1e-10){return t>=e[0]-i&&t<=e[1]+i}function de(t,e,i=1e-10){return t===e||Math.abs(t-e)<i}function PS(t){return Math.sign(t)===-1||Object.is(t,-0)}function ik(t){return t%1===0}function BS(t,e=2){const i=10**e;return Math.round(t*i)/i}function sk(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function Tu(t){if(Math.floor(t)===t)return 0;let e=String(t),i=0;if(t<1e-6||t>=1e21){let n;[e,n]=e.split("e"),n!=null&&(i=Number(n))}const s=e.split(".")[1]?.length??0;return Math.max(s-i,0)}var nk=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,ok=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function LG(t){if(!Ti(t))return!1;const e=ok.exec(t);return nk.test(e?e[2]:t)}function ak(t){let e,i;const s=ok.exec(t);s&&([,e,t,i]=s);const n=nk.exec(t);if(!n)throw new Error(`The number formatter is invalid: ${t}`);const[,o,a,r,l,c,h,d,u,p,g]=n;return{fill:o,align:a,sign:r,symbol:l,zero:c,width:parseInt(h),comma:d,precision:parseInt(u),trim:!!p,type:g,prefix:e,suffix:i}}function rk(t){const e=typeof t=="string"?ak(t):t,{fill:i,align:s,sign:n="-",symbol:o,zero:a,width:r,comma:l,type:c,prefix:h="",suffix:d="",precision:u}=e;let{trim:p}=e;const g=u==null||isNaN(u);let f;if(!c)f=On.g,p=!0;else if(c in On&&c in Nh)f=g?Nh[c]:On[c];else if(c in On)f=On[c];else if(c in Nh)f=Nh[c];else throw new Error(`The number formatter type is invalid: ${c}`);let x;return g?x=c?6:12:x=u,m=>{let b=f(m,x);return p&&(b=OG(b)),l&&(b=EG(b,l)),b=PG(m,b,n),o&&o!=="#"&&(b=`${o}${b}`),o==="#"&&c==="x"&&(b=`0x${b}`),c==="s"&&(b=`${b}${RG(m)}`),(c==="%"||c==="p")&&(b=`${b}%`),r!=null&&!isNaN(r)&&(b=BG(b,r,i??a,s)),b=`${h}${b}${d}`,b}}var Nh={b:t=>Mf(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>Mf(t).toString(8),x:t=>Mf(t).toString(16),X:t=>Nh.x(t).toUpperCase(),n:t=>Nh.d(t),"%":t=>`${Mf(t*100).toFixed(0)}`},On={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>On.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>On.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),s=Math.floor(Math.log10(i));return s>=-4&&s<e?i.toFixed(e-1-s):i.toExponential(e-1)},G:(t,e)=>On.g(t,e).toUpperCase(),n:(t,e)=>On.g(t,e),p:(t,e)=>On.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),n=Math.floor(Math.log10(i))-(e-1);if(n<=0)return i.toFixed(-n);const o=10**n;return(Math.round(i/o)*o).toFixed()},s:(t,e)=>{const i=hk(t);return On.r(t/10**i,e)},"%":(t,e)=>On.f(t*100,e)},lk=-24,ck=24,NG={[lk]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[ck]:"Y"},wG="\u2212";function Mf(t){return Math.floor(Math.abs(t))}function OG(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function EG(t,e){let i=t.indexOf(".");i<0&&(i=t.length);const s=t.substring(0,i).split(""),n=t.substring(i);for(let o=s.length-3;o>0;o-=3)s.splice(o,0,e);return`${s.join("")}${n}`}function RG(t){return NG[hk(t)]}function hk(t){return ft(lk,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,ck)}function PG(t,e,i=""){if(i==="(")return t>=0?e:`(${e})`;const s=i==="+"?"+":"";return`${t>=0?s:wG}${e}`}function BG(t,e,i=" ",s=">"){let n=t;if(s===">"||!s)n=n.padStart(e,i);else if(s==="<")n=n.padEnd(e,i);else if(s==="^"){const o=Math.max(0,e-n.length),a=Math.ceil(o/2),r=Math.floor(o/2);n=n.padStart(a+n.length,i),n=n.padEnd(r+n.length,i)}return n}var dk=Object.defineProperty,zG=Object.getOwnPropertyDescriptor,ho=(t,e)=>{for(var i in e)dk(t,i,{get:e[i],enumerable:!0})},v=(t,e,i,s)=>{for(var n=s>1?void 0:s?zG(e,i):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&dk(e,i,n),n},Df=class{constructor(){this.destroyFns=[]}destroy(){for(const t of this.destroyFns)t()}},FG=class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...t){for(const e of t){this.registerDependencies(e);const i=this.modules.find(s=>e.type===s.type&&("optionsKey"in e&&"optionsKey"in s?e.optionsKey===s.optionsKey:!0)&&e.identifier===s.identifier);if(i){if(e.packageType==="enterprise"&&i.packageType==="community"){const s=this.modules.indexOf(i);this.modules.splice(s,1,e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}else this.modules.push(e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}hasEnterpriseModules(){return this.modules.some(t=>t.packageType==="enterprise")}*byType(...t){const e=new Set,i=this.modules.filter(o=>t.includes(o.type)),s=o=>{const a=this.dependencies.get(o);return a?.flatMap(s).concat(a)??[]},n=[];for(const o of i){const a="optionsKey"in o?o.optionsKey:o.contextKey;if(!e.has(a)){for(const r of s(a)){if(e.has(r))continue;const l=this.modulesByOptionKey.get(r);if(!l){n.push(r);continue}t.includes(l.type)&&(yield l,e.add(r))}yield o,e.add(a)}}if(n.length>0)throw new Error(`Could not resolve module dependencies: ${n}`)}registerDependencies(t){if(t.dependencies==null||t.dependencies.length===0)return;const e="optionsKey"in t?t.optionsKey:t.contextKey;this.dependencies.set(e,t.dependencies)}},Qo=new FG,Af={containsPoint:_G,isEmpty:GG,normalize:jG};function _G(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function GG(t){return t==null||t.height===0||t.width===0||isNaN(t.height)||isNaN(t.width)}function jG(t){let{x:e,y:i,width:s,height:n}=t;return(s==null||s>0)&&(n==null||n>0)?t:(e!=null&&s!=null&&s<0&&(s=-s,e=e-s),i!=null&&n!=null&&n<0&&(n=-n,i=i-n),{x:e,y:i,width:s,height:n})}var If=Symbol("interpolate"),Tf=t=>t[If]!=null;function kf(t,e,i,s=1/0){const n={nearest:void 0,distanceSquared:s};for(const o of i){const a=o.distanceSquared(t,e);if(a===0)return{nearest:o,distanceSquared:0};a<n.distanceSquared&&(n.nearest=o,n.distanceSquared=a)}return n}function VG(t,e,i,s=1/0){const{x:n=t,y:o=e}=i.transformPoint?.(t,e)??{},a={nearest:void 0,distanceSquared:s};for(const r of i.children){const{nearest:l,distanceSquared:c}=r.nearestSquared(n,o,a.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<a.distanceSquared&&(a.nearest=l,a.distanceSquared=c)}return a}var ku=class xu{constructor(e,i,s,n){this.x=e,this.y=i,this.width=s,this.height=n}static fromDOMRect({x:e,y:i,width:s,height:n}){return new xu(e,i,s,n)}static merge(e){let i=1/0,s=1/0,n=-1/0,o=-1/0;for(const a of e)a.x<i&&(i=a.x),a.y<s&&(s=a.y),a.x+a.width>n&&(n=a.x+a.width),a.y+a.height>o&&(o=a.y+a.height);return new xu(i,s,n-i,o-s)}static nearestBox(e,i,s){return kf(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:n}=this;return new xu(e,i,s,n)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,i){return Af.containsPoint(this,e,i)}intersection(e){if(!this.collidesBBox(e))return;const i=ft(e.x,this.x,e.x+e.width),s=ft(e.y,this.y,e.y+e.height),n=ft(e.x,this.x+this.width,e.x+e.width),o=ft(e.y,this.y+this.height,e.y+e.height);return new xu(i,s,n-i,o-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-ft(this.x,e,this.x+this.width),n=i-ft(this.y,i,this.y+this.height);return s*s+n*n}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[If](e,i){return new xu(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}};ku.zero=Object.freeze(new ku(0,0,0,0)),ku.NaN=Object.freeze(new ku(NaN,NaN,NaN,NaN));var ut=ku,WG=2e3,uk=Date.now(),HG=()=>{const t=Date.now()-uk;if(t>WG){const e=(Math.floor(t/100)/10).toFixed(1);$.log(`**** ${e}s since last log message ****`)}uk=Date.now()},qt={create(...t){return Object.assign((...i)=>{qt.check(...t)&&(typeof i[0]=="function"&&(i=vf(i[0]())),HG(),$.log(...i))},{check:()=>qt.check(...t),group:(i,s)=>qt.check(...t)?$.logGroup(i,s):s()})},check(...t){return t.length===0&&t.push(!0),vf(re("agChartsDebug")).some(i=>t.includes(i))},inDevelopmentMode(t){if(qt.check("dev"))return t()}};function pk({context:t,pixelRatio:e,width:i,height:s}){t.save(),t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e)),t.restore()}function gk(t){if(qt.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}function fk(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var zS=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:n=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[o,a]=fk(e,i,s);this.canvas=new OffscreenCanvas(o,a),this.context=this.canvas.getContext("2d",{willReadFrequently:n}),this.context.setTransform(s,0,0,s,0,0),gk(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:n}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[o,a]=fk(t,e,i);s.width=o,s.height=a}n.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){pk(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}},FS=new Map;function UG(){FS.clear()}function hn(t){const e=t.constructor,i=Object.hasOwn(e,"className")?e.className:e.name;if(!i)throw new Error(`The ${e} is missing the 'className' property.`);const s=(FS.get(i)??0)+1;return FS.set(i,s),`${i}-${s}`}function _S(){return crypto.randomUUID?.()??YG()}function YG(){const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e="";for(let i=0;i<t.length;i++)(i===4||i===6||i===8||i===10)&&(e+="-"),e+=t[i].toString(16).padStart(2,"0");return e}function pt(t){return function(e,i){const s=`__${i}`;e[i]||KG(e,i,s,t)}}function KG(t,e,i,s){const{type:n="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:r=!1}=s??{},l={type:n,changeCb:o,checkDirtyOnAssignment:r,convertor:a};let c;switch(n){case"normal":c=QG(i,l);break;case"transform":c=qG(i);break;case"path":c=JG(i);break}c=ZG(i,XG($G(c,l),l),l),Object.defineProperty(t,e,{set:c,get:function(){return this[i]},enumerable:!0,configurable:!0})}function $G(t,e){const{convertor:i}=e;return i?function(s){t.call(this,i(s))}:t}var Cf=Symbol("no-change");function XG(t,e){const{changeCb:i}=e;return i?function(s){const n=t.call(this,s);return n!==Cf&&i.call(this,this),n}:t}function ZG(t,e,i){const{checkDirtyOnAssignment:s}=i;return s?function(n){const o=e.call(this,n);return n?._dirty===!0&&this.markDirty(t),o}:e}function QG(t,e){const{changeCb:i}=e;return function(s){const n=this[t];return s!==n?(this[t]=s,this.markDirty(t),i?.(this),s):Cf}}function qG(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this.markDirtyTransform(),e):Cf}}function JG(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(t)),e):Cf}}var yk=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(yk||{}),Cu=class ET{constructor(e){this.serialNumber=ET._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=hn(this),this.pointerEvents=0,this._dirty=!0,this.dirtyZIndex=!1,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.name=e?.name,this.tag=e?.tag??NaN,this.zIndex=e?.zIndex??0,(e?.debugDirty??ET._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const n=e?.toSVG();if(n==null||!n.elements.length&&!n.defs?.length)return;const o=Bi("svg");if(o.setAttribute("width",String(i)),o.setAttribute("height",String(s)),o.setAttribute("viewBox",`0 0 ${i} ${s}`),n.defs?.length){const a=Bi("defs");a.append(...n.defs),o.append(a)}return o.append(...n.elements),o.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const n=s.getBBox();n&&(yield n)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}preRender(e,i=1){this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i;for(const s of this.children()){const n=s.preRender(e);this.childNodeCounts.groups+=n.groups,this.childNodeCounts.nonGroups+=n.nonGroups,this.childNodeCounts.complexity+=n.complexity}return this.childNodeCounts}render(e){const{stats:i}=e;if(this._dirty=!1,this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(n=>typeof n=="string"?n===s:n.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}_setLayerManager(e){this._layerManager=e,this._debug=e?.debug;for(const i of this.children())i._setLayerManager(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes)return;const i=[...this.childNodes].sort(e);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*traverseUp(e){let i=this;for(e&&(yield i);i=i.parentNode;)yield i}*children(){if(this.childNodes)for(const e of this.childNodes)yield e}*descendants(){for(const e of this.children())yield e,yield*e.descendants()}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(e){this.childNodes??(this.childNodes=new Set);for(const i of kG(e))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i._setLayerManager(this.layerManager);this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);delete e.parentNode,e._setLayerManager(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const e of this.children())delete e.parentNode,e._setLayerManager();this.childNodes?.clear(),this.invalidateCachedBBox()}destroy(){this.parentNode?.removeChild(this)}setProperties(e,i){if(i)for(const s of i)this[s]=e[s];else Object.assign(this,e);return this}containsPoint(e,i){return!1}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let n=s.length-1;n>=0;n--){const o=s[n].pickNode(e,i);if(o)return o}}else if(!this.isContainerNode)return this}}pickNodes(e,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))return s;this.isContainerNode||s.push(this);for(const n of this.children())n.pickNodes(e,i,s);return s}invalidateCachedBBox(){this.cachedBBox!=null&&(this.cachedBBox=void 0,this.parentNode?.invalidateCachedBBox())}getBBox(){return this.cachedBBox==null&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}markDirty(e){const{_dirty:i}=this;e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),!(this.cachedBBox==null&&i)&&(this.invalidateCachedBBox(),this._dirty=!0,this.parentNode&&this.parentNode.markDirty())}markClean(){if(this._dirty){this._dirty=!1,this.debugDirtyProperties();for(const e of this.children())e.markClean()}}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],s=new Error().stack?.split(` `).filter(n=>n!=="Error"&&!n.includes(".markDebugProperties")&&!n.includes(".markDirty")&&!n.includes("Object.assign ")&&!n.includes(`${this.constructor.name}.`))??"unknown";i.push(s[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,i)}debugDirtyProperties(){this._debugDirtyProperties!=null&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((e,i)=>{e.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${i} (${e.length}x)`),e.forEach(s=>console.log(s)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){const{parentNode:e}=this;e&&(e.dirtyZIndex=!0)}toSVG(){}};Cu._nextSerialNumber=0,Cu._debugEnabled=!1,v([pt()],Cu.prototype,"visible",2),v([pt({changeCb:t=>t.onZIndexChange()})],Cu.prototype,"zIndex",2);var Pa=Cu,Lf=Symbol("BREAK"),wh="__decorator_config";function t4(t,e){GS(t,e).optional=!0}function GS(t,e){Object.getOwnPropertyDescriptor(t,wh)==null&&Object.defineProperty(t,wh,{value:{}});const i=t[wh],s=e.toString();if(typeof i[s]<"u")return i[s];const n=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:n};const o=Object.getOwnPropertyDescriptor(t,e),a=o?.set,r=o?.get;return Object.defineProperty(t,e,{set:function(h){const{setters:d,observers:u}=i[s];let p;d.some(g=>g.length>2)&&(p=r?r.call(this):n.get(this));for(const g of d)if(h=g(this,e,h,p),h===Lf)return;a?a.call(this,h):n.set(this,h);for(const g of u)g(this,h,p)},get:function(){let h=r?r.call(this):n.get(this);for(const d of i[s].getters)if(h=d(this,e,h),h===Lf)return;return h},enumerable:!0,configurable:!1}),i[s]}function Ba(t,e,i){return(s,n)=>{const o=GS(s,n);o.setters.push(t),e&&o.getters.unshift(e),i&&Object.assign(o,i)}}function mk(t){return(e,i)=>{GS(e,i).observers.push(t)}}function Lu(t){return typeof t<"u"&&wh in t}function Br(t){const e=new Set;for(;Lu(t);)e.add(t?.[wh]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(i=>Object.keys(i))}function xk(t){return Br(t).reduce((e,i)=>(e[i]=t[i]??null,e),{})}function e4(t,e){const i=e.toString();for(;Lu(t);){const s=t[wh];if(Object.hasOwn(s,i))return s[i];t=Object.getPrototypeOf(t)}}function qo(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>qo(i,e[s])):Xe(t)?Xe(e)?jS(t,e,qo):!1:t===e}function jS(t,e,i){for(const s of Object.keys(e))if(!(s in t))return!1;for(const s of Object.keys(t))if(!(s in e)||!i(t[s],e[s]))return!1;return!0}function Gt(...t){const e={};for(const i of t){if(!Rt(i))continue;const s=Lu(i)?Br(i):Object.keys(i);for(const n of s)Xe(e[n])&&Xe(i[n])?e[n]=Gt(e[n],i[n]):e[n]??(e[n]=i[n])}return e}function Nu(...t){const e={};for(const i of t){if(!Rt(i))continue;const s=Lu(i)?Br(i):Object.keys(i);for(const n of s)Xe(e[n])&&Xe(i[n])?e[n]=Nu(e[n],i[n]):n in e||(e[n]??(e[n]=i[n]))}return e}function Nf(t,...e){return e&&wt(t)?t.map(i=>Gt(i,...e)):t}function bk(t,e){const i={};for(const[s,n]of ke(t))i[s]=e(n,s,t);return i}function zr(t,e){const i={...t};for(const s of e)delete i[s];return i}function Oh(t,e){return(wt(e)?e:e.split(".")).reduce((s,n)=>s[n],t)}var VS=new Set(["__proto__","constructor","prototype"]);function WS(t,e,i){const s=wt(e)?e.slice():e.split("."),n=s.pop();if(s.some(a=>VS.has(a)))return;const o=s.reduce((a,r)=>a[r],t);return o[n]=i,o[n]}function HS(t,e,i){if(i===void 0)return e;for(const s of t){const n=i[s];n!==void 0&&(e[s]=n)}return e}function Ql(t){return t==null||typeof t!="object"||!Xe(t)||(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const i=t[e];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&Ql(i)})),t}var En=Math.PI*2,wu=Math.PI/2;function me(t){return t%=En,t+=En,t%=En,t}function i4(t){return t%=En,t+=En,t!==En&&(t%=En),t}function Ou(t){return t%=En,t<-Math.PI?t+=En:t>=Math.PI&&(t-=En),t}function Fr(t,e,i){const s=me(t),n=me(e),o=me(i);return n<o?n<=s&&s<=o:n>o?n<=s||s<=o:!0}function Me(t){return t/180*Math.PI}function s4(t){return t/Math.PI*180}function wf(t,e){return t=me(t),e=me(e),e-t+(t>e?En:0)}function Sk(t){const e=me(t);return e<=wu?e/wu:e<=Math.PI?(Math.PI-e)/wu:e<=1.5*Math.PI?(e-Math.PI)/wu:(En-e)/wu}var ql=(t,e,i)=>t*(1-i)+e*i,US=t=>{const e=t<0?-1:1,i=Math.abs(t);return i<=.04045?t/12.92:e*((i+.055)/1.055)**2.4},YS=t=>{const e=t<0?-1:1,i=Math.abs(t);return i>.0031308?e*(1.055*i**(1/2.4)-.055):12.92*t},vk=class se{constructor(e,i,s,n=1){this.r=ft(0,e||0,1),this.g=ft(0,i||0,1),this.b=ft(0,s||0,1),this.a=ft(0,n||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!se.parseHex(e):e.indexOf("rgb")>=0?!!se.stringToRgba(e):se.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.indexOf("#")>=0)return se.fromHexString(e);const i=se.nameToHex.get(e.toLowerCase());if(i)return se.fromHexString(i);if(e.indexOf("rgb")>=0)return se.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static parseHex(e){e=e.replace(/ /g,"").slice(1);let i;switch(e.length){case 6:case 8:i=[];for(let s=0;s<e.length;s+=2)i.push(parseInt(`${e[s]}${e[s+1]}`,16));break;case 3:case 4:i=e.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(e){const i=se.parseHex(e);if(i){const[s,n,o,a]=i;return new se(s/255,n/255,o/255,a/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let i=-1,s=-1;for(let r=0;r<e.length;r++){const l=e[r];if(i===-1&&l==="(")i=r;else if(l===")"){s=r;break}}if(i===-1||s===-1)return;const o=e.substring(i+1,s).split(","),a=[];for(let r=0;r<o.length;r++){const l=o[r];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=ft(0,c,100),c/=100):r===3?c=ft(0,c,1):(c=ft(0,c,255),c/=255),a.push(c)}return a}static fromRgbaString(e){const i=se.stringToRgba(e);if(i){if(i.length===3)return new se(i[0],i[1],i[2]);if(i.length===4)return new se(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new se(e[0],e[1],e[2],e[3]);if(e.length===3)return new se(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,i,s,n=1){const o=se.HSBtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static fromHSL(e,i,s,n=1){const o=se.HSLtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static fromOKLCH(e,i,s,n=1){const o=se.OKLCHtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+se.padHex(Math.round(this.r*255).toString(16))+se.padHex(Math.round(this.g*255).toString(16))+se.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=se.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,e);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return se.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,i,s){const n=US(e),o=US(i),a=US(s),r=Math.cbrt(.4122214708*n+.5363325363*o+.0514459929*a),l=Math.cbrt(.2119034982*n+.6806995451*o+.1073969566*a),c=Math.cbrt(.0883024619*n+.2817188376*o+.6299787005*a),h=.2104542553*r+.793617785*l-.0040720468*c,d=1.9779984951*r-2.428592205*l+.4505937099*c,u=.0259040371*r+.7827717662*l-.808675766*c,p=Math.atan2(u,d)*180/Math.PI,g=h,f=Math.hypot(d,u),x=p>=0?p:p+360;return[g,f,x]}static OKLCHtoRGB(e,i,s){const n=e,o=i*Math.cos(s*Math.PI/180),a=i*Math.sin(s*Math.PI/180),r=(n+.3963377774*o+.2158037573*a)**3,l=(n-.1055613458*o-.0638541728*a)**3,c=(n-.0894841775*o-1.291485548*a)**3,h=4.0767416621*r-3.3077115913*l+.2309699292*c,d=-1.2684380046*r+2.6097574011*l-.3413193965*c,u=-.0041960863*r-.7034186147*l+1.707614701*c,p=YS(h),g=YS(d),f=YS(u);return[p,g,f]}static RGBtoHSL(e,i,s){const n=Math.min(e,i,s),o=Math.max(e,i,s),a=(o+n)/2;let r,l;if(o===n)r=0,l=0;else{const c=o-n;l=a>.5?c/(2-o-n):c/(o+n),o===e?r=(i-s)/c+(i<s?6:0):o===i?r=(s-e)/c+2:r=(e-i)/c+4,r*=360/6}return[r,l,a]}static HSLtoRGB(e,i,s){if(e=(e%360+360)%360,i===0)return[s,s,s];const n=s<.5?s*(1+i):s+i-s*i,o=2*s-n;function a(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?o+(n-o)*6*h:h<1/2?n:h<2/3?o+(n-o)*(2/3-h)*6:o}const r=a(e/360+1/3),l=a(e/360),c=a(e/360-1/3);return[r,l,c]}static RGBtoHSB(e,i,s){const n=Math.min(e,i,s),o=Math.max(e,i,s),a=o===0?0:(o-n)/o;let r=0;if(n!==o){const l=o-n,c=(o-e)/l,h=(o-i)/l,d=(o-s)/l;e===o?r=d-h:i===o?r=2+c-d:r=4+h-c,r/=6,r<0&&(r=r+1)}return[r*360,a,o]}static HSBtoRGB(e,i,s){e=(e%360+360)%360/360;let n=0,o=0,a=0;if(i===0)n=o=a=s;else{const r=(e-Math.floor(e))*6,l=r-Math.floor(r),c=s*(1-i),h=s*(1-i*l),d=s*(1-i*(1-l));switch(r>>0){case 0:n=s,o=d,a=c;break;case 1:n=h,o=s,a=c;break;case 2:n=c,o=s,a=d;break;case 3:n=c,o=h,a=s;break;case 4:n=d,o=c,a=s;break;case 5:n=s,o=c,a=h;break}}return[n,o,a]}static mix(e,i,s){return new se(ql(e.r,i.r,s),ql(e.g,i.g,s),ql(e.b,i.b,s),ql(e.a,i.a,s))}static lighten(e,i){const s=se.RGBtoOKLCH(e.r,e.g,e.b);return se.fromOKLCH(ft(0,s[0]+i,1),s[1],s[2])}static darken(e,i){const s=se.RGBtoOKLCH(e.r,e.g,e.b);return se.fromOKLCH(ft(0,s[0]-i,1),s[1],s[2])}static interpolate(e,i){const s=1/(e.length-1),n=e.map(o=>se.RGBtoOKLCH(o.r,o.g,o.b));return Array.from({length:i},(o,a)=>{const r=a/(i-1),l=e.length<=2?0:Math.min(Math.floor(r*(e.length-1)),e.length-2),c=(r-l*s)/s,h=n[l],d=n[l+1];return se.fromOKLCH(ql(h[0],d[0],c),ql(h[1],d[1],c),ql(h[2],d[2],c))})}};vk.nameToHex=new Map([["aliceblue","#F0F8FF"],["antiquewhite","#FAEBD7"],["aqua","#00FFFF"],["aquamarine","#7FFFD4"],["azure","#F0FFFF"],["beige","#F5F5DC"],["bisque","#FFE4C4"],["black","#000000"],["blanchedalmond","#FFEBCD"],["blue","#0000FF"],["blueviolet","#8A2BE2"],["brown","#A52A2A"],["burlywood","#DEB887"],["cadetblue","#5F9EA0"],["chartreuse","#7FFF00"],["chocolate","#D2691E"],["coral","#FF7F50"],["cornflowerblue","#6495ED"],["cornsilk","#FFF8DC"],["crimson","#DC143C"],["cyan","#00FFFF"],["darkblue","#00008B"],["darkcyan","#008B8B"],["darkgoldenrod","#B8860B"],["darkgray","#A9A9A9"],["darkgreen","#006400"],["darkgrey","#A9A9A9"],["darkkhaki","#BDB76B"],["darkmagenta","#8B008B"],["darkolivegreen","#556B2F"],["darkorange","#FF8C00"],["darkorchid","#9932CC"],["darkred","#8B0000"],["darksalmon","#E9967A"],["darkseagreen","#8FBC8F"],["darkslateblue","#483D8B"],["darkslategray","#2F4F4F"],["darkslategrey","#2F4F4F"],["darkturquoise","#00CED1"],["darkviolet","#9400D3"],["deeppink","#FF1493"],["deepskyblue","#00BFFF"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1E90FF"],["firebrick","#B22222"],["floralwhite","#FFFAF0"],["forestgreen","#228B22"],["fuchsia","#FF00FF"],["gainsboro","#DCDCDC"],["ghostwhite","#F8F8FF"],["gold","#FFD700"],["goldenrod","#DAA520"],["gray","#808080"],["green","#008000"],["greenyellow","#ADFF2F"],["grey","#808080"],["honeydew","#F0FFF0"],["hotpink","#FF69B4"],["indianred","#CD5C5C"],["indigo","#4B0082"],["ivory","#FFFFF0"],["khaki","#F0E68C"],["lavender","#E6E6FA"],["lavenderblush","#FFF0F5"],["lawngreen","#7CFC00"],["lemonchiffon","#FFFACD"],["lightblue","#ADD8E6"],["lightcoral","#F08080"],["lightcyan","#E0FFFF"],["lightgoldenrodyellow","#FAFAD2"],["lightgray","#D3D3D3"],["lightgreen","#90EE90"],["lightgrey","#D3D3D3"],["lightpink","#FFB6C1"],["lightsalmon","#FFA07A"],["lightseagreen","#20B2AA"],["lightskyblue","#87CEFA"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#B0C4DE"],["lightyellow","#FFFFE0"],["lime","#00FF00"],["limegreen","#32CD32"],["linen","#FAF0E6"],["magenta","#FF00FF"],["maroon","#800000"],["mediumaquamarine","#66CDAA"],["mediumblue","#0000CD"],["mediumorchid","#BA55D3"],["mediumpurple","#9370DB"],["mediumseagreen","#3CB371"],["mediumslateblue","#7B68EE"],["mediumspringgreen","#00FA9A"],["mediumturquoise","#48D1CC"],["mediumvioletred","#C71585"],["midnightblue","#191970"],["mintcream","#F5FFFA"],["mistyrose","#FFE4E1"],["moccasin","#FFE4B5"],["navajowhite","#FFDEAD"],["navy","#000080"],["oldlace","#FDF5E6"],["olive","#808000"],["olivedrab","#6B8E23"],["orange","#FFA500"],["orangered","#FF4500"],["orchid","#DA70D6"],["palegoldenrod","#EEE8AA"],["palegreen","#98FB98"],["paleturquoise","#AFEEEE"],["palevioletred","#DB7093"],["papayawhip","#FFEFD5"],["peachpuff","#FFDAB9"],["peru","#CD853F"],["pink","#FFC0CB"],["plum","#DDA0DD"],["powderblue","#B0E0E6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#FF0000"],["rosybrown","#BC8F8F"],["royalblue","#4169E1"],["saddlebrown","#8B4513"],["salmon","#FA8072"],["sandybrown","#F4A460"],["seagreen","#2E8B57"],["seashell","#FFF5EE"],["sienna","#A0522D"],["silver","#C0C0C0"],["skyblue","#87CEEB"],["slateblue","#6A5ACD"],["slategray","#708090"],["slategrey","#708090"],["snow","#FFFAFA"],["springgreen","#00FF7F"],["steelblue","#4682B4"],["tan","#D2B48C"],["teal","#008080"],["thistle","#D8BFD8"],["tomato","#FF6347"],["transparent","#00000000"],["turquoise","#40E0D0"],["violet","#EE82EE"],["wheat","#F5DEB3"],["white","#FFFFFF"],["whitesmoke","#F5F5F5"],["yellow","#FFFF00"],["yellowgreen","#9ACD32"]]);var oe=vk,Of=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}tickFormatter(t){}datumFormatter(t){}get bandwidth(){}get step(){}get inset(){}},Eh=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})},Mk=t=>{const e=oe.fromString(t),[i,s,n]=oe.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:n,a:e.a}},KS=1e-6,Dk=t=>t.c<KS||t.l<KS||t.l>1-KS,n4=(t,e,i)=>{i=ft(0,i,1);let s;if(Dk(t))s=e.h;else if(Dk(e))s=t.h;else{const r=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=r*(1-i)+l*i}const n=t.c*(1-i)+e.c*i,o=t.l*(1-i)+e.l*i,a=t.a*(1-i)+e.a*i;return oe.fromOKLCH(o,n,s,a)},Rh=class extends Of{constructor(){super(...arguments),this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(Mk)}update(){const{domain:t,range:e}=this;t.length<2&&($.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let i=1;i<t.length;i++){const s=t[i-1],n=t[i];if(s>=n){$.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((o,a)=>o-a);break}}if(e.length<t.length)for(let i=e.length;i<t.length;i++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(Mk)}normalizeDomains(...t){return{domain:t.flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,n=e[0],o=e.at(-1),a=i[0],r=i[i.length-1];if(t<=n)return a;if(t>=o)return r;let l,c;if(e.length===2){const u=(t-n)/(o-n),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(u*(i.length-1)),i.length-2),c=(u-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const u=e[l],p=e[l+1];c=(t-u)/(p-u)}const h=s[l],d=s[l+1];return n4(h,d,c).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&$.warnOnce("Expected update to not invalidate scale"))}};v([Eh],Rh.prototype,"domain",2),v([Eh],Rh.prototype,"range",2);var Ef=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(isNaN(s.x)||isNaN(s.y))return;if(this._cache!=null&&this._cache.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:n,colorSpace:o}=this;if(n.length===0)return;if(n.length===1)return n[0].color;let a=this.createCanvasGradient(t,s,i);if(a==null)return;const r=o==="oklch",l=.05;let c=n[0];a.addColorStop(c.stop,c.color);for(let h=1;h<n.length;h+=1){const d=n[h];if(r){const u=new Rh;u.domain=[c.stop,d.stop],u.range=[c.color,d.color];for(let p=c.stop+l;p<d.stop;p+=l)a.addColorStop(p,u.convert(p))}a.addColorStop(d.stop,d.color),c=d}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:t,bbox:s,gradient:a},a}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);return this.stops.forEach(({stop:s,color:n})=>{const o=Bi("stop");o.setAttribute("offset",`${s}`),o.setAttribute("stop-color",`${n}`),i.appendChild(o)}),i}},Ak=class extends Ef{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:n}=this,o=me(Me(n+-90)),a=i?.centerX??e.x+e.width*.5,r=i?.centerY??e.y+e.height*.5;return t.createConicGradient(o,a,r)}createSvgGradient(t){return Bi("linearGradient")}},Ik=class extends Ef{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=me(Me(i+90)),n=Math.cos(s),o=Math.sin(s),a=t.width,r=t.height,l=t.x+a*.5,c=t.y+r*.5,h=Math.sqrt(r*r+a*a)/2,d=Math.atan2(r,a);let u;s<Math.PI/2?u=s:s<Math.PI?u=Math.PI-s:s<1.5*Math.PI?u=s-Math.PI:u=2*Math.PI-s;const p=h*Math.abs(Math.cos(u-d));return{x0:l+n*p,y0:c+o*p,x1:l-n*p,y1:c-o*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:n,y1:o}=this.getGradientPoints(e);return t.createLinearGradient(i,s,n,o)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:n}=this.getGradientPoints(t),o=Bi("linearGradient");return o.setAttribute("x1",String(e)),o.setAttribute("y1",String(i)),o.setAttribute("x2",String(s)),o.setAttribute("y2",String(n)),o.setAttribute("gradientUnits","userSpaceOnUse"),o}},o4=class extends Ef{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,n=i?.centerY??e.y+e.height*.5,o=i?.innerRadius??0,a=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,n,o,s,n,a)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=Bi("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},kt=class{handleUnknownProperties(t,e){}set(t){const{className:e=this.constructor.name}=this.constructor;if(typeof t!="object")return $.warn(`unable to set ${e} - expecting a properties object`),this;const i=new Set(Object.keys(t));for(const s of Br(this))if(i.has(s)){const n=t[s],o=this;if(Rn(o[s]))if(o[s]instanceof Eu){const a=o[s].reset(n);a!=null?o[s]=a:$.warn(`unable to set [${s}] - expecting a properties array`)}else o[s].set(n);else Xe(n)?o[s]=Nu(n,o[s]??{}):o[s]=n;i.delete(s)}this.handleUnknownProperties(i,t);for(const s of i)$.warn(`unable to set [${s}] in ${e} - property is unknown`);return this}isValid(t){return Br(this).every(e=>{const i=e4(this,e);if(i==null)return!0;const s=i.optional===!0||typeof this[e]<"u";return s||$.warnOnce(`${t??""}[${e}] is required.`),s})}toJson(){return Br(this).reduce((t,e)=>{const i=this[e];return t[e]=Rn(i)?i.toJson():i,t},{})}},Eu=class m_ extends Array{constructor(e,...i){super(i.length);const n=(o=>!!o?.prototype?.constructor?.name)(e)?o=>new e().set(o):e;Object.defineProperty(this,"itemFactory",{value:n,enumerable:!1,configurable:!1}),this.set(i)}set(e){if(wt(e)){this.length=e.length;for(let i=0;i<e.length;i++)this[i]=this.itemFactory(e[i])}return this}reset(e){if(Array.isArray(e))return new m_(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}};function Rn(t){return t instanceof kt||t instanceof Eu}function a4(t,e={}){const{optional:i=!1}=e;return Ba((s,n,o)=>{const a={...e,target:s,property:n};if(i&&typeof o>"u"||t(o,a))return Rn(s[n])&&!Rn(o)?(s[n].set(o),s[n]):o;const r=NS(o,50),l=String(n).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=t.message?`; expecting ${Ph(t,a)}`:"";return $.warn(`Property [${l}] of [${c}] cannot be set to [${r}]${h}, ignoring.`),Lf},void 0,{optional:i})}var r4=!1,A=r4?(t,e={})=>{const{optional:i=!1}=e;return Ba((s,n,o)=>{const a={...e,target:s,property:n};if(i&&typeof o>"u"||t(o,a)){if(Rn(s[n])&&!Rn(