ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
1 lines • 721 kB
JavaScript
var zh=Object.defineProperty,dy=Object.getOwnPropertyDescriptor,py=(e,t)=>{for(var i in t)zh(e,i,{get:t[i],enumerable:!0})},f=(e,t,i,s)=>{for(var n=s>1?void 0:s?dy(t,i):t,a=e.length-1,r;a>=0;a--)(r=e[a])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&zh(t,i,n),n};import{and as _s,array as gy,boolean as Be,color as fy,date as jh,defined as st,greaterThan as Ho,lessThan as Wo,lineDashOptionsDef as my,number as Hs,or as Bh,positiveNumber as Vh,ratio as Gh,string as pi,strokeOptionsDef as yy,typeUnion as Yo,undocumented as by,union as xy}from"ag-charts-core";import{ErrorType as vy,ValidationError as My,and as Zo,array as _h,arrayLength as Sy,arrayOf as za,arrayOfDefs as ja,attachDescription as Iy,boolean as U,callback as Ft,callbackDefs as Hh,callbackOf as Uo,color as Wh,date as Dy,defined as Yh,fillOptionsDef as es,fontOptionsDef as Fn,greaterThan as wy,htmlElement as ky,lessThan as Ay,lineDashOptionsDef as Ws,number as zt,object as Ly,optionsDefs as Zh,or as gi,positiveNumber as Z,ratio as fi,required as Ys,string as ht,strokeOptionsDef as Ke,typeUnion as Cy,undocumented as re,union as ft}from"ag-charts-core";import{and as Zs,arrayLength as Ny,arrayOf as zn,arrayOfDefs as Uh,attachDescription as Ba,boolean as Kt,callback as Kh,callbackDefs as Ty,callbackOf as Oy,color as jn,defined as Ko,fontOptionsDef as Va,greaterThan as $h,instanceOf as Ey,isValidNumberFormat as Py,lessThan as Xh,lineDashOptionsDef as qh,number as is,object as Ry,optionsDefs as Fy,or as Ga,positiveNumber as ve,positiveNumberNonZero as Jh,ratio as Qh,required as Bn,string as Ei,strokeOptionsDef as tu,themeOperator as zy,undocumented as $o,union as Us}from"ag-charts-core";var eu={};py(eu,{TimeInterval:()=>Ot,day:()=>yi,friday:()=>nb,hour:()=>qs,millisecond:()=>iu,minute:()=>Xs,monday:()=>tb,month:()=>Ve,saturday:()=>ab,second:()=>$s,sunday:()=>$e,thursday:()=>sb,tuesday:()=>eb,utcDay:()=>Xo,utcHour:()=>yb,utcMinute:()=>gb,utcMonth:()=>ou,utcYear:()=>ru,wednesday:()=>ib,year:()=>ss});var Pi=1e3,$t=Pi*60,oe=$t*60,Ae=oe*24,mi=Ae*7,Vn=Ae*30,Ks=Ae*365;import{Logger as jy}from"ag-charts-core";var Ot=class Th{constructor(t,i,s,n,a,r=1,l){this.unit=t,this.milliseconds=i,this.hierarchy=s,this._encode=n,this._decode=a,this.step=r,this._rangeCallback=l}static extent(t,i,s){if(t.getTime()>i.getTime()&&([t,i]=[i,t],s!=null&&(s=[1-s[1],1-s[0]])),s!=null){const n=i.getTime()-t.getTime(),a=t.getTime();t=new Date(a+s[0]*n),i=new Date(a+s[1]*n)}return[t,i]}getOffset(t,i){return Math.floor(this._encode(new Date(t)))%i}floor(t){const i=new Date(t),s=this._encode(i);return this._decode(s)}ceil(t){const i=new Date(Number(t)-1),s=this._encode(i);return this._decode(s+1)}rangeIndices(t,i,{extend:s=!1,visibleRange:n=[0,1],limit:a}){[t,i]=Th.extent(t,i,n);const r=this._encode(s?this.floor(t):this.ceil(t));let l=this._encode(s?this.ceil(i):this.floor(i));return a!=null&&l-r>a&&(l=r+a),[r,l]}range(t,i,s={}){let n;t.getTime()>i.getTime()?n=this._rangeCallback?.(i,t):n=this._rangeCallback?.(t,i);const[a,r]=this.rangeIndices(t,i,s),l=[];for(let o=a;o<=r;o++){const c=this._decode(o);l.push(c)}return n?.(),l}previous(t){return this._decode(this._encode(this.ceil(t))-1)}next(t){return this._decode(this._encode(this.floor(t))+1)}rangeCount(t,i,s={}){const[n,a]=this.rangeIndices(t,i,s);return a-n}every(t,i){if(t===1&&i?.snapTo!=null)return this;const{unit:s,milliseconds:n,hierarchy:a,step:r}=this;let l=0,o;const c=t;t=Math.max(1,Math.round(t)),c!==t&&jy.warnOnce(`interval step of [${c}] rounded to [${t}].`);const{snapTo:h="start"}=i??{};if(typeof h=="string"){const p=l;o=(g,y)=>{const b=h==="start"?g:y;return l=this.getOffset(b,t),()=>l=p}}else typeof h=="number"?l=this.getOffset(new Date(h),t):h instanceof Date&&(l=this.getOffset(h,t));const u=p=>Math.floor((this._encode(p)-l)/t),d=p=>this._decode(p*t+l);return new Th(s,n*t,a,u,d,r*t,o)}};function By(e){return e.getFullYear()}function Vy(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}var Gy=(365+1/4-1/100+1/400)*24*60*60*1e3,ss=new Ot("year",Gy,void 0,By,Vy);function _y(e){return e.getFullYear()*12+e.getMonth()}function Hy(e){const t=Math.floor(e/12),i=e-t*12;return new Date(t,i,1)}var Ve=new Ot("month",ss.milliseconds/12,ss,_y,Hy);function Wy(e){const t=e.getTimezoneOffset()*$t;return Math.floor((e.getTime()-t)/Ae)}function Yy(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}var yi=new Ot("day",24*60*60*1e3,Ve,Wy,Yy);function Zy(e){return e.getTime()}function Uy(e){return new Date(e)}var iu=new Ot("millisecond",1,yi,Zy,Uy),su=new Date().getTimezoneOffset()*$t;function Ky(e){return Math.floor((e.getTime()-su)/Pi)}function $y(e){return new Date(su+e*Pi)}var $s=new Ot("second",1e3,yi,Ky,$y),nu=new Date().getTimezoneOffset()*$t;function Xy(e){return Math.floor((e.getTime()-nu)/$t)}function qy(e){return new Date(nu+e*$t)}var Xs=new Ot("minute",60*1e3,yi,Xy,qy),au=new Date().getTimezoneOffset()*$t;function Jy(e){return Math.floor((e.getTime()-au)/oe)}function Qy(e){return new Date(au+e*oe)}var qs=new Ot("hour",60*60*1e3,yi,Jy,Qy);function ns(e){const i=(7+e-4)%7;function s(a){const r=a.getTimezoneOffset()*$t;return Math.floor((a.getTime()-r)/mi-i/7)}function n(a){const r=new Date(1970,0,1);return r.setDate(r.getDate()+a*7+i),r}return new Ot("day",7*24*60*60*1e3,Ve,s,n,7)}var $e=ns(0),tb=ns(1),eb=ns(2),ib=ns(3),sb=ns(4),nb=ns(5),ab=ns(6);function rb(e){return e.getUTCFullYear()}function ob(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}var ru=new Ot("year",ss.milliseconds,void 0,rb,ob);function lb(e){return e.getUTCFullYear()*12+e.getUTCMonth()}function cb(e){const t=Math.floor(e/12),i=e-t*12;return new Date(Date.UTC(t,i,1))}var ou=new Ot("month",Ve.milliseconds,ru,lb,cb);function hb(e){return Math.floor(e.getTime()/Ae)}function ub(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}var Xo=new Ot("day",24*60*60*1e3,ou,hb,ub);function db(e){return Math.floor(e.getTime()/$t)}function pb(e){return new Date(e*$t)}var gb=new Ot("minute",60*1e3,Xo,db,pb);function fb(e){return Math.floor(e.getTime()/oe)}function mb(e){return new Date(e*oe)}var yb=new Ot("hour",60*60*1e3,Xo,fb,mb),lu=Us("millisecond","second","minute","hour","day","month","year"),_a=Ba(Py,"a valid number format string"),cu={enabled:Kt,text:Ei,padding:is,...Va},bb=Ba({enabled:Kt,type:Bn(Us("line","range")),range:Zs(Ba((e,{options:t})=>t.type==="range","crossLine type to be 'range'"),zn(Ko),Ny(2,2)),value:Zs(Ba((e,{options:t})=>t.type==="line","crossLine type to be 'line'"),Ko),label:cu,fill:Ei,fillOpacity:Qh,...tu,...qh},"cross-line options"),xb={...bb,label:{...cu,position:Us("top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"),rotation:is}},hu={enabled:Kt,rotation:is,avoidCollisions:Kt,minSpacing:ve,spacing:ve,formatter:Kh,itemStyler:Ty({...Va,spacing:is}),...Va},Ha={autoRotate:Kt,autoRotateAngle:is,...hu},uu={format:_a,...Ha},qo={format:Ga(Ei,Ry),...Ha},du={enabled:Kt,width:ve,size:ve,stroke:jn},pu={enabled:Kt,label:qo,tick:du},Jo={reverse:Kt,gridLine:{enabled:Kt,width:ve,style:Uh({stroke:Ga(jn,zy),lineDash:zn(ve)},"a grid-line style object array")},interval:{values:zn(Ko),minSpacing:ve},label:hu,line:{enabled:Kt,width:ve,stroke:jn},tick:du};Jo.context=$o(()=>!0),Jo.layoutConstraints=$o({stacked:Bn(Kt),align:Bn(Us("start","end")),unit:Bn(Us("percent","px")),width:Bn(ve)});var as={...Jo,keys:zn(Ei),crossLines:Uh(xb,"a cross-line options array"),position:Us("top","right","bottom","left"),thickness:ve,title:{enabled:Kt,text:Ei,spacing:ve,formatter:Kh,...Va}};as.title._enabledFromTheme=$o(Kt);function Js(e){const t={enabled:Kt,xOffset:is,yOffset:is,renderer:Oy(Ga(Ei,Fy({text:Ei,color:jn,backgroundColor:jn,opacity:Qh},"crosshair label renderer result object")))};return e&&(t.format=Ei),{enabled:Kt,snap:Kt,label:t,...tu,...qh}}function Wa(e,t){return{min:Zs(e,Xh("max")),max:Zs(e,$h("min")),nice:Kt,interval:{step:t?Ga(Jh,lu,Ey(Ot)):Jh,values:zn(e),minSpacing:Zs(ve,Xh("maxSpacing")),maxSpacing:Zs(ve,$h("minSpacing"))}}}var Ya=gi(ft("circle","cross","diamond","heart","plus","pin","square","star","triangle"),Ft),gu=ft("never","always","hyphenate","on-space"),Za=ft("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),Qo=ft("pointer","node","top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"),tl=gi(Z,ft("exact","nearest")),fu=ft("pointer","start","middle","end"),Ua={enabled:U,text:ht,textAlign:ft("left","center","right"),wrapping:ft("never","always","hyphenate","on-space"),spacing:Z,maxWidth:Z,maxHeight:Z,...Fn};Ua.padding=re(Z);var Ka={enabled:U,text:ht,renderer:Uo(gi(ht,ky))},el=["defaults","download","zoom-to-cursor","pan-to-cursor","toggle-series-visibility","toggle-other-series","separator"],mu={type:ft("action","separator"),showOn:ft("always","series-area","series-node","legend-item"),label:Ys(ht),enabled:U,action:Ft,items:(e,t)=>yu(e,t)};mu.iconUrl=re(ht);var vb=Zh(mu),Mb=Iy((e,t)=>{let i;return typeof e=="string"?el.includes(e)?i=!0:(i={valid:!1,invalid:[],cleared:null},i.invalid.push(new My(vy.Invalid,`a context menu item string alias: ["${el.join('", "')}"]`,e,t.path))):i=vb(e,t),i},`a context menu item object or string alias: [${el.join(", ")}]`),yu=za(Mb,"a menu items array",!1),$a=ja({label:Ys(ht),action:Ys(Ft)},"a context menu actions array"),bu={label:ht,ariaLabel:ht,tooltip:ht,icon:ft("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")},Xt={width:Z,height:Z,minWidth:Z,minHeight:Z,suppressFieldDotNotation:U,title:Ua,subtitle:Ua,footnote:Ua,padding:{top:Z,right:Z,bottom:Z,left:Z},seriesArea:{clip:U,padding:{top:Z,right:Z,bottom:Z,left:Z}},legend:{enabled:U,position:ft("top","right","bottom","left"),orientation:ft("horizontal","vertical"),maxWidth:Z,maxHeight:Z,spacing:Z,preventHidingAll:U,reverseOrder:U,toggleSeries:U,item:{marker:{size:Z,shape:Ya,padding:Z,strokeWidth:Z},line:{length:Z,strokeWidth:Z},label:{maxLength:Z,formatter:Ft,...Fn},maxWidth:Z,paddingX:Z,paddingY:Z,showSeriesStroke:U},pagination:{marker:{size:Z,shape:Ya,padding:Z},activeStyle:{...es,...Ke},inactiveStyle:{...es,...Ke},highlightStyle:{...es,...Ke},label:Fn},listeners:{legendItemClick:Ft,legendItemDoubleClick:Ft}},gradientLegend:{enabled:U,position:ft("top","right","bottom","left"),spacing:Z,reverseOrder:U,gradient:{preferredLength:Z,thickness:Z},scale:{label:{...Fn,format:_a,formatter:Ft},padding:Z,interval:{step:zt,values:_h,minSpacing:Zo(Z,Ay("maxSpacing")),maxSpacing:Zo(Z,wy("minSpacing"))}}},listeners:{seriesNodeClick:Ft,seriesNodeDoubleClick:Ft,seriesVisibilityChange:Ft,click:Ft,doubleClick:Ft,annotations:Ft,zoom:Ft},loadGoogleFonts:U,highlight:{range:ft("tooltip","node")},overlays:{loading:Ka,noData:Ka,noVisibleSeries:Ka,unsupportedBrowser:Ka},tooltip:{enabled:U,showArrow:U,pagination:U,delay:Z,range:tl,wrapping:gu,mode:ft("single","shared","compact"),position:{type:Qo,anchorTo:ft("pointer","node","chart"),placement:gi(Za,za(Za)),xOffset:zt,yOffset:zt}},animation:{enabled:U,duration:Z},contextMenu:{enabled:U,items:yu,extraActions:$a,extraSeriesAreaActions:$a,extraNodeActions:$a,extraLegendItemActions:$a},dataSource:{getData:Ft},keyboard:{enabled:U,tabIndex:zt},touch:{dragAction:ft("none","drag","hover")},ranges:{enabled:U,buttons:ja({...bu,value:gi(zt,Zo(za(gi(zt,Dy)),Sy(2,2)),Ft)},"range button options array")},locale:{localeText:Ly,getLocaleText:Uo(ht)},background:{visible:U,fill:Wh,image:{url:Ys(ht),top:zt,right:zt,bottom:zt,left:zt,width:Z,height:Z,opacity:fi}},styleNonce:ht,sync:{enabled:U,groupId:ht,axes:ft("x","y","xy"),nodeInteraction:U,zoom:U},zoom:{enabled:U,enableAxisDragging:U,enableDoubleClickToReset:U,enablePanning:U,enableScrolling:U,enableSelecting:U,enableTwoFingerZoom:U,keepAspectRatio:U,anchorPointX:fu,anchorPointY:fu,axes:ft("x","y","xy"),deceleration:gi(ft("off","short","long"),fi),minVisibleItems:Z,minVisibleItemsX:Z,minVisibleItemsY:Z,panKey:ft("alt","ctrl","meta","shift"),scrollingStep:fi,autoScaling:{enabled:U,padding:fi},buttons:{enabled:U,buttons:ja({...bu,value:ft("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:ht},"zoom button options array"),visible:ft("always","zoomed","hover")}}};Xt.dataSource.requestThrottle=re(Z),Xt.dataSource.updateThrottle=re(Z),Xt.dataSource.updateDuringInteraction=re(U),Xt.zoom.enableIndependentAxes=re(U),Xt.statusBar=re(Yh),Xt.foreground=re({visible:U,text:ht,image:{url:ht,top:zt,right:zt,bottom:zt,left:zt,width:Z,height:Z,opacity:fi},...es}),Xt.context=re(()=>!0),Xt.overrideDevicePixelRatio=re(zt),Xt.sync.domainMode=re(ft("direction","position","key"));var Xe={cursor:ht,showInLegend:U,nodeClickRange:tl,listeners:{nodeClick:Ft,nodeDoubleClick:Ft},highlightStyle:{item:{...es,...Ke},series:{enabled:U,dimOpacity:fi,strokeWidth:Z}}},Le={...Xe,id:ht,visible:U,data:_h};Le.context=re(()=>!0),Le.seriesGrouping=re(Yh),Le.highlight=re({enabled:U});var Xa={enabled:U,shape:Ya,size:Z,itemStyler:Hh({...es,...Ke,...Ws,shape:Ya,size:Z}),...es,...Ke,...Ws},qe={enabled:U,formatter:Ft,...Fn},il={...qe,lineHeight:Z,minimumFontSize:Z,wrapping:gu,overflowStrategy:ft("ellipsis","hide")},qa={visible:U,cap:{visible:U,length:Z,lengthRatio:fi,...Ke,...Ws},...Ke,...Ws},sl={...qa,xLowerKey:ht,xUpperKey:ht,yLowerKey:ht,yUpperKey:ht,xLowerName:ht,xUpperName:ht,yLowerName:ht,yUpperName:ht,itemStyler:Hh({visible:U,...Ke,...Ws,cap:{visible:U,length:Z,lengthRatio:fi,...Ke,...Ws}})},Ge={enabled:U,showArrow:U,range:tl,renderer:Uo(gi(ht,Zh({heading:ht,title:ht,data:ja({label:Ys(ht),value:Ys(ht)})},"tooltip renderer result object"))),position:{type:Qo,anchorTo:ft("node","pointer","chart"),placement:gi(Za,za(Za)),xOffset:zt,yOffset:zt},interaction:{enabled:U}};Ge.position._seriesOverrideType=re(Qo);var Ja={enabled:U,xOffset:zt,yOffset:zt,blur:Z,color:Wh},xu=Cy({linear:{},smooth:{tension:fi},step:{position:ft("start","middle","end")}},"interpolation line options");import{boolean as nl,constant as Sb,fillOptionsDef as Ib,lineDashOptionsDef as Db,number as wb,required as al,string as Gn,strokeOptionsDef as kb}from"ag-charts-core";var Ab={showInMiniChart:nl,connectMissingData:nl,interpolation:xu,label:qe,marker:Xa,tooltip:Ge,shadow:Ja,...Xe,...Ib,...kb,...Db},vu={...Ab,...Le,type:al(Sb("area")),xKey:al(Gn),yKey:al(Gn),xName:Gn,yName:Gn,stacked:nl,stackGroup:Gn,normalizedTo:wb};import{boolean as rs,callbackDefs as Lb,constant as Cb,fillOptionsDef as Mu,lineDashOptionsDef as Su,number as Iu,positiveNumber as rl,required as ol,string as Qs,strokeOptionsDef as Du,undocumented as Qa,union as ll}from"ag-charts-core";var wu={direction:ll("horizontal","vertical"),showInMiniChart:rs,cornerRadius:rl,itemStyler:Lb({...Mu,...Du,...Su,cornerRadius:rl}),crisp:rs,label:{...qe,placement:ll("inside-center","inside-start","inside-end","outside-start","outside-end"),padding:rl},errorBar:qa,shadow:Ja,tooltip:Ge,...Xe,...Mu,...Du,...Su};wu.sparklineMode=Qa(rs);var _n={...wu,...Le,type:ol(Cb("bar")),xKey:ol(Qs),yKey:ol(Qs),xName:Qs,yName:Qs,direction:ll("horizontal","vertical"),grouped:rs,stacked:rs,stackGroup:Qs,normalizedTo:Iu,legendItemName:Qs,errorBar:sl};_n.pickOutsideVisibleMinorAxis=Qa(rs),_n.fastDataProcessing=Qa(rs),_n.focusPriority=Qa(Iu);import{boolean as Hn,constant as Nb,lineDashOptionsDef as Tb,number as ku,required as Au,string as os,strokeOptionsDef as Ob,undocumented as cl}from"ag-charts-core";var Lu={title:os,showInMiniChart:Hn,connectMissingData:Hn,interpolation:xu,label:qe,marker:Xa,tooltip:Ge,errorBar:qa,...Xe,...Ob,...Tb};Lu.sparklineMode=cl(Hn);var tr={...Lu,...Le,type:Nb("line"),xKey:Au(os),yKey:Au(os),xName:os,yName:os,stacked:Hn,stackGroup:os,normalizedTo:ku,legendItemName:os,errorBar:sl};tr.pickOutsideVisibleMinorAxis=cl(Hn),tr.focusPriority=cl(ku);import{isArray as hl,isObject as Cu,isPlainObject as tn}from"ag-charts-core";var Nu=Symbol("BREAK"),Wn="__decorator_config",er="__decorator_accessors";function Eb(e,t){ul(e,t).optional=!0}function ul(e,t){if(Object.getOwnPropertyDescriptor(e,Wn)==null&&Object.defineProperty(e,Wn,{value:{}}),Object.getOwnPropertyDescriptor(e,er)==null){const h=Object.getPrototypeOf(e)?.[er]?.slice()??[];Object.defineProperty(e,er,{value:h})}const i=e[Wn],s=t.toString();if(i[s]!=null)return i[s];i[s]={setters:[],getters:[],observers:[]};const n=Object.getOwnPropertyDescriptor(e,t);let a=n?.get,r=n?.set;if(a==null||r==null){const c=e[er];let h=c.indexOf(t);h===-1&&(h=c.push(t)-1),a??(a=function(){let u=this.__accessors;return u==null&&(u=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:u})),u[h]}),r??(r=function(u){let d=this.__accessors;d==null&&(d=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[h]=u})}return Object.defineProperty(e,t,{set:function(c){const{setters:h,observers:u}=i[s];let d;h.some(p=>p.length>2)&&(d=a.call(this));for(const p of h)if(c=p(this,t,c,d),c===Nu)return;r.call(this,c);for(const p of u)p(this,c,d)},get:function(){let c=a.call(this);for(const h of i[s].getters)if(c=h(this,t,c),c===Nu)return;return c},enumerable:!0,configurable:!1}),i[s]}function Yn(e,t,i){return(s,n)=>{const a=ul(s,n);a.setters.push(e),t&&a.getters.unshift(t),i&&Object.assign(a,i)}}function Pb(e){return(t,i)=>{ul(t,i).observers.push(e)}}function dl(e){return typeof e<"u"&&Wn in e}function en(e){const t=new Set;for(;dl(e);)t.add(e?.[Wn]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(i=>Object.keys(i))}function Rb(e){return en(e).reduce((t,i)=>(t[i]=e[i]??null,t),{})}function Me(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>Me(i,t[s])):tn(e)?tn(t)?Tu(e,t,Me):!1:e===t}function Tu(e,t,i){if(Object.is(e,t))return!0;for(const s of Object.keys(t))if(!(s in e))return!1;for(const s of Object.keys(e))if(!(s in t)||!i(e[s],t[s]))return!1;return!0}function Gt(...e){const t={};for(const i of e){if(!Cu(i))continue;const s=dl(i)?en(i):Object.keys(i);for(const n of s)tn(t[n])&&tn(i[n])?t[n]=Gt(t[n],i[n]):t[n]??(t[n]=i[n])}return t}function Ou(...e){const t={};for(const i of e){if(!Cu(i))continue;const s=dl(i)?en(i):Object.keys(i);for(const n of s)tn(t[n])&&tn(i[n])?t[n]=Ou(t[n],i[n]):n in t||(t[n]??(t[n]=i[n]))}return t}function Fb(e,...t){return t&&hl(e)?e.map(i=>Gt(i,...t)):e}function ie(e,t){const i={...e};for(const s of t)delete i[s];return i}function ir(e,t){return(hl(t)?t:t.split(".")).reduce((s,n)=>s[n],e)}var Eu=new Set(["__proto__","constructor","prototype"]);function zb(e,t,i){const s=hl(t)?t.slice():t.split("."),n=s.pop();if(s.some(r=>Eu.has(r)))return;const a=s.reduce((r,l)=>r[l],e);return a[n]=i,a[n]}function Pu(e,t,i){if(i===void 0)return t;for(const s of e){const n=i[s];n!==void 0&&(t[s]=n)}return t}var jb=void 0,Bb=void 0;Bb=jb;var Vb=void 0,Gb=void 0;Gb=Vb;var _b=void 0,Hb=void 0;Hb=_b;var Wb=void 0,Yb=void 0;Yb=Wb;var fe=Symbol("IGNORED_PROP");function Ce(e,t){const i={};for(const s of Object.keys(t)){const n=t[s];n!==fe&&Object.hasOwn(e,s)&&(i[s]=n)}return i}function Ru(e){const{enabled:t,mode:i,showArrow:s,range:n,position:a,pagination:r,delay:l,wrapping:o,interaction:c,renderer:h,...u}=e,d=Ce(e,{enabled:t,showArrow:s,range:n,position:a,interaction:c,renderer:h,...u});return{chartTooltipOptions:Ce(e,{enabled:fe,showArrow:fe,range:fe,position:fe,mode:i,pagination:r,delay:l,wrapping:o,...u}),seriesTooltipOptions:d}}function Zb(e){const{animation:t,background:i,container:s,contextMenu:n,footnote:a,height:r,listeners:l,locale:o,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:y,width:b,type:m,cursor:v,nodeClickRange:S,tooltip:I={},value:M,scale:k={},startAngle:D,endAngle:w,highlightStyle:A,segmentation:C,bar:L,needle:T,targets:R,outerRadius:K,innerRadius:W,outerRadiusRatio:$,innerRadiusRatio:X,cornerRadius:tt,cornerMode:V,label:E,secondaryLabel:O,spacing:G,...H}=e,{chartTooltipOptions:Y,seriesTooltipOptions:Q}=Ru(I),z=Ce(e,{animation:t,background:i,container:s,contextMenu:n,footnote:a,height:r,listeners:l,locale:o,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:y,tooltip:Y,width:b}),_=Ce(e,{needle:T!=null?{enabled:!0,...T}:fe,startAngle:D,endAngle:w,scale:k,type:m,cursor:v,nodeClickRange:S,tooltip:Q,value:M,highlightStyle:A,segmentation:C,bar:L,targets:R,outerRadius:K,innerRadius:W,outerRadiusRatio:$,innerRadiusRatio:X,cornerRadius:tt,cornerMode:V,label:E,secondaryLabel:O,spacing:G,...H});return"context"in e&&(z.context=e.context),{...z,series:[_]}}function Ub(e){const{animation:t,background:i,container:s,contextMenu:n,footnote:a,height:r,listeners:l,locale:o,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:y,width:b,type:m,cursor:v,nodeClickRange:S,tooltip:I={},value:M,scale:k={},direction:D="vertical",thickness:w,highlightStyle:A,segmentation:C,bar:L,targets:T,cornerRadius:R,cornerMode:K,label:W,...$}=e,{chartTooltipOptions:X,seriesTooltipOptions:tt}=Ru(I),V=Ce(e,{animation:t,background:i,container:s,contextMenu:n,footnote:a,height:r,listeners:l,locale:o,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:y,tooltip:X,width:b}),E=Ce(e,{scale:k,type:m,cursor:v,nodeClickRange:S,tooltip:tt,value:M,direction:D,thickness:w,highlightStyle:A,segmentation:C,bar:L,targets:T,cornerRadius:R,cornerMode:K,label:W,...$});return"context"in e&&(V.context=e.context),{...V,series:[E]}}function Fu(e,t){if(t==null)return e;const{targets:i,...s}=t;return e=Gt(e,s),e.targets!=null&&i!=null&&(e.targets=Fb(e.targets,i)),e}function Kb(e,t){if(e.listeners){const{nodeClick:i,nodeDoubleClick:s,...n}=e.listeners;e={...e,listeners:{seriesNodeClick:i,seriesNodeDoubleClick:s,...n}}}switch(e.type){case"radial-gauge":const i=Fu(e,t);return Zb(i);case"linear-gauge":const s=Fu(e,t);return Ub(s);default:return{}}}import{and as Zn,arrayLength as $b,arrayOf as ls,arrayOfDefs as zu,boolean as Je,callback as sr,color as Un,colorStopsOrderValidator as Xb,constant as ju,fillOptionsDef as cs,fontOptionsDef as Bu,greaterThan as Vu,lessThan as Gu,lineDashOptionsDef as hs,number as dt,optionsDefs as qb,or as _u,positiveNumber as Tt,ratio as nr,required as sn,string as Kn,strokeOptionsDef as us,undocumented as Ri,union as Qe}from"ag-charts-core";var ar={fills:Zn($b(2),ls(qb({color:Un,stop:dt},"")),Xb),fillMode:Qe("continuous","discrete")},Hu={value:sn(dt),text:Kn,shape:_u(Qe("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),sr),placement:Qe("before","after","middle"),spacing:Tt,size:Tt,rotation:dt,...cs,...us,...hs},Wu={value:sn(dt),text:Kn,shape:_u(Qe("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),sr),placement:Qe("inside","outside","middle"),spacing:Tt,size:Tt,rotation:dt,label:{...qe,spacing:Tt},...cs,...us,...hs},Jb={direction:Qe("horizontal","vertical"),cornerMode:Qe("container","item"),cornerRadius:Tt,thickness:Tt,segmentation:{enabled:Je,spacing:Tt,interval:{values:ls(dt),step:dt,count:dt}},bar:{enabled:Je,thickness:Tt,thicknessRatio:nr,...ar,...cs,...us,...hs},label:{...il,text:Kn,spacing:Tt,avoidCollisions:Je,placement:Qe("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:Ge,...ie(Xe,["listeners"])},ds={...Jb,...ie(Le,["listeners"]),type:sn(ju("linear-gauge")),value:sn(dt),scale:{min:Zn(dt,Gu("max")),max:Zn(dt,Vu("min")),label:{enabled:Je,formatter:sr,rotation:dt,spacing:Tt,minSpacing:Tt,placement:Qe("before","after"),avoidCollisions:Je,format:_a,...Bu},interval:{values:ls(dt),step:dt},...ar,...cs,...us,...hs},targets:zu(Hu,"target options array")};ds.margin=Ri(dt),ds.defaultColorRange=Ri(ls(Un)),ds.defaultTarget=Ri({...Hu,value:dt,label:{...qe,spacing:dt}}),ds.defaultScale=Ri(ds.scale),ds.scale.defaultFill=Ri(Un);var Qb={outerRadius:Tt,innerRadius:Tt,outerRadiusRatio:nr,innerRadiusRatio:nr,startAngle:dt,endAngle:dt,spacing:Tt,cornerMode:Qe("container","item"),cornerRadius:Tt,scale:{min:Zn(dt,Gu("max")),max:Zn(dt,Vu("min")),label:{enabled:Je,formatter:sr,rotation:dt,spacing:Tt,minSpacing:Tt,avoidCollisions:Je,format:_a,...Bu},interval:{values:ls(dt),step:dt},...ar,...cs,...us,...hs},segmentation:{enabled:Je,spacing:Tt,interval:{values:ls(dt),step:dt,count:dt}},bar:{enabled:Je,...ar,...cs,...us,...hs},needle:{enabled:Je,spacing:Tt,radiusRatio:nr,...cs,...us,...hs},label:{text:Kn,spacing:Tt,...il},secondaryLabel:{text:Kn,...il},tooltip:Ge,...Xe},rr={...Qb,...Le,type:sn(ju("radial-gauge")),value:sn(dt),targets:zu(Wu,"target options array")};rr.defaultColorRange=Ri(ls(Un)),rr.defaultTarget=Ri({...Wu,value:dt,label:{...qe,spacing:dt}}),rr.scale.defaultFill=Ri(Un);import{Logger as tx}from"ag-charts-core";var I1=Symbol("is-dark-theme"),D1=Symbol("default-separation-lines-colour"),Yu=Symbol("default-shadow-colour"),w1=Symbol("default-caption-layout-style"),k1=Symbol("default-caption-alignment"),ex=Symbol("palette-up-stroke"),ix=Symbol("palette-down-stroke"),sx=Symbol("palette-up-fill"),nx=Symbol("palette-down-fill"),ax=Symbol("palette-neutral-stroke"),rx=Symbol("palette-neutral-fill"),A1=Symbol("palette-alt-up-stroke"),L1=Symbol("palette-alt-down-stroke"),C1=Symbol("palette-alt-up-fill"),N1=Symbol("palette-alt-down-fill"),T1=Symbol("palette-gray-fill"),O1=Symbol("palette-gray-stroke"),E1=Symbol("default-polar-series-stroke"),ox=Symbol("default-sparkline-crosshair-stroke"),bi=Symbol("default-financial-charts-annotation-stroke"),Zu=Symbol("default-hierarchy-strokes"),lx=Symbol("default-text-annotation-color"),nn=Symbol("default-financial-charts-annotation-background-fill"),cx=Symbol("default-annotation-handle-fill"),hx=Symbol("default-annotation-statistics-fill"),ux=Symbol("default-annotation-statistics-stroke"),dx=Symbol("default-annotation-statistics-color"),px=Symbol("default-annotation-statistics-divider-stroke"),Uu=Symbol("default-annotation-statistics-fill"),Ku=Symbol("default-annotation-statistics-stroke"),gx=Symbol("default-textbox-fill"),fx=Symbol("default-textbox-stroke"),mx=Symbol("default-textbox-color"),P1=Symbol("default-toolbar-position"),R1=Symbol("default-gridline-enabled");import{clamp as xi}from"ag-charts-core";var ps=(e,t,i)=>e*(1-i)+t*i,pl=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4},gl=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e},$u=class lt{constructor(t,i,s,n=1){this.r=xi(0,t||0,1),this.g=xi(0,i||0,1),this.b=xi(0,s||0,1),this.a=xi(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!lt.parseHex(t):t.indexOf("rgb")>=0?!!lt.stringToRgba(t):lt.nameToHex.has(t.toLowerCase())}static fromString(t){if(t.indexOf("#")>=0)return lt.fromHexString(t);const i=lt.nameToHex.get(t.toLowerCase());if(i)return lt.fromHexString(i);if(t.indexOf("rgb")>=0)return lt.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static parseHex(t){t=t.replace(/ /g,"").slice(1);let i;switch(t.length){case 6:case 8:i=[];for(let s=0;s<t.length;s+=2)i.push(parseInt(`${t[s]}${t[s+1]}`,16));break;case 3:case 4:i=t.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(t){const i=lt.parseHex(t);if(i){const[s,n,a,r]=i;return new lt(s/255,n/255,a/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(t){let i=-1,s=-1;for(let l=0;l<t.length;l++){const o=t[l];if(i===-1&&o==="(")i=l;else if(o===")"){s=l;break}}if(i===-1||s===-1)return;const a=t.substring(i+1,s).split(","),r=[];for(let l=0;l<a.length;l++){const o=a[l];let c=parseFloat(o);if(!Number.isFinite(c))return;o.indexOf("%")>=0?(c=xi(0,c,100),c/=100):l===3?c=xi(0,c,1):(c=xi(0,c,255),c/=255),r.push(c)}return r}static fromRgbaString(t){const i=lt.stringToRgba(t);if(i){if(i.length===3)return new lt(i[0],i[1],i[2]);if(i.length===4)return new lt(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(t.length===4)return new lt(t[0],t[1],t[2],t[3]);if(t.length===3)return new lt(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,s,n=1){const a=lt.HSBtoRGB(t,i,s);return new lt(a[0],a[1],a[2],n)}static fromHSL(t,i,s,n=1){const a=lt.HSLtoRGB(t,i,s);return new lt(a[0],a[1],a[2],n)}static fromOKLCH(t,i,s,n=1){const a=lt.OKLCHtoRGB(t,i,s);return new lt(a[0],a[1],a[2],n)}static padHex(t){return t.length===1?"0"+t:t}toHexString(){let t="#"+lt.padHex(Math.round(this.r*255).toString(16))+lt.padHex(Math.round(this.g*255).toString(16))+lt.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(t+=lt.padHex(Math.round(this.a*255).toString(16))),t}toRgbaString(t=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,t);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return lt.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(t,i,s){const n=pl(t),a=pl(i),r=pl(s),l=Math.cbrt(.4122214708*n+.5363325363*a+.0514459929*r),o=Math.cbrt(.2119034982*n+.6806995451*a+.1073969566*r),c=Math.cbrt(.0883024619*n+.2817188376*a+.6299787005*r),h=.2104542553*l+.793617785*o-.0040720468*c,u=1.9779984951*l-2.428592205*o+.4505937099*c,d=.0259040371*l+.7827717662*o-.808675766*c,p=Math.atan2(d,u)*180/Math.PI,g=h,y=Math.hypot(u,d),b=p>=0?p:p+360;return[g,y,b]}static OKLCHtoRGB(t,i,s){const n=t,a=i*Math.cos(s*Math.PI/180),r=i*Math.sin(s*Math.PI/180),l=(n+.3963377774*a+.2158037573*r)**3,o=(n-.1055613458*a-.0638541728*r)**3,c=(n-.0894841775*a-1.291485548*r)**3,h=4.0767416621*l-3.3077115913*o+.2309699292*c,u=-1.2684380046*l+2.6097574011*o-.3413193965*c,d=-.0041960863*l-.7034186147*o+1.707614701*c,p=gl(h),g=gl(u),y=gl(d);return[p,g,y]}static RGBtoHSL(t,i,s){const n=Math.min(t,i,s),a=Math.max(t,i,s),r=(a+n)/2;let l,o;if(a===n)l=0,o=0;else{const c=a-n;o=r>.5?c/(2-a-n):c/(a+n),a===t?l=(i-s)/c+(i<s?6:0):a===i?l=(s-t)/c+2:l=(t-i)/c+4,l*=360/6}return[l,o,r]}static HSLtoRGB(t,i,s){if(t=(t%360+360)%360,i===0)return[s,s,s];const n=s<.5?s*(1+i):s+i-s*i,a=2*s-n;function r(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?a+(n-a)*6*h:h<1/2?n:h<2/3?a+(n-a)*(2/3-h)*6:a}const l=r(t/360+1/3),o=r(t/360),c=r(t/360-1/3);return[l,o,c]}static RGBtoHSB(t,i,s){const n=Math.min(t,i,s),a=Math.max(t,i,s),r=a===0?0:(a-n)/a;let l=0;if(n!==a){const o=a-n,c=(a-t)/o,h=(a-i)/o,u=(a-s)/o;t===a?l=u-h:i===a?l=2+c-u:l=4+h-c,l/=6,l<0&&(l=l+1)}return[l*360,r,a]}static HSBtoRGB(t,i,s){t=(t%360+360)%360/360;let n=0,a=0,r=0;if(i===0)n=a=r=s;else{const l=(t-Math.floor(t))*6,o=l-Math.floor(l),c=s*(1-i),h=s*(1-i*o),u=s*(1-i*(1-o));switch(l>>0){case 0:n=s,a=u,r=c;break;case 1:n=h,a=s,r=c;break;case 2:n=c,a=s,r=u;break;case 3:n=c,a=h,r=s;break;case 4:n=u,a=c,r=s;break;case 5:n=s,a=c,r=h;break}}return[n,a,r]}static mix(t,i,s){return new lt(ps(t.r,i.r,s),ps(t.g,i.g,s),ps(t.b,i.b,s),ps(t.a,i.a,s))}static lighten(t,i){const s=lt.RGBtoOKLCH(t.r,t.g,t.b);return lt.fromOKLCH(xi(0,s[0]+i,1),s[1],s[2])}static darken(t,i){const s=lt.RGBtoOKLCH(t.r,t.g,t.b);return lt.fromOKLCH(xi(0,s[0]-i,1),s[1],s[2])}static interpolate(t,i){const s=1/(t.length-1),n=t.map(a=>lt.RGBtoOKLCH(a.r,a.g,a.b));return Array.from({length:i},(a,r)=>{const l=r/(i-1),o=t.length<=2?0:Math.min(Math.floor(l*(t.length-1)),t.length-2),c=(l-o*s)/s,h=n[o],u=n[o+1];return lt.fromOKLCH(ps(h[0],u[0],c),ps(h[1],u[1],c),ps(h[2],u[2],c))})}};$u.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 Mt=$u,z1=[{type:"number",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"bottom","left"]}},{type:"category",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"left","bottom"]}}],fl={$if:[{$isGradient:[{$palette:"fill"}]},{$palette:"fillFallback"},{$if:[{$isPattern:[{$palette:"fill"}]},{$path:["./stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},an={type:"pattern",pattern:"forward-slanted-lines",width:10,height: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:fl,strokeOpacity:1,strokeWidth:4,backgroundFill:"none",backgroundFillOpacity:1,rotation:0,scale:1},$n={type:"image",backgroundFill:{$palette:"fillFallback"},backgroundFillOpacity:1,repeat:"no-repeat",fit:"contain",rotation:0},Ne={stroke:bi},qt={fill:cx},Xu={color:"white",fill:bi},vi={color:bi},gs={color:lx,fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"}},ml={...gs,fontSize:{$ref:"fontSize"},color:dx,fill:hx,stroke:ux,strokeWidth:1,divider:{stroke:px,strokeWidth:1,strokeOpacity:.5}},yl={...Ne,background:{fill:nn,fillOpacity:.2},handle:{...qt},text:{...vi},statistics:{...ml}},yx={line:{...Ne,handle:{...qt},text:{...vi}},"horizontal-line":{...Ne,handle:{...qt},axisLabel:{...Xu},text:{...vi}},"vertical-line":{...Ne,handle:{...qt},axisLabel:{...Xu},text:{...vi}},"disjoint-channel":{...Ne,background:{fill:nn,fillOpacity:.2},handle:{...qt},text:{...vi}},"parallel-channel":{...Ne,background:{fill:nn,fillOpacity:.2},handle:{...qt},text:{...vi}},"fibonacci-retracement":{...Ne,strokes:Zu,rangeStroke:bi,handle:{...qt},text:{...vi,position:"center"},label:{...gs,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...Ne,strokes:Zu,rangeStroke:bi,handle:{...qt},text:{...vi,position:"center"},label:{...gs,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...Ne,...gs,color:{$ref:"textColor"},handle:{...qt},fill:nn,fillOpacity:.2},comment:{...gs,color:"white",fontWeight:700,handle:{...qt},fill:bi},note:{...gs,color:mx,fill:bi,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...qt},background:{fill:gx,stroke:fx,strokeWidth:1}},text:{...gs,handle:{...qt}},arrow:{...Ne,handle:{...qt},text:{...vi}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...qt,stroke:bi}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...qt,stroke:bi}},"date-range":{...yl},"price-range":{...yl},"date-price-range":{...yl},"quick-date-price-range":{up:{...Ne,fill:nn,fillOpacity:.2,handle:{...qt},statistics:{...ml,color:"#fff",fill:nn,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...Ne,stroke:Ku,fill:Uu,fillOpacity:.2,handle:{...qt,stroke:Ku},statistics:{...ml,color:"#fff",fill:Uu,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}},bx=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],xx=[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"fibonacci-retracement-drawing",tooltip:"toolbarAnnotationsFibonacciAnnotations",value:"fibonacci-menu"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}];function vx(e,t,i){const{dateKey:s="date",highKey:n="high",openKey:a="open",lowKey:r="low",closeKey:l="close",volumeKey:o="volume",chartType:c="candlestick",navigator:h=!1,volume:u=!0,rangeButtons:d=!0,statusBar:p=!0,toolbar:g=!0,zoom:y=!0,sync:b=!1,theme:m,data:v,...S}=e,I=Sx(c,s,n,r,a,l),M=Mx(i,a,l,u,o),D={navigator:{enabled:h,...u?{miniChart:{enabled:h,series:[{type:"line",xKey:s,yKey:o,stroke:fl,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null}},w={annotations:{enabled:g,optionsToolbar:{enabled:g},snap:!0,toolbar:{enabled:g,buttons:xx,padding:0},data:v,xKey:s,volumeKey:u?o:void 0}},A=p?{statusBar:{enabled:!0,data:v,highKey:n,openKey:a,lowKey:r,closeKey:l,volumeKey:u?o:void 0}}:null,C={zoom:{enabled:y,autoScaling:{enabled:!0},enableIndependentAxes:!0}},L={ranges:{enabled:d}},T=b?{sync:{enabled:b,nodeInteraction:!0,zoom:!0}}:null,R=u?[{type:"number",position:"left",keys:[o],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percent",align:"end"}}]:[];return{theme:{baseTheme:typeof m=="string"?m:"ag-financial",...Gt(typeof m=="object"?m:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5},chartToolbar:{enabled:g},annotations:{...yx},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}}}},bar:{series:{fillOpacity:.5}},line:{series:{marker:{enabled:!1},...Qu(c,{hlc:{stroke:{$palette:"altNeutral.stroke"},strokeWidth:2},line:{stroke:{$palette:"neutral.stroke"}},"step-line":{stroke:{$palette:"neutral.stroke"},interpolation:{type:"step"}}})}},candlestick:{series:{...Qu(c,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},"range-area":{series:{fillOpacity:.3,strokeWidth:2}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...M,...I],axes:[{type:"number",position:"right",keys:[a,l,n,r],crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...R,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:v,...w,...D,...A,...C,...L,...T,...S}}function Mx(e,t,i,s,n){return s?[{type:"bar",xKey:"date",yKey:n,tooltip:{enabled:!1},itemStyler({datum:a}){const{up:r,down:l}=e().palette;return{fill:a[t]<a[i]?r?.fill:l?.fill}},focusPriority:1,fastDataProcessing:!0,highlight:{enabled:!1}}]:[]}var qu="range-area";function Sx(e,t,i,s,n,a){const r={xKey:t,openKey:n,closeKey:a,highKey:i,lowKey:s},l={xKey:t,yKey:a},o={pickOutsideVisibleMinorAxis:!0};switch(e??"candlestick"){case"ohlc":return Ix(o,r);case"line":case"step-line":return Dx(o,l);case"hlc":return wx(o,l,r);case"high-low":return kx(o,r);case"candlestick":case"hollow-candlestick":return Ju(o,r);default:return tx.warnOnce(`unknown chart type: ${e}; expected one of: ${bx.join(", ")}`),Ju(o,r)}}function Ix(e,t){return[{type:"ohlc",focusPriority:0,...e,...t}]}function Dx(e,t){return[{type:"line",focusPriority:0,...e,...t}]}function wx(e,t,{xKey:i,highKey:s,closeKey:n,lowKey:a}){return[{type:qu,focusPriority:0,...e,xKey:i,yHighKey:s,yLowKey:n,fill:sx,stroke:ex},{type:qu,focusPriority:0,...e,xKey:i,yHighKey:n,yLowKey:a,fill:nx,stroke:ix},{type:"line",...e,...t}]}function kx(e,{xKey:t,highKey:i,lowKey:s}){return[{type:"range-bar",...e,xKey:t,yHighKey:i,yLowKey:s,fill:rx,stroke:ax,tooltip:{range:"nearest"},focusPriority:0,fastDataProcessing:!0}]}function Ju(e,t){return[{type:"candlestick",focusPriority:0,...e,...t}]}function Qu(e,t){return t[e]??t.default}var Xn=new WeakMap;function or(e,t){const i=JSON.stringify(e,null,0);return Xn.has(t)||Xn.set(t,new Map),Xn.get(t)?.has(i)||Xn.get(t)?.set(i,t(e)),Xn.get(t)?.get(i)}function td(e,t){const i=new Map,s=(...r)=>r.map(l=>typeof l=="object"||typeof l=="symbol"?l:(i.has(l)||i.set(l,{v:l}),i.get(l))),n={},a=new WeakMap;return(...r)=>{const l=r.length===0?[n]:s(...r);let o=a;for(const u of l.slice(0,-1))o.has(u)||o.set(u,new WeakMap),o=o.get(u);const c=l.at(-1);let h=o.get(c);return h?t?.("hit",e,r):(h=e(...r),o.set(c,h),t?.("miss",e,r)),h}}var ed={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:ox,lineDash:[0],label:{enabled:!1}}},bl={...ed,nice:!1},lr={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},xl={style:[{stroke:{$ref:"gridLineColor"}}],width:2},Ax={number:{gridLine:xl},time:{gridLine:xl},category:{gridLine:xl}},Lx={overrides:{common:{animation:{enabled:!1},contextMenu:{enabled:!1},keyboard:{enabled:!1},background:{visible:!1},navigator:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...bl,interval:{values:[0]}},log:{...bl},time:{...bl},category:{...ed}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...lr,position:{...lr.position,anchorTo:"pointer"},range:"nearest"},axes:Ax},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:lr},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:lr}}},id=td(Cx);function Cx(e,t){return typeof e=="string"?{...t,baseTheme:e}:e!=null?{...e,baseTheme:id(e.baseTheme,t)}:t}function sd(e){if(Array.isArray(e)&&e.length!==0){const t=e[0];if(typeof t=="number")return{data:e.map((s,n)=>({x:n,y:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(t))return{data:e.map(s=>({x:s[0],y:s[1],datum:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}return{data:e}}function Nx(e){switch(e?.type){case"number":{const{type:n,min:a,max:r,reverse:l}=e;return Ce(e,{type:n,reverse:l,min:a,max:r})}case"time":{const{type:n,min:a,max:r,reverse:l}=e;return Ce(e,{type:n,reverse:l,min:a,max:r})}case"category":default:const{paddingInner:t,paddingOuter:i,reverse:s}=e??{};return Ce({...e,type:"category"},{type:"category",reverse:s,paddingInner:t,paddingOuter:i})}}function Tx(e,t,i){const s={};return e?.stroke!=null&&(s.style=[{stroke:e?.stroke}],s.enabled??(s.enabled=!0)),e?.strokeWidth!=null&&(s.width=e?.strokeWidth,s.enabled??(s.enabled=!0)),i.type==="bar"&&i.direction!=="horizontal"&&(s.enabled??(s.enabled=!0)),e?.visible!=null&&(s.enabled=e.visible),s.enabled??(s.enabled=t),s}var Ox=td((e,t,i)=>s=>{const n=s.datum[s.xKey],a=s.datum[s.yKey],r=i!=null?s.datum[i]:s.datum,l=t?.renderer?.({context:e,datum:r,xValue:n,yValue:a});if(typeof l=="string")return l;const o=l?.content??a.toFixed(2);return l?.title?{heading:void 0,title:void 0,data:[{label:l.title,value:o}]}:{heading:void 0,title:o,data:[]}});function Ex(e){const{background:t,container:i,height:s,listeners:n,locale:a,minHeight:r,minWidth:l,overrideDevicePixelRatio:o,padding:c,width:h,theme:u,data:d,crosshair:p,axis:g,min:y,max:b,tooltip:m,context:v,styleNonce:S,...I}=e,M=Ce(e,{background:t,container:i,height:s,listeners:n,locale:a,minHeight:r,minWidth:l,overrideDevicePixelRatio:o,padding:c,width:h,styleNonce:S,tooltip:fe,context:fe,data:fe,crosshair:fe,axis:fe,min:fe,max:fe,theme:fe}),{data:k,series:[D]=[],datumKey:w}=sd(d),A=I;D!=null&&Object.assign(A,D),A.tooltip={...m,renderer:Ox(v,m,w)},M.theme=id(u,Lx),M.data=k,M.series=[A];const C=A.type!=="bar"||A.direction!=="horizontal",[L,T]=C?["bottom","left"]:["left","bottom"],R={...Nx(g),position:L,...Ce(e,{crosshair:p})},K={type:"number",gridLine:Tx(g,!1,e),position:T,...Ce(e,{min:y,max:b})};return M.axes=C?[K,R]:[R,K],M}var Px={chartType:xy("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),dateKey:pi,openKey:pi,highKey:pi,lowKey:pi,closeKey:pi,volumeKey:pi,navigator:Be,volume:Be,rangeButtons:Be,statusBar:Be,toolbar:Be,zoom:Be,sync:Be,theme:st,container:st,width:st,height:st,minWidth:st,minHeight:st,listeners:st,initialState:st,title:st,data:gy},vl={theme:st,container:st,animation:st,background:st,contextMenu:st,listeners:st,locale:st,width:st,height:st,minWidth:st,minHeight:st,title:st,subtitle:st,footnote:st,padding:st,tooltip:{...Ge,...Xt.tooltip}};vl.overrideDevicePixelRatio=by(Vh);var Ml=["showInLegend","showInMiniChart","grouped","stacked","stackGroup","tooltip","listeners","errorBar","xKey","yKey","type"],Sl={visible:Be,reverse:Be,stroke:fy,strokeWidth:Vh},Il={context:st,tooltip:st,theme:st,background:st,container:st,width:st,height:st,minWidth:st,minHeight:st,padding:st,listeners:st,locale:st,data:st,styleNonce:pi,axis:Yo({number:{...Sl,min:_s(Hs,Wo("max")),max:_s(Hs,Ho("min"))},category:{...Sl,paddingInner:Gh,paddingOuter:Gh},time:{...Sl,min:_s(Bh(Hs,jh),Wo("max")),max:_s(Bh(Hs,jh),Ho("min"))}},"axis options","category"),min:_s(Hs,Wo("max")),max:_s(Hs,Ho("min")),crosshair:{enabled:Be,snap:Be,...yy,...my},xKey:pi,yKey:pi},Rx={type:"preset",name:"price-volume",enterprise:!0,options:Px,create:vx},Fx={type:"preset",name:"gauge-preset",enterprise:!0,options:Yo({"linear-gauge":{...ie(ds,["type"]),...vl},"radial-gauge":{...ie(rr,["type"]),...vl}},"gauge options"),create:Kb},zx={type:"preset",name:"sparkline",options:Yo({area:{...Il,...ie(vu,Ml)},bar:{...Il,...ie(_n,Ml)},line:{...Il,...ie(tr,Ml)}},"sparkline options"),create:Ex,processData:sd};import{ValidationError as jx,isObject as Bx,validate as Vx}from"ag-charts-core";import{Logger as Gx,entries as Dl,groupBy as _x}from"ag-charts-core";import{clamp as Hx,isPlainObject as nd}from"ag-charts-core";import{createId as Wx,createSvgElement as ad,toIterable as Yx}from"ag-charts-core";import{clamp as rn}from"ag-charts-core";var on={containsPoint:Zx,equals:Ux,isEmpty:Kx,normalize:$x};function Zx(e,t,i){return t>=e.x&&t<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function Ux(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kx(e){return e==null||e.height===0||e.width===0||isNaN(e.height)||isNaN(e.width)}function $x(e){let{x:t,y:i,width:s,height:n}=e;return(s==null||s>0)&&(n==null||n>0)?e:(t!=null&&s!=null&&s<0&&(s=-s,t=t-s),i!=null&&n!=null&&n<0&&(n=-n,i=i-n),{x:t,y:i,width:s,height:n})}var cr=Symbol("interpolate"),hr=e=>e[cr]!=null;function wl(e,t,i,s=1/0){const n={nearest:void 0,distanceSquared:s};for(const a of i){const r=a.distanceSquared(e,t);if(r===0)return{nearest:a,distanceSquared:0};r<n.distanceSquared&&(n.nearest=a,n.distanceSquared=r)}return n}var qn=class Rn{constructor(t,i,s,n){this.x=t,this.y=i,this.width=s,this.height=n}static fromDOMRect({x:t,y:i,width:s,height:n}){return new