Files
sigpro-grid/node_modules/ag-charts-core/dist/package/main.esm.min.mjs
2026-03-17 08:44:54 +01:00

13 lines
131 KiB
JavaScript
Executable File

var Ii=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,te=(t,e)=>{for(var n in e)Ii(t,n,{get:e[n],enumerable:!0})},ut=(t,e,n,r)=>{for(var i=r>1?void 0:r?ka(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&Ii(e,n,i),i},_i=(t=>(t.Chart="chart",t.Axis="axis",t.Series="series",t.Plugin="plugin",t.AxisPlugin="axis:plugin",t.SeriesPlugin="series:plugin",t.Preset="preset",t))(_i||{});function La(t){return t.domain}var Ri=(t=>(t[t.Leading=0]="Leading",t[t.Trailing=1]="Trailing",t[t.Interpolate=2]="Interpolate",t))(Ri||{}),Na=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 n=this.events.get(t);n&&(n.delete(e),n.size===0&&this.events.delete(t))}emit(t,e){const n=this.events.get(t);if(n)for(const r of n)r(e)}clear(t){t?this.events.delete(t):this.events.clear()}},ar=class{constructor(t){if(this.maxCacheSize=t,this.store=new Map,t<=0)throw new Error("LRUCache size must be greater than 0")}get(t){if(!this.store.has(t))return;const e=this.store.get(t);return this.store.delete(t),this.store.set(t,e),e}has(t){return this.store.has(t)}set(t,e){return this.store.set(t,e),this.store.size>this.maxCacheSize&&this.store.delete(this.store.keys().next().value),e}clear(){this.store.clear()}},Ci={};te(Ci,{Time:()=>tc,check:()=>ne,create:()=>Ki,inDevelopmentMode:()=>qi});function cr(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function Ia(t){return Array.from(new Set(t))}function _a(t,e){return t.reduce((n,r)=>{const i=e(r);return n[i]??(n[i]=[]),n[i].push(r),n},{})}function ee(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(Array.isArray(t[n])&&Array.isArray(e[n])){if(!ee(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function Ra(t,e,n=0){if(t.length===0)return[];const r=[];for(let i=0;i<e;i++)r.push(t.at((i+n)%t.length));return r}function Ca(t,e){const n=new Map;for(const[r,i]of e.entries())n.set(i,r);return t.sort((r,i)=>{const o=n.get(r)??1/0,s=n.get(i)??1/0;return o-s})}function Pa(t,e){let n=0;for(;n<t.length&&e(t[n]);)n+=1;const r=n;r!==0&&t.splice(0,r)}function Ga(t,e){let n=t.length-1;for(;n>=0&&e(t[n]);)n-=1;const r=t.length-1-n;r!==0&&t.splice(t.length-r,r)}function Ba(t,e,n){const r=[t],i=Math.round((e-t)/(n-1));if(i>0)for(let o=t+i;o<e&&!(r.push(o)>=n-1);o+=i);return r.push(e),r}var Q={};typeof globalThis.window<"u"&&(Q.window=globalThis.window),typeof document<"u"?Q.document=document:typeof globalThis.global<"u"&&(Q.document=globalThis.document);function Me(t){return t?Q.document?.[t]:Q.document}function It(t){return t?Q.window?.[t]:Q.window}function Ua(t){Q.document=t}function ja(t){Q.window=t}function Pi(){return Q.window?.OffscreenCanvas??globalThis.OffscreenCanvas}function Ha(){return Q.window?.Path2D??globalThis.Path2D}function Wa(){return Q.window?.DOMMatrix??globalThis.DOMMatrix}function Va(){return Q.window?.Image??globalThis.Image}function za(){return Q.window?.ResizeObserver??globalThis.ResizeObserver}var Gi=1,Ka=11;function Bi(t){return t!=null&&typeof t.nodeType=="number"}function lr(t){return t!=null&&t.nodeType===Gi}function qa(t){return t!=null&&t.nodeType===Ka}function Ui(t){return t!=null&&t.nodeType===Gi&&"style"in t}var ji={};te(ji,{error:()=>Hi,errorOnce:()=>Xa,log:()=>an,logGroup:()=>Vi,reset:()=>Ja,table:()=>Ya,warn:()=>pt,warnOnce:()=>Z});var ur=new Set;function an(...t){console.log(...t)}function pt(t,...e){console.warn(`AG Charts - ${t}`,...e)}function Hi(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function Ya(...t){console.table(...t)}function Wi(t,e,n){let r;t instanceof Error?r=t.message:typeof t=="string"?r=t:typeof t=="object"?r=JSON.stringify(t):r=String(t);const i=`${e}: ${r}`;ur.has(i)||(n(t),ur.add(i))}function Z(t,...e){Wi(t,"Logger.warn",n=>pt(n,...e))}function Xa(t,...e){Wi(t,"Logger.error",n=>Hi(n,...e))}function Ja(){ur.clear()}function Vi(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var Qa=2e3,zi=Date.now();function Za(){const t=Date.now()-zi;if(t>Qa){const e=(Math.floor(t/100)/10).toFixed(1);an(`**** ${e}s since last log message ****`)}zi=Date.now()}function Ki(...t){return Object.assign((...n)=>{ne(...t)&&(typeof n[0]=="function"&&(n=cr(n[0]())),Za(),an(...n))},{check:()=>ne(...t),group:(n,r)=>ne(...t)?Vi(n,r):r()})}function ne(...t){return t.length===0&&t.push(!0),cr(It("agChartsDebug")).some(n=>t.includes(n))}function qi(t){if(ne("dev"))return t()}function tc(t,e={}){const{logResult:n=!0,logStack:r=!1,logArgs:i=!1,logData:o}=e;return function(s,a,c){const l=c.value;c.value=function(...u){const f=performance.now(),h=l.apply(this,u),g={duration:performance.now()-f};return n&&(g.result=h),i&&(g.args=u),r&&(g.stack=new Error("Stack trace for timing debug").stack),o&&(g.logData=o(this)),an(t,g),h}}}var Yi={};te(Yi,{flush:()=>Ji,record:()=>Xi});var fr=new Map;function Xi(t,e){ne("scene:stats:verbose")&&fr.set(t,e)}function Ji(){const t=Object.fromEntries(fr);return fr.clear(),t}var ec={},Qi={};te(Qi,{RegistryMode:()=>Zi,getAxisModule:()=>ac,getChartModule:()=>cc,getPresetModule:()=>lc,getSeriesModule:()=>uc,hasModule:()=>ic,isEnterprise:()=>hc,isIntegrated:()=>dc,isModuleType:()=>re,isUmd:()=>gc,listModules:()=>oc,listModulesByType:()=>sc,register:()=>hr,registerModules:()=>nc,reset:()=>rc,setRegistryMode:()=>fc});var Zi=(t=>(t.Enterprise="enterprise",t.Integrated="integrated",t.UMD="umd",t))(Zi||{}),Fe=new Set,yt=new Map;function to(t){if(yt.set(t.name,t),t.dependencies)for(const e of t.dependencies)hr(e)}function hr(t){const e=yt.get(t.name);if(!e){to(t);return}if(e.version===t.version){!e.enterprise&&t.enterprise&&to(t);return}throw new Error([`AG Charts - Module '${t.name}' already registered with different version:`,`${e.version} vs ${t.version}`,"","Check your package.json for conflicting dependencies - depending on your package manager","one of these commands may help:","- npm ls ag-charts-community","- yarn why ag-charts-community"].join(`
`))}function nc(t){for(const e of t.flat())hr(e)}function rc(){Fe.clear(),yt.clear()}function ic(t){return yt.has(t)}function*oc(){for(const t of yt.values())yield t}function*sc(t){for(const e of yt.values())re(t,e)&&(yield e)}function ac(t){const e=yt.get(t);if(re("axis",e))return e}function cc(t){const e=yt.get(t);if(re("chart",e))return e;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function lc(t){const e=yt.get(t);if(re("preset",e))return e}function uc(t){const e=yt.get(t);if(re("series",e))return e}function fc(t){Fe.add(t)}function hc(){return Fe.has("enterprise")}function dc(){return Fe.has("integrated")}function gc(){return Fe.has("umd")}function re(t,e){return e?.type===t}var dr=class{constructor(){this.callbacks=new Set}flush(){for(const t of this.callbacks)t();this.callbacks.clear()}merge(t){for(const e of t.callbacks)this.callbacks.add(e)}register(...t){for(const e of t)e&&this.callbacks.add(e)}},pc=class{constructor(){this.cleanup=new dr}destroy(){this.cleanup.flush()}},yc=void 0,mc=void 0;mc=yc;var bc=void 0,vc=void 0;vc=bc;var xc=void 0,Ec=void 0;Ec=xc;var Ac=void 0,wc=void 0;wc=Ac;var De="\u2026",cn=/\r?\n/g,$e="\u200B",eo=/[\s.,;:-]{1,5}$/,ke;function Oc(t){if(ke==null){const n=It("Option");ke=new n().style}ke.color=t;const e=ke.color||null;return ke.color="",e}function ln(t){return t!=null}function L(t){return Array.isArray(t)}function no(t){return typeof t=="boolean"}function ie(t){return t instanceof Date}function un(t){return ie(t)&&!Number.isNaN(Number(t))}function ro(t){return t instanceof RegExp}function vt(t){return typeof t=="function"}function X(t){return typeof t=="object"&&t!==null&&!L(t)}function Sc(t){return L(t)||W(t)}function W(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function Tc(t){if(typeof t!="object"||t===null)return!1;for(const e in t)return!1;return!0}function xt(t){return typeof t=="string"}function Le(t){return typeof t=="number"}function ft(t){return Number.isFinite(t)}function gr(t){return t!=null&&t.nodeType===1&&"style"in t}function Mc(t,e){return xt(e)&&Object.keys(t).includes(e)}function Fc(t,e){return Object.values(t).includes(e)}function Dc(t){return typeof t=="symbol"}function io(t){return xt(t)&&(t==="none"||Oc(t)!=null)}function $c(t,e){return t in e}function oo({fontSize:t,fontStyle:e,fontWeight:n,fontFamily:r}){let i="";return e&&e!=="normal"&&(i+=`${e} `),n&&n!=="normal"&&n!==400&&(i+=`${n} `),i+=`${t}px`,i+=` ${r}`,i}function kc(t,e=1.15){return Math.round(t*e)}function oe(t){return String(t??"")}function pr(t){return t.replace(eo,"")+De}function so(t){return $e+t+$e}function ao(t){return t.replaceAll($e,"")}function Lc(t){return L(t)?co(t.at(-1)):Ne(oe(t))}function Ne(t){return t.endsWith(De)}function co(t){return oe(t?.text).endsWith(De)}function se(t,e="and",n=String,r=1/0){if(t.length===0)return"";if(t.length===1)return n(t[0]);t=t.map(n);const i=t.pop();if(t.length>=r){const o=t.length-(r-1);return`${t.slice(0,r-1).join(", ")}, and ${o} more ${e} ${i}`}return`${t.join(", ")} ${e} ${i}`}function Ie(t,e=1/0){if(typeof t=="number"){if(Number.isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}const n=JSON.stringify(t)??typeof t;return n.length>e?`${n.slice(0,e)}... (+${n.length-e} characters)`:n}function Nc(t){let e=1;for(let n=0;n<t.length;n++)t.codePointAt(n)===10&&e++;return e}function lo(t,e){if(t===e)return 0;const[n,r]=t.length<e.length?[t,e]:[e,t],i=n.length,o=r.length;let s=new Array(i+1).fill(0).map((c,l)=>l),a=new Array(i+1);for(let c=1;c<=o;c++){a[0]=c;for(let l=1;l<=i;l++){const u=r[c-1]===n[l-1]?0:1;a[l]=Math.min(s[l]+1,a[l-1]+1,s[l-1]+u)}[s,a]=[a,s]}return s[i]}function Ic(t){return t.replaceAll(_c,(e,n)=>(n>0?"-":"")+e.toLowerCase())}var _c=/[A-Z]+(?![a-z])|[A-Z]/g;function Rc(t,e=""){return t==null?e:L(t)?t.map(n=>oe(n.text)).join(""):xt(t)?t:String(t)}function Cc(t,e=0,n){const{leading:r=!1,trailing:i=!0,maxWait:o=1/0}=n??{};let s,a;if(o<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function c(...l){if(r&&!a){a=Date.now(),s=setTimeout(()=>a=null,e),t(...l);return}let u=e;if(o!==1/0&&a){const f=Date.now()-a;e>o-f&&(u=o-f)}clearTimeout(s),a??(a=Date.now()),s=setTimeout(()=>{a=null,i&&t(...l)},u)}return Object.assign(c,{cancel(){clearTimeout(s),a=null}})}function Pc(t,e,n){const{leading:r=!0,trailing:i=!0}=n??{};let o,s,a=!1;function c(){i&&s?(o=setTimeout(c,e),t(...s)):a=!1,s=null}function l(...u){a?s=u:(a=!0,o=setTimeout(c,e),r?t(...u):s=u)}return Object.assign(l,{cancel(){clearTimeout(o),a=!1,s=null}})}function yr(t,e,n=""){try{return t(...e)}catch(r){const i=n?` \`${n}\``:"";Z(`Uncaught exception in user callback${i}`,r)}}var at=Symbol("description"),uo=Symbol("required"),fn=Symbol("marked"),hn=Symbol("undocumented"),dn=Symbol("union"),Gc=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["src","url"],["width","thickness"]].reduce((t,e)=>{for(const n of e)t.set(n.toLowerCase(),new Set(e.filter(r=>r!==n)));return t},new Map),fo=(t=>(t.Invalid="invalid",t.Required="required",t.Unknown="unknown",t))(fo||{});function _e(t,e){return ft(e)?`${t}[${e}]`:t?`${t}.${e}`:e}var _t=class{constructor(t,e,n,r,i){this.type=t,this.description=e,this.value=n,this.path=r,this.key=i}setUnionType(t,e){if(this.path.startsWith(e)){const n=this.path.slice(e.length);this.altPath=`${e}[type=${t}]${n}`}}getPrefix(){const{altPath:t=this.path,key:e}=this;return!t&&!e?"Value":`Option \`${e?_e(t,e):t}\``}toString(){const{description:t="unknown",type:e,value:n}=this;return e==="required"&&n==null?`${this.getPrefix()} is required and has not been provided; expecting ${t}, ignoring.`:`${this.getPrefix()} cannot be set to \`${Ie(n,50)}\`; expecting ${t}, ignoring.`}},mr=class extends _t{constructor(t,e,n,r){super("unknown",void 0,e,n,r),this.suggestions=t,this.key=r}getPrefix(){return`Unknown option \`${_e(this.altPath??this.path,this.key)}\``}getPostfix(){const t=se(Bc(this.key,this.suggestions),"or",e=>`\`${e}\``);return t?`; Did you mean ${t}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}};function Rt(t,e,n=""){if(!X(t))return{cleared:null,invalid:[new _t("required","an object",t,n)]};const r={},i=[],o=new Set(Object.keys(t)),s=[];if(dn in e){const a=Object.keys(e),c=e[dn];if(t.type!=null&&a.includes(t.type)||t.type==null&&c!=null){const{type:l=c,...u}=t,f=Rt(u,e[l],n);Object.assign(r,{type:l},f.cleared);for(const h of f.invalid)h.setUnionType(l,n);i.push(...f.invalid)}else{const l=se(a,"or",u=>`'${u}'`);i.push(new _t("required",`a keyword such as ${l}`,t.type,n,"type"))}return{cleared:r,invalid:i}}for(const a of Object.keys(e)){const c=e[a],l=c[uo],u=t[a];if(o.delete(a),u===void 0&&(c[hn]||s.push(a),!l))continue;const f=_e(n,a);if(vt(c)){const d=c(u,{options:t,path:f});if(typeof d=="object"){if(i.push(...d.invalid),d.valid){r[a]=d.cleared;continue}else if(mn(d.invalid,f))continue}else if(d){r[a]=u;continue}i.push(new _t(l?"required":"invalid",c[at],u,n,a))}else{const h=Rt(u,c,f);h.cleared!=null&&(r[a]=h.cleared),i.push(...h.invalid)}}for(const a of o){const c=t[a];c!==void 0&&i.push(new mr(s,c,n,a))}return{cleared:r,invalid:i}}function Bc(t,e,n=2){const r=t.toLowerCase(),i=Gc.get(r);return e.filter(o=>{const s=o.toLowerCase();return i?.has(o)===!0||s.includes(r)||lo(r,s)<=n})}function F(t,e){if(vt(t)){let r=function(i,o){return t(i,o)};var n=r;return r[at]=e,r}else return{...t,[at]:e}}function O(t){return Object.assign(vt(t)?(e,n)=>t(e,n):V(t),{[uo]:!0,[at]:t[at]})}function M(t){return Object.assign(vt(t)?(e,n)=>t(e,n):V(t),{[hn]:!0,[at]:t[at]})}var V=(t,e="an object",n=!1)=>F((r,i)=>{const o=Rt(r,t,i.path),s=!mn(o.invalid,i.path);return{valid:s,cleared:s||!n?o.cleared:null,invalid:o.invalid}},e),br=(t,e,n)=>({...t,[at]:e,[dn]:n}),ht=(...t)=>F((e,n)=>{const r=[];for(const i of t){const o=i(e,n);if(typeof o=="object"){if(r.push(...o.invalid),!o.valid)return{valid:!1,cleared:e,invalid:r};e=o.cleared}else if(!o)return!1}return{valid:!0,cleared:e,invalid:r}},se(t.filter(e=>!e[hn]).map(e=>e[at]).filter(ln),"and")),G=(...t)=>F((e,n)=>{for(const r of t){const i=r(e,n);if(typeof i=="object"?i.valid:i)return i}return!1},se(t.filter(e=>!e[hn]).map(e=>e[at]).filter(ln),"or")),ae=t=>ft(t)||un(t),Uc=t=>ie(t)||(ft(t)||xt(t))&&un(new Date(t)),vr=F(L,"an array"),x=F(no,"a boolean"),N=F(vt,"a function"),I=F(io,"a color string"),Re=F(Uc,"a date"),nt=F(ln,"a defined value"),m=F(ft,"a number"),ho=F(X,"an object"),S=F(xt,"a string"),go=F(gr,"an html element"),Ce=(t,e=1/0)=>{let n;return e===1/0?n=`an array of at least ${t} items`:t===e?n=`an array of exactly ${t} items`:t===0?n=`an array of no more than ${e} items`:n=`an array of at least ${t} and no more than ${e} items`,F(r=>L(r)&&r.length>=t&&r.length<=e,n)},xr=(t,e=1/0)=>{let n;return e===1/0?n=`a string of at least ${t} characters`:t===e?n=`an string of exactly ${t} characters`:t===0?n=`an string of no more than ${e} characters`:n=`an string of at least ${t} and no more than ${e} characters`,F(r=>xt(r)&&r.length>=t&&r.length<=e,n)},Er=(t,e=!0)=>F(n=>ft(n)&&(n>t||e&&n===t),`a number greater than ${e?"or equal to ":""}${t}`),po=(t,e)=>F(n=>ft(n)&&n>=t&&n<=e,`a number between ${t} and ${e} inclusive`),p=Er(0),jc=Er(0,!1),k=po(0,1),gn=t=>F((e,{options:n})=>!ae(e)||!ae(n[t])||e<n[t],`the value to be less than \`${t}\``),Hc=t=>F((e,{options:n})=>!ae(e)||!ae(n[t])||e<=n[t],`the value to be less than or equal to \`${t}\``),pn=t=>F((e,{options:n})=>!ae(e)||!ae(n[t])||e>n[t],`the value to be greater than \`${t}\``);function E(...t){X(t[0])&&(t=Object.values(t[0]));const e=se(t,"or",n=>`'${n}'`);return F(n=>t.includes(n),`a keyword such as ${e}`)}function Wc(){return E}var Ct=t=>F(e=>t===e,`the value ${JSON.stringify(t)}`),Vc=(t,e)=>F(n=>n instanceof t,e??`an instance of ${t.name}`),Y=(t,e,n=!0)=>F((r,i)=>{if(!L(r))return!1;let o=n;const s=[],a=[],c=l=>{o=n?o&&l:o||l};if(r.length===0)return{valid:!0,cleared:s,invalid:a};for(let l=0;l<r.length;l++){const u=r[l],f=t(u,{options:u,path:`${i.path}[${l}]`});typeof f=="object"?(c(f.valid),a.push(...f.invalid),f.cleared!=null&&s.push(f.cleared)):(c(f),f&&s.push(u))}return{valid:o,cleared:o||!n?s:null,invalid:a}},e??`${t[at]} array`),Ot=(t,e="an object array")=>F((n,r)=>{if(!L(n))return!1;const i=[],o=[];for(let s=0;s<n.length;s++){const a=`${r.path}[${s}]`,c=Rt(n[s],t,a);mn(c.invalid,a)||i.push(c.cleared),o.push(...c.invalid)}return{valid:!0,cleared:i,invalid:o}},e),Pt=(t,e)=>F((n,r)=>{if(!vt(n))return!1;if(fn in n)return!0;const i=e??t[at];return{valid:!0,cleared:Object.assign((...s)=>{const a=yr(n,s);if(a==null)return;const c=t(a,{options:a,path:""});if(typeof c=="object"){if(yo(c,r,i,a),c.valid)return c.cleared}else{if(c)return a;Z(`Callback \`${r.path}\` returned an invalid value \`${Ie(a,50)}\`; expecting ${i}, ignoring.`)}},{[fn]:!0}),invalid:[]}},"a function"),yn=(t,e="an object")=>F((n,r)=>{if(!vt(n))return!1;if(fn in n)return!0;const i=e;return{valid:!0,cleared:Object.assign((...s)=>{const a=yr(n,s,r.path);if(a==null)return;const c=Rt(a,t);return yo(c,r,i,a),c.cleared},{[fn]:!0}),invalid:[]}},"a function");function mn(t,e){return t.some(n=>n.type==="required"&&n.path===e)}function yo(t,e,n,r){if(t.invalid.length!==0){if(L(r)){const i=n??t.invalid[0]?.description??"a valid value";return Z(`Callback \`${e.path}\` returned an invalid value \`${Ie(r,50)}\`; expecting ${i}, ignoring.`)}for(const i of t.invalid){if(i instanceof mr)return Z(`Callback \`${e.path}\` returned an unknown property \`${_e(i.path,i.key)}\`${i.getPostfix()}`);const o=Ie(i.value,50);Z(i.key?`Callback \`${e.path}\` returned an invalid property \`${_e(i.path,i.key)}\`: \`${o}\`; expecting ${i.description}, ignoring.`:`Callback \`${e.path}\` returned an invalid value \`${o}\`; expecting ${n??i.description}, ignoring.`)}}}function tt(t,e,n){return Math.min(n,Math.max(t,e))}function zc(t,e,n=1e-10){return t>=e[0]-n&&t<=e[1]+n}function Ar(t,e,n=1e-10){return t===e||Math.abs(t-e)<n}function Kc(t){return Math.sign(t)===-1||Object.is(t,-0)}function qc(t){return t%1===0}function wr(t,e=2){const n=10**e;return Math.round(t*n)/n}function Yc(t,e=2){const n=10**e;return Math.ceil(t*n)/n}function Xc(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function mo(t){if(Math.floor(t)===t)return 0;let e=String(t),n=0;if(t<1e-6||t>=1e21){let i;[e,i]=e.split("e"),i!=null&&(n=Number(i))}const r=e.split(".")[1]?.length??0;return Math.max(r-n,0)}var bo=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,vo=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function xo(t){if(!xt(t))return!1;const e=vo.exec(t);return bo.test(e?e[2]:t)}function Or(t){let e,n;const r=vo.exec(t);r&&([,e,t,n]=r);const i=bo.exec(t);if(!i){Z(`The number formatter is invalid: ${t}`);return}const[,o,s,a,c,l,u,f,h,d,g]=i;return{fill:o,align:s,sign:a,symbol:c,zero:l,width:Number.parseInt(u),comma:f,precision:Number.parseInt(h),trim:!!d,type:g,prefix:e,suffix:n}}function Eo(t){const e=typeof t=="string"?Or(t):t;if(e==null)return;const{fill:n,align:r,sign:i="-",symbol:o,zero:s,width:a,comma:c,type:l,prefix:u="",suffix:f="",precision:h}=e;let{trim:d}=e;const g=h==null||Number.isNaN(h);let y;if(!l)y=ct.g,d=!0;else if(l in ct&&l in ce)y=g?ce[l]:ct[l];else if(l in ct)y=ct[l];else if(l in ce)y=ce[l];else throw new Error(`The number formatter type is invalid: ${l}`);const b=l?6:12;let v;g||(v=h);let A=r,w=n;return s&&(w??(w="0"),A??(A="=")),($,K)=>{let C;v!=null?C=v:l==="f"||l==="%"?C=K??b:l?C=b:C=K??b;let T=y($,C);d&&(T=Zc(T)),c&&(T=tl(T,c));const j=il(o,l),At=j?.length??0;j&&(T=`${j}${T}`),l==="s"&&(T=`${T}${el($)}`),(l==="%"||l==="p")&&(T=`${T}%`);const{value:Lt,prefixLength:wt}=nl($,T,i),Nt=wt+At;let ot=Lt;return a!=null&&!Number.isNaN(a)&&(ot=rl(ot,a,w??" ",A,Nt)),ot=`${u}${ot}${f}`,ot}}var ce={b:t=>bn(t).toString(2),c:t=>String.fromCodePoint(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>bn(t).toString(8),x:t=>bn(t).toString(16),X:t=>ce.x(t).toUpperCase(),n:t=>ce.d(t),"%":t=>`${bn(t*100).toFixed(0)}`},ct={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>ct.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>ct.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const n=Math.abs(t),r=Math.floor(Math.log10(n));return r>=-4&&r<e?n.toFixed(e-1-r):n.toExponential(e-1)},G:(t,e)=>ct.g(t,e).toUpperCase(),n:(t,e)=>ct.g(t,e),p:(t,e)=>ct.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const n=Math.abs(t),i=Math.floor(Math.log10(n))-(e-1);if(i<=0)return n.toFixed(-i);const o=10**i;return(Math.round(n/o)*o).toFixed()},s:(t,e)=>{const n=Oo(t);return ct.r(t/10**n,e)},"%":(t,e)=>ct.f(t*100,e)},Ao=-24,wo=24,Jc={[Ao]:"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",[wo]:"Y"},Qc="\u2212";function bn(t){return Math.floor(Math.abs(t))}function Zc(t){if(!t.endsWith("0")||!t.includes("."))return t;let e=t.length-1;for(;e>0;)if(t[e]=="0")e-=1;else if(t[e]=="."){e-=1;break}else break;return t.substring(0,e+1)}function tl(t,e){let n=t.indexOf(".");n<0&&(n=t.length);const r=t.substring(0,n).split(""),i=t.substring(n);for(let o=r.length-3;o>0;o-=3)r.splice(o,0,e);return`${r.join("")}${i}`}function el(t){return Jc[Oo(t)]}function Oo(t){return tt(Ao,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,wo)}function nl(t,e,n=""){if(n==="(")return t>=0?{value:e,prefixLength:0}:{value:`(${e})`,prefixLength:1};let r="";return t<0?r=Qc:n==="+"?r="+":n===" "&&(r=" "),{value:`${r}${e}`,prefixLength:r.length}}function rl(t,e,n=" ",r=">",i=0){const o=e-t.length;if(o<=0)return t;const s=n.repeat(o);if(r==="="){const a=Math.min(Math.max(i,0),t.length),c=t.slice(0,a),l=t.slice(a);return`${c}${s}${l}`}if(r===">"||!r)return s+t;if(r==="<")return`${t}${s}`;if(r==="^"){const a=Math.ceil(o/2),c=Math.floor(o/2);return`${n.repeat(a)}${t}${n.repeat(c)}`}return s+t}function il(t,e){if(t==="#")switch(e){case"b":return"0b";case"o":return"0o";case"x":return"0x";case"X":return"0X";default:return""}return t??""}var So=t=>{if(!X(t))return!1;const e=Object.keys(t);return e.length===1&&e[0].startsWith("$")},ol=V({color:I,stop:k},""),Sr=F(t=>{let e=-1/0;for(const n of t)if(n?.stop!=null){if(n.stop<e)return!1;e=n.stop}return!0},"colour stops to be defined in ascending order"),vn=ht(Ce(2),Y(ol),Sr),Tr=E("axis","item","series"),sl={type:O(Ct("gradient")),colorStops:O(vn),rotation:m,gradient:M(E("linear","radial","conic")),bounds:M(Tr),reverse:M(x),colorSpace:M(E("rgb","oklch"))},al=V(sl,"a gradient object with colour stops"),_={stroke:I,strokeWidth:p,strokeOpacity:k},To=V({type:O(Ct("gradient")),gradient:O(E("linear","radial","conic")),bounds:O(Tr),colorStops:O(G(vn,ht(Ce(2),Y(I)))),rotation:O(m),reverse:O(x),colorSpace:O(E("rgb","oklch"))}),Mo=V({type:O(Ct("pattern")),pattern:O(E("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:xr(2),width:O(p),height:O(p),fill:O(I),fillOpacity:O(k),backgroundFill:O(I),backgroundFillOpacity:O(k),padding:O(p),rotation:O(m),scale:O(p),stroke:O(I),strokeWidth:O(p),strokeOpacity:O(k)}),Fo=V({type:O(Ct("image")),url:S,width:p,height:p,rotation:O(m),backgroundFill:O(I),backgroundFillOpacity:k,fit:O(E("stretch","contain","cover")),repeat:O(E("repeat","repeat-x","repeat-y","no-repeat"))}),cl={gradient:{colorStops:vn,rotation:m,gradient:M(E("linear","radial","conic")),bounds:M(Tr),reverse:M(x),colorSpace:M(E("rgb","oklch"))},pattern:{pattern:E("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),path:xr(2),width:p,height:p,rotation:m,scale:p,fill:I,fillOpacity:k,backgroundFill:I,backgroundFillOpacity:k,..._,padding:M(p)},image:{url:O(S),backgroundFill:I,backgroundFillOpacity:k,width:p,height:p,fit:E("stretch","contain","cover","none"),repeat:E("repeat","repeat-x","repeat-y","no-repeat"),rotation:m}},ll=br(cl,"a color object"),xn=G(I,V(ll,"a color object")),B={fill:xn,fillOpacity:k};B.fillGradientDefaults=M(To),B.fillPatternDefaults=M(Mo),B.fillImageDefaults=M(Fo);var U={lineDash:Y(p),lineDashOffset:m},ul={...B,..._,...U,opacity:k,cornerRadius:p},fl={..._,...U,opacity:k},Do={...B,..._,...U,opacity:k};function $o(t){return{enabled:x,range:E("tooltip","node"),highlightedItem:t,unhighlightedItem:t}}function hl(t,e){return{enabled:x,range:E("tooltip","node"),highlightedItem:t,unhighlightedItem:t,highlightedSeries:e,unhighlightedSeries:e,bringToFront:x}}var ko={start:nt,stop:nt,..._,...B,...U},Lo={start:nt,stop:nt,..._,...U},dl=V({enabled:x,key:O(E("x","y")),segments:Ot(ko,"path segments array")},"a segmentation object",!0),gl=V({enabled:x,key:O(E("x","y")),segments:Ot(Lo,"path segments array")},"a segmentation object",!0),Mr=V({googleFont:S},"google font"),No=G(S,So,Mr,Y(G(S,Mr))),Io=G(p,E("normal","bold","bolder","lighter")),mt={color:I,fontFamily:No,fontSize:p,fontStyle:E("normal","italic","oblique"),fontWeight:Io},_o=V({top:m,right:m,bottom:m,left:m},"padding object"),Pe=G(m,_o),Ge={enabled:x,stroke:I,strokeWidth:p,strokeOpacity:k},Fr={border:Ge,cornerRadius:m,padding:Pe,...B},Dr=["top","top-right","top-left","bottom","bottom-right","bottom-left","right","right-top","right-bottom","left","left-top","left-bottom"],pl={floating:x,placement:E(...Dr),xOffset:m,yOffset:m},$r=F((t,e)=>{let n;if(typeof t=="string")Dr.includes(t)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new _t("invalid",`a legend placement string: ["${Dr.join('", "')}"]`,t,e.path)));else{const{cleared:r,invalid:i}=Rt(t,pl);n={valid:i.length===0,cleared:r,invalid:i}}return n},"a legend position object or placement string"),le=G(E("circle","cross","diamond","heart","plus","pin","square","star","triangle"),N),Ro=E("never","always","hyphenate","on-space"),En=E("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),An=G(p,E("exact","nearest","area")),Co=G(p,E("exact","nearest")),ue=G(S,m,Re,Ot({text:O(S),...mt},"text segments array")),wn={enabled:x,text:ue,textAlign:E("left","center","right"),wrapping:E("never","always","hyphenate","on-space"),spacing:p,maxWidth:p,maxHeight:p,...mt};wn.padding=M(p);var On={enabled:x,text:ue,renderer:Pt(G(S,go))},kr=["defaults","download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series","separator"],Po={type:E("action","separator"),showOn:E("always","series-area","series-node","legend-item"),label:O(S),enabled:x,action:N,items:(t,e)=>Go(t,e)};Po.iconUrl=M(S);var yl=V(Po),ml=F((t,e)=>{let n;return typeof t=="string"?kr.includes(t)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new _t("invalid",`a context menu item string alias: ["${kr.join('", "')}"]`,t,e.path))):n=yl(t,e),n},`a context menu item object or string alias: [${kr.join(", ")}]`),Go=Y(ml,"a menu items array",!1),Bo={label:S,ariaLabel:S,tooltip:S,icon:E("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","close","comment-annotation","date-range-drawing","date-price-range-drawing","delete","disjoint-channel-drawing","drag-handle","fill-color","line-style-solid","line-style-dashed","line-style-dotted","high-low-series","hlc-series","hollow-candlestick-series","horizontal-line-drawing","line-color","line-series","line-with-markers-series","locked","measurer-drawing","note-annotation","ohlc-series","pan-end","pan-left","pan-right","pan-start","parallel-channel-drawing","position-bottom","position-center","position-top","price-label-annotation","price-range-drawing","reset","settings","step-line-series","text-annotation","trend-line-drawing","fibonacci-retracement-drawing","fibonacci-retracement-trend-based-drawing","unlocked","vertical-line-drawing","zoom-in","zoom-out")},dt=G(S,Pt(ue)),Uo=V({x:dt,y:dt,angle:dt,radius:dt,size:dt,color:dt,label:dt,secondaryLabel:dt,sectorLabel:dt,calloutLabel:dt,legendItem:dt}),Be=F(xo,"a valid number format string"),bt={width:p,height:p,minWidth:p,minHeight:p,suppressFieldDotNotation:x,title:wn,subtitle:wn,footnote:wn,padding:{top:p,right:p,bottom:p,left:p},seriesArea:{border:Ge,clip:x,cornerRadius:m,padding:Pe},legend:{enabled:x,position:$r,orientation:E("horizontal","vertical"),maxWidth:p,maxHeight:p,spacing:p,border:Ge,cornerRadius:m,padding:Pe,fill:xn,fillOpacity:k,preventHidingAll:x,reverseOrder:x,toggleSeries:x,item:{marker:{size:p,shape:le,padding:p,strokeWidth:p},line:{length:p,strokeWidth:p},label:{maxLength:p,formatter:N,...mt},maxWidth:p,paddingX:p,paddingY:p,showSeriesStroke:x},pagination:{marker:{size:p,shape:le,padding:p},activeStyle:{...B,..._},inactiveStyle:{...B,..._},highlightStyle:{...B,..._},label:mt},listeners:{legendItemClick:N,legendItemDoubleClick:N}},gradientLegend:{enabled:x,position:$r,spacing:p,reverseOrder:x,border:Ge,cornerRadius:m,padding:Pe,fill:xn,fillOpacity:k,gradient:{preferredLength:p,thickness:p},scale:{label:{...mt,minSpacing:p,format:Be,formatter:N},padding:p,interval:{step:m,values:vr,minSpacing:ht(p,gn("maxSpacing")),maxSpacing:ht(p,pn("minSpacing"))}}},listeners:{seriesNodeClick:N,seriesNodeDoubleClick:N,seriesVisibilityChange:N,activeChange:N,click:N,doubleClick:N,annotations:N,zoom:N},loadGoogleFonts:x,highlight:{drawingMode:E("overlay","cutout"),range:E("tooltip","node")},overlays:{loading:On,noData:On,noVisibleSeries:On,unsupportedBrowser:On},tooltip:{enabled:x,showArrow:x,pagination:x,delay:p,range:An,wrapping:Ro,mode:E("single","shared","compact"),position:{anchorTo:E("pointer","node","chart"),placement:G(En,Y(En)),xOffset:m,yOffset:m}},animation:nt,contextMenu:nt,context:()=>!0,dataSource:{getData:N},keyboard:{enabled:x,tabIndex:m},touch:{dragAction:E("none","drag","hover")},ranges:{enabled:x,buttons:Ot({...Bo,value:G(m,ht(Y(G(m,Re)),Ce(2,2)),N)},"range button options array")},locale:{localeText:ho,getLocaleText:Pt(S)},background:{visible:x,fill:I,image:{url:O(S),top:m,right:m,bottom:m,left:m,width:p,height:p,opacity:k}},styleNonce:S,sync:nt,zoom:nt,scrollbar:nt,formatter:G(Pt(ue),Uo)};bt.flashOnUpdate=M(nt),bt.dataSource.requestThrottle=M(p),bt.dataSource.updateThrottle=M(p),bt.dataSource.updateDuringInteraction=M(x),bt.statusBar=M(nt),bt.foreground=M({visible:x,text:S,image:{url:S,top:m,right:m,bottom:m,left:m,width:p,height:p,opacity:k},...B}),bt.overrideDevicePixelRatio=M(m),bt.sync.domainMode=M(E("direction","position","key")),bt.displayNullData=M(x);var Ue={cursor:S,context:()=>!0,showInLegend:x,nodeClickRange:An,listeners:{seriesNodeClick:N,seriesNodeDoubleClick:N},highlight:$o(Do)};Ue.allowNullKeys=M(x);var Sn={...Ue,id:S,visible:x,context:()=>!0,data:vr};Sn.seriesGrouping=M(nt);var jo={shape:le,size:p,...B,..._,...U},bl={enabled:x,itemStyler:yn({...B,..._,...U,shape:le,size:p}),...jo},je={enabled:x,formatter:Pt(ue),format:Be,itemStyler:yn({enabled:x,...Fr,...mt}),...Fr,...mt},Tn={...je,lineHeight:p,minimumFontSize:p,wrapping:Ro,overflowStrategy:E("ellipsis","hide")},Ho={visible:x,cap:{visible:x,length:p,lengthRatio:k,..._,...U},..._,...U},vl={...Ho,xLowerKey:S,xUpperKey:S,yLowerKey:S,yUpperKey:S,xLowerName:S,xUpperName:S,yLowerName:S,yUpperName:S,itemStyler:yn({visible:x,..._,...U,cap:{visible:x,length:p,lengthRatio:k,..._,...U}})},Mn={enabled:x,showArrow:x,range:Co,renderer:Pt(G(S,m,Re,V({heading:S,title:S,symbol:{marker:{enabled:x,shape:le,...B,stroke:I,strokeOpacity:k,strokeWidth:p,...U},line:{enabled:x,stroke:I,strokeWidth:p,strokeOpacity:k,...U}},data:Ot({label:O(S),value:O(G(S,m,Re))})},"tooltip renderer result object"))),position:{anchorTo:E("node","pointer","chart"),placement:G(En,Y(En)),xOffset:m,yOffset:m},interaction:{enabled:x}},xl={...Mn,range:An},El={enabled:x,xOffset:m,yOffset:m,blur:p,color:I},Al=br({linear:{},smooth:{tension:k},step:{position:E("start","middle","end")}},"interpolation line options"),Fn=Symbol("BREAK"),He="__decorator_config",Dn="__decorator_accessors";function rt(t,e){Lr(t,e).optional=!0}function Lr(t,e){if(Object.getOwnPropertyDescriptor(t,He)==null&&Object.defineProperty(t,He,{value:{}}),Object.getOwnPropertyDescriptor(t,Dn)==null){const u=Object.getPrototypeOf(t)?.[Dn]?.slice()??[];Object.defineProperty(t,Dn,{value:u})}const n=t[He],r=e.toString();if(n[r]!=null)return n[r];n[r]={setters:[],getters:[],observers:[]};const i=Object.getOwnPropertyDescriptor(t,e);let o=i?.get,s=i?.set;if(o==null||s==null){const l=t[Dn];let u=l.indexOf(e);u===-1&&(u=l.push(e)-1),o??(o=function(){let f=this.__accessors;return f==null&&(f=l.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:f})),f[u]}),s??(s=function(f){let h=this.__accessors;h==null&&(h=l.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:h})),h[u]=f})}return Object.defineProperty(t,e,{set:function(l){const{setters:u,observers:f}=n[r];let h;u.some(d=>d.length>2)&&(h=o.call(this));for(const d of u)if(l=d(this,e,l,h),l===Fn)return;s.call(this,l);for(const d of f)d(this,l,h)},get:function(){let l=o.call(this);for(const u of n[r].getters)if(l=u(this,e,l),l===Fn)return;return l},enumerable:!0,configurable:!1}),n[r]}function St(t,e,n){return(r,i)=>{const o=Lr(r,i);o.setters.push(t),e&&o.getters.unshift(e),n&&Object.assign(o,n)}}function Nr(t){return(e,n)=>{Lr(e,n).observers.push(t)}}function $n(t){return t!==void 0&&He in t}function Tt(t){const e=new Set;for(;$n(t);)e.add(t?.[He]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(n=>Object.keys(n))}function Wo(t){return Tt(t).reduce((e,n)=>(e[String(n)]=t[n]??null,e),{})}function*wl(...t){for(const e of t)e!=null&&(e[Symbol.iterator]?yield*e:yield e)}function Ol(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function Sl(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*We(t){const e=[void 0,void 0];for(const n of Object.keys(t))e[0]=n,e[1]=t[n],yield e}function Tl(t){return Object.keys(t)}function Ir(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((n,r)=>Ir(n,e[r])):W(t)?W(e)?Vo(t,e,Ir):!1:t===e}function Vo(t,e,n){if(Object.is(t,e))return!0;for(const r of Object.keys(e))if(!(r in t))return!1;for(const r of Object.keys(t))if(!(r in e)||!n(t[r],e[r]))return!1;return!0}function _r(...t){const e={};for(const n of t){if(!X(n))continue;const r=$n(n)?Tt(n):Object.keys(n);for(const i of r)W(e[i])&&W(n[i])?e[i]=_r(e[i],n[i]):e[i]??(e[i]=n[i])}return e}function Rr(...t){const e={};for(const n of t){if(!X(n))continue;const r=$n(n)?Tt(n):Object.keys(n);for(const i of r)W(e[i])&&W(n[i])?e[i]=Rr(e[i],n[i]):i in e||(e[i]??(e[i]=n[i]))}return e}function Ml(t,...e){return e&&L(t)?t.map(n=>_r(n,...e)):t}function zo(t,e){const n={};for(const[r,i]of We(t))n[r]=e(i,r,t);return n}function Ve(t,e){const n={...t};for(const r of e)delete n[r];return n}function Fl(t,e){if(t==null)return;const n={};for(const r of e)Object.hasOwn(t,r)&&(n[r]=t[r]);return n}function Dl(t,e){if(t==null)return!0;for(const[n,r]of We(t))if(!e(n,r))return!1;return!0}function $l(t){const e={};if(t==null)return e;for(const[n,r]of t)e[n]=r;return e}function Cr(t,e){return(L(e)?e:e.split(".")).reduce((r,i)=>r[i],t)}var Pr=new Set(["__proto__","constructor","prototype"]);function Gr(t,e,n){const r=L(e)?e.slice():e.split("."),i=r.pop();if(r.some(s=>Pr.has(s)))return;const o=r.reduce((s,a)=>s[a],t);return o[i]=n,o[i]}function kl(t,e,n){if(n===void 0)return e;for(const r of t){const i=n[r];i!==void 0&&(e[r]=i)}return e}function Ll(t,e,n){const r=n??Object.keys(e);for(let i=0,o=r.length;i<o;i++){const s=r[i],a=e[s];t[s]!==a&&(t[s]=a)}return t}function Ko(t){if(t==null||typeof t!="object"||!W(t))return t;Object.freeze(t);for(const e of Object.getOwnPropertyNames(t)){const n=t[e];n!==null&&(typeof n=="object"||typeof n=="function")&&!Object.isFrozen(n)&&Ko(n)}return t}function qo(t,e){return W(t)&&e in t}function Nl(t,e){return qo(t,e)&&typeof t[e]=="string"}var kn={fills:ht(Ce(2),Y(V({color:I,stop:m},"")),Sr),fillMode:E("continuous","discrete")},Br={value:O(m),text:S,shape:G(E("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),N),placement:E("before","after","middle"),spacing:p,size:p,rotation:m,...B,..._,...U},Ur={value:O(m),text:S,shape:G(E("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),N),placement:E("inside","outside","middle"),spacing:p,size:p,rotation:m,label:{...je,spacing:p},...B,..._,...U},Yo={...Ve(Ue,["listeners"]),direction:E("horizontal","vertical"),cornerMode:E("container","item"),cornerRadius:p,thickness:p,segmentation:{enabled:x,spacing:p,interval:{values:Y(m),step:m,count:m}},bar:{enabled:x,thickness:p,thicknessRatio:k,...kn,...B,..._,...U},label:{...Tn,text:S,spacing:p,avoidCollisions:x,placement:E("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:Mn},Gt={...Ve(Sn,["listeners"]),...Yo,type:O(Ct("linear-gauge")),value:O(m),scale:{min:ht(m,gn("max")),max:ht(m,pn("min")),label:{enabled:x,formatter:N,rotation:m,spacing:p,minSpacing:p,placement:E("before","after"),avoidCollisions:x,format:Be,...mt},interval:{values:Y(m),step:m},...kn,...B,..._,...U},targets:Ot(Br,"target options array")};Gt.margin=M(m),Gt.defaultColorRange=M(Y(I)),Gt.defaultTarget=M({...Br,value:m,label:{...je,spacing:m}}),Gt.defaultScale=M(Gt.scale),Gt.scale.defaultFill=M(I);var Xo={...Ve(Ue,["listeners"]),outerRadius:p,innerRadius:p,outerRadiusRatio:k,innerRadiusRatio:k,startAngle:m,endAngle:m,spacing:p,cornerMode:E("container","item"),cornerRadius:p,scale:{min:ht(m,gn("max")),max:ht(m,pn("min")),label:{enabled:x,formatter:N,rotation:m,spacing:p,minSpacing:p,avoidCollisions:x,format:Be,...mt},interval:{values:Y(m),step:m},...kn,...B,..._,...U},segmentation:{enabled:x,spacing:p,interval:{values:Y(m),step:m,count:m}},bar:{enabled:x,...kn,...B,..._,...U},needle:{enabled:x,spacing:p,radiusRatio:k,...B,..._,...U},label:{text:S,spacing:p,...Tn},secondaryLabel:{text:S,...Tn},tooltip:Mn},Ln={...Ve(Sn,["listeners"]),...Xo,type:O(Ct("radial-gauge")),value:O(m),targets:Ot(Ur,"target options array")};Ln.defaultColorRange=M(Y(I)),Ln.defaultTarget=M({...Ur,value:m,label:{...je,spacing:m}}),Ln.scale.defaultFill=M(I);var Jo=(t=>(t[t.SMALLEST=8]="SMALLEST",t[t.SMALLER=10]="SMALLER",t[t.SMALL=12]="SMALL",t[t.MEDIUM=13]="MEDIUM",t[t.LARGE=14]="LARGE",t[t.LARGEST=17]="LARGEST",t))(Jo||{}),Bt=12,Il={SMALLEST:8/Bt,SMALLER:10/Bt,SMALL:12/Bt,MEDIUM:13/Bt,LARGE:14/Bt,LARGEST:17/Bt},Qo=(t=>(t.TOP="top",t.TOP_RIGHT="top-right",t.TOP_LEFT="top-left",t.RIGHT="right",t.RIGHT_TOP="right-top",t.RIGHT_BOTTOM="right-bottom",t.BOTTOM="bottom",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t.LEFT="left",t.LEFT_TOP="left-top",t.LEFT_BOTTOM="left-bottom",t))(Qo||{}),Zo=(t=>(t.CATEGORY="category",t.GROUPED_CATEGORY="grouped-category",t.ORDINAL_TIME="ordinal-time",t.UNIT_TIME="unit-time",t.TIME="time",t.NUMBER="number",t.LOG="log",t))(Zo||{}),ts=(t=>(t.ANGLE_CATEGORY="angle-category",t.ANGLE_NUMBER="angle-number",t.RADIUS_CATEGORY="radius-category",t.RADIUS_NUMBER="radius-number",t))(ts||{}),es=(t=>(t.CIRCLE="circle",t.POLYGON="polygon",t))(es||{}),Ut=(t,e,n)=>t*(1-n)+e*n,jr=t=>{const e=t<0?-1:1,n=Math.abs(t);return n<=.04045?t/12.92:e*((n+.055)/1.055)**2.4},Hr=t=>{const e=t<0?-1:1,n=Math.abs(t);return n>.0031308?e*(1.055*n**(1/2.4)-.055):12.92*t},ns=class D{constructor(e,n,r,i=1){this.r=tt(0,e||0,1),this.g=tt(0,n||0,1),this.b=tt(0,r||0,1),this.a=tt(0,i||0,1)}static validColorString(e){return e.includes("#")?!!D.parseHex(e):e.includes("rgb")?!!D.stringToRgba(e):D.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.includes("#"))return D.fromHexString(e);const n=D.nameToHex.get(e.toLowerCase());if(n)return D.fromHexString(n);if(e.includes("rgb"))return D.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static parseHex(e){e=e.replaceAll(" ","").slice(1);let n;switch(e.length){case 6:case 8:n=[];for(let r=0;r<e.length;r+=2)n.push(Number.parseInt(`${e[r]}${e[r+1]}`,16));break;case 3:case 4:n=e.split("").map(r=>Number.parseInt(r,16)).map(r=>r+r*16);break}if(n?.length>=3&&n.every(r=>r>=0))return n.length===3&&n.push(255),n}static fromHexString(e){const n=D.parseHex(e);if(n){const[r,i,o,s]=n;return new D(r/255,i/255,o/255,s/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let n=-1,r=-1;for(let a=0;a<e.length;a++){const c=e[a];if(n===-1&&c==="(")n=a;else if(c===")"){r=a;break}}if(n===-1||r===-1)return;const o=e.substring(n+1,r).split(","),s=[];for(let a=0;a<o.length;a++){const c=o[a];let l=Number.parseFloat(c);if(!Number.isFinite(l))return;c.includes("%")?(l=tt(0,l,100),l/=100):a===3?l=tt(0,l,1):(l=tt(0,l,255),l/=255),s.push(l)}return s}static fromRgbaString(e){const n=D.stringToRgba(e);if(n){if(n.length===3)return new D(n[0],n[1],n[2]);if(n.length===4)return new D(n[0],n[1],n[2],n[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new D(e[0],e[1],e[2],e[3]);if(e.length===3)return new D(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,n,r,i=1){const o=D.HSBtoRGB(e,n,r);return new D(o[0],o[1],o[2],i)}static fromHSL(e,n,r,i=1){const o=D.HSLtoRGB(e,n,r);return new D(o[0],o[1],o[2],i)}static fromOKLCH(e,n,r,i=1){const o=D.OKLCHtoRGB(e,n,r);return new D(o[0],o[1],o[2],i)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+D.padHex(Math.round(this.r*255).toString(16))+D.padHex(Math.round(this.g*255).toString(16))+D.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=D.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){const n=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],r=Math.pow(10,e);return this.a!==1?(n.push(Math.round(this.a*r)/r),`rgba(${n.join(", ")})`):`rgb(${n.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return D.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,n,r){const i=jr(e),o=jr(n),s=jr(r),a=Math.cbrt(.4122214708*i+.5363325363*o+.0514459929*s),c=Math.cbrt(.2119034982*i+.6806995451*o+.1073969566*s),l=Math.cbrt(.0883024619*i+.2817188376*o+.6299787005*s),u=.2104542553*a+.793617785*c-.0040720468*l,f=1.9779984951*a-2.428592205*c+.4505937099*l,h=.0259040371*a+.7827717662*c-.808675766*l,d=Math.atan2(h,f)*180/Math.PI,g=u,y=Math.hypot(f,h),b=d>=0?d:d+360;return[g,y,b]}static OKLCHtoRGB(e,n,r){const i=e,o=n*Math.cos(r*Math.PI/180),s=n*Math.sin(r*Math.PI/180),a=(i+.3963377774*o+.2158037573*s)**3,c=(i-.1055613458*o-.0638541728*s)**3,l=(i-.0894841775*o-1.291485548*s)**3,u=4.0767416621*a-3.3077115913*c+.2309699292*l,f=-1.2684380046*a+2.6097574011*c-.3413193965*l,h=-.0041960863*a-.7034186147*c+1.707614701*l,d=Hr(u),g=Hr(f),y=Hr(h);return[d,g,y]}static RGBtoHSL(e,n,r){const i=Math.min(e,n,r),o=Math.max(e,n,r),s=(o+i)/2;let a,c;if(o===i)a=0,c=0;else{const l=o-i;c=s>.5?l/(2-o-i):l/(o+i),o===e?a=(n-r)/l+(n<r?6:0):o===n?a=(r-e)/l+2:a=(e-n)/l+4,a*=360/6}return[a,c,s]}static HSLtoRGB(e,n,r){if(e=(e%360+360)%360,n===0)return[r,r,r];const i=r<.5?r*(1+n):r+n-r*n,o=2*r-i;function s(u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?o+(i-o)*6*u:u<1/2?i:u<2/3?o+(i-o)*(2/3-u)*6:o}const a=s(e/360+1/3),c=s(e/360),l=s(e/360-1/3);return[a,c,l]}static RGBtoHSB(e,n,r){const i=Math.min(e,n,r),o=Math.max(e,n,r),s=o===0?0:(o-i)/o;let a=0;if(i!==o){const c=o-i,l=(o-e)/c,u=(o-n)/c,f=(o-r)/c;e===o?a=f-u:n===o?a=2+l-f:a=4+u-l,a/=6,a<0&&(a=a+1)}return[a*360,s,o]}static HSBtoRGB(e,n,r){e=(e%360+360)%360/360;let i=0,o=0,s=0;if(n===0)i=o=s=r;else{const a=(e-Math.floor(e))*6,c=a-Math.floor(a),l=r*(1-n),u=r*(1-n*c),f=r*(1-n*(1-c));switch(Math.trunc(a)){case 0:i=r,o=f,s=l;break;case 1:i=u,o=r,s=l;break;case 2:i=l,o=r,s=f;break;case 3:i=l,o=u,s=r;break;case 4:i=f,o=l,s=r;break;case 5:i=r,o=l,s=u;break}}return[i,o,s]}static mix(e,n,r){return new D(Ut(e.r,n.r,r),Ut(e.g,n.g,r),Ut(e.b,n.b,r),Ut(e.a,n.a,r))}static lighten(e,n){const r=D.RGBtoOKLCH(e.r,e.g,e.b);return D.fromOKLCH(tt(0,r[0]+n,1),r[1],r[2])}static darken(e,n){const r=D.RGBtoOKLCH(e.r,e.g,e.b);return D.fromOKLCH(tt(0,r[0]-n,1),r[1],r[2])}static interpolate(e,n){const r=1/(e.length-1),i=e.map(o=>D.RGBtoOKLCH(o.r,o.g,o.b));return Array.from({length:n},(o,s)=>{const a=s/(n-1),c=e.length<=2?0:Math.min(Math.floor(a*(e.length-1)),e.length-2),l=(a-c*r)/r,u=i[c],f=i[c+1];return D.fromOKLCH(Ut(u[0],f[0],l),Ut(u[1],f[1],l),Ut(u[2],f[2],l))})}};ns.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 Nn=ns,_l={x:{position:"bottom",type:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"number","category"]}},y:{position:"left",type:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"category","number"]}}},Rl={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},{$palette:"fillFallback"},{$palette:"fill"}]},Cl={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},{$palette:"fillsFallback"},{$palette:"fills"}]},rs={$if:[{$isGradient:{$palette:"fill"}},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},Pl={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},[{$palette:"fillFallback"},{$palette:"fillFallback"}],{$palette:"range2"}]},Gl={type:"gradient",gradient:"linear",bounds:"item",colorStops:[{color:"black"}],rotation:0,reverse:!1,colorSpace:"rgb"},ze={type:"gradient",gradient:"linear",bounds:"item",colorStops:{$shallow:{$map:[{color:{$value:"$1"}},{$palette:"gradient"}]}},rotation:0,reverse:!1,colorSpace:"rgb"},Bl={...ze,colorStops:{$shallow:[{color:{$mix:[{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"black",.15]}},{color:{$mix:[{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"white",.15]}}]}},Ul={...ze,colorStops:{$map:[{color:{$value:"$1"}},{$path:["/0",void 0,{$palette:"gradients"}]}]}},jl=t=>({...ze,colorStops:{$shallow:{$if:[{$or:[{$isGradient:{$palette:`${t}.fill`}},{$isPattern:{$palette:`${t}.fill`}},{$isImage:{$palette:`${t}.fill`}}]},{$path:["/colorStops",void 0,{$palette:`${t}.fill`}]},[{color:{$mix:[{$palette:`${t}.fill`},"black",.15]}},{color:{$mix:[{$palette:`${t}.fill`},"white",.15]}}]]}}}),In={type:"gradient",gradient:"radial",bounds:"item",colorStops:{$shallow:{$map:[{color:{$value:"$1"}},{$palette:"gradient"}]}},rotation:0,reverse:!1,colorSpace:"rgb"},Hl={...In,reverse:!0},Wl={...In,bounds:"series"},Vl={...In,bounds:"series",reverse:!0},zl={type:"gradient",gradient:"conic",bounds:"series",colorStops:{$map:[{color:{$value:"$1"}},{$palette:"gradient"}]},rotation:0,reverse:!1,colorSpace:"rgb"},Ke={type:"pattern",pattern:"forward-slanted-lines",width:{$isUserOption:["./height",{$path:"./height"},10]},height:{$isUserOption:["./width",{$path:"./width"},10]},padding:2,fill:{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/fill",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fillOpacity:1,stroke:rs,strokeOpacity:1,strokeWidth:{$switch:[{$path:"./pattern"},0,[["backward-slanted-lines","forward-slanted-lines","horizontal-lines","vertical-lines"],4]]},backgroundFill:"none",backgroundFillOpacity:1,rotation:0,scale:1},Kl={...Ke,stroke:{$if:[{$isGradient:{$palette:"fill"}},{$path:["/0",void 0,{$palette:"fillsFallback"}]},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/stroke",{$path:["/0",void 0,{$palette:"fillsFallback"}]},{$path:["/0",void 0,{$palette:"fills"}]}]},{$path:["/0",void 0,{$palette:"fills"}]}]}]},fill:{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$path:["/0",void 0,{$palette:"fillsFallback"}]},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/fill",{$path:["/0",void 0,{$palette:"fillsFallback"}]},{$path:["/0",void 0,{$palette:"fills"}]}]},{$path:["/0",void 0,{$palette:"fills"}]}]}]}},ql={type:"pattern",pattern:"forward-slanted-lines",width:8,height:8,padding:1,fill:"black",fillOpacity:1,backgroundFill:"white",backgroundFillOpacity:1,stroke:"black",strokeOpacity:1,strokeWidth:1,rotation:0,scale:1},Yl={...Ke,fill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]}},Xl=t=>({...Ke,stroke:{$if:[{$isGradient:{$palette:`${t}.fill`}},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:`${t}.fill`}},{$path:["/stroke",{$palette:"fillFallback"},{$palette:`${t}.fill`}]},{$palette:`${t}.fill`}]}]}}),is={type:"image",backgroundFill:{$palette:"fillFallback"},backgroundFillOpacity:1,repeat:"no-repeat",fit:"contain",rotation:0},Jl={type:"image",backgroundFill:"black",backgroundFillOpacity:1,rotation:0,repeat:"no-repeat",fit:"contain",width:8,height:8};function Ql(t){return zo(t,e=>{const n=Nn.fromString(e);return[Nn.darken(n,.15).toString(),e,Nn.lighten(n,.15).toString()]})}var Zl={padding:8,cornerRadius:4,fill:{$if:[{$and:[{$eq:[{$path:"./fill/type"},"image"]},{$isUserOption:["./fill/backgroundFill",!1,!0]}]},{backgroundFill:"transparent"},void 0]},border:{enabled:{$isUserOption:["../border",!0,!1]},strokeWidth:1,stroke:{$foregroundOpacity:.08}}},tu={enabled:!0,unhighlightedItem:{opacity:.6},unhighlightedSeries:{opacity:.2}},eu={enabled:!0,unhighlightedSeries:{opacity:.2}},nu={enabled:!0,unhighlightedItem:{opacity:.2},unhighlightedSeries:{opacity:.2}},ru={enabled:!0,unhighlightedItem:{opacity:.2}},iu={border:{enabled:!1,stroke:{$foregroundBackgroundMix:.25},strokeOpacity:1,strokeWidth:1},cornerRadius:4,fillOpacity:1,padding:{$if:[{$eq:[{$path:"./border/enabled"},!0]},5,{$isUserOption:["./fill",5,0]}]}},ou={enabled:!1,key:"x",segments:{$apply:{fill:{$applySwitch:[{$path:"type"},{$path:"../../../fill"},["gradient",ze],["image",is],["pattern",Ke]]},stroke:{$path:"../../../stroke"},fillOpacity:{$path:"../../../fillOpacity"},strokeWidth:{$isUserOption:["./stroke",{$isUserOption:["../../../strokeWidth",{$path:"../../../strokeWidth"},{$if:[{$greaterThan:[{$path:"../../../strokeWidth"},0]},{$path:"../../../strokeWidth"},2]}]},{$path:"../../../strokeWidth"}]},strokeOpacity:{$path:"../../../strokeOpacity"},lineDash:{$path:"../../../lineDash"},lineDashOffset:{$path:"../../../lineDashOffset"}}}},su=class ki{constructor(e){this.version=e.split("-")[0]}save(...e){const n={version:this.version};for(const r of Object.values(e))n[r.mementoOriginatorKey]=this.encode(r,r.createMemento());return n}restore(e,...n){if(typeof e!="object"){Z(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`);return}if(e==null){Z("Could not restore data of type [null], expecting an object, ignoring.");return}if(!("version"in e)||typeof e.version!="string"){Z("Could not restore data, missing [version] string in object, ignoring.");return}for(const r of n){const i=this.decode(r,e[r.mementoOriginatorKey]),o=[];if(!r.guardMemento(i,o)){const s=o.length>0?`
${o.join(`
`)}
`:"";Z(`Could not restore [${r.mementoOriginatorKey}] data, value was invalid, ignoring.${s}`,i);return}r.restoreMemento(this.version,e.version,i)}}encode(e,n){try{return JSON.parse(JSON.stringify(n,ki.encodeTypes))}catch(r){throw new Error(`Failed to encode [${e.mementoOriginatorKey}] value [${r}].`,{cause:r})}}decode(e,n){if(n==null)return n;try{return JSON.parse(JSON.stringify(n),ki.decodeTypes)}catch(r){throw new Error(`Failed to decode [${e.mementoOriginatorKey}] value [${r}].`,{cause:r})}}static encodeTypes(e,n){return ie(this[e])?{__type:"date",value:this[e].toISOString()}:n}static decodeTypes(e,n){return X(this[e])&&"__type"in this[e]&&this[e].__type==="date"?new Date(this[e].value):n}},os=(t=>(t.X="x",t.Y="y",t.Angle="angle",t.Radius="radius",t))(os||{}),ss=(t=>(t[t.FULL=0]="FULL",t[t.UPDATE_DATA=1]="UPDATE_DATA",t[t.PROCESS_DATA=2]="PROCESS_DATA",t[t.PROCESS_DOMAIN=3]="PROCESS_DOMAIN",t[t.PROCESS_RANGE=4]="PROCESS_RANGE",t[t.PERFORM_LAYOUT=5]="PERFORM_LAYOUT",t[t.PRE_SERIES_UPDATE=6]="PRE_SERIES_UPDATE",t[t.SERIES_UPDATE=7]="SERIES_UPDATE",t[t.PRE_SCENE_RENDER=8]="PRE_SCENE_RENDER",t[t.SCENE_RENDER=9]="SCENE_RENDER",t[t.NONE=10]="NONE",t))(ss||{}),as=(t=>(t[t.CHART_BACKGROUND=0]="CHART_BACKGROUND",t[t.AXIS_BAND_HIGHLIGHT=1]="AXIS_BAND_HIGHLIGHT",t[t.AXIS_GRID=2]="AXIS_GRID",t[t.AXIS=3]="AXIS",t[t.SERIES_AREA_CONTAINER=4]="SERIES_AREA_CONTAINER",t[t.ZOOM_SELECTION=5]="ZOOM_SELECTION",t[t.SERIES_CROSSLINE_RANGE=6]="SERIES_CROSSLINE_RANGE",t[t.SERIES_LAYER=7]="SERIES_LAYER",t[t.AXIS_FOREGROUND=8]="AXIS_FOREGROUND",t[t.SERIES_CROSSHAIR=9]="SERIES_CROSSHAIR",t[t.SERIES_CROSSLINE_LINE=10]="SERIES_CROSSLINE_LINE",t[t.SERIES_ANNOTATION=11]="SERIES_ANNOTATION",t[t.CHART_ANNOTATION=12]="CHART_ANNOTATION",t[t.CHART_ANNOTATION_FOCUSED=13]="CHART_ANNOTATION_FOCUSED",t[t.STATUS_BAR=14]="STATUS_BAR",t[t.SERIES_LABEL=15]="SERIES_LABEL",t[t.LEGEND=16]="LEGEND",t[t.NAVIGATOR=17]="NAVIGATOR",t[t.FOREGROUND=18]="FOREGROUND",t))(as||{}),cs=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.ANY_CONTENT=1]="ANY_CONTENT",t))(cs||{}),ls=(t=>(t[t.FOREGROUND=0]="FOREGROUND",t[t.HIGHLIGHT=1]="HIGHLIGHT",t[t.LABEL=2]="LABEL",t))(ls||{}),us=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.FOREGROUND=1]="FOREGROUND",t[t.HIGHLIGHT=2]="HIGHLIGHT",t[t.LABEL=3]="LABEL",t))(us||{});function au(t){const{placement:e="bottom",floating:n=!1,xOffset:r=0,yOffset:i=0}=typeof t=="string"?{placement:t,floating:!1}:t;return{placement:e,floating:n,xOffset:r,yOffset:i}}var fe=class{handleUnknownProperties(t,e){}set(t){const{className:e=this.constructor.name}=this.constructor;if(t==null)return this.clear(),this;if(typeof t!="object")return pt(`unable to set ${e} - expecting a properties object`),this;const n=new Set(Object.keys(t));for(const r of Tt(this))if(n.has(r)){const i=t[r],o=this;if(he(o[r]))if(o[r]instanceof Wr){const s=o[r].reset(i);s==null?pt(`unable to set [${String(r)}] - expecting a properties array`):o[r]=s}else o[r].set(i);else W(i)?o[r]=Rr(i,o[r]??{}):o[r]=i;n.delete(r)}this.handleUnknownProperties(n,t);for(const r of n)pt(`unable to set [${String(r)}] in ${e} - property is unknown`);return this}clear(){for(const t of Tt(this)){const e=this[t];he(e)?e.clear():this[t]=void 0}return this}toJson(){return Tt(this).reduce((t,e)=>{const n=this[e];return t[String(e)]=he(n)?n.toJson():n,t},{})}},Wr=class Fa extends Array{constructor(e,...n){super(n.length);const i=(o=>!!o?.prototype?.constructor?.name)(e)?o=>new e().set(o):e;Object.defineProperty(this,"itemFactory",{value:i,enumerable:!1,configurable:!1}),this.set(n)}set(e){if(L(e)){this.length=e.length;for(let n=0;n<e.length;n++)this[n]=this.itemFactory(e[n])}return this}reset(e){if(Array.isArray(e))return new Fa(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}};function he(t){return t instanceof fe||t instanceof Wr}var _n=class extends fe{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};ut([rt],_n.prototype,"type",2),ut([rt],_n.prototype,"tension",2),ut([rt],_n.prototype,"position",2);function cu(t,e){const[n,r]=Rn(e);return tt(n,t,r)}function Rn(t){if(t.length===0)return[];const e=[1/0,-1/0];for(const n of t)n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n);return e}function lu(t){const[e,n]=Rn(t);return n-e}function Vr(t){return t=Math.trunc(t),t<=0?1:t===1?2:1<<32-Math.clz32(t-1)}function uu(t){return t=Math.trunc(t),t<=0?0:t===1?1:1<<31-Math.clz32(t)}var Et=0,Mt=1,jt=2,Ht=3,Wt=4,zr=1e3,fu=10,Cn=64,Pn=4294967295,hu=3,du=20,Kr=100;function qr(t,e,n,r,i,o,s,a){let c=0;for(;c<Kr&&t[r]==null&&r<i;)r+=1,c+=1;for(;c<Kr&&t[i]==null&&i>r;)i-=1,c+=1;if(c>=Kr||r>=i)return o;const l=Number.isFinite(e)?Bn(t[i],e,n,a)-Bn(t[r],e,n,a):Gn(i,t.length)-Gn(r,t.length);if(l===0||!Number.isFinite(l))return o;const u=Math.abs(l)/(i-r);let f;if(s<hu?f=!0:s>du?f=!1:f=u<=o,o=Math.min(o,u),!f)return o;const h=Math.floor((r+i)/2),d=qr(t,e,n,r,h,o,s+1,a),g=qr(t,e,n,h+1,i,o,s+1,a);return Math.min(d,g,o)}function gu(t,e,n,r){return qr(t,e,n,0,t.length-1,1/(t.length-1),0,r)}function Yr(t,e,n,r){if(Number.isFinite(e)){const i=r?.smallestKeyInterval,o=r?.xNeedsValueOf??!0,s=i==null?gu(t,e,n,o):i/(n-e);return Vr(Math.trunc(1/s))>>3}else{let i=Math.ceil(Math.log2(t.length))-1;return i=Math.min(Math.max(i,0),24),Math.trunc(2**i)}}function pu(t,e){const{domain:n,sortMetadata:r}=e;switch(t){case"category":return[Number.NaN,Number.NaN];case"number":case"time":case"ordinal-time":case"unit-time":{if(n.length===0)return[1/0,-1/0];if(r?.sortOrder===1)return[Number(n[0]),Number(n.at(-1))];if(r?.sortOrder===-1)return[Number(n.at(-1)),Number(n[0])];let i=1/0,o=-1/0;for(const s of n){const a=Number(s);i=Math.min(i,a),o=Math.max(o,a)}return[i,o]}case"color":case"log":case"mercator":return[0,0]}}function Gn(t,e){return t/e}function Bn(t,e,n,r){return r?(t.valueOf()-e)/(n-e):(t-e)/(n-e)}function fs(t,e){return Math.trunc(Math.min(Math.floor(t*e),e-1)*Wt)}function yu(t,e,n,r,i,{xNeedsValueOf:o=!0,xValuesLength:s}={}){const a=t[i];if(a==null)return-1;const c=s??t.length,l=Number.isFinite(e)?Bn(a,e,n,o):Gn(i,c);return fs(l,r)}function mu(t,e,n,r){for(const i of r)if(n===t[e+i])return!0;return!1}function Xr(t,e,n,r,i,o,{positive:s,split:a=!1,xNeedsValueOf:c=!0,yNeedsValueOf:l=!0,reuseIndexData:u,reuseValueData:f,reuseNegativeIndexData:h,reuseNegativeValueData:d}={}){const g=Number.NaN,y=o*Wt,b=u?.length===y?u:new Uint32Array(y),v=f?.length===y?f:new Float64Array(y);let A,w;a&&(h?.length===y?A=h:A=new Uint32Array(y),d?.length===y?w=d:w=new Float64Array(y));const $=Number.isFinite(r)&&Number.isFinite(i),K=t.length;$&&(v.fill(g),b.fill(Pn),a&&(w.fill(g),A.fill(Pn)));const C=$?o/(i-r):o*(1/K);let T=-1,j=-1,At=g,Lt=-1,wt=g,Nt=-1,ot=g,Ee=-1,qt=g,H=-1,Yt=-1,Xt=g,Ae=-1,Jt=g,we=-1,Qt=g,Oe=-1,Zt=g;const Da=t.length,$a=e===n;for(let P=0;P<Da;P++){const or=t[P];if(or==null)continue;const on=e[P],sr=$a?on:n[P];let J,st;l?(J=on==null?g:on.valueOf(),st=sr==null?g:sr.valueOf()):(J=on??g,st=sr??g);let Li=!0;if(a)Li=J>=0;else if(s!=null&&J>=0!==s)continue;let q;$?c?q=(or.valueOf()-r)*C:q=(or-r)*C:q=P*C;const Ni=Math.floor(q),sn=(Ni<o?Ni:o-1)<<2;if(Li){sn!==T&&(T!==-1&&(b[T]=j,b[T+1]=Lt,b[T+2]=Nt,b[T+3]=Ee,v[T]=At,v[T+1]=wt,v[T+2]=ot,v[T+3]=qt),T=sn,j=-1,At=g,Lt=-1,wt=g,Nt=-1,ot=g,Ee=-1,qt=g);const Se=st===st,Te=J===J;j===-1?(j=P,At=q,Lt=P,wt=q,Se&&(Nt=P,ot=st),Te&&(Ee=P,qt=J)):(q<At&&(j=P,At=q),q>wt&&(Lt=P,wt=q),Se&&st<ot&&(Nt=P,ot=st),Te&&J>qt&&(Ee=P,qt=J))}else{sn!==H&&(H!==-1&&(A[H]=Yt,A[H+1]=Ae,A[H+2]=we,A[H+3]=Oe,w[H]=Xt,w[H+1]=Jt,w[H+2]=Qt,w[H+3]=Zt),H=sn,Yt=-1,Xt=g,Ae=-1,Jt=g,we=-1,Qt=g,Oe=-1,Zt=g);const Se=st===st,Te=J===J;Yt===-1?(Yt=P,Xt=q,Ae=P,Jt=q,Se&&(we=P,Qt=st),Te&&(Oe=P,Zt=J)):(q<Xt&&(Yt=P,Xt=q),q>Jt&&(Ae=P,Jt=q),Se&&st<Qt&&(we=P,Qt=st),Te&&J>Zt&&(Oe=P,Zt=J))}}return T!==-1&&(b[T]=j,b[T+1]=Lt,b[T+2]=Nt,b[T+3]=Ee,v[T]=At,v[T+1]=wt,v[T+2]=ot,v[T+3]=qt),a&&H!==-1&&(A[H]=Yt,A[H+1]=Ae,A[H+2]=we,A[H+3]=Oe,w[H]=Xt,w[H+1]=Jt,w[H+2]=Qt,w[H+3]=Zt),{indexData:b,valueData:v,negativeIndexData:A,negativeValueData:w}}function Jr(t,e,n,{inPlace:r=!1,midpointData:i,reuseIndexData:o,reuseValueData:s}={}){const a=Math.trunc(n/2),c=a*Wt;let l;r?l=t:o?.length===c?l=o:l=new Uint32Array(c);let u;r?u=e:s?.length===c?u=s:u=new Float64Array(c);const f=i??new Uint32Array(a);for(let h=0;h<a;h+=1){const d=Math.trunc(h*Wt),g=Math.trunc(d*2),y=Math.trunc(g+Wt),b=t[y+Et]===Pn,v=b||e[g+Et]<e[y+Et]?g:y,A=t[v+Et];l[d+Et]=A,u[d+Et]=e[v+Et];const w=b||e[g+Mt]>e[y+Mt]?g:y,$=t[w+Mt];l[d+Mt]=$,u[d+Mt]=e[w+Mt],f[h]=A+$>>1;const K=b||e[g+jt]<e[y+jt]?g:y;l[d+jt]=t[K+jt],u[d+jt]=e[K+jt];const C=b||e[g+Ht]>e[y+Ht]?g:y;l[d+Ht]=t[C+Ht],u[d+Ht]=e[C+Ht]}return{maxRange:a,indexData:l,valueData:u,midpointData:f}}function Un(t,e,n,r=Et,i=Mt,o=-1){const s=n?.length===t?n:new Uint32Array(t);for(let a=0,c=0;a<t;a+=1,c+=Wt){const l=e[c+r],u=e[c+i];s[a]=l===o?o:l+u>>1}return s}function bu(t,{collectLevel:e,shouldContinue:n,minRange:r=Cn,compactInPlace:i=!1}){let o=t,s=e(o);const a=[s];for(;o.maxRange>r&&n(s,o);){const c=Jr(o.indexData,o.valueData,o.maxRange,{inPlace:i});o={maxRange:c.maxRange,indexData:c.indexData,valueData:c.valueData,midpointData:c.midpointData},s=e(o),a.push(s)}return a.reverse(),a}function hs(t,e,n,r,i){if(e.length<zr)return;const[o,s]=t,{smallestKeyInterval:a,xNeedsValueOf:c,yNeedsValueOf:l,existingFilters:u}=i;let f=Yr(e,o,s,{smallestKeyInterval:a,xNeedsValueOf:c});const h=u?.find(v=>v.maxRange===f);let{indexData:d,valueData:g}=Xr(e,n,r,o,s,f,{xNeedsValueOf:c,yNeedsValueOf:l,reuseIndexData:h?.indexData,reuseValueData:h?.valueData}),y=Un(f,d,h?.midpointIndices);const b=[{maxRange:f,indexData:d,valueData:g,midpointIndices:y}];for(;f>Cn;){const v=f,A=Math.trunc(v/2),w=u?.find(K=>K.maxRange===A),$=Jr(d,g,v,{reuseIndexData:w?.indexData,reuseValueData:w?.valueData});f=$.maxRange,d=$.indexData,g=$.valueData,y=$.midpointData??Un(f,d,w?.midpointIndices),b.push({maxRange:f,indexData:d,valueData:g,midpointIndices:y})}return b.reverse(),b}function vu(t,e,n,r,i){if(e.length<zr)return;const[o,s]=t,{smallestKeyInterval:a,targetRange:c,xNeedsValueOf:l,yNeedsValueOf:u,existingFilters:f}=i,h=Yr(e,o,s,{smallestKeyInterval:a,xNeedsValueOf:l}),d=Math.min(h,Vr(Math.max(c,Cn))),g=f?.find($=>$.maxRange===d),{indexData:y,valueData:b}=Xr(e,n,r,o,s,d,{xNeedsValueOf:l,yNeedsValueOf:u,reuseIndexData:g?.indexData,reuseValueData:g?.valueData}),v=Un(d,y,g?.midpointIndices),A={maxRange:d,indexData:y,valueData:b,midpointIndices:v};function w(){return hs([o,s],e,n,r,{smallestKeyInterval:a,xNeedsValueOf:l,yNeedsValueOf:u,existingFilters:f})?.filter(K=>K.maxRange!==d)??[]}return{immediate:[A],computeRemaining:w}}var xu=Symbol("is-dark-theme"),Eu=Symbol("default-shadow-colour"),Au=Symbol("default-caption-layout-style"),wu=Symbol("default-caption-alignment"),Ou=Symbol("palette-up-stroke"),Su=Symbol("palette-down-stroke"),Tu=Symbol("palette-up-fill"),Mu=Symbol("palette-down-fill"),Fu=Symbol("palette-neutral-stroke"),Du=Symbol("palette-neutral-fill"),$u=Symbol("palette-alt-up-stroke"),ku=Symbol("palette-alt-down-stroke"),Lu=Symbol("palette-alt-up-fill"),Nu=Symbol("palette-alt-down-fill"),Iu=Symbol("palette-gray-fill"),_u=Symbol("palette-gray-stroke"),Ru=Symbol("default-polar-series-stroke"),Cu=Symbol("default-sparkline-crosshair-stroke"),Pu=Symbol("default-financial-charts-annotation-stroke"),Gu=Symbol("default-hierarchy-strokes"),Bu=Symbol("default-text-annotation-color"),Uu=Symbol("default-financial-charts-annotation-background-fill"),ju=Symbol("default-annotation-handle-fill"),Hu=Symbol("default-annotation-statistics-fill"),Wu=Symbol("default-annotation-statistics-stroke"),Vu=Symbol("default-annotation-statistics-color"),zu=Symbol("default-annotation-statistics-divider-stroke"),Ku=Symbol("default-annotation-statistics-fill"),qu=Symbol("default-annotation-statistics-stroke"),Yu=Symbol("default-textbox-fill"),Xu=Symbol("default-textbox-stroke"),Ju=Symbol("default-textbox-color"),Qu=Symbol("default-toolbar-position");function Zu(t,e){return"context"in t}function ds(t,e){return t!=null&&Zu(t,e)&&e!=null&&typeof e=="object"&&e.context===void 0?(e.context=t.context,!0):!1}function gs(t,e,n){if(Array.isArray(t)){for(const r of t)if(ds(r,n))break}else ds(t,n);return e(n)}var tf=class{constructor(){this.cache=new WeakMap}call(t,e,n){let r,i=this.cache.get(e);try{r=JSON.stringify(n)}catch{return this.invoke(t,e,i,void 0,n)}return i==null&&(i=new Map,this.cache.set(e,i)),i.has(r)?i.get(r):this.invoke(t,e,i,r,n)}invoke(t,e,n,r,i){try{const o=gs(t,e,i);return n&&r!=null&&n.set(r,o),o}catch(o){Z("User callback errored, ignoring",o);return}}invalidateCache(){this.cache=new WeakMap}};function ef(t,e){if(!t)return;const{x:n,y:r,width:i,height:o}=af(e);jn(t.style,"width",i),jn(t.style,"height",o),jn(t.style,"left",n),jn(t.style,"top",r)}function nf(t){const e=Number.parseFloat(t.style.width),n=Number.parseFloat(t.style.height),r=Number.parseFloat(t.style.left),i=Number.parseFloat(t.style.top),o=Number.isFinite(e)?e:t.offsetWidth,s=Number.isFinite(n)?n:t.offsetHeight,a=Number.isFinite(r)?r:t.offsetLeft,c=Number.isFinite(i)?i:t.offsetTop;return{x:a,y:c,width:o,height:s}}function rf(t){if(t.focus({preventScroll:!0}),t.lastChild?.textContent==null)return;const e=Me().createRange();e.setStart(t.lastChild,t.lastChild.textContent.length),e.setEnd(t.lastChild,t.lastChild.textContent.length);const n=It().getSelection();n?.removeAllRanges(),n?.addRange(e)}function of(){const t=It("navigator");if("scheduling"in t){const e=t.scheduling;if("isInputPending"in e)return e.isInputPending({includeContinuous:!0})}return!1}function sf(t){return`ag-charts-icon ag-charts-icon-${t}`}function af(t){let{x:e,y:n,width:r,height:i}=t;return(r==null||r>0)&&(i==null||i>0)?t:(e!=null&&r!=null&&r<0&&(r=-r,e=e-r),n!=null&&i!=null&&i<0&&(i=-i,n=n-i),{x:e,y:n,width:r,height:i})}function jn(t,e,n){n==null?t.removeProperty(e):t.setProperty(e,`${n}px`)}function cf(t,e,n=1/0){const r=e,i=n,o=t%180*(Math.PI/180),s=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));if(s===0)return{width:r,height:i};if(a===0)return{width:i,height:r};if(!Number.isFinite(i)){const l=a/s,u=r/(a+l*s);return{width:u,height:l*u}}const c=a*a-s*s;if(c===0){const l=Math.min(r,i)/Math.SQRT2;return{width:l,height:l}}return{width:Math.abs((r*a-i*s)/c),height:Math.abs((i*a-r*s)/c)}}function lf(t,e,n=1/0){const r=e,i=n,o=t%180*(Math.PI/180),s=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));return s===0?{width:r,height:i}:a===0?{width:i,height:r}:{width:r*a+i*s,height:r*s+i*a}}function uf(t,e,n,r=0,i=0){const o=Math.cos(n),s=Math.sin(n),a=t-r,c=e-i;return{x:r+a*o-c*s,y:i+a*s+c*o}}var lt=Math.PI*2,qe=Math.PI/2;function Ft(t){return t%=lt,t+=lt,t%=lt,t}function ff(t){return t%=lt,t+=lt,t!==lt&&(t%=lt),t}function hf(t){return t%=lt,t<-Math.PI?t+=lt:t>=Math.PI&&(t-=lt),t}function ps(t,e,n){const r=Ft(t),i=Ft(e),o=Ft(n);return i<o?i<=r&&r<=o:i>o?i<=r||r<=o:e!==n}function ys(t){return t/180*Math.PI}function df(t){return t/Math.PI*180}function gf(t,e){return t=Ft(t),e=Ft(e),e-t+(t>e?lt:0)}function ms(t){const e=Ft(t);return e<=qe?e/qe:e<=Math.PI?(Math.PI-e)/qe:e<=1.5*Math.PI?(e-Math.PI)/qe:(lt-e)/qe}function pf(t,e,n){const r=ms(n);return t*r+e*Math.abs(1-r)}function yf(t){return t?Ft(ys(t)):0}var mf=class{constructor(){this.queue=[]}waitForCompletion(t=50){const e=this.queue;function n(r){function i(){clearTimeout(s),r(!0)}function o(){const a=e.indexOf(i);a<0||(e.splice(a,1),r(!1))}const s=setTimeout(o,t);e.push(i)}return new Promise(n)}notify(){for(const t of this.queue.splice(0))t()}};function bf(t=0){function e(n){setTimeout(n,t)}return new Promise(e)}async function vf(t,e,n=`Timeout after ${e}ms`){let r;const i=new Promise((o,s)=>{r=setTimeout(()=>s(new Error(n)),e)});try{return await Promise.race([t,i])}finally{clearTimeout(r)}}function Dt(t){return t==="true"}function xf(t){return Number(t)}function it(t){return t}var Ef={role:it,"aria-checked":Dt,"aria-controls":it,"aria-describedby":it,"aria-disabled":Dt,"aria-expanded":Dt,"aria-haspopup":it,"aria-hidden":Dt,"aria-label":it,"aria-labelledby":it,"aria-live":it,"aria-orientation":it,"aria-selected":Dt,"data-focus-override":Dt,"data-focus-visible-override":Dt,"data-preventdefault":Dt,class:it,for:it,id:it,tabindex:xf,title:it,placeholder:it};function de(t,e,n){n==null||n===""||n===""?t?.removeAttribute(e):t?.setAttribute(e,n.toString())}function Ye(t,e){if(e!=null)for(const[n,r]of We(e))n!=="class"&&de(t,n,r)}function bs(t,e,n){if(!Ui(t))return;const r=t.getAttribute(e);return r===null?n:Ef[e]?.(r)??void 0}function vs(t,e,n){t!=null&&(n==null?t.style.removeProperty(e):t.style.setProperty(e,n.toString()))}function Af(t,e){for(const[n,r]of We(e))vs(t,n,r)}function wf(t,e){const n=Array.isArray(t)?t:t.split(".");if(n.length===1){const[r]=n;return St((i,o,s)=>i[r]=s,i=>i[r],e)}return St((r,i,o)=>Gr(r,n,o),r=>Cr(r,n),e)}function Of(t){return St((e,n,r)=>e[t]=r)}function Qr(t,e){return St((n,r,i)=>n[t][e??r]=i)}function Zr(t){const{newValue:e,oldValue:n,changeValue:r}=t;return St((i,o,s,a)=>(s!==a&&(a!==void 0&&n?.call(i,a),s!==void 0&&e?.call(i,s),r?.call(i,s,a)),s))}function Sf(t){return Nr(t)}var Xe=class extends fe{constructor(t){super(),this.node=t,this.enabled=!1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=1}};ut([Zr({changeValue(t){t?this.node.strokeWidth=this.strokeWidth:this.node.strokeWidth=0}}),rt],Xe.prototype,"enabled",2),ut([Qr("node","stroke"),rt],Xe.prototype,"stroke",2),ut([Qr("node","strokeOpacity"),rt],Xe.prototype,"strokeOpacity",2),ut([Zr({changeValue(t){this.enabled?this.node.strokeWidth=t:this.node.strokeWidth=0}}),rt],Xe.prototype,"strokeWidth",2);function xs(t,e,n,r,i){return e<t.x+t.width&&e+r>t.x&&n<t.y+t.height&&n+i>t.y}function Es(t,e,n,r=0,i=0){return e>=t.x&&e+r<=t.x+t.width&&n>=t.y&&n+i<=t.y+t.height}function Tf(t){return t==null||t.height===0||t.width===0||Number.isNaN(t.height)||Number.isNaN(t.width)}function Mf(t,e){return t===e?!0:t==null||e==null?!1:t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ff(t,e,n){if(t>e)return;let r;for(;e>=t;){const i=Math.floor((e+t)/2);n(i)?(r=i,t=i+1):e=i-1}return r}function Df(t,e,n){if(t>e)return;let r;for(;e>=t;){const i=Math.floor((e+t)/2);n(i)?(r=i,e=i-1):t=i+1}return r}function $f(t,e,n){if(t>e)return;let r;for(;e>=t;){const i=Math.floor((e+t)/2),o=n(i);o==null?e=i-1:(r=o,t=i+1)}return r}function kf(t,e,n){if(t>e)return;let r;for(;e>=t;){const i=Math.floor((e+t)/2),o=n(i);o==null?t=i+1:(r=o,e=i-1)}return r}function As(t=0,e=0){const n=Pi();return new n(t,e).getContext("2d")}var Lf=800,Nf=600,If={quality:1};function _f(t){const e=class extends t{constructor(...r){super(...r),this.gpu=!1}toBuffer(r,i){return super.toBuffer(r,{...i,msaa:!1})}transferToImageBitmap(){const{width:r,height:i}=this,o=new e(Math.max(1,r),Math.max(1,i));return r>0&&i>0&&o.getContext("2d").drawCanvas(this,0,0,r,i),Object.defineProperty(o,"close",{value:()=>{}}),o}};return e}var ws=!1;function Rf(t,e){if(ws)return;ws=!0;const n=t.prototype.createConicGradient;Object.defineProperty(t.prototype,"createConicGradient",{value:function(r,i,o){return n.call(this,r+Math.PI/2,i,o)},writable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fillText",{value:function(r,i,o){let s=this.outlineText(r);s=s.transform(new e([1,0,0,1,i,o])),this.fill(s)},writable:!0,configurable:!0})}var Cf=class{constructor(t){this.getter=t}get(){return this.result??(this.result=this.getter()),this.result}clear(){this.result=void 0}},Pf=class{constructor(t){this.getter=t}get(){let t=this.result?.deref();return t||(t=this.getter(),this.result=new WeakRef(t),t)}clear(){this.result=void 0}};function Os(t,e){return t.valueOf()-e.valueOf()}function Gf(t){let e=Number.NaN;const n=[];for(const r of t){const i=r.valueOf();e!==i&&n.push(r),e=i}return n}function Bf(t){const e=t.slice().sort(Os);return Ss(e)==null?Gf(e):e}function Ss(t){if(t.length===0)return 1;const e=Number(t.at(-1))>Number(t[0])?1:-1;let n=-1/0*e;for(const r of t){const i=r.valueOf();if(Math.sign(i-n)!==e)return;n=i}return e}function ti(){return(t,e)=>{const n=[`Property [${t}] is deprecated.`,e].filter(Boolean).join(" ");Z(n)}}function Uf(t,e){const n=ti(),r=e?.default;return St((i,o,s)=>(s!==r&&n(o.toString(),t),s))}function jf(t,e){const n=ti();return St((r,i,o)=>(o!==r[t]&&(n(i.toString(),`Use [${t}] instead.`),Gr(r,t,e?e(o):o)),Fn),(r,i)=>(n(i.toString(),`Use [${t}] instead.`),Cr(r,t)))}function Hf(t,e){const n=Math.max(t.length,e.length),r=new Set,i=new Set;for(let o=0;o<n;o++){const s=t[o],a=e[o];s!==a&&(i.has(a)?i.delete(a):a&&r.add(a),r.has(s)?r.delete(s):s&&i.add(s))}return{changed:r.size>0||i.size>0,added:r,removed:i}}function Je(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function Wf(t,e,n,r,i,o,s){if(n===i&&r===o)return Math.min(s,Je(t,e,n,r));const a=i-n,c=o-r,l=Math.max(0,Math.min(1,((t-n)*a+(e-r)*c)/(a*a+c*c))),u=n+l*a,f=r+l*c;return Math.min(s,Je(t,e,u,f))}function Vf(t,e,n,r,i,o,s,a,c){a&&([s,o]=[o,s]);const l=Math.atan2(e-r,t-n);if(!ps(l,o,s)){const f=n+Math.cos(o)*i,h=r+Math.sin(o)*i,d=n+Math.cos(o)*i,g=r+Math.sin(o)*i;return Math.min(c,Je(t,e,f,h),Je(t,e,d,g))}const u=i-Math.sqrt(Je(t,e,n,r));return Math.min(c,u*u)}function Ts(t,e){if(t.length===0)return null;if(e!==void 0){const o=t.at(0),s=t.at(-1),a=o instanceof Date?o.getTime():o,c=s instanceof Date?s.getTime():s;if(typeof a=="number"&&typeof c=="number")return e===1?[a,c]:[c,a]}let n=1/0,r=-1/0;for(const o of t){const s=o instanceof Date?o.getTime():o;typeof s=="number"&&(s<n&&(n=s),s>r&&(r=s))}const i=[n,r];return i.every(Number.isFinite)?i:null}function Ms(t,e,n,r,i,o,s){let a=!1;const c=Ts(t,s),l=c&&o?[o(c[0]),o(c[1])]:c;if(l==null){let h;return e!=null&&n!=null&&e<=n?h=[e,n]:r!=null&&i!=null&&r<=i&&(h=[r,i]),{extent:h??[],clipped:!1}}let[u,f]=l;return e!=null?(a||(a=e>u),u=e):r!=null&&r<u&&(u=r),n!=null?(a||(a=n<f),f=n):i!=null&&i>f&&(f=i),u>f?{extent:[],clipped:!1}:{extent:[u,f],clipped:a}}function zf(t,e,n,r,i){const{extent:o,clipped:s}=Ms(t.domain,Le(e)?new Date(e):e,Le(n)?new Date(n):n,Le(r)?new Date(r):r,Le(i)?new Date(i):i,a=>new Date(a),t.sortMetadata?.sortOrder);return{extent:o.map(a=>new Date(a)),clipped:s}}var Kf=new Intl.NumberFormat("en-US",{style:"percent"});function qf(t,e=2){return typeof t=="number"?Ds(t,e):typeof t=="string"?t:String(t??"")}function Yf(t){return Kf.format(t)}var Fs=new Map().set(2,new Intl.NumberFormat("en-US",{maximumFractionDigits:2,useGrouping:!1}));function Ds(t,e){let n=Fs.get(e);return n||(n=new Intl.NumberFormat("en-US",{maximumFractionDigits:e,useGrouping:!1}),Fs.set(e,n)),n.format(t)}function $s(t){return Array.isArray(t)&&t.length>=2&&t.every(ft)}function Hn(t){return Array.isArray(t)&&t.length>=2&&t.every($s)}function Xf(t){const e=t[0],n=t.at(-1);return n===void 0?!1:Ar(e[0],n[0],.001)&&Ar(e[1],n[1],.001)}function ks(t){return Array.isArray(t)&&t.every(Hn)&&t.every(Xf)}function Ls(t){if(t===null)return!0;if(!X(t)||t.type==null)return!1;const{type:e,coordinates:n}=t;switch(e){case"GeometryCollection":return Array.isArray(t.geometries)&&t.geometries.every(Ls);case"MultiPolygon":return Array.isArray(n)&&n.every(ks);case"Polygon":return ks(n);case"MultiLineString":return Array.isArray(n)&&n.every(Hn);case"LineString":return Hn(n);case"MultiPoint":return Hn(n);case"Point":return $s(n);default:return!1}}function Jf(t){return X(t)&&t.type==="Feature"&&Ls(t.geometry)}function Qf(t){return X(t)&&t.type==="FeatureCollection"&&Array.isArray(t.features)&&t.features.every(Jf)}var Zf=F(Qf,"a GeoJSON object"),th=class{constructor(t,e,n){this._vertexCount=0,this._edgeCount=0,this.pendingProcessingEdgesFrom=[],this.pendingProcessingEdgesTo=[],this.cachedNeighboursEdge=t,this.processedEdge=e,this.singleValueEdges=n}clear(){this._vertexCount=0,this._edgeCount=0,this.pendingProcessingEdgesFrom=[],this.pendingProcessingEdgesTo=[],this.singleValueEdges?.clear()}getVertexCount(){return this._vertexCount}getEdgeCount(){return this._edgeCount}addVertex(t){const e=new Ns(t);return this._vertexCount++,e}addEdge(t,e,n){n===this.cachedNeighboursEdge?t.updateCachedNeighbours().set(e.value,e):n===this.processedEdge&&(this.pendingProcessingEdgesFrom.push(t),this.pendingProcessingEdgesTo.push(e));const{edges:r}=t,i=r.get(n);i?i.includes(e)||(this.singleValueEdges?.has(n)?r.set(n,[e]):(i.push(e),this._edgeCount++)):(r.set(n,[e]),this._edgeCount++)}removeVertex(t){this._vertexCount--;const e=t.edges;if(e){for(const[,n]of e)this._vertexCount-=n.length;t.clear()}}removeEdge(t,e,n){const r=t.edges.get(n);if(!r)return;const i=r.indexOf(e);i!==-1&&(r.splice(i,1),r.length===0&&t.edges.delete(n),this._edgeCount--,n===this.cachedNeighboursEdge&&t.readCachedNeighbours()?.delete(e.value))}removeEdges(t,e){t.edges.delete(e)}getVertexValue(t){return t.value}*neighbours(t){for(const[,e]of t.edges)for(const n of e)yield n}*neighboursAndEdges(t){for(const[e,n]of t.edges)for(const r of n)yield[r,e]}neighboursWithEdgeValue(t,e){return t.edges.get(e)}findNeighbour(t,e){return t.edges.get(e)?.[0]}findNeighbourValue(t,e){const n=this.findNeighbour(t,e);if(n)return this.getVertexValue(n)}findNeighbourWithValue(t,e,n){const r=n==null?this.neighbours(t):this.neighboursWithEdgeValue(t,n);if(r){for(const i of r)if(this.getVertexValue(i)===e)return i}}findVertexAlongEdge(t,e,n){if(n===this.cachedNeighboursEdge){let i;for(const o of e)if(i=(i??t).readCachedNeighbours()?.get(o),!i)return;return i}if(e.length===0)return;let r=t;for(const i of e){const o=r?this.neighboursWithEdgeValue(r,n):void 0;if(!o)return;r=o.find(s=>s.value===i)}return r}adjacent(t,e){for(const[,n]of t.edges)if(n.includes(e))return!0;return!1}},Ns=class{constructor(t){this.value=t,this.edges=new Map}readCachedNeighbours(){return this._cachedNeighbours}updateCachedNeighbours(){return this._cachedNeighbours??(this._cachedNeighbours=new Map),this._cachedNeighbours}clear(){this.edges.clear(),this._cachedNeighbours?.clear()}},ei="class-instance";function ni(t,e,n){if(L(e)){if(!L(t)||t.length!==e.length||e.some((r,i)=>ni(t[i],r,n)!=null))return e}else if(W(e)){if(!W(t))return e;const r={},i=new Set([...Object.keys(t),...Object.keys(e)]);for(const o of i)if(t[o]!==e[o])if(n?.has(o))r[o]=e[o];else if(typeof t[o]==typeof e[o]){const s=ni(t[o],e[o],n);s!==null&&(r[o]=s)}else r[o]=e[o];return Object.keys(r).length?r:null}else if(t!==e)return e;return null}function eh(t,e){for(const n of Object.keys(t))if(t[n]!==e?.[n])return!1;return!0}function Wn(t,e){return L(t)?nh(t,e):W(t)?rh(t,e):t instanceof Map?new Map(Wn(Array.from(t))):ri(t)}function nh(t,e){const n=[],r=e?.seen;for(const i of t){if(typeof i=="object"&&r?.includes(i)){pt("cycle detected in array",i);continue}r?.push(i),n.push(Wn(i,e)),r?.pop()}return n}function rh(t,e){const n={};for(const r of Object.keys(t))e?.assign?.has(r)?n[r]=t[r]:e?.shallow?.has(r)?n[r]=ri(t[r]):n[r]=Wn(t[r],e);return n}function ri(t){return L(t)?t.slice(0):W(t)?{...t}:ie(t)?new Date(t):ro(t)?new RegExp(t.source,t.flags):t}function ii(t,e,n,r,i,o){if(L(t)){o=e(t,r,i,o);let s=0;for(const a of t)o=ii(a,e,n,r?.[s],i,o),s++}else if(W(t)){o=e(t,r,i,o);for(const s of Object.keys(t)){if(n?.has(s))continue;const a=t[s];o=ii(a,e,n,r?.[s],i,o)}}return o}function Is(t,e,n={}){const{path:r,matcherPath:i=r?.replace(/(\[[0-9+]+])/i,"[]"),skip:o=[]}=n;if(t==null)throw new Error(`AG Charts - target is uninitialised: ${r??"<root>"}`);if(e==null)return t;if(he(t))return t.set(e);const s=t,a=oi(t);for(const c of Object.keys(e)){if(Pr.has(c))continue;const l=`${i?i+".":""}${c}`;if(o.includes(l))continue;const u=e[c],f=`${r?r+".":""}${c}`,h=s.constructor,d=s[c];try{const g=oi(d),y=oi(u);if(a===ei&&!(c in t||c==="context")){if(u===void 0)continue;pt(`unable to set [${f}] in ${h?.name} - property is unknown`);continue}if(g!=null&&y!=null&&y!==g&&(g!==ei||y!=="object")){pt(`unable to set [${f}] in ${h?.name} - can't apply type of [${y}], allowed types are: [${g}]`);continue}if(he(d))u===void 0?d.clear():d.set(u);else if(y==="object"&&c!=="context"){if(!(c in s)){pt(`unable to set [${f}] in ${h?.name} - property is unknown`);continue}d==null?s[c]=u:Is(d,u,{...n,path:f,matcherPath:l})}else s[c]=u}catch(g){pt(`unable to set [${f}] in [${h?.name}]; nested error is: ${g.message}`)}}return t}function oi(t){return t==null?null:gr(t)||ie(t)?"primitive":L(t)?"array":X(t)?W(t)?"object":ei:vt(t)?"function":"primitive"}function gt(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function _s(t,e,n=["Escape"]){return gt(t,"keydown",r=>{Vn(r,...n)&&e(r)})}function ih(t,e){const n=gt(It(),"mousedown",r=>{[0,2].includes(r.button)&&!Rs(t,r)&&(e(),n())});return n}function oh(t,e){const n=gt(It(),"touchstart",r=>{Array.from(r.targetTouches).some(o=>!Rs(t,o))&&(e(),n())});return n}function Rs(t,e){return lr(e.target)&&e.target.shadowRoot!=null?!0:Bi(e.target)&&t.contains(e.target)}function sh(t,e,n){const r=i=>{for(const o of e)de(o,"data-focus-visible-override",i)};return r(n),gt(t,"keydown",()=>r(!0),{once:!0})}function si(t){return!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)}function Vn(t,...e){return si(t)&&e.includes(t.key)}function Cs(t,e,n){return gt(t,"keydown",r=>{Vn(r,n)&&e.focus()})}var Ps={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};function ah(t){const{orientation:e,buttons:n,wrapAround:r=!1,onEscape:i,onFocus:o,onBlur:s}=t,{nextKey:a,prevKey:c}=Ps[e],l=d=>{if(d.target&&"tabIndex"in d.target){for(const g of n)g.tabIndex=-1;d.target.tabIndex=0}},[u,f]=r?[n.length,n.length]:[0,1/0],h=new dr;for(let d=0;d<n.length;d++){const g=n[(u+d-1)%f],y=n[d],b=n[(u+d+1)%f];h.register(gt(y,"focus",l),o&&gt(y,"focus",o),s&&gt(y,"blur",s),i&&_s(y,i),g&&Cs(y,g,c),b&&Cs(y,b,a),gt(y,"keydown",v=>{Vn(v,a,c)&&v.preventDefault()})),y.tabIndex=d===0?0:-1}return h}function ch(t,e){return n=>{if(t.ariaDisabled==="true")return n.preventDefault();e(n)}}function Gs(t){return"button"in t?t.button===0:si(t)&&(t.code==="Space"||t.key==="Enter")}function lh(t){const e=t?.target;if(lr(e)&&"tabindex"in e.attributes)return e}function uh(t){return gt(t,"keydown",e=>{if(e.defaultPrevented)return;bs(e.target,"data-preventdefault",!0)&&Vn(e,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&e.preventDefault()})}var ai=new Map,Bs=1;function fh(){ai.clear(),Bs=1}function hh(t){const e=t.constructor;let n=Object.hasOwn(e,"className")?e.className:e.name;qi(()=>{if(!n)throw new Error(`The ${String(e)} is missing the 'className' property.`)}),n??(n="Unknown");const r=(ai.get(n)??0)+1;return ai.set(n,r),`${n}-${r}`}function dh(){return`ag-charts-${Bs++}`}function gh(){return crypto.randomUUID?.()??ph()}function ph(){const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e="";for(let n=0;n<t.length;n++)(n===4||n===6||n===8||n===10)&&(e+="-"),e+=t[n].toString(16).padStart(2,"0");return e}function Us(t,e,n){let r=t,i=r;for(const o of e)if(r==null||n(r.value,o)>0)r={value:o,next:r},i=r;else{for(i=i;i.next!=null&&n(i.next.value,o)<=0;)i=i.next;i.next={value:o,next:i.next}}return r}var Qe=new WeakMap;function yh(t,e){const n=JSON.stringify(t,null,0);return Qe.has(e)||Qe.set(e,new Map),Qe.get(e)?.has(n)||Qe.get(e)?.set(n,e(t)),Qe.get(e)?.get(n)}var ci=class{constructor(){this.weak=new WeakMap,this.strong=new Map,this.set=!1,this.value=void 0}};function mh(t,e){let n=new ci;const r=(...i)=>{let o=n;for(const s of i){const a=typeof s=="object"||typeof s=="symbol"?o.weak:o.strong;let c=a.get(s);c==null&&(c=new ci,a.set(s,c)),o=c}if(o.set)return e?.("hit",t,i),o.value;{const s=t(...i);return o.set=!0,o.value=s,e?.("miss",t,i),s}};return r.reset=()=>{n=new ci},r}function bh(t,e){const n=new Map,r=(...s)=>s.map(a=>typeof a=="object"||typeof a=="symbol"?a:(n.has(a)||n.set(a,{v:a}),n.get(a))),i={},o=new WeakMap;return(...s)=>{const a=s.length===0?[i]:r(...s);let c=o;for(const f of a.slice(0,-1))c.has(f)||c.set(f,new WeakMap),c=c.get(f);const l=a.at(-1);let u=c.get(l);return u?e?.("hit",t,s):(u=t(...s),c.set(l,u),e?.("miss",t,s)),u}}function vh(t,e,n,r=1/0){const i={nearest:void 0,distanceSquared:r};for(const o of n){const s=o.distanceSquared(t,e);if(s===0)return{nearest:o,distanceSquared:0};s<i.distanceSquared&&(i.nearest=o,i.distanceSquared=s)}return i}function xh(t,e,n,r=1/0){const{x:i=t,y:o=e}=n.transformPoint?.(t,e)??{},s={nearest:void 0,distanceSquared:r};for(const a of n.children){const{nearest:c,distanceSquared:l}=a.nearestSquared(i,o,s.distanceSquared);if(l===0)return{nearest:c,distanceSquared:l};l<s.distanceSquared&&(s.nearest=c,s.distanceSquared=l)}return s}var Ze=class extends fe{constructor(t=0,e=t,n=t,r=e){super(),this.top=t,this.right=e,this.bottom=n,this.left=r}};ut([rt],Ze.prototype,"top",2),ut([rt],Ze.prototype,"right",2),ut([rt],Ze.prototype,"bottom",2),ut([rt],Ze.prototype,"left",2);function Eh(t,e,n,r){let{top:i,right:o,bottom:s,left:a,width:c,height:l}=r;return a!=null?c!=null?o=n.width-a+c:o!=null&&(c=n.width-a-o):o!=null&&c!=null&&(a=n.width-o-c),i!=null?l!=null?s=n.height-i-l:s!=null&&(l=n.height-s-i):s!=null&&l!=null&&(i=n.height-s-l),c==null?l==null?(l=e,c=t):c=Math.ceil(t*l/e):l??(l=Math.ceil(e*c/t)),a==null&&(o==null?a=Math.floor((n.width-c)/2):a=n.width-o-c),i==null&&(s==null?i=Math.floor((n.height-l)/2):i=n.height-l-s),{x:a,y:i,width:c,height:l}}var li="color: green",ui="color: grey";function Ah(){return Nr(()=>{})}function fi(t,e){const n=Tt(e);if(n.length===0)return;const r=Wo(t);for(const i of n)i in r&&(e[i]=r[i])}var js=class{transitionRoot(t,e){this.parent?this.parent.transitionRoot(t,e):this.transition(t,e)}},hi=class et extends js{constructor(e,n,r){super(),this.defaultState=e,this.states=n,this.enterEach=r,this.debug=Ki(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,li)}transition(e,n){if(!this.transitionChild(e,n)||this.state===et.child||this.state===et.parent)return;const i=this.state,o=this.states[this.state];let s=o[e];const a=`%c${this.constructor.name} | ${this.state} -> ${e} ->`;if(Array.isArray(s))s=s.find(u=>{if(!u.guard)return!0;const f=u.guard(n);return f||this.debug(`${a} (guarded)`,u.target,ui),f});else if(typeof s=="object"&&!(s instanceof et)&&s.guard&&!s.guard(n)){this.debug(`${a} (guarded)`,s.target,ui);return}if(!s){this.debug(`${a} ${this.state}`,ui);return}const c=this.getDestinationState(s),l=c===this.state?void 0:o.onExit;this.debug(`${a} ${c}`,li),this.state=c,typeof s=="function"?s(n):typeof s=="object"&&!(s instanceof et)&&s.action?.(n),l?.(),this.enterEach?.(i,c),c!==i&&c!==et.child&&c!==et.parent&&this.states[c].onEnter?.(i,n)}transitionAsync(e,n){setTimeout(()=>{this.transition(e,n)},0)}is(e){return this.state===et.child&&this.childState?this.childState.is(e):this.state===e}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(e,n){return this.state!==et.child||!this.childState||(fi(this,this.childState),this.childState.transition(e,n),!this.childState.is(et.parent))?!0:(this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.defaultState}`,li),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1)}getDestinationState(e){let n=this.state;return typeof e=="string"?n=e:e instanceof et?(this.childState=e,this.childState.parent=this,n=et.child):typeof e=="object"&&(e.target instanceof et?(this.childState=e.target,this.childState.parent=this,n=et.child):e.target!=null&&(n=e.target)),n}};hi.child="__child",hi.parent="__parent";var wh=hi,Oh=class extends js{constructor(...t){super(),this.stateMachines=t;for(const e of t)e.parent=this}transition(t,e){for(const n of this.stateMachines)fi(this,n),n.transition(t,e)}transitionAsync(t,e){for(const n of this.stateMachines)fi(this,n),n.transitionAsync(t,e)}},Hs=class{constructor(t,e){this.ctx=t,this.measureTextCached=e,this.baselineMap=new Map,this.charMap=new Map,this.lineHeightCache=null}baselineDistance(t){if(t==="alphabetic")return 0;if(this.baselineMap.has(t))return this.baselineMap.get(t);this.ctx.textBaseline=t;const{alphabeticBaseline:e}=this.ctx.measureText("");return this.baselineMap.set(t,e),this.ctx.textBaseline="alphabetic",e}lineHeight(){return this.lineHeightCache??(this.lineHeightCache=this.measureText("").height),this.lineHeightCache}measureText(t){const e=this.measureTextCached?.(t)??this.ctx.measureText(t),{width:n,fontBoundingBoxAscent:r=e.emHeightAscent,fontBoundingBoxDescent:i=e.emHeightDescent}=e,o=r+i;return{width:n,height:o,ascent:r,descent:i}}measureLines(t){const e=typeof t=="string"?t.split(cn):t;let n=0,r=0;const i=e.map(o=>{const s=this.measureText(o);return n<s.width&&(n=s.width),r+=s.height,{text:o,...s}});return{width:n,height:r,lineMetrics:i}}textWidth(t,e){if(e){let n=0;for(let r=0;r<t.length;r++)n+=this.textWidth(t.charAt(r));return n}return t.length>1?this.ctx.measureText(t).width:this.charMap.get(t)??this.charWidth(t)}charWidth(t){const{width:e}=this.ctx.measureText(t);return this.charMap.set(t,e),e}},di=new ar(50);function ge(t){typeof t=="object"&&(t=oo(t));let e=di.get(t);if(e)return e;const n=new ar(1e4),r=As();return r.font=t,e=new Hs(r,i=>{let o=n.get(i);return o||(o=r.measureText(i),n.set(i,o),o)}),di.set(t,e),e}ge.clear=()=>di.clear();function Ws(t,e){let n={segments:[],width:0,height:0,ascent:0,descent:0};const r=[n];for(const s of t){const{text:a,fontSize:c=e.fontSize,fontStyle:l=e.fontStyle,fontWeight:u=e.fontWeight,fontFamily:f=e.fontFamily,...h}=s,d={fontSize:c,fontStyle:l,fontWeight:u,fontFamily:f},g=ge(d),y=oe(a).split(cn);for(let b=0;b<y.length;b++){const v=y[b],A=g.measureText(v);b>0&&(n={segments:[],width:0,height:0,ascent:0,descent:0},r.push(n)),v&&(n.width+=A.width,n.ascent=Math.max(n.ascent,A.ascent),n.descent=Math.max(n.descent,A.descent),n.height=Math.max(n.height,n.ascent+n.descent),n.segments.push({...d,...h,text:v,textMetrics:A}))}}let i=0,o=0;for(const s of r)i=Math.max(i,s.width),o+=s.height;return{width:i,height:o,lineMetrics:r}}function $t(t,e,n){const r=Me().createElement(t);if(typeof e=="object"&&(n=e,e=void 0),e)for(const i of e.split(" "))r.classList.add(i);return n&&Object.assign(r.style,n),r}function Sh(t){return Me().createElementNS("http://www.w3.org/2000/svg",t)}function Th(t,e){const n=Me("body"),r=$t("a",{display:"none"});r.href=t,r.download=e,n.appendChild(r),r.click(),setTimeout(()=>r.remove())}function Vs(t,e){return e.overflow==="hide"&&t.some(Ne)}function Mh(t,e){return L(t)?Ks(t,e):gi(oe(t),e).join(`
`)}function Fh(t,e){return gi(t,e).join(`
`)}function gi(t,e){return zn(t,e)}function pe(t,e,n,r){const i=e.textWidth(De);let o=0,s=0;for(;s<t.length;s++){const a=e.textWidth(t.charAt(s));if(o+a>n)break;o+=a}if(t.length===s&&(!r||o+i<=n))return r?pr(t):t;for(t=t.slice(0,s).trimEnd();t.length&&e.textWidth(t)+i>n;)t=t.slice(0,-1).trimEnd();return pr(t)}function zn(t,e,n=0){const r=t.split(cn),i=ge(e.font),o=[];if(e.textWrap==="never"){for(const l of r){const u=pe(l.trimEnd(),i,Math.max(0,e.maxWidth-n));if(!u)break;o.push(u),n=0}return Vs(o,e)?[]:o}const s=e.textWrap==="hyphenate",a=e.textWrap==null||e.textWrap==="on-space";for(const l of r){let u=l.trimEnd();if(u===""){o.push(u);continue}let f=0,h=0,d=0;for(o.length||(h=n);f<u.length;){const g=u.charAt(f);if(g===" "&&(d=f),h+=i.textWidth(g),h>e.maxWidth){if(f===0){u="";break}let y=i.textWidth(u.slice(0,f+1));if(o.length||(y+=n),y<=e.maxWidth){h=y,f++;continue}if(d){const A=Dh(u,d+1),w=i.textWidth(A);if(w<=e.maxWidth){o.push(u.slice(0,d).trimEnd()),u=u.slice(d).trimStart(),f=0,h=0,d=0;continue}else a&&w>e.maxWidth&&o.push(u.slice(0,d).trimEnd(),pe(u.slice(d).trimStart(),i,e.maxWidth,!0))}else if(a){const A=pe(u,i,e.maxWidth,!0);A&&o.push(A)}if(a){u="";break}const b=s?"-":"";let v=u.slice(0,f).trim();for(;v.length&&i.textWidth(v+b)>e.maxWidth;)v=v.slice(0,-1).trimEnd();if(v&&v!==$e)o.push(v+b);else{u="";break}u=u.slice(v.length).trimStart(),f=-1,h=0,d=0}f++}u&&o.push(u)}$h(o,i,e);const c=zs(o,i,e);return Vs(c,e)?[]:c}function Dh(t,e){const n=t.indexOf(" ",e);return n===-1?t.slice(e):t.slice(e,n)}function zs(t,e,n){if(!ft(n.maxHeight))return t;const{height:r,lineMetrics:i}=e.measureLines(t);if(r<=n.maxHeight)return t;for(let o=0,s=0;o<i.length;o++)if(s+=i[o].height,s>n.maxHeight){if(n.overflow==="hide"||o===0)return[];const a=t.slice(0,o),c=a.pop();return a.concat(Ne(c)?c:pe(c,e,n.maxWidth,!0))}return t}function $h(t,e,n){if(n.avoidOrphans===!1||t.length<2)return;const{length:r}=t,i=t[r-1],o=t[r-2];if(o.length<i.length)return;const s=o.lastIndexOf(" ");if(s===-1||s===o.indexOf(" ")||i.includes(" "))return;const a=o.slice(s+1);e.textWidth(i+a)<=n.maxWidth&&(t[r-2]=o.slice(0,s),t[r-1]=a+" "+i)}function Ks(t,e){const{maxHeight:n=1/0}=e,r=[];let i=0,o=0;function s(){const a=r.pop();if(!a)return;const c=ge(a),l=pe(a.text,c,e.maxWidth,!0),u=c.measureText(l);r.push({...a,text:l,textMetrics:u})}for(const{width:a,height:c,segments:l}of Ws(t,e.font).lineMetrics){if(o+c>n){r.length&&s();break}if(i+a<=e.maxWidth){i+=a,o+=c,r.push(...l);continue}for(const u of l){if(i+u.textMetrics.width<=e.maxWidth){i+=u.textMetrics.width,r.push(u);continue}const f=ge(u),h=so(u.text),d={...e,font:u,maxHeight:n-o};let g=zn(h,{...d,overflow:"hide"},i);if(g.length===0)if(e.textWrap==="never")g=zn(h,d,i);else{g=zn(h,d);const v=r.at(-1);v&&(v.text+=`
`,i=0)}if(g.length===0){s();break}const y=g.findIndex(Ne);y!==-1&&(g=g.slice(0,y+1));const b=g.at(-1);for(const v of g){const A=ao(v),w=f.measureText(A),$={...u,text:A,textMetrics:w};v===b?i+=w.width:($.text+=`
`,i=0),o+=w.height,r.push($)}if(y!==-1)break}}return r}function qs(t,[e,n],[r,i]){const o=i-r,s=n-e,a=e+s*t[0],c=e+s*t[1];return[(a-r)/o,(c-r)/o]}var ye=1e3,kt=ye*60,Vt=kt*60,zt=Vt*24,Ys=zt*7,pi=zt*30,tn=zt*365,me=new Date().getTimezoneOffset()*kt,be={millisecond:{milliseconds:1,hierarchy:"day",encode(t){return t.getTime()},decode(t){return new Date(t)}},second:{milliseconds:ye,hierarchy:"day",encode(t,e){const n=e?0:me;return Math.floor((t.getTime()-n)/ye)},decode(t,e){const n=e?0:me;return new Date(n+t*ye)}},minute:{milliseconds:kt,hierarchy:"day",encode(t,e){const n=e?0:me;return Math.floor((t.getTime()-n)/kt)},decode(t,e){const n=e?0:me;return new Date(n+t*kt)}},hour:{milliseconds:Vt,hierarchy:"day",encode(t,e){const n=e?0:me;return Math.floor((t.getTime()-n)/Vt)},decode(t,e){const n=e?0:me;return new Date(n+t*Vt)}},day:{milliseconds:zt,hierarchy:"month",encode(t,e){const n=e?0:t.getTimezoneOffset()*kt;return Math.floor((t.getTime()-n)/zt)},decode(t,e){let n;return e?(n=new Date(0),n.setUTCDate(n.getUTCDate()+t),n.setUTCHours(0,0,0,0)):(n=new Date(1970,0,1),n.setDate(n.getDate()+t)),n}},month:{milliseconds:pi,hierarchy:"year",encode(t,e){return e?t.getUTCFullYear()*12+t.getUTCMonth():t.getFullYear()*12+t.getMonth()},decode(t,e){if(e){const n=Math.floor(t/12),r=t-n*12;return new Date(Date.UTC(n,r,1))}else{const n=Math.floor(t/12),r=t-n*12;return new Date(n,r,1)}}},year:{milliseconds:tn,hierarchy:void 0,encode(t,e){return e?t.getUTCFullYear():t.getFullYear()},decode(t,e){let n;return e?(n=new Date,n.setUTCFullYear(t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)):n=new Date(t,0,1,0,0,0,0),n}}};function en(t){return typeof t=="string"?{unit:t,step:1,epoch:void 0,utc:!1}:{unit:t.unit,step:t.step??1,epoch:t.epoch,utc:t.utc??!1}}function nn(t,e,n,r){if(n==null)return 0;const i=be[t];return Math.floor(i.encode(new Date(n),r))%e}function ve(t,e,n,r,i){const o=be[e];return Math.floor((o.encode(new Date(t),r)-i)/n)}function xe(t,e,n,r,i){return be[e].decode(t*n+i,r)}function Kn(t,e,n,r,i){const o=new Date(t),s=ve(o,e,n,r,i);return xe(s,e,n,r,i)}function qn(t,e,n,r,i){const o=new Date(Number(t)-1),s=ve(o,e,n,r,i);return xe(s+1,e,n,r,i)}function Kt(t,e){const{unit:n,step:r,epoch:i,utc:o}=en(t),s=nn(n,r,i,o);return Kn(e,n,r,o,s)}function kh(t,e){const{unit:n,step:r,epoch:i,utc:o}=en(t),s=nn(n,r,i,o);return qn(e,n,r,o,s)}function Lh(t,e){const{unit:n,step:r,epoch:i,utc:o}=en(t),s=nn(n,r,i,o);return xe(ve(qn(e,n,r,o,s),n,r,o,s)-1,n,r,o,s)}function Nh(t,e){const{unit:n,step:r,epoch:i,utc:o}=en(t),s=nn(n,r,i,o);return xe(ve(Kn(e,n,r,o,s),n,r,o,s)+1,n,r,o,s)}function Xs(t,e,n){if(t.valueOf()>e.valueOf()&&([t,e]=[e,t],n!=null&&(n=[1-n[1],1-n[0]])),n!=null){const r=e.valueOf()-t.valueOf(),i=t.valueOf();t=new Date(i+n[0]*r),e=new Date(i+n[1]*r)}return[new Date(t),new Date(e)]}function rn(t,e,n,{extend:r=!1,visibleRange:i=[0,1],limit:o,defaultAlignment:s="start"}={}){const a=en(t),{unit:c,step:l,utc:u}=a;let f;a.epoch!=null?f=a.epoch:s==="interval"?f=void 0:e.valueOf()>n.valueOf()?f=n:f=e;const h=nn(a.unit,a.step,f,a.utc);let[d,g]=Xs(e,n,i);d=r?Kn(d,c,l,u,h):qn(d,c,l,u,h),g=r?qn(g,c,l,u,h):Kn(g,c,l,u,h);const y=ve(d,c,l,u,h);let b=ve(g,c,l,u,h);return o!=null&&b-y>o&&(b=y+o),{range:[y,b],unit:c,step:l,utc:u,offset:h}}function Ih(t,e,n,r){const{range:[i,o]}=rn(t,e,n,r);return Math.abs(o-i)}function _h(t,e,n,r){const{range:[i,o],unit:s,step:a,utc:c,offset:l}=rn(t,e,n,r),u=[];for(let f=i;f<=o;f+=1){const h=xe(f,s,a,c,l);u.push(h)}return u}function Rh(t,e,n,r){const{range:[i,o],unit:s,step:a,utc:c,offset:l}=rn(t,e,n,r),u=Math.max(0,o-i+1),f=new Array(u);for(let h=0;h<u;h++)f[h]=i+h;return{encodedValues:f,encodingParams:{unit:s,step:a,utc:c,offset:l}}}function Ch(t,e){return xe(t,e.unit,e.step,e.utc,e.offset)}var yi=new Date().getTimezoneOffset()*6e4,Ph=1e3,Gh=6e4,Bh=36e5;function Uh(t,e){const{unit:n,step:r,utc:i,offset:o}=e,s=t*r+o;switch(n){case"millisecond":return s;case"second":return(i?0:yi)+s*Ph;case"minute":return(i?0:yi)+s*Gh;case"hour":return(i?0:yi)+s*Bh;default:return be[n].decode(s,i).valueOf()}}function jh(t,e,n,{extend:r,visibleRange:i,limit:o,defaultAlignment:s}={}){const{range:[a]}=rn(t,e,n,{extend:r,visibleRange:i,limit:o,defaultAlignment:s}),{range:[c]}=rn(t,e,n,{extend:r,limit:o,defaultAlignment:s});return a-c}function mi(t){return typeof t=="string"?t:t.unit}function bi(t){return typeof t=="string"?1:t.step??1}function Hh(t){return typeof t=="string"?void 0:t.epoch}function Js(t){return be[mi(t)].hierarchy}function Yn(t){return bi(t)*be[mi(t)].milliseconds}var R=(t,e)=>({duration:Yn(t)*e,timeInterval:t,step:e}),vi=[R({unit:"second"},1),R({unit:"second"},5),R({unit:"second"},15),R({unit:"second"},30),R({unit:"minute"},1),R({unit:"minute"},5),R({unit:"minute"},15),R({unit:"minute"},30),R({unit:"hour"},1),R({unit:"hour"},3),R({unit:"hour"},6),R({unit:"hour"},12),R({unit:"day"},1),R({unit:"day"},2),R({unit:"day",step:7},1),R({unit:"day",step:7},2),R({unit:"day",step:7},3),R({unit:"month"},1),R({unit:"month"},2),R({unit:"month"},3),R({unit:"month"},4),R({unit:"month"},6),R({unit:"year"},1)],Qs=[1,2,5,10];function Zs(t,e){return Math.abs(Math.round(t)-t)<e}function ta(t,e,n){return Math.abs(e-t)>=n?Math.abs(e-t)/n+1:1}function Wh(t,e,n,r,i,o){if(t===e)return{ticks:[t],count:1,firstTickIndex:0};if(n<2)return{ticks:[t,e],count:2,firstTickIndex:0};const s=Xn(t,e,n,r,i);if(!Number.isFinite(s))return{ticks:[],count:0,firstTickIndex:void 0};let a=t,c=e;Zs(a/s,1e-12)||(a=Math.ceil(a/s)*s),Zs(c/s,1e-12)||(c=Math.floor(c/s)*s),o!=null&&(o=qs(o,[t,e],[a,c]));const{ticks:l}=ia(a,c,s,o),u=l.at(0);return{ticks:l,count:ta(a,c,s),firstTickIndex:u==null?void 0:Math.round((u-a)/s)}}var Vh=Math.floor(2*Ys/pi*10)/10;function ea({timeInterval:t,step:e}){const n=Yn(t)*e,r=Js(t),i=r?Yn(r):void 0;return n<=(i??1/0)*Vh}function na(t,{weekStart:e}){if(t.unit==="day"&&t.step===7)return e}function zh(t,e,n,r,i,{weekStart:o,primaryOnly:s=!1,targetInterval:a}){if(n<=0)return;const c=a??Math.abs(e-t)/Math.max(n,1),l=vi.findLast(d=>(!s||ea(d))&&c>d.duration),u=vi.find(d=>(!s||ea(d))&&c<=d.duration);if(l==null)return{unit:"millisecond",step:Math.max(Xn(t,e,n,r,i),1)};if(u==null)return{unit:"year",step:a==null?Xn(t/tn,e/tn,n,r,i):1};const{timeInterval:f,step:h}=c-l.duration<u.duration-c?l:u;return{unit:f.unit,step:bi(f)*h,epoch:na(f,{weekStart:o})}}function Xn(t,e,n,r=0,i=1/0){if(t===e)return tt(1,r,i);if(n<1)return Number.NaN;const o=Math.abs(e-t),s=10**Math.floor(Math.log10(o/n));let a=Number.NaN,c=1/0,l=!1;for(const u of Qs){const f=Math.ceil(o/(u*s)),h=f>=r&&f<=i;if(l&&!h)continue;const d=Math.abs(f-n);(c>d||l!==h)&&(l||(l=h),c=d,a=u)}return a*s}function ra(t){for(let e=t.length-1;e>=0;e-=1)if(t[e]!=="0")return e+1;return 0}function Kh(t,e){const n=Or(e??",f");if(n==null)return;(n.precision==null||Number.isNaN(n.precision))&&(!n.type||"eEFgGnprs".includes(n.type)?n.precision=Math.max(...t.map(i=>{if(!Number.isFinite(i))return 0;const[o,s]=i.toExponential((n.type?6:12)-1).split(/[.e]/g);return(o!=="1"&&o!=="-1"?1:0)+ra(s)+1})):"f%".includes(n.type)&&(n.precision=Math.max(...t.map(i=>{if(!Number.isFinite(i)||i===0)return 0;const o=Math.floor(Math.log10(Math.abs(i))),s=n.type?6:12,a=i.toExponential(s-1).split(/[.e]/g)[1],c=ra(a);return Math.max(0,c-o)}))));const r=Eo(n);return i=>r(Number(i))}function ia(t,e,n,r){if(!Number.isFinite(n)||n<=0)return{ticks:[],count:0,firstTickIndex:void 0};if(t===e)return{ticks:[t],count:1,firstTickIndex:0};const i=10**mo(n),o=Math.min(t,e),s=Math.max(t,e);let a,c;if(r!=null&&(r[0]!==0||r[1]!==1)){const f=e-t,h=t+f*r[0],d=e-f*(1-r[1]);a=Math.min(h,d),c=Math.max(h,d)}else a=o,c=s;a=Math.floor(a*i)/i,c=Math.ceil(c*i)/i;const l=[];for(let f=0;;f+=1){const h=Math.round((o+n*f)*i)/i;if(h>s)break;h>=a&&h<=c&&l.push(h)}const u=l.at(0);return{ticks:l,count:ta(o,s,n),firstTickIndex:u==null?void 0:Math.round((u-o)/n)}}function qh(t,e){return t>=e?(Z("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0):!1}function Yh(t,e){const n=Math.abs(e-t),r=10**Math.floor(Math.log10(n));let i=1/0,o=[t,e];for(const s of Qs){const a=s*r,c=Math.floor(t/a)*a,l=Math.ceil(e/a)*a,u=1-n/Math.abs(l-c);i>u&&(i=u,o=[c,l])}return o}function Xh(t,e,n,r,i,o){if(t<=0)return{minTickCount:0,maxTickCount:0,tickCount:0};o=Math.max(o,t/(i+1)),n??(n=o),r??(r=t),n>r&&(n===o?n=r:r=n),n=Math.max(n,1);const s=Math.max(1,Math.floor(t/(e*n))),a=Math.min(s,Math.ceil(t/(e*r))),c=tt(a,Math.floor(i/e),s);return{minTickCount:a,maxTickCount:s,tickCount:c}}function Jh(t){return t instanceof Date?t.getTime():t}function oa(t){return t<ye?"millisecond":t<kt?"second":t<Vt?"minute":t<Vt*23?"hour":t<28*zt?"day":t<tn?"month":"year"}function Qh(t){if(t.length===0)return"millisecond";if(t.length===1)return sa(t[0]);let e=1/0;for(let n=1;n<t.length;n++)e=Math.min(e,Math.abs(t[n].valueOf()-t[n-1].valueOf()));return oa(e)}function sa(t){return Kt("second",t)<t?"millisecond":Kt("minute",t)<t?"second":Kt("hour",t)<t?"minute":Kt("day",t)<t?"hour":Kt("month",t)<t?"day":Kt("year",t)<t?"month":"year"}function Zh(t){const[e,n]=t.length===0?[0,0]:Rn([t[0].valueOf(),t.at(-1).valueOf()]),r=new Date(e).getFullYear(),i=new Date(n).getFullYear();if(r!==i)return;const o=new Date(e).getMonth(),s=new Date(n).getMonth();if(o!==s)return"year";const a=new Date(e).getDate(),c=new Date(n).getDate();return a!==c?"month":"day"}function td(){const t=new Map;return e=>{const n=t.get(e);return n?(t.set(e,n+1),`${e}_${n}`):(t.set(e,1),e)}}function xi(t){return t!=null&&Object.hasOwn(t,"toString")&&xt(t.toString())}function aa(t){return t!=null&&Object.hasOwn(t,"valueOf")&&ft(t.valueOf())}function ca(t){return ft(t)||un(t)||aa(t)}function ed(t,e){return t!=null&&(!e||ca(t))}function nd(t){return xi(t)&&Object.hasOwn(t,"id")?t.id:t}function rd(t){return xi(t)&&Object.hasOwn(t,"value")?t.value:t}var la={};te(la,{add:()=>id,angle:()=>ld,apply:()=>bd,distance:()=>sd,distanceSquared:()=>ad,equal:()=>yd,from:()=>md,gradient:()=>fd,intercept:()=>hd,intersectAtX:()=>gd,intersectAtY:()=>dd,length:()=>Jn,lengthSquared:()=>ua,multiply:()=>od,normalized:()=>cd,origin:()=>fa,required:()=>vd,rotate:()=>ud,round:()=>pd,sub:()=>Ei});function id(t,e){return typeof e=="number"?{x:t.x+e,y:t.y+e}:{x:t.x+e.x,y:t.y+e.y}}function Ei(t,e){return typeof e=="number"?{x:t.x-e,y:t.y-e}:{x:t.x-e.x,y:t.y-e.y}}function od(t,e){return typeof e=="number"?{x:t.x*e,y:t.y*e}:{x:t.x*e.x,y:t.y*e.y}}function Jn(t){return Math.hypot(t.x,t.y)}function ua(t){return t.x*t.x+t.y*t.y}function sd(t,e){return Jn(Ei(t,e))}function ad(t,e){return ua(Ei(t,e))}function cd(t){const e=Jn(t);return{x:t.x/e,y:t.y/e}}function ld(t,e){return e==null?Math.atan2(t.y,t.x):Math.atan2(t.y,t.x)-Math.atan2(e.y,e.x)}function ud(t,e,n=fa()){const r=Jn(t);return{x:n.x+r*Math.cos(e),y:n.y+r*Math.sin(e)}}function fd(t,e,n){const r=e.x-t.x;return(n==null?e.y-t.y:n-e.y-(n-t.y))/r}function hd(t,e,n){return(n==null?t.y:n-t.y)-e*t.x}function dd(t,e,n=0,r){return{x:t===1/0?1/0:(n-e)/t,y:r==null?n:r-n}}function gd(t,e,n=0,r){const i=t===1/0?1/0:t*n+e;return{x:n,y:r==null?i:r-i}}function pd(t,e=2){return{x:wr(t.x,e),y:wr(t.y,e)}}function yd(t,e){return t.x===e.x&&t.y===e.y}function md(t,e){if(typeof t=="number")return{x:t,y:e};if("currentX"in t)return{x:t.currentX,y:t.currentY};if("offsetWidth"in t)return{x:t.offsetWidth,y:t.offsetHeight};if("width"in t)return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y+t.height}];if("x1"in t)return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}];throw new Error(`Values can not be converted into a vector: [${JSON.stringify(t)}] [${e}]`)}function bd(t,e){return t.x=e.x,t.y=e.y,t}function vd(t){return{x:t?.x??0,y:t?.y??0}}function fa(){return{x:0,y:0}}var ha={};te(ha,{bottomCenter:()=>Od,center:()=>wd,clone:()=>Fd,collides:()=>Dd,end:()=>Ed,from:()=>$d,height:()=>Td,normalise:()=>Qn,origin:()=>kd,round:()=>Md,start:()=>xd,topCenter:()=>Ad,width:()=>Sd});function xd(t){return{x:t.x1,y:t.y1}}function Ed(t){return{x:t.x2,y:t.y2}}function Ad(t){return{x:(t.x1+t.x2)/2,y:Math.min(t.y1,t.y2)}}function wd(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}}function Od(t){return{x:(t.x1+t.x2)/2,y:Math.max(t.y1,t.y2)}}function Sd(t){return Math.abs(t.x2-t.x1)}function Td(t){return Math.abs(t.y2-t.y1)}function Md(t){return{x1:Math.round(t.x1),y1:Math.round(t.y1),x2:Math.round(t.x2),y2:Math.round(t.y2)}}function Fd(t){return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}function Dd(t,e){const n=Qn(t),r=Qn(e);return n.x1<=r.x2&&n.x2>=r.x1&&n.y1<=r.y2&&n.y2>=r.y1}function Qn(t){return{x1:Math.min(t.x1,t.x2),x2:Math.max(t.x1,t.x2),y1:Math.min(t.y1,t.y2),y2:Math.max(t.y1,t.y2)}}function $d(t,e,n,r){if(typeof t=="number")return{x1:t,y1:e,x2:n,y2:r};if("width"in t)return Qn({x1:t.x,y1:t.y,x2:t.x+t.width,y2:t.y+t.height});throw new Error(`Values can not be converted into a vector4: [${JSON.stringify(t)}] [${e}] [${n}] [${r}]`)}function kd(){return{x1:0,y1:0,x2:0,y2:0}}function Ai(t){return X(t)&&t.type=="gradient"}function Ld(t){return L(t)&&t.every(Ai)}function Nd(t){return L(t)&&t.every(e=>typeof e=="string")}function da(t){return t!==null&&X(t)&&t.type=="pattern"}function Id(t){return t!==null&&X(t)&&t.type=="image"}function _d(t){return Ai(t)||da(t)}function Zn(t,e,n,r,i){return(1-i)**3*t+3*(1-i)**2*i*e+3*(1-i)*i**2*n+i**3*r}function wi(t,e,n,r,i){if(i<=Math.min(t,r))return t<r?0:1;if(i>=Math.max(t,r))return t<r?1:0;let o=0,s=1,a=Number.NaN;for(let c=0;c<12;c+=1)a=(o+s)/2,Zn(t,e,n,r,a)<i?o=a:s=a;return a}function tr(t,e,n,r,i,o,s,a,c){const l=(1-c)*t+c*n,u=(1-c)*e+c*r,f=(1-c)*n+c*i,h=(1-c)*r+c*o,d=(1-c)*i+c*s,g=(1-c)*o+c*a,y=(1-c)*l+c*f,b=(1-c)*u+c*h,v=(1-c)*f+c*d,A=(1-c)*h+c*g,w=(1-c)*y+c*v,$=(1-c)*b+c*A;return[[{x:t,y:e},{x:l,y:u},{x:y,y:b},{x:w,y:$}],[{x:w,y:$},{x:v,y:A},{x:d,y:g},{x:s,y:a}]]}function ga(t,e,n,r){const i=-t+3*e-3*n+r,o=2*(t-2*e+n),s=-t+e;if(i===0){if(o!==0){const c=-s/o;if(c>0&&c<1)return[c]}return[]}const a=o*o-4*i*s;if(a>=0){const c=Math.sqrt(a),l=(-o+c)/(2*i),u=(-o-c)/(2*i);return[l,u].filter(f=>f>0&&f<1)}return[]}function Rd(t,e,n,r,i,o,s,a){const c=ga(t,n,i,s),l=ga(e,r,o,a);return[...c,...l]}function Oi(t,e,n){const r=Zn(t[0].x,t[1].x,t[2].x,t[3].x,.5),i=Zn(t[0].y,t[1].y,t[2].y,t[3].y,.5),o=Math.hypot(r-e,i-n),s=Math.min(Math.hypot(t[0].x-e,t[0].y-n),Math.hypot(t[1].x-e,t[1].y-n),Math.hypot(t[2].x-e,t[2].y-n),Math.hypot(t[3].x-e,t[3].y-n));return{points:t,distance:o,minDistance:s}}function Cd(t,e,n,r,i,o,s,a,c,l,u=1){let h={value:Oi([{x:t,y:e},{x:n,y:r},{x:i,y:o},{x:s,y:a}],c,l),next:null},d;for(;h!=null;){const{points:g,distance:y,minDistance:b}=h.value;if(h=h.next,(d==null||y<d.distance)&&(d={distance:y,minDistance:b}),d!=null&&d.distance-b<=u)continue;const[v,A]=tr(g[0].x,g[0].y,g[1].x,g[1].y,g[2].x,g[2].y,g[3].x,g[3].y,.5),w=[Oi(v,c,l),Oi(A,c,l)].sort(pa);h=Us(h,w,pa)}return d?.distance??1/0}var pa=(t,e)=>e.minDistance-t.minDistance;function Pd({point:t,anchor:e},n,r,i,o){if(t.size===0)return!1;let s=t.x,a=t.y;e!=null&&(s-=(e.x-.5)*t.size,a-=(e.y-.5)*t.size);let c=s;s<n?c=n:s>n+i&&(c=n+i);let l=a;a<r?l=r:a>r+o&&(l=r+o);const u=s-c,f=a-l;return Math.hypot(u,f)<=t.size/2}function Gd(t){return t!=null&&typeof t.point=="object"&&typeof t.label=="object"}var Bd={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}};function Ud(t,e,n=5){const r=new Map,i=[],o=new Map(Array.from(t.entries(),([a,c])=>[a,c.toSorted((l,u)=>u.point.size-l.point.size)])),s=[...o.values()].flat();for(const[a,c]of o.entries()){const l=[];if(c[0]?.label){for(let u=0,f=c.length;u<f;u++){const h=c[u],{point:d,label:g,anchor:y}=h,{text:b,width:v,height:A}=g,w=d.size/2;let $=0,K=0;if(w>0&&h.placement!=null){const j=Bd[h.placement];$=(v/2+w+n)*j.x,K=(A/2+w+n)*j.y}let C=d.x-v/2+$,T=d.y-A/2+K;if(y&&(C-=(y.x-.5)*d.size,T-=(y.y-.5)*d.size),Es(e,C,T,v,A)&&!s.some(j=>Pd(j,C,T,v,A))&&!i.some(j=>xs(j,C,T,v,A))){const j={index:u,text:b,x:C,y:T,width:v,height:A,datum:h};l.push(j),i.push(j)}}r.set(a,l)}}return r}function ya(t){return t.type==="continuous"||t.type==="log"}function ma(t){return t.type==="category"}function er(t){return"variant"in t&&t.variant==="unit-time"}function ba(t){return!("variant"in t)}function jd(t,e){return t===void 0||e===void 0?t!==void 0||e!==void 0:ya(t)&&ya(e)?t.type===e.type&&ee(t.domain,e.domain)&&ee(t.range,e.range):ma(t)&&ma(e)?er(t)&&er(e)?t.firstBandTime===e.firstBandTime&&t.lastBandTime===e.lastBandTime&&t.bandCount===e.bandCount&&t.intervalMs===e.intervalMs&&t.inset===e.inset&&t.step===e.step:ba(t)&&ba(e)?t.inset===e.inset&&t.step===e.step&&ee(t.domain,e.domain):!1:!1}function Hd(t){return t==null?!1:t.type==="category"?er(t)?Number.isFinite(t.firstBandTime)&&Number.isFinite(t.lastBandTime)&&Number.isFinite(t.bandCount)&&t.bandCount>0:t.domain.every(e=>e!=null):t.domain.every(e=>Number.isFinite(e)||e instanceof Date)&&t.range.every(e=>Number.isFinite(e))}function Si(t){switch(t.type){case"linear":case"step":case"multi-line":return[{x:t.x0,y:t.y0},{x:t.x1,y:t.y1}];case"cubic":return[{x:t.cp0x,y:t.cp0y},{x:t.cp3x,y:t.cp3y}]}}function Wd(t){const e=Si(t);return e[0].x>e[1].x&&e.reverse(),e}function Vd(t,e){const{x:n,y:r}=e;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:n,y0:r,x1:n,y1:r};case"step":return{type:"step",moveTo:t.moveTo,x0:n,y0:r,x1:n,y1:r,stepX:n};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:n,cp0y:r,cp1x:n,cp1y:r,cp2x:n,cp2y:r,cp3x:n,cp3y:r};case"multi-line":return{type:"multi-line",moveTo:t.moveTo,x0:n,y0:r,x1:n,y1:r,midPoints:t.midPoints.map(()=>({x:n,y:r}))}}}function Ti(t,e,n){const[r,i]=Si(t),o=i.x===r.x?0:(n.x-e.x)/(i.x-r.x),s=i.y===r.y?0:(n.y-e.y)/(i.y-r.y);switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:n.x,y1:n.y};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:e.x,cp0y:e.y,cp1x:n.x-(t.cp2x-r.x)*o,cp1y:n.y-(t.cp2y-r.y)*s,cp2x:n.x-(t.cp1x-r.x)*o,cp2y:n.y-(t.cp1y-r.y)*s,cp3x:n.x,cp3y:n.y};case"step":return{type:"step",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:n.x,y1:n.y,stepX:n.x-(t.stepX-r.x)*o};case"multi-line":return{type:"multi-line",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:n.x,y1:n.y,midPoints:t.midPoints.map(a=>({x:e.x+(a.x-r.x)*o,y:e.y+(a.y-r.y)*s}))}}}function zd(t,e,n){const{moveTo:r}=t,[i,o]=Wd(t),{x:s,y:a}=i,{x:c,y:l}=o;if(n<s)return Ti(t,i,i);if(e>c)return Ti(t,o,o);switch(t.type){case"linear":{const u=a===l?void 0:(l-a)/(c-s),f=u==null?a:u*(e-s)+a,h=u==null?a:u*(n-s)+a;return{type:"linear",moveTo:r,x0:e,y0:f,x1:n,y1:h}}case"step":if(n<=t.stepX){const u=t.y0;return{type:"step",moveTo:r,x0:e,y0:u,x1:n,y1:u,stepX:n}}else if(e>=t.stepX){const u=t.y1;return{type:"step",moveTo:r,x0:e,y0:u,x1:n,y1:u,stepX:e}}else{const{y0:u,y1:f,stepX:h}=t;return{type:"step",moveTo:r,x0:e,y0:u,x1:n,y1:f,stepX:h}}case"cubic":{const u=wi(t.cp0x,t.cp1x,t.cp2x,t.cp3x,e);let[f,h]=tr(t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,u);const d=wi(h[0].x,h[1].x,h[2].x,h[3].x,n);return[h,f]=tr(h[0].x,h[0].y,h[1].x,h[1].y,h[2].x,h[2].y,h[3].x,h[3].y,d),{type:"cubic",moveTo:r,cp0x:h[0].x,cp0y:h[0].y,cp1x:h[1].x,cp1y:h[1].y,cp2x:h[2].x,cp2y:h[2].y,cp3x:h[3].x,cp3y:h[3].y}}case"multi-line":{const{midPoints:u}=t,f=u.findLastIndex(C=>C.x<=e);let h=u.findIndex(C=>C.x>=n);h===-1&&(h=u.length);const d=f>=0?u[f]:void 0,g=d?.x??s,y=d?.y??a,b=h<u.length?u[h]:void 0,v=b?.x??c,A=b?.y??l,w=y===A?void 0:(A-y)/(v-g),$=w==null?y:w*(g-s)+y,K=w==null?y:w*(v-s)+y;return{type:"multi-line",moveTo:r,x0:e,y0:$,x1:n,y1:K,midPoints:u.slice(Math.max(f,0),h)}}}}var va=(t=>(t[t.MoveTo=0]="MoveTo",t[t.LineTo=1]="LineTo",t[t.Skip=2]="Skip",t))(va||{});function Kd(t){const e=[];let n=0,r=Number.NaN,i=Number.NaN;for(const{x:o,y:s}of t){if(n>0){const a=n===1;e.push({type:"linear",moveTo:a,x0:r,y0:i,x1:o,y1:s})}n+=1,r=o,i=s}return e}var qd={start:0,middle:.5,end:1};function Yd(t,e){const n=[];let r=0,i=Number.NaN,o=Number.NaN;const s=typeof e=="number"?e:qd[e];for(const{x:a,y:c}of t){if(r>0){const l=r===1,u=i+(a-i)*s;n.push({type:"step",moveTo:l,x0:i,y0:o,x1:a,y1:c,stepX:u})}r+=1,i=a,o=c}return n}function Xd(t,e){const n=Array.isArray(t)?t:Array.from(t);if(n.length<=1)return[];const r=.05,i=n.map((s,a)=>{const c=a===0?s:n[a-1],l=a===n.length-1?s:n[a+1],u=a===0||a===n.length-1;if(Math.sign(c.y-s.y)===Math.sign(l.y-s.y))return 0;if(!u){const f=Math.abs(c.y-l.y),h=Math.abs(s.y-c.y)/f,d=Math.abs(s.y-l.y)/f;if(h<=r||1-h<=r||d<=r||1-d<=r)return 0}return(l.y-c.y)/(l.x-c.x)});i[1]===0&&(i[0]*=2),i.at(-2)===0&&(i[i.length-1]*=2);const o=[];for(let s=1;s<n.length;s+=1){const a=n[s-1],c=i[s-1],l=n[s],u=i[s],f=l.x-a.x,h=l.y-a.y;let d=f*e/3,g=f*c*e/3,y=f*e/3,b=f*u*e/3;u===0&&Math.abs(g)>Math.abs(h)&&(d*=Math.abs(h/g),g=Math.sign(g)*Math.abs(h)),c===0&&Math.abs(b)>Math.abs(h)&&(y*=Math.abs(h/b),b=Math.sign(b)*Math.abs(h)),o.push({type:"cubic",moveTo:s===1,cp0x:a.x,cp0y:a.y,cp1x:a.x+d,cp1y:a.y+g,cp2x:l.x-y,cp2y:l.y-b,cp3x:l.x,cp3y:l.y})}return o}var Mi=0,Fi=1;function Jd(t){return{x:{min:t?.x?.min??Mi,max:t?.x?.max??Fi},y:{min:t?.y?.min??Mi,max:t?.y?.max??Fi}}}var Qd=class extends fe{constructor(){super(...arguments),this._dirty=!0}markDirty(){this._dirty=!0}markClean(t){this._dirty=!1}isDirty(){return this._dirty}onChangeDetection(t){this.markDirty()}},nr={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Di(t,e=new Date(t.getFullYear(),0,1)){const n=t.getTimezoneOffset()-e.getTimezoneOffset(),r=t.getTime()-e.getTime()+n*6e4,i=36e5*24;return Math.floor(r/i)}function xa(t,e){const r=new Date(t.getFullYear(),0,1).getDay(),i=(e-r+7)%7,o=new Date(t.getFullYear(),0,i+1);return o<=t?Math.floor(Di(t,o)/7)+1:0}var Zd=0,Ea=1,Aa=4;function wa(t,e=t.getFullYear()){const r=new Date(e,0,1).getDay(),i=(Aa-r+7)%7,o=new Date(e,0,i-(Aa-Ea)+1);return o<=t?Math.floor(Di(t,o)/7)+1:wa(t,e-1)}function tg(t){const e=t.getTimezoneOffset(),n=Math.abs(e);return`${e>0?"-":"+"}${z(Math.floor(n/60),2,"0")}${z(Math.floor(n%60),2,"0")}`}var eg={a:t=>nr.shortDays[t.getDay()],A:t=>nr.days[t.getDay()],b:t=>nr.shortMonths[t.getMonth()],B:t=>nr.months[t.getMonth()],c:"%x, %X",d:(t,e)=>z(t.getDate(),2,e??"0"),e:"%_d",f:(t,e)=>z(t.getMilliseconds()*1e3,6,e??"0"),H:(t,e)=>z(t.getHours(),2,e??"0"),I:(t,e)=>{const n=t.getHours()%12;return n===0?"12":z(n,2,e??"0")},j:(t,e)=>z(Di(t)+1,3,e??"0"),m:(t,e)=>z(t.getMonth()+1,2,e??"0"),M:(t,e)=>z(t.getMinutes(),2,e??"0"),L:(t,e)=>z(t.getMilliseconds(),3,e??"0"),p:t=>t.getHours()<12?"AM":"PM",Q:t=>String(t.getTime()),s:t=>String(Math.floor(t.getTime()/1e3)),S:(t,e)=>z(t.getSeconds(),2,e??"0"),u:t=>{let e=t.getDay();return e<1&&(e+=7),String(e%7)},U:(t,e)=>z(xa(t,Zd),2,e??"0"),V:(t,e)=>z(wa(t),2,e??"0"),w:(t,e)=>z(t.getDay(),2,e??"0"),W:(t,e)=>z(xa(t,Ea),2,e??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(t,e)=>z(t.getFullYear()%100,2,e??"0"),Y:(t,e)=>z(t.getFullYear(),4,e??"0"),Z:t=>tg(t),"%":()=>"%"},ng={_:" ",0:"0","-":""};function z(t,e,n){const r=String(Math.floor(t));return r.length>=e?r:`${n.repeat(e-r.length)}${r}`}function Oa(t){const e=[];for(;t.length>0;){let n=t.indexOf("%");if(n!==0){const a=n>0?t.substring(0,n):t;e.push(a)}if(n<0)break;const r=t[n+1],i=ng[r];i!=null&&n++;const o=t[n+1],s=eg[o];if(typeof s=="function")e.push([s,i]);else if(typeof s=="string"){const a=Oa(s);e.push([a,i])}else e.push(`${i??""}${o}`);t=t.substring(n+2)}return n=>{const r=typeof n=="number"?new Date(n):n;return e.map(i=>typeof i=="string"?i:i[0](r,i[1])).join("")}}function rg(t,e){const n=$t("button",rr("ag-charts-input ag-charts-button",e));return t.label===void 0?(n.append(Sa(t.icon)),n.ariaLabel=t.altText):n.append(t.label),n.addEventListener("click",t.onPress),Ye(n,e),n}function ig(t,e){const n=$t("input",rr("ag-charts-input ag-charts-checkbox",e));return n.type="checkbox",n.checked=t.checked,n.addEventListener("change",r=>t.onChange(n.checked,r)),n.addEventListener("keydown",r=>{Gs(r)&&(r.preventDefault(),n.click())}),Ye(n,e),n}function og(t,e){const n=$t("select",rr("ag-charts-input ag-charts-select",e));return n.append(...t.options.map(r=>{const i=$t("option");return i.value=r.value,i.textContent=r.label,i})),de(n,"data-preventdefault",!1),n.value=t.value,n.addEventListener("change",r=>t.onChange(n.value,r)),Ye(n,e),n}function sg(t,e){const n=$t("textarea",rr("ag-charts-input ag-charts-textarea",e));return n.value=t.value,n.addEventListener("input",r=>t.onChange(n.value,r)),Ye(n,e),de(n,"data-preventdefault",!1),n}function Sa(t){const e=$t("span",`ag-charts-icon ag-charts-icon-${t}`);return de(e,"aria-hidden",!0),e}function rr(t,e){return e==null?t:`${t} ${e.class}`}var ag=t=>t,cg=t=>1-Math.cos(t*Math.PI/2),lg=t=>Math.sin(t*Math.PI/2),ug=t=>-(Math.cos(t*Math.PI)-1)/2,fg=t=>t*t,hg=t=>1-(1-t)**2,dg=t=>t<.5?2*t*t:1-(-2*t+2)**2/2,gg=t=>2*Math.asin(t)/Math.PI,Ta=(t,e)=>t===e;function ir(t){return function(e,n){const r=`__${n}`;e[n]||$i(e,n,r,t)}}function pg(t){return ir(t)}function yg(t){return ir(t)}function mg(t){const e=t??{};return e.equals=ee,ir(t)}function bg(t){return function(e,n){const r=`__${n}`;e[n]||$i(e,n,r,t)}}function vg(t){return function(e,n){const r=`__${n}`;e[n]||$i(e,n,r,t)}}function $i(t,e,n,r){const{changeCb:i,convertor:o,checkDirtyOnAssignment:s=!1}=r??{},a={changeCb:i,checkDirtyOnAssignment:s,convertor:o},c=Ag(n,Eg(xg(wg(n,a),a),a),a);function l(){return this[n]}Object.defineProperty(t,e,{set:c,get:l,enumerable:!0,configurable:!0})}function xg(t,e){const{convertor:n}=e;if(n){let i=function(s){t.call(this,o(s))};var r=i;const o=n;return i}return t}var Ma=Symbol("no-change");function Eg(t,e){const{changeCb:n}=e;if(n){let i=function(s){const a=t.call(this,s);return a!==Ma&&o.call(this,this),a};var r=i;const o=n;return i}return t}function Ag(t,e,n){const{checkDirtyOnAssignment:r}=n;if(r){let o=function(s){const a=e.call(this,s);return s?._dirty===!0&&this.markDirty(t),a};var i=o;return o}return e}function wg(t,e){const{equals:n=Ta}=e;function r(i){const o=this[t];return n(i,o)?Ma:(this[t]=i,this.onChangeDetection(t),i)}return r}export{Pn as AGGREGATION_INDEX_UNSET,Mt as AGGREGATION_INDEX_X_MAX,Et as AGGREGATION_INDEX_X_MIN,Ht as AGGREGATION_INDEX_Y_MAX,jt as AGGREGATION_INDEX_Y_MIN,fu as AGGREGATION_MAX_POINTS,Cn as AGGREGATION_MIN_RANGE,Wt as AGGREGATION_SPAN,zr as AGGREGATION_THRESHOLD,pc as AbstractModuleInstance,Zr as ActionOnSet,th as AdjacencyListGraph,mf as AsyncAwaitQueue,Bt as BASE_FONT_SIZE,Fn as BREAK_TRANSFORM_CHAIN,fe as BaseProperties,Xe as Border,Nf as CANVAS_HEIGHT,If as CANVAS_TO_BUFFER_DEFAULTS,Lf as CANVAS_WIDTH,Zo as CARTESIAN_AXIS_TYPE,Qo as CARTESIAN_POSITION,tf as CallbackCache,Qd as ChangeDetectableProperties,os as ChartAxisDirection,ss as ChartUpdateType,dr as CleanupRegistry,Nn as Color,_f as ConfiguredCanvasMixin,ju as DEFAULT_ANNOTATION_HANDLE_FILL,Vu as DEFAULT_ANNOTATION_STATISTICS_COLOR,zu as DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,Ku as DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,qu as DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,Hu as DEFAULT_ANNOTATION_STATISTICS_FILL,Wu as DEFAULT_ANNOTATION_STATISTICS_STROKE,wu as DEFAULT_CAPTION_ALIGNMENT,Au as DEFAULT_CAPTION_LAYOUT_STYLE,Gu as DEFAULT_FIBONACCI_STROKES,Uu as DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,Pu as DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,Ru as DEFAULT_POLAR_SERIES_STROKE,Eu as DEFAULT_SHADOW_COLOUR,Cu as DEFAULT_SPARKLINE_CROSSHAIR_STROKE,Ju as DEFAULT_TEXTBOX_COLOR,Yu as DEFAULT_TEXTBOX_FILL,Xu as DEFAULT_TEXTBOX_STROKE,Bu as DEFAULT_TEXT_ANNOTATION_COLOR,Qu as DEFAULT_TOOLBAR_POSITION,_l as DIRECTION_SWAP_AXES,Ci as Debug,Yi as DebugMetrics,bg as DeclaredSceneChangeDetection,vg as DeclaredSceneObjectChangeDetection,Uf as Deprecated,jf as DeprecatedAndRenamedTo,De as EllipsisChar,fo as ErrorType,Na as EventEmitter,Gl as FILL_GRADIENT_BLANK_DEFAULTS,zl as FILL_GRADIENT_CONIC_SERIES_DEFAULTS,ze as FILL_GRADIENT_LINEAR_DEFAULTS,Bl as FILL_GRADIENT_LINEAR_HIERARCHY_DEFAULTS,jl as FILL_GRADIENT_LINEAR_KEYED_DEFAULTS,Ul as FILL_GRADIENT_LINEAR_SINGLE_DEFAULTS,In as FILL_GRADIENT_RADIAL_DEFAULTS,Hl as FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS,Vl as FILL_GRADIENT_RADIAL_REVERSED_SERIES_DEFAULTS,Wl as FILL_GRADIENT_RADIAL_SERIES_DEFAULTS,Jl as FILL_IMAGE_BLANK_DEFAULTS,is as FILL_IMAGE_DEFAULTS,ql as FILL_PATTERN_BLANK_DEFAULTS,Ke as FILL_PATTERN_DEFAULTS,Yl as FILL_PATTERN_HIERARCHY_DEFAULTS,Xl as FILL_PATTERN_KEYED_DEFAULTS,Kl as FILL_PATTERN_SINGLE_DEFAULTS,Jo as FONT_SIZE,Il as FONT_SIZE_RATIO,xu as IS_DARK_THEME,_n as InterpolationProperties,Zl as LABEL_BOXING_DEFAULTS,iu as LEGEND_CONTAINER_THEME,ar as LRUCache,cn as LineSplitter,ji as Logger,eu as MARKER_SERIES_HIGHLIGHT_STYLE,tu as MULTI_SERIES_HIGHLIGHT_STYLE,su as MementoCaretaker,Qi as ModuleRegistry,_i as ModuleType,Sf as ObserveChanges,Nu as PALETTE_ALT_DOWN_FILL,ku as PALETTE_ALT_DOWN_STROKE,Iu as PALETTE_ALT_NEUTRAL_FILL,_u as PALETTE_ALT_NEUTRAL_STROKE,Lu as PALETTE_ALT_UP_FILL,$u as PALETTE_ALT_UP_STROKE,Mu as PALETTE_DOWN_FILL,Su as PALETTE_DOWN_STROKE,Du as PALETTE_NEUTRAL_FILL,Fu as PALETTE_NEUTRAL_STROKE,Tu as PALETTE_UP_FILL,Ou as PALETTE_UP_STROKE,nu as PART_WHOLE_HIGHLIGHT_STYLE,es as POLAR_AXIS_SHAPE,ts as POLAR_AXIS_TYPE,Ps as PREV_NEXT_KEYS,Ze as Padding,Oh as ParallelStateMachine,us as PolarZIndexMap,Wr as PropertiesArray,rt as Property,Of as ProxyOnWrite,wf as ProxyProperty,Qr as ProxyPropertyOnWrite,Cl as SAFE_FILLS_OPERATION,Rl as SAFE_FILL_OPERATION,Pl as SAFE_RANGE2_OPERATION,rs as SAFE_STROKE_FILL_OPERATION,ou as SEGMENTATION_DEFAULTS,ru as SINGLE_SERIES_HIGHLIGHT_STYLE,Pr as SKIP_JS_BUILTINS,Ri as ScaleAlignment,mg as SceneArrayChangeDetection,ir as SceneChangeDetection,yg as SceneObjectChangeDetection,pg as SceneRefChangeDetection,ls as SeriesContentZIndexMap,cs as SeriesZIndexMap,Cf as SimpleCache,va as SpanJoin,wh as StateMachine,Ah as StateMachineProperty,Ta as TRIPLE_EQ,Hs as TextMeasurer,vi as TickIntervals,eo as TrimCharsRegex,$e as TrimEdgeGuard,Fi as UNIT_MAX,Mi as UNIT_MIN,mr as UnknownError,_t as ValidationError,la as Vec2,ha as Vec4,Ns as Vertex,Pf as WeakCache,as as ZIndexMap,_s as addEscapeEventListener,rt as addFakeTransformToInstanceProperty,ih as addMouseCloseListener,Nr as addObserverToInstanceProperty,sh as addOverrideFocusVisibleEventListener,oh as addTouchCloseListener,St as addTransformToInstanceProperty,yu as aggregationBucketForDatum,mu as aggregationDatumMatchesIndex,pu as aggregationDomain,fs as aggregationIndexForXRatio,Yr as aggregationRangeFittingPoints,Gn as aggregationXRatioForDatumIndex,Bn as aggregationXRatioForXValue,ht as and,gf as angleBetween,pf as angularPadding,pr as appendEllipsis,Rf as applySkiaPatches,Vf as arcDistanceSquared,jd as areScalingEqual,vr as array,Ce as arrayLength,Y as arrayOf,Ot as arrayOfDefs,ee as arraysEqual,Ll as assignIfNotStrictlyEqual,F as attachDescription,gt as attachListener,Tn as autoSizedLabelOptionsDefs,ul as barHighlightOptionsDef,Cd as bezier2DDistance,Rd as bezier2DExtrema,x as boolean,Ge as borderOptionsDef,xs as boxCollides,Es as boxContains,Tf as boxEmpty,Mf as boxesEqual,Oa as buildDateFormatter,ge as cachedTextMeasurer,kc as calcLineHeight,Eh as calculatePlacement,gs as callWithContext,N as callback,yn as callbackDefs,Pt as callbackOf,Yc as ceilTo,ed as checkDatum,Ra as circularSliceArray,tt as clamp,cu as clampArray,zs as clipLines,zd as clipSpanX,Vd as collapseSpanToPoint,bu as collectAggregationLevels,I as color,Sr as colorStopsOrderValidator,xn as colorUnion,bt as commonChartOptionsDefs,Sn as commonSeriesOptionsDefs,Ue as commonSeriesThemeableOptionsDefs,Jr as compactAggregationIndices,Os as compareDates,hs as computeExtremesAggregation,vu as computeExtremesAggregationPartial,Ct as constant,Go as contextMenuItemsArray,mo as countFractionDigits,Nc as countLines,Xr as createAggregationIndices,rg as createButton,As as createCanvasContext,ig as createCheckbox,ti as createDeprecationWarning,$t as createElement,dh as createElementId,Sa as createIcon,hh as createId,td as createIdsGenerator,Eo as createNumberFormatter,og as createSelect,Sh as createSvgElement,sg as createTextArea,Wh as createTicks,Re as date,Jh as dateToNumber,Zh as dateTruncationForDomain,Ss as datesSortOrder,Cc as debounce,Ch as decodeIntervalValue,Wn as deepClone,Ko as deepFreeze,na as defaultEpoch,nt as defined,Jd as definedZoomState,Hf as diffArrays,Ba as distribute,Th as downloadUrl,Pa as dropFirstWhile,Ga as dropLastWhile,zt as durationDay,Vt as durationHour,kt as durationMinute,pi as durationMonth,ye as durationSecond,Ys as durationWeek,tn as durationYear,cg as easeIn,ug as easeInOut,dg as easeInOutQuad,fg as easeInQuad,lg as easeOut,hg as easeOutQuad,Uh as encodedToTimestamp,ec as enterpriseRegistry,We as entries,vl as errorBarOptionsDefs,Ho as errorBarThemeableOptionsDefs,Xh as estimateTickCount,Zn as evaluateBezier,Dl as every,au as expandLegendPosition,Ts as extent,Wo as extractDecoratedProperties,La as extractDomain,To as fillGradientDefaults,Fo as fillImageDefaults,B as fillOptionsDef,Mo as fillPatternDefaults,Ff as findMaxIndex,$f as findMaxValue,Df as findMinIndex,Rn as findMinMax,kf as findMinValue,lu as findRangeExtent,Sl as first,Ji as flush,rf as focusCursorAtEnd,No as fontFamilyFull,mt as fontOptionsDef,Io as fontWeight,Ds as formatNumber,Uo as formatObjectValidator,Yf as formatPercent,qf as formatValue,$l as fromPairs,gh as generateUUID,Zf as geoJson,ms as getAngleRatioRadians,bs as getAttribute,Wa as getDOMMatrix,Me as getDocument,nf as getElementBBox,sf as getIconClassNames,Va as getImage,lh as getLastFocus,cf as getMaxInnerRectSize,Un as getMidpointsForIndices,lf as getMinOuterRectSize,Pi as getOffscreenCanvas,Cr as getPath,Ha as getPath2D,za as getResizeObserver,Ql as getSequentialColors,zh as getTickTimeInterval,It as getWindow,Mr as googleFont,vn as gradientColorStops,al as gradientStrict,pn as greaterThan,_a as groupBy,so as guardTextEdges,si as hasNoModifiers,mn as hasRequiredInPath,$o as highlightOptionsDef,go as htmlElement,zc as inRange,ah as initRovingTabIndex,Us as insertListItemsSorted,Vc as instanceOf,Al as interpolationOptionsDefs,kh as intervalCeil,Hh as intervalEpoch,Xs as intervalExtent,Kt as intervalFloor,Js as intervalHierarchy,Yn as intervalMilliseconds,Nh as intervalNext,Lh as intervalPrevious,_h as intervalRange,Ih as intervalRangeCount,Rh as intervalRangeNumeric,jh as intervalRangeStartIndex,bi as intervalStep,mi as intervalUnit,gg as inverseEaseOut,L as isArray,ps as isBetweenAngles,no as isBoolean,Gs as isButtonClickEvent,io as isColor,ca as isContinuous,ie as isDate,$n as isDecoratedObject,ln as isDefined,qh as isDenseInterval,qa as isDocumentFragment,lr as isElement,Tc as isEmptyObject,Mc as isEnumKey,Fc as isEnumValue,ft as isFiniteNumber,vt as isFunction,Ai as isGradientFill,Ld as isGradientFillArray,_d as isGradientOrPatternFill,Ui as isHTMLElement,gr as isHtmlElement,Id as isImageFill,of as isInputPending,qc as isInteger,$c as isKeyOf,Kc as isNegative,Bi as isNode,Le as isNumber,Ar as isNumberEqual,aa as isNumberObject,X as isObject,Sc as isObjectLike,qo as isObjectWithProperty,Nl as isObjectWithStringProperty,da as isPatternFill,W as isPlainObject,Gd as isPointLabelDatum,he as isProperties,ro as isRegExp,Hd as isScaleValid,co as isSegmentTruncated,xt as isString,Nd as isStringFillArray,xi as isStringObject,Dc as isSymbol,Ne as isTextTruncated,Lc as isTruncated,er as isUnitTimeCategoryScaling,un as isValidDate,xo as isValidNumberFormat,wl as iterate,se as joinFormatted,Is as jsonApply,ni as jsonDiff,eh as jsonPropertyCompare,ii as jsonWalk,Ic as kebabCase,Fr as labelBoxOptionsDef,$r as legendPositionValidator,gn as lessThan,Hc as lessThanOrEqual,lo as levenshteinDistance,U as lineDashOptionsDef,Wf as lineDistanceSquared,fl as lineHighlightOptionsDef,Lo as lineSegmentOptions,gl as lineSegmentation,ag as linear,Gt as linearGaugeSeriesOptionsDef,Yo as linearGaugeSeriesThemeableOptionsDef,Br as linearGaugeTargetOptionsDef,Kd as linearPoints,Tt as listDecoratedProperties,oa as lowestGranularityForInterval,Qh as lowestGranularityUnitForTicks,sa as lowestGranularityUnitForValue,ch as makeAccessibleClickListener,zo as mapValues,bl as markerOptionsDefs,jo as markerStyleOptionsDefs,Ws as measureTextSegments,yh as memo,Rr as merge,Ml as mergeArrayDefaults,_r as mergeDefaults,Xc as modulus,hl as multiSeriesHighlightOptionsDef,vh as nearestSquared,xh as nearestSquaredInContainer,Vr as nextPowerOf2,Yh as niceTicksDomain,Ms as normalisedExtentWithMetadata,zf as normalisedTimeExtentWithMetadata,hf as normalizeAngle180,Ft as normalizeAngle360,yf as normalizeAngle360FromDegrees,ff as normalizeAngle360Inclusive,m as number,Be as numberFormatValidator,Er as numberMin,po as numberRange,ho as object,Ir as objectsEqual,Vo as objectsEqualWith,V as optionsDefs,G as or,Pe as padding,_o as paddingOptions,Or as parseNumberFormat,kl as partialAssign,bf as pause,Fl as pick,Ud as placeLabels,p as positiveNumber,jc as positiveNumberNonZero,uu as previousPowerOf2,Ln as radialGaugeSeriesOptionsDef,Xo as radialGaugeSeriesThemeableOptionsDef,Ur as radialGaugeTargetOptionsDef,ia as range,An as rangeValidator,k as ratio,rd as readIntegratedWrappedValue,Xi as record,O as required,Ti as rescaleSpan,qs as rescaleVisibleRange,fh as resetIds,uf as rotatePoint,wr as roundTo,yr as safeCall,je as seriesLabelOptionsDefs,Co as seriesTooltipRangeValidator,de as setAttribute,Ye as setAttributes,Ua as setDocument,ef as setElementBBox,vs as setElementStyle,Af as setElementStyles,Gr as setPath,ja as setWindow,El as shadowOptionsDefs,ri as shallowClone,Do as shapeHighlightOptionsDef,ko as shapeSegmentOptions,dl as shapeSegmentation,le as shapeValidator,bh as simpleMemorize,mh as simpleMemorize2,Xd as smoothPoints,wi as solveBezier,Bf as sortAndUniqueDates,Ca as sortBasedOnArray,Si as spanRange,tr as splitBezier2D,Yd as stepPoints,uh as stopPageScrolling,Tl as strictObjectKeys,Wc as strictUnion,S as string,xr as stringLength,Ie as stringifyValue,_ as strokeOptionsDef,ue as textOrSegments,So as themeOperator,Pc as throttle,Kh as tickFormat,Xn as tickStep,cr as toArray,df as toDegrees,oo as toFontString,Ol as toIterable,Rc as toPlainText,ys as toRadians,oe as toTextString,Bo as toolbarButtonOptionsDefs,Mn as tooltipOptionsDefs,xl as tooltipOptionsDefsWithArea,nd as transformIntegratedCategoryValue,pe as truncateLine,br as typeUnion,M as undocumented,ao as unguardTextEdges,E as union,dn as unionSymbol,Ia as unique,Rt as validate,vf as withTimeout,Ve as without,gi as wrapLines,Fh as wrapText,Mh as wrapTextOrSegments,Ks as wrapTextSegments};