@arcgis/map-components 6.0.0-next.41 → 6.0.0-next.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/cdn/{HOMM5T7F.js → 23FQMZEJ.js} +1 -1
  2. package/dist/cdn/{OT4D3TVG.js → 2KGJ7SZH.js} +1 -1
  3. package/dist/cdn/{GTQOMGD7.js → 2MIHLZFT.js} +1 -1
  4. package/dist/cdn/{NF426VVG.js → 3L2QSX64.js} +1 -1
  5. package/dist/cdn/{IH2T7XRU.js → 3VLSPKTJ.js} +1 -1
  6. package/dist/cdn/3ZRVPLIZ.js +2 -0
  7. package/dist/cdn/{TII37L6V.js → 4FBPT5MA.js} +1 -1
  8. package/dist/cdn/{6WT5CUW4.js → 4IPFHL7W.js} +1 -1
  9. package/dist/cdn/{5XZKVLHC.js → 5ATTOWK4.js} +1 -1
  10. package/dist/cdn/{HUZLTULW.js → 5MRT5VRJ.js} +1 -1
  11. package/dist/cdn/6E4PVTTN.js +2 -0
  12. package/dist/cdn/{JBD7Q5YD.js → 6NCSWYYX.js} +1 -1
  13. package/dist/cdn/{5VK56DPB.js → 6NY67VW5.js} +1 -1
  14. package/dist/cdn/{RX7LVZ5V.js → 6P7V62WJ.js} +1 -1
  15. package/dist/cdn/{2BKWAHTD.js → 6TLX4R5A.js} +1 -1
  16. package/dist/cdn/6YPY3QWH.js +2 -0
  17. package/dist/cdn/72KS3TKM.js +2 -0
  18. package/dist/cdn/{5IWCWL2Q.js → 7FB4DOVH.js} +1 -1
  19. package/dist/cdn/{DYKRS7YX.js → 7GXJ6HJZ.js} +1 -1
  20. package/dist/cdn/7WUY57GO.js +2 -0
  21. package/dist/cdn/{DVLTVCIH.js → 7YSYI32G.js} +1 -1
  22. package/dist/cdn/{AMRGLUBB.js → AKSCONMP.js} +1 -1
  23. package/dist/cdn/{FTRRLFYT.js → B6VGTQ4L.js} +1 -1
  24. package/dist/cdn/BQCOYIEH.js +2 -0
  25. package/dist/cdn/{Y6MM3GUE.js → BVWTI63V.js} +1 -1
  26. package/dist/cdn/{4DRKK3S6.js → CBCAUSDJ.js} +1 -1
  27. package/dist/cdn/{CX23L4OX.js → CPK3PMBE.js} +1 -1
  28. package/dist/cdn/CSVVXWVY.js +2 -0
  29. package/dist/cdn/{Y4GL4RZF.js → CX5AZKYT.js} +1 -1
  30. package/dist/cdn/{2J6WEB6T.js → DEICCDP4.js} +1 -1
  31. package/dist/cdn/DJAFLMKA.js +2 -0
  32. package/dist/cdn/DSINA62N.js +4 -0
  33. package/dist/cdn/{NYIKMTKG.js → E4ZUESKS.js} +1 -1
  34. package/dist/cdn/{UJBFSJDF.js → E5BLQ5FK.js} +1 -1
  35. package/dist/cdn/{KKSTZRNG.js → EDGXY4OL.js} +1 -1
  36. package/dist/cdn/{YEPFWDQQ.js → EL5AFBNE.js} +1 -1
  37. package/dist/cdn/{GEZIZQV6.js → EN5NCDOJ.js} +1 -1
  38. package/dist/cdn/{QNQOBXLM.js → EQA4WO3H.js} +1 -1
  39. package/dist/cdn/{JILA7S66.js → FLSEDKWU.js} +1 -1
  40. package/dist/cdn/{625O4F4L.js → GQVCBPZS.js} +1 -1
  41. package/dist/cdn/{I7XTEFQP.js → GSGFAJCR.js} +1 -1
  42. package/dist/cdn/{BXBPEOE3.js → GSU7GNNP.js} +1 -1
  43. package/dist/cdn/{IZFEOYED.js → H2PXK4AT.js} +1 -1
  44. package/dist/cdn/{RCJ3GROZ.js → HBQAYD5H.js} +1 -1
  45. package/dist/cdn/{D7RGMUI2.js → IAJNBAC5.js} +1 -1
  46. package/dist/cdn/{JPQ5ELDQ.js → INMMQJOE.js} +1 -1
  47. package/dist/cdn/{OMDFAKMT.js → IQYLP2H7.js} +1 -1
  48. package/dist/cdn/{DVH35LZL.js → J2K2LRII.js} +1 -1
  49. package/dist/cdn/JUTSSJJF.js +2 -0
  50. package/dist/cdn/JZYDXRQ6.js +4 -0
  51. package/dist/cdn/{Y6ZJNJZ7.js → KSOO3XZ2.js} +1 -1
  52. package/dist/cdn/{KLSIUZNN.js → MKL4YXDU.js} +1 -1
  53. package/dist/cdn/{EMOYKTQL.js → O2BFE6NY.js} +1 -1
  54. package/dist/cdn/OUFB4LJK.js +2 -0
  55. package/dist/cdn/{GFC6LS4L.js → OYG42YJL.js} +1 -1
  56. package/dist/cdn/{O2RCWKKW.js → PD2BELF2.js} +1 -1
  57. package/dist/cdn/{T2JBUILX.js → PFYEJDRJ.js} +1 -1
  58. package/dist/cdn/{JWCEHGEZ.js → PNMBUGPD.js} +1 -1
  59. package/dist/cdn/QEAEEU72.js +2 -0
  60. package/dist/cdn/{U53HTVZS.js → RUJLTSDR.js} +1 -1
  61. package/dist/cdn/{IH7XQCY4.js → SA7B3XQG.js} +1 -1
  62. package/dist/cdn/{CNUAMIZQ.js → T5RX6NXT.js} +2 -2
  63. package/dist/cdn/T7PDMEAD.js +2 -0
  64. package/dist/cdn/{7PMJ7HCH.js → U5BYZI4G.js} +1 -1
  65. package/dist/cdn/UPXNXNTT.js +2 -0
  66. package/dist/cdn/{MG2HQ3FT.js → UW3FYQWG.js} +1 -1
  67. package/dist/cdn/V34ZYXUI.js +2 -0
  68. package/dist/cdn/{WRB2DEQ6.js → W6ILOTBW.js} +1 -1
  69. package/dist/cdn/{EZFBYRI4.js → WYX6WXW4.js} +1 -1
  70. package/dist/cdn/{JFE63ANJ.js → X27EW2YC.js} +1 -1
  71. package/dist/cdn/{6GFNMSM4.js → XHHVIWXO.js} +1 -1
  72. package/dist/cdn/{7P24CQF4.js → XOWOMVSW.js} +1 -1
  73. package/dist/cdn/{CRJB272X.js → XURPEC42.js} +1 -1
  74. package/dist/cdn/{WVRIR3PK.js → YB6AHPU5.js} +1 -1
  75. package/dist/cdn/{LQYTLVCL.js → YRQXG7GX.js} +1 -1
  76. package/dist/cdn/{LHH3PS5H.js → ZVGWUEUE.js} +1 -1
  77. package/dist/cdn/assets/time-zone-chip/t9n/messages.en.json +1 -1
  78. package/dist/cdn/index.js +1 -1
  79. package/dist/cdn/main.css +1 -1
  80. package/dist/chunks/AnalysisViewModel.js +1 -1
  81. package/dist/chunks/async-utils.js +1 -1
  82. package/dist/chunks/slots.js +1 -1
  83. package/dist/components/arcgis-daylight/customElement.d.ts +43 -50
  84. package/dist/components/arcgis-daylight/customElement.js +231 -225
  85. package/dist/components/arcgis-editor/customElement.d.ts +0 -1
  86. package/dist/components/arcgis-elevation-profile/customElement.d.ts +8 -0
  87. package/dist/components/arcgis-elevation-profile/customElement.js +39 -38
  88. package/dist/components/arcgis-line-of-sight/customElement.d.ts +4 -1
  89. package/dist/components/arcgis-link-chart/customElement.d.ts +0 -1
  90. package/dist/components/arcgis-map/customElement.d.ts +0 -1
  91. package/dist/components/arcgis-scene/customElement.d.ts +0 -1
  92. package/dist/components/arcgis-shadow-cast/customElement.d.ts +36 -24
  93. package/dist/components/arcgis-shadow-cast/customElement.js +105 -128
  94. package/dist/components/arcgis-sketch/customElement.d.ts +0 -1
  95. package/dist/components/arcgis-time-zone-chip/customElement.d.ts +8 -0
  96. package/dist/components/arcgis-time-zone-chip/customElement.js +27 -18
  97. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +34 -34
  98. package/dist/components/types.d.ts +7 -0
  99. package/dist/docs/api.json +1 -1
  100. package/dist/docs/docs.json +1 -1
  101. package/dist/docs/vscode.html-custom-data.json +1 -1
  102. package/dist/docs/web-types.json +1 -1
  103. package/dist/index.d.ts +0 -10
  104. package/dist/loader.js +3 -4
  105. package/dist/types/lumina.d.ts +6 -11
  106. package/dist/types/preact.d.ts +6 -12
  107. package/dist/types/react.d.ts +6 -13
  108. package/dist/types/stencil.d.ts +6 -11
  109. package/package.json +7 -7
  110. package/dist/cdn/27TSPXYV.js +0 -2
  111. package/dist/cdn/2JSC2QUL.js +0 -2
  112. package/dist/cdn/43IGD6V3.js +0 -2
  113. package/dist/cdn/4JR57ZIQ.js +0 -2
  114. package/dist/cdn/6BT6RP22.js +0 -2
  115. package/dist/cdn/6KYZMT4A.js +0 -2
  116. package/dist/cdn/BJUFDQGX.js +0 -2
  117. package/dist/cdn/DFNH6YRR.js +0 -2
  118. package/dist/cdn/GOMR7D5M.js +0 -2
  119. package/dist/cdn/HKKNU4CX.js +0 -2
  120. package/dist/cdn/LZUAJU6O.js +0 -2
  121. package/dist/cdn/PYBUTNHM.js +0 -2
  122. package/dist/cdn/SKV3CQSZ.js +0 -2
  123. package/dist/cdn/TXVB6WRV.js +0 -2
  124. package/dist/cdn/UYDXI4AK.js +0 -4
  125. package/dist/cdn/YAWLVMV6.js +0 -2
  126. package/dist/cdn/YGBYB3BZ.js +0 -2
  127. package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +0 -100
  128. package/dist/components/arcgis-utility-network-validate-topology/customElement.js +0 -44
  129. package/dist/components/arcgis-utility-network-validate-topology/index.d.ts +0 -1
  130. package/dist/components/arcgis-utility-network-validate-topology/index.js +0 -1
  131. /package/dist/cdn/{SLQPDAGN.js → 237ZYFAI.js} +0 -0
  132. /package/dist/cdn/{AYQJ2LTV.js → 4LNUUNTS.js} +0 -0
  133. /package/dist/cdn/{OLSESBZ7.js → 4RG2L4NX.js} +0 -0
  134. /package/dist/cdn/{N2YWWQOS.js → 6F6UDFL6.js} +0 -0
  135. /package/dist/cdn/{62HMPABL.js → 6FZQAFDW.js} +0 -0
  136. /package/dist/cdn/{RTDY3HLR.js → 6RNYBJQG.js} +0 -0
  137. /package/dist/cdn/{ZCL4XHIZ.js → 6YT2MRU6.js} +0 -0
  138. /package/dist/cdn/{XQ2WXTW7.js → AAF7U7C7.js} +0 -0
  139. /package/dist/cdn/{IRFIHD5X.js → AZFQTGM4.js} +0 -0
  140. /package/dist/cdn/{XCSF7KJK.js → BVR6RYPL.js} +0 -0
  141. /package/dist/cdn/{DPEWQQEB.js → C3VCBV5R.js} +0 -0
  142. /package/dist/cdn/{ZSKO7HLH.js → COJJ4ST7.js} +0 -0
  143. /package/dist/cdn/{NVN2CATF.js → CSLBASOL.js} +0 -0
  144. /package/dist/cdn/{2P5AJORF.js → DDUJHOQ5.js} +0 -0
  145. /package/dist/cdn/{DLUFAV4S.js → F25B6VFT.js} +0 -0
  146. /package/dist/cdn/{PWZHB6VD.js → FC4U5FYO.js} +0 -0
  147. /package/dist/cdn/{SLNXNVPI.js → H3SNBMDP.js} +0 -0
  148. /package/dist/cdn/{QWMDZDQA.js → HDNFEQXP.js} +0 -0
  149. /package/dist/cdn/{FJMXBIN5.js → HMAEKQ63.js} +0 -0
  150. /package/dist/cdn/{T34W3GKP.js → HRKFC3ZC.js} +0 -0
  151. /package/dist/cdn/{5GTPIPN7.js → ID3JLPN6.js} +0 -0
  152. /package/dist/cdn/{KOMTNQPT.js → IKNNVF57.js} +0 -0
  153. /package/dist/cdn/{OFBWNR54.js → J3U6IFQO.js} +0 -0
  154. /package/dist/cdn/{CHMBPPHS.js → JUG5VVPL.js} +0 -0
  155. /package/dist/cdn/{MEISDI2H.js → KYUDUFNZ.js} +0 -0
  156. /package/dist/cdn/{4LWSF6AI.js → L63YJ5AF.js} +0 -0
  157. /package/dist/cdn/{LVIYMA67.js → LGPNCTTW.js} +0 -0
  158. /package/dist/cdn/{LS4U4GD5.js → LH4SQVC2.js} +0 -0
  159. /package/dist/cdn/{XGWYQ7FU.js → LNUFIKD5.js} +0 -0
  160. /package/dist/cdn/{7YT5W57B.js → NIASADUV.js} +0 -0
  161. /package/dist/cdn/{UDXDE3LW.js → NJ3CJS46.js} +0 -0
  162. /package/dist/cdn/{6SL7YNKF.js → NXC47WWQ.js} +0 -0
  163. /package/dist/cdn/{ZNIMZP5R.js → O527UXXI.js} +0 -0
  164. /package/dist/cdn/{G4IKO2R6.js → OXZOWO5A.js} +0 -0
  165. /package/dist/cdn/{SFDCS6A2.js → PHFJU5KL.js} +0 -0
  166. /package/dist/cdn/{TP2KQRW6.js → QHK5I5OO.js} +0 -0
  167. /package/dist/cdn/{IAYL44LK.js → RB3QNSQJ.js} +0 -0
  168. /package/dist/cdn/{ECA47Z37.js → T4CJDMMZ.js} +0 -0
  169. /package/dist/cdn/{AKTIOEYM.js → TAU22PX7.js} +0 -0
  170. /package/dist/cdn/{ZHYXFOYU.js → VP47DYTR.js} +0 -0
  171. /package/dist/cdn/{NVKOZL7X.js → WMP77MLQ.js} +0 -0
  172. /package/dist/cdn/{5GGAWGSN.js → WMRMVZHH.js} +0 -0
  173. /package/dist/cdn/{GCPR7XFU.js → YEEPGAEP.js} +0 -0
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as Pi}from"./OYG42YJL.js";import{a as Mi,b as Er,c as $r,d as Si,e as ki,f as Di,g as Ei,h as Vt,i as ie,j as ds,k as Te}from"./OUFB4LJK.js";import{$ as Pr,A as Ti,B as W,D as as,F as R,G as Yt,I as Ce,J as os,K as hs,L as Tt,M as ls,Q as E,R as cs,S as Mt,U as Dr,Z as Xt,c as It,e as Gt,h as rt,i as U,k as j,l as Cr,m as Tr,na as $i,o as ni,r as Mr,s as Sr,u as ee,xa as Ai,z as B}from"./7WUY57GO.js";import{$ as ns,D as we,E as ii,F as gr,G as _r,H as is,J as ss,K as rs,L as yr,M as xr,N as br,O as si,P as ri,Q as vr,S as st,W as ct,X as L,c as Qi,e as hr,f as F,g as ve,h as Ct,j as lr,k as cr,l as Ci,n as ei,o as dr,p as ts,q as ur,r as fr,s as te,t as $t,u as pr,v as J,w as es,x as Pt,y as mr,z as X}from"./AKSCONMP.js";import{a as Et,b as lt,d as O,e as Kt,f as Ki}from"./NJ3CJS46.js";import{A as rr,E as me,G as Ji,H as ge,J as nr,K as V,L as ar,N as or,O as it,P as _e,Q as yt,S as ti,T as wr,U as kr,X as Wt,b as _t,d as ir,f as Ot,g as N,h as Zt,i as Je,j as Ht,k as Jt,m as vi,n as Zi,o as wi,p as w,r as fe,s as Qt,t as be,u as sr,v as Qe,w as pe}from"./NXC47WWQ.js";import{a as hn}from"./TAVTDQ6S.js";var us=class{constructor(){this._targets=[],this._observer=new ResizeObserver(t=>{w(t,e=>{w(this._targets,i=>{i.target===e.target&&i.callback()})})})}addTarget(t,e){this._observer.observe(t,{box:"border-box"}),this._targets.push({target:t,callback:e})}removeTarget(t){this._observer.unobserve(t),me(this._targets,e=>e.target!==t)}},Fi=class o{constructor(){this._timer=null,this._targets=[]}addTarget(t,e){if(this._timer===null){let s=null,r=()=>{let n=Date.now();(s===null||n>s+o.delay)&&(s=n,w(this._targets,a=>{let h=a.target.getBoundingClientRect();(h.width!==a.size.width||h.height!==a.size.height)&&(a.size=h,a.callback())})),this._targets.length===0?this._timer=null:this._timer=requestAnimationFrame(r)};this._timer=requestAnimationFrame(r)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:t,callback:e,size:i})}removeTarget(t){me(this._targets,e=>e.target!==t),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}};Fi.delay=200;var Li=null;function ln(){return Li===null&&(typeof ResizeObserver<"u"?Li=new us:Li=new Fi),Li}var Ni=class{constructor(t,e){this._disposed=!1,this._sensor=ln(),this._element=t,this._listener=ve(e),this._sensor.addTarget(t,e)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}};var se=class extends B{};se.className="InterfaceColors";se.classNames=B.classNames.concat([se.className]);var At=class extends R{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let t=this.width(),e=this.height();if(t>0&&e>0){let i=this.get("cornerRadius",8);i=rt(i,0,Math.min(t/2,e/2));let s=this.get("pointerX",0),r=this.get("pointerY",0),n=this.get("pointerBaseWidth",15)/2,a=0,h=0,c=t,l=0,d=t,u=e,f=0,m=e,_=(s-a)*(u-h)-(r-h)*(d-a),p=(s-f)*(l-m)-(r-m)*(c-f),y=this._display;if(y.moveTo(i,0),_>0&&p>0){let g=Math.round(rt(s,i+n,t-n-i));r=rt(r,-1/0,0),y.lineTo(g-n,0),y.lineTo(s,r),y.lineTo(g+n,0)}if(y.lineTo(t-i,0),y.arcTo(t,0,t,i,i),_>0&&p<0){let g=Math.round(rt(r,i+n,e-n-i));s=rt(s,t,1/0),y.lineTo(t,i),y.lineTo(t,Math.max(g-n,i)),y.lineTo(s,r),y.lineTo(t,g+n)}if(y.lineTo(t,e-i),y.arcTo(t,e,t-i,e,i),_<0&&p<0){let g=Math.round(rt(s,i+n,t-n-i));r=rt(r,e,1/0),y.lineTo(t-i,e),y.lineTo(g+n,e),y.lineTo(s,r),y.lineTo(g-n,e)}if(y.lineTo(i,e),y.arcTo(0,e,0,e-i,i),_<0&&p>0){let g=Math.round(rt(r,i+n,e-i-n));s=rt(s,-1/0,0),y.lineTo(0,e-i),y.lineTo(0,g+n),y.lineTo(s,r),y.lineTo(0,Math.max(g-n,i))}y.lineTo(0,i),y.arcTo(0,0,i,0,i),y.closePath()}}}};At.className="PointedRectangle";At.classNames=R.classNames.concat([At.className]);var St=class extends E{constructor(t,e,i,s=[]){super(t,e,i,s),this._fx=0,this._fy=0,this._w=0,this._h=0,this._htmlContentHovered=!1,this._focusAnnounce=!1}_afterNew(){this._settings.themeTags=st(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultTagged("background",["tooltip","background"],()=>At.new(this._root,{})),this._label=this.children.push(Mt.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",()=>{this._updateBackground()})),this._disposers.push(this.on("bounds",()=>{this._updateBackground()})),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",t=>{t&&(this._disposers.push(F(t,"pointerover",e=>{this._htmlContentHovered=!0})),this._disposers.push(F(t,"pointerout",e=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){if((this.get("readerAnnounce")||this._focusAnnounce)&&this.isVisibleDeep()){let t=this.label.getAccessibleText();if(!this.get("readerAnnounce")&&this._repeatsTargetLabel(t))return;this._root.readerAlert(t)}}_repeatsTargetLabel(t){let e=this.get("tooltipTarget"),i=e&&e.getPrivate("focusElement"),s=i&&i.dom.getAttribute("aria-label"),r=n=>ii(n).replace(/\s+/g," ").trim().toLowerCase();return s?r(s)==r(t):!1}get label(){return this._label}_dispose(){super._dispose(),Qt(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width"),this.get("labelText")!=null&&this.label.set("text",this.get("labelText")),this.get("labelHTML")!=null&&this.label.set("html",this.get("labelHTML")),this.get("labelAriaLabel")!=null&&this.label.set("ariaLabel",this.get("labelAriaLabel"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackground(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover"))if(this.get("keepTargetHover")){let e=this.get("background");this._keepHoverDp=new yt([e.events.on("pointerover",i=>{let s=this.get("tooltipTarget");s&&(s.parent&&s.parent.getPrivate("tooltipTarget")==s&&(s=s.parent),s.hover())}),e.events.on("pointerout",i=>{let s=this.get("tooltipTarget");s&&(s.parent&&s.parent.getPrivate("tooltipTarget")==s&&(s=s.parent),this._htmlContentHovered||s.unhover())})]),this.label.onPrivate("htmlElement",i=>{this._keepHoverDp&&i&&this._keepHoverDp.disposers.push(F(i,"pointerleave",s=>{let r=this.root._renderer.getEvent(s);e.events.dispatch("pointerout",{type:"pointerout",originalEvent:r.event,point:r.point,simulated:!1,target:e})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let t=this.get("tooltipTarget"),e=this.get("background"),i,s;if(t&&e){if(i=t.get("fill"),s=t.get("stroke"),i==null&&(i=s),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),i!=null&&e._setC("fill",i),this._fillDp=t.on("fill",r=>{r!=null&&(e._setC("fill",r),this._updateTextColor(r))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let r=t.get("fillGradient");r!=null&&e._setC("fillGradient",r),this._fillGrDp=t.on("fillGradient",n=>{n!=null&&e._setC("fillGradient",n)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&e._setC("stroke",i),this._strokeDp=t.on("fill",r=>{r!=null&&e._setC("stroke",r)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label._setC("fill",i),this._labelDp=t.on("fill",r=>{r!=null&&this.label._setC("fill",r)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(t){this.get("autoTextColor")&&(t==null&&(t=this.get("background").get("fill")),t==null&&(t=this._root.interfaceColors.get("background")),t instanceof L&&this.label._setC("fill",L.alternative(t,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(t){super._setDataItem(t),this.label._setDataItem(t)}_updateBackground(){super.updateBackground();let t=this._root.container;if(t){let e=.5,i=.5,s=this.get("centerX");s instanceof Et&&(e=s.value);let r=this.get("centerY");r instanceof Et&&(i=r.value);let n=t.width(),a=t.height(),h=this.parent,c=0,l=0;if(h){c=h.x(),l=h.y();let k=h.get("layerMargin");k&&(c+=k.left||0,l+=k.top||0,n+=(k.left||0)+(k.right||0),a+=(k.top||0)+(k.bottom||0))}let d=this.get("bounds",{left:-c,top:-l,right:n-c,bottom:a-l});this._updateBounds();let u=this.width(),f=this.height();u===0&&(u=this._w),f===0&&(f=this._h);let m=this.get("pointTo",{x:n/2,y:a/2}),_=m.x,p=m.y,y=this.get("pointerOrientation"),g=this.get("background"),b=0,x=0,v=0;g instanceof At&&(b=g.get("pointerLength",0),x=g.get("strokeWidth",0)/2,v=x,g._setC("width",u),g._setC("height",f));let M=0,C=0,T=d.right-d.left,S=d.bottom-d.top;y=="horizontal"||y=="left"||y=="right"?(x=0,y=="horizontal"?_>d.left+T/2?(_-=u*(1-e)+b,v*=-1):_+=u*e+b:y=="left"?_+=u*(1-e)+b:(_-=u*e+b,v*=-1)):(v=0,y=="vertical"?p>d.top+f/2+b?p-=f*(1-i)+b:(p+=f*i+b,x*=-1):y=="down"?p-=f*(1-i)+b:(p+=f*i+b,x*=-1)),_=rt(_,d.left+u*e,d.left+T-u*(1-e))+v,p=rt(p,d.top+f*i,d.top+S-f*(1-i))-x,M=m.x-_+u*e+v,C=m.y-p+f*i-x,this._fx=_,this._fy=p;let D=this.get("animationDuration",0);if(D>0&&this.get("visible")&&this.get("opacity")>.1){let k=this.get("animationEasing");this.animate({key:"x",to:_,duration:D,easing:k}),this.animate({key:"y",to:p,duration:D,easing:k})}else this._setC("x",_),this._setC("y",p);g instanceof At&&(g._setC("pointerX",M),g._setC("pointerY",C)),u>0&&(this._w=u),f>0&&(this._h=f)}}};St.className="Tooltip";St.classNames=E.classNames.concat([St.className]);var re=class extends B{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);let t="_big_number_suffix_",e="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(t+"3")},{number:1e6,suffix:this._t(t+"6")},{number:1e9,suffix:this._t(t+"9")},{number:1e12,suffix:this._t(t+"12")},{number:1e15,suffix:this._t(t+"15")},{number:1e18,suffix:this._t(t+"18")},{number:1e21,suffix:this._t(t+"21")},{number:1e24,suffix:this._t(t+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(e+"24")},{number:1e-21,suffix:this._t(e+"21")},{number:1e-18,suffix:this._t(e+"18")},{number:1e-15,suffix:this._t(e+"15")},{number:1e-12,suffix:this._t(e+"12")},{number:1e-9,suffix:this._t(e+"9")},{number:1e-6,suffix:this._t(e+"6")},{number:.001,suffix:this._t(e+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){(e==null||Ot(e)&&e.toLowerCase()==="number")&&(e=this.get("numberFormat",""));let s,r=Number(t);if(Zt(e))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),e).format(r):new Intl.NumberFormat(void 0,e).format(r)}catch{return"Invalid"}else{e=we(e);let n=this.parseFormat(e,this._root.language),a;r>this.get("negativeBase")?a=n.positive:r<this.get("negativeBase")?a=n.negative:a=n.zero,i!=null&&!a.mod&&(a=nr(a),a.decimals.active=r==0?0:i),s=a.template.split(Ht).join(this.applyFormat(r,a))}return this.get("forceLTR")===!0&&(s="\u200E"+s),s}parseFormat(t,e){let i=e.translateEmpty("_thousandSeparator"),s=e.translateEmpty("_decimalSeparator"),r={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1}};t=t.replace("||",Jt);let n=t.split("|");return r.positive.source=n[0],typeof n[2]>"u"?r.zero=r.positive:r.zero.source=n[2],typeof n[1]>"u"?r.negative=r.positive:r.negative.source=n[1],V(r,(a,h)=>{if(h.parsed)return;let c=h.source;c.toLowerCase()==="number"&&(c=this.get("numberFormat","#,###.#####"));let l=Tt.chunk(c,!0);for(let d=0;d<l.length;d++){let u=l[d];if(u.text=u.text.replace(Jt,"|"),u.type==="value"){let f=u.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(f)if(f===null||f[0]==="")h.template+=u.text;else{let m=f[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);m&&(h.mod=m[0].toLowerCase(),h.modSpacing=!!f[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let _=f[0].match(/^[#0.,]+/)[0].split(".");if(_[0]!==""){h.thousands.active=(_[0].match(/0/g)||[]).length,h.thousands.passive=(_[0].match(/\#/g)||[]).length+h.thousands.active;let p=_[0].split(",");p.length===1||(h.thousands.interval=(p.pop()||"").length,h.thousands.interval===0&&(h.thousands.interval=-1))}typeof _[1]>"u"||(h.decimals.active=(_[1].match(/0/g)||[]).length,h.decimals.passive=(_[1].match(/\#/g)||[]).length+h.decimals.active),h.template+=u.text.split(f[0]).join(Ht)}}else h.template+=u.text}h.parsed=!0}),r}applyFormat(t,e){let i=t<0;t=Math.abs(t);let s="",r="",n=e.mod?e.mod.split(""):[];if(n.indexOf("b")!==-1){let d=this.applyPrefix(t,this.get("bytePrefixes"),n.indexOf("!")!==-1);t=d[0],s=d[1],r=d[2],e.modSpacing&&(r=" "+r)}else if(n.indexOf("a")!==-1){let d=this.applyPrefix(t,t<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),n.indexOf("!")!==-1);t=d[0],s=d[1],r=d[2],e.modSpacing&&(r=" "+r)}else if(n.indexOf("p")!==-1){let d=Math.min(t.toString().length+2,21);t=parseFloat(t.toPrecision(d)),s=this._root.language.translate("_percentPrefix"),r=this._root.language.translate("_percentSuffix"),s==""&&r==""&&(r="%")}else if(n.indexOf("%")!==-1){let d=Math.min(t.toString().length+2,21);t*=100,t=parseFloat(t.toPrecision(d)),r="%"}else if(n.indexOf("\u2030")!==-1){let d=Math.min(t.toString().length+3,21);t*=1e3,t=parseFloat(t.toPrecision(d)),r="\u2030"}if(n.indexOf("e")!==-1){let d;e.decimals.passive>=0?d=t.toExponential(e.decimals.passive).split("e"):d=t.toExponential().split("e"),t=Number(d[0]),r="e"+d[1],e.modSpacing&&(r=" "+r)}else if(e.decimals.passive===0)t=Math.round(t);else if(e.decimals.passive>0){let d=mr(t);if(d>0){let u=Math.pow(10,e.decimals.passive);t=Math.round(parseFloat((t*u).toFixed(d)))/u}}let a="",h=ir(t).split("."),c=h[0];if(c.length<e.thousands.active&&(c=Array(e.thousands.active-c.length+1).join("0")+c),e.thousands.interval>0){let d=[],u=c.split("").reverse().join("");for(let f=0,m=c.length;f<=m;f+=e.thousands.interval){let _=u.substr(f,e.thousands.interval).split("").reverse().join("");_!==""&&d.unshift(_)}c=d.join(e.thousands.separator)}a+=c,h.length===1&&h.push("");let l=h[1];return l.length<e.decimals.active&&(l+=Array(e.decimals.active-l.length+1).join("0")),l!==""&&(a+=e.decimals.separator+l),a===""&&(a="0"),t!==0&&i&&n.indexOf("s")===-1&&(a="-"+a),s&&(a=s+a),r&&(a+=r),a}applyPrefix(t,e,i=!1){let s=t,r="",n="",a=!1,h=1;for(let c=0,l=e.length;c<l;c++)e[c].number<=t&&(e[c].number===0?s=0:(s=t/e[c].number,h=e[c].number),r=e[c].prefix,n=e[c].suffix,a=!0);return!a&&i&&e.length&&t!=0&&(s=t/e[0].number,r=e[0].prefix,n=e[0].suffix,a=!0),a&&(s=parseFloat(s.toPrecision(Math.min(h.toString().length+Math.floor(s).toString().replace(/[^0-9]*/g,"").length,21)))),[s,r,n]}escape(t){return t.replace("||",Jt)}unescape(t){return t.replace(Jt,"|")}};re.className="NumberFormatter";re.classNames=B.classNames.concat([re.className]);var ae=class extends B{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i=!1){(typeof e>"u"||e==="")&&(e=this.get("dateFormat","yyyy-MM-dd"));let s,r=t;if(Zt(e))try{let l=this.get("intlLocales");return l?new Intl.DateTimeFormat(l,e).format(r):new Intl.DateTimeFormat(void 0,e).format(r)}catch{return"Invalid"}let n=this.parseFormat(e);if(!N(r.getTime()))return"Invalid date";let a=this._root.timezone,h=r,c=this._root.utc&&!i;return a&&!this._root.utc&&!i&&(r=new Date(r.getTime()-Math.round(a.offsetUTC(r)*6e4)),c=!0),s=this.applyFormat(r,n,i,h,c),this.get("capitalize")&&(s=s.replace(/^.{1}/,s.substr(0,1).toUpperCase())),s}applyFormat(t,e,i=!1,s,r=this._root.utc&&!i){let n=e.template,a,h,c,l,d,u,f,m,_=(s||t).getTime();r?(a=t.getUTCFullYear(),h=t.getUTCMonth(),c=t.getUTCDay(),l=t.getUTCDate(),d=t.getUTCHours(),u=t.getUTCMinutes(),f=t.getUTCSeconds(),m=t.getUTCMilliseconds()):(a=t.getFullYear(),h=t.getMonth(),c=t.getDay(),l=t.getDate(),d=t.getHours(),u=t.getMinutes(),f=t.getSeconds(),m=t.getMilliseconds());for(let p=0,y=e.parts.length;p<y;p++){let g="";switch(e.parts[p]){case"G":g=this._t(a<0?"_era_bc":"_era_ad");break;case"yyyy":g=Math.abs(a).toString(),a<0&&(g+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":g=Math.abs(a).toString().substr(-e.parts[p].length),a<0&&(g+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let b=yr(t,r);e.parts[p]=="YYYY"?g=Math.abs(b).toString():g=Math.abs(b).toString().substr(-e.parts[p].length),b<0&&(g+=this._t("_era_bc"));break;case"u":break;case"q":g=""+Math.ceil((h+1)/3);break;case"MMMMM":g=this._t(this._getMonth(h)).substr(0,1);break;case"MMMM":g=this._t(this._getMonth(h));break;case"MMM":g=this._t(this._getShortMonth(h));break;case"MM":g=X(h+1,2,"0");break;case"M":g=(h+1).toString();break;case"ww":g=X(rs(t,r),2,"0");break;case"w":g=rs(t,r).toString();break;case"W":g=xr(t,r).toString();break;case"dd":g=X(l,2,"0");break;case"d":g=l.toString();break;case"DD":case"DDD":g=X(ss(t,r).toString(),e.parts[p].length,"0");break;case"D":g=ss(t,r).toString();break;case"F":break;case"g":break;case"t":g=this._root.language.translateFunc("_dateOrd").call(this,l);break;case"E":g=(c||7).toString();break;case"EE":g=X((c||7).toString(),2,"0");break;case"EEE":case"eee":g=this._t(this._getShortWeekday(c));break;case"EEEE":case"eeee":g=this._t(this._getWeekday(c));break;case"EEEEE":case"eeeee":g=this._t(this._getShortWeekday(c)).substr(0,1);break;case"e":case"ee":g=(c-(this._root.locale.firstDayOfWeek||1)+1).toString(),e.parts[p]=="ee"&&(g=X(g,2,"0"));break;case"a":d>=12?g=this._t("PM"):g=this._t("AM");break;case"aa":d>=12?g=this._t("P.M."):g=this._t("A.M.");break;case"aaa":d>=12?g=this._t("P"):g=this._t("A");break;case"h":g=si(d).toString();break;case"hh":g=X(si(d),2,"0");break;case"H":g=d.toString();break;case"HH":g=X(d,2,"0");break;case"K":g=si(d,0).toString();break;case"KK":g=X(si(d,0),2,"0");break;case"k":g=(d+1).toString();break;case"kk":g=X(d+1,2,"0");break;case"m":g=u.toString();break;case"mm":g=X(u,2,"0");break;case"s":g=f.toString();break;case"ss":g=X(f,2,"0");break;case"S":case"SS":case"SSS":g=Math.round(m/1e3*Math.pow(10,e.parts[p].length)).toString();break;case"x":g=_.toString();break;case"n":case"nn":case"nnn":g=X(m,e.parts[p].length,"0");break;case"z":g=ri(s||t,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":g=ri(s||t,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":g=ri(s||t,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":g=ri(s||t,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let x=this._root.utc?"UTC":this._root.timezone,v;x instanceof Qi?v=x.offsetUTC(s||t):v=x?vr(x,s||t):t.getTimezoneOffset();let M=Math.abs(v)/60,C=Math.floor(M),T=Math.round(M*60-C*60);T==60&&(C++,T=0),this._root.utc&&(C=0,T=0),e.parts[p]=="Z"?(g="GMT",g+=v>0?"-":"+",g+=X(C,2)+":"+X(T,2)):(g=v>0?"-":"+",g+=X(C,2)+X(T,2));break;case"i":g=(s||t).toISOString();break;case"I":g=(s||t).toUTCString();break}n=n.replace(Ht,g)}return n}parseFormat(t){let e={template:"",parts:[]},i=Tt.chunk(t,!0);for(let s=0;s<i.length;s++){let r=i[s];if(r.type==="value"){if(r.text.match(/^date$/i)){let a=this.get("dateFormat","yyyy-MM-dd");Ot(a)||(a="yyyy-MM-dd"),r.text=a}let n=r.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);if(n)for(let a=0;a<n.length;a++)e.parts.push(n[a]),r.text=r.text.replace(n[a],Ht)}e.template+=r.text}return e}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(t){return this._months()[t]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(t){return this._shortMonths()[t]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(t){return this._weekdays()[t]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(t){return this._shortWeekdays()[t]}parse(t,e,i){if(typeof i>"u"&&(i=this._root.utc),t instanceof Date)return t;if(N(t))return new Date(t);if(e=="x")return new Date(parseInt(t));Ot(t)||(t=t.toString());let s,r="";e=we(e),e=e.substr(0,t.length);let n=this.parseFormat(e);if(n.parts.length==0)return new Date(t);let a={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},h={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},c=0,l=0;for(let f=0;f<n.parts.length;f++){switch(l=f+c+1,n.parts[f]){case"yyyy":case"YYYY":r+="([0-9]{4})",a.year=l;break;case"yyy":case"YYY":r+="([0-9]{3})",a.year3=l;break;case"yy":case"YY":r+="([0-9]{2})",a.year2=l;break;case"y":case"Y":r+="([0-9]{1})",a.year1=l;break;case"MMMM":r+="("+this.getStringList(this._months()).join("|")+")",a.monthLong=l;break;case"MMM":r+="("+this.getStringList(this._shortMonths()).join("|")+")",a.monthShort=l;break;case"MM":case"M":r+="([0-9]{2}|[0-9]{1})",a.month=l;break;case"ww":case"w":r+="([0-9]{2}|[0-9]{1})",a.week=l;break;case"dd":case"d":r+="([0-9]{2}|[0-9]{1})",a.day=l;break;case"DDD":case"DD":case"D":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",a.yearDay=l;break;case"dddd":r+="("+this.getStringList(this._weekdays()).join("|")+")",a.weekdayLong=l;break;case"ddd":r+="("+this.getStringList(this._shortWeekdays()).join("|")+")",a.weekdayShort=l;break;case"aaa":case"aa":case"a":r+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",a.am=l;break;case"hh":case"h":r+="([0-9]{2}|[0-9]{1})",a.hour12Base1=l;break;case"HH":case"H":r+="([0-9]{2}|[0-9]{1})",a.hourBase0=l;break;case"KK":case"K":r+="([0-9]{2}|[0-9]{1})",a.hour12Base0=l;break;case"kk":case"k":r+="([0-9]{2}|[0-9]{1})",a.hourBase1=l;break;case"mm":case"m":r+="([0-9]{2}|[0-9]{1})",a.minute=l;break;case"ss":case"s":r+="([0-9]{2}|[0-9]{1})",a.second=l;break;case"SSS":case"SS":case"S":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",a.millisecond=l,a.millisecondDigits=n.parts[f].length;break;case"nnn":case"nn":case"n":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",a.millisecond=l;break;case"x":r+="([0-9]{1,})",a.timestamp=l;break;case"Z":r+="GMT([-+]+[0-9]{2}:[0-9]{2})",a.zone=l;break;case"ZZ":r+="([\\-+]+[0-9]{2}[0-9]{2})",a.zone=l;break;case"i":r+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)",a.iso=l,c+=7;break;case"G":case"YYYY":case"YYY":case"YY":case"Y":case"MMMMM":case"W":case"EEEEE":case"EEEE":case"EEE":case"EE":case"E":case"eeeee":case"eeee":case"eee":case"ee":case"e":case"zzzz":case"zzz":case"zz":case"z":case"t":c--;break}r+="[^0-9]*"}let d=new RegExp(r),u=t.match(d);if(u){if(a.year>-1&&(h.year=parseInt(u[a.year])),a.year3>-1){let f=parseInt(u[a.year3]);f+=1e3,h.year=f}if(a.year2>-1){let f=parseInt(u[a.year2]);f>50?f+=1e3:f+=2e3,h.year=f}if(a.year1>-1){let f=parseInt(u[a.year1]);f=Math.floor(new Date().getFullYear()/10)*10+f,h.year=f}if(a.monthLong>-1&&(h.month=this.resolveMonth(u[a.monthLong])),a.monthShort>-1&&(h.month=this.resolveShortMonth(u[a.monthShort])),a.month>-1&&(h.month=parseInt(u[a.month])-1),a.week>-1&&a.day===-1&&(h.month=0,h.day=br(parseInt(u[a.week]),h.year,1,i)),a.day>-1&&(h.day=parseInt(u[a.day])),a.yearDay>-1&&(h.month=0,h.day=parseInt(u[a.yearDay])),a.hourBase0>-1&&(h.hour=parseInt(u[a.hourBase0])),a.hourBase1>-1&&(h.hour=parseInt(u[a.hourBase1])-1),a.hour12Base0>-1){let f=parseInt(u[a.hour12Base0]);f==11&&(f=0),a.am>-1&&!this.isAm(u[a.am])&&(f+=12),h.hour=f}if(a.hour12Base1>-1){let f=parseInt(u[a.hour12Base1]);f==12&&(f=0),a.am>-1&&!this.isAm(u[a.am])&&(f+=12),h.hour=f}if(a.minute>-1&&(h.minute=parseInt(u[a.minute])),a.second>-1&&(h.second=parseInt(u[a.second])),a.millisecond>-1){let f=parseInt(u[a.millisecond]);a.millisecondDigits==2?f*=10:a.millisecondDigits==1&&(f*=100),h.millisecond=f}if(a.timestamp>-1){h.timestamp=parseInt(u[a.timestamp]);let f=new Date(h.timestamp);h.year=f.getUTCFullYear(),h.month=f.getUTCMonth(),h.day=f.getUTCDate(),h.hour=f.getUTCHours(),h.minute=f.getUTCMinutes(),h.second=f.getUTCSeconds(),h.millisecond=f.getUTCMilliseconds()}a.zone>-1&&(h.offset=this.resolveTimezoneOffset(new Date(h.year,h.month,h.day),u[a.zone])),a.iso>-1&&(h.year=_t(u[a.iso+0]),h.month=_t(u[a.iso+1])-1,h.day=_t(u[a.iso+2]),h.hour=_t(u[a.iso+3]),h.minute=_t(u[a.iso+4]),h.second=_t(u[a.iso+5]),h.millisecond=_t(u[a.iso+6]),u[a.iso+7]=="Z"||u[a.iso+7]=="z"?h.utc=!0:u[a.iso+7]!=""&&(h.offset=this.resolveTimezoneOffset(new Date(h.year,h.month,h.day),u[a.iso+7]))),h.utc?s=new Date(Date.UTC(h.year,h.month,h.day,h.hour,h.minute,h.second,h.millisecond)):s=new Date(h.year,h.month,h.day,h.hour,h.minute+h.offset,h.second,h.millisecond)}else s=new Date(t);return s}resolveTimezoneOffset(t,e){if(e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let s=e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),r=s[1],n=s[2],a=s[3],h=parseInt(n)*60+parseInt(a);r=="+"&&(h*=-1);let c=(t||new Date).getTimezoneOffset();return h-c}return 0}resolveMonth(t){let e=this._months().indexOf(t);return e>-1||!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._months()).indexOf(t),e>-1)?e:0}resolveShortMonth(t){let e=this._shortMonths().indexOf(t);return e>-1||(e=this._months().indexOf(t),e>-1)||this._root.language&&!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._shortMonths()).indexOf(t),e>-1)?e:0}isAm(t){return this.getStringList(["AM","A.M.","A"]).indexOf(t.toUpperCase())>-1}getStringList(t){let e=[];for(let i=0;i<t.length;i++)this._root.language?e.push(is(this._t(t[i]))):e.push(is(t[i]));return e}};ae.className="DateFormatter";ae.classNames=B.classNames.concat([ae.className]);var oe=class extends B{constructor(){super(...arguments),this._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}}_setDefaults(){let t="_duration_millisecond",e="_duration_second",i="_duration_minute",s="_duration_hour",r="_duration_day",n="_duration_week",a="_duration_month",h="_duration_year",c="_second",l="_minute",d="_hour",u="_day",f="_week",m="_month",_="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(t),second:this._t(t+c),minute:this._t(t+l),hour:this._t(t+d),day:this._t(t+u),week:this._t(t+f),month:this._t(t+m),year:this._t(t+_)},second:{second:this._t(e),minute:this._t(e+l),hour:this._t(e+d),day:this._t(e+u),week:this._t(e+f),month:this._t(e+m),year:this._t(e+_)},minute:{minute:this._t(i),hour:this._t(i+d),day:this._t(i+u),week:this._t(i+f),month:this._t(i+m),year:this._t(i+_)},hour:{hour:this._t(s),day:this._t(s+u),week:this._t(s+f),month:this._t(s+m),year:this._t(s+_)},day:{day:this._t(r),week:this._t(r+f),month:this._t(r+m),year:this._t(r+_)},week:{week:this._t(n),month:this._t(n+m),year:this._t(n+_)},month:{month:this._t(a),year:this._t(a+_)},year:{year:this._t(h)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){let s=i||this.get("baseUnit");(typeof e>"u"||e==="")&&(this.get("durationFormat")!=null?e=this.get("durationFormat"):e=this.getFormat(_t(t),void 0,s)),e=we(e);let r=this.parseFormat(e,s),n=Number(t),a;n>this.get("negativeBase")?a=r.positive:n<this.get("negativeBase")?a=r.negative:a=r.zero;let h=this.applyFormat(n,a);return a.color!==""&&(h="["+a.color+"]"+h+"[/]"),h}parseFormat(t,e){let i=e||this.get("baseUnit"),s={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}};t=t.replace("||",Jt);let r=t.split("|");return s.positive.source=r[0],typeof r[2]>"u"?s.zero=s.positive:s.zero.source=r[2],typeof r[1]>"u"?s.negative=s.positive:s.negative.source=r[1],V(s,(n,a)=>{if(a.parsed)return;let h=a.source,c=[];c=a.source.match(/^\[([^\]]*)\]/),c&&c.length&&c[0]!==""&&(h=a.source.substr(c[0].length),a.color=c[1]);let l=Tt.chunk(h,!0);for(let d=0;d<l.length;d++){let u=l[d];if(u.text=u.text.replace(Jt,"|"),u.type==="value"){u.text.match(/[yYMdDwhHKkmsSn]+a/)&&(a.absolute=!0,u.text=u.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let f=u.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(f)for(let m=0;m<f.length;m++)a.parts.push(f[m]),u.text=u.text.replace(f[m],Ht)}a.template+=u.text}a.parsed=!0}),s}applyFormat(t,e){let i=!e.absolute&&t<this.get("negativeBase");t=Math.abs(t);let s=this.toTimeStamp(t,e.baseUnit),r=e.template,n={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let a=0,h=e.parts.length;a<h;a++){let c=e.parts[a],l=this._toTimeUnit(c.substr(0,1)),d,u=this._getUnitValue(l);a<h-1?d=Math.floor(s/u):d=Math.round(s/u),n[l]+=d,s-=d*u}V(n,(a,h)=>{a=="millisecond"&&h==1e3?(n.second++,n.millisecond=0):a=="second"&&h==60?(n.minute++,n.second=0):a=="minute"&&h==60?(n.hour++,n.minute=0):a=="hour"&&h==24?(n.day++,n.hour=0):a=="day"&&h==7&&e.parts.indexOf("w")!==-1?(n.week++,n.day=0):a=="day"&&h==30?(n.month++,n.day=0):a=="month"&&h==12&&(n.year++,n.month=0)});for(let a=0,h=e.parts.length;a<h;a++){let c=e.parts[a],l=this._toTimeUnit(c.substr(0,1)),d=c.length;r=r.replace(Ht,X(n[l],d,"0"))}return i&&(r="-"+r),r}toTimeStamp(t,e){return t*this._getUnitValue(e)}_toTimeUnit(t){switch(this._unitAliases[t]||t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year"}}getFormat(t,e,i){if(this.get("durationFormat")!=null)return this.get("durationFormat");if(i||(i=this.get("baseUnit")),e!=null&&t!=e){t=Math.abs(t),e=Math.abs(e);let s=this.getValueUnit(Math.max(t,e),i);return this.get("durationFormats")[i][s]}else{let s=this.getValueUnit(t,i);return this.get("durationFormats")[i][s]}}getValueUnit(t,e){e||(e=this.get("baseUnit"));let i,s=this.getMilliseconds(t,e);return ar(this._getUnitValues(),(r,n)=>{if(r==e||i){if(s/n<=1)return i||(i=r),!1;i=r}return!0}),i}getMilliseconds(t,e){return e||(e=this.get("baseUnit")),t*this._getUnitValue(e)}_getUnitValue(t){return this._getUnitValues()[t]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}};oe.className="DurationFormatter";oe.classNames=B.classNames.concat([oe.className]);var Bi={firstDayOfWeek:1,_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03BC",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(o){let t="th";if(o<11||o>13)switch(o%10){case 1:t="st";break;case 2:t="nd";break;case 3:t="rd";break}return t},"Zoom Out":"",Play:"",Stop:"",Legend:"","Press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:"",OK:"",Cancel:"",Delete:"",Settings:"",Expand:"","Move Up":"","Move Down":""};var Ri=class extends B{_setDefaults(){this.setPrivate("defaultLocale",Bi),super._setDefaults()}translate(t,e,...i){e||(e=this._root.locale||this.getPrivate("defaultLocale"));let s=t,r=e[t];if(r===null)s="";else if(r!=null)r&&(s=r);else if(e!==this.getPrivate("defaultLocale"))return this.translate(t,this.getPrivate("defaultLocale"),...i);if(i.length)for(let n=i.length,a=0;a<n;++a)s=s.split("%"+(a+1)).join(i[a]);return s}translateAny(t,e,...i){return this.translate(t,e,...i)}setTranslationAny(t,e,i){let s=i||this._root.locale;s[t]=e}setTranslationsAny(t,e){V(t,(i,s)=>{this.setTranslationAny(i,s,e)})}translateEmpty(t,e,...i){let s=this.translate(t,e,...i);return s==t?"":s}translateFunc(t,e){return this._root.locale[t]?this._root.locale[t]:e!==this.getPrivate("defaultLocale")?this.translateFunc(t,this.getPrivate("defaultLocale")):()=>""}translateAll(t,e){return this.isDefault()?t:wi(t,i=>this.translate(i,e))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}};var Lt=class{constructor(t,e,i,s){this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.type="linear",this.stops=[]}addColorStop(t,e){this.stops.push({offset:t,color:e})}},Ft=class{constructor(t,e,i,s,r,n){this.x1=t,this.y1=e,this.radius1=i,this.x2=s,this.y2=r,this.radius2=n,this.type="radial",this.stops=[]}addColorStop(t,e){this.stops.push({offset:t,color:e})}},kt=class{constructor(t,e,i,s,r){this.graphics=t,this.background=e,this.repetition=i,this.width=s,this.height=r,this.type="pattern"}},Dt=class{constructor(t,e){this.source=t,this.repetition=e,this.type="raster"}};function zi(o,t){for(;!(o.interactive&&!t(o));)if(o._parent)o=o._parent;else break}function cn(o,t,e){return F(o,Ci(t),i=>{let s=ts(i),r=i.touches;r?(r.length==0&&(r=i.changedTouches),e(pe(r),s)):e([i],s)})}var Me=class extends _e{constructor(t){super(),this._host=t,this.interactionsEnabled=!0,this.tapToActivate=!1,this.tapToActivateTimeout=3e3,this._touchActive=!1,this._hovering=new Set,this._dragging=[],this._mousedown=[],this._listeners={},this._events={};let e=t.view;if(this._disposers.push(new it(()=>{V(this._events,(i,s)=>{s.disposer.dispose()})})),Ct("touchevents")){let i=s=>{this._dragging.length!==0&&fe(this._dragging,r=>r.value.shouldCancelTouch()?(s.preventDefault(),!1):!0),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(F(window,"touchstart",i,{passive:!1})),this._disposers.push(F(e,"touchstart",i,{passive:!1})),this._disposers.push(F(e,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(F(window,"click",s=>{this._touchActive=!1},{passive:!0})),this._disposers.push(F(e,"click",s=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}Ct("wheelevents")&&this._disposers.push(F(e,"wheel",i=>{let s=!1;this._hovering.forEach(r=>{if(r.wheelable)return s=!0,!1}),s&&i.preventDefault()},{passive:!1}))}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}afterRender(){if(this._hovering.size&&this._lastPointerMoveEvent){let{events:t,target:e,native:i}=this._lastPointerMoveEvent;w(t,s=>{this._dispatchGlobalMousemove(s,e,i)})}}_withEvents(t,e){let i=this._events[t];if(i!==void 0){i.dispatching=!0;try{e(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,me(i.callbacks,s=>!s.disposed),i.callbacks.length===0&&(i.disposer.dispose(),delete this._events[t]))}}}_dispatchEventAll(t,e){this.interactionsEnabled&&this._withEvents(t,i=>{w(i.callbacks,s=>{s.disposed||s.callback.call(s.context,e)})})}_dispatchEvent(t,e,i){if(!this.interactionsEnabled)return!1;let s=!1;return this._withEvents(t,r=>{w(r.callbacks,n=>{!n.disposed&&n.object===e&&(n.callback.call(n.context,i),s=!0)})}),s}_dispatchMousedown(t,e){let i=t.button;if(i!=0&&i!=2&&i!=1&&i!==void 0)return;let s=this._host.getEvent(t),r=this._host._getHitTarget(s.originalPoint,s.bbox,e);if(r){let n=s.id,a=!1;zi(r,h=>{let c={id:n,value:h};return this._mousedown.push(c),!a&&this._dispatchEvent("pointerdown",h,s)&&(a=!0,this._dragging.some(d=>d.value===h&&d.id===n)||this._dragging.push(c)),!0})}this._dispatchEventAll("globalpointerdown",s)}_dispatchGlobalMousemove(t,e,i){let s=this._host.getEvent(t),r=this._host._getHitTarget(s.originalPoint,s.bbox,e);s.native=i,r?(this._hovering.forEach(n=>{n.contains(r)||(this._hovering.delete(n),n.cursorOverStyle&&ei(document.body,"cursor",n._replacedCursorStyle),this._dispatchEvent("pointerout",n,s))}),s.native&&zi(r,n=>(this._hovering.has(n)||(this._hovering.add(n),n.cursorOverStyle&&(n._replacedCursorStyle=dr(document.body,"cursor"),ei(document.body,"cursor",n.cursorOverStyle)),this._dispatchEvent("pointerover",n,s)),!0))):(this._hovering.forEach(n=>{n.cursorOverStyle&&ei(document.body,"cursor",n._replacedCursorStyle),this._dispatchEvent("pointerout",n,s)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",s)}removeHovering(t){this._hovering.delete(t),t.cursorOverStyle&&ei(document.body,"cursor",t._replacedCursorStyle)}_dispatchGlobalMouseup(t,e){let i=this._host.getEvent(t);i.native=e,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(t){if(this._dragging.length!==0){let e=this._host.getEvent(t),i=e.id;this._dragging.forEach(s=>{s.id===i&&this._dispatchEvent("pointermove",s.value,e)})}}_dispatchDragEnd(t,e){let i=t.button,s;if(i==0||i===void 0)s="click";else if(i==2)s="rightclick";else if(i==1)s="middleclick";else return;let r=this._host.getEvent(t),n=r.id;if(this._mousedown.length!==0){let a=this._host._getHitTarget(r.originalPoint,r.bbox,e);a&&this._mousedown.forEach(h=>{h.id===n&&h.value.contains(a)&&this._dispatchEvent(s,h.value,r)}),this._mousedown.length=0}this._dragging.length!==0&&(this._dragging.forEach(a=>{a.id===n&&this._dispatchEvent("pointerup",a.value,r)}),this._dragging.length=0)}_dispatchDoubleClick(t,e){let i=this._host.getEvent(t),s=this._host._getHitTarget(i.originalPoint,i.bbox,e);s&&zi(s,r=>!this._dispatchEvent("dblclick",r,i))}_dispatchWheel(t,e){let i=this._host.getEvent(t),s=this._host._getHitTarget(i.originalPoint,i.bbox,e);s&&zi(s,r=>!this._dispatchEvent("wheel",r,i))}_makeSharedEvent(t,e){if(this._listeners[t]===void 0){let i=e();this._listeners[t]=new ti(()=>{delete this._listeners[t],i.dispose()})}return this._listeners[t].increment()}_onPointerEvent(t,e){let i=!1,s=null;function r(){s=null,i=!1}return new yt([new it(()=>{s!==null&&clearTimeout(s),r()}),F(this._host.view,Ci(t),n=>{i=!0,s!==null&&clearTimeout(s),s=window.setTimeout(r,0)}),cn(window,t,(n,a)=>{s!==null&&(clearTimeout(s),s=null),e(n,a,i),i=!1})])}_initEvent(t){switch(t){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{let e=(i,s,r)=>{this._lastPointerMoveEvent={events:i,target:s,native:r},w(i,n=>{this._dispatchGlobalMousemove(n,s,r)})};return new yt([this._onPointerEvent("pointerdown",e),this._onPointerEvent("pointermove",e)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{let e=this._onPointerEvent("pointerup",(s,r,n)=>{w(s,a=>{this._dispatchGlobalMouseup(a,n)}),this._lastPointerMoveEvent={events:s,target:r,native:n}}),i=this._onPointerEvent("pointercancel",(s,r,n)=>{w(s,a=>{this._dispatchGlobalMouseup(a,n)}),this._lastPointerMoveEvent={events:s,target:r,native:n}});return new it(()=>{e.dispose(),i.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"globalpointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{let e=this._onPointerEvent("pointerdown",(n,a)=>{w(n,h=>{this._dispatchMousedown(h,a)})}),i=this._onPointerEvent("pointermove",n=>{w(n,a=>{this._dispatchDragMove(a)})}),s=this._onPointerEvent("pointerup",(n,a)=>{w(n,h=>{this._dispatchDragEnd(h,a)})}),r=this._onPointerEvent("pointercancel",(n,a)=>{w(n,h=>{this._dispatchDragEnd(h,a)})});return new it(()=>{e.dispose(),i.dispose(),s.dispose(),r.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(e,i)=>{w(e,s=>{this._dispatchDoubleClick(s,i)})}));case"wheel":return this._makeSharedEvent("wheel",()=>F(this._host.view,Ci("wheel"),e=>{this._dispatchWheel(e,ts(e))},{passive:!1}))}}addEvent(t,e,i,s){let r=this._events[e];r===void 0&&(r=this._events[e]={disposer:this._initEvent(e),callbacks:[],dispatching:!1,cleanup:!1});let n={object:t,context:s,callback:i,disposed:!1};return r.callbacks.push(n),new it(()=>{n.disposed=!0,r.dispatching?r.cleanup=!0:(be(r.callbacks,n),r.callbacks.length===0&&(r.disposer.dispose(),delete this._events[e]))})}};var dn=(function(){function o(t,e){var i=[],s=!0,r=!1,n=void 0;try{for(var a=t[Symbol.iterator](),h;!(s=(h=a.next()).done)&&(i.push(h.value),!(e&&i.length===e));s=!0);}catch(c){r=!0,n=c}finally{try{!s&&a.return&&a.return()}finally{if(r)throw n}}return i}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return o(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),ai=Math.PI*2,fs=function(t,e,i,s,r,n,a){var h=t.x,c=t.y;h*=e,c*=i;var l=s*h-r*c,d=r*h+s*c;return{x:l+n,y:d+a}},un=function(t,e){var i=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),s=Math.cos(t),r=Math.sin(t),n=Math.cos(t+e),a=Math.sin(t+e);return[{x:s-r*i,y:r+s*i},{x:n+a*i,y:a-n*i},{x:n,y:a}]},Ar=function(t,e,i,s){var r=t*s-e*i<0?-1:1,n=t*i+e*s;return n>1&&(n=1),n<-1&&(n=-1),r*Math.acos(n)},fn=function(t,e,i,s,r,n,a,h,c,l,d,u){var f=Math.pow(r,2),m=Math.pow(n,2),_=Math.pow(d,2),p=Math.pow(u,2),y=f*m-f*p-m*_;y<0&&(y=0),y/=f*p+m*_,y=Math.sqrt(y)*(a===h?-1:1);var g=y*r/n*u,b=y*-n/r*d,x=l*g-c*b+(t+i)/2,v=c*g+l*b+(e+s)/2,M=(d-g)/r,C=(u-b)/n,T=(-d-g)/r,S=(-u-b)/n,D=Ar(1,0,M,C),k=Ar(M,C,T,S);return h===0&&k>0&&(k-=ai),h===1&&k<0&&(k+=ai),[x,v,D,k]},pn=function(t){var e=t.px,i=t.py,s=t.cx,r=t.cy,n=t.rx,a=t.ry,h=t.xAxisRotation,c=h===void 0?0:h,l=t.largeArcFlag,d=l===void 0?0:l,u=t.sweepFlag,f=u===void 0?0:u,m=[];if(n===0||a===0)return[];var _=Math.sin(c*ai/360),p=Math.cos(c*ai/360),y=p*(e-s)/2+_*(i-r)/2,g=-_*(e-s)/2+p*(i-r)/2;if(y===0&&g===0)return[];n=Math.abs(n),a=Math.abs(a);var b=Math.pow(y,2)/Math.pow(n,2)+Math.pow(g,2)/Math.pow(a,2);b>1&&(n*=Math.sqrt(b),a*=Math.sqrt(b));var x=fn(e,i,s,r,n,a,d,f,_,p,y,g),v=dn(x,4),M=v[0],C=v[1],T=v[2],S=v[3],D=Math.abs(S)/(ai/4);Math.abs(1-D)<1e-7&&(D=1);var k=Math.max(Math.ceil(D),1);S/=k;for(var $=0;$<k;$++)m.push(un(T,S)),T+=S;return m.map(function(P){var z=fs(P[0],n,a,p,_,M,C),A=z.x,G=z.y,q=fs(P[1],n,a,p,_,M,C),H=q.x,K=q.y,Z=fs(P[2],n,a,p,_,M,C),wt=Z.x,ot=Z.y;return{x1:A,y1:G,x2:H,y2:K,x:wt,y:ot}})},Lr=pn;function Y(o,t){o.left=Math.min(o.left,t.x),o.top=Math.min(o.top,t.y),o.right=Math.max(o.right,t.x),o.bottom=Math.max(o.bottom,t.y)}function mn(o,t,e){if(t!==e)throw new Error("Required "+e+" arguments for "+o+" but got "+t)}function oi(o,t,e){if(t<e)throw new Error("Required at least "+e+" arguments for "+o+" but got "+t)}function ft(o,t,e){if(oi(o,t,e),t%e!==0)throw new Error("Arguments for "+o+" must be in pairs of "+e)}function gn(o){for(let t=0;t<o.length;t+=7){let e=t+3,i=o[e];if(i.length>1){let s=/^([01])([01])(.*)$/.exec(i);s!==null&&(o.splice(e,0,s[1]),++e,o.splice(e,0,s[2]),++e,s[3].length>0?o[e]=s[3]:o.splice(e,1))}if(++e,i=o[e],i.length>1){let s=/^([01])(.+)$/.exec(i);s!==null&&(o.splice(e,0,s[1]),++e,o[e]=s[2])}}}function Fr(o){if(o===0||o===1)return o;throw new Error("Flag must be 0 or 1")}var I=class{path(t){}addBounds(t){}},ps=class extends I{constructor(){super(...arguments),this.type="beginPath"}},hi=class extends I{constructor(t){super(),this.color=t,this.type="beginFill"}},ms=class extends I{constructor(t){super(),this.clearShadow=t,this.type="endFill"}},gs=class extends I{constructor(){super(...arguments),this.type="endStroke"}},li=class extends I{constructor(t,e,i,s){super(),this.width=t,this.color=e,this.lineJoin=i,this.lineCap=s,this.type="lineStyle"}},_s=class extends I{constructor(t){super(),this.dash=t,this.type="lineDash"}},ys=class extends I{constructor(t){super(),this.dashOffset=t,this.type="lineDashOffset"}},xs=class extends I{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.width=i,this.height=s,this.type="drawRect"}path(t){t.rect(this.x,this.y,this.width,this.height)}addBounds(t){let e=this.x,i=this.y,s=e+this.width,r=i+this.height;Y(t,{x:e,y:i}),Y(t,{x:s,y:i}),Y(t,{x:e,y:r}),Y(t,{x:s,y:r})}},bs=class extends I{constructor(t,e,i){super(),this.x=t,this.y=e,this.radius=i,this.type="drawCircle"}path(t){t.moveTo(this.x+this.radius,this.y),t.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(t){Y(t,{x:this.x-this.radius,y:this.y-this.radius}),Y(t,{x:this.x+this.radius,y:this.y+this.radius})}},vs=class extends I{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.radiusX=i,this.radiusY=s,this.type="drawEllipse"}path(t){t.ellipse(this.x,this.y,this.radiusX,this.radiusY,0,0,Math.PI*2)}addBounds(t){Y(t,{x:this.x-this.radiusX,y:this.y-this.radiusY}),Y(t,{x:this.x+this.radiusX,y:this.y+this.radiusY})}},ws=class extends I{constructor(t,e,i,s,r,n){super(),this.cx=t,this.cy=e,this.radius=i,this.startAngle=s,this.endAngle=r,this.anticlockwise=n,this.type="arc"}path(t){this.radius>0&&t.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(t){let e=Tr(this.cx,this.cy,this.startAngle*Gt,this.endAngle*Gt,this.radius);Y(t,{x:e.left,y:e.top}),Y(t,{x:e.right,y:e.bottom})}},Cs=class extends I{constructor(t,e,i,s,r){super(),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.radius=r,this.type="arcTo"}path(t){this.radius>0&&t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}},Ts=class extends I{constructor(t,e){super(),this.x=t,this.y=e,this.type="lineTo"}path(t){t.lineTo(this.x,this.y)}addBounds(t){Y(t,{x:this.x,y:this.y})}},Ms=class extends I{constructor(t,e){super(),this.x=t,this.y=e,this.type="moveTo"}path(t){t.moveTo(this.x,this.y)}addBounds(t){Y(t,{x:this.x,y:this.y})}},Ss=class extends I{constructor(){super(...arguments),this.type="closePath"}path(t){t.closePath()}},ks=class extends I{constructor(t,e,i,s,r,n){super(),this.cpX=t,this.cpY=e,this.cpX2=i,this.cpY2=s,this.toX=r,this.toY=n,this.type="bezierCurveTo"}path(t){t.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(t){Y(t,{x:this.cpX,y:this.cpY}),Y(t,{x:this.cpX2,y:this.cpY2}),Y(t,{x:this.toX,y:this.toY})}},Ds=class extends I{constructor(t,e,i,s){super(),this.cpX=t,this.cpY=e,this.toX=i,this.toY=s,this.type="quadraticCurveTo"}path(t){t.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(t){Y(t,{x:this.cpX,y:this.cpY}),Y(t,{x:this.toX,y:this.toY})}},Es=class extends I{constructor(t,e,i,s,r){super(),this.color=t,this.blur=e,this.offsetX=i,this.offsetY=s,this.opacity=r,this.type="shadow"}},$s=class extends I{constructor(t,e,i,s,r){super(),this.image=t,this.width=e,this.height=i,this.x=s,this.y=r,this.type="image"}addBounds(t){Y(t,{x:this.x,y:this.y}),Y(t,{x:this.width,y:this.height})}},Ps=class extends I{constructor(t,e){super(),this.id=t,this.name=e,this.type="beginGroup"}},As=class extends I{constructor(){super(...arguments),this.type="endGroup"}},Oi=class{constructor(){this.ops=[],this.version=0,this._hasShadows=!1,this._strokeWidth=1}clear(){this.ops.length=0,this._strokeWidth=1,++this.version}beginFill(t,e=1){this._fillAlpha=e,t?t instanceof L?this.ops.push(new hi(t.toCSS(e))):this.ops.push(new hi(t)):this.ops.push(new hi("rgba(0, 0, 0, "+e+")"))}endFill(){this.ops.push(new ms(this._hasShadows))}endStroke(){this._strokeWidth>0&&isFinite(this._strokeWidth)&&this.ops.push(new gs)}beginPath(){this.ops.push(new ps)}lineStyle(t=0,e,i=1,s,r){this._strokeAlpha=i,this._strokeWidth=t,e?e instanceof L?this.ops.push(new li(t,e.toCSS(i),s,r)):this.ops.push(new li(t,e,s,r)):this.ops.push(new li(t,"rgba(0, 0, 0, "+i+")",s,r))}setLineDash(t){this.ops.push(new _s(t||[]))}setLineDashOffset(t=0){this.ops.push(new ys(t))}drawRect(t,e,i,s){this.ops.push(new xs(t,e,i,s))}drawCircle(t,e,i){this.ops.push(new bs(t,e,i))}drawEllipse(t,e,i,s){this.ops.push(new vs(t,e,i,s))}arc(t,e,i,s,r,n=!1){this.ops.push(new ws(t,e,i,s,r,n))}arcTo(t,e,i,s,r){this.ops.push(new Cs(t,e,i,s,r))}lineTo(t,e){this.ops.push(new Ts(t,e))}moveTo(t,e){this.ops.push(new Ms(t,e))}bezierCurveTo(t,e,i,s,r,n){this.ops.push(new ks(t,e,i,s,r,n))}quadraticCurveTo(t,e,i,s){this.ops.push(new Ds(t,e,i,s))}closePath(){this.ops.push(new Ss)}shadow(t,e=0,i=0,s=0,r){this._hasShadows=!0,this.ops.push(new Es(r!=null?t.toCSS(r):t.toCSS(this._fillAlpha||this._strokeAlpha),e,i,s))}image(t,e,i,s,r){this.ops.push(new $s(t,e,i,s,r))}beginGroup(t,e){this.ops.push(new Ps(t,e))}endGroup(){this.ops.push(new As)}svgPath(t){let e=0,i=0,s=null,r=null,n=null,a=null,h=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,c=/[\u0009 \u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009 \u000A\u000C\u000D]*,?/g,l=this.ops.length;try{let d;for(;(d=h.exec(t))!==null;){let u=d[1],f=d[2],m=[];for(;(d=c.exec(f))!==null;)m.push(d[1]);switch(u!=="S"&&u!=="s"&&u!=="C"&&u!=="c"&&(s=null,r=null),u!=="Q"&&u!=="q"&&u!=="T"&&u!=="t"&&(n=null,a=null),u){case"M":ft(u,m.length,2),e=+m[0],i=+m[1],this.moveTo(e,i);for(let p=2;p<m.length;p+=2)e=+m[p],i=+m[p+1],this.lineTo(e,i);break;case"m":ft(u,m.length,2),e+=+m[0],i+=+m[1],this.moveTo(e,i);for(let p=2;p<m.length;p+=2)e+=+m[p],i+=+m[p+1],this.lineTo(e,i);break;case"L":ft(u,m.length,2);for(let p=0;p<m.length;p+=2)e=+m[p],i=+m[p+1],this.lineTo(e,i);break;case"l":ft(u,m.length,2);for(let p=0;p<m.length;p+=2)e+=+m[p],i+=+m[p+1],this.lineTo(e,i);break;case"H":oi(u,m.length,1);for(let p=0;p<m.length;++p)e=+m[p],this.lineTo(e,i);break;case"h":oi(u,m.length,1);for(let p=0;p<m.length;++p)e+=+m[p],this.lineTo(e,i);break;case"V":oi(u,m.length,1);for(let p=0;p<m.length;++p)i=+m[p],this.lineTo(e,i);break;case"v":oi(u,m.length,1);for(let p=0;p<m.length;++p)i+=+m[p],this.lineTo(e,i);break;case"C":ft(u,m.length,6);for(let p=0;p<m.length;p+=6){let y=+m[p],g=+m[p+1];s=+m[p+2],r=+m[p+3],e=+m[p+4],i=+m[p+5],this.bezierCurveTo(y,g,s,r,e,i)}break;case"c":ft(u,m.length,6);for(let p=0;p<m.length;p+=6){let y=+m[p]+e,g=+m[p+1]+i;s=+m[p+2]+e,r=+m[p+3]+i,e+=+m[p+4],i+=+m[p+5],this.bezierCurveTo(y,g,s,r,e,i)}break;case"S":ft(u,m.length,4),(s===null||r===null)&&(s=e,r=i);for(let p=0;p<m.length;p+=4){let y=2*e-s,g=2*i-r;s=+m[p],r=+m[p+1],e=+m[p+2],i=+m[p+3],this.bezierCurveTo(y,g,s,r,e,i)}break;case"s":ft(u,m.length,4),(s===null||r===null)&&(s=e,r=i);for(let p=0;p<m.length;p+=4){let y=2*e-s,g=2*i-r;s=+m[p]+e,r=+m[p+1]+i,e+=+m[p+2],i+=+m[p+3],this.bezierCurveTo(y,g,s,r,e,i)}break;case"Q":ft(u,m.length,4);for(let p=0;p<m.length;p+=4)n=+m[p],a=+m[p+1],e=+m[p+2],i=+m[p+3],this.quadraticCurveTo(n,a,e,i);break;case"q":ft(u,m.length,4);for(let p=0;p<m.length;p+=4)n=+m[p]+e,a=+m[p+1]+i,e+=+m[p+2],i+=+m[p+3],this.quadraticCurveTo(n,a,e,i);break;case"T":ft(u,m.length,2),(n===null||a===null)&&(n=e,a=i);for(let p=0;p<m.length;p+=2)n=2*e-n,a=2*i-a,e=+m[p],i=+m[p+1],this.quadraticCurveTo(n,a,e,i);break;case"t":ft(u,m.length,2),(n===null||a===null)&&(n=e,a=i);for(let p=0;p<m.length;p+=2)n=2*e-n,a=2*i-a,e+=+m[p],i+=+m[p+1],this.quadraticCurveTo(n,a,e,i);break;case"A":case"a":let _=u==="a";gn(m),ft(u,m.length,7);for(let p=0;p<m.length;p+=7){let y=+m[p+5],g=+m[p+6];_&&(y+=e,g+=i);let b=Lr({px:e,py:i,rx:+m[p],ry:+m[p+1],xAxisRotation:+m[p+2],largeArcFlag:Fr(+m[p+3]),sweepFlag:Fr(+m[p+4]),cx:y,cy:g});w(b,x=>{this.bezierCurveTo(x.x1,x.y1,x.x2,x.y2,x.x,x.y),e=x.x,i=x.y})}break;case"Z":case"z":mn(u,m.length,0),this.closePath();break}}}catch(d){this.ops.length=l,console.warn(`Error when parsing svgPath:
3
+ `+d.message+`
4
+ `+t)}}addBounds(t){w(this.ops,e=>{e.addBounds(t)})}};var Se=class{constructor(t=1,e=0,i=0,s=1,r=0,n=0){this.a=t,this.b=e,this.c=i,this.d=s,this.tx=r,this.ty=n}setTransform(t,e,i,s,r,n=1){this.a=Math.cos(r)*n,this.b=Math.sin(r)*n,this.c=-Math.sin(r)*n,this.d=Math.cos(r)*n,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d)}apply(t){return{x:this.a*t.x+this.c*t.y+this.tx,y:this.b*t.x+this.d*t.y+this.ty}}applyInverse(t){let e=1/(this.a*this.d+this.c*-this.b);return{x:this.d*e*t.x+-this.c*e*t.y+(this.ty*this.c-this.tx*this.d)*e,y:this.a*e*t.y+-this.b*e*t.x+(-this.ty*this.a+this.tx*this.b)*e}}append(t){let e=this.a,i=this.b,s=this.c,r=this.d;this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*r,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*r,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*r+this.ty}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty}copyFrom(t){this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty}};function _n(o,t){return o===null||t===null?o===t:o.a===t.a&&o.b===t.b&&o.c===t.c&&o.d===t.d}function Nr(o,t,e,i){let s=o.a,r=o.b,n=o.c,a=o.d,h=o.tx-t,c=o.ty-e;o.a=i.a*s+i.c*r,o.b=i.b*s+i.d*r,o.c=i.a*n+i.c*a,o.d=i.b*n+i.d*a,o.tx=t+i.a*h+i.c*c,o.ty=e+i.b*h+i.d*c}var Hi=class{constructor(){this._x=0,this._y=0}get x(){return this._x}get y(){return this._y}set x(t){this._x=t}set y(t){this._y=t}},Ut=class extends or{constructor(t){super(),this.mask=null,this.visible=!0,this.exportable=!0,this.interactive=!1,this.inactive=null,this.wheelable=!1,this.cancelTouch=!1,this.isMeasured=!1,this.buttonMode=!1,this.alpha=1,this.compoundAlpha=1,this.angle=0,this.scale=1,this.x=0,this.y=0,this.crisp=!1,this.pivot=new Hi,this.deform=null,this._localMatrix=new Se,this._matrix=new Se,this._uMatrix=new Se,this._mx=NaN,this._my=NaN,this._mpx=NaN,this._mpy=NaN,this._mAngle=NaN,this._mScale=NaN,this._mDeform=null,this._renderer=t}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this._renderer._layerCanvas(this.getLayer())}getLayer(){let t=this;for(;;){if(t._layer)return t._layer;if(t._parent)t=t._parent;else return this._renderer.defaultLayer}}setLayer(t,e){t==null?this._layer=void 0:(this._layer=this._renderer._useLayer(t,e),this._parent&&this._parent.registerChildLayer(this._layer))}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(t){}contains(t){for(;;){if(t===this)return!0;if(t._parent)t=t._parent;else return!1}}toGlobal(t){return this._matrix.apply(t)}toLocal(t){return this._matrix.applyInverse(t)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this.deform!==null&&Nr(this._uMatrix,0,0,this.deform),this._uMatrix}getLocalBounds(){return this._localBounds||(this._localBounds={left:1e7,top:1e7,right:-1e7,bottom:-1e7},this._addBounds(this._localBounds)),this._localBounds}getContentBounds(){if(this.isMeasured)return this.getLocalBounds();let t=1e7,e={left:t,top:t,right:-t,bottom:-t};return this.isMeasured=!0,this._addBounds(e),this.isMeasured=!1,e.left>e.right?{left:0,top:0,right:0,bottom:0}:e}getAdjustedBounds(t){this._setMatrix();let e=this.getLocalMatrix(),i=e.apply({x:t.left,y:t.top}),s=e.apply({x:t.right,y:t.top}),r=e.apply({x:t.right,y:t.bottom}),n=e.apply({x:t.left,y:t.bottom});return{left:Math.min(i.x,s.x,r.x,n.x),top:Math.min(i.y,s.y,r.y,n.y),right:Math.max(i.x,s.x,r.x,n.x),bottom:Math.max(i.y,s.y,r.y,n.y)}}on(t,e,i){return this.interactive?this._renderer._interaction.addEvent(this,t,e,i):new it(()=>{})}_setMatrix(){let t=this.pivot.x,e=this.pivot.y,i=this.deform;(this.x!==this._mx||this.y!==this._my||t!==this._mpx||e!==this._mpy||this.angle!==this._mAngle||this.scale!==this._mScale||!_n(i,this._mDeform))&&(this._localMatrix.setTransform(this.x,this.y,t,e,this.angle*Math.PI/180,this.scale),i!==null&&Nr(this._localMatrix,this.x,this.y,i),this._mx=this.x,this._my=this.y,this._mpx=t,this._mpy=e,this._mAngle=this.angle,this._mScale=this.scale,this._mDeform=i===null?null:{a:i.a,b:i.b,c:i.c,d:i.d}),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}hovering(){return this._renderer._interaction._hovering.has(this)}dragging(){return this._renderer._interaction._dragging.some(t=>t.value===this)}shouldCancelTouch(){let t=this._renderer._interaction;return t.tapToActivate&&!t._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}},pt=class extends Ut{constructor(){super(...arguments),this.interactiveChildren=!0,this._children=[]}addChild(t){t._parent=this,this._children.push(t),t._layer&&this.registerChildLayer(t._layer)}addChildAt(t,e){t._parent=this,this._children.splice(e,0,t),t._layer&&this.registerChildLayer(t._layer)}removeChild(t){t._parent=void 0,be(this._children,t)}registerChildLayer(t){this._childLayers||(this._childLayers=[]),Qe(this._childLayers,t),this._parent&&this._parent.registerChildLayer(t)}markDirtyLayer(t=!1){super.markDirtyLayer(),t&&this._childLayers&&w(this._childLayers,e=>e.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&w(this._childLayers,t=>{t.dirty=!0})}},nt=class extends Ut{constructor(){super(...arguments),this._data=new Oi,this.blendMode=as.NORMAL}clear(){super.clear(),this._data.clear(),this._contentBounds=void 0}getContentBounds(){return this.isMeasured||!this.visible?super.getContentBounds():(this._contentBounds||(this._contentBounds=super.getContentBounds()),this._contentBounds)}beginFill(t,e=1){t&&!(t instanceof L)&&(this.isMeasured=!0),this._data.beginFill(t,e)}endFill(){this._data.endFill()}endStroke(){this._data.endStroke()}beginPath(){this._data.beginPath()}lineStyle(t=0,e,i=1,s,r){this._data.lineStyle(t,e,i,s,r)}setLineDash(t){this._data.setLineDash(t)}setLineDashOffset(t=0){this._data.setLineDashOffset(t)}drawRect(t,e,i,s){this._data.drawRect(t,e,i,s)}drawCircle(t,e,i){this._data.drawCircle(t,e,i)}drawEllipse(t,e,i,s){this._data.drawEllipse(t,e,i,s)}arc(t,e,i,s,r,n=!1){this._data.arc(t,e,i,s,r,n)}arcTo(t,e,i,s,r){this._data.arcTo(t,e,i,s,r)}lineTo(t,e){this._data.lineTo(t,e)}moveTo(t,e){this._data.moveTo(t,e)}bezierCurveTo(t,e,i,s,r,n){this._data.bezierCurveTo(t,e,i,s,r,n)}quadraticCurveTo(t,e,i,s){this._data.quadraticCurveTo(t,e,i,s)}closePath(){this._data.closePath()}shadow(t,e=0,i=0,s=0,r){this._data.shadow(t,e,i,s,r)}image(t,e,i,s,r){this._data.image(t,e,i,s,r)}svgPath(t){this._data.svgPath(t)}beginGroup(t,e){this._data.beginGroup(t,e)}endGroup(){this._data.endGroup()}_addBounds(t){this.visible&&this.isMeasured&&this._data.addBounds(t)}},ke=class{constructor(){this.lineHeight=lt(120),this.baselineRatio=.19,this.oversizedBehavior="none",this.breakWords=!1,this.ellipsis="\u2026",this.ignoreFormatting=!1}},mt=class extends Ut{constructor(t,e,i){super(t),this.resolution=1,this.textVisible=!0,this._originalScale=1,this.text=e,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_getFontStyle(t,e=!1){return Mi(this.style,t,e,()=>getComputedStyle(this._renderer.view).getPropertyValue("font-family"))}_addBounds(t){if(this.visible&&this.isMeasured){let e=this._renderer._measureText(this);Y(t,{x:e.left,y:e.top}),Y(t,{x:e.right,y:e.bottom})}}_layoutState(){return{lines:[],textVisible:this.textVisible,truncated:this.truncated,scale:this.scale,originalScale:this._originalScale}}_applyLayoutState(t){this._textInfo=t.lines,this.textVisible=t.textVisible,this.truncated=t.truncated,this.scale=t.scale,this._originalScale=t.originalScale}},at=class extends mt{constructor(){super(...arguments),this.textType="circular",this.inside=!1,this.orientation="auto",this.kerning=0,this._textReversed=!1}_inward(){let t=this.orientation;if(t!="auto")return t=="inward";let e=this.radius||0,i=this.startAngle||0,s=0,r=this.style.textAlign||"left",n=r=="left"?1:-1,a=0,h=0;return w(this._textInfo,c=>{let l=i+c.width/(e-c.height)/2*-n;l>a&&(a=l)}),r=="left"?h=(a+s/2)*Gt:r=="right"?h=(a-s/2)*Gt:h=i*Gt,h=Cr(h),h>=270||h<=90}_orient(){let t=this._textInfo,e=(this.style.textAlign||"left")=="left"?1:-1,i=!this._textReversed,s=this._inward();return s&&i&&t.reverse(),(e==-1&&s||e==1&&!s)&&i&&w(t,r=>{r.textChunks.reverse()}),this._textReversed=!0,s}_eachGlyph(t,e){let i=this.radius||0,s=this.startAngle||0,r=this.inside,n=this.style.textAlign||"left",a=this.kerning||0,h=n=="left"?1:-1;w(this._textInfo,c=>{let l=c.height;r||(i+=l);let d=s;n=="center"&&(d+=c.width/(i-l)/2*-h),d+=Math.PI*(t?0:1);let u=isFinite(d)?d:0,f=_=>{isFinite(_)&&(u+=_)},m=(t?1:-1)*(0-i+l/2);w(c.textChunks,_=>{f(_.width/2/(i-l)*h),e(_,u,m,l),f((_.width/2+a)/(i-l)*h)}),r&&(i-=l)})}},gt=class extends Ut{constructor(t,e){super(t),this.image=e}getLocalBounds(){if(!this._localBounds){let t=0,e=0;this.width&&(t=this.width),this.height&&(e=this.height),this._localBounds={left:0,top:0,right:t,bottom:e},this._addBounds(this._localBounds)}return this._localBounds}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}};function yn(o){let t=[0,0,0];for(let e=0;e<24;e++)t[e%3]<<=1,t[e%3]|=o&1,o>>=1;return(t[0]|0)+(t[1]<<8)+(t[2]<<16)}function Or(o){let t=document.createElement("canvas");t.width=1,t.height=1;let e=t.getContext("2d",{willReadFrequently:!0});e.drawImage(o,0,0,1,1);try{return e.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+o.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://docs.amcharts.com/v5/concepts/common-elements/images/#cross-domain-issues'),!0}}function ci(o){o.width=0,o.height=0,o.style.width="0px",o.style.height="0px"}function ui(o){return Math.floor(o)+.5}var di=new WeakMap;function Ls(o,t){if(typeof t=="string")return t;let e=di.get(t);if(e===void 0){let i;if(t instanceof Lt)i=o.createLinearGradient(t.x1,t.y1,t.x2,t.y2);else if(t instanceof Ft)i=o.createRadialGradient(t.x1,t.y1,t.radius1,t.x2,t.y2,t.radius2);else if(t instanceof kt||t instanceof Dt){let s=xn(o,t);return s?(di.set(t,s),s):t}else return t;w(t.stops,s=>{i.addColorStop(s.offset,s.color)}),e=i,di.set(t,e)}return e}function xn(o,t){if(t instanceof Dt)return o.createPattern(t.source,t.repetition);let e=document.createElement("canvas");if(e.width=t.width,e.height=t.height,!e.width||!e.height)return null;let i=e.getContext("2d");return Gi(t.background,i),Gi(t.graphics,i),o.createPattern(e,t.repetition)}function Ii(o,t,e){t.type==="image"?e!==void 0?(o.fillStyle=e,o.fillRect(t.x,t.y,t.width,t.height)):o.drawImage(t.image,t.x,t.y,t.width,t.height):t.path(o)}function Fs(o,t,e,i){switch(t.type){case"beginPath":o.beginPath();break;case"beginFill":e!==void 0?o.fillStyle=e:o.fillStyle=Ls(o,t.color);break;case"endFill":o.fill(),t.clearShadow&&(o.shadowColor="",o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0);break;case"endStroke":o.stroke();break;case"lineStyle":e!==void 0?o.strokeStyle=e:o.strokeStyle=Ls(o,t.color),o.lineWidth=t.width,t.lineJoin&&(o.lineJoin=t.lineJoin),t.lineCap&&(o.lineCap=t.lineCap);break;case"lineDash":o.setLineDash(t.dash);break;case"lineDashOffset":o.lineDashOffset=t.dashOffset;break;case"shadow":i||(t.opacity&&(o.fillStyle=t.color),o.shadowColor=t.color,o.shadowBlur=t.blur,o.shadowOffsetX=t.offsetX,o.shadowOffsetY=t.offsetY);break}}function xt(o,t){let e=o._renderer;return e instanceof he?e:t.renderer}function bn(o,t){let e=o._layer;return{inactive:o.inactive==null?t.inactive:o.inactive,layer:e?e instanceof pi?e:t.renderer.getLayer(e.order):t.layer,renderer:t.renderer}}function Os(o,t){return o._colorId===void 0&&(o._colorId=xt(o,t).paintId(o)),o._colorId}function jt(o,t){return!t.inactive&&(o.interactive||xt(o,t)._forceInteractive>0)}function vn(o,t){return o instanceof pt&&o.interactiveChildren||jt(o,t)}function mi(o=0){return o>0}function Wi(o,t,e=0){let i=jt(o,t),s=t.layer.order||0;return!!(i&&(s==0&&!mi(e)||s==e))}function gi(o,t){o.exportable===!1&&(t.layer.tainted=!0)}function Hr(o,t,e){let i=o._matrix,s=i.tx*e,r=i.ty*e;o.crisp&&o.deform===null&&(s=ui(s),r=ui(r)),t.setTransform(i.a*e,i.b*e,i.c*e,i.d*e,s,r)}function Ns(o,t,e,i){let s=o._matrix;t.setTransform(s.a*e,s.b*e,s.c*e,s.d*e,(s.tx+i.left)*e,(s.ty+i.top)*e)}function Br(o,t,e,i){i.margin?Ns(o,t,i.scale||e,i.margin):Hr(o,t,i.scale||e)}function Bs(o,t,e=0){let i=xt(o,t);if(o.visible&&(o.exportable!==!1||!i._omitTainted)){o._setMatrix();let s=bn(o,t),r=i.resolution,n=i._dirtyLayers,a=i._ghostLayer,h=a.context,c=o.mask;c&&c._setMatrix(),w(n,l=>{if(l){let d=l.context;d.save(),c&&(Br(c,d,r,l),Rs(c,d),d.clip()),d.globalAlpha=o.compoundAlpha*o.alpha,Br(o,d,r,l),o.filter&&(d.filter=o.filter)}}),h.save(),c&&vn(o,s)&&(Ns(c,h,r,a.margin),Rs(c,h),h.clip()),Ns(o,h,r,a.margin),s.layer.order>0&&!e&&sr(i._deferredGhostLayers,s.layer.order),wn(o,s,e),h.restore(),w(n,l=>{l&&l.context.restore()})}}function wn(o,t,e){o instanceof pt?Cn(o,t,e):o instanceof nt?Tn(o,t,e):o instanceof at?Sn(o,t,e):o instanceof mt?Ir(o,t,e):o instanceof gt?En(o,t,e):gi(o,t)}function Cn(o,t,e){gi(o,t);let i=xt(o,t);o.interactive&&o.interactiveChildren&&++i._forceInteractive,w(o._children,s=>{s.compoundAlpha=o.compoundAlpha*o.alpha,Bs(s,t,e)}),o.interactive&&o.interactiveChildren&&--i._forceInteractive}function Rs(o,t){t.beginPath(),w(o._data.ops,e=>{Ii(t,e)})}function Tn(o,t,e=0){gi(o,t);let i=t.layer.dirty,s=jt(o,t),r=mi(e),n=Wi(o,t,e);if(i||s||r){let a=t.layer.context,h=xt(o,t)._ghostLayer.context;i&&!r&&(a.globalCompositeOperation=o.blendMode,a.beginPath());let c;n&&(h.beginPath(),c=Os(o,t)),w(o._data.ops,l=>{i&&!r&&(Ii(a,l),Fs(a,l,void 0,!1)),n&&(Ii(h,l,c),Fs(h,l,c,!0))})}}function Rr(o,t,e,i){if(e===i)Hr(o,t,e);else{let s=o._matrix,r=s.tx*e,n=s.ty*i;o.crisp&&o.deform===null&&(r=ui(r),n=ui(n)),t.setTransform(s.a*e,s.b*i,s.c*e,s.d*i,r,n)}}function Gi(o,t,e=1,i=e){if(o.visible){o._setMatrix(),t.save();let s=o.mask;s&&(s._setMatrix(),Rr(s,t,e,i),Rs(s,t),t.clip()),t.globalAlpha=o.compoundAlpha*o.alpha,Rr(o,t,e,i),o.filter&&(t.filter=o.filter),t.globalCompositeOperation=o.blendMode,t.beginPath(),w(o._data.ops,r=>{Ii(t,r),Fs(t,r,void 0,!1)}),t.restore()}}function zr(o,t){o.style.textAlign&&(t.textAlign=o.style.textAlign),o.style.direction&&(t.direction=o.style.direction),o.style.textBaseline&&(t.textBaseline=o.style.textBaseline)}function Yi(o,t,e=!1,i=!1,s=!1){gi(o,t);let r=t.layer.context,n=xt(o,t)._ghostLayer.context,a=o.style,h=o._getFontStyle(void 0,i);s||(r.font=h,a.fill&&(a.fill instanceof L?r.fillStyle=a.fill.toCSS(a.fillOpacity!=null?a.fillOpacity:1):r.fillStyle=Ls(r,a.fill)),a.shadowColor&&(r.shadowColor=a.shadowColor.toCSS(a.shadowOpacity!=null?a.shadowOpacity:1)),a.shadowBlur&&(r.shadowBlur=a.shadowBlur),a.shadowOffsetX&&(r.shadowOffsetX=a.shadowOffsetX),a.shadowOffsetY&&(r.shadowOffsetY=a.shadowOffsetY),zr(o,r)),jt(o,t)&&!e&&(n.font=h),jt(o,t)&&!e&&(n.fillStyle=Os(o,t),zr(o,n))}function Hs(o,t){if(o instanceof at&&o.textType=="circular")return Mn(o,t);let e=t.layer.context,i=xt(o,t)._ghostLayer.context;e.save(),i.save(),Yi(o,t,!0,Si());let s=o._layoutState(),r=Di(e,o.text,o.style,n=>o._getFontStyle(n),s);return o._applyLayoutState(s),e.restore(),i.restore(),r}function Mn(o,t){let e=t.layer.context,i=xt(o,t)._ghostLayer.context;o._textReversed=!1,e.save(),i.save(),Yi(o,t,!0);let s=o._layoutState(),r=Ei(e,o.text,o.style,n=>o._getFontStyle(n),s);return o._applyLayoutState(s),e.restore(),i.restore(),r}function Ir(o,t,e=0){if(o._textInfo||Hs(o,t),o.textVisible){let i=jt(o,t),s=t.layer.context,r=t.layer.dirty,n=xt(o,t)._ghostLayer.context,a=mi(e),h=Wi(o,t,e),c=r&&!a;if(!c&&!(o.interactive&&h))return;c&&s.save(),n.save(),Yi(o,t,!1,!1,!c),w(o._textInfo,(l,d)=>{w(l.textChunks,(u,f)=>{if(u.style&&(c&&(s.save(),s.font=u.style),n.save(),jt(o,t)&&(n.font=u.style)),u.fill&&c&&(s.save(),s.fillStyle=u.fill.toCSS()),c&&s.fillText(u.text,u.offsetX,l.offsetY+u.offsetY),c&&(u.textDecoration=="underline"||u.textDecoration=="line-through")){let m=1,_=1,p=u.height,y=o.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(y)>-1){let x=ki(u.text,s,o.style);u.width=x.actualBoundingBoxLeft+x.actualBoundingBoxRight}let g=u.offsetX;switch(o.style.textAlign){case"right":case"end":g-=u.width;break;case"center":g-=u.width/2;break}if(u.style)switch(Tt.getTextStyle(u.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":m=2;break}p&&(_=p/20);let b;u.textDecoration=="line-through"?b=m+l.offsetY+u.offsetY-u.height/2:b=m+_*1.5+l.offsetY+u.offsetY,b=ui(b),s.save(),s.beginPath(),u.fill?s.strokeStyle=u.fill.toCSS():o.style.fill&&o.style.fill instanceof L&&(s.strokeStyle=o.style.fill.toCSS()),s.lineWidth=m*_,s.moveTo(g,b),s.lineTo(g+u.width,b),s.stroke(),s.restore()}i&&o.interactive&&h&&n.fillText(u.text,u.offsetX,l.offsetY+u.offsetY),u.fill&&c&&s.restore(),u.style&&(c&&s.restore(),n.restore())})}),c&&s.restore(),n.restore()}}function Sn(o,t,e=0){o.textType==="circular"?kn(o,t,e):Ir(o,t,e)}function kn(o,t,e=0){if(o.textVisible){let i=jt(o,t),s=t.layer.context,r=t.layer.dirty,n=xt(o,t)._ghostLayer.context,a=mi(e),h=Wi(o,t,e),c=r&&!a;if(!c&&!h)return;c&&s.save(),i&&n.save(),Yi(o,t,!1,!1,!c),o._textInfo||Hs(o,t);let l=o.radius||0,d=o.startAngle||0,u=o.inside,f=o.style.textAlign||"left",m=o.kerning||0,_=f=="left"?1:-1,p=o._orient();w(o._textInfo,(y,g)=>{let b=y.height;u||(l+=b);let x=d;f=="center"&&(x+=y.width/(l-b)/2*-_),x+=Math.PI*(p?0:1),c&&(s.save(),s.rotate(x)),i&&(n.save(),n.rotate(x));let v=0;w(y.textChunks,(M,C)=>{let T=M.text,S=M.width;v=S/2/(l-b)*_,c&&s.rotate(v),i&&n.rotate(v),M.style&&(c&&(s.save(),s.font=M.style),n.save(),i&&(n.font=M.style)),M.fill&&c&&(s.save(),s.fillStyle=M.fill.toCSS()),c&&(s.textBaseline="middle",s.textAlign="center"),i&&(n.textBaseline="middle",n.textAlign="center"),c&&s.fillText(T,0,(p?1:-1)*(0-l+b/2)),i&&h&&n.fillText(T,0,(p?1:-1)*(0-l+b/2)),M.fill&&c&&s.restore(),M.style&&(c&&s.restore(),n.restore()),v=(S/2+m)/(l-b)*_,c&&s.rotate(v),i&&n.rotate(v)}),c&&s.restore(),i&&n.restore(),u&&(l-=b)}),c&&s.restore(),i&&n.restore()}}function Dn(o,t,e){if(o._imageMask===void 0){let i=o.width||t.naturalWidth,s=o.height||t.naturalHeight,r=document.createElement("canvas");r.width=i,r.height=s;let n=r.getContext("2d");n.imageSmoothingEnabled=!1,n.fillStyle=Os(o,e),n.fillRect(0,0,i,s),Or(t)||(n.globalCompositeOperation="destination-in",n.drawImage(t,0,0,i,s)),o._imageMask=r}return o._imageMask}function En(o,t,e=0){if(gi(o,t),o.image){if(o.tainted===void 0&&(o.tainted=Or(o.image),t.layer.tainted=!0),o.tainted&&xt(o,t)._omitTainted)return;let i=mi(e),s=Wi(o,t,e);if(t.layer.dirty&&!i){o.shadowColor&&(t.layer.context.shadowColor=o.shadowColor.toCSS(o.shadowOpacity!=null?o.shadowOpacity:1)),o.shadowBlur&&(t.layer.context.shadowBlur=o.shadowBlur),o.shadowOffsetX&&(t.layer.context.shadowOffsetX=o.shadowOffsetX),o.shadowOffsetY&&(t.layer.context.shadowOffsetY=o.shadowOffsetY);let r=o.width||o.image.naturalWidth,n=o.height||o.image.naturalHeight;t.layer.context.drawImage(o.image,0,0,r,n)}if(o.interactive&&jt(o,t)&&s){let r=Dn(o,o.image,t);xt(o,t)._ghostLayer.context.drawImage(r,0,0)}}}var fi=class{constructor(t,e,i,s){this.event=t,this.originalPoint=e,this.point=i,this.bbox=s,this.simulated=!1,this.native=!0,Ct("touchevents")&&t instanceof Touch?this.id=t.identifier:this.id=null}},he=class extends _e{constructor(t){super(),this.view=document.createElement("div"),this._layerDom=document.createElement("div"),this.layers=[],this._dirtyLayers=[],this.defaultLayer=this.getLayer(0),this._ghostLayer=new zs,this._deferredGhostLayers=[],this._patternCanvas=document.createElement("canvas"),this._patternContext=this._patternCanvas.getContext("2d"),this._realWidth=0,this._realHeight=0,this._calculatedWidth=0,this._calculatedHeight=0,this._colorId=0,this._colorMap={},this._forceInteractive=0,this._omitTainted=!1,t==null?this.resolution=window.devicePixelRatio:this.resolution=t,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new it(()=>{w(this.layers,e=>{ci(e.view),e.exportableView&&ci(e.exportableView)}),ci(this._ghostLayer.view),ci(this._patternCanvas)})),this._disposers.push(ve(()=>{t==null&&(this.resolution=window.devicePixelRatio)})),this._interaction=new Me(this),this._disposers.push(this._interaction)}resetImageArray(){this._ghostLayer.imageArray=void 0}get interactionsEnabled(){return this._interaction.interactionsEnabled}set interactionsEnabled(t){this._interaction.interactionsEnabled=t}get tapToActivate(){return this._interaction.tapToActivate}set tapToActivate(t){this._interaction.tapToActivate=t}get tapToActivateTimeout(){return this._interaction.tapToActivateTimeout}set tapToActivateTimeout(t){this._interaction.tapToActivateTimeout=t}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(t){t?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(t,e,i,s){return new Lt(t,e,i,s)}createRadialGradient(t,e,i,s,r,n){return new Ft(t,e,i,s,r,n)}createPattern(t,e,i,s,r){let n=this.resolution,a=n!==1&&s>0&&r>0,h=a?Math.max(1,Math.round(s*n)):s,c=a?Math.max(1,Math.round(r*n)):r;this._patternCanvas.width=h,this._patternCanvas.height=c,this._patternContext.clearRect(0,0,h,c);let l=a?h/s:1,d=a?c/r:1;Gi(e,this._patternContext,l,d),Gi(t,this._patternContext,l,d);let u=new kt(t,e,i,s,r),f=this._patternContext.createPattern(this._patternCanvas,i);return f&&a&&f.setTransform(new DOMMatrix([1/l,0,0,1/d,0,0])),di.set(u,f),u}createRasterPattern(t,e){let i=this._patternContext.createPattern(t,e);if(!i)return null;let s=new Dt(t,e);return di.set(s,i),s}makeContainer(){return new pt(this)}makeGraphics(){return new nt(this)}makeText(t,e){return new mt(this,t,e)}makeTextStyle(){return new ke}makeRadialText(t,e){return new at(this,t,e)}makePicture(t){return new gt(this,t)}resizeLayer(t){t.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(t,e,i,s){this._realWidth=t,this._realHeight=e,this._calculatedWidth=i,this._calculatedHeight=s,w(this.layers,r=>{r&&(r.dirty=!0,this.resizeLayer(r))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=s+"px"}createDetachedLayer(t=!1){let e=document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:t}),s=new pi(e,i);return e.style.position="absolute",e.style.top="0px",e.style.left="0px",s}getLayerByOrder(t){let e=this.layers,i=e.length;for(let s=0;s<i;s++){let r=e[s];if(r.order==t)return r}}getLayer(t,e=!0){let i=this.getLayerByOrder(t);if(i)return i;let s=this.createDetachedLayer(t==99);s.order=t,s.visible=e,s.view.className="am5-layer-"+t,s.visible&&this.resizeLayer(s);let r=this.layers;r.push(s),r.sort((c,l)=>c.order>l.order?1:c.order<l.order?-1:0);let n=r.length,a=vi(r,s),h;for(let c=a+1;c<n;c++)if(r[c].visible){h=r[c];break}return s.visible&&(h===void 0?this._layerDom.appendChild(s.view):this._layerDom.insertBefore(s.view,h.view)),s}render(t){this._dirtyLayers.length=0,this._deferredGhostLayers=[],w(this.layers,i=>{i&&i.dirty&&i.visible&&(this._dirtyLayers.push(i),i.clear())}),this._ghostLayer.clear(),Bs(t,{inactive:null,layer:this.defaultLayer,renderer:this});let e=this._deferredGhostLayers;e.length&&(e.sort((i,s)=>i-s),w(e,i=>{Bs(t,{inactive:null,layer:this.defaultLayer,renderer:this},i)})),this._ghostLayer.context.restore(),w(this._dirtyLayers,i=>{i.context.restore(),i.dirty=!1}),this._interaction.afterRender()}paintId(t){let e=yn(++this._colorId),i=L.fromHex(e).toCSS();return this._colorMap[i]=t,i}_removeObject(t){t._colorId!==void 0&&delete this._colorMap[t._colorId],t instanceof gt&&t._imageMask&&ci(t._imageMask)}_useLayer(t,e){let s=this.getLayer(t,!0);return s.visible=!0,s.margin=e,e&&te(s.view,!1),this._ghostLayer.setMargin(this.layers),s.dirty=!0,this.resizeLayer(s),this.resizeGhost(),s}_layerCanvas(t){return t.view}_measureText(t){return Hs(t,{inactive:t.inactive,layer:t.getLayer(),renderer:this})}_textContext(t){return t.getLayer().context}_adjustBoundingBox(t){let e=this._ghostLayer.margin;return new DOMRect(-e.left,-e.top,t.width+e.left+e.right,t.height+e.top+e.bottom)}getEvent(t,e=!0){let i=this.view.getBoundingClientRect(),s=t.clientX||0,r=t.clientY||0,n=this._calculatedWidth/(i.width||this._realWidth),a=this._calculatedHeight/(i.height||this._realHeight),h={x:s-i.left,y:r-i.top},c={x:(s-(e?i.left:0))*n,y:(r-(e?i.top:0))*a};return new fi(t,h,c,this._adjustBoundingBox(i))}_getHitTarget(t,e,i){if(e.width===0||e.height===0||t.x<e.left||t.x>e.right||t.y<e.top||t.y>e.bottom||!i||!this._layerDom.contains(i))return;let s=this._ghostLayer.getImageData(t,e);if(s.data[0]===0&&s.data[1]===0&&s.data[2]===0)return!1;let r=L.fromRGB(s.data[0],s.data[1],s.data[2]).toCSS();return this._colorMap[r]}getObjectAtPoint(t){let e=this._ghostLayer.getImageArray(t);if(e[0]===0&&e[1]===0&&e[2]===0)return;let i=L.fromRGB(e[0],e[1],e[2]).toCSS();return this._colorMap[i]}removeHovering(t){this._interaction.removeHovering(t)}getCanvas(t,e){this.render(t),e||(e={});let i=this.resolution,s=Math.floor(this._calculatedWidth*this.resolution),r=Math.floor(this._calculatedHeight*this.resolution);if(e.minWidth&&e.minWidth>s){let f=e.minWidth/s;f*this.resolution>i&&(i=f*this.resolution)}if(e.minHeight&&e.minHeight>r){let f=e.minHeight/r;f*this.resolution>i&&(i=f*this.resolution)}if(e.maxWidth&&e.maxWidth<s){let f=e.maxWidth/s;f*this.resolution<i&&(i=f*this.resolution)}if(e.maxHeight&&e.maxHeight<r){let f=e.maxHeight/r;f*this.resolution<i&&(i=f*this.resolution)}e.maintainPixelRatio&&(i/=this.resolution);let n=[],a=!1,h=document.createElement("canvas");i!=this.resolution&&(a=!0,s=s*i/this.resolution,r=r*i/this.resolution),h.width=s,h.height=r,h.style.position="fixed",h.style.top="-10000px",this.view.appendChild(h),n.push(h);let c=h.getContext("2d"),l=0,d=0,u=!1;return w(this.layers,f=>{if(f&&f.visible&&(f.tainted||a)){u=!0,f.exportableView=f.view,f.exportableContext=f.context,f.view=document.createElement("canvas"),f.view.style.position="fixed",f.view.style.top="-10000px",this.view.appendChild(f.view),n.push(f.view);let m=0,_=0;f.margin&&(m+=f.margin.left||0+f.margin.right||0,_+=f.margin.top||0+f.margin.bottom||0),f.view.width=s+m,f.view.height=r+_,f.context=f.view.getContext("2d"),f.dirty=!0,f.scale=i}}),u&&(this._omitTainted=!0,this.render(t),this._omitTainted=!1),w(this.layers,f=>{if(f&&f.visible){let m=0,_=0;f.margin&&(m=-(f.margin.left||0)*this.resolution,_=-(f.margin.top||0)*this.resolution),c.drawImage(f.view,m,_),f.exportableView&&(f.view=f.exportableView,f.exportableView=void 0),f.exportableContext&&(f.context=f.exportableContext,f.exportableContext=void 0),l<f.view.clientWidth&&(l=f.view.clientWidth),d<f.view.clientHeight&&(d=f.view.clientHeight),f.scale=void 0}}),h.style.width=l+"px",h.style.height=d+"px",w(n,f=>{f.style.position="",f.style.top="",this.view.removeChild(f)}),h}},zs=class{constructor(){this.margin={left:0,right:0,top:0,bottom:0},this._resolution=1,this._width=0,this._height=0,this.view=document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.view.style.position="absolute",this.view.style.top="0px",this.view.style.left="0px"}resize(t,e,i,s,r){this._resolution=r,t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px",this._width=Math.floor(t*r),this._height=Math.floor(e*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}getImageData(t,e){return this.context.getImageData(Math.round((t.x-e.left)/e.width*this._width),Math.round((t.y-e.top)/e.height*this._height),1,1)}getImageArray(t){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);let e=this.imageArray,i=Math.round(t.x*this._resolution),r=(Math.round(t.y*this._resolution)*this._width+i)*4;return[e[r],e[r+1],e[r+2],e[r+3]]}setMargin(t){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,w(t,e=>{e.margin&&(this.margin.left=Math.max(this.margin.left,e.margin.left),this.margin.right=Math.max(this.margin.right,e.margin.right),this.margin.top=Math.max(this.margin.top,e.margin.top),this.margin.bottom=Math.max(this.margin.bottom,e.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}},pi=class{constructor(t,e){this.tainted=!0,this.order=0,this.visible=!0,this.dirty=!0,this._width=0,this._height=0,this.view=t,this.context=e}resize(t,e,i,s,r){this.width!=null&&(t=this.width,i=this.width),this.height!=null&&(e=this.height,s=this.height),this.margin?(t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px"),this._width=Math.floor(t*r),this._height=Math.floor(e*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}};function Gr(o,t){o==null?requestAnimationFrame(t):setTimeout(()=>{requestAnimationFrame(t)},1e3/o)}var Wr={text:"CanvasText",grid:"CanvasText",alternativeBackground:"CanvasText",stroke:"CanvasText",background:"Canvas",alternativeText:"Canvas",fill:"Canvas",primaryButton:"ButtonFace",primaryButtonHover:"ButtonFace",primaryButtonDown:"ButtonFace",primaryButtonActive:"ButtonFace",primaryButtonDisabled:"ButtonFace",secondaryButton:"ButtonFace",secondaryButtonHover:"ButtonFace",secondaryButtonDown:"ButtonFace",secondaryButtonActive:"ButtonFace",primaryButtonText:"ButtonText",primaryButtonStroke:"ButtonText",secondaryButtonText:"ButtonText",secondaryButtonStroke:"ButtonText",primaryButtonTextDisabled:"GrayText",disabled:"GrayText"},Is,Vi;function Yr(){return Is===void 0&&(Is=window.matchMedia?window.matchMedia("(forced-colors: active)"):null),Is}function Pn(){if(!Vi){let o={},t=document.createElement("div");t.style.cssText="position:absolute;width:0;height:0;overflow:hidden;forced-color-adjust:none",document.body.appendChild(t),w(["Canvas","CanvasText","ButtonFace","ButtonText","GrayText"],e=>{t.style.color=e,o[e]=L.fromCSS(getComputedStyle(t).color)}),document.body.removeChild(t),Vi=o}return Vi}var Xi=class o{constructor(t,e={},i){if(this._computedSettings={},this._isDirty=!1,this._isDirtyParents=!1,this._isDirtyAnimation=!1,this._dirty={},this._dirtyParents={},this._dirtyBounds={},this._dirtyPositions={},this._ticker=null,this._tickers=[],this._updateTick=!0,this.skipRenderFrame=!1,this.events=new wr,this.animationTime=null,this._animations=[],this.language=Ri.new(this,{}),this.locale=Bi,this.utc=!1,this.numberFormatter=re.new(this,{}),this.dateFormatter=ae.new(this,{}),this.durationFormatter=oe.new(this,{}),this.tabindex=0,this._tabindexes=[],this._a11yD=!1,this._focusElementDirty=!1,this._groupStops={},this._dirtyGroups={},this.verticalLayout=os.new(this,{}),this.horizontalLayout=Ce.new(this,{}),this.gridLayout=hs.new(this,{}),this._paused=!1,this.autoResize=!0,this._fontHash="",this._isDisposed=!1,this._fontLoads=0,this._passRound=0,this._disposers=[],this._tooltips=[],this._htmlEnabledContainers=[],this.entitiesById={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=e,e.accessible==!1&&(this._a11yD=!0),e.useSafeResolution==null&&(e.useSafeResolution=!0,this._computedSettings.useSafeResolution=!0),e.sanitizeHTML==null&&(e.sanitizeHTML=!0,this._computedSettings.sanitizeHTML=!0);let s;e.useSafeResolution&&(s=es());let r=e.renderer||o.defaultRenderer;this._renderer=new r(s);let n=o._getDOM(t);this.interfaceColors=se.new(this,{}),this.dom=n;let a=document.createElement("div");a.style.position="relative",a.style.width="100%",a.style.height="100%",n.appendChild(a);let h=e.tooltipContainerBounds;h&&(this._tooltipContainerSettings=h),this._inner=a,this._updateComputedStyles(),ee.rootElements.push(this)}_direction(){let t=this._settings.direction;if(t=="rtl"||t=="ltr")return t;if(this._pageDirection==null){let e="ltr";try{getComputedStyle(this.dom).direction=="rtl"&&(e="rtl")}catch{}this._pageDirection=e}return this._pageDirection}static new(t,e){let i=o._getDOM(t);w(ee.rootElements,r=>{if(r.dom===i)if(ee.autoDispose)r.dispose();else throw new Error("You cannot have multiple Roots on the same DOM node")});let s=new o(t,e,!0);return s._init(),s}static _getDOM(t){let e=t instanceof HTMLElement?t:document.getElementById(t);if(e===null)throw new Error("Could not find HTML element with id `"+t+"`");return e}moveDOM(t){let e;if(t instanceof HTMLElement?e=t:e=document.getElementById(t),e){for(;this.dom.childNodes.length>0;)e.appendChild(this.dom.childNodes[0]);this.dom=e,this._styles=void 0,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){let t=this.dom.offsetWidth,e=this.dom.offsetHeight;t<=150||e<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){let t=this.tooltipContainer.children.push(E.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:lt(100),centerY:O,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:O,cursorOverStyle:"pointer",background:Yt.new(this,{fill:ct(4671320),fillOpacity:0,tooltipY:5})}));t.set("tooltip",this.systemTooltip),t.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),t.states.create("hover",{});let e=t.children.push(R.new(this,{stroke:ct(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6",dx:-50,strokeOpacity:0}));e.states._createC("hover",{stroke:ct(3976191)});let i=t.children.push(R.new(this,{stroke:ct(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0",dx:50,strokeOpacity:0})),s=Sr(Mr),r=1500;t.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:r,easing:s}),i.animate({key:"dx",to:0,duration:r,easing:s}),e.animate({key:"dx",to:0,duration:r,easing:s}),e.animate({key:"strokeOpacity",to:1,duration:r,easing:s})},3e3),i.states.create("hover",{stroke:ct(4671320)}),this._logo=t,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(t){if(this._settings.calculateSize)return this._settings.calculateSize(t);{let e=this.dom,i=e.offsetWidth,s=e.offsetHeight;return Math.abs(i-t.width)>1||Math.abs(s-t.height)>1?{width:i,height:s}:{width:t.width,height:t.height}}}_init(){let t=this._settings;t.accessible!==!1&&(t.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),t.ariaLabel&&this._inner.setAttribute("aria-label",t.ariaLabel),t.role&&this._inner.setAttribute("role",t.role));let e=this._renderer,i=this._getRealSize(),s=this._getCalculatedSize(i),r=Math.floor(s.width),n=Math.floor(s.height),a=Math.floor(i.width),h=Math.floor(i.height),c=E.new(this,{visible:!0,width:r,height:n});this._rootContainer=c,this._rootContainer._defaultThemes.push(Dr.new(this));let l=c.children.push(E.new(this,{width:O,height:O}));l._setC("visible",!0),this.container=l,e.resize(a,h,r,n),this._inner.appendChild(e.view),this._initResizeSensor();let d=document.fonts;if(d&&d.addEventListener){let f=()=>{let p=0;return d.forEach(y=>{y.status=="loaded"&&p++}),p},m=f(),_=()=>{let p=f();p>m&&!this._isDisposed&&(this._fontLoads++,this._invalidateLabelBounds(this._rootContainer,!0),w(this._tooltips,y=>{this._invalidateLabelBounds(y,!0)})),m=p};this._disposers.push(F(d,"loadingdone",_)),this._disposers.push(F(d,"loading",()=>{d.ready.then(_)})),d.status=="loading"&&d.ready.then(_)}let u=document.createElement("div");if(this._htmlElementContainer=u,u.className="am5-html-container",u.style.position="absolute",u.style.pointerEvents="none",this._tooltipContainerSettings||(u.style.overflow="hidden"),this._inner.appendChild(u),this._a11yD!==!0){let f=document.createElement("div");f.className="am5-reader-container",f.setAttribute("role","alert"),f.style.position="absolute",f.style.width="1px",f.style.height="1px",f.style.overflow="hidden",f.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=f,this._inner.appendChild(this._readerAlertElement);let m=document.createElement("div");m.className="am5-focus-container",m.style.position="absolute",m.style.pointerEvents="none",m.style.top="0px",m.style.left="0px",m.style.overflow="hidden",m.style.width=r+"px",m.style.height=n+"px",m.setAttribute("role","graphics-document"),t.ariaLabel&&m.setAttribute("aria-label",t.ariaLabel),te(m,!1),this._focusElementContainer=m,this._inner.appendChild(this._focusElementContainer);let _=document.createElement("div");this._tooltipElementContainer=_,_.className="am5-tooltip-container",this._inner.appendChild(_),Ct("keyboardevents")&&(this._disposers.push(F(window,"keydown",p=>{let y=$t(p);y=="Shift"?this._isShift=!0:y=="Tab"&&(this._isShift=p.shiftKey)})),this._disposers.push(F(window,"keyup",p=>{$t(p)=="Shift"&&(this._isShift=!1)})),this._disposers.push(F(m,"click",()=>{let p=this._focusedSprite;if(p){let y=p.get("clickAnnounceText","");y!==""&&this.readerAlert(y);let g=e.getEvent(new MouseEvent("click"));p.events.dispatch("click",{type:"click",originalEvent:g.event,point:g.point,simulated:!0,target:p})}})),this._disposers.push(F(m,"keydown",p=>{let y=this._focusedSprite;if(y){if(p.key=="Escape"){y.isDragging()&&this._stopKeyboardDrag(y),y.hideTooltip();return}let g=0,b=0,x=$t(p);switch(x){case"Enter":case" ":if(x==" "&&["button","checkbox","switch","radio","tab","option","menuitem","menuitemcheckbox","menuitemradio"].indexOf(y.get("role",""))===-1)return;let v=y.get("clickAnnounceText","");v!==""&&this.readerAlert(v),p.preventDefault();let M=e.getEvent(new MouseEvent("mouse"));y.events.dispatch("click",{type:"click",originalEvent:M.event,point:M.point,simulated:!0,target:y});return;case"ArrowLeft":g=-6;break;case"ArrowRight":g=6;break;case"ArrowUp":b=-6;break;case"ArrowDown":b=6;break;default:return}if(g!=0||b!=0){if(p.preventDefault(),y.get("focusableGroup")&&!p.shiftKey&&!y.isDragging())return;if(!y.isDragging()){this._keyboardDragPoint={x:0,y:0};let C=e.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));C.point={x:0,y:0},y.events.isEnabled("pointerdown")&&y.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:C.event,point:C.point,simulated:!0,target:y})}let v=this._keyboardDragPoint;v.x+=g,v.y+=b;let M=e.getEvent(new MouseEvent("mousemove",{clientX:v.x,clientY:v.y}),!1);y.events.isEnabled("globalpointermove")&&y.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:M.event,point:M.point,simulated:!0,target:y})}}})),this._disposers.push(F(m,"keyup",p=>{if(this._focusedSprite){let y=this._focusedSprite,g=$t(p);switch(g){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(y.isDragging()){this._stopKeyboardDrag(y);return}else if(y.get("focusableGroup")){let b=y.get("focusableGroup"),x=this._tabindexes.filter(C=>C===y||C.get("focusableGroup")==b&&C.isVisibleDeep()&&this._canTab(C)),v=x.indexOf(y),M=x.length-1;v+=g=="ArrowRight"||g=="ArrowDown"?1:-1,v<0?v=M:v>M&&(v=0),cr(x[v].getPrivate("focusElement").dom)}break}}})))}this._startTicker(),this.setThemes([]),this._initForcedColors(),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){let t=St.new(this,{themeTags:["system"]});this._systemTooltip=t}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new Ni(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){let t=this._getRealSize(),e=this._getCalculatedSize(t),i=Math.floor(e.width),s=Math.floor(e.height);if(i>0&&s>0){let r=Math.floor(t.width),n=Math.floor(t.height),a=this._htmlElementContainer;if(a.style.width=i+"px",a.style.height=s+"px",this._a11yD!==!0){let c=this._focusElementContainer;c.style.width=i+"px",c.style.height=s+"px"}this._renderer.resize(r,n,i,s);let h=this._rootContainer;h.setPrivate("width",i),h.setPrivate("height",s),this._render(),this._handleLogo()}}_reapplySettings(){let t=this._settings,e=es();if(this._renderer.resolution=t.useSafeResolution&&e!=null?e:window.devicePixelRatio,t.tooltipContainerBounds&&(this._tooltipContainerSettings=t.tooltipContainerBounds),this._htmlElementContainer&&(this._htmlElementContainer.style.overflow=t.tooltipContainerBounds?"":"hidden"),t.accessible===!1&&(this._a11yD=!0),!this._a11yD){let i=this._inner;t.focusable?(i.setAttribute("focusable","true"),i.setAttribute("tabindex",this.tabindex+"")):(i.removeAttribute("focusable"),i.removeAttribute("tabindex")),t.ariaLabel!=null?i.setAttribute("aria-label",t.ariaLabel):i.removeAttribute("aria-label"),t.role!=null?i.setAttribute("role",t.role):i.removeAttribute("role")}this._updateForcedColors(),this._rootContainer&&(this._rootContainer.markDirty(),this._rootContainer.walkChildren(i=>{i.markDirty(),i.markDirtyBounds()})),this._render()}get settings(){return this._settings}_render(){if(this.skipRenderFrame){this.skipRenderFrame=!1;return}this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateDirtyGroups(),this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(t){w(this._tickers,e=>{e(t)})}_runAnimations(t){let e=0;return me(this._animations,i=>{let s=i._runAnimation(t);return s===ns.Stopped?!1:(s===ns.Playing&&++e,!0)}),this._isDirtyAnimation=!1,e===0}_runDirties(){let t={};for(;this._isDirtyParents;)this._isDirtyParents=!1,ge(this._dirtyParents).forEach(([n,a])=>{delete this._dirtyParents[n],a.isDisposed()||(t[a.uid]=a,a._prepareChildren())});ge(t).forEach(([n,a])=>{a._updateChildren()});let e=[];ge(this._dirty).forEach(([n,a])=>{a.isDisposed()?delete this._dirty[n]:(e.push(a),a._beforeChanged())}),e.forEach(n=>{n._changed(),delete this._dirty[n.uid],n._clearDirty()}),this._isDirty=!1;let i={},s=[];ge(this._dirtyBounds).forEach(([n,a])=>{delete this._dirtyBounds[n],a.isDisposed()||(i[a.uid]=a.depth(),s.push(a))}),this._positionHTMLElements(),s.sort((n,a)=>kr(i[a.uid],i[n.uid])),s.forEach(n=>{n._updateBounds()});let r=this._dirtyPositions;ge(r).forEach(([n,a])=>{delete r[n],a.isDisposed()||a._updatePosition()}),e.forEach(n=>{n._afterChanged()}),ge(t).forEach(([n,a])=>{a._childrenPrep=!1,a._childrenUpdt=!1})}_renderFrame(t){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:t}),this._checkComputedStyles(),this._runTickers(t);let e=this._runAnimations(t);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:t}),this._tickers.length===0&&e&&!this._isDirtyAnimation&&!this._isDirty}else return!0}_runTicker(t,e){this.isDisposed()||(this.animationTime=t,this._renderFrame(t)?(this._ticker=null,this.animationTime=null):this._paused||(e?this._ticker:Gr(this.fps,this._ticker)))}_runTickerNow(t=1e4){if(!this.isDisposed()){let e=performance.now()+t;for(;;){let i=performance.now();if(i>=e){this.animationTime=null;break}if(this.animationTime=i,this._renderFrame(i)){this.animationTime=null;break}}}}_startTicker(){this._ticker===null&&(this.animationTime=null,this._ticker=t=>{this._runTicker(t)},Gr(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(t){this._updateTick=t,t&&this._startTicker()}_addDirtyEntity(t){this._isDirty=!0,this._dirty[t.uid]===void 0&&(this._dirty[t.uid]=t),this._startTicker()}_addDirtyParent(t){this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[t.uid]===void 0&&(this._dirtyParents[t.uid]=t),this._startTicker()}_addDirtyBounds(t){this._isDirty=!0,this._dirtyBounds[t.uid]===void 0&&(this._dirtyBounds[t.uid]=t),this._startTicker()}_addDirtyPosition(t){this._isDirty=!0,this._dirtyPositions[t.uid]===void 0&&(this._dirtyPositions[t.uid]=t),this._startTicker()}_addAnimation(t){this._isDirtyAnimation=!0,this._animations.indexOf(t)===-1&&this._animations.push(t),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(t){return this._tickers.push(t),this._startTicker(),new it(()=>{be(this._tickers,t)})}markDirtyGlobal(t){t||(t=this.container),t.walkChildren(e=>{e instanceof E&&this.markDirtyGlobal(e),e.markDirty(),e.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),w(this._disposers,t=>{t.dispose()}),this._inner&&hr(this._inner),Qt(ee.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(t){if(this._a11yD!==!0){let e=this._readerAlertElement;t=ii(t),e.innerHTML==t&&(e.innerHTML=""),e.innerHTML=t}}setThemes(t){this._rootContainer.set("themes",t);let e=this.tooltipContainer;e&&e._applyThemes();let i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){let t=this._tooltipContainerSettings,e=this._rootContainer.children.push(E.new(this,{position:"absolute",isMeasured:!1,width:O,height:O,layer:t?35:30,layerMargin:t||void 0}));this.tooltipContainer=e;let i=St.new(this,{});this.container._setC("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(t){this._a11yD!=!0&&(t.get("focusable")&&!t.getPrivate("focusExcluded")?Qe(this._tabindexes,t):Qt(this._tabindexes,t),this._invalidateTabindexes())}_unregisterTabindexOrder(t){this._a11yD!=!0&&(Qt(this._tabindexes,t),this._invalidateTabindexes())}_invalidateTabindexes(){this._a11yD!=!0&&(this._tabindexes.sort((t,e)=>{let i=t.get("tabindexOrder",0),s=e.get("tabindexOrder",0);return i==s?0:i>s?1:-1}),w(this._tabindexes,(t,e)=>{t.getPrivate("focusElement")?this._moveFocusElement(e,t):this._makeFocusElement(e,t);let i=t.get("focusableGroup");i&&(this._dirtyGroups[i]=i)}),this._updateDirtyGroups())}_canFocus(t){return!!(t.get("visible")&&t.get("opacity")!==0&&t.get("role")!="tooltip"&&!t.get("ariaHidden")&&!t.isHidden()&&t.getPrivate("focusable")!==!1&&this._hasFocusSize(t))}_canTab(t){return this._canFocus(t)&&(this._focusedSprite===t||!t.getPrivate("focusOutOfView"))}_invalidateGroup(t){this._dirtyGroups[t]=t,this._focusElementDirty=!0}_updateDirtyGroups(){let t=this._dirtyGroups;this._dirtyGroups={},V(t,(e,i)=>{this._updateGroup(i)})}_updateGroup(t){let e=this._tabindexes.filter(s=>s.get("focusableGroup")==t&&s.getPrivate("focusElement")),i=this._groupStops[t];(!i||e.indexOf(i)==-1||!this._canTab(i))&&(i=rr(e,s=>this._canTab(s))),i?this._groupStops[t]=i:delete this._groupStops[t],w(e,s=>{let r=s.getPrivate("focusElement").dom;this._canTab(s)?r.setAttribute("tabindex",s===i?""+this.tabindex:"-1"):r.removeAttribute("tabindex")})}_updateCurrentFocus(){this._a11yD!=!0&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(t,e){if(this._a11yD==!0||(e||(e=t.getPrivate("focusElement").dom),!e))return;let i=t.get("toggleKey"),s=i=="active"||i=="disabled",r=t.get("role");r=="figure"&&s&&t.get("focusable")&&(r="button"),r?e.setAttribute("role",r):e.removeAttribute("role");let n=t.get("ariaExpanded");if(n!=null?e.setAttribute("aria-expanded",n?"true":"false"):e.removeAttribute("aria-expanded"),r=="button"&&s&&n==null){let b=i=="disabled"?!t.get("disabled"):!!t.get("active");e.setAttribute("aria-pressed",b?"true":"false")}else e.removeAttribute("aria-pressed");let a=t.get("ariaLabel");if(a){let b=ls(t,a);e.setAttribute("aria-label",b)}else e.removeAttribute("aria-label");let h=t.get("ariaLive");h?e.setAttribute("aria-live",h):e.removeAttribute("aria-live");let c=t.get("ariaChecked");c!=null&&r&&["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(r)!==-1?e.setAttribute("aria-checked",c?"true":"false"):e.removeAttribute("aria-checked");let l=t.get("ariaCurrent");l!=null?e.setAttribute("aria-current",l):e.removeAttribute("aria-current");let d=t.get("ariaSelected");d!=null&&r&&["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(r)!==-1?e.setAttribute("aria-selected",d?"true":"false"):e.removeAttribute("aria-selected"),t.get("ariaHidden")?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden");let u=t.get("ariaOrientation");u?e.setAttribute("aria-orientation",u):e.removeAttribute("aria-orientation");let f=t.get("ariaValueNow");f?e.setAttribute("aria-valuenow",f):e.removeAttribute("aria-valuenow");let m=t.get("ariaValueMin");m?e.setAttribute("aria-valuemin",m):e.removeAttribute("aria-valuemin");let _=t.get("ariaValueMax");_?e.setAttribute("aria-valuemax",_):e.removeAttribute("aria-valuemax");let p=t.get("ariaValueText");p?e.setAttribute("aria-valuetext",p):e.removeAttribute("aria-valuetext");let y=t.get("ariaControls");y?e.setAttribute("aria-controls",y):e.removeAttribute("aria-controls");let g=t.get("focusableGroup");this._canFocus(t)?(this._canTab(t)?g?e.setAttribute("tabindex",this._groupStops[g]===t?""+this.tabindex:"-1"):e.setAttribute("tabindex",""+this.tabindex):e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden")):(e.removeAttribute("tabindex"),e.setAttribute("aria-hidden","true")),g&&this._invalidateGroup(g)}_initForcedColors(){let t=Yr();t&&t.addEventListener&&this._disposers.push(F(t,"change",()=>{Vi=void 0,this._updateForcedColors()})),this._updateForcedColors()}_updateForcedColors(){let t=Yr(),e=t&&t.matches&&this._settings.forcedColors!==!1,i=this.interfaceColors;if(e){let s=Pn();if(!this._forcedColorsBackup){let r={};V(Wr,n=>{r[n]={value:i.get(n),user:i.isUserSetting(n)&&!i.isComputedSetting(n)}}),this._forcedColorsBackup=r}V(Wr,(r,n)=>{i._setC(r,s[n])})}else if(this._forcedColorsBackup){let s=this._forcedColorsBackup;this._forcedColorsBackup=void 0,V(s,(r,n)=>{n.user?i.set(r,n.value):i.remove(r)}),i._applyThemes()}}_stopKeyboardDrag(t){let e=this._keyboardDragPoint||{x:0,y:0},i=this._renderer.getEvent(new MouseEvent("mouseup",{clientX:e.x,clientY:e.y}));t.events.isEnabled("globalpointerup")&&t.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:i.event,point:i.point,simulated:!0,target:t}),this._keyboardDragPoint=void 0}_hasFocusSize(t){if(this._focusedSprite===t||t.height()||t.width())return!0;if(!t.get("isMeasured")){let e=t._focusBounds();return e.right>e.left||e.bottom>e.top}return!1}_makeFocusElement(t,e){if(e.getPrivate("focusElement")||this._a11yD==!0)return;let i=document.createElement("div");e.get("role")!="tooltip"&&(i.tabIndex=this.tabindex),i.style.position="absolute",te(i,!1);let s=[];e.setPrivate("focusElement",{dom:i,disposers:s}),this._decorateFocusElement(e),s.push(F(i,"focus",r=>{this._handleFocus(r)})),s.push(F(i,"blur",r=>{this._handleBlur(r)})),this._moveFocusElement(t,e)}_removeFocusElement(t){if(this._a11yD==!0)return;Qt(this._tabindexes,t);let e=t.getPrivate("focusElement");if(e){this._focusElementContainer.removeChild(e.dom),w(e.disposers,r=>{r.dispose()}),t.removePrivate("focusElement");let s=t.get("focusableGroup");s&&(this._groupStops[s]===t&&delete this._groupStops[s],this._invalidateGroup(s))}}_hideFocusElement(t){if(this._a11yD==!0)return;let e=t.getPrivate("focusElement");e.dom.style.display="none"}_moveFocusElement(t,e){if(this._a11yD==!0)return;let i=this._focusElementContainer,s=e.getPrivate("focusElement").dom;if(s===this._focusElementContainer.children[t])return;let r=this._focusElementContainer.children[t+1];r?i.insertBefore(s,r):i.append(s)}_positionFocusElement(t){if(this._a11yD==!0||t==null)return;this._focusElementContainer.scrollTop=0;let e=t._focusBounds(),i=e.right==e.left?t.width():e.right-e.left,s=e.top==e.bottom?t.height():e.bottom-e.top,r=this._settings.focusPadding!==void 0?this._settings.focusPadding:2,n=e.left-r,a=e.top-r;i<0&&(n+=i,i=Math.abs(i)),s<0&&(a+=s,s=Math.abs(s));let h=t.getPrivate("focusElement").dom;h.style.top=a+"px",h.style.left=n+"px",h.style.width=i+r*2+"px",h.style.height=s+r*2+"px"}_getSpriteByFocusElement(t){let e;return fe(this._tabindexes,(i,s)=>i.getPrivate("focusElement").dom===t?(e=i,!1):!0),e}_handleFocus(t){if(this._a11yD==!0)return;let e=this._getSpriteByFocusElement(t.target);if(!e)return;if(!e.isVisibleDeep()){this._focusNext(t.target,this._isShift?-1:1);return}this._positionFocusElement(e),this._focusedSprite=e,e.events.isEnabled("focus")&&e.events.dispatch("focus",{type:"focus",originalEvent:t,target:e});let i=e.get("focusableGroup");i&&(this._groupStops[i]=e,this._updateGroup(i))}_focusNext(t,e,i){if(this._a11yD==!0)return;let s=this.dom.getRootNode?this.dom.getRootNode():null,r=this.dom.ownerDocument||document;s&&(typeof ShadowRoot<"u"&&s instanceof ShadowRoot||s instanceof Document)&&(r=s);let n=Array.from(r.querySelectorAll(["a[href]","area[href]","button:not([disabled])","details","input:not([disabled])","iframe:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contentEditable=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not([tabindex^="-"])'].join(","))),a=n.indexOf(t)+e;a<0?a=n.length-1:a>=n.length&&(a=0);let h=n[a];if(i&&e==-1){let c=this._getSpriteByFocusElement(h);if(c&&c.get("focusableGroup")==i){this._focusNext(h,e);return}}h&&h.focus()}_handleBlur(t){if(this._a11yD==!0)return;let e=this._focusedSprite;e&&!e.isDisposed()&&e.events.isEnabled("blur")&&e.events.dispatch("blur",{type:"blur",originalEvent:t,target:e}),this._focusedSprite=void 0,e&&!e.isDisposed()&&e.getPrivate("focusElement")&&this._decorateFocusElement(e)}updateTooltip(t){if(this._a11yD==!0)return;let e=gr(ii(t._getText())),i=t.getPrivate("tooltipElement");t.get("role")=="tooltip"&&e!=""?(i||(i=this._makeTooltipElement(t)),i.innerHTML!=e&&(i.innerHTML=e),i.setAttribute("aria-hidden",t.isVisibleDeep()?"false":"true")):i&&(i.remove(),t.removePrivate("tooltipElement"))}_makeTooltipElement(t){let e=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",te(i,!1),this._decorateFocusElement(t,i),e.append(i),t.setPrivate("tooltipElement",i),i}_removeTooltipElement(t){if(this._a11yD==!0)return;let e=t.getPrivate("tooltipElement");if(e){let i=e.parentElement;i&&i.removeChild(e)}}_invalidateAccessibility(t){if(this._a11yD==!0)return;this._focusElementDirty=!0;let e=t.getPrivate("focusElement");t.get("focusable")&&!t.getPrivate("focusExcluded")?e&&(this._decorateFocusElement(t),this._focusedSprite===t&&this._positionFocusElement(t)):e&&this._removeFocusElement(t)}focused(t){return this._focusedSprite===t}documentPointToRoot(t){let e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,r=i.height/e.height;return{x:(t.x-e.left)*s,y:(t.y-e.top)*r}}rootPointToDocument(t){let e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,r=i.height/e.height;return{x:t.x/s+e.left,y:t.y/r+e.top}}addDisposer(t){return this._disposers.push(t),t}_updateComputedStyles(){this._styles||(this._styles=window.getComputedStyle(this.dom));let t=this._styles,e=[t.fontFamily,t.fontSize,t.fontStyle,t.fontWeight,t.fontVariant,t.fontStretch].join();return e!==this._fontHash?(this._fontHash=e,!0):!1}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(t,e){t instanceof E?t.children.each(i=>{this._invalidateLabelBounds(i,e)}):t instanceof cs&&(t.markDirtyBounds(),e&&(t._display.invalidateBounds(),t.markDirty()))}_hasLicense(){for(let t=0;t<ee.licenses.length;t++)if(ee.licenses[t].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(t){this._renderer.debugGhostView=t}set tapToActivate(t){this._renderer.tapToActivate=t}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(t){this._renderer.tapToActivateTimeout=t}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(t){let e=this._htmlElementContainer,i=document.createElement("div");t.setPrivate("htmlElement",i);let s=!1,r;t._walkParents(a=>{if(a.get("verticalScrollbar"))return s=!0,r=a,!1});let n;return s&&(n=document.createElement("div"),t.setPrivate("htmlElementWrapper",n),t.setPrivate("wrapperContainer",r),n.style.position="absolute",n.style.overflow="hidden",n.style.boxSizing="border-box",n.style.top="0px",n.style.left="0px",n.style.width="100%",n.style.height="100%",r.events.on("boundschanged",()=>{this._positionHTMLElement(t)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",te(i,t.get("interactive",!1)),t.events.isEnabled("click")&&(te(i,!0),this._disposers.push(F(i,"click",a=>{let h=this._renderer.getEvent(a);t.events.dispatch("click",{type:"click",originalEvent:h.event,point:h.point,simulated:!1,target:t})}))),this._positionHTMLElement(t),s?(n.append(i),e.append(n)):e.append(i),Qe(this._htmlEnabledContainers,t),i}_positionHTMLElements(){w(this._htmlEnabledContainers,t=>{this._positionHTMLElement(t)})}_positionHTMLElement(t){let e=t.getPrivate("htmlElementWrapper");if(e){let s=t.getPrivate("wrapperContainer");if(s){let r=s.globalBounds();e.style.clipPath="rect("+r.top+"px "+r.right+"px "+r.bottom+"px "+r.left+"px)"}}let i=t.getPrivate("htmlElement");if(i){if(!t.isVisibleDeep()){i.style.display!="none"&&(i.style.display="none");return}w(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],b=>{let x=t.get(b);x?i.style[b]=x+"px":i.style[b]=""}),w(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],b=>{let x=t.get(b);x?b=="fontSize"&&!Ot(x)?i.style[b]=x+"px":i.style[b]=x+"":i.style[b]=""});let n=t.compositeScale()||1,a=t.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";let h=t.compositeOpacity();setTimeout(()=>{i.style.opacity=h+""},10);let c=t.isVisibleDeep();c&&(i.style.display="block");let l={x:t.x()+t.get("dx",0),y:t.y()+t.get("dy",0)};t.parent&&(l=t.parent.toGlobal(l)),i.style.top=l.y+"px",i.style.left=l.x+"px";let d=t.get("width"),u=t.get("height"),f=0,m=0;if(d&&(f=t.width()),u&&(m=t.height()),!d||!u){i.style.position="fixed",i.style.width="",i.style.height="";let b=i.getBoundingClientRect();i.style.position="absolute",d||(f=b.width),u||(m=b.height);let x=f/n,v=m/n,M=t.get("centerX",0),C=t.get("centerY",0),T=0,S=0,D=0,k=0;M instanceof Et?(T=-M.value*x,S=(1-M.value)*x):(T=-M,S=x-M),C instanceof Et?(D=-C.value*v,k=(1-C.value)*v):(D=-C,k=v-C),t._localBounds={left:T,right:S,top:D,bottom:k};let $=t._adjustedLocalBounds,P=t._display.getAdjustedBounds(t._localBounds);t._adjustedLocalBounds=P,($.left!==P.left||$.right!==P.right||$.top!==P.top||$.bottom!==P.bottom)&&t.markDirtyBounds()}f>0&&(i.style.minWidth=f+"px"),m>0&&(i.style.minHeight=m+"px"),(!c||h==0)&&(i.style.display="none");let _=t.get("centerX",0),p=Ki(_)?_.percent+"%":_+"px",y=t.get("centerY",0),g=Ki(y)?y.percent+"%":y+"px";(_||y)&&(i.style.transform="translate(-"+p+", -"+g+")"+i.style.transform),n!=1&&(i.style.transform+="scale("+n+")"),a!=0&&(i.style.transform+=" rotate("+a+"deg)"),i.style.transform!=""&&(i.style.transformOrigin=p+" "+g)}}_sanitizeHTML(t){return this._settings.sanitizeHTML?_r(t):t}_setHTMLContent(t,e){let i=t.getPrivate("htmlElement");i||(i=this._makeHTMLElement(t),this.autoResize||this.resize());let s=this._sanitizeHTML(e);i.innerHTML!=s&&(i.innerHTML=s)}_removeHTMLContent(t){let e=t.getPrivate("htmlElementWrapper"),i=t.getPrivate("htmlElement");e?(this._htmlElementContainer.removeChild(e),t.removePrivate("htmlElement"),t.removePrivate("htmlElementWrapper"),t.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),t.removePrivate("htmlElement"),t.removePrivate("wrapperContainer")),Qt(this._htmlEnabledContainers,t)}};Xi.defaultRenderer=he;var Ui;function An(o,t,e){let i=t.interfaceColors,s=i.get("secondaryButton").toCSS(),r=i.get("text").toCSS(),n=i.get("alternativeBackground").toCSS(.45);if(!Ui){let a=new yt([new J(o,".am5-modal",{width:"100%",height:"100%",position:"absolute","z-index":"100000",top:"0",left:"0"},t.nonce),new J(o,".am5-modal-curtain",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute",background:i.get("background").toCSS(.5),"z-index":"100"},t.nonce),new J(o,".am5-modal-wrapper",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute","text-align":"center","white-space":"nowrap",background:i.get("background").toCSS(.5),"z-index":"101"},t.nonce),new J(o,".am5-modal-wrapper:before",{content:"''",display:"inline-block",height:"100%","vertical-align":"middle","margin-right":"-0.25em"},t.nonce),new J(o,".am5-modal-content",{display:"inline-block",padding:"1.2em","vertical-align":"middle","text-align":"start","white-space":"normal",background:i.get("background").toCSS(),"border-radius":"4px","-webkit-box-shadow":"0px 0px 36px 0px "+n,"box-shadow":"0px 0px 36px 0px "+n,color:r},t.nonce),new J(o,".am5-modal-content h1",{"font-size":"1em",margin:"0 0 0.5em 0"},t.nonce),new J(o,".am5-modal-table",{display:"table",margin:"1em 0"},t.nonce),new J(o,".am5-modal-table-row",{display:"table-row"},t.nonce),new J(o,".am5-modal-table-heading",{display:"table-heading",padding:"3px 10px 3px 0"},t.nonce),new J(o,".am5-modal-table-cell",{display:"table-cell",padding:"3px 0 3px 0"},t.nonce),new J(o,".am5-modal-table-cell > *",{"vertical-align":"middle"},t.nonce),new J(o,".am5-modal-content input[type=text], .am5-modal-content input[type=number], .am5-modal-content select",{border:"1px solid "+s,"border-radius":"4px",padding:"3px 5px",margin:"2px"},t.nonce),new J(o,".am5-modal-input-narrow",{width:"70px"},t.nonce),new J(o,".am5-modal-button",{"font-weight":"400",color:i.get("secondaryButtonText").toCSS(),"line-height":"1.5","text-align":"center","text-decoration":"none","vertical-align":"middle",cursor:"pointer",padding:"0.2em 0.8em","font-size":"1em","border-radius":"0.25em",margin:"0 0.25em 0 0",border:"1px solid "+i.get("secondaryButtonStroke").toCSS(),background:i.get("secondaryButton").toCSS()},t.nonce),new J(o,".am5-modal-button:hover",{background:i.get("secondaryButtonHover").toCSS()},t.nonce),new J(o,".am5-modal-button.am5-modal-primary",{color:i.get("primaryButtonText").toCSS(),border:"1px solid "+i.get("primaryButtonStroke").toCSS(),background:i.get("primaryButton").toCSS()},t.nonce),new J(o,".am5-modal-button.am5-modal-primary:hover",{background:i.get("primaryButtonHover").toCSS()},t.nonce)]);Ui=new ti(()=>{Ui=void 0,a.dispose()})}return Ui.increment()}var De=class extends B{_afterNew(){super._afterNewApplyThemes(),this._setRawDefault("deactivateRoot",!0),An(pr(this._root.dom),this._root);let t=document.createElement("div");t.className="am5-modal",t.style.display="none",this.root._inner.appendChild(t),this.setPrivate("container",t);let e=document.createElement("div");e.className="am5-modal-curtain",t.appendChild(e),this.setPrivate("curtain",e),this._disposers.push(F(e,"click",()=>{this.cancel()}));let i=document.createElement("div");i.className="am5-modal-wrapper",i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.tabIndex=-1,t.appendChild(i),this.setPrivate("wrapper",i);let s=document.createElement("div");s.className="am5-modal-content",i.appendChild(s),this.setPrivate("content",s);let r=this.get("content");r&&(s.innerHTML=this._root._sanitizeHTML(r)),Ct("keyboardevents")&&(this._disposers.push(F(document,"keydown",n=>{this.isOpen()&&$t(n)=="Escape"&&this.cancel()})),this._disposers.push(F(i,"keydown",n=>{if($t(n)=="Tab"){let a=this._getFocusables();if(a.length==0){n.preventDefault();return}let h=a[0],c=a[a.length-1],l=document.activeElement;n.shiftKey&&(l===h||l===i)?(n.preventDefault(),c.focus()):!n.shiftKey&&l===c&&(n.preventDefault(),h.focus())}})))}_getFocusables(){let t=this.getPrivate("content").querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex^='-'])");return Array.prototype.filter.call(t,e=>e.offsetWidth>0||e.offsetHeight>0)}_updateLabel(){let t=this.getPrivate("wrapper"),e=this.get("ariaLabel");if(t.removeAttribute("aria-label"),t.removeAttribute("aria-labelledby"),e)t.setAttribute("aria-label",e);else{let i=this.getPrivate("content").querySelector("h1, h2, h3, h4, h5, h6");i&&(i.id||(i.id="am5-modal-title-"+this.uid),t.setAttribute("aria-labelledby",i.id))}}_restoreFocus(){let t=this._opener;this._opener=void 0;let e=document.activeElement;t&&t.focus&&document.contains(t)&&(!e||e===document.body||ur(this.getPrivate("container"),e))&&t.focus()}_beforeChanged(){super._beforeChanged(),this.isDirty("content")&&(this.getPrivate("content").innerHTML=this._root._sanitizeHTML(this.get("content",""))),(this.isDirty("content")||this.isDirty("ariaLabel"))&&this._updateLabel()}isOpen(){return this.getPrivate("container").style.display!="none"}open(){this.isOpen()||(this._opener=document.activeElement),this.getPrivate("container").style.display="block",this._updateLabel();let t=this._getFocusables();(t.length?t[0]:this.getPrivate("wrapper")).focus(),this.get("deactivateRoot")&&this.setTimeout(()=>{this._root._renderer.interactionsEnabled=!1},10),this.events.dispatch("opened",{type:"opened",target:this})}close(){this.getPrivate("container").style.display="none",this._restoreFocus(),this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("closed",{type:"closed",target:this})}cancel(){this.getPrivate("container").style.display="none",this._restoreFocus(),this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("cancelled",{type:"cancelled",target:this})}_dispose(){super._dispose();let t=this.getPrivate("container");t.parentElement&&t.parentElement.removeChild(t)}};De.className="Modal";De.classNames=B.classNames.concat([De.className]);var Ee=class extends B{_moving(){let t=this._animatingSettings;return!!(t.locationX||t.locationY)}_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){let t=this.get("sprite");t&&(t._setC("position","absolute"),t.get("role")==null&&t._setC("role","figure"),this._disposers.push(t))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}};Ee.className="Bullet";Ee.classNames=B.classNames.concat([Ee.className]);var $e=class extends ie{_afterNew(){super._afterNew(),this.addTag("confirm"),Ct("keyboardevents")&&this._disposers.push(F(document,"keydown",t=>{let e=$t(t);this.get("active")&&e=="Escape"&&this._cancel()})),this._disposers.push(F(document,"click",()=>{this._ignoreClick||this._cancel(),this._ignoreClick=!1})),this.events.on("click",()=>{this.get("active")||(this._ignoreClick=!0),this._confirm()})}_cancel(){this.get("active")&&(this.events.dispatch("cancelled",{type:"cancelled",target:this}),this.set("active",!1))}_confirm(){this.get("active")&&(this.events.dispatch("confirmed",{type:"confirmed",target:this}),this.set("active",!1),this.isFocus()&&this.setTimeout(()=>{this.set("active",!1),lr()},10))}_prepareChildren(){super._prepareChildren()}};$e.className="ConfirmButton";$e.classNames=ie.classNames.concat([$e.className]);var le=class extends R{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),this.isDirty("radius")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawCircle(0,0,Math.abs(this.get("radius",10)))}};le.className="Circle";le.classNames=R.classNames.concat([le.className]);var Pe=class extends R{_beforeChanged(){if(super._beforeChanged(),this.isDirty("coordinates")){let t=[],e=this.get("coordinates");e&&w(e,i=>{t.push({x:i[0],y:i[1]})}),this.set("points",t)}if(this.isPrivateDirty("points")&&(this._clear=!0),this.isDirty("points")){this._clear=!0;let t=this.get("points"),e=this._prevSettings.points;if(e){if(t){let a=pe(t),h=pe(e),c=a.length,l=h.length;if(c>l){let d=pe(a);for(let u=0;u<c;u++){let f=Math.floor(u/c*l);d[u]={x:h[f].x,y:h[f].y}}h=d}else if(l>c){let d=pe(h);for(let u=0;u<l;u++){let f=Math.floor(u/l*c);d[u]={x:a[f].x,y:a[f].y}}a=d}this.setPrivateRaw("previousPoints",h),this.setPrivateRaw("points",a),this.morphAnimation=this.animatePrivate({key:"morphProgress",from:0,to:1,duration:this.get("animationDuration",0),easing:this.get("animationEasing")}),this._root.events.once("frameended",()=>{this._markDirtyPrivateKey("morphProgress")})}}else this.setPrivateRaw("previousPoints",t),this.setPrivateRaw("points",t);let i=1/0,s=-1/0,r=1/0,n=-1/0;if(t)for(let a=0,h=t.length;a<h;a++){let c=t[a];i=Math.min(i,c.x),s=Math.max(s,c.x),r=Math.min(r,c.y),n=Math.max(n,c.y)}this.setPrivate("minX",i),this.setPrivate("maxX",s),this.setPrivate("minY",r),this.setPrivate("maxY",n)}this.isPrivateDirty("morphProgress")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._draw()}_draw(){let t=this.getPrivate("previousPoints"),e=this.getPrivate("points"),i=this.getPrivate("morphProgress",1);if(e&&t){let s=e[0],r=t[0];s&&this._display.moveTo(r.x+(s.x-r.x)*i,r.y+(s.y-r.y)*i);for(let n=1,a=e.length;n<a;n++){let h=e[n],c=t[n];this._display.lineTo(c.x+(h.x-c.x)*i,c.y+(h.y-c.y)*i)}this._display.closePath()}}_updateSize(){this.markDirty(),this._clear=!0}};Pe.className="Polygon";Pe.classNames=R.classNames.concat([Pe.className]);var Ae=class extends R{_beforeChanged(){super._beforeChanged(),(this.isDirty("radiusX")||this.isDirty("radiusY")||this.isDirty("rotation"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawEllipse(0,0,Math.abs(this.get("radiusX")),Math.abs(this.get("radiusY")))}};Ae.className="Ellipse";Ae.classNames=R.classNames.concat([Ae.className]);var Le=class extends R{_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("spikes"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let t=this._display,e=this.get("radius",0),i=Pt(this.get("innerRadius",0),e),s=this.get("spikes",0),r=Math.PI/s,n=Math.PI/2*3;t.moveTo(0,-e);for(let a=0;a<s;a++)t.lineTo(Math.cos(n)*e,Math.sin(n)*e),n+=r,t.lineTo(Math.cos(n)*i,Math.sin(n)*i),n+=r;t.lineTo(0,-e),t.closePath()}}};Le.className="Star";Le.classNames=R.classNames.concat([Le.className]);var Nt=class extends E{constructor(){super(...arguments),this._movePoints={},this._downScale=1,this._downX=0,this._downY=0,this.contents=this.children.push(E.new(this._root,{width:O,height:O,x:0,y:0,draggable:!0,background:Yt.new(this._root,{fill:ct(16777215),fillOpacity:0})}))}_afterNew(){super._afterNew();let t=this.contents.events;this._disposers.push(t.on("pointerdown",s=>{this._handleThisDown(s)})),this._disposers.push(t.on("globalpointerup",s=>{this._handleThisUp(s)})),this._disposers.push(t.on("globalpointermove",s=>{this._handleThisMove(s)}));let e=this.contents.get("background");e&&(e.adapters.add("width",s=>Number(s)*20),e.adapters.add("height",s=>Number(s)*20),e.adapters.add("x",s=>Number(s)-e.width()/2),e.adapters.add("y",s=>Number(s)-e.height()/2));let i=this.contents;i.adapters.add("x",s=>{let r=i.get("scale",1);if(N(s)&&r>=1){let n=this.get("maxPanOut",.4),a=i.width();s=Math.min(a*n,s),s=Math.max(this.width()-a*r*(1+n),s)}return s}),i.adapters.add("y",s=>{let r=i.get("scale",1);if(N(s)&&r>=1){let n=this.get("maxPanOut",.4),a=i.height();s=Math.min(a*n,s),s=Math.max(this.height()-a*r*(1+n),s)}return s})}_prepareChildren(){super._prepareChildren(),this.isDirty("wheelable")&&this._handleSetWheel(),this.contents._display.cancelTouch=this.get("pinchZoom",!1)}_handleSetWheel(){this.get("wheelable")?(this._wheelDp&&this._wheelDp.dispose(),this._wheelDp=this.events.on("wheel",t=>{let e=t.originalEvent;if(fr(e,this))e.preventDefault();else return;let i=this.toLocal(t.point);this._handleWheelZoom(e.deltaY,i)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_handleWheelZoom(t,e){let i=this.get("zoomStep",2),s=this.contents.get("scale",1),r=s;t>0?r=s/i:t<0&&(r=s*i),r!=s&&this.zoomToPoint(e,r)}zoomToPoint(t,e){e&&(e=rt(e,this.get("minZoomLevel",1),this.get("maxZoomLevel",32)));let i=this.contents.get("scale",1),s=t.x,r=t.y,n=s,a=r,h=this.contents,c=h.x(),l=h.y(),d=n-(s-c)/i*e,u=a-(r-l)/i*e;return this._animateTo(d,u,e),this._za}zoomIn(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)*this.get("zoomStep",2))}zoomOut(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)/this.get("zoomStep",2))}goHome(){return this._animateTo(0,0,1)}_animateTo(t,e,i){let s=this.get("animationDuration",0),r=this.get("animationEasing"),n=this.contents;this._txa=n.animate({key:"x",to:t,duration:s,easing:r}),this._tya=n.animate({key:"y",to:e,duration:s,easing:r}),this._za=n.animate({key:"scale",to:i,duration:s,easing:r})}_handleThisUp(t){this._downPoints={}}_handleThisDown(t){let e=this.contents;this._downScale=e.get("scale",1);let i=e._downPoints,s=Ji(i).length;if(s==1){let r=i[1];r||(r=i[0]),r&&r.x==t.point.x&&r.y==t.point.y&&(s=0)}if(s>0){this._downX=e.x(),this._downY=e.y();let r=e._getDownPointId();if(r){let n=this._movePoints[r];n&&(e._downPoints[r]=n)}}}_handleThisMove(t){let i=t.originalEvent.pointerId;if(this.get("pinchZoom")&&i&&(this._movePoints[i]=t.point,Ji(this.contents._downPoints).length>1)){this._handlePinch();return}}_handlePinch(){let t=0,e=[],i=[];if(V(this.contents._downPoints,(s,r)=>{e[t]=r;let n=this._movePoints[s];n&&(i[t]=n),t++}),e.length>1&&i.length>1){this.contents._isDragging=!1;let s=e[0],r=e[1],n=i[0],a=i[1];if(s&&r&&n&&a){s=this.toLocal(s),r=this.toLocal(r),n=this.toLocal(n),a=this.toLocal(a);let h=Math.hypot(r.x-s.x,r.y-s.y),l=Math.hypot(a.x-n.x,a.y-n.y)/h*this._downScale,d={x:n.x+(a.x-n.x)/2,y:n.y+(a.y-n.y)/2},u={x:s.x+(r.x-s.x)/2,y:s.y+(r.y-s.y)/2},f=this._downX||0,m=this._downY||0,_=this._downScale,p=d.x-(-f+u.x)/_*l,y=d.y-(-m+u.y)/_*l;this.contents.setAll({x:p,y,scale:l})}}}};Nt.className="ZoomableContainer";Nt.classNames=E.classNames.concat([Nt.className]);var bt=class extends B{_afterNew(){super._afterNewApplyThemes()}getFill(t){return{addColorStop:(e,i)=>{}}}_changed(){super._changed()}getBounds(t){let e=this.get("target");if(e){let i=e.globalBounds(),s=t.toLocal({x:i.left,y:i.top}),r=t.toLocal({x:i.right,y:i.top}),n=t.toLocal({x:i.right,y:i.bottom}),a=t.toLocal({x:i.left,y:i.bottom});return{left:Math.min(s.x,r.x,n.x,a.x),top:Math.min(s.y,r.y,n.y,a.y),right:Math.max(s.x,r.x,n.x,a.x),bottom:Math.max(s.y,r.y,n.y,a.y)}}return t._display.getLocalBounds()}};bt.className="Gradient";bt.classNames=B.classNames.concat([bt.className]);var qt=class extends bt{getFill(t){let e=this.get("rotation",0),i=this.getBounds(t),s=i.left||0,r=i.right||0,n=i.top||0,a=i.bottom||0,h=j(e),c=U(e),l=h<0?r:s,d=c<0?a:n,u=Math.abs(h)*(r-s),f=Math.abs(c)*(a-n);u==0&&(u=1),f==0&&(f=1);let m=Math.max(u,f),_=this._root._renderer.createLinearGradient(l,d,l+m*h,d+m*c),p=this.get("stops");if(p){let y=0;w(p,g=>{let b=g.offset;N(b)||(b=y/(p.length-1));let x=g.opacity;N(x)||(x=1);let v=g.color;if(v){let M=g.lighten;M&&(v=L.lighten(v,M));let C=g.brighten;C&&(v=L.brighten(v,C)),_.addColorStop(b,"rgba("+v.r+","+v.g+","+v.b+","+x+")")}y++})}return _}};qt.className="LinearGradient";qt.classNames=bt.classNames.concat([qt.className]);var Fe=class extends E{constructor(){super(...arguments),this.labelContainer=this.children.push(E.new(this._root,{})),this.markerContainer=this.children.push(E.new(this._root,{})),this.startLabel=this.labelContainer.children.push(Mt.new(this._root,{themeTags:["start"]})),this.endLabel=this.labelContainer.children.push(Mt.new(this._root,{themeTags:["end"]})),this.markers=this.addDisposer(new It(Wt.new({}),()=>Vt._new(this._root,{themeTags:st(this.markers.template.get("themeTags",[]),[this.get("orientation"),"heatlegend","marker"])},[this.markers.template])))}_afterNew(){this._settings.themeTags=st(this._settings.themeTags,["heatlegend",this._settings.orientation]),super._afterNew(),this._setC("tooltip",St.new(this._root,{themeTags:["heatlegend"]}))}makeMarker(){let t=this.markers.make();return t.states.create("disabled",{}),t}showValue(t,e,i){let s=this.getTooltip();if(s&&N(t)){let r=this.get("startValue",0),n=this.get("endValue",1),a=(t-r)/(n-r);(a==1/0||a==-1/0||isNaN(a))&&(a=.5);let h=this.get("startColor"),c=this.get("endColor"),l=this.get("colors");e||(e=this.getNumberFormatter().format(t)),i||(l&&l.length?i=L.interpolateColors(a,l):h&&c&&(i=L.interpolate(a,h,c))),s.label.set("text",e);let d;this.get("orientation")=="vertical"?d=this.markerContainer.toGlobal({x:0,y:this.innerHeight()*(1-a)}):d=this.markerContainer.toGlobal({x:this.innerWidth()*a,y:0});let u=s.get("background");u&&i&&u.set("fill",i),s.set("pointTo",d),s.show()}}_colorMarkers(t,e,i,s){let r=this.get("orientation"),n=Math.max(1,t.length-1);if(e)w(t,(a,h)=>{let c=this.makeMarker();r=="vertical"?this.markerContainer.children.moveValue(c,0):this.markerContainer.children.push(c),c._setCAll({fill:a,fillOpacity:lt(h/n*100).interpolate(i,s)})});else{let a=this.makeMarker();this.markerContainer.children.push(a);let h=wi(t,(c,l)=>({color:c,opacity:lt(l/n*100).interpolate(i,s),offset:0}));r=="vertical"&&h.reverse(),w(h,(c,l)=>{c.offset=l/n}),a._setC("fillGradient",qt.new(this._root,{stops:h,rotation:r=="vertical"?90:0}))}}_prepareChildren(){super._prepareChildren();let t=this.labelContainer,e=this.get("orientation"),i=this.startLabel,s=this.endLabel,r=this.getTooltip();if(this.isDirty("orientation")&&(e=="vertical"?(this.markerContainer._setCAll({layout:this._root.verticalLayout,height:O}),this._setC("layout",this._root.horizontalLayout),i._setCAll({y:O,x:void 0,centerY:O,centerX:O}),s._setCAll({y:0,x:void 0,centerY:0,centerX:O}),t._setCAll({height:O,width:void 0}),r&&r._setC("pointerOrientation","horizontal")):(this.markerContainer._setCAll({layout:this._root.horizontalLayout,width:O}),this._setC("layout",this._root.verticalLayout),i._setCAll({x:0,y:void 0,centerX:0,centerY:0}),s._setCAll({x:O,y:void 0,centerX:O,centerY:0}),t._setCAll({width:O,height:void 0}),r&&r._setC("pointerOrientation","vertical"))),this.isDirty("stepCount")||this.isDirty("startColor")||this.isDirty("endColor")||this.isDirty("colors")||this.isDirty("startOpacity")||this.isDirty("endOpacity")||this.isDirty("orientation")){let n=this.get("stepCount",1),a=this.get("startColor"),h=this.get("endColor"),c=this.get("colors"),l=this.get("startOpacity",1),d=this.get("endOpacity",1);if(this.markerContainer.children.clear(),c&&c.length)n>=1&&this._colorMarkers(c,n>1,l,d);else if(n>1)for(let u=0;u<n;u++){let f=this.makeMarker();e=="vertical"?this.markerContainer.children.moveValue(f,0):this.markerContainer.children.push(f),a&&h&&f._setCAll({fill:L.interpolate(u/n,a,h),fillOpacity:lt(u/n*100).interpolate(l,d)})}else if(n==1){let u=this.makeMarker();this.markerContainer.children.push(u);let f=qt.new(this._root,{stops:[{color:a,opacity:l},{color:h,opacity:d}]});if(e=="vertical"){f.set("rotation",90);let m=f.get("stops");m&&m.reverse()}else f.set("rotation",0);a&&h&&u._setC("fillGradient",f)}}(this.isDirty("startText")||this.isDirty("startValue"))&&i._setC("text",this.get("startText",this.getNumberFormatter().format(this.get("startValue",0)))),(this.isDirty("endText")||this.isDirty("endValue"))&&s._setC("text",this.get("endText",this.getNumberFormatter().format(this.get("endValue",1))))}};Fe.className="HeatLegend";Fe.classNames=E.classNames.concat([Fe.className]);var Ne=class extends $i{constructor(){super(...arguments),this._fitOn=!1,this._fitted=!1,this._labelWidths={},this.itemContainers=this.addDisposer(new It(Wt.new({}),()=>E._new(this._root,{themeTags:st(this.itemContainers.template.get("themeTags",[]),["legend","item"]),themeTagsSelf:st(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"]),background:Vt.new(this._root,{themeTags:st(this.itemContainers.template.get("themeTags",[]),["legend","item","background"]),themeTagsSelf:st(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"])})},[this.itemContainers.template]))),this.markers=this.addDisposer(new It(Wt.new({}),()=>E._new(this._root,{themeTags:st(this.markers.template.get("themeTags",[]),["legend","marker"])},[this.markers.template]))),this.labels=this.addDisposer(new It(Wt.new({}),()=>Mt._new(this._root,{themeTags:st(this.labels.template.get("themeTags",[]),["legend","label"])},[this.labels.template]))),this.valueLabels=this.addDisposer(new It(Wt.new({}),()=>Mt._new(this._root,{themeTags:st(this.valueLabels.template.get("themeTags",[]),["legend","label","value"])},[this.valueLabels.template]))),this.markerRectangles=this.addDisposer(new It(Wt.new({}),()=>Vt._new(this._root,{themeTags:st(this.markerRectangles.template.get("themeTags",[]),["legend","marker","rectangle"])},[this.markerRectangles.template])))}_afterNew(){this._settings.themeTags=st(this._settings.themeTags,["legend"]),this.fields.push("name","stroke","fill"),super._afterNew()}_beforeChanged(){super._beforeChanged(),this.get("autoFit")&&!this._fitOn&&(this._fitOn=!0,this._disposers.push(this._root.events.on("frameended",()=>{let t=this.get("autoFit",!1),e=this.parent;(t||this._fitted)&&e&&this._passDue([this],[e.innerWidth(),e.innerHeight(),this._contentWidth,this._contentHeight,this._root.width(),this._root.height(),this._root._fontLoads].join())&&(this._fitted=t,this._fitItems(t))})))}_fitBulletLabels(){}_dispose(){let t=this._fitScrollbar;t&&!t.isDisposed()&&t.dispose(),super._dispose()}_fitItems(t){let e=this.parent;if(this.isDisposed()||!e)return;if(t){if(!this.get("visible")||this.get("forceHidden")&&!this.isComputedSetting("forceHidden"))return;if(this.isShowing()||this.isHiding()){this.markDirty();return}}let i=e.get("layout")instanceof Ce,s=T=>{let S=e;for(;S.parent&&S.get(T)==null&&S.getPrivate(T)==null;)S=S.parent;return T=="width"?S.innerWidth():S.innerHeight()},r=T=>N(this.get(T))&&!this.isComputedSetting(T),n=t&&i&&!r("width")&&!r("maxWidth")?s("width")*.4:void 0;n==null&&Xt(this,"maxWidth",void 0);let a=n||this.maxWidth(),h=this.get("maxHeight"),c=Math.min(r("height")?this.height():i?e.innerHeight():s("height")*.3,N(h)?h:1/0);if(!(a>0&&c>0))return;let l=.75,d=40,u=this.get("paddingLeft",0)+this.get("paddingRight",0),f=this.get("layout")instanceof Ce,m=0,_={},p=[],y=0;w(this.dataItems,T=>{let S=T.get("itemContainer");if(!S||S.isDisposed()||!S.isVisible())return;y||(y=S.height()+S.get("marginTop",0)+S.get("marginBottom",0));let D=S.get("marginLeft",0)+S.get("marginRight",0),k=S.width(),$=T.get("valueLabel"),P=T.dataContext,z=P&&P.component?P.component:P;$&&!$.isDisposed()&&Xt($,"forceHidden",t&&!$.get("text")&&!(z&&z.get&&(z.get("legendValueText")||z.get("legendRangeValueText")))?!0:void 0);let A=T.get("label");if(A&&!A.isDisposed()){let G=A.text._getText(),q=Pr(A),H=this._labelWidths[A.uid];A.isComputedSetting("maxWidth")?H&&H.font!==q&&(H=void 0):H={text:G,width:A.width(),font:q},H&&(_[A.uid]=H,H.text==G&&(k+=H.width-A.width())),p.push({label:A,item:S,text:G,known:H,margins:D})}m=f?m+k+D:Math.max(m,k+D)}),this._labelWidths=_,m+=u;let g=this._contentHeight,b=t&&g*l>c+.5&&(this.get("verticalScrollbar")==null||this.isComputedSetting("verticalScrollbar")),x=Math.max(l,Math.min(1,n!=null||f?a/m:1)),v=Math.max(l,Math.min(x,c/(b?y:g)));n!=null&&Xt(this,"maxWidth",n/x,.5);let M=(n!=null?n/x:a)-u,C=!1;w(p,T=>{let S=M-(T.item.width()-T.label.width())-T.margins,D=t&&T.known!=null&&T.known.text==T.text&&T.known.width>S+.5;D&&S<d&&(C=!0),Xt(T.label,"maxWidth",D?Math.max(S,d):void 0,.5),Xt(T.label,"oversizedBehavior",D?"truncate":void 0)}),Xt(this,"forceHidden",t&&(C||y*l>c+.5||f&&m*l>a+1)?!0:void 0),Xt(this,"scale",t&&v<.995?v:void 0),Xt(this,"height",b?c/v:void 0,.5),b?(this._fitScrollbar||(this._fitScrollbar=Te.new(this._root,{orientation:"vertical",marginLeft:4,marginRight:0})._markC("orientation","marginLeft","marginRight")),this.get("verticalScrollbar")!==this._fitScrollbar&&this._setC("verticalScrollbar",this._fitScrollbar)):this.isComputedSetting("verticalScrollbar")&&this.remove("verticalScrollbar")}makeItemContainer(t){let e=this.children.push(this.itemContainers.make());return e._setDataItem(t),this.itemContainers.push(e),e.states.create("disabled",{}),e}makeMarker(){let t=this.markers.make();return this.markers.push(t),t.states.create("disabled",{}),t}makeLabel(){let t=this.labels.make();return t.states.create("disabled",{}),t}makeValueLabel(){let t=this.valueLabels.make();return t.states.create("disabled",{}),t}makeMarkerRectangle(){let t=this.markerRectangles.make();return t.states.create("disabled",{}),t}processDataItem(t){super.processDataItem(t);let e=this.makeItemContainer(t),i=this.get("nameField"),s=this.get("fillField"),r=this.get("strokeField");if(e){let n=this.get("clickTarget","itemContainer"),a=t.dataContext;a&&a.set&&a.set("legendDataItem",t),e._setDataItem(t),t.set("itemContainer",e);let h=this.makeMarker();if(h){e.children.push(h),h._setDataItem(t),t.set("marker",h);let d=this.get("useDefaultMarker"),u=h.children.push(this.makeMarkerRectangle()),f=t.get("fill"),m=t.get("stroke");t.set("markerRectangle",u),a&&a.get&&(f=a.get(s,f),m=a.get(r,m)),m||(m=f),d?a&&a.on&&(a.on(s,()=>{u._setC("fill",a.get(s))}),a.on(r,()=>{u._setC("stroke",a.get(r))})):a&&a.createLegendMarker&&a.createLegendMarker(),u._setCAll({fill:f,stroke:m});let _=a&&a.component;_&&_.updateLegendMarker&&_.updateLegendMarker(a)}let c=this.makeLabel();if(c){e.children.push(c),c._setDataItem(t),t.set("label",c),c.text.on("text",()=>{e.setRaw("ariaLabel",c.text._getText()+(this.get("clickTarget")!=="none"?"; "+this._t("Press ENTER to toggle"):"")),e.markDirtyAccessibility()}),a&&a.get&&t.set("name",a.get(i));let d=t.get("name");d&&c.set("text",d)}let l=this.makeValueLabel();if(l&&(e.children.push(l),l._setDataItem(t),t.set("valueLabel",l)),a&&a.show&&(a.on("visible",d=>{e.set("disabled",!d)}),a.get("visible")||e.set("disabled",!0),n!="none")){let d=e;n=="marker"&&(d=h,e.events.on("click",u=>{u.simulated&&h.events.dispatch("click",Object.assign(Object.assign({},u),{target:h}))})),this._addClickEvents(d,a,t)}this.children.values.sort((d,u)=>{let f=d.dataItem?d.dataItem.dataContext:void 0,m=u.dataItem?u.dataItem.dataContext:void 0;if(f&&m){let _=this.data.indexOf(f),p=this.data.indexOf(m);if(_>p)return 1;if(_<p)return-1}return 0}),a&&a.updateLegendValue&&a.updateLegendValue()}}_addClickEvents(t,e,i){t.set("cursorOverStyle","pointer"),t.events.on("pointerover",()=>{let s=e.component;s&&s.hoverDataItem&&s.hoverDataItem(e)}),t.events.on("pointerout",()=>{let s=e.component;s&&s.hoverDataItem&&s.unhoverDataItem(e)}),t.events.on("click",()=>{let s=i.get("label").text._getText();e.show&&e.isHidden&&(e.isHidden()||e.get("visible")===!1)?(e.show(),t.set("disabled",!1),this._root.readerAlert(this._t("%1 shown",this._root.locale,s))):e.hide&&(e.hide(),t.set("disabled",!0),this._root.readerAlert(this._t("%1 hidden",this._root.locale,s)))})}disposeDataItem(t){super.disposeDataItem(t);let e=t.dataContext;e&&e.get&&e.get("legendDataItem")==t&&e.set("legendDataItem",void 0);let i=t.get("itemContainer");i&&(this.itemContainers.removeValue(i),i.dispose());let s=t.get("marker");s&&(this.markers.removeValue(s),s.dispose());let r=t.get("markerRectangle");r&&(this.markerRectangles.removeValue(r),r.dispose());let n=t.get("label");n&&(this.labels.removeValue(n),n.dispose());let a=t.get("valueLabel");a&&(this.valueLabels.removeValue(a),a.dispose())}};Ne.className="Legend";Ne.classNames=$i.classNames.concat([Ne.className]);var vt=class extends R{_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let t=this.width(),e=this.height(),i=this._display;i.moveTo(-t/2,e/2),i.lineTo(0,-e/2),i.lineTo(t/2,e/2),i.lineTo(-t/2,e/2),i.closePath()}_updateSize(){this.markDirty(),this._clear=!0}};vt.className="Triangle";vt.classNames=R.classNames.concat([vt.className]);var Bt=class o extends R{_beforeChanged(){super._beforeChanged(),this.isDirty("points")&&(this._clear=!0)}static makeOrthogonal(t){if(t.length>1){let e=[];for(let i=0;i<t.length-1;i++){let s=t[i],r=t[i+1];e.push(s),s.x!==r.x&&s.y!==r.y&&e.push({x:r.x,y:s.y})}e.push(t[t.length-1]),t=e}return t}_changed(){if(super._changed(),this._clear){let t=this._display,e=this.get("points",[]);if(e.length===0)return;e=o.makeOrthogonal(e),t.moveTo(e[0].x,e[0].y);for(let i=1;i<e.length;i++){let s=this.get("cornerRadius",0),r=e[i-1],n=e[i],a=e[i+1],h=n.y===r.y&&n.x!==r.x,c=n.x===r.x&&n.y!==r.y,l=a&&(h&&a.y!==n.y||c&&a.x!==n.x);if(s>0&&a&&l){if(c){s=Math.min(s,Math.abs(n.x-a.x)/2,Math.abs(n.y-r.y)/2);let d=Math.sign(n.y-r.y);t.lineTo(n.x,n.y-s*d);let u=a.x<n.x?-1:1;t.arcTo(n.x,n.y,n.x+s*u,n.y,s)}else if(h){s=Math.min(s,Math.abs(n.y-a.y)/2,Math.abs(n.x-r.x)/2);let d=Math.sign(n.x-r.x);t.lineTo(n.x-s*d,n.y);let u=a.y<n.y?-1:1;t.arcTo(n.x,n.y,n.x,n.y+s*u,s)}}else t.lineTo(n.x,n.y)}}}};Bt.className="OrthogonalLine";Bt.classNames=R.classNames.concat([Bt.className]);var Be=class extends E{constructor(){super(...arguments),this.line=this.children.push(Bt.new(this._root,{themeTags:["line"]})),this.hitLine=this.children.push(Bt.new(this._root,{themeTags:["hit"]})),this.startArrow=this.children.push(vt.new(this._root,{themeTags:["start","arrow"]})),this.endArrow=this.children.push(vt.new(this._root,{themeTags:["end","arrow"]}))}_afterNew(){this.addTag("link"),super._afterNew()}_updateChildren(){if(super._updateChildren(),this.isDirty("points")){let t=Bt.makeOrthogonal(this.get("points",[]));this.line.set("points",t),this.hitLine.set("points",t);let e=this.startArrow,i=this.endArrow,s=t.length;if(s>1){let[r,n]=t;e.setAll({x:r.x,y:r.y,rotation:ni(r,n)-90});let a=t[s-1],h=t[s-2];i.setAll({x:a.x,y:a.y,rotation:ni(h,a)+90})}else if(s===1){let[r]=t;e.setAll({x:r.x,y:r.y,rotation:0}),i.setAll({x:r.x,y:r.y,rotation:0})}}}};Be.className="Link";Be.classNames=E.classNames.concat([Be.className]);var Re=class extends Ti{constructor(){super(...arguments),this._display=this._root._renderer.makePicture(void 0)}_changed(){if(super._changed(),this.isDirty("width")){let t=this.get("width");this._display.width=N(t)?t:void 0}if(this.isDirty("height")){let t=this.get("height");this._display.height=N(t)?t:void 0}if(this.isDirty("shadowColor")){let t=this.get("shadowColor");this._display.shadowColor=t??void 0}this.isDirty("shadowBlur")&&(this._display.shadowBlur=this.get("shadowBlur")),this.isDirty("shadowOffsetX")&&(this._display.shadowOffsetX=this.get("shadowOffsetX")),this.isDirty("shadowOffsetY")&&(this._display.shadowOffsetY=this.get("shadowOffsetY")),this.isDirty("shadowOpacity")&&(this._display.shadowOpacity=this.get("shadowOpacity")),(this.isDirty("src")||this.isDirty("cors"))&&(this._display.clear(),this._load())}_load(){let t=this.get("src");if(t){let e=new Image;e.crossOrigin=this.get("cors","anonymous"),e.src=t;let i=this.events;e.decode().then(()=>{this._display.image=e,this._updateSize(),!i.isDisposed()&&i.isEnabled("loaded")&&i.dispatch("loaded",{type:"loaded",target:this})}).catch(s=>{!i.isDisposed()&&i.isEnabled("loaderror")&&i.dispatch("loaderror",{type:"loaderror",target:this})})}}_updateSize(){super._updateSize();let t=this._display.image;if(t){let e=this.getPrivate("width",this.get("width")),i=this.getPrivate("height",this.get("height")),s=t.width&&t.height?t.width/t.height:0;N(e)&&N(i)?(this._display.width=e,this._display.height=i):N(e)&&s?i=e/s:N(i)&&s?e=i*s:(e=t.width,i=t.height),N(e)&&(this._display.width=e),N(i)&&(this._display.height=i),this.markDirtyBounds(),this.markDirty()}}};Re.className="Picture";Re.classNames=Ti.classNames.concat([Re.className]);var ze=class extends Te{_afterNew(){this._addOrientationClass(),super._afterNew(),this.endGrip.setPrivate("visible",!1),this.thumb.setPrivate("visible",!1)}updateGrips(){super.updateGrips();let t=this.startGrip;this.endGrip.setAll({x:t.x(),y:t.y()}),this.setRaw("end",this.get("start"))}};ze.className="Slider";ze.classNames=Te.classNames.concat([ze.className]);var Oe=class extends Ai{constructor(){super(...arguments),this.zoomableContainer=Nt.new(this._root,{width:O,height:O,isMeasured:!1})._markC("width","height","isMeasured")}_afterNew(){super._afterNew(),this.addTag("serialchartcontainer"),this.zoomableContainer.contents.children.push(this.seriesContainer),this.zoomableContainer.contents.children.push(this.bulletsContainer),this.chartContainer.children.push(this.zoomableContainer)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("zoomTools")){let t=this._prevSettings.zoomTools,e=this.get("zoomTools");e!==t&&(t&&t.dispose(),e&&(e.set("target",this.zoomableContainer),this.children.push(e)),this._prevSettings.zoomTools=e)}}};Oe.className="SerialChartContainer";Oe.classNames=Ai.classNames.concat([Oe.className]);var He=class extends E{constructor(){super(...arguments),this.homeButton=this.children.push(ie.new(this._root,{width:35,height:35,themeTags:["home"]})._markC("width","height","themeTags")),this.plusButton=this.children.push(ie.new(this._root,{width:35,height:35,themeTags:["plus"]})._markC("width","height","themeTags")),this.minusButton=this.children.push(ie.new(this._root,{width:35,height:35,themeTags:["minus"]})._markC("width","height","themeTags"))}_afterNew(){super._afterNew(),this._setC("position","absolute"),this._setC("layout",this._root.verticalLayout),this.addTag("zoomtools"),this.plusButton._setCAll({icon:R.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.minusButton._setCAll({icon:R.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.homeButton._setCAll({icon:R.new(this._root,{themeTags:["icon"]}),layout:void 0})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("target")){let t=this.get("target");this._disposer&&(this._disposer.dispose(),this._disposer=void 0),this._targetDisposer&&(this._targetDisposer.dispose(),this._targetDisposer=void 0),t&&(t instanceof Nt&&(this._targetDisposer=this.addDisposer(t.contents.on("scale",e=>{e==t.get("minZoomLevel")?this.minusButton._setC("disabled",!0):this.minusButton._setC("disabled",!1),e==t.get("maxZoomLevel")?this.plusButton._setC("disabled",!0):this.plusButton._setC("disabled",!1)})),this.root.events.once("frameended",()=>{t.contents.get("scale",1)==t.get("minZoomLevel")&&this.minusButton._setC("disabled",!0)})),this._disposer=new yt([this.plusButton.events.on("click",()=>{t.zoomIn()}),this.minusButton.events.on("click",()=>{t.zoomOut()}),this.homeButton.events.on("click",()=>{t.goHome()})]))}}};He.className="ZoomTools";He.classNames=E.classNames.concat([He.className]);var Ie=class extends W{constructor(){super(...arguments),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this._clearGrain=!1}_beforeChanged(){let t=this.get("width",200),e=this.get("height",200);this.canvas.width!==t&&(this.canvas.width=t),this.canvas.height!==e&&(this.canvas.height=e),(this.isDirty("size")||this.isDirty("density")||this.isDirty("minOpacity")||this.isDirty("maxOpacity")||this.isDirty("colors")||this.isDirty("horizontalGap")||this.isDirty("verticalGap"))&&(this._clearGrain=!0),super._beforeChanged()}_changed(){let t=this._clear;if(super._changed(),this._clearGrain||t){let e=this.get("width",200),i=this.get("height",200),s=this.context.createImageData(e,i),r=Math.max(1,this.get("size",1)),n=this.get("minOpacity",0),a=this.get("maxOpacity",.3),h=this.get("colors",[this.get("color",L.fromHex(0))]),c=e/r,l=i/r,d=this.get("density",1),u=this.get("horizontalGap",0)+1,f=this.get("verticalGap",0)+1,m=h.length,_=a-n,p=new Array(m),y=new Array(m),g=new Array(m);for(let C=0;C<m;C++)p[C]=h[C].r,y[C]=h[C].g,g[C]=h[C].b;let b=new Uint32Array(s.data.buffer),x=d>=1,v=u>1?u:0,M=f>1?f:0;for(let C=0;C<l;C++)if(!(M&&C%M!==0)){for(let T=0;T<c;T++)if(!(v&&T%v!==0)&&(x||Math.random()<d)){let S=m>1?Math.random()*m|0:0,D=(n+Math.random()*_)*255|0,k=(p[S]|y[S]<<8|g[S]<<16|D<<24)>>>0;r===1?b[C*e+T]=k:this._setRectData(T,C,r,e,b,k)}}this.context.putImageData(s,0,0),this._pattern=this._root._renderer.createRasterPattern(this.canvas,"repeat")}this._clearGrain=!1}_checkDirtyFill(){return!1}_setRectData(t,e,i,s,r,n){let a=t*i,h=e*i,c=a+i,l=h+i;for(var d=h;d<l;d++){let f=d*s+a;for(var u=a;u<c;u++)r[f]=n,f++}}};Ie.className="GrainPattern";Ie.classNames=W.classNames.concat([Ie.className]);var Ge=class extends bt{getFill(t){let e=this.getBounds(t),i=0,s=0,r=e.left||0,n=e.right||0,a=e.top||0,h=e.bottom||0,c=n-r,l=h-a,d=t.get("radius");N(d)?(r=0,a=0):(d=Math.min(c,l)/2,i=r+c/2,s=a+l/2);let u=this.get("x"),f=this.get("y");u!=null&&(i=N(u)?u:r+Pt(u,c)),f!=null&&(s=N(f)?f:a+Pt(f,l));let m=this._root._renderer.createRadialGradient(i,s,0,i,s,d),_=this.get("stops");if(_){let p=0;w(_,y=>{let g=y.offset;N(g)||(g=p/(_.length-1));let b=y.opacity;N(b)||(b=1);let x=y.color;if(x){let v=y.lighten;v&&(x=L.lighten(x,v));let M=y.brighten;M&&(x=L.brighten(x,M)),m.addColorStop(g,"rgba("+x.r+","+x.g+","+x.b+","+b+")")}p++})}return m}};Ge.className="RadialGradient";Ge.classNames=bt.classNames.concat([Ge.className]);var ce=class extends W{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("radius")||this.isDirty("checkered"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0)return;let e=this.get("gap",0),i=this.get("radius",3)*2+e;if(i<=0)return;let s=this.get("checkered",!1)?2:1,r=Math.max(1,Math.round(i*s));this.get("width",100)!==r&&this.setRaw("width",r),this.get("height",100)!==r&&this.setRaw("height",r)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("width",100),n=this.get("height",100),a=this.get("radius",3),h=a*2+i,c=a*2+i,l=Math.round(r/h),d=Math.round(n/c);h=r/l,c=n/d,s!=0&&(this._display.x=h*j(s),this._display.y=c*U(s));let u=-2,f=l+2,m=-2,_=d+2;if(s!=0){let g=j(s),b=U(s),x=this._display.x,v=this._display.y,M=1/0,C=-1/0,T=1/0,S=-1/0,D=[[0,0],[r,0],[0,n],[r,n]];for(let k=0;k<D.length;k++){let $=D[k][0]-x,P=D[k][1]-v,z=g*$+b*P,A=-b*$+g*P;z<M&&(M=z),z>C&&(C=z),A<T&&(T=A),A>S&&(S=A)}u=Math.floor(M/h)-2,f=Math.ceil(C/h)+2,m=Math.floor(T/c)-2,_=Math.ceil(S/c)+2}let p=this.get("color"),y=this.get("colorOpacity");(p||y)&&this._display.beginFill(p,y);for(let g=m;g<_;g++)for(let b=u;b<f;b++)if(!t||(g&1)!=1&&(b&1)!=1||(g&1)==1&&(b&1)==1){let x=b*h,v=g*c;e&&(x+=h+i/2,v+=c+i/2),this._display.drawCircle(x-a,v-a,a)}(p||y)&&this._display.endFill()}};ce.className="CirclePattern";ce.classNames=W.classNames.concat([ce.className]);var de=class extends W{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("angle"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation"))return;let e=this.get("gap",0);if(!e)return;let i=e+this.get("strokeWidth",1),s=this.get("angle",0)*Math.PI/180,r=Math.abs(Math.sin(s)),n=Math.abs(Math.cos(s)),a=4,h=Math.max(1,Math.ceil((r>1e-6?i/r:1)*a)),c=Math.max(1,Math.ceil((n>1e-6?i/n:1)*a));this.get("width",100)>h&&this.setRaw("width",h),this.get("height",100)>c&&this.setRaw("height",c)}_draw(){super._draw();let t=this.get("width",100),e=this.get("height",100),i=this.get("gap",0),s=this.get("strokeWidth",1);if(!i)this._display.moveTo(0,0),this._display.lineTo(t,0);else{let a=i+s,h=e/a,c=this.get("angle",0)*Math.PI/180;if(c===0)for(let l=-h;l<h*2;l++){let d=Math.round(l*a-a/2)+.5;this._display.moveTo(-t,d),this._display.lineTo(t*2,d)}else{let l=Math.cos(c),d=Math.sin(c),u=Math.max(Math.abs(t*d),Math.abs(e*l));u>1e-6&&(a=u/Math.max(1,Math.round(u/a)));let f=Math.sqrt(t*t+e*e)*2,m=a/Math.max(Math.abs(l),Math.abs(d)),_=Math.ceil(f/m)*2;for(let p=-_;p<_;p++){let y=p*a,g=y*d-f*l,b=y*l+f*d,x=y*d+f*l,v=y*l-f*d;this._display.moveTo(g,b),this._display.lineTo(x,v)}}}this._display.lineStyle(s,this.get("color"),this.get("colorOpacity"));let r=this.get("strokeDasharray");N(r)&&(r<.5?r=[0]:r=[r]),this._display.setLineDash(r);let n=this.get("strokeDashoffset");n&&this._display.setLineDashOffset(n),this._display.endStroke()}};de.className="LinePattern";de.classNames=W.classNames.concat([de.className]);var ue=class extends W{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("rotateShapes")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("maxWidth",5)+e,s=this.get("maxHeight",5)+e;if(i<=0||s<=0)return;let r=this.get("checkered",!1)?2:1,n=Math.max(1,Math.round(i*r)),a=Math.max(1,Math.round(s*r));this.get("width",100)!==n&&this.setRaw("width",n),this.get("height",100)!==a&&this.setRaw("height",a)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),n=this.get("width",100),a=this.get("height",100),h=this.get("maxWidth",5),c=this.get("maxHeight",5),l=this._display,d=h+i,u=c+i,f=Math.round(n/d),m=Math.round(a/u);d=n/f,u=a/m;let _=r?0:s,p=r?s:0;l.angle=_,_!=0?(l.x=d/2*j(_),l.y=-u/2*U(_)):(l.x=0,l.y=0);let y=0,g=f,b=0,x=m;if(p!=0)y=-1,g=f+1,b=-1,x=m+1;else if(_!=0){let A=j(_),G=U(_),q=l.x,H=l.y,K=1/0,Z=-1/0,wt=1/0,ot=-1/0,ht=[[0,0],[n,0],[0,a],[n,a]];for(let zt=0;zt<ht.length;zt++){let tr=ht[zt][0]-q,er=ht[zt][1]-H,xi=A*tr+G*er,bi=-G*tr+A*er;xi<K&&(K=xi),xi>Z&&(Z=xi),bi<wt&&(wt=bi),bi>ot&&(ot=bi)}y=Math.floor(K/d)-2,g=Math.ceil(Z/d)+2,b=Math.floor(wt/u)-2,x=Math.ceil(ot/u)+2}let v=j(p),M=U(p),C=h/2,T=c/2,S=C*v,D=C*M,k=T*v,$=T*M;for(let A=b;A<x;A++)for(let G=y;G<g;G++)if(!t||(A&1)!=1&&(G&1)!=1||(A&1)==1&&(G&1)==1){let q=G*d,H=A*u;if(e&&(q+=(d-h)/2,H+=(u-c)/2),p!=0){let K=q+C,Z=H+T;l.moveTo(K-S+$,Z-D-k),l.lineTo(K+S+$,Z+D-k),l.lineTo(K+S-$,Z+D+k),l.lineTo(K-S-$,Z-D+k),l.closePath()}else l.drawRect(q,H,h,c)}let P=this.get("color"),z=this.get("colorOpacity");(P||z)&&(l.beginFill(P,z),l.endFill())}};ue.className="RectanglePattern";ue.classNames=W.classNames.concat([ue.className]);var We=class extends W{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("spikes")||this.isDirty("checkered")||this.isDirty("rotateShapes"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("radius",5)*2+e;if(i<=0)return;let s=this.get("checkered",!1)?2:1,r=Math.max(1,Math.round(i*s));this.get("width",100)!==r&&this.setRaw("width",r),this.get("height",100)!==r&&this.setRaw("height",r)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),n=this.get("width",100),a=this.get("height",100),h=this.get("radius",5),c=Pt(this.get("innerRadius",lt(50)),h),l=this.get("spikes",5),d=this._display,u=h*2+i,f=h*2+i,m=Math.round(n/u),_=Math.round(a/f);u=n/m,f=a/_;let p=r?0:s,y=r?s:0;d.angle=p,p!=0?(d.x=u/2*j(p),d.y=-f/2*U(p)):(d.x=0,d.y=0);let g=0,b=m,x=0,v=_;if(y!=0)g=-1,b=m+1,x=-1,v=_+1;else if(p!=0){let D=j(p),k=U(p),$=d.x,P=d.y,z=1/0,A=-1/0,G=1/0,q=-1/0,H=[[0,0],[n,0],[0,a],[n,a]];for(let K=0;K<H.length;K++){let Z=H[K][0]-$,wt=H[K][1]-P,ot=D*Z+k*wt,ht=-k*Z+D*wt;ot<z&&(z=ot),ot>A&&(A=ot),ht<G&&(G=ht),ht>q&&(q=ht)}g=Math.floor(z/u)-2,b=Math.ceil(A/u)+2,x=Math.floor(G/f)-2,v=Math.ceil(q/f)+2}let M=j(y),C=U(y);for(let D=x;D<v;D++)for(let k=g;k<b;k++)if(!t||(D&1)!=1&&(k&1)!=1||(D&1)==1&&(k&1)==1){let $=k*u,P=D*f;e?($+=u/2,P+=f/2):($+=h,P+=h),this._drawStar($,P,h,c,l,M,C)}let T=this.get("color"),S=this.get("colorOpacity");(T||S)&&(d.beginFill(T,S),d.endFill())}_drawStar(t,e,i,s,r,n,a){let h=this._display,c=Math.PI/r,l=Math.PI/2*3,d=0,u=-i;h.moveTo(t+d*n-u*a,e+d*a+u*n);for(let f=0;f<r;f++)d=Math.cos(l)*i,u=Math.sin(l)*i,h.lineTo(t+d*n-u*a,e+d*a+u*n),l+=c,d=Math.cos(l)*s,u=Math.sin(l)*s,h.lineTo(t+d*n-u*a,e+d*a+u*n),l+=c;d=0,u=-i,h.lineTo(t+d*n-u*a,e+d*a+u*n),h.closePath()}};We.className="StarPattern";We.classNames=W.classNames.concat([We.className]);var Ye=class extends W{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered")||this.isDirty("rotateShapes"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("maxWidth",8)+e,s=this.get("maxHeight",8)+e;if(i<=0||s<=0)return;let r=this.get("checkered",!1)?2:1,n=Math.max(1,Math.round(i*r)),a=Math.max(1,Math.round(s*r));this.get("width",100)!==n&&this.setRaw("width",n),this.get("height",100)!==a&&this.setRaw("height",a)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),n=this.get("width",100),a=this.get("height",100),h=this.get("maxWidth",8),c=this.get("maxHeight",8),l=this._display,d=h+i,u=c+i,f=Math.round(n/d),m=Math.round(a/u);d=n/f,u=a/m;let _=r?0:s,p=r?s:0;l.angle=_,_!=0?(l.x=d/2*j(_),l.y=-u/2*U(_)):(l.x=0,l.y=0);let y=0,g=f,b=0,x=m;if(p!=0)y=-1,g=f+1,b=-1,x=m+1;else if(_!=0){let k=j(_),$=U(_),P=l.x,z=l.y,A=1/0,G=-1/0,q=1/0,H=-1/0,K=[[0,0],[n,0],[0,a],[n,a]];for(let Z=0;Z<K.length;Z++){let wt=K[Z][0]-P,ot=K[Z][1]-z,ht=k*wt+$*ot,zt=-$*wt+k*ot;ht<A&&(A=ht),ht>G&&(G=ht),zt<q&&(q=zt),zt>H&&(H=zt)}y=Math.floor(A/d)-2,g=Math.ceil(G/d)+2,b=Math.floor(q/u)-2,x=Math.ceil(H/u)+2}let v=j(p),M=U(p),C=h/2,T=c/2;for(let k=b;k<x;k++)for(let $=y;$<g;$++)if(!t||(k&1)!=1&&($&1)!=1||(k&1)==1&&($&1)==1){let P=$*d,z=k*u;e?(P+=d/2,z+=u/2):(P+=C,z+=T),this._point(P,z,-C,T,v,M,!0),this._point(P,z,0,-T,v,M,!1),this._point(P,z,C,T,v,M,!1),l.closePath()}let S=this.get("color"),D=this.get("colorOpacity");(S||D)&&(l.beginFill(S,D),l.endFill())}_point(t,e,i,s,r,n,a){let h=t+i*r-s*n,c=e+i*n+s*r;a?this._display.moveTo(h,c):this._display.lineTo(h,c)}};Ye.className="TrianglePattern";Ye.classNames=W.classNames.concat([Ye.className]);var Ve=class extends W{constructor(){super(...arguments),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this._clearPath=!1,this._bbox={x:0,y:0,w:1,h:1}}_beforeChanged(){this._optimizeTileSize(),super._beforeChanged();let t=this.get("width",100),e=this.get("height",100);this.canvas.width!==t&&(this.canvas.width=t),this.canvas.height!==e&&(this.canvas.height=e),(this._clear||this.isDirty("svgPath")||this.isDirty("gap")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered")||this.isDirty("centered"))&&(this._clearPath=!0)}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this._authored("width")||this._authored("height"))return;let e=this._motif(),i=this.get("gap",0),s=e.w+i,r=e.h+i;if(s<=0||r<=0)return;let n=this.get("checkered",!1)?2:1,a=Math.max(1,Math.round(s*n)),h=Math.max(1,Math.round(r*n));this.get("width",100)!==a&&this._setCRaw("width",a),this.get("height",100)!==h&&this._setCRaw("height",h)}_authored(t){return this.isUserSetting(t)&&!this.isComputedSetting(t)}_motif(){let t=this.get("svgPath");t!=null&&t!==this._bboxPath&&(this._bbox=this._getPathBounds(t),this._bboxPath=t);let e=this._bbox,i=this.get("maxWidth"),s=this.get("maxHeight");if(i==null&&s==null)return{scale:1,w:e.w,h:e.h};let r=Math.min(i!=null?i/e.w:1/0,s!=null?s/e.h:1/0);return{scale:r,w:i??e.w*r,h:s??e.h*r}}_changed(){if(super._changed(),this._clearPath){let t=this.get("svgPath");t!=null&&this._renderPattern(t)}this._clearPath=!1}_renderPattern(t){let e=this._motif(),i=this.get("width",100),s=this.get("height",100),r=this.get("gap",0),n=e.w,a=e.h,h=this.get("checkered",!1),c=this.get("centered",!0),l=this.get("rotation",0)*Math.PI/180,d=this.context;d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,i,s);let u=this.get("fill"),f=this.get("fillOpacity",1);u&&f>0&&(d.fillStyle=u.toCSS(f),d.fillRect(0,0,i,s));let m=this.get("color");d.fillStyle=m?m.toCSS(this.get("colorOpacity",1)):"#000000";let _=new Path2D(t),p=this._bbox,y=e.scale,g=p.x+p.w/2,b=p.y+p.h/2,x=n+r,v=a+r,M=Math.max(1,Math.round(i/x)),C=Math.max(1,Math.round(s/v));this.get("maxWidth")==null&&this.get("maxHeight")==null&&(this._authored("width")||this._authored("height"))&&(M=1,C=1),x=i/M,v=s/C;for(let T=-1;T<=C;T++)for(let S=-1;S<=M;S++){if(h&&(T&1)!==(S&1))continue;let D=c?S*x+x/2:S*x+r/2+n/2,k=c?T*v+v/2:T*v+r/2+a/2;d.save(),d.translate(D,k),l!==0&&d.rotate(l),d.scale(y,y),d.translate(-g,-b),d.fill(_),d.restore()}this._pattern=this._root._renderer.createRasterPattern(this.canvas,this.get("repetition","repeat"))}_getPathBounds(t){let e="http://www.w3.org/2000/svg",i=document.createElementNS(e,"svg");i.style.cssText="position:absolute;left:-10000px;top:-10000px;width:0;height:0;overflow:hidden;";let s=document.createElementNS(e,"path");s.setAttribute("d",t),i.appendChild(s),document.body.appendChild(i);let r=0,n=0,a=1,h=1;try{let c=s.getBBox();r=c.x,n=c.y,a=c.width||1,h=c.height||1}catch{}return document.body.removeChild(i),{x:r,y:n,w:a,h}}};Ve.className="PathPattern";Ve.classNames=W.classNames.concat([Ve.className]);var Xe=class extends B{_afterNew(){if(super._afterNewApplyThemes(),this.get("patterns",[]).length===0){let t=this.get("color",this.root.interfaceColors.get("stroke"));this.set("patterns",[this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:1,color:t}),this.getRectanglePattern({width:10,height:10,rotation:0,maxWidth:4,maxHeight:4,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:1,gap:6,color:t}),this.getCirclePattern({width:11,height:11,radius:2,color:t}),this.getLinePattern({width:6,height:6,angle:90,strokeWidth:1,color:t}),this.getRectanglePattern({width:14,height:14,rotation:45,rotateShapes:!0,gap:4,maxWidth:6,maxHeight:6,checkered:!0,color:t}),this.getLinePattern({width:6,height:6,angle:0,strokeWidth:1,color:t}),this.getRectanglePattern({width:15,height:15,rotation:0,gap:5,maxWidth:5,maxHeight:5,checkered:!0,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:2,gap:3,strokeDasharray:[4,2],color:t}),this.getCirclePattern({width:20,height:20,radius:3,gap:4,checkered:!0,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:2,gap:3,strokeDasharray:[4,2],color:t}),this.getRectanglePattern({width:10,height:10,rotation:0,gap:1,maxWidth:9,maxHeight:9,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:2,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:2,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:0,strokeWidth:3,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:90,strokeWidth:3,gap:1,color:t})])}this._dirty.patterns=!1}_beforeChanged(){this.isDirty("patterns")&&this.reset()}getIndex(t){let e=this.get("patterns",[]);if(t<e.length&&e[t]!==null)return e[t];if(t>e.length-1){let i=t%e.length;return e[i]}return e[t]}next(){let t=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",t+this.get("step",1)),this.getIndex(t)}reset(){this.setPrivate("currentStep",this.get("startIndex",0))}getLinePattern(t){return de.new(this.root,t)}getRectanglePattern(t){return ue.new(this.root,t)}getCirclePattern(t){return ce.new(this.root,t)}};Xe.className="PatternSet";Xe.classNames=B.classNames.concat([Xe.className]);var Gs=class{static parse(t,e){e=this._applyDefaults(e);try{if(Ot(t)){let i=JSON.parse(t);return e.reverse&&Je(i)&&i.reverse(),i}else{if(Je(t)||Zt(t))return t;throw"Unable to parse JSON data"}}catch{return}}static _applyDefaults(t){let e={},i={reverse:!1};return t||(t={}),V(i,(s,r)=>{e[s]=t[s]!=null?t[s]:r}),e}},Ws=class{static parse(t,e){e=this._applyDefaults(e);let i=this.CSVToArray(t,e.delimiter),s=[],r=[],n,a;for(a=0;a<e.skipRows;a++)i.shift();if(e.useColumnNames){r=i.shift();for(let c=0;c<r.length;c++)n=r[c]!=null?r[c].replace(/^\s+|\s+$/gm,""):"",n===""&&(n="col"+c),r[c]=n}let h;for(;h=e.reverse?i.pop():i.shift(),!!h;){if(e.skipEmpty&&h.length===1&&h[0]==="")continue;let c={};for(a=0;a<h.length;a++)n=r[a]===void 0?"col"+a:r[a],c[n]=h[a];s.push(c)}return s}static CSVToArray(t,e){e=e||",";let i=new RegExp("(\\"+e+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+e+"\\r\\n]*))","gi"),s=[[]],r=null;for(;r=i.exec(t),!(!r||r[0].length===0);){let n=r[1];n.length&&n!==e&&s.push([]);let a;r[2]?a=r[2].replace(new RegExp('""',"g"),'"'):a=r[3],s[s.length-1].push(a)}return s}static _applyDefaults(t){let e={},i={delimiter:",",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1};return t||(t={}),V(i,(s,r)=>{e[s]=t[s]!=null?t[s]:r}),e}};var Ys=class extends B{constructor(){super(...arguments),this._checkDates=!1,this._checkNumbers=!1,this._checkColors=!1,this._checkEmpty=!1,this._checkDeep=!1}_afterNew(){super._afterNew(),this._checkFeatures(),this.on("dateFields",()=>this._checkFeatures()),this.on("dateFormat",()=>this._checkFeatures()),this.on("numericFields",()=>this._checkFeatures()),this.on("colorFields",()=>this._checkFeatures()),this.on("emptyAs",()=>this._checkFeatures())}_checkFeatures(){(this.isDirty("dateFields")||this.isDirty("dateFormat"))&&(this._checkDates=this.get("dateFields")&&this.get("dateFields").length>0),this.isDirty("numericFields")&&(this._checkNumbers=this.get("numericFields")&&this.get("numericFields").length>0),this.isDirty("colorFields")&&(this._checkColors=this.get("colorFields")&&this.get("colorFields").length>0),this.isDirty("emptyAs")&&(this._checkEmpty=this.get("emptyAs")!=null),this._checkDeepFeatures()}_checkDeepFeatures(){let t=[];w(["dateFields","numericFields","colorFields"],e=>{w(this.get(e,[]),i=>{let s=i.split(".");for(s.pop();s.length>0;)t.push(s.join(".")),s.pop()})}),this._checkDeep=t.length>0,this.setPrivate("deepFields",t)}processMany(t){Je(t)&&(this._checkDates||this._checkNumbers||this._checkColors||this._checkEmpty)&&w(t,e=>{this.processRow(e)})}processRow(t,e=""){V(t,(i,s)=>{let r=e+i;this._checkEmpty&&(t[i]=this._maybeToEmpty(t[i])),this._checkNumbers&&(t[i]=this._maybeToNumber(r,t[i])),this._checkDates&&(t[i]=this._maybeToDate(r,t[i])),this._checkColors&&(t[i]=this._maybeToColor(r,t[i])),this._checkDeep&&this.getPrivate("deepFields",[]).indexOf(r)!==-1&&Zt(t[i])&&this.processRow(t[i],r+".")})}_maybeToNumber(t,e){return this.get("numericFields").indexOf(t)!==-1?_t(e):e}_maybeToDate(t,e){return this.get("dateFields").indexOf(t)!==-1?this._root.dateFormatter.parse(e,this.get("dateFormat","")).getTime():e}_maybeToEmpty(t){return(t==null||t==="")&&this.get("emptyAs")!=null?this.get("emptyAs"):t}_maybeToColor(t,e){return this.get("colorFields").indexOf(t)!==-1?L.fromAny(e):e}};var Ue=class extends E{constructor(){super(...arguments),this.rectangle=this.children.push(Yt.new(this._root,{themeTags:["rectangle"],fillOpacity:0,fill:ct(16777215)})),this.gripL=this._createGrip("left"),this.gripR=this._createGrip("right"),this.gripT=this._createGrip("top"),this.gripB=this._createGrip("bottom"),this._is=1,this._ix=0,this._iw=0,this._isHover=!1}_afterNew(){super._afterNew(),this.addTag("resizer"),this.set("visible",!1),this.gripL.events.on("dragged",t=>{this._resize(t.target,-1)}),this.gripR.events.on("dragged",t=>{this._resize(t.target,1)}),this.gripL.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripR.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripT.events.on("dragged",t=>{this._rotate(t,90)}),this.gripB.events.on("dragged",t=>{this._rotate(t,-90)}),this.gripT.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripB.events.on("dragstart",t=>{this._resizeStart(t.target)})}_resizeStart(t){let e=this.get("sprite");e&&(this._is=e.get("scale",1),this._ix=t.x(),this._iw=this.width()/2)}_resize(t,e){let i=this.get("sprite"),s=this.get("spriteTemplate");if(i){let r=Math.max(.01,this._is*(1+e*(t.x()-this._ix)/this._iw));s?s.set("scale",r):i.set("scale",r),i.states.lookup("default").set("scale",r),this._updatePositions()}}_rotate(t,e){let i=this.get("sprite"),s=this.get("spriteTemplate");if(i){let r=this.parent;if(r){let n=this.get("rotationStep",10),a=Math.round((ni({x:this.x(),y:this.y()},r.toLocal(t.point))+e)/n)*n;s?s.set("rotation",a):i.set("rotation",a),i.states.lookup("default").set("rotation",a),this._updatePositions()}}}_createGrip(t){let e=this.children.push(E.new(this._root,{themeTags:["grip",t],setStateOnChildren:!0,draggable:!0}));return e.children.push(Vt.new(this._root,{themeTags:["outline"],centerX:Kt,centerY:Kt})),e.children.push(Vt.new(this._root,{centerX:Kt,centerY:Kt})),e}_updateChildren(){if(super._updateChildren(),this.isDirty("sprite")){let t=this.get("sprite");if(this._positionDP&&(this._positionDP.dispose(),this._positionDP=void 0),t){this.show(0),this.setPrivate("visible",!0),this._updatePositions();let e=t.parent;e&&e.children.moveValue(this,0),this._positionDP=new yt([t.events.on("positionchanged",()=>{this._updatePositions()}),t.events.on("boundschanged",()=>{this._updatePositions()})])}else this.hide(0),this.setPrivate("visible",!1)}(this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation"))&&this._updatePositions()}_updatePositions(){let t=this.get("sprite");if(t){let e=t.localBounds(),i=t.get("scale",1),s=20,r=(e.right-e.left)*i+s,n=(e.bottom-e.top)*i+s,a=t.get("rotation",0),h=this.rectangle,c=t.get("centerX",Kt),l=t.get("centerY",Kt),d=0;c instanceof Et&&(d=c.value);let u=0;l instanceof Et&&(u=l.value),h.setAll({centerX:c,centerY:l,width:r,height:n}),this.setAll({x:t.x()+s*(d-.5)*j(a)-s*(u-.5)*U(a),y:t.y()+s*(u-.5)*j(a)+s*(d-.5)*U(a),width:r,height:n,rotation:a}),this.gripT.setAll({x:(.5-d)*r,y:-u*n}),this.gripB.setAll({x:(.5-d)*r,y:(1-u)*n}),this.gripL.setAll({x:-d*r,y:(.5-u)*n}),this.gripR.setAll({x:(1-d)*r,y:(.5-u)*n}),this.rectangle.setAll({width:r,height:n})}}};Ue.className="SpriteResizer";Ue.classNames=E.classNames.concat([Ue.className]);var Rt=Math.PI*2;function ye(...o){for(let t=0;t<o.length;t++)if(!isFinite(o[t]))return!1;return!0}var xe=class{constructor(t=3){this._precision=t,this._parts=[],this._x=0,this._y=0,this._startX=0,this._startY=0,this._hasPoint=!1}get d(){return this._parts.join("")}clear(){this._parts.length=0,this._hasPoint=!1}_n(t){let e=Math.pow(10,this._precision);return String(Math.round(t*e)/e)}_point(t,e){return this._n(t)+" "+this._n(e)}moveTo(t,e){ye(t,e)&&(this._parts.push("M"+this._point(t,e)),this._x=this._startX=t,this._y=this._startY=e,this._hasPoint=!0)}lineTo(t,e){if(ye(t,e)){if(!this._hasPoint){this.moveTo(t,e);return}this._parts.push("L"+this._point(t,e)),this._x=t,this._y=e}}closePath(){this._hasPoint&&(this._parts.push("Z"),this._x=this._startX,this._y=this._startY)}rect(t,e,i,s){ye(t,e,i,s)&&(this.moveTo(t,e),this._parts.push("L"+this._point(t+i,e)+"L"+this._point(t+i,e+s)+"L"+this._point(t,e+s)+"Z"),this._x=t,this._y=e)}bezierCurveTo(t,e,i,s,r,n){ye(t,e,i,s,r,n)&&(this._hasPoint||this.moveTo(t,e),this._parts.push("C"+this._point(t,e)+" "+this._point(i,s)+" "+this._point(r,n)),this._x=r,this._y=n)}quadraticCurveTo(t,e,i,s){ye(t,e,i,s)&&(this._hasPoint||this.moveTo(t,e),this._parts.push("Q"+this._point(t,e)+" "+this._point(i,s)),this._x=i,this._y=s)}arc(t,e,i,s,r,n=!1){this.ellipse(t,e,i,i,0,s,r,n)}ellipse(t,e,i,s,r,n,a,h=!1){if(!ye(t,e,i,s,r,n,a)||i<0||s<0)return;let c=n%Rt;c<0&&(c+=Rt);let l=a+(c-n);!h&&l-c>=Rt?l=c+Rt:h&&c-l>=Rt?l=c-Rt:!h&&c>l?l=c+(Rt-(c-l)%Rt):h&&c<l&&(l=c-(Rt-(l-c)%Rt));let d=Math.cos(r),u=Math.sin(r),f=v=>{let M=i*Math.cos(v),C=s*Math.sin(v);return[t+M*d-C*u,e+M*u+C*d]},[m,_]=f(c);this.lineTo(m,_);let p=l-c;if(p===0||i===0||s===0){let[v,M]=f(l);this.lineTo(v,M);return}let y=Math.ceil(Math.abs(p)/Math.PI-1e-9),g=p/y,b=this._n(r*180/Math.PI),x=p>0?"1":"0";for(let v=1;v<=y;v++){let[M,C]=f(c+g*v);this._parts.push("A"+this._n(i)+" "+this._n(s)+" "+b+" 0 "+x+" "+this._point(M,C)),this._x=M,this._y=C}}arcTo(t,e,i,s,r){if(!ye(t,e,i,s,r))return;this._hasPoint||this.moveTo(t,e);let n=this._x,a=this._y;if(n===t&&a===e||t===i&&e===s||r===0){this.lineTo(t,e);return}let h=n-t,c=a-e,l=i-t,d=s-e,u=Math.hypot(h,c),f=Math.hypot(l,d),m=h*d-c*l;if(Math.abs(m)<1e-9*u*f){this.lineTo(t,e);return}let _=(h*l+c*d)/(u*f),p=Math.acos(Math.max(-1,Math.min(1,_))),y=r/Math.tan(p/2),g=t+h/u*y,b=e+c/u*y,x=t+l/f*y,v=e+d/f*y;this.lineTo(g,b),this._parts.push("A"+this._n(r)+" "+this._n(r)+" 0 0 "+(m<0?"1":"0")+" "+this._point(x,v)),this._x=x,this._y=v}};function et(o){return o.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g,"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var Vr=new WeakMap;function Jr(o){try{return o.toDataURL()}catch{return""}}var Xr=new WeakMap;function Ln(o,t){let e=o._data,i=Xr.get(t);return(!i||i.data!==e||i.version!==e.version)&&(i={data:e,version:e.version,url:Jr(t)},Xr.set(t,i)),i.url}var _i=class{constructor(t){this._prefix=t,this._ids=new Map,this._next=0,this.used=new Set}begin(){this.used=new Set}id(t,e){let i=this._ids.get(e);return i===void 0&&(i=this._prefix+t+ ++this._next,this._ids.set(e,i)),this.used.add(e),i}withId(t){let e=this._ids.get(t);return t.replace(/^<(\w+)/,'<$1 id="'+e+'"')}sweep(){let t=this.used;this._ids.forEach((e,i)=>{t.has(i)||this._ids.delete(i)})}},yi=class{constructor(t,e,i=1,s=!1){this.precision=t,this.defs=e,this.resolution=i,this.live=s,this.blend=!1,this._paints=new Map,this._fonts=new Map,this._shifts=new Map,this.nonExportable=!1,this._p=Math.pow(10,t),this.href=s?"href":"xlink:href"}n(t){let e=this._p;return String(Math.round(t*e)/e)}defsMarkup(){let t=[];return this.defs.used.forEach(e=>{t.push(this.defs.withId(e))}),t.join("")}matrix(t,e=!1){let i=t.tx,s=t.ty;if(e){let r=this.resolution;i=(Math.floor(i*r)+.5)/r,s=(Math.floor(s*r)+.5)/r}return"matrix("+this.n(t.a)+" "+this.n(t.b)+" "+this.n(t.c)+" "+this.n(t.d)+" "+this.n(i)+" "+this.n(s)+")"}paint(t,e){if(typeof e=="string")return this.color(t,e);let i=this._paints.get(e);if(i===void 0){if(e instanceof Lt)i=this.defs.id("g",'<linearGradient gradientUnits="userSpaceOnUse" x1="'+this.n(e.x1)+'" y1="'+this.n(e.y1)+'" x2="'+this.n(e.x2)+'" y2="'+this.n(e.y2)+'">'+this._stops(e.stops)+"</linearGradient>");else if(e instanceof Ft)i=this.defs.id("g",'<radialGradient gradientUnits="userSpaceOnUse" cx="'+this.n(e.x2)+'" cy="'+this.n(e.y2)+'" r="'+this.n(e.radius2)+'" fx="'+this.n(e.x1)+'" fy="'+this.n(e.y1)+'" fr="'+this.n(e.radius1)+'">'+this._stops(e.stops)+"</radialGradient>");else if(e instanceof kt){let s=[];Zr(this,e.background,s),Zr(this,e.graphics,s),i=this.defs.id("p",'<pattern patternUnits="userSpaceOnUse" width="'+this.n(e.width)+'" height="'+this.n(e.height)+'">'+s.join("")+"</pattern>")}else if(e instanceof Dt){let s=e.source.width,r=e.source.height,n=Vr.get(e);if(n===void 0&&(n=Jr(e.source),Vr.set(e,n)),!n||!s||!r)return t+'="none"';i=this.defs.id("p",'<pattern patternUnits="userSpaceOnUse" width="'+s+'" height="'+r+'"><image width="'+s+'" height="'+r+'" '+this.href+'="'+n+'"/></pattern>')}else return t+'="none"';this._paints.set(e,i)}return t+'="url(#'+i+')"'}color(t,e){let i=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+)\s*)?\)$/.exec(e);if(i){let s=t+'="rgb('+Math.round(+i[1])+","+Math.round(+i[2])+","+Math.round(+i[3])+')"';return i[4]!==void 0&&+i[4]<1?s+" "+t+'-opacity="'+this.n(+i[4])+'"':s}return t+'="'+et(e)+'"'}_stops(t){return t.map(e=>'<stop offset="'+this.n(e.offset)+'" '+this.color("stop-color",e.color).replace("stop-color-opacity","stop-opacity")+"/>").join("")}shadow(t,e,i,s,r,n,a){if(!e&&!i&&!s)return;let h=this.resolution;e/=h,i/=h,s/=h;let c=r.a*r.d-r.b*r.c||1,l=(r.d*i-r.c*s)/c,d=(-r.b*i+r.a*s)/c,u=Math.sqrt(Math.abs(c))||1;return this._dropShadow(t,e/2/u,l,d,n,a)}_dropShadow(t,e,i,s,r,n=0){let a=this.color("flood-color",t).replace("flood-color-opacity","flood-opacity"),h='x="-50%" y="-50%" width="200%" height="200%"';if(r&&r.right>=r.left&&r.bottom>=r.top){let c=r.right-r.left,l=r.bottom-r.top,d=3*e+Math.abs(i)+n,u=3*e+Math.abs(s)+n;(d>c/2||u>l/2)&&(h='filterUnits="userSpaceOnUse" x="'+this.n(r.left-d)+'" y="'+this.n(r.top-u)+'" width="'+this.n(c+2*d)+'" height="'+this.n(l+2*u)+'"')}return this.defs.id("s","<filter "+h+' color-interpolation-filters="sRGB"><feDropShadow dx="'+this.n(i)+'" dy="'+this.n(s)+'" stdDeviation="'+this.n(e)+'" '+a+"/></filter>")}cssFilter(t,e,i){let s=this.resolution,r=e.a*e.d-e.b*e.c||1,n=(Math.sqrt(Math.abs(r))||1)*s;return t.replace(/([a-z-]+)\(((?:[^()]|\([^()]*\))*)\)/gi,(a,h,c)=>{let l=h.toLowerCase();if(l==="blur"){let d=/^\s*(-?[\d.]+)(px)?\s*$/.exec(c);return d?"blur("+this.n(+d[1]/n)+"px)":a}else if(l==="drop-shadow"){let d=c.match(/[a-z-]+\([^()]*\)|\S+/gi)||[],u=[],f=[],m=!1;if(w(d,x=>{let v=/^(-?[\d.]+)(px)?$/.exec(x);v?u.push(+v[1]):/^-?[\d.]+[a-z%]+$/i.test(x)?m=!0:f.push(x)}),m||u.length<2)return a;let _=u[0]/s,p=u[1]/s,y=(e.d*_-e.c*p)/r,g=(-e.b*_+e.a*p)/r,b=u.length>2?u[2]/n:0;return"url(#"+this._dropShadow(f.length?f.join(" "):"#000",b,y,g,i)+")"}return a})}clip(t){let e=Qr(t,this.precision);if(e.clip===void 0){let i=new xe(this.precision);w(t._data.ops,s=>{s.path(i)}),e.clip=i.d}return this.defs.id("c","<clipPath"+(this.live?"":' data-name="Mask"')+'><path transform="'+this.matrix(t._matrix)+'" d="'+e.clip+'"/></clipPath>')}};function je(o,t,e,i,s){let r=' transform="'+o.matrix(t._matrix,t.crisp&&t.deform===null)+'"';e<1&&(r+=' opacity="'+o.n(e)+'"');let n=[];s&&n.push("url(#"+s+")"),i&&i.trim()!=="none"&&n.push(o.cssFilter(i,t._matrix,t.getLocalBounds()));let a="";return n.length&&(a+="filter:"+n.join(" ")+";"),t instanceof nt&&t.blendMode&&t.blendMode!="source-over"&&(Fn(t.blendMode)?Nn():(a+="mix-blend-mode:"+(t.blendMode=="lighter"?"plus-lighter":t.blendMode)+";",o.blend=!0)),a&&(r+=' style="'+et(a)+'"'),r}function Fn(o){return o=="destination-over"||o=="source-atop"||o=="xor"}var Ur=!1;function Nn(){Ur||(Ur=!0,console.warn("amCharts SVG: blend modes DST_OVER, SRC_ATOP and XOR are canvas-only; they are drawn as NORMAL."))}function Vs(o){return typeof o=="string"||o instanceof Lt||o instanceof Ft||o instanceof kt||o instanceof Dt}var jr=new WeakMap;function Qr(o,t){let e=o._data,i=jr.get(o);return(!i||i.version!==e.version||i.length!==e.ops.length||i.precision!==t)&&(i={version:e.version,length:e.ops.length,precision:t},jr.set(o,i)),i}function ji(o,t,e,i,s,r){let n=r?void 0:Qr(t,o.precision),a=!n||!n.paths,h=n?n.paths||(n.paths=[]):[],c=0,l=[],d=C=>(a&&h.push(r?r.clip?Vn(o,l,r,C,g,b):Hn(l,r.copies,o.precision):u.d),h[c++]),u=new xe(o.precision),f="#000",m="#000",_=1,p="miter",y="butt",g=[],b=0,x,v=C=>{if(r&&r.clip)return e<1?' opacity="'+o.n(e)+'"':"";let T=C&&x?o.shadow(x.color,x.blur,x.offsetX,x.offsetY,t._matrix,t.getLocalBounds(),_*5):void 0;return je(o,t,e,i,T)},M=[];for(w(t._data.ops,C=>{switch(C.type){case"beginPath":a&&(u=new xe(o.precision),l=[]);break;case"beginFill":Vs(C.color)&&(f=C.color);break;case"beginGroup":M.push(s.length),s.push("<g"+Bn(o,C.id,C.name)+">");break;case"endGroup":{let T=M.pop();T!==void 0&&(s.length==T+1?s.pop():s.push("</g>"));break}case"endFill":{let T=d("fill");if(T&&!o.live&&f instanceof kt&&!r){let S=v(!1),D=v(!0);In(o,t,T,f,S,D!=S?D:void 0,s)}else T&&(o.live||!qr(f))&&s.push("<path"+v(!0)+' d="'+T+'" '+o.paint("fill",f)+"/>");C.clearShadow&&(x=void 0);break}case"lineStyle":Vs(C.color)&&(m=C.color),C.width>0&&isFinite(C.width)&&(_=C.width),C.lineJoin&&(p=C.lineJoin),C.lineCap&&(y=C.lineCap);break;case"endStroke":{let T=d("stroke");if(T&&(o.live||!qr(m))){let S=' fill="none" '+o.paint("stroke",m)+' stroke-width="'+o.n(_)+'" stroke-miterlimit="10"';p!="miter"&&(S+=' stroke-linejoin="'+et(p)+'"'),y!="butt"&&(S+=' stroke-linecap="'+et(y)+'"'),g.length&&!(r&&r.clip)&&(S+=' stroke-dasharray="'+g.map(D=>o.n(D)).join(" ")+'"',b&&(S+=' stroke-dashoffset="'+o.n(b)+'"')),s.push("<path"+v(!0)+' d="'+T+'"'+S+"/>")}break}case"lineDash":Zi(C.dash,T=>!(T>=0&&isFinite(T)))||(g=C.dash);break;case"lineDashOffset":isFinite(C.dashOffset)&&(b=C.dashOffset);break;case"shadow":x=C;break;case"image":r?zn(o,t,C,r.copies,e,i,s):Rn(o,t,C,e,i,s);break;default:a&&(r?l.push(C):C.path(u))}});M.length;){let C=M.pop();s.length==C+1?s.pop():s.push("</g>")}}function qr(o){if(typeof o!="string")return!1;let t=/^rgba\([^,]+,[^,]+,[^,]+,\s*([\d.]+)\s*\)$/.exec(o);return!!t&&+t[1]<=0}function Bn(o,t,e){let i="";return t!=null&&t!==""&&(i+=(o.live?' data-id="':' id="')+et(t)+'"'),e!=null&&e!==""&&(i+=' data-name="'+et(e)+'"'),i}function Rn(o,t,e,i,s,r){if(!isFinite(e.x)||!isFinite(e.y)||!isFinite(e.width)||!isFinite(e.height))return;let n=tn(t,e);n&&r.push("<image"+je(o,t,i,s)+' x="'+o.n(e.x)+'" y="'+o.n(e.y)+'" width="'+o.n(e.width)+'" height="'+o.n(e.height)+'" '+o.href+'="'+et(n)+'" preserveAspectRatio="none"/>')}function zn(o,t,e,i,s,r,n){if(!isFinite(e.x)||!isFinite(e.y)||!isFinite(e.width)||!isFinite(e.height))return;let a=tn(t,e);if(!a)return;let h=o.defs.id("i",'<image width="'+o.n(e.width)+'" height="'+o.n(e.height)+'" '+o.href+'="'+et(a)+'" preserveAspectRatio="none"/>'),c=je(o,t,s,r);w(i,l=>{n.push("<use"+c+' x="'+o.n(e.x+l.x)+'" y="'+o.n(e.y+l.y)+'" '+o.href+'="#'+h+'"/>')})}function tn(o,t){let e=t.image;return e instanceof HTMLCanvasElement?Ln(o,e):e.src}function On(o,t,e){return{moveTo:(i,s)=>o.moveTo(i+t,s+e),lineTo:(i,s)=>o.lineTo(i+t,s+e),closePath:()=>o.closePath(),rect:(i,s,r,n)=>o.rect(i+t,s+e,r,n),arc:(i,s,r,n,a,h)=>o.arc(i+t,s+e,r,n,a,h),arcTo:(i,s,r,n,a)=>o.arcTo(i+t,s+e,r+t,n+e,a),ellipse:(i,s,r,n,a,h,c,l)=>o.ellipse(i+t,s+e,r,n,a,h,c,l),bezierCurveTo:(i,s,r,n,a,h)=>o.bezierCurveTo(i+t,s+e,r+t,n+e,a+t,h+e),quadraticCurveTo:(i,s,r,n)=>o.quadraticCurveTo(i+t,s+e,r+t,n+e)}}function Hn(o,t,e){let i="";return w(t,s=>{let r=new xe(e),n=On(r,s.x,s.y);w(o,a=>{a.path(n)}),i+=r.d}),i}function In(o,t,e,i,s,r,n){let a=i.width,h=i.height,c=t.getLocalBounds(),l=Math.floor(c.left/a),d=Math.floor(c.top/h),u=Math.ceil(c.right/a)-l,f=Math.ceil(c.bottom/h)-d;if(!(a>0&&h>0&&u>0&&f>0)||u*f>2500||i.repetition&&i.repetition!="repeat"){n.push("<path"+(r||s)+' d="'+e+'" '+o.paint("fill",i)+"/>");return}let m=[];for(let p=0;p<u;p++)for(let y=0;y<f;y++)m.push({x:(l+p)*a,y:(d+y)*h});let _=[];if(Kr(o,i.background,m,a,h,c,_),Kr(o,i.graphics,m,a,h,c,_),_.length){let p=o.defs.id("c",'<clipPath data-name="Mask"><path d="'+e+'"/></clipPath>');r?n.push("<g"+r+'><g clip-path="url(#'+p+')" data-name="Pattern">'+_.join("")+"</g></g>"):n.push("<g"+s+' clip-path="url(#'+p+')" data-name="Pattern">'+_.join("")+"</g>")}}function Kr(o,t,e,i,s,r,n){if(!t.visible)return;t._setMatrix();let a=t._matrix,h=a.a*a.d-a.b*a.c;if(!h)return;let c=x=>x.map(v=>({x:(a.d*v.x-a.c*v.y)/h,y:(a.a*v.y-a.b*v.x)/h})),l=t.getContentBounds(),d=1/0,u=1/0,f=-1/0,m=-1/0;w([{x:l.left,y:l.top},{x:l.right,y:l.top},{x:l.right,y:l.bottom},{x:l.left,y:l.bottom}],x=>{let v=a.a*x.x+a.c*x.y+a.tx,M=a.b*x.x+a.d*x.y+a.ty;d=Math.min(d,v),u=Math.min(u,M),f=Math.max(f,v),m=Math.max(m,M)});let _=.01,p=d<-_||u<-_||f>i+_||m>s+_,y=[],g=[];w(e,x=>{(!p&&x.x+d>=r.left-_&&x.y+u>=r.top-_&&x.x+f<=r.right+_&&x.y+m<=r.bottom+_?y:g).push(x)});let b=t.compoundAlpha*t.alpha;y.length&&ji(o,t,b,t.filter,n,{copies:c(y)}),g.length&&ji(o,t,b,t.filter,n,{copies:c(g),clip:{copies:g,width:i,height:s,matrix:a,bounds:r}})}var Xs=class{constructor(){this.paths=[],this._x=0,this._y=0}moveTo(t,e){!isFinite(t)||!isFinite(e)||(this._path={points:[{x:t,y:e}],closed:!1},this.paths.push(this._path),this._x=t,this._y=e,this._restart=void 0)}lineTo(t,e){if(!(!isFinite(t)||!isFinite(e))){if(!this._path){let i=this._restart||{x:t,y:e};this.moveTo(i.x,i.y)}this._path.points.push({x:t,y:e}),this._x=t,this._y=e}}closePath(){this._path&&(this._path.closed=!0,this._restart=this._path.points[0],this._path=void 0)}rect(t,e,i,s){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.closePath()}arc(t,e,i,s,r,n){this.ellipse(t,e,i,i,0,s,r,n)}ellipse(t,e,i,s,r,n,a,h){let c=Math.PI*2,l=a-n;h?l=l<=-c?-c:-((-l%c+c)%c):l=l>=c?c:(l%c+c)%c;let d=Math.max(1,Math.ceil(Math.abs(l)/(Math.PI/16))),u=Math.cos(r),f=Math.sin(r);for(let m=0;m<=d;m++){let _=n+l*m/d,p=i*Math.cos(_),y=s*Math.sin(_),g=t+p*u-y*f,b=e+p*f+y*u;m==0&&!this._path&&!this._restart?this.moveTo(g,b):this.lineTo(g,b)}}arcTo(t,e,i,s,r){this.lineTo(t,e)}bezierCurveTo(t,e,i,s,r,n){let a=this._x,h=this._y;for(let c=1;c<=16;c++){let l=c/16,d=1-l;this.lineTo(d*d*d*a+3*d*d*l*t+3*d*l*l*i+l*l*l*r,d*d*d*h+3*d*d*l*e+3*d*l*l*s+l*l*l*n)}}quadraticCurveTo(t,e,i,s){let r=this._x,n=this._y;for(let a=1;a<=12;a++){let h=a/12,c=1-h;this.lineTo(c*c*r+2*c*h*t+h*h*i,c*c*n+2*c*h*e+h*h*s)}}};function Gn(o,t,e,i,s){let r=[[a=>a.x>=t,(a,h)=>({x:t,y:a.y+(h.y-a.y)*(t-a.x)/(h.x-a.x)})],[a=>a.x<=i,(a,h)=>({x:i,y:a.y+(h.y-a.y)*(i-a.x)/(h.x-a.x)})],[a=>a.y>=e,(a,h)=>({x:a.x+(h.x-a.x)*(e-a.y)/(h.y-a.y),y:e})],[a=>a.y<=s,(a,h)=>({x:a.x+(h.x-a.x)*(s-a.y)/(h.y-a.y),y:s})]],n=o;return w(r,a=>{let h=a[0],c=a[1],l=n;n=[],w(l,(d,u)=>{let f=l[(u+l.length-1)%l.length];h(d)?(h(f)||n.push(c(f,d)),n.push(d)):h(f)&&n.push(c(f,d))})}),n}function Wn(o,t,e,i,s){let r=[],n;for(let a=1;a<o.length;a++){let h=o[a-1],c=o[a],l=c.x-h.x,d=c.y-h.y,u=0,f=1,m=!0;if(w([[-l,h.x-t],[l,i-h.x],[-d,h.y-e],[d,s-h.y]],y=>{let g=y[0],b=y[1];if(g==0)b<0&&(m=!1);else{let x=b/g;g<0?u=Math.max(u,x):f=Math.min(f,x)}}),!m||u>f){n=void 0;continue}let _={x:h.x+l*u,y:h.y+d*u},p={x:h.x+l*f,y:h.y+d*f};(!n||u>0)&&(n=[_],r.push(n)),n.push(p),f<1&&(n=void 0)}return r.filter(a=>Zi(a,h=>h.x!=a[0].x||h.y!=a[0].y))}function Yn(o,t,e){let i=t.length%2?t.concat(t):t,s=0;if(w(i,d=>{s+=d}),!(s>0)||o.length<2)return[o];let r=0,n=(e%s+s)%s;for(;n>=i[r];)n-=i[r],r=(r+1)%i.length;let a=i[r]-n,h=r%2==0,c=[],l=h?[o[0]]:void 0;for(let d=1;d<o.length;d++){let u=o[d-1],f=o[d],m=f.x-u.x,_=f.y-u.y,p=Math.sqrt(m*m+_*_),y=0;for(;p-y>a;){y+=a;let g={x:u.x+m*y/p,y:u.y+_*y/p};h?(l.push(g),c.push(l),l=void 0):l=[g],h=!h,r=(r+1)%i.length,a=i[r]}a-=p-y,h&&l.push(f)}return h&&l&&l.length>1&&c.push(l),c}function Vn(o,t,e,i,s,r){let n=e.clip,a=n.matrix,h=new Xs;w(t,d=>{d.path(h)});let c=i=="stroke"?h.paths.map(d=>{let u=d.closed&&d.points.length>1?d.points.concat([d.points[0]]):d.points;return s.length?Yn(u,s,r):[u]}):[],l="";return w(n.copies,d=>{let u=Math.max(d.x,n.bounds.left),f=Math.max(d.y,n.bounds.top),m=Math.min(d.x+n.width,n.bounds.right),_=Math.min(d.y+n.height,n.bounds.bottom);if(m<=u||_<=f)return;let p=y=>y.map(g=>({x:a.a*g.x+a.c*g.y+a.tx+d.x,y:a.b*g.x+a.d*g.y+a.ty+d.y}));i=="fill"?w(h.paths,y=>{let g=Gn(p(y.points),u,f,m,_),b=0;w(g,(x,v)=>{let M=g[(v+1)%g.length];b+=x.x*M.y-M.x*x.y}),g.length>2&&Math.abs(b)>1e-6&&(l+="M"+g.map(x=>o.n(x.x)+" "+o.n(x.y)).join("L")+"Z")}):w(c,y=>{w(y,g=>{w(Wn(p(g),u,f,m,_),b=>{l+="M"+b.map(x=>o.n(x.x)+" "+o.n(x.y)).join("L")})})})}),l}function Zr(o,t,e){t.visible&&(t._setMatrix(),ji(o,t,t.compoundAlpha*t.alpha,t.filter,e))}function Xn(o,t){switch(o){case"center":return"middle";case"end":return"end";case"left":return t?"end":void 0;case"right":return t?void 0:"end"}}function Un(o){switch(o){case"top":return"text-before-edge";case"hanging":return"hanging";case"middle":return"central";case"ideographic":return"ideographic";case"bottom":return"text-after-edge"}}function jn(o,t,e,i,s){o.live&&!t._textInfo&&t._renderer._measureText(t);let r=t._textInfo;if(!t.textVisible||!r)return;let n=t.style,a=Mi(n,void 0,!1,()=>getComputedStyle(t._renderer.view).getPropertyValue("font-family")),h=n.direction=="rtl",c;n.fill instanceof L?c=o.color("fill",n.fill.toCSS(n.fillOpacity!=null?n.fillOpacity:1)):n.fill&&Vs(n.fill)?c=o.paint("fill",n.fill):c='fill="#000"';let l;if(n.shadowColor&&(l=o.shadow(n.shadowColor.toCSS(n.shadowOpacity!=null?n.shadowOpacity:1),n.shadowBlur||0,n.shadowOffsetX||0,n.shadowOffsetY||0,t._matrix,t.getLocalBounds())),t instanceof at&&t.textType=="circular"){let _=o.live?t._orient():t._inward();Kn(o,t,_,a,c,e,i,l,s);return}let d=je(o,t,e,i,l),u=Xn(n.textAlign,h);u&&(d+=' text-anchor="'+u+'"');let f=Un(n.textBaseline);f&&o.live&&(d+=' dominant-baseline="'+f+'"'),h&&(d+=' direction="rtl"');let m=[];w(r,_=>{w(_.textChunks,p=>{let y=en(o,t,p.style||a),g=p.fill?o.color("fill",p.fill.toCSS()):c,b=p.offsetX,x=_.offsetY+p.offsetY;if(!(!isFinite(b)||!isFinite(x))){if(p.text!==""){let v=f&&!o.live?x+sn(o,t,y,n.textBaseline):x;m.push('<text x="'+o.n(b)+'" y="'+o.n(v)+'" '+g+" "+rn(o,y)+">"+et(p.text)+"</text>")}if(p.textDecoration=="underline"||p.textDecoration=="line-through"){let v=1,M=1,C=p.height,T=p.offsetX;switch(n.textAlign){case"right":case"end":T-=p.width;break;case"center":T-=p.width/2;break}if(p.style)switch(Tt.getTextStyle(p.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":v=2;break}C&&(M=C/20);let S;if(p.textDecoration=="line-through"?S=v+_.offsetY+p.offsetY-p.height/2:S=v+M*1.5+_.offsetY+p.offsetY,S=Math.floor(S)+.5,!isFinite(S)||!isFinite(T)||!isFinite(p.width))return;let D='stroke="#000"';p.fill?D=o.color("stroke",p.fill.toCSS()):n.fill instanceof L&&(D=o.color("stroke",n.fill.toCSS())),m.push('<path d="M'+o.n(T)+" "+o.n(S)+"L"+o.n(T+p.width)+" "+o.n(S)+'" fill="none" '+D+' stroke-width="'+o.n(v*M)+'"/>')}}})}),m.length==1&&!o.live&&/^<text /.test(m[0])&&d.indexOf(" style=")==-1?s.push("<text"+d+m[0].slice(5)):m.length&&s.push("<g"+d+">"+m.join("")+"</g>")}function en(o,t,e){if(o.live)return e;let i=o._fonts.get(e);return i===void 0&&(i=Er(t._renderer._textContext(t),e),o._fonts.set(e,i)),i}function sn(o,t,e,i){let s=i+" "+e,r=o._shifts.get(s);return r===void 0&&(r=$r(t._renderer._textContext(t),e,i),o._shifts.set(s,r)),r}var qn=/^(.*?)\s*(\d*\.?\d+(?:px|pt|pc|in|cm|mm|q|r?em|%|ex|ch|v[wh]))(?:\/\S+)?\s+(.+)$/i;function rn(o,t){let e=o.live?null:qn.exec(t.trim());if(!e)return'style="font:'+et(t)+';white-space:pre"';let i='font-family="'+et(e[3])+'" font-size="'+et(e[2])+'"';return w(e[1].split(/\s+/),s=>{/^(bold|bolder|lighter|\d{3})$/i.test(s)?i+=' font-weight="'+s+'"':/^(italic|oblique)$/i.test(s)?i+=' font-style="'+s+'"':/^small-caps$/i.test(s)&&(i+=' font-variant="'+s+'"')}),i+' style="white-space:pre"'}function Kn(o,t,e,i,s,r,n,a,h){let c=[];t._eachGlyph(e,(l,d,u)=>{if(!isFinite(u))return;let f=en(o,t,l.style||i),m=l.fill?o.color("fill",l.fill.toCSS()):s,_=o.live?' dominant-baseline="central"':"",p=o.live?u:u+sn(o,t,f,"middle");c.push('<text transform="rotate('+o.n(d*Gt)+')" x="0" y="'+o.n(p)+'" text-anchor="middle"'+_+" "+m+" "+rn(o,f)+">"+et(l.text)+"</text>")}),c.length&&h.push("<g"+je(o,t,r,n,a)+">"+c.join("")+"</g>")}function Zn(o,t,e,i,s){let r=t.image;if(!r||t.tainted&&!o.live)return;let n=t.width||r.naturalWidth,a=t.height||r.naturalHeight;if(!isFinite(n)||!isFinite(a))return;let h;t.shadowColor&&(h=o.shadow(t.shadowColor.toCSS(t.shadowOpacity!=null?t.shadowOpacity:1),t.shadowBlur||0,t.shadowOffsetX||0,t.shadowOffsetY||0,t._matrix,{left:0,top:0,right:n,bottom:a})),s.push("<image"+je(o,t,e,i,h)+' width="'+o.n(n)+'" height="'+o.n(a)+'" '+o.href+'="'+et(r.src)+'" preserveAspectRatio="none"/>')}function nn(o,t,e,i,s,r,n){if(!t.visible||t.exportable===!1&&!o.live&&!o.nonExportable)return;t._setMatrix(),t._layer&&(i=t._layer);let a=s*t.alpha;if(a>=0&&a<=1&&(s=a),s<=0&&!o.live)return;t.filter&&(r=t.filter);let h=[];if(t instanceof pt)w(t._children,l=>{nn(o,l,e,i,s,r,h)});else if(i===e&&isFinite(t._matrix.tx)&&isFinite(t._matrix.ty)&&isFinite(t._matrix.a)){let l=[];t instanceof nt?ji(o,t,s,r,l):t instanceof mt?jn(o,t,s,r,l):t instanceof gt&&Zn(o,t,s,r,l),l.length&&h.push({node:t,markup:l.join("")})}let c=o.live?void 0:t.exportName;if(c&&h.length){let l=h;t.mask&&(t.mask._setMatrix(),l=[{node:t,clip:o.clip(t.mask),items:h}]),n.push({node:t,markup:Jn(qs(l),c)});return}if(h.length){let l=t.mask;l?(l._setMatrix(),n.push({node:t,clip:o.clip(l),items:h})):w(h,d=>{n.push(d)})}}function Jn(o,t){let e=' data-name="'+et(t)+'"',i=0,s=0,r=/<(\/?)[a-zA-Z][^>]*?(\/?)>/g,n;for(;n=r.exec(o);)n[1]?i--:n[2]?i==0&&s++:(i==0&&s++,i++);return s==1&&!/^<[^>]* data-name="/.test(o)?o.replace(/^<([a-zA-Z][\w:-]*)/,(a,h)=>"<"+h+e):"<g"+e+">"+o+"</g>"}function Us(o,t,e,i,s=1){let r=[];return nn(o,t,e,i,s,void 0,r),r}function js(o){return"url(#"+o+")"}function qs(o){return o.map(t=>"items"in t?'<g clip-path="'+js(t.clip)+'">'+qs(t.items)+"</g>":t.markup).join("")}function Ks(o){return o?"isolation:isolate":""}function Qn(o,t={}){let e,i=t.width,s=t.height,r=t.title;if(o instanceof Ut)e=o;else{let _="_rootContainer"in o?o:o._root;r==null&&(r=_.settings.ariaLabel);let p=_._rootContainer._display;e="_rootContainer"in o?p:o._display,_._renderer.render(p),("_rootContainer"in o?o._rootContainer:o)._nameForExport(),i==null&&(i=_.width()||_._rootContainer.width()),s==null&&(s=_.height()||_._rootContainer.height())}let n=new _i(t.idPrefix!=null?t.idPrefix:"am5-"),a=new yi(t.precision!=null?t.precision:3,n);a.nonExportable=!!t.includeNonExportable;let h=e._renderer,c=[],l=e.getLayer(),d=1;for(let _=e._parent;_;_=_._parent)_.alpha>=0&&_.alpha<=1&&(d*=_.alpha);w(h.layers,_=>{if(_.visible){a.blend=!1;let p=qs(Us(a,e,_,l,d));p&&c.push(a.blend?'<g class="am5-layer-'+_.order+'" style="'+Ks(!0)+'">'+p+"</g>":p)}});let u=a.n(i||0),f=a.n(s||0),m=a.defsMarkup();return'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+u+'" height="'+f+'" viewBox="0 0 '+u+" "+f+'" role="img">'+(r?"<title>"+et(r)+"</title>":"")+(m?"<defs>"+m+"</defs>":"")+(t.background?'<rect width="'+u+'" height="'+f+'" '+a.color("fill",t.background)+' aria-hidden="true"/>':"")+(c.length?'<g data-name="Chart" aria-hidden="true">'+c.join("")+"</g>":"")+"</svg>"}var Zs=class{constructor(){this.bounds={left:1/0,top:1/0,right:-1/0,bottom:-1/0},this._x=0,this._y=0,this._startX=0,this._startY=0}_add(t,e){let i=this.bounds;t<i.left&&(i.left=t),t>i.right&&(i.right=t),e<i.top&&(i.top=e),e>i.bottom&&(i.bottom=e)}_to(t,e){this._add(t,e),this._x=t,this._y=e}moveTo(t,e){this._to(t,e),this._startX=t,this._startY=e}lineTo(t,e){this._to(t,e)}closePath(){this._x=this._startX,this._y=this._startY}rect(t,e,i,s){this._add(t+i,e+s),this.moveTo(t,e)}arc(t,e,i,s,r,n){this._add(t-i,e-i),this._add(t+i,e+i),this._to(t+i*Math.cos(r),e+i*Math.sin(r))}arcTo(t,e,i,s,r){let n=this._x-t,a=this._y-e,h=i-t,c=s-e,l=Math.sqrt(n*n+a*a),d=Math.sqrt(h*h+c*c),u=n*c-a*h;if(l===0||d===0||u===0||r===0){this._to(t,e);return}let f=(n*h+a*c)/(l*d),m=r*Math.sqrt((1+f)/(1-f));this._add(t,e),this._add(t+n/l*m,e+a/l*m),this._to(t+h/d*m,e+c/d*m)}ellipse(t,e,i,s,r,n,a,h){let c=Math.max(i,s);this._add(t-c,e-c),this._add(t+c,e+c);let l=i*Math.cos(a),d=s*Math.sin(a);this._to(t+l*Math.cos(r)-d*Math.sin(r),e+l*Math.sin(r)+d*Math.cos(r))}bezierCurveTo(t,e,i,s,r,n){this._add(t,e),this._add(i,s),this._to(r,n)}quadraticCurveTo(t,e,i,s){this._add(t,e),this._to(i,s)}},qi=class{constructor(){this._force=0,this._clipPaths=new Map,this._images=new WeakMap}invalidate(){this._entries=void 0,this._clipPaths.clear()}hit(t,e,i){this._entries||(this._entries=this._collect(t,e));let s=this._entries;for(let r=s.length-1;r>=0;--r){let n=s[r];if(!n.node.isDisposed()&&this._hitNode(n,i)&&this._inClips(n.clips,i))return n.node}}_getContext(){if(!this._context){let t=document.createElement("canvas");t.width=1,t.height=1,this._context=t.getContext("2d")}return this._context}_collect(t,e){let i={};this._force=0,this._walk(t,null,e,void 0,i);let s=Object.keys(i).map(Number).sort((n,a)=>n-a),r=[];return w(s,n=>{w(i[n],a=>{r.push(a)})}),r}_walk(t,e,i,s,r){if(!t.visible)return;t._setMatrix();let n=t.inactive==null?e:t.inactive,a=t._layer||i,h=!n&&(t.interactive||this._force>0),c=t.mask;if(c&&(t instanceof pt&&t.interactiveChildren||h)&&(c._setMatrix(),s=s?s.concat([c]):[c]),t instanceof pt){let l=t.interactive&&t.interactiveChildren;l&&++this._force,w(t._children,d=>{this._walk(d,n,a,s,r)}),l&&--this._force}else if(h&&this._onGhost(t)){let l=a.order||0;if(l>=0){let d=r[l];d||(d=r[l]=[]),d.push({node:t,clips:s})}}}_onGhost(t){return t instanceof nt||t instanceof at&&t.textType=="circular"?!0:t instanceof mt?t.interactive:t instanceof gt?t.interactive&&!!t.image:!1}_hitNode(t,e){let i=t.node,s=i._matrix.applyInverse(e),r=s.x,n=s.y;if(!isFinite(r)||!isFinite(n))return!1;if(i instanceof nt)return this._hitGraphics(t,i,r,n);if(i instanceof at&&i.textType=="circular")return this._hitCircularText(i,r,n);if(i instanceof mt){let a=i._textBounds;return i.textVisible&&!!i._textInfo&&!!a&&r>=a.left&&r<=a.right&&n>=a.top&&n<=a.bottom}else if(i instanceof gt)return this._hitImage(i,r,n);return!1}_hitGraphics(t,e,i,s){let r=e._data.ops,n=t.bounds;if(!n){let l=new Zs,d=1;w(r,u=>{u.type==="lineStyle"&&(d=Math.max(d,u.width*5)),u.path(l)}),n=t.bounds=l.bounds,n.left-=d,n.top-=d,n.right+=d,n.bottom+=d}if(i<n.left||i>n.right||s<n.top||s>n.bottom)return!1;let a=this._getContext();a.save();let h=new Path2D,c=!1;return fe(r,l=>{switch(l.type){case"beginPath":h=new Path2D;break;case"endFill":c=a.isPointInPath(h,i,s);break;case"endStroke":c=a.isPointInStroke(h,i,s);break;case"lineStyle":a.lineWidth=l.width,l.lineJoin&&(a.lineJoin=l.lineJoin),l.lineCap&&(a.lineCap=l.lineCap);break;case"lineDash":a.setLineDash(l.dash);break;case"lineDashOffset":a.lineDashOffset=l.dashOffset;break;default:l.path(h)}return!c}),a.restore(),c}_hitCircularText(t,e,i){if(!t.textVisible||!t._textInfo)return!1;let s=!1;return t._eachGlyph(t._inward(),(r,n,a,h)=>{if(!s){let c=Math.cos(n),l=Math.sin(n),d=e*c+i*l,u=-e*l+i*c;s=Math.abs(d)<=r.width/2&&Math.abs(u-a)<=h/2}}),s}_hitImage(t,e,i){let s=t.image;if(!s)return!1;let r=t.width||s.naturalWidth,n=t.height||s.naturalHeight;if(e<0||i<0||e>=r||i>=n)return!1;let a=this._images.get(t);if((!a||a.image!==s||a.width!==r||a.height!==n)&&(a={image:s,width:r,height:n,data:ta(s,r,n)},this._images.set(t,a)),!a.data)return!0;let h=(Math.floor(i)*Math.floor(r)+Math.floor(e))*4+3;return a.data[h]===255}_inClips(t,e){if(!t)return!0;let i=this._getContext(),s=!0;return fe(t,r=>{let n=this._clipPaths.get(r);if(!n){n=new Path2D;let h=n;w(r._data.ops,c=>{c.path(h)}),this._clipPaths.set(r,n)}let a=r._matrix.applyInverse(e);return s=i.isPointInPath(n,a.x,a.y),s}),s}};function ta(o,t,e){let i=document.createElement("canvas");i.width=t,i.height=e;let s=i.getContext("2d",{willReadFrequently:!0});s.imageSmoothingEnabled=!1,s.drawImage(o,0,0,t,e);try{return s.getImageData(0,0,i.width,i.height).data}catch{return null}}var qe="http://www.w3.org/2000/svg",ea=0,Js=class{constructor(t,e){this.element=t,this.order=0,this.visible=!0,this.dirty=!0,this._defsElement=document.createElementNS(qe,"defs"),this._defElements=new Map,this._content=document.createElementNS(qe,"g"),this._leaves=new Map,this._clips=new Map,this._defs=new _i(e),t.appendChild(this._defsElement),t.appendChild(this._content)}resize(t,e){this.width!=null&&(t=this.width),this.height!=null&&(e=this.height);let i=this.margin||{left:0,right:0,top:0,bottom:0},s=String(t+i.left+i.right),r=String(e+i.top+i.bottom),n=this.element;n.setAttribute("x",String(-i.left)),n.setAttribute("y",String(-i.top)),n.setAttribute("width",s),n.setAttribute("height",r),n.setAttribute("viewBox",-i.left+" "+-i.top+" "+s+" "+r)}},Qs=class extends _e{constructor(t){super(),this.view=document.createElement("div"),this._svg=document.createElementNS(qe,"svg"),this._id=++ea,this._realWidth=0,this._realHeight=0,this._calculatedWidth=0,this._calculatedHeight=0,this.layers=[],this.defaultLayer=this.getLayer(0),this._hitTester=new qi,this._measureCanvas=document.createElement("canvas"),this._measureContext=this._measureCanvas.getContext("2d"),this._parser=document.createElementNS(qe,"g"),t==null?this.resolution=window.devicePixelRatio:this.resolution=t,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true");let e=this._svg;e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.overflow="visible",e.style.direction="ltr",e.style.willChange="transform",e.style.setProperty("user-select","none"),e.style.setProperty("-webkit-user-select","none"),this.view.appendChild(e);let i=this._measureCanvas;i.width=0,i.height=0,i.style.position="absolute",i.style.visibility="hidden",this.view.appendChild(i),this._disposers.push(new it(()=>{w(this.layers,s=>{s._canvas&&(s._canvas.width=0,s._canvas.height=0)}),this.view.innerHTML=""})),this._disposers.push(ve(()=>{t==null&&(this.resolution=window.devicePixelRatio)})),this._interaction=new Me(this),this._disposers.push(this._interaction)}get interactionsEnabled(){return this._interaction.interactionsEnabled}set interactionsEnabled(t){this._interaction.interactionsEnabled=t}get tapToActivate(){return this._interaction.tapToActivate}set tapToActivate(t){this._interaction.tapToActivate=t}get tapToActivateTimeout(){return this._interaction.tapToActivateTimeout}set tapToActivateTimeout(t){this._interaction.tapToActivateTimeout=t}get debugGhostView(){return!1}set debugGhostView(t){}createLinearGradient(t,e,i,s){return new Lt(t,e,i,s)}createRadialGradient(t,e,i,s,r,n){return new Ft(t,e,i,s,r,n)}createPattern(t,e,i,s,r){return new kt(this._snapshot(t),this._snapshot(e),i,s,r)}_snapshot(t){let e=new nt(this);return e._data.ops=t._data.ops.slice(),e.visible=t.visible,e.alpha=t.alpha,e.compoundAlpha=t.compoundAlpha,e.x=t.x,e.y=t.y,e.angle=t.angle,e.scale=t.scale,e.pivot.x=t.pivot.x,e.pivot.y=t.pivot.y,e.crisp=t.crisp,e.filter=t.filter,e.blendMode=t.blendMode,e}createRasterPattern(t,e){if(!t.width||!t.height)return null;let i=document.createElement("canvas");return i.width=t.width,i.height=t.height,i.getContext("2d").drawImage(t,0,0),new Dt(i,e)}makeContainer(){return new pt(this)}makeGraphics(){return new nt(this)}makeText(t,e){return new mt(this,t,e)}makeTextStyle(){return new ke}makeRadialText(t,e){return new at(this,t,e)}makePicture(t){return new gt(this,t)}resize(t,e,i,s){this._realWidth=t,this._realHeight=e,this._calculatedWidth=i,this._calculatedHeight=s,w(this.layers,r=>{r.dirty=!0,r.resize(i,s),this._resizeCanvas(r)}),this.view.style.width=i+"px",this.view.style.height=s+"px",this._svg.setAttribute("width",String(i)),this._svg.setAttribute("height",String(s))}getLayerByOrder(t){let e=this.layers,i=e.length;for(let s=0;s<i;s++){let r=e[s];if(r.order==t)return r}}getLayer(t,e=!0){let i=this.getLayerByOrder(t);if(i)return i;let s=document.createElementNS(qe,"svg");s.setAttribute("class","am5-layer-"+t),s.setAttribute("overflow","hidden"),s.setAttribute("pointer-events","none");let r=new Js(s,"am5s"+this._id+"l"+String(t).replace(/[^\w]/g,"_")+"-");r.order=t,r.visible=e,r.resize(this._calculatedWidth,this._calculatedHeight);let n=this.layers;n.push(r),n.sort((h,c)=>h.order-c.order);let a=n[vi(n,r)+1];return a===void 0?this._svg.appendChild(s):this._svg.insertBefore(s,a.element),this._applyVisible(r),r}_applyVisible(t){t.visible?t.element.removeAttribute("display"):t.element.setAttribute("display","none")}render(t){this._root=t,w(this.layers,e=>{e.dirty&&e.visible&&(this._renderLayer(t,e),e.dirty=!1)}),this._hitTester.invalidate(),this._interaction.afterRender()}_renderLayer(t,e){let i=e._defs;i.begin();let s=new yi(3,i,this.resolution,!0),r=Us(s,t,e,this.defaultLayer),n=new Map,a=new Map,h=[];if(this._match(e,r,n,a,h),e._leaves.forEach((l,d)=>{n.get(d)!==l&&w(l.elements,u=>{u.remove()})}),e._clips.forEach((l,d)=>{a.get(d)!==l&&l.element.remove()}),h.length){let l=this._parse(h.map(d=>"<g>"+d.markup+"</g>"));w(h,(d,u)=>{d.elements=Array.prototype.slice.call(l[u].children)})}this._place(e._content,r,n,a),e._leaves=n,e._clips=a,this._syncDefs(e),i.sweep();let c=Ks(s.blend);c?e.element.setAttribute("style",c):e.element.removeAttribute("style")}_match(t,e,i,s,r){w(e,n=>{if("items"in n){let a=t._clips.get(n.node);a||(a={clip:"",element:document.createElementNS(qe,"g")}),a.clip!==n.clip&&(a.clip=n.clip,a.element.setAttribute("clip-path",js(n.clip))),s.set(n.node,a),this._match(t,n.items,i,s,r)}else{let a=t._leaves.get(n.node);(!a||a.markup!==n.markup)&&(a={markup:n.markup,elements:[]},r.push(a)),i.set(n.node,a)}})}_place(t,e,i,s){let r=t.firstChild,n=a=>{a===r?r=r.nextSibling:t.insertBefore(a,r)};for(w(e,a=>{if("items"in a){let h=s.get(a.node);this._place(h.element,a.items,i,s),n(h.element)}else w(i.get(a.node).elements,n)});r;){let a=r.nextSibling;t.removeChild(r),r=a}}_syncDefs(t){let e=t._defs,i=e.used,s=t._defElements;s.forEach((n,a)=>{i.has(a)||(n.remove(),s.delete(a))});let r=[];if(i.forEach(n=>{s.has(n)||r.push(n)}),r.length){let n=this._parse(r.map(a=>e.withId(a)));w(r,(a,h)=>{let c=n[h];t._defsElement.appendChild(c),s.set(a,c)})}}_parse(t){let e=this._parser;e.innerHTML=t.join("");let i=Array.prototype.slice.call(e.children);return e.innerHTML="",i}_removeObject(t){this._hitTester.invalidate()}_useLayer(t,e){let s=this.getLayer(t,!0);return s.visible=!0,s.margin=e,s.dirty=!0,s.resize(this._calculatedWidth,this._calculatedHeight),this._applyVisible(s),s}_layerCanvas(t){let e=t;if(!e._canvas){let i=document.createElement("canvas");i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.pointerEvents="none",e._canvas=i,this._resizeCanvas(e),this.view.appendChild(i)}return e._canvas}_resizeCanvas(t){let e=t._canvas;e&&(e.width=Math.floor(this._calculatedWidth*this.resolution),e.height=Math.floor(this._calculatedHeight*this.resolution),e.style.width=this._calculatedWidth+"px",e.style.height=this._calculatedHeight+"px")}_textContext(t){return this._measureContext}_measureText(t){let e=this._measureContext,i=t.style,s=t instanceof at&&t.textType=="circular";s&&(t._textReversed=!1),e.save(),e.font=t._getFontStyle(void 0,s?!1:Si()),i.textAlign&&(e.textAlign=i.textAlign),i.direction&&(e.direction=i.direction),i.textBaseline&&(e.textBaseline=i.textBaseline);let r=t._layoutState(),n=h=>t._getFontStyle(h),a=s?Ei(e,t.text,i,n,r):Di(e,t.text,i,n,r);if(t._applyLayoutState(r),!s&&["truncate","wrap","wrap-no-break"].indexOf(i.oversizedBehavior||"")>-1){let h=t._getFontStyle();w(r.lines,c=>{w(c.textChunks,l=>{if(l.textDecoration=="underline"||l.textDecoration=="line-through"){e.font=l.style||h;let d=ki(l.text,e,i);l.width=d.actualBoundingBoxLeft+d.actualBoundingBoxRight}})})}return e.restore(),t._textBounds=a,a}_margin(){let t={left:0,right:0,top:0,bottom:0};return w(this.layers,e=>{e.margin&&(t.left=Math.max(t.left,e.margin.left),t.right=Math.max(t.right,e.margin.right),t.top=Math.max(t.top,e.margin.top),t.bottom=Math.max(t.bottom,e.margin.bottom))}),t}getEvent(t,e=!0){let i=this.view.getBoundingClientRect(),s=t.clientX||0,r=t.clientY||0,n=this._calculatedWidth/(i.width||this._realWidth),a=this._calculatedHeight/(i.height||this._realHeight),h={x:s-i.left,y:r-i.top},c={x:(s-(e?i.left:0))*n,y:(r-(e?i.top:0))*a},l=this._margin();return new fi(t,h,c,new DOMRect(-l.left,-l.top,i.width+l.left+l.right,i.height+l.top+l.bottom))}_getHitTarget(t,e,i){if(e.width===0||e.height===0||t.x<e.left||t.x>e.right||t.y<e.top||t.y>e.bottom||!i||!this.view.contains(i))return;let s=this._margin(),r=this.resolution,n=Math.floor((this._calculatedWidth+s.left+s.right)*r),a=Math.floor((this._calculatedHeight+s.top+s.bottom)*r),h=Math.round((t.x-e.left)/e.width*n),c=Math.round((t.y-e.top)/e.height*a);return this._hitTest({x:(h+.5)/r-s.left,y:(c+.5)/r-s.top})||!1}_hitTest(t){if(this._root)return this._hitTester.hit(this._root,this.defaultLayer,t)}getObjectAtPoint(t){let e=this.resolution;return this._hitTest({x:(Math.round(t.x*e)+.5)/e,y:(Math.round(t.y*e)+.5)/e})}removeHovering(t){this._interaction.removeHovering(t)}resetImageArray(){}getCanvas(t,e){let i=new he(this.resolution),s=i.view;s.style.visibility="hidden",this.view.appendChild(s);try{return i.resize(this._realWidth,this._realHeight,this._calculatedWidth,this._calculatedHeight),w(this.layers,r=>{r.visible&&i._useLayer(r.order,r.margin)}),i.getCanvas(t,e)}finally{this.view.removeChild(s),i.dispose()}}};var Ke=class extends E{constructor(){super(...arguments),this.label=this.children.push(ds.new(this._root,{})),this.buttonsContainer=this.children.push(E.new(this._root,{themeTags:["buttons"]})),this.upButton=this.buttonsContainer.children.push(vt.new(this._root,{themeTags:["upbutton"]})),this.downButton=this.buttonsContainer.children.push(vt.new(this._root,{themeTags:["downbutton"]}))}_afterNew(){this.addTag("numericstepper"),this.set("layout",this._root.horizontalLayout),this.label.adapters.add("text",t=>(t&&t.replace(/\D/g,""),t===""&&(t="0"),t)),this.set("background",Yt.new(this._root,{fillOpacity:0,fill:ct(16777215)})),this.buttonsContainer.states._createC("hidden",{opacity:0,visible:!0}),this.events.on("pointerover",()=>{this.buttonsContainer.set("active",!0)}),this.events.on("pointerout",()=>{this.buttonsContainer.set("active",!1)}),this.label.on("text",t=>{if(t){let e=parseFloat(t);isNaN(e)||this.set("value",e)}}),this.upButton.events.on("click",()=>{this.set("value",this.get("value",0)+1)}),this.downButton.events.on("click",()=>{this.set("value",Math.max(0,this.get("value",0)-1))}),super._afterNew()}_updateChildren(){super._updateChildren();let t=this.get("value",0),e=this.label;if(this.isDirty("value")&&e.set("text",t.toString()),this.isDirty("disabled")){let i=this.get("disabled",!1);this.set("interactive",!i),this.upButton.set("interactive",!i),this.downButton.set("interactive",!i),i?(this.label.set("editOn","none"),this.buttonsContainer.hide(0)):(this.label.set("editOn","click"),this.buttonsContainer.show(0))}}};Ke.className="NumericStepper";Ke.classNames=E.classNames.concat([Ke.className]);var Ze=class extends E{constructor(){super(...arguments),this.circle=this.children.push(le.new(this._root,{themeTags:["background"]})),this.label=this.children.push(Mt.new(this._root,{})),this.slice=this.children.push(Pi.new(this._root,{isMeasured:!1})),this.backgroundSlice=this.children.push(Pi.new(this._root,{themeTags:["background"]}))}_afterNew(){this.addTag("progresspie"),super._afterNew()}_updateChildren(){if(super._updateChildren(),this.isDirty("width")||this.isDirty("height")||this.isDirty("radius")||this.isDirty("innerRadius")){let t=this.innerWidth(),e=this.innerHeight(),i=Pt(this.get("radius",O),Math.min(t,e)/2),s=Pt(this.get("innerRadius",lt(80)),i);this.slice.setAll({radius:i,innerRadius:s}),this.backgroundSlice.setAll({radius:i,innerRadius:s}),this.circle.set("radius",i)}if(this.isDirty("value")){let t=this.get("value",0);this.slice.set("arc",t*360),this.backgroundSlice.set("arc",360),this.label.setAll({text:this.getNumberFormatter().format(t*100,this.get("numberFormat","#'"))}),this.root.events.once("frameended",()=>{this.label.markDirtyKey("text")})}}};Ze.className="ProgressPie";Ze.classNames=E.classNames.concat([Ze.className]);var on={};hn(on,{load:()=>ia,readBlob:()=>an});function ia(o,t,e){return new Promise((i,s)=>{let r=e!=null&&e.responseType=="blob",n=new XMLHttpRequest;if(n.onload=()=>{if(n.status===200){let a,h;if(r){h=n.response,an(h).then(l=>{let d={xhr:n,error:!1,response:l,blob:h,type:n.getResponseHeader("Content-Type"),target:t};i(d)},()=>{s({xhr:n,error:!0,blob:h,type:n.getResponseHeader("Content-Type"),target:t})});return}else a=n.responseText||n.response;let c={xhr:n,error:!1,response:a,blob:h,type:n.getResponseHeader("Content-Type"),target:t};i(c)}else s({xhr:n,error:!0,type:n.getResponseHeader("Content-Type"),target:t})},n.onerror=()=>{s({xhr:n,error:!0,type:n.getResponseHeader("Content-Type"),target:t})},n.open("GET",o,!0),e&&e.withCredentials&&(n.withCredentials=!0),e!=null){if(e.requestHeaders!=null)for(let a=0;a<e.requestHeaders.length;a++){let h=e.requestHeaders[a];n.setRequestHeader(h.key,h.value)}e.responseType!=null&&(n.responseType=e.responseType)}n.send()})}function an(o){return new Promise((t,e)=>{let i=new FileReader;i.onload=s=>{t(i.result)},i.onerror=s=>{e(s)},i.readAsText(o)})}export{se as a,At as b,St as c,re as d,ae as e,oe as f,he as g,pi as h,Xi as i,De as j,Ee as k,$e as l,le as m,Pe as n,Ae as o,Le as p,Nt as q,bt as r,qt as s,Fe as t,Ne as u,vt as v,Bt as w,Be as x,Re as y,ze as z,Oe as A,He as B,Ie as C,Ge as D,ce as E,de as F,ue as G,We as H,Ye as I,Ve as J,Xe as K,Gs as L,Ws as M,Ys as N,Ue as O,Qn as P,Qs as Q,Ke as R,Ze as S,on as T};