@arcgis/charts-components 5.1.0-next.102 → 5.1.0-next.103

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 (200) hide show
  1. package/dist/cdn/{BGHKBRAY.js → 2M3QHMVT.js} +1 -1
  2. package/dist/cdn/{PECU6KQ5.js → 44WAX54V.js} +1 -1
  3. package/dist/cdn/{7RRIPRBW.js → 46FRVXGN.js} +1 -1
  4. package/dist/cdn/{2WMGX4LG.js → 4QDMPF2Z.js} +1 -1
  5. package/dist/cdn/{7BIC7WRS.js → 4QY6OX3P.js} +1 -1
  6. package/dist/cdn/535EYM2S.js +2 -0
  7. package/dist/cdn/{JP5QECNE.js → 5ICPKLCV.js} +1 -1
  8. package/dist/cdn/{BIBH7Z6B.js → 5NDSTEEP.js} +1 -1
  9. package/dist/cdn/{ETKEDYJI.js → 5SWROIFW.js} +1 -1
  10. package/dist/cdn/{QCLX4TIM.js → 62AZBWN6.js} +1 -1
  11. package/dist/cdn/6CU5NNEB.js +2 -0
  12. package/dist/cdn/{4A46GMQH.js → 6Q3U3Q2H.js} +1 -1
  13. package/dist/cdn/{2L4KRFAO.js → A3ECNKD5.js} +1 -1
  14. package/dist/cdn/AF5JNJYB.js +2 -0
  15. package/dist/cdn/AJEKA5BB.js +2 -0
  16. package/dist/cdn/{QNEGICXV.js → ANKUXKQT.js} +1 -1
  17. package/dist/cdn/{AKNI6ZDM.js → BBGJNQBF.js} +1 -1
  18. package/dist/cdn/{OXOPYUOS.js → BIJ5FJUG.js} +1 -1
  19. package/dist/cdn/{54JMGDNM.js → BTEXXB6S.js} +1 -1
  20. package/dist/cdn/{533OIYHT.js → BZX2LHXY.js} +1 -1
  21. package/dist/cdn/{VOTMKVNY.js → CFK5YLDQ.js} +1 -1
  22. package/dist/cdn/{KHK4ESCR.js → CGCD4ZJD.js} +1 -1
  23. package/dist/cdn/{GCLBISUU.js → CKH3BOED.js} +1 -1
  24. package/dist/cdn/{KZQPT32K.js → CMNWBPPD.js} +1 -1
  25. package/dist/cdn/{KDU3ISRJ.js → CYE4O6RG.js} +1 -1
  26. package/dist/cdn/{GG4V6IWC.js → DDBIFHQ7.js} +1 -1
  27. package/dist/cdn/{PE5WVBYF.js → DG75GFE6.js} +1 -1
  28. package/dist/cdn/E45G67GV.js +2 -0
  29. package/dist/cdn/{PSDHB4WG.js → EEHJJR7J.js} +1 -1
  30. package/dist/cdn/{3NHSJC2V.js → EP2F4RUL.js} +1 -1
  31. package/dist/cdn/{ZAKAJKUI.js → ER7YWWC3.js} +1 -1
  32. package/dist/cdn/{LTPICGE4.js → EYWFMAWS.js} +1 -1
  33. package/dist/cdn/FJJG6LPW.js +2 -0
  34. package/dist/cdn/{FTTFIYT7.js → FN5G5OOX.js} +1 -1
  35. package/dist/cdn/{FSPMT24F.js → GAFM4W2B.js} +1 -1
  36. package/dist/cdn/GIHLPFOY.js +2 -0
  37. package/dist/cdn/{M6AWZ4GQ.js → GRNTZDIK.js} +1 -1
  38. package/dist/cdn/{V3TCGIPS.js → H3TCGWEI.js} +1 -1
  39. package/dist/cdn/H63HCQMI.js +2 -0
  40. package/dist/cdn/{J34XNLVV.js → H6LVCGA4.js} +1 -1
  41. package/dist/cdn/{DQOPCAYH.js → H6TOBMQF.js} +1 -1
  42. package/dist/cdn/{JIJTDQNZ.js → HEYOWQCI.js} +1 -1
  43. package/dist/cdn/{B5DED64I.js → HMDNWF2T.js} +1 -1
  44. package/dist/cdn/I7H423CV.js +2 -0
  45. package/dist/cdn/{TQG6RDX5.js → IDQW4OK4.js} +1 -1
  46. package/dist/cdn/IJUUEUTT.js +2 -0
  47. package/dist/cdn/{GN55TJMJ.js → INB2MMTY.js} +1 -1
  48. package/dist/cdn/{3TYKSX6S.js → JEF5BVP6.js} +1 -1
  49. package/dist/cdn/{NLPIWZ6O.js → JEM2CP4Y.js} +1 -1
  50. package/dist/cdn/{4AP7OF2H.js → JHGTT4HB.js} +1 -1
  51. package/dist/cdn/{HZLHE35F.js → JUJS6BOX.js} +1 -1
  52. package/dist/cdn/JYGAEK3T.js +2 -0
  53. package/dist/cdn/K2C6GCAV.js +55 -0
  54. package/dist/cdn/{N72JHWOW.js → K4LPGEHO.js} +1 -1
  55. package/dist/cdn/K7V2MBUM.js +7 -0
  56. package/dist/cdn/{LRLFI235.js → KRVRR3HB.js} +1 -1
  57. package/dist/cdn/{OM2N4R7B.js → KVDSHZQG.js} +1 -1
  58. package/dist/cdn/{TNXVGUYE.js → KZCTSDC2.js} +1 -1
  59. package/dist/cdn/{CBAUBDVW.js → L5JTMR43.js} +1 -1
  60. package/dist/cdn/LHTFQV7O.js +2 -0
  61. package/dist/cdn/LLANAZ4Q.js +2 -0
  62. package/dist/cdn/{GR2MDXNR.js → MQO74O3S.js} +1 -1
  63. package/dist/cdn/{ZIAGMMWU.js → MXZL7L2M.js} +1 -1
  64. package/dist/cdn/{R2R6BF6O.js → N7JN65PM.js} +1 -1
  65. package/dist/cdn/{OGYHFMDK.js → NWPL6PSS.js} +1 -1
  66. package/dist/cdn/{JII3X6GD.js → OGGI5CEA.js} +1 -1
  67. package/dist/cdn/{L5ESAQAD.js → P67VCX5W.js} +1 -1
  68. package/dist/cdn/{NJOCWENE.js → PYKI26OB.js} +1 -1
  69. package/dist/cdn/{GSIQ3AM5.js → QK3GTNUN.js} +4 -4
  70. package/dist/cdn/{TCJ5YAK5.js → QKGJQWIQ.js} +1 -1
  71. package/dist/cdn/{QQNMK2QL.js → RKJFPB3U.js} +1 -1
  72. package/dist/cdn/{UOUARC5O.js → S35W77ES.js} +1 -1
  73. package/dist/cdn/{ZNOJBKUZ.js → SM3SJU22.js} +1 -1
  74. package/dist/cdn/{3LHIBPWU.js → SPUI6X3I.js} +1 -1
  75. package/dist/cdn/{QCNYOXG2.js → SRHPUOHT.js} +1 -1
  76. package/dist/cdn/{Y4DORYPQ.js → TTJJB2VV.js} +1 -1
  77. package/dist/cdn/{ABRBND33.js → UH2EHXZV.js} +1 -1
  78. package/dist/cdn/{XEDWXXF3.js → UKJA76JU.js} +1 -1
  79. package/dist/cdn/{DOKKZWPP.js → VB6ZKRJB.js} +1 -1
  80. package/dist/cdn/{JQAYCBRF.js → VTQOCGLJ.js} +1 -1
  81. package/dist/cdn/{BYMLWT4F.js → W2GLPAXC.js} +1 -1
  82. package/dist/cdn/{SCVQSDX5.js → WJNLW2T7.js} +1 -1
  83. package/dist/cdn/{SXLPETPI.js → WR7AZUEI.js} +1 -1
  84. package/dist/cdn/{WMLNHOVN.js → WV47SKDM.js} +1 -1
  85. package/dist/cdn/{N3QESBWD.js → XLSZ2F32.js} +1 -1
  86. package/dist/cdn/{C6VFUQYR.js → XTNNL4PR.js} +1 -1
  87. package/dist/cdn/{6WQO34EX.js → Y26KONXO.js} +1 -1
  88. package/dist/cdn/{437PRHGP.js → Z3XJ2MY2.js} +1 -1
  89. package/dist/cdn/{FXE7IJTK.js → ZAF4OPMM.js} +1 -1
  90. package/dist/cdn/{7JYYEL7C.js → ZYA35QY2.js} +1 -1
  91. package/dist/cdn/index.js +1 -1
  92. package/dist/chunks/bar-chart-model.js +8 -8
  93. package/dist/chunks/bar-chart-series.js +6 -6
  94. package/dist/chunks/box-plot-data.js +34 -32
  95. package/dist/chunks/box-plot-model.js +115 -107
  96. package/dist/chunks/chart-model.js +7 -7
  97. package/dist/chunks/chart-ui-utils2.js +4 -4
  98. package/dist/chunks/data-labels-visibility.js +5 -5
  99. package/dist/chunks/data.js +11 -11
  100. package/dist/chunks/gauge-model.js +6 -6
  101. package/dist/chunks/generate-x-axis-title.js +5 -5
  102. package/dist/chunks/heat-chart-model.js +9 -9
  103. package/dist/chunks/histogram-data.js +5 -5
  104. package/dist/chunks/index.js +5565 -5489
  105. package/dist/chunks/index2.js +1 -1
  106. package/dist/chunks/interfaces.js +5 -5
  107. package/dist/chunks/line-chart-model.js +23 -23
  108. package/dist/chunks/model-setter.js +35 -34
  109. package/dist/chunks/model-with-y-guides.js +5 -5
  110. package/dist/chunks/negative-values-stacked-to-baseline.js +6 -6
  111. package/dist/chunks/pie-chart-data.js +15 -15
  112. package/dist/chunks/pie-chart-model.js +42 -41
  113. package/dist/chunks/radar-chart-model.js +7 -7
  114. package/dist/chunks/rotated-state.js +5 -5
  115. package/dist/chunks/scatterplot-model.js +6 -6
  116. package/dist/chunks/serial-chart-data.js +334 -320
  117. package/dist/chunks/serial-chart-model.js +148 -139
  118. package/dist/chunks/series-length.js +11 -11
  119. package/dist/chunks/series.js +6 -6
  120. package/dist/chunks/setup-utils.js +26 -25
  121. package/dist/chunks/time-zone.js +1 -1
  122. package/dist/chunks/type-guards2.js +20 -19
  123. package/dist/chunks/utils.js +108 -105
  124. package/dist/chunks/utils2.js +6 -6
  125. package/dist/chunks/web-component-utils.js +6816 -436
  126. package/dist/chunks/x-bounds.js +5 -5
  127. package/dist/components/arcgis-chart/customElement.d.ts +1 -0
  128. package/dist/components/arcgis-chart/customElement.js +9585 -15607
  129. package/dist/components/arcgis-charts-action-bar/customElement.js +1 -1
  130. package/dist/components/arcgis-charts-config-bar-chart/customElement.js +6 -6
  131. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +7 -7
  132. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +4 -4
  133. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +7 -7
  134. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +6 -6
  135. package/dist/components/arcgis-charts-config-box-plot/customElement.js +6 -6
  136. package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +5 -5
  137. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +4 -4
  138. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +6 -6
  139. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +6 -6
  140. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +6 -6
  141. package/dist/components/arcgis-charts-config-create-flow/customElement.js +3 -2
  142. package/dist/components/arcgis-charts-config-font-style/customElement.js +6 -6
  143. package/dist/components/arcgis-charts-config-format/customElement.js +5 -5
  144. package/dist/components/arcgis-charts-config-format-popover/customElement.js +6 -6
  145. package/dist/components/arcgis-charts-config-general/customElement.js +5 -5
  146. package/dist/components/arcgis-charts-config-guide/customElement.js +11 -11
  147. package/dist/components/arcgis-charts-config-guide-popover/customElement.js +5 -5
  148. package/dist/components/arcgis-charts-config-guides-type-popover/customElement.js +6 -6
  149. package/dist/components/arcgis-charts-config-heat-chart/customElement.js +6 -6
  150. package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +6 -6
  151. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +6 -6
  152. package/dist/components/arcgis-charts-config-histogram/customElement.js +6 -6
  153. package/dist/components/arcgis-charts-config-histogram-data/customElement.js +6 -6
  154. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +4 -4
  155. package/dist/components/arcgis-charts-config-line-chart/customElement.js +6 -6
  156. package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +4 -4
  157. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +4 -4
  158. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +6 -6
  159. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +6 -6
  160. package/dist/components/arcgis-charts-config-pie-chart/customElement.js +6 -6
  161. package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +5 -5
  162. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +5 -5
  163. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +5 -5
  164. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +6 -6
  165. package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +6 -6
  166. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +5 -5
  167. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +4 -4
  168. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +6 -6
  169. package/dist/components/arcgis-charts-config-view-charts/customElement.js +6 -6
  170. package/dist/components/arcgis-charts-info-modal/customElement.js +6 -6
  171. package/dist/docs/api.json +1 -1
  172. package/dist/docs/docs.json +1 -1
  173. package/dist/docs/vscode.html-custom-data.json +1 -1
  174. package/dist/docs/web-types.json +1 -1
  175. package/dist/model/box-plot-model/box-plot-model.d.ts +12 -12
  176. package/dist/model/chart-model/chart-model-base.d.ts +2 -2
  177. package/dist/model/interfaces/chart-interfaces.d.ts +5 -2
  178. package/dist/model/line-chart-model/line-chart-model.d.ts +3 -3
  179. package/dist/model/pie-chart-model/pie-chart-model.d.ts +6 -6
  180. package/dist/model/properties/axes/x-axis/x-bounds.d.ts +2 -3
  181. package/dist/model/shared/setup-utils.d.ts +5 -2
  182. package/dist/utils/data/categorical-data/index.d.ts +3 -1
  183. package/dist/utils/data/index.d.ts +3 -3
  184. package/dist/utils/layer/query-features/index.d.ts +6 -0
  185. package/package.json +3 -3
  186. package/dist/cdn/BVLDD7VH.js +0 -2
  187. package/dist/cdn/D4THJNNH.js +0 -2
  188. package/dist/cdn/EYGUUZ64.js +0 -58
  189. package/dist/cdn/FPOY54UW.js +0 -2
  190. package/dist/cdn/FRTL3JKO.js +0 -2
  191. package/dist/cdn/HRWT2MVN.js +0 -2
  192. package/dist/cdn/JXUQXIWS.js +0 -2
  193. package/dist/cdn/KJXMX3GJ.js +0 -2
  194. package/dist/cdn/OG6XNLNH.js +0 -2
  195. package/dist/cdn/SN4BIMRO.js +0 -2
  196. package/dist/cdn/VFNQXIXU.js +0 -2
  197. package/dist/cdn/W553UCBH.js +0 -4
  198. package/dist/cdn/WTPRSRPB.js +0 -2
  199. package/dist/cdn/XOY4K5NH.js +0 -2
  200. package/dist/cdn/YEOSKZ4Q.js +0 -2
@@ -0,0 +1,55 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{c as ap}from"./FPDW4F45.js";import g from"./BBGJNQBF.js";import f from"./K4LPGEHO.js";import e from"./H63HCQMI.js";import d from"./JYGAEK3T.js";import c from"./XTNNL4PR.js";import b from"./UH2EHXZV.js";import{c as Xn,d as sf,e as uh}from"./KYO65OVO.js";import a from"./QK3GTNUN.js";import{e as oi,g as Ro,h as $y,l as Fc,m as Uu,s as Mc,t as Ku,u as xi,v as Vc,w as Ri,y as ui}from"./URX6VCYJ.js";import{c as Py}from"./6ES4YKXX.js";import{e as rf}from"./EZM4ZDQI.js";import{a as Y,b as cs,e as Ut,f as fs,h as wy,i as Rc,k as Ma,l as ha,m as Io,t as Ic,y as ei}from"./ETLJKITO.js";import{c as _y}from"./QPIMTXPL.js";export default $arcgis.t(([,,,,,,,,{substitute:R_},,,,,,,,,,,,{Ab:Xy,Ad:lv,B:Vo,Bb:xr,C:En,D:pi,Da:Ly,Db:Yy,Ec:ev,F:Sy,Fb:pr,Ga:Fy,Gd:hv,Hb:Zc,Ic:Qc,Jb:jn,Jd:uv,Kc:Hn,L:Ty,Lc:iv,Ld:pv,M:Dy,Ma:My,Mc:tf,Md:dv,N:Ra,Na:Ju,Ob:zy,Od:cv,Pa:Ia,Pb:ah,Qa:Et,Ra:q,Rd:fv,Sa:Xc,Sc:rv,Ta:Yc,Td:gs,Va:Ry,Vd:ua,Wa:Nn,Wb:Wy,Wd:mv,X:ky,Xb:Jc,Y:jc,Ya:Iy,Yb:ip,Z:Ay,Za:Eo,Zb:Gy,_a:Qu,_b:rp,ac:Ue,bd:lh,c:ih,cc:Uy,cd:hh,db:tp,dd:sv,ea:Hc,eb:ep,ed:ji,ee:gv,fa:Oy,fb:Vy,fd:av,g:ze,gc:oh,gd:ef,j:Ec,jb:Ey,jc:nh,k:Nc,kc:Ky,kd:ov,lb:zc,lc:qy,mb:Wc,mc:Zy,n:Cy,nb:Ny,ob:Gc,pb:Uc,pc:Va,qa:Zu,qb:By,qd:nv,r:qu,rb:jy,s:ms,sc:Jy,tb:Hy,tc:Qy,ub:Ct,v:rh,vb:Bn,vc:sp,w:Vn,wb:Kc,x:Bc,xb:qc,yc:tv,zb:sh},{c:af},{f:yv,g:op},{ga:nf,ha:$v,ia:lf},{k:np,l:lp,m:of,x:vv},{b:bv},{a:xv,c:_v,d:Pv}])=>{var _t=(function(){function a(e){this._value=e}return Object.defineProperty(a.prototype,"value",{get:function(){return this._value/100},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"percent",{get:function(){return this._value},enumerable:!0,configurable:!0}),a.prototype.toString=function(){return""+this._value+"%"},a})();function N(a){return new _t(a)}function hf(a){return a instanceof _t}function Ke(a){return Number(a)!==a}function wv(a){return{}.toString.call(a)}function Yn(a){if(typeof a=="string")return a;if(typeof a=="number")return""+a;throw new Error("Expected a string or number but got "+wv(a))}function xe(a){return!!a}function Wt(a){if(C(a)&&!P(a)){var e=Number(a);return Ke(e)&&vt(a)&&a!=""?Wt(a.replace(/[^0-9.\-]+/g,"")):e}return a}function di(a){if(C(a)&&!vt(a)){if(P(a))return Yn(a);if(Kt(a))return a.toString()}return a}function Cv(a){return!C(a)||P(a)||hf(a)?a:vt(a)&&a.indexOf("%")!=-1?N(Wt(a)):Wt(a)}function C(a){return a!=null}function ee(a){if(C(a))return a;throw new Error("Value doesn't exist")}function hp(a,e){return C(a)?a:e}function Ea(a){return wv(a)==="[object Date]"}function vt(a){return typeof a=="string"}function P(a){return typeof a=="number"&&Number(a)==a}function Kt(a){return typeof a=="object"&&a!=null}function oe(a){return Array.isArray(a)}var ph=Math.PI,pf=ph/2,zn=ph/180,Rs=180/ph;function pp(a,e,t){return C(a)?(a=Wt(a),J(a,e,t)):a}function H(a,e,t){if(!P(e)||e<=0){var i=Math.round(a);return t&&i-a==.5&&i--,i}else{var r=Math.pow(10,e);return Math.round(a*r)/r}}function df(a,e){if(!P(e)||e<=0)return Math.ceil(a);var t=Math.pow(10,e);return Math.ceil(a*t)/t}function J(a,e,t){if(P(e)){if(P(t)&&t<e){var i=t;t=e,e=i}a<e&&(a=e)}return P(t)&&a>t&&(a=t),a}function G(a){return H(Math.sin(zn*a),10)}function cf(a){return H(Math.tan(zn*a),10)}function U(a){return H(Math.cos(zn*a),10)}function mt(a,e){return P(a)?P(e)&&e>a?e:a:P(e)?e:null}function Pt(a,e){return P(a)?P(e)&&e<a?e:a:P(e)?e:null}function Sv(a,e){return a.reduce(function(t,i){return Math.abs(i-e)<Math.abs(t-e)?i:t})}function Wn(a,e){var t=ee(a.start),i=ee(e.start),r=ee(a.end),s=ee(e.end);return Math.max(t,i)<=Math.min(r,s)}function Gn(a){var e=ee(a.start),t=ee(a.end);return{start:1-t,end:1-e}}function Tv(a,e){var t=ee(a.start),i=ee(e.start),r=ee(a.end),s=ee(e.end),o=Math.max(t,i),n=Math.min(r,s);if(!(n<o))return{start:o,end:n}}function Mt(a,e){return a?(e||(e={x:0,y:0}),Math.sqrt(Math.pow(Math.abs(a.x-e.x),2)+Math.pow(Math.abs(a.y-e.y),2))):0}function Dv(a,e){return a?(e||(e={x:0,y:0}),Math.abs(a.x-e.x)):0}function kv(a,e){return a?(e||(e={x:0,y:0}),Math.abs(a.y-e.y)):0}function Av(a,e,t,i,r){if(!a)return 0;e||(e={x:0,y:0});var s=0,o=a;if(r>0)for(var n=0;n<=r;n++){var l=dh(a,e,t,i,n/r);s+=Mt(o,l),o=l}return s}function Ov(a,e,t,i){var r=Mt(e,i),s=Mt(a,t);return Math.abs(s/r)}function No(a,e,t){return P(t)||(t=.5),{x:a.x+(e.x-a.x)*t,y:a.y+(e.y-a.y)*t}}function Ae(a,e){e||(e={x:a.x*2,y:a.y*2});var t=e.x-a.x,i=e.y-a.y,r=Math.atan2(i,t)*Rs;return r<0&&(r+=360),Ms(r)}function Un(a){if(a){var e=a.length;if(e!==0){for(var t=void 0,i=void 0,r,s=void 0,o=0;o<e;o++){var n=a[o];(!P(i)||n.x>i)&&(i=n.x),(!P(t)||n.x<t)&&(t=n.x),(!P(r)||n.y<r)&&(r=n.y),(!P(s)||n.y>s)&&(s=n.y)}return{x:t,y:r,width:i-t,height:s-r}}}return{x:0,y:0,width:0,height:0}}function Is(a){var e=a.length;if(e!==0){for(var t=void 0,i=void 0,r=void 0,s=void 0,o=0;o<e;o++){var n=a[o];t=Pt(n.x,t),i=Pt(n.y,i),r=mt(n.x+n.width,r),s=mt(n.y+n.height,s)}return{x:t,y:i,width:r-t,height:s-i}}}function ff(a,e,t,i){var r=(1-i)*(1-i)*a.x+2*(1-i)*i*t.x+i*i*e.x,s=(1-i)*(1-i)*a.y+2*(1-i)*i*t.y+i*i*e.y;return{x:r,y:s}}function dh(a,e,t,i,r){var s={x:0,y:0},o=1-r,n=o*o,l=n*o;return s.x=a.x*l+t.x*3*n*r+i.x*3*o*r*r+e.x*r*r*r,s.y=a.y*l+t.y*3*n*r+i.y*3*o*r*r+e.y*r*r*r,s}function dp(a,e,t,i,r,s){return r=up(r),s=up(s),{x:(-a.x+e.x/r+t.x)*r,y:(-a.y+e.y/s+t.y)*s}}function cp(a,e,t,i,r,s){return r=up(r),s=up(s),{x:(e.x+t.x/r-i.x)*r,y:(e.y+t.y/s-i.y)*s}}function up(a){return 1-a+1e-5}function Ms(a){return a==360?360:a%360}function Vr(a,e,t){if(e>t){var i=e;e=t,t=i}a=Ms(a);var r=(e-Ms(e))/360;a<e&&(a+=360*(r+1));var s=e+(t-e)/2+180,o=e+(t-e)/2-180;return a>t&&(a-360>e?a-=360:a<s?a=t:a=e),a<e&&(a>o?a=e:a=t),a}function dr(a,e,t){var i=Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,o=-Number.MAX_VALUE,n=[];P(t)||(t=1),n.push(uf(t,a)),n.push(uf(t,e));for(var l=Math.min(Math.floor(a/90)*90,Math.floor(e/90)*90),h=Math.max(Math.ceil(a/90)*90,Math.ceil(e/90)*90),u=l;u<=h;u+=90)u>=a&&u<=e&&n.push(uf(t,u));for(var p=0;p<n.length;p++){var d=n[p];d.x<i&&(i=d.x),d.y<r&&(r=d.y),d.x>s&&(s=d.x),d.y>o&&(o=d.y)}return{x:i,y:r,width:s-i,height:o-r}}function uf(a,e){return{x:a*U(e),y:a*G(e)}}function fp(a,e){return a.x>=e.x&&a.x<=e.x+e.width&&a.y>=e.y&&a.y<=e.y+e.height}var Lv={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgrey:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},grey:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgrey:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function Fv(a,e){var t;return Lv[a]?t=Lv[a]:a.charAt(0)==="#"?t=W0(a):a.match(/^rgba?\(/)&&(t=U0(a)),t||(t={r:0,g:0,b:0,a:1}),C(e)&&(t.a=e),t}function W0(a){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,r,s,o){return r+r+s+s+o+o});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:G0(a)}function G0(a){var e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,r,s,o,n){return r+r+s+s+o+o+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:parseInt(t[4],16)/256}:void 0}function U0(a){a=a.replace(/[ ]/g,"");var e=a.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=a.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return;return{r:parseInt(e[1]),g:parseInt(e[2]),b:parseInt(e[3]),a:parseFloat(e[4])}}function Mv(a){return"#"+mf(a.r.toString(16))+mf(a.g.toString(16))+mf(a.b.toString(16))}function Rv(a){return C(a.a)&&a.a!==1?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":"rgb("+a.r+","+a.g+","+a.b+")"}function mf(a){return a.length==1?"0"+a:""+a}function Bo(a,e,t){return t=J(t,0,1),a?e?{r:a.r+Math.round((e.r-a.r)*t),g:a.g+Math.round((e.g-a.g)*t),b:a.b+Math.round((e.b-a.b)*t),a:(a.a||1)+Math.round(((e.a||1)-(a.a||1))*t)}:a:e||a}function Iv(a,e){return a&&{r:Math.max(0,Math.min(255,a.r+mp(a.r,e))),g:Math.max(0,Math.min(255,a.g+mp(a.g,e))),b:Math.max(0,Math.min(255,a.b+mp(a.b,e))),a:a.a}}function mp(a,e){var t=e>0?255-a:a;return Math.round(t*e)}function Vv(a,e){if(a){var t=Math.min(Math.max(a.r,a.g,a.b),230),i=mp(t,e);return{r:Math.max(0,Math.min(255,Math.round(a.r+i))),g:Math.max(0,Math.min(255,Math.round(a.g+i))),b:Math.max(0,Math.min(255,Math.round(a.b+i))),a:a.a}}else return a}function Ev(a,e){if(a==null||e==1)return a;var t=ch(a);return t.s=e,gf(t)}function gf(a){var e,t,i,r=a.h,s=a.s,o=a.l;if(s==0)e=t=i=o;else{var n=function(p,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?p+(d-p)*6*c:c<.5?d:c<.6666666666666666?p+(d-p)*(.6666666666666666-c)*6:p},l=o<.5?o*(1+s):o+s-o*s,h=2*o-l;e=n(h,l,r+1/3),t=n(h,l,r),i=n(h,l,r-1/3)}return{r:Math.round(e*255),g:Math.round(t*255),b:Math.round(i*255)}}function ch(a){var e=a.r/255,t=a.g/255,i=a.b/255,r=Math.max(e,t,i),s=Math.min(e,t,i),o=0,n=0,l=(r+s)/2;if(r===s)o=n=0;else{var h=r-s;switch(n=l>.5?h/(2-r-s):h/(r+s),r){case e:o=(t-i)/h+(t<i?6:0);break;case t:o=(i-e)/h+2;break;case i:o=(e-t)/h+4;break}o/=6}return{h:o,s:n,l}}function Nv(a){return(a.r*299+a.g*587+a.b*114)/1e3>=128}var yf=function(a,e){return yf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},yf(a,e)};function D(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");yf(a,e);function t(){this.constructor=a}a.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Er=function(){return Er=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Er.apply(this,arguments)};function ut(a,e,t,i){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function n(u){try{h(i.next(u))}catch(p){o(p)}}function l(u){try{h(i.throw(u))}catch(p){o(p)}}function h(u){u.done?s(u.value):r(u.value).then(n,l)}h((i=i.apply(a,e||[])).next())})}function qt(a,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=n(0),o.throw=n(1),o.return=n(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(h){return function(u){return l([h,u])}}function l(h){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(t=0)),t;)try{if(i=1,r&&(s=h[0]&2?r.return:h[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,h[1])).done)return s;switch(r=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,r=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){t.label=h[1];break}if(h[0]===6&&t.label<s[1]){t.label=s[1],s=h;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(h);break}s[2]&&t.ops.pop(),t.trys.pop();continue}h=e.call(a,t)}catch(u){h=[6,u],r=0}finally{i=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function jo(a){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&a[e],i=0;if(t)return t.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&i>=a.length&&(a=void 0),{value:a&&a[i++],done:!a}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Na(a,e){var t=typeof Symbol=="function"&&a[Symbol.iterator];if(!t)return a;var i=t.call(a),r,s=[],o;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return s}function pa(){for(var a=[],e=0;e<arguments.length;e++)a=a.concat(Na(arguments[e]));return a}function Ii(a,e){for(var t=a.length,i=0;i<t;++i)if(a[i]===e)return i;return-1}function fh(a,e){for(var t=a.length,i=0;i<t;++i)if(e(a[i]))return!0;return!1}function da(a,e){for(var t=a.length,i=new Array(t),r=0;r<t;++r)i[r]=e(a[r],r);return i}function W(a,e){for(var t=a.length,i=0;i<t;++i)e(a[i],i)}function Bv(a,e){for(var t=a.length;t--;)e(a[t],t)}function qn(a,e){for(var t=a.length,i=0;i<t&&e(a[i],i);++i);}function jv(a,e){for(var t=a.length,i=e;i<t;++i)a[i-e]=a[i];a.length=t-e}function Hv(a,e){for(var t=e.length,i=0;i<t;++i)a.push(e[i])}function ft(a,e){var t=!1,i=a.indexOf(e);if(i!==-1){t=!0,a.splice(i,1);for(var r=a.length;i<r;)a[i]===e?(a.splice(i,1),--r):++i}return t}function Qi(a,e,t){var i=Ii(a,e);i!==-1&&ja(a,i),t==null?a.push(e):Ba(a,t,e)}function Ho(a,e,t){P(t)?t===0?a.unshift(e):a.splice(t,0,e):a.push(e)}function Xv(a,e,t){var i=a.indexOf(e);i!==-1&&a.splice(i,1),P(t)?a.splice(t,0,e):a.push(e)}function gp(a){return Array.isArray(a)?a:[a]}function ca(a){for(var e=a.length,t=new Array(e),i=0;i<e;++i)t[i]=a[i];return t}function Ba(a,e,t){a.splice(e,0,t)}function ja(a,e){a.splice(e,1)}function Zn(a,e,t){for(var i=0,r=a.length,s=!1;i<r;){var o=i+r>>1,n=e(t,a[o]);n<0?r=o:(n===0&&(s=!0),i=o+1)}return{found:s,index:s?i-1:i}}function yp(a,e){for(var t=a.length,i=0;i<t;++i)if(e(a[i],i))return i;return-1}function vf(a,e){for(var t=a.length,i=0;i<t;)e(a[i])?++i:(a.splice(i,1),--t)}var Lt=(function(){function a(e){this._disposed=!1,this._dispose=e}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._dispose())},a})();var Bt=(function(a){D(e,a);function e(t){return a.call(this,function(){W(t,function(i){i.dispose()})})||this}return e})(Lt);var ce=(function(a){D(e,a);function e(){var t=a.call(this,function(){C(t._disposer)&&(t._disposer.dispose(),t._disposer=void 0)})||this;return t}return e.prototype.get=function(){return this._value},e.prototype.set=function(t,i){C(this._disposer)&&this._disposer.dispose(),this._disposer=i,this._value=t},e.prototype.reset=function(){this.set(void 0,void 0)},e})(Lt);var fa=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._counter=0,t}return e.prototype.increment=function(){var t=this;return++this._counter,new Lt(function(){--t._counter,t._counter===0&&t.dispose()})},e})(Lt);var bf=!1,vp=[],mh=[],bp=[],xf=[],K0=1e3/60,xp=typeof requestAnimationFrame=="function"?function(a){requestAnimationFrame(a)}:function(a){setTimeout(a,K0)};function Yv(){for(var a=Date.now(),e=vp.length,t=0;t<e;++t)vp[t](a);jv(vp,e);for(var t=0;t<mh.length;++t)mh[t](a);mh.length=0;for(var t=0;t<bp.length;++t)bp[t](a);bp.length=0,vp.length===0&&mh.length===0?bf=!1:xp(Yv)}function zv(){bf||(bf=!0,xp(Yv))}function _f(a){mh.push(a),zv()}function _p(a){bp.push(a),zv()}function Pf(a){xf.push(a)}function $f(){for(var a=Date.now(),e=xf.length,t=0;t<e;++t)xf.shift()(a)}var _r=(function(){function a(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var e=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{W(e,function(t){t.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}},a.prototype.hasListeners=function(){return this._listeners.length!==0},a.prototype.hasListenersByType=function(e){return fh(this._listeners,function(t){return(t.type===null||t.type===e)&&!t.killed})},a.prototype.enable=function(){this._enabled=!0},a.prototype.disable=function(){this._enabled=!1},a.prototype.enableType=function(e){delete this._disabled[e]},a.prototype.disableType=function(e,t){t===void 0&&(t=1/0),this._disabled[e]=t},a.prototype._removeListener=function(e){if(this._iterating===0){var t=this._listeners.indexOf(e);if(t===-1)throw new Error("Invalid state: could not remove listener");this._listeners.splice(t,1)}else this._killed.push(e)},a.prototype._removeExistingListener=function(e,t,i,r){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(function(s){s.once===e&&s.type===t&&(i==null||s.callback===i)&&s.context===r&&s.disposer.dispose()})},a.prototype.isEnabled=function(e){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(e)&&this._disabled[e]==null},a.prototype.has=function(e,t,i){var r=yp(this._listeners,function(s){return s.once!==!0&&s.type===e&&(t==null||s.callback===t)&&s.context===i});return r!==-1},a.prototype._shouldDispatch=function(e){if(this._disposed)throw new Error("EventDispatcher is disposed");var t=this._disabled[e];return P(t)?(t<=1?delete this._disabled[e]:--this._disabled[e],!1):this._enabled},a.prototype._eachListener=function(e){var t=this;++this._iterating;try{W(this._listeners,e)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(W(this._killed,function(i){t._removeListener(i)}),this._killed.length=0)}},a.prototype.dispatchImmediately=function(e,t){this._shouldDispatch(e)&&this._eachListener(function(i){!i.killed&&(i.type===null||i.type===e)&&i.dispatch(e,t)})},a.prototype.dispatch=function(e,t){this._shouldDispatch(e)&&this._eachListener(function(i){!i.killed&&(i.type===null||i.type===e)&&Pf(function(){i.killed||i.dispatch(e,t)})})},a.prototype._on=function(e,t,i,r,s,o){var n=this;if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(e,t,i,r);var l={type:t,callback:i,context:r,shouldClone:s,dispatch:o,killed:!1,once:e,disposer:new Lt(function(){l.killed=!0,n._removeListener(l)})};return this._listeners.push(l),l},a.prototype.onAll=function(e,t,i){return i===void 0&&(i=!0),this._on(!1,null,e,t,i,function(r,s){return e.call(t,r,s)}).disposer},a.prototype.on=function(e,t,i,r){return r===void 0&&(r=!0),this._on(!1,e,t,i,r,function(s,o){return t.call(i,o)}).disposer},a.prototype.once=function(e,t,i,r){r===void 0&&(r=!0);var s=this._on(!0,e,t,i,r,function(o,n){s.disposer.dispose(),t.call(i,n)});return s.disposer},a.prototype.off=function(e,t,i){this._removeExistingListener(!1,e,t,i)},a.prototype.copyFrom=function(e){var t=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");W(e._listeners,function(i){!i.killed&&i.shouldClone&&(i.type===null?t.onAll(i.callback,i.context):i.once?t.once(i.type,i.callback,i.context):t.on(i.type,i.callback,i.context))})},a})();var gh=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i.target=t,i}return e.prototype.copyFrom=function(t){var i=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(t===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");W(t._listeners,function(r){r.context!==t.target&&!r.killed&&r.shouldClone&&(r.type===null?i.onAll(r.callback,r.context):r.once?i.once(r.type,r.callback,r.context):i.on(r.type,r.callback,r.context))})},e})(_r);function Gv(a){return function(e){for(var t in a)if(Kr(a,t)&&!e([t,a[t]]))break}}function Uv(a){var e=[];for(var t in a)Kr(a,t)&&e.push(t);return e}function q0(a,e){return Uv(a).sort(e)}function Kr(a,e){return{}.hasOwnProperty.call(a,e)}function wf(a,e){for(var t in a)if(Kr(a,t)&&!e(t,a[t]))break}function at(a,e){wf(a,function(t,i){return e(t,i),!0})}function ys(a,e,t){W(q0(a,t),function(i){e(i,a[i])})}function yh(a,e){return Object.assign({},a,e)}function Kv(a){return JSON.parse(JSON.stringify(a))}function _e(a,e,t){W(t,function(i){C(a[i])&&(e[i]=a[i])})}function qv(a,e,t){W(t,function(i){e[i]=a[i]})}function Jn(a,e){_e(a,e,Uv(a))}function Vs(a){return function(e){for(var t=a.length,i=0;i<t&&e(a[i]);++i);}}function Zv(a){var e=0;return a(function(t){return++e,!0}),e}function Xo(a){var e=[];return a(function(t){return e.push(t),!0}),e}function ii(a,e){a(e)}function E(a,e){a(function(t){return e(t),!0})}function ma(a,e){return Vs(Xo(a).sort(e))}function Pp(a,e){return function(t){return a(function(i){return t(e(i))})}}function Jv(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];return function(t){for(var i=!0,r=function(n){return i=t(n)},s=a.length,o=0;o<s&&(a[o](r),!!i);++o);}}function Qv(a){return function(e){var t=!0,i=function(r){return t=e(r)};a(function(r){return r(i),t})}}function qr(a){return function(e){var t=0;a(function(i){return e([t++,i])})}}function tb(a,e){var t;return a(function(i){return e(i)?(t=i,!1):!0}),t}function Qn(a,e){var t=!1;return a(function(i){return e(i)?(t=!0,!1):!0}),t}var Yo=(function(){function a(e,t){this.createNewItems=!1,this.list=e,this._create=t,this.reset()}return a.prototype.reset=function(){this._listCopy=Xo(this.list.iterator())},a.prototype.clear=function(){this._listCopy.length=0},a.prototype.getFirst=function(){return this.returnItem(0)},a.prototype.getLast=function(){return this.returnItem(this._listCopy.length-1)},a.prototype.find=function(e){var t=yp(this._listCopy,e);if(t!==-1){var i=this._listCopy[t];return ft(this._listCopy,i),i}else return this.getLast()},a.prototype.removeItem=function(e){return ft(this._listCopy,e)},a.prototype.returnItem=function(e){if(e>=0&&e<this._listCopy.length){var t=this._listCopy[e];return ft(this._listCopy,t),t}else if(this.createNewItems)return this._create()},a.prototype.iterator=function(){return Vs(this._listCopy)},a})();function vh(a,e){return a===e?0:a<e?-1:1}function Cf(a,e){return new Array(e+1).join(a)}function eb(a){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<a;i++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}var Pr=(function(a){D(e,a);function e(t){var i=this,r=t.events.on("removed",function(s){s.oldValue.dispose()},void 0,!1);return i=a.call(this,function(){r.dispose(),E(t.iterator(),function(s){var o=s[1];o.dispose()})})||this,i}return e})(Lt);var It=(function(){function a(){this.events=new _r,this._dictionary={}}return a.prototype.hasKey=function(e){return Kr(this._dictionary,e)},a.prototype.getKey=function(e){return this._dictionary[e]},a.prototype.insertKey=function(e,t){if(Kr(this._dictionary,e))throw new Error("Key "+e+" already exists in dictionary");this._dictionary[e]=t,this.events.isEnabled("insertKey")&&this.events.dispatchImmediately("insertKey",{type:"insertKey",target:this,key:e,newValue:t})},a.prototype.setKey=function(e,t){if(Kr(this._dictionary,e)){var i=this._dictionary[e];i!==t&&(this._dictionary[e]=t,this.events.isEnabled("setKey")&&this.events.dispatchImmediately("setKey",{type:"setKey",target:this,key:e,oldValue:i,newValue:t}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:i}))}else this._dictionary[e]=t,this.events.isEnabled("insertKey")&&this.events.dispatchImmediately("insertKey",{type:"insertKey",target:this,key:e,newValue:t})},a.prototype.updateKey=function(e,t){if(Kr(this._dictionary,e)){var i=this._dictionary[e],r=t(i);i!==r&&(this._dictionary[e]=r,this.events.isEnabled("setKey")&&this.events.dispatchImmediately("setKey",{type:"setKey",target:this,key:e,oldValue:i,newValue:r}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:i}))}else throw new Error("Key "+e+" doesn't exist in dictionary")},a.prototype.removeKey=function(e){if(Kr(this._dictionary,e)){var t=this._dictionary[e];delete this._dictionary[e],this.events.isEnabled("removeKey")&&this.events.dispatchImmediately("removeKey",{type:"removeKey",target:this,key:e,oldValue:t}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t})}},a.prototype.insertKeyIfEmpty=function(e,t){return this.hasKey(e)||this.insertKey(e,t()),this.getKey(e)},a.prototype.clear=function(){var e=this;this.events.isEnabled("removed")&&at(this._dictionary,function(t,i){e.events.dispatchImmediately("removed",{type:"removed",target:e,oldValue:i})}),this._dictionary={},this.events.isEnabled("cleared")&&this.events.dispatchImmediately("cleared",{type:"cleared",target:this})},a.prototype.copyFrom=function(e){var t=this;E(e.iterator(),function(i){t.setKey(i[0],i[1])})},a.prototype.iterator=function(){return Gv(this._dictionary)},a.prototype[Symbol.iterator]=function(){var e,t,i,r;return qt(this,function(s){switch(s.label){case 0:e=[];for(t in this._dictionary)e.push(t);i=0,s.label=1;case 1:return i<e.length?(r=e[i],Kr(this._dictionary,r)?[4,[r,this._dictionary[r]]]:[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})},a.prototype.each=function(e){E(this.iterator(),function(t){var i=Na(t,2),r=i[0],s=i[1];return e(r,s)})},a.prototype.sortedIterator=function(){return ma(this.iterator(),function(e,t){return vh(e[0],t[0])})},a})();var Es=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i.template=t,i}return Object.defineProperty(e.prototype,"template",{get:function(){return this._template},set:function(t){t.isTemplate=!0,this._template=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;E(t.iterator(),function(r){i.setKey(r[0],r[1].clone())})},e.prototype.create=function(t){var i=this;return this.insertKeyIfEmpty(t,function(){return i.template.clone()})},e})(It);var ib=(function(){function a(){this._storage=new It,this.ttl=1e3}return a.prototype.set=function(e,t,i,r){var s=this._storage.insertKeyIfEmpty(e,function(){return new It}),o={touched:new Date().getTime(),ttl:P(r)?r:this.ttl,value:i};s.setKey(t,o)},a.prototype.get=function(e,t,i){if(i===void 0&&(i=void 0),this._storage.hasKey(e)){var r=this._storage.getKey(e);if(r.hasKey(t)){var s=r.getKey(t);return s.ttl&&s.touched+s.ttl<new Date().getTime()&&(s.expired=!0),s.expired?(r.removeKey(t),i):s.value}else return i}else return i},a.prototype.clear=function(e){e?this._storage.removeKey(e):this._storage.clear()},a})();var Ha=new ib;var rb=(function(){function a(){var e=this;this.events=new _r,this.themes=[],this.loadedThemes={},this._uidCount=0,this.registeredClasses={},this._placeholders={},this.invalidSprites={},this.invalidDatas={},this.invalidRawDatas=[],this.invalidDataItems=[],this.invalidDataRange=[],this.invalidPositions={},this.invalidLayouts={},this.baseSprites=[],this.baseSpritesByUid={},this.queue=[],this.deferred=[],this.uid=this.getUniqueId(),this.invalidSprites.noBase=[],this.invalidDatas.noBase=[],this.invalidLayouts.noBase=[],this.invalidPositions.noBase=[],typeof addEventListener<"u"&&(addEventListener("beforeprint",function(){W(e.baseSprites,function(t){var i=t.paper.svg;i.setAttribute("viewBox","0 0 "+i.clientWidth+" "+i.clientHeight)})}),addEventListener("afterprint",function(){W(e.baseSprites,function(t){var i=t.paper.svg;i.removeAttribute("viewBox")})}))}return a.prototype.getUniqueId=function(){var e=this._uidCount;return this._uidCount+=1,"id-"+e},Object.defineProperty(a.prototype,"map",{get:function(){return this._map||(this._map=new It),this._map},enumerable:!0,configurable:!0}),a.prototype.setCache=function(e,t,i){Ha.set(this.uid,e,t,i)},a.prototype.getCache=function(e,t){return t===void 0&&(t=void 0),Ha.get(this.uid,e,t)},a.prototype.dispatch=function(e,t){this.events.isEnabled(e)&&(t?(t.type=e,t.target=t.target||this,this.events.dispatch(e,{type:e,target:this})):this.events.dispatch(e,{type:e,target:this}))},a.prototype.dispatchImmediately=function(e,t){this.events.isEnabled(e)&&(t?(t.type=e,t.target=t.target||this,this.events.dispatchImmediately(e,t)):this.events.dispatchImmediately(e,{type:e,target:this}))},a.prototype.getPlaceholder=function(e){return C(this._placeholders[e])?this._placeholders[e]:(this._placeholders[e]="__amcharts_"+e+"_"+eb(8)+"__",this._placeholders[e])},a.prototype.addToInvalidComponents=function(e){e.baseId?Qi(this.invalidDatas[e.baseId],e):Qi(this.invalidDatas.noBase,e)},a.prototype.removeFromInvalidComponents=function(e){e.baseId&&ft(this.invalidDatas[e.baseId],e),ft(this.invalidDatas.noBase,e)},a.prototype.addToInvalidSprites=function(e){e.baseId?Ho(this.invalidSprites[e.baseId],e):Ho(this.invalidSprites.noBase,e)},a.prototype.removeFromInvalidSprites=function(e){e.baseId&&ft(this.invalidSprites[e.baseId],e),ft(this.invalidSprites.noBase,e)},a.prototype.addToInvalidPositions=function(e){e.baseId?Ho(this.invalidPositions[e.baseId],e):Ho(this.invalidPositions.noBase,e)},a.prototype.removeFromInvalidPositions=function(e){e.baseId&&ft(this.invalidPositions[e.baseId],e),ft(this.invalidPositions.noBase,e)},a.prototype.addToInvalidLayouts=function(e){e.baseId?Ho(this.invalidLayouts[e.baseId],e):Ho(this.invalidLayouts.noBase,e)},a.prototype.removeFromInvalidLayouts=function(e){e.baseId&&ft(this.invalidLayouts[e.baseId],e),ft(this.invalidLayouts.noBase,e)},a})();var w=new rb;function Sf(a,e){var t=w.registeredClasses[e];return t!=null&&a instanceof t}var Dt=(function(){function a(e){this._value=e}return Object.defineProperty(a.prototype,"rgb",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hex",{get:function(){return this._value?Mv(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rgba",{get:function(){return this._value?Rv(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"alpha",{get:function(){return this._value!=null&&this._value.a!=null?this._value.a:1},set:function(e){this._value&&(this._value.a=e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"lightColor",{get:function(){return this._lightColor||(this._lightColor=new a({r:255,g:255,b:255})),this._lightColor},set:function(e){this._lightColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"darkColor",{get:function(){return this._darkColor||(this._darkColor=new a({r:0,g:0,b:0})),this._darkColor},set:function(e){this._darkColor=e},enumerable:!0,configurable:!0}),a.prototype.toString=function(){return this.alpha<1?this.rgba:this.hex},a.prototype.lighten=function(e){return new a(Iv(this.rgb,e))},a.prototype.brighten=function(e){return new a(Vv(this.rgb,e))},a.prototype.saturate=function(e){return new a(Ev(this.rgb,e))},Object.defineProperty(a.prototype,"alternative",{get:function(){if(this.rgb!=null)return Nv(this.rgb)?this.darkColor:this.lightColor;throw new Error("Color does not exist")},enumerable:!0,configurable:!0}),a})();function nt(a,e){if(!C(a))return new Dt(void 0);if(typeof a=="string"){var t="_color_"+a+"_"+(e||"1"),i=w.getCache(t);if(i)return new Dt({r:i.r,g:i.g,b:i.b,a:i.a});var r=Fv(a,e);return w.setCache(t,r),new Dt(r)}return a instanceof Dt?(C(e)&&(a.alpha=e),a):new Dt(a)}function sb(a){return a instanceof Dt}function ab(a){return nt(a)}function Hi(a){return C(a)&&!sb(a)?ab(a):a}var Rt={};_y(Rt,{anyToDate:()=>Ph,anyToNumber:()=>al,camelToDashed:()=>tP,capitalize:()=>Ko,cleanFormat:()=>Ya,copy:()=>Af,copyProperties:()=>tr,decimalPlaces:()=>jf,documentPointToSprite:()=>Ns,documentPointToSvg:()=>vs,escapeForRgex:()=>il,fitNumber:()=>$h,fitNumberRelative:()=>wh,get12Hours:()=>ol,getBaseURI:()=>Xa,getDayFromWeek:()=>Vf,getFormat:()=>Mf,getMonthWeek:()=>If,getPixelRatio:()=>Of,getTimeZone:()=>nl,getWeek:()=>el,getWeekYear:()=>Ef,getYearDay:()=>Tp,height:()=>Bf,isIE:()=>Bs,isNotEmpty:()=>Uo,joinUrl:()=>Ch,ltrim:()=>Ff,numberToString:()=>Rf,padString:()=>ci,parseUrl:()=>Df,plainText:()=>sl,random:()=>iP,relativeRadiusToValue:()=>Oe,relativeToValue:()=>te,reverseString:()=>wp,rtrim:()=>Lf,serializeUrl:()=>kf,softCopyProperties:()=>J0,splitTextByCharCount:()=>xh,spritePointToDocument:()=>ll,spritePointToSprite:()=>ni,spritePointToSvg:()=>Xi,spriteRectToSvg:()=>qo,stringify:()=>Cp,stripHash:()=>Tf,stripTags:()=>Sp,svgPointToDocument:()=>Dp,svgPointToSprite:()=>ki,svgRectToSprite:()=>rP,trim:()=>_h,truncateWithEllipsis:()=>rl,unquote:()=>eP,used:()=>Zr,valueToRelative:()=>Q0,width:()=>Nf});function ob(){return/apple/i.test(navigator.vendor)}function nb(){return/MSIE |Trident\//.test(navigator.userAgent)}var $p="string",zo="number",Wo="date",tl="duration",_i="__\xA7\xA7\xA7__",ga="__\xA7\xA7\xA7\xA7__";function Zr(a){}function tr(a,e){return at(a,function(t,i){C(i)&&(e[t]=i)}),e}function Tf(a){return/^[^#]*/.exec(a)[0]}function Xa(){var a="#";if(ob()){var e=document.baseURI;if(e){e=Tf(e);var t=Tf(location.href);e!==t&&(a=t+a)}}return a}function J0(a,e){return at(a,function(t,i){C(i)&&!C(e[t])&&(e[t]=i)}),e}function Af(a,e){return at(a,function(t,i){e[t]=i}),e}function Uo(a){return C(a)&&a.toString()!==""}function te(a,e){return P(a)?a:a!=null&&P(a.value)&&P(e)?e*a.value:0}function Oe(a,e,t){var i;return P(a)?(i=a,i<0&&(t?i=e+i:i=e-i)):a!=null&&P(a.value)&&(i=e*a.value),i}function Q0(a,e){return a instanceof _t?a.value:a/e}function Of(){var a=window.devicePixelRatio||1;return a}function tP(a){return a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function Ko(a){var e=a.split("");return e[0]=e[0].toUpperCase(),e.join("")}function Cp(a){return JSON.stringify(a)}function il(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function xh(a,e,t,i,r){if(a.length<=e)return[a];var s=[];if(t){for(var o=-1,n=a.replace(/([,;:!?\\\/]+|[\s])/g,_i+"$1"+_i),l=n.split(_i),h=1;h<l.length;h++){var u=l[h];(u=="."||u==",")&&l[h-1].match(/[\w]+$/)&&(l[h-1]+=u,l[h]="")}for(var h=0;h<l.length;h++){var u=l[h],p=u.length;if(p!==0){if(p>e&&(t!==!0||r!=!1)){i&&(u=wp(u));var d=u.match(new RegExp(".{1,"+e+"}","g"));if(d){if(i)for(var c=0;c<d.length;c++)d[c]=wp(d[c]);s=s.concat(d)}}else o===-1&&(s.push(""),o=0),s[o].length+p+1>e&&s[o]!==""&&(s.push(""),o++),s[o]+=u;o=s.length-1}}}else{var d=a.match(new RegExp(".{1,"+e+"}","g"));if(d){if(i)for(var c=0;c<d.length;c++)i||(d[c]=wp(d[c]));s=d}}return s.length==1&&t&&r&&s[0].length>e&&(s=[]),s}function rl(a,e,t,i,r){if(a.length<=e)return a;e-=t.length,e<1&&(e=1);var s=xh(a,e,i,r);return(s[0]||"")+t}function _h(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function Lf(a){return a.replace(/[\s\uFEFF\xA0]+$/g,"")}function Ff(a){return a.replace(/^[\s\uFEFF\xA0]+/g,"")}function wp(a){return a.split("").reverse().join("")}function eP(a){var e=a.trim();return e=a.replace(/^'(.*)'$/,"$1"),e==a&&(e=a.replace(/^"(.*)"$/,"$1")),e}function ci(a,e,t){return e===void 0&&(e=0),t===void 0&&(t="0"),typeof a!="string"&&(a=a.toString()),e>a.length?Array(e-a.length+1).join(t)+a:a}function Mf(a){if(typeof a>"u")return $p;a=a.toLowerCase().replace(/^\[[^\]]*\]/,""),a=a.replace(/\[[^\]]+\]/,""),a=a.trim();var e=a.match(/\/(date|number|duration)$/);return e?e[1]:a===zo?zo:a===Wo?Wo:a===tl?tl:a.match(/[#0]/)?zo:a.match(/[ymwdhnsqaxkzgtei]/)?Wo:$p}function Ya(a){return a.replace(/\/(date|number|duration)$/i,"")}function Sp(a){return a&&a.replace(/<[^>]*>/g,"")}function sl(a){return a&&Sp((""+a).replace(/[\n\r]+/g,". "))}function Rf(a){if(Ke(a))return"NaN";if(a===1/0)return"Infinity";if(a===-1/0)return"-Infinity";if(a===0&&1/a===-1/0)return"-0";var e=a<0;a=Math.abs(a);var t=ee(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+a)),i=t[1],r=t[2]||"",s;if(t[3]==null)s=r===""?i:i+"."+r;else{var o=+t[3];if(a<1){var n=o-1;s="0."+Cf("0",n)+i+r}else{var n=o-r.length;n===0?s=i+r:n<0?s=i+r.slice(0,n)+"."+r.slice(n):s=i+r+Cf("0",n)}}return e?"-"+s:s}function Ph(a){if(Ea(a)){var e=new Date(a);return e.setMilliseconds(a.getMilliseconds()),e}else{if(P(a))return new Date(a);var t=Number(a);return P(t)?new Date(t):new Date(a)}}function al(a){if(Ea(a))return a.getTime();if(P(a))return a;if(vt(a)){var e=Number(a);return P(e)?e:void 0}}function Tp(a,e){e===void 0&&(e=!1);var t=new Date(a.getFullYear(),0,0),i=a.getTime()-t.getTime()+(t.getTimezoneOffset()-a.getTimezoneOffset())*60*1e3,r=1e3*60*60*24;return Math.floor(i/r)}function el(a,e){e===void 0&&(e=!1);var t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);var r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7)}function If(a,e){e===void 0&&(e=!1);var t=el(new Date(a.getFullYear(),a.getMonth(),1),e),i=el(a,e);return i==1&&(i=53),i-t+1}function Vf(a,e,t,i){t===void 0&&(t=1),i===void 0&&(i=!1);var r=new Date(e,0,4,0,0,0,0);i&&r.setUTCFullYear(e);var s=a*7+t-((r.getDay()||7)+3);return s}function ol(a,e){return a>12?a-=12:a===0&&(a=12),C(e)?a+(e-1):a}function nl(a,e,t,i){if(e===void 0&&(e=!1),t===void 0&&(t=!1),i===void 0&&(i=!1),i)return e?"Coordinated Universal Time":"UTC";var r=a.toLocaleString("UTC"),s=a.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(r.length);return t===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),s}function Ef(a,e){e===void 0&&(e=!1);var t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);var r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return r.getFullYear()}function iP(a,e){return Math.floor(Math.random()*(e-a))+a}function $h(a,e,t){return a>t?t:a<e?e:a}function wh(a,e,t){var i=t-e;return(a>t||a<e)&&(a=e+(a-i*Math.floor(a/i))),a}function ki(a,e){var t=a.x,i=a.y,r=[];if(e){for(;C(e.parent);)r.push(e),e=e.parent;r.reverse();for(var s=0;s<r.length;s++){var o=r[s],n=o.rotation,l=t-o.pixelX-o.ex,h=i-o.pixelY-o.ey;o.dx&&(t-=o.dx),o.dy&&(i-=o.dy);var u=o.scale;o.group&&(u=o.group.scale),t=(U(-n)*l-G(-n)*h)/u-o.pixelPaddingLeft,i=(U(-n)*h+G(-n)*l)/u-o.pixelPaddingTop}}return{x:t,y:i}}function Xi(a,e){var t=a.x,i=a.y;if(e)for(;C(e.parent);){var r=e.rotation;t+=e.pixelPaddingLeft+e.ex,i+=e.pixelPaddingTop+e.ey;var s=e.scale;e.group&&(s=e.group.scale);var o=e.pixelX+(t*U(r)-i*G(r))*s,n=e.pixelY+(t*G(r)+i*U(r))*s;e.dx&&(o+=e.dx),e.dy&&(n+=e.dy),t=o,i=n,e=e.parent}return{x:t,y:i}}function ni(a,e,t){return ki(Xi(a,e),t)}function rP(a,e){var t=ki(a,e),i=ki({x:a.x+a.width,y:a.y+a.height},e);return{x:t.x,y:t.y,width:i.x-t.x,height:i.y-t.y}}function qo(a,e){var t=Xi(a,e),i=Xi({x:a.x+a.width,y:a.y+a.height},e);return{x:t.x,y:t.y,width:i.x-t.x,height:i.y-t.y}}function vs(a,e,t){try{var i=e.getBoundingClientRect();return P(t)||(t=1),{x:(a.x-i.left)/t,y:(a.y-i.top)/t}}catch{return a}}function Dp(a,e){try{var t=e.getBoundingClientRect();return{x:a.x+t.left,y:a.y+t.top}}catch{return a}}function Ns(a,e){if(e&&e.htmlContainer){var t=vs(a,ee(e.htmlContainer),e.svgContainer.cssScale);return ki(t,e)}else return a}function ll(a,e){if(e&&e.htmlContainer){var t=Xi(a,e);return Dp(t,ee(e.htmlContainer))}else return a}function Nf(a){var e=getComputedStyle(a),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i=parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth);return a.clientWidth-t-i}function Bf(a){var e=getComputedStyle(a),t=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),i=parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth);return a.clientHeight-t-i}function jf(a){var e=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}var sP=/^([a-zA-Z][a-zA-Z0-9\+\.\-]*:)?(?:(\/\/)([^\@]+\@)?([^\/\?\#\:]*)(\:[0-9]+)?)?([^\?\#]*)(\?[^\#]*)?(\#.*)?$/;function Df(a){var e=sP.exec(a);return{protocol:e&&e[1]||"",separator:e&&e[2]||"",authority:e&&e[3]||"",domain:e&&e[4]||"",port:e&&e[5]||"",path:e&&e[6]||"",query:e&&e[7]||"",hash:e&&e[8]||""}}function kf(a){return a.protocol+a.separator+a.authority+a.domain+a.port+a.path+a.query+a.hash}function lb(a){return a.protocol===""&&a.separator===""&&a.authority===""&&a.domain===""&&a.port===""}function Ch(a,e){var t=Df(a),i=Df(e);if(lb(t))throw new Error("Left URL is not absolute");if(lb(i)){if(i.path!=="")if(i.path[0]==="/")t.path=i.path;else{var r=t.path.split(/\//),s=i.path.split(/\//);if(r.length===0?s.length!==0&&r.push(""):r.length>1&&r.pop(),Hv(r,s),t.path=r.join("/"),t.path!==""&&t.path[0]!=="/")throw new Error("URL path must start with /")}return t.query=i.query,t.hash=i.hash,kf(t)}else return kf(i)}function Bs(){return!!window.MSInputMethodContext&&!!document.documentMode}var $t={verbose:!0,commercialLicense:!1,classNamePrefix:"amcharts-",autoSetClassName:!1,minPolylineStep:.5,onlyShowOnViewport:!1,queue:!1,autoDispose:!1,licenses:[],suppressErrors:!1,suppressWarnings:!1,animationsEnabled:!0,nonce:"",deferredDelay:100,disableHoverOnTransform:"never",pixelPerfectPrecision:0};var za="http://www.w3.org/2000/svg",Xf="http://www.w3.org/2000/xmlns/",hl="http://www.w3.org/1999/xlink";function $e(a,e,t,i){return a.addEventListener(e,t,i||!1),new Lt(function(){a.removeEventListener(e,t,i||!1)})}function Sh(a){if(vt(a)){var e=document.getElementById(a);if(e==null&&(e=document.getElementsByClassName(a)[0]),e instanceof HTMLElement)return e}else if(a instanceof HTMLElement)return a}function ul(a,e){if(a)if(a.classList){var t=e.split(" ");W(t,function(r){a.classList.add(r)})}else{var i=a.getAttribute("class");i?a.setAttribute("class",i.split(" ").filter(function(r){return r!==e}).join(" ")+" "+e):a.setAttribute("class",e)}}function pl(a,e){if(a)if(a.classList)a.classList.remove(e);else{var t=a.getAttribute("class");t&&a.setAttribute("class",t.split(" ").filter(function(i){return i!==e}).join(" "))}}function Yf(a,e,t){a.style[e]=t}function kp(a,e){return a.currentStyle?a.currentStyle[e]:document.defaultView.getComputedStyle(a,null).getPropertyValue(e)}function Zo(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{var a=document.createElement("button");a.style.position="fixed",a.style.top="0px",a.style.left="-10000px",document.body.appendChild(a),a.focus(),a.blur(),document.body.removeChild(a)}}function zf(a,e){for(var t=e;;){if(a===t)return!0;if(t.parentNode==null){if(t.host==null)return!1;t=t.host}else t=t.parentNode}}function dl(a){for(var e=a;;){if(e.parentNode==null)return e.host!=null?e:null;e=e.parentNode}}function Ap(a){for(var e=a.ownerDocument,t=a;;){if(t.parentNode==null)return t===e||t.host!=null?t:null;t=t.parentNode}}function hb(a){return typeof a.composedPath=="function"?a.composedPath()[0]:a.target}function Wf(a){_f(function(){try{var e=a.getBoundingClientRect(),t=e.left-Math.round(e.left),i=e.top-Math.round(e.top);t!==0&&_p(function(){a.style.left=t+"px"}),i!==0&&_p(function(){a.style.top=i+"px"})}catch{}})}var Hf;function aP(a){if(a==null){if(!C(Hf)){var e=document.createElement("style");e.type="text/css",$t.nonce!=""&&e.setAttribute("nonce",$t.nonce),document.head.appendChild(e),Hf=e.sheet}return Hf}else{var e=document.createElement("style");return e.type="text/css",$t.nonce!=""&&e.setAttribute("nonce",$t.nonce),a.appendChild(e),e.sheet}}function oP(a,e){var t=a.cssRules.length;return a.insertRule(e+"{}",t),a.cssRules[t]}var ne=(function(a){D(e,a);function e(t,i,r){var s=this,o=aP(t);return s=a.call(this,function(){var n=Ii(o.cssRules,s._rule);if(n===-1)throw new Error("Could not dispose StyleRule");o.deleteRule(n)})||this,s._rule=oP(o,i),at(r,function(n,l){s.setStyle(n,l)}),s}return Object.defineProperty(e.prototype,"selector",{get:function(){return this._rule.selectorText},set:function(t){this._rule.selectorText=t},enumerable:!0,configurable:!0}),e.prototype._setVendorPrefixName=function(t,i){var r=this._rule.style;r.setProperty("-webkit-"+t,i,""),r.setProperty("-moz-"+t,i,""),r.setProperty("-ms-"+t,i,""),r.setProperty("-o-"+t,i,""),r.setProperty(t,i,"")},e.prototype.setStyle=function(t,i){t==="transition"?this._setVendorPrefixName(t,i):this._rule.style.setProperty(t,i,"")},e})(Lt);var nP=0,lP=(function(a){D(e,a);function e(t,i,r){var s=this,o=C(r)?r:"__style_"+ ++nP+"__";return s=a.call(this,t,"."+o,i)||this,s._className=o,s}return Object.defineProperty(e.prototype,"className",{get:function(){return this._className},set:function(t){this._className=t,this.selector="."+t},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this._className},e})(ne);function Gf(a){if(document.readyState!=="loading")a();else{var e=function(){document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),a())};document.addEventListener("readystatechange",e)}}function Th(a){var e=kp(a,"font-family");if(e)return e;var t=a.parentElement||a.parentNode;return t?Th(t):void 0}function Dh(a){var e=kp(a,"font-size");if(e)return e;var t=a.parentElement||a.parentNode;return t?Dh(t):void 0}function Op(a,e){var t=a.getBoundingClientRect(),i=oe(e)?e:e?[e]:[];if(i.length){for(var r=0;r<i.length;r++){var s=i[r];if(!Op(s))return!1;var o=s.getBoundingClientRect();if(t.top>=0&&t.left>=0&&t.top<=o.top+o.height&&t.left<=o.left+o.width)return!0}return!1}return t.top>=0&&t.left>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.left<=(window.innerWidth||document.documentElement.clientWidth)}var Wa=(function(){function a(e){this._isDisposed=!1,this._x=0,this._y=0,this._rotationY=0,this._rotationX=0,this._rotation=0,this._scale=1,typeof e=="string"?this.node=document.createElementNS(za,e):this.node=e}return a.prototype.removeNode=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node)},Object.defineProperty(a.prototype,"transformString",{get:function(){if(this.node)return this._transformString},enumerable:!0,configurable:!0}),a.prototype.transform=function(){var e="translate("+this._x+","+this._y+")";if(this._scale!=1&&(e+=(e?" ":"")+"scale("+this._scale+")"),this._rotation!=0){var t="rotate("+this._rotation+")";this._rotationX&&this._rotationY&&(t="rotate("+this._rotation+" "+this._rotationX+" "+this._rotationY+")"),e+=(e?" ":"")+t}this._transformString=e,this.node.setAttribute("transform",e)},a.prototype.getBBox=function(){var e={width:0,height:0,x:0,y:0};if(this.node&&this.node.parentNode)try{var t=this.node.getBBox();e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}catch{}return e},a.prototype.moveTo=function(e){if(e){var t=e.x,i=e.y;(this._x!=t||this._y!=i)&&(this._x=t,this._y=i,this.transform())}},Object.defineProperty(a.prototype,"content",{get:function(){return this.node.innerHTML||""},set:function(e){this.node.innerHTML=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.node.textContent||""},set:function(e){this.node.textContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(e){this._x!=e&&(this._x=e,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(e){this._y!=e&&(this._y=e,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!=e&&(this._rotation=e,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotationX",{get:function(){return this._rotationX},set:function(e){this._rotationX!=e&&(this._rotationX=e,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY!=e&&(this._rotationY=e,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"scale",{get:function(){return this._scale},set:function(e){this._scale!=e&&(this._scale=e,this.transform())},enumerable:!0,configurable:!0}),a.prototype.removeAttr=function(e){this.node.removeAttribute(e)},a.prototype.attr=function(e){var t=this;return at(e,function(i,r){C(r)?t.node.setAttribute(i,r):t.node.removeAttribute(i)}),this},a.prototype.getAttr=function(e){return this.node.getAttribute(e)},a.prototype.attrNS=function(e,t,i){return this.node.setAttributeNS(e,t,i),this},a.prototype.getAttrNS=function(e,t){return this.node.getAttributeNS(e,t)},a.prototype.removeStyle=function(e){this.node.style[e]=null,delete this.node.style[e]},a.prototype.getStyle=function(e){return this.node.style[e]},a.prototype.addStyle=function(e){var t=this;return at(e,function(i,r){C(r)?t.node.style[i]=r:t.removeStyle(i)}),this},a.prototype.addClass=function(e){ul(this.node,e)},a.prototype.removeClass=function(e){pl(this.node,e)},a.prototype.setClass=function(e){this.node.setAttribute("class",e)},a.prototype.removeChildNodes=function(){for(;this.node.childNodes.length>0;)this.node.removeChild(this.node.firstChild)},a.prototype.isDisposed=function(){return this._isDisposed},a.prototype.dispose=function(){this.removeNode()},a})();var Uf=(function(a){D(e,a);function e(t){return a.call(this,t)||this}return e.prototype.add=function(t){t&&this.node.appendChild(t.node)},e.prototype.addToBack=function(t){if(t){var i=this.node.childNodes[0];i?i!=t.node&&this.node.insertBefore(t.node,i):this.node.appendChild(t.node)}},e.prototype.removeElement=function(t){if(t)try{t.node&&t.node.parentNode==this.node&&this.node.removeChild(t.node)}catch{}},e.prototype.hasChild=function(t){for(var i=0;i<this.node.childNodes.length;i++)if(this.node.childNodes[i]==t.node)return!0;return!1},Object.defineProperty(e.prototype,"content",{get:function(){return this.node.innerHTML},set:function(t){this.node.innerHTML=t},enumerable:!0,configurable:!0}),e.prototype.removeChildren=function(){if(this.node.childNodes)for(;this.node.childNodes.length>0;){var t=this.node.firstChild;t&&t.parentNode&&t.parentNode.removeChild(t)}},e.prototype.removeChildrenByTag=function(t){if(this.node.childNodes)for(var i=this.node.getElementsByTagName(t),r=0;r<i.length;r++)this.node.removeChild(i[r])},e})(Wa);var Le=(function(){function a(){}return a.grab=[{property:"cursor",value:"move"},{property:"cursor",value:"grab"},{property:"cursor",value:"-webkit-grab"}],a.grabbing=[{property:"cursor",value:"move"},{property:"cursor",value:"grabbing"},{property:"cursor",value:"-webkit-grabbing"}],a.pointer=[{property:"cursor",value:"pointer"}],a.default=[{property:"cursor",value:"default"}],a.horizontalResize=[{property:"cursor",value:"ew-resize"}],a.verticalResize=[{property:"cursor",value:"ns-resize"}],a.notAllowed=[{property:"cursor",value:"not-allowed"}],a.text=[{property:"cursor",value:"text"}],a})();var Kf=(function(){function a(e,t,i){this._array=e,this._start=t,this._end=i}return a.prototype.iterator=function(){var e=this;return function(t){if(e._start!==e._end)if(e._start<e._end)for(var i=e._start;i<e._end&&t(e._array[i]);++i);else for(var i=e._start-1;i>=e._end&&t(e._array[i]);--i);}},a.prototype.backwards=function(){return new a(this._array,this._end,this._start)},a.prototype.range=function(e,t){if(e<=t){if(this._start===this._end)return this;if(this._start<this._end){var i=t-e;return e=Math.max(this._start+e,this._start),t=Math.min(e+i,this._end),new a(this._array,e,t)}else{var i=t-e;return e=Math.max(this._start-e,this._end),t=Math.max(e-i,this._end),new a(this._array,e,t)}}else throw new Error("Start index must be lower than end index")},a})();var hP=(function(a){D(e,a);function e(t,i,r){var s=a.call(this,[t.events.on("inserted",function(o){var n=o.newValue,l=s._getKey(n),h=0;ii(t.iterator(),function(u){return u===n?!1:(s._getKey(u)===l&&++h,!0)}),s._insert(n,l,h)},void 0,!1),t.events.on("removed",function(o){s._remove(o.oldValue)},void 0,!1)])||this;return s._keys=[],s._groups={},s._getKey=i,s._sort=r,E(t.iterator(),function(o){s._insert(o,i(o))}),s}return e.prototype._insert=function(t,i,r){if(this._groups[i]==null){this._groups[i]=[];var s=Zn(this._keys,this._sort,i),o=s.found,n=s.index;if(o)throw new Error("Key already exists: "+i);Ba(this._keys,n,i)}r==null?this._groups[i].push(t):Ba(this._groups[i],r,t)},e.prototype._remove=function(t){var i=this._getKey(t),r=this._groups[i];if(r!=null&&(ft(r,t),r.length===0)){delete this._groups[i];var s=Zn(this._keys,this._sort,i),o=s.found,n=s.index;if(o)ja(this._keys,n);else throw new Error("Key doesn't exist: "+i)}},e.prototype.iterator=function(){var t=this;return Qv(Pp(Vs(this._keys),function(i){return Vs(t._groups[i])}))},e})(Bt);var Ft=(function(a){D(e,a);function e(t,i){i===void 0&&(i=!0);var r=this;if(i){var s=t.events.on("removed",function(o){o.oldValue.dispose()},void 0,!1);r=a.call(this,function(){s.dispose(),E(t.iterator(),function(o){o.dispose()})})||this}else r=a.call(this,function(){E(t.iterator(),function(o){o.dispose()})})||this;return r}return e})(Lt);function kh(a,e){if(!(a>=0&&a<e))throw new Error("Index out of bounds: "+a)}var wt=(function(){function a(e){e===void 0&&(e=[]),this.events=new _r,this._values=e}return Object.defineProperty(a.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),a.prototype.contains=function(e){return this._values.indexOf(e)!==-1},a.prototype.removeValue=function(e){for(var t=0,i=this._values.length;t<i;)this._values[t]===e?(this.removeIndex(t),--i):++t},a.prototype.indexOf=function(e){return Ii(this._values,e)},Object.defineProperty(a.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),a.prototype.hasIndex=function(e){return e>=0&&e<this._values.length},a.prototype.getIndex=function(e){return this._values[e]},a.prototype.setIndex=function(e,t){kh(e,this._values.length);var i=this._values[e];return i!==t&&(this._values[e]=t,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:e,oldValue:i,newValue:t}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:i}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:t})),i},a.prototype.insertIndex=function(e,t){kh(e,this._values.length+1),Ba(this._values,e,t),this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:e,newValue:t}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:t})},a.prototype._sortQuicksort=function(e,t,i){if(e<t){var r=this._sortPartition(e,t,i);this._sortQuicksort(e,r,i),this._sortQuicksort(r+1,t,i)}},a.prototype._sortPartition=function(e,t,i){for(var r=this._values,s=r[e],o=e-1,n=t+1;;){do++o;while(i(r[o],s)<0);do--n;while(i(r[n],s)>0);if(o>=n)return n;this.swap(o,n)}},a.prototype.sort=function(e){this._sortQuicksort(0,this._values.length-1,e)},a.prototype.swap=function(e,t){var i=this._values.length;if(kh(e,i),kh(t,i),e!==t){var r=this._values[e],s=this._values[t];this._values[e]=s,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:e,oldValue:r,newValue:s}),this._values[t]=r,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:t,oldValue:s,newValue:r})}},a.prototype.removeIndex=function(e){kh(e,this._values.length);var t=this._values[e];return ja(this._values,e),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:e,oldValue:t}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t}),t},a.prototype.moveValue=function(e,t){var i=this.indexOf(e);if(i!==-1){var r=this._values[i];ja(this._values,i),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:i,oldValue:r})}t==null?(t=this._values.length,this._values.push(e)):Ba(this._values,t,e),this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:t,newValue:e}),i===-1&&this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:e})},a.prototype.push=function(e){var t=this._values.push(e)-1;return this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:t,newValue:e}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:e}),e},a.prototype.unshift=function(e){this.insertIndex(0,e)},a.prototype.pushAll=function(e){var t=this;W(e,function(i){t.push(i)})},a.prototype.copyFrom=function(e){this.pushAll(e._values)},a.prototype.pop=function(){var e=this._values.length-1;return e<0?void 0:this.removeIndex(this._values.length-1)},a.prototype.shift=function(){return this._values.length?this.removeIndex(0):void 0},a.prototype.setAll=function(e){var t=this,i=ca(this._values);this._values.length=0,W(e,function(r){t._values.push(r)}),this.events.isEnabled("setAll")&&this.events.dispatchImmediately("setAll",{type:"setAll",target:this,oldArray:i,newArray:this._values}),this.events.isEnabled("removed")&&W(i,function(r){t.events.dispatchImmediately("removed",{type:"removed",target:t,oldValue:r})}),this.events.isEnabled("inserted")&&W(this._values,function(r){t.events.dispatchImmediately("inserted",{type:"inserted",target:t,newValue:r})})},a.prototype.clear=function(){this.setAll([])},a.prototype.iterator=function(){return Vs(this._values)},a.prototype[Symbol.iterator]=function(){var e,t;return qt(this,function(i){switch(i.label){case 0:e=this._values.length,t=0,i.label=1;case 1:return t<e?[4,this._values[t]]:[3,4];case 2:i.sent(),i.label=3;case 3:return++t,[3,1];case 4:return[2]}})},a.prototype.each=function(e){W(this._values,e)},a.prototype.range=function(e,t){if(e<=t){var i=t-e;return e=Math.max(e,0),t=Math.min(e+i,this._values.length),new Kf(this._values,e,t)}else throw new Error("Start index must be lower than end index")},a.prototype.backwards=function(){return new Kf(this._values,this._values.length,0)},a})();var zt=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i.template=t,i}return Object.defineProperty(e.prototype,"template",{get:function(){return this._template},set:function(t){t.isTemplate=!0,this._template=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;E(t.iterator(),function(r){i.push(r.clone())})},e.prototype.create=function(t){var i=t!=null?new t:this.template.clone();return this.push(i),i},e.prototype.clone=function(){for(var t=new e(this.template),i=this.values,r=i.length,s=0;s<r;++s)t.push(i[s].clone());return t},e})(wt);var qf=(function(){function a(e){this._values=[],this.events=new _r,e!=null&&this.setAll(e)}return Object.defineProperty(a.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),a.prototype._insert=function(e){return this._values.push(e),this._values.length-1},Object.defineProperty(a.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),a.prototype.indexOf=function(e){return Ii(this._values,e)},a.prototype.contains=function(e){return this.indexOf(e)!==-1},a.prototype.getIndex=function(e){return this._values[e]},Object.defineProperty(a.prototype,"first",{get:function(){return this._values[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"last",{get:function(){return this._values[this._values.length-1]},enumerable:!0,configurable:!0}),a.prototype.insert=function(e){var t=this._insert(e);this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,index:t,newValue:e})},a.prototype.remove=function(e){var t=this.indexOf(e);if(t!==-1){var i=this._values[t];ja(this._values,t),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,index:t,oldValue:i})}},a.prototype.setAll=function(e){var t=this;Bv(this._values,function(i,r){t._values.pop(),t.events.isEnabled("removed")&&t.events.dispatchImmediately("removed",{type:"removed",target:t,index:r,oldValue:i})}),W(e,function(i){t.insert(i)})},a.prototype.clear=function(){this.setAll([])},a.prototype.slice=function(e,t){var i=new a;return i._values=this._values.slice(e,t),i},a.prototype.findClosestIndex=function(e,t,i){i===void 0&&(i="any");var r=-1,s,o,n=0;return ii(this.iterator(),function(l){var h=t(l);if(i==="any"){if(h===e)return r=n,!1;var u=Math.abs(e-h);(!C(o)||o>u)&&(r=n,s=h,o=u)}else i==="left"&&h<e?(!C(s)||s<h)&&(r=n,s=h):i==="right"&&h>=e&&(!C(s)||s>=h)&&(r=n,s=h);return++n,!0}),r===-1&&(i==="left"?r=0:i==="right"&&(r=this.length-1)),r},a.prototype.iterator=function(){return Vs(this._values)},a.prototype[Symbol.iterator]=function(){var e,t;return qt(this,function(i){switch(i.label){case 0:e=this._values.length,t=0,i.label=1;case 1:return t<e?[4,this._values[t]]:[3,4];case 2:i.sent(),i.label=3;case 3:return++t,[3,1];case 4:return[2]}})},a.prototype.each=function(e){W(this._values,e)},a})();var Ah=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i._ordering=t,i}return e.prototype._insert=function(t){var i=Zn(this._values,this._ordering,t).index;return Ba(this._values,i,t),i},e.prototype.indexOf=function(t){var i=Zn(this._values,this._ordering,t),r=i.found,s=i.index;return r?s:-1},e.prototype.update=function(t){var i=Ii(this._values,t);if(i!==-1){var r=this._values.length-1;(i===0||this._ordering(this._values[i-1],t)<0)&&(i===r||this._ordering(t,this._values[i+1])<0)||(ja(this._values,i),this._insert(t))}},e})(qf);var Ga=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i.template=t,i}return Object.defineProperty(e.prototype,"template",{get:function(){return this._template},set:function(t){t.isTemplate=!0,this._template=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;E(t.iterator(),function(r){i.insert(r.clone())})},e.prototype.slice=function(t,i){var r=new e(this.template);return r._values=this._values.slice(t,i),r},e.prototype.create=function(t){var i=t!=null?new t:this.template.clone();return this.insert(i),i},e})(qf);var Oh=(function(a){D(e,a);function e(t,i){var r=a.call(this,i)||this;return r.template=t,r}return Object.defineProperty(e.prototype,"template",{get:function(){return this._template},set:function(t){t.isTemplate=!0,this._template=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;E(t.iterator(),function(r){i.insert(r.clone())})},e.prototype.create=function(t){var i=t!=null?new t:this.template.clone();return this.insert(i),i},e})(Ah);function cr(a,e){return a===e?0:a<e?-1:1}function fl(a){switch(a){case 0:return 0;case-1:return 1;case 1:return-1}}function Lp(a,e){return a===0?e:a}var ub=(function(){function a(){this._callbackId=0,this._callbacks=new Ah(function(e,t){return Lp(cr(e.priority,t.priority),cr(e.id,t.id))})}return a.prototype.addAll=function(e,t,i,r,s){r===void 0&&(r=0),this._callbacks.insert({id:++this._callbackId,key:t,callback:i,priority:r,scope:s,type:e})},a.prototype.isEnabled=function(e,t){return fh(this._callbacks.values,function(i){return i.key===t&&e instanceof i.type})},a.prototype.applyAll=function(e,t,i){var r=this._callbacks.values,s=r.length;if(s==0)return i;for(var o=0;o<s;++o){var n=r[o];n.key===t&&e instanceof n.type&&(i=n.callback.call(n.scope,i,e,t))}return i},a})();var Lh=new ub,Ve=(function(){function a(e){this._callbackId=0,this._callbacks=new Ah(function(t,i){return Lp(cr(t.priority,i.priority),cr(t.id,i.id))}),this._disabled={},this.object=e,this.events=this._callbacks.events}return a.prototype.add=function(e,t,i,r){i===void 0&&(i=0),this._callbacks.insert({id:++this._callbackId,key:e,callback:t,priority:i,scope:r})},a.prototype.has=function(e,t,i,r){return i===void 0&&(i=0),Qn(this._callbacks.iterator(),function(s){return s.key===e&&s.callback===t&&s.priority===i&&s.scope===r})},a.prototype.remove=function(e,t){var i=this;W(Xo(this._callbacks.iterator()),function(r){r.key===e&&(!P(t)||t===r.priority)&&i._callbacks.remove(r)})},a.prototype.enableKey=function(e){delete this._disabled[e]},a.prototype.disableKey=function(e,t){t===void 0&&(t=1/0),this._disabled[e]=t},a.prototype._hasListenersByType=function(e){return fh(this._callbacks.values,function(t){return t.key===e})},a.prototype.isEnabled=function(e){return this._disabled[e]==null&&(this._hasListenersByType(e)||Lh.isEnabled(this.object,e))},a.prototype._shouldDispatch=function(e){var t=this._disabled[e];return P(t)?(t<=1?delete this._disabled[e]:--this._disabled[e],!1):!0},a.prototype.apply=function(e,t){if(this._shouldDispatch(e)){var i=this._callbacks.values,r=i.length;if(r>0)for(var s=0;s<r;++s){var o=i[s];o.key===e&&(t=o.callback.call(o.scope,t,this.object,e))}return t=Lh.applyAll(this.object,e,t),t}else return t},a.prototype.keys=function(){return Xo(Pp(this._callbacks.iterator(),function(e){return e.key}))},a.prototype.copyFrom=function(e){var t=this;E(e._callbacks.iterator(),function(i){t.add(i.key,i.callback,i.priority,i.scope)}),at(e._disabled,function(i,r){t._disabled[i]=r})},a.prototype.clear=function(){this._callbacks.clear()},a})();var we=(function(){function a(){this._disposed=!1,this._disposers=[],this.className="BaseObject"}return a.prototype.debug=function(){},Object.defineProperty(a.prototype,"uid",{get:function(){return this._uid||(this._uid=w.getUniqueId(),w.map.setKey(this._uid,this)),this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"map",{get:function(){return this._map||(this._map=new It),this._map},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"delayedMap",{get:function(){return this._delayedMap||(this._delayedMap=new It),this._delayedMap},enumerable:!0,configurable:!0}),a.prototype.addDelayedMap=function(e,t){var i=this.delayedMap;i.hasKey(t)||i.setKey(t,[]);var r=i.getKey(t);r.push({property:e,target:this})},a.prototype.processDelayedMap=function(){var e=this;this.delayedMap.each(function(t,i){if(e.map.hasKey(t)){var r=e.map.getKey(t);W(i,function(s){s.target[s.property]=r}),e.delayedMap.removeKey(t)}})},a.prototype.applyTheme=function(){var e=this;if(w){var t=this.getCurrentThemes();t&&W(t,function(i,r){i(e)})}},Object.defineProperty(a.prototype,"themes",{get:function(){return this._themes},set:function(e){this._themes=e},enumerable:!0,configurable:!0}),a.prototype.getCurrentThemes=function(){return this.themes||w.themes},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var e=this._disposers;for(this._disposers=null;e.length!==0;){var t=e.shift();t.dispose()}this.clearCache(),this.clonedFrom&&this.clonedFrom.clones.removeValue(this);var i=this._uid;i!=null&&w.map.removeKey(i)}},a.prototype.addDisposer=function(e){this._disposers.push(e)},a.prototype.removeDispose=function(e){if(!this._disposed){var t=Ii(this._disposers,e);t>-1&&this._disposers.splice(t,1)}e.dispose()},a.prototype.clone=function(e){e||(e="clone-"+w.getUniqueId());var t=new this.constructor;return t.cloneId=e,t.copyFrom(this),t},Object.defineProperty(a.prototype,"clones",{get:function(){return this._clones||(this._clones=new wt),this._clones},enumerable:!0,configurable:!0}),a.prototype.copyFrom=function(e){e.clones.push(this),this.clonedFrom=e},Object.defineProperty(a.prototype,"className",{get:function(){return this._className},set:function(e){this._className=e},enumerable:!0,configurable:!0}),a.prototype.setCache=function(e,t,i){Ha.set(this.uid,e,t,i)},a.prototype.getCache=function(e,t){return t===void 0&&(t=void 0),Ha.get(this.uid,e,t)},a.prototype.clearCache=function(){Ha.clear(this.uid)},a.prototype.setTimeout=function(e,t){var i=this,r=setTimeout(function(){i.removeDispose(s),e()},t),s=new Lt(function(){clearTimeout(r)});return this._disposers.push(s),s},a.prototype.setInterval=function(e,t){var i=this,r=setInterval(function(){i.removeDispose(s),e()},t),s=new Lt(function(){clearTimeout(r)});return this._disposers.push(s),s},Object.defineProperty(a.prototype,"config",{set:function(e){try{this.processConfig(e)}catch(t){this.raiseCriticalError(t)}},enumerable:!0,configurable:!0}),a.prototype.processConfig=function(e){var t=this;if(e){var i=this;if(ys(e,function(s,o){var n=o;if(s=="callback"&&typeof o=="function"&&o.call(i),t.hasProperty(s)){var l;if(Kt(n)&&C(n.type)&&(!Kt(i[s])||!C(i[s].className)||n.forceCreate||i[s].className!=n.type)&&!t.asIs(s)?(l=t.createClassInstance(n.type),l?i[s]=l:l=i[s]):l=i[s],l instanceof Ve)t.processAdapters(l,n);else if(l instanceof _r)t.processEvents(l,n);else if(s=="locale"&&vt(n))window["am4lang_"+n]&&(i[s]=window["am4lang_"+n]);else if(s=="parent"&&vt(n)){var h=t.map.getKey(n);h?i[s]=h:t.addDelayedMap("parent",n)}else if(t.asIs(s))i[s]=n;else if(t.asFunction(s)&&vt(n))if(C(w.registeredClasses[n]))i[s]=w.registeredClasses[n];else throw Error("Invalid easing function: "+n);else if(n instanceof a)i[s]=n;else if(l instanceof a)l.config=n;else if(l instanceof zt||l instanceof Ga||l instanceof Oh){if(oe(n))l instanceof zt?t.processListTemplate(n,l):t.processOrderedTemplate(n,l);else if(Kt(n))if(n instanceof a)l.template=n;else{var u=void 0;C(n.template)?u=n.template:u=n,l.template instanceof a?l.template.config=u:at(u,function(p,d){var c=l.template[p];c instanceof Ve?t.processAdapters(c,d):c instanceof _r?t.processEvents(c,d):c instanceof Es?t.processDictionaryTemplate(c,d):l.template[p]instanceof a?l.template[p].config=d:Kt(d)&&C(d.type)?(c=t.createClassInstance(d.type),c?(c instanceof a&&(c.config=d),l.template[p]=c):l.template[p]=d):c instanceof wt?t.processList(d,c):l.template[p]=t.maybeColorOrPercent(d)}),C(n.values)&&(l instanceof zt?t.processListTemplate(n.values,l):t.processOrderedTemplate(n.values,l))}}else l instanceof wt?s=="children"?t.processList(n,l,t):t.processList(n,l):l instanceof Es?t.processDictionaryTemplate(l,n):l instanceof It?t.processDictionary(l,n):l instanceof Dt||l instanceof _t?i[s]=t.maybeColorOrPercent(n):Kt(l)&&Kt(n)?Jn(n,l):(n=t.maybeColorOrPercent(n),i[s]=n)}else t.isReserved(s)||(i[s]=n)},this.configOrder),this.processingErrors.length){var r=this.processingErrors.join(`
3
+ `);throw this._processingErrors=[],Error(r)}}},a.prototype.maybeColorOrPercent=function(e){if(vt(e)){if(e.match(/^[\-]?[0-9.]+\%$/))return N(Wt(e));if(e.match(/^\#[0-9abcdef]{3,}$/i))return nt(e)}return e},a.prototype.processAdapters=function(e,t){var i=this;oe(t)?W(t,function(r,s){e.add(r.key,r.callback,r.priority||0,i)}):Kt(t)&&at(t,function(r,s){e.has(r,s)||e.add(r,s)})},a.prototype.processEvents=function(e,t){var i=this;oe(t)?W(t,function(r,s){e.on(r.type,r.callback,i)}):Kt(t)&&at(t,function(r,s){e.has(r,s)||e.on(r,s)})},a.prototype.processDictionaryTemplate=function(e,t){Kt(t)&&at(t,function(i,r){var s;i=="template"?s=e.template:e.hasKey(i)?s=e.getKey(i):s=e.create(i),s instanceof a?s.config=r:Kt(s)&&Kt(r)?Jn(r,s):s.setKey(i,r)})},a.prototype.processDictionary=function(e,t){Kt(t)&&at(t,function(i,r){e.setKey(i,r)})},a.prototype.processListTemplate=function(e,t){var i=this;for(W(e,function(r,s){var o=i.getConfigEntryType(r),n;if(t.hasIndex(s)&&!r.forceCreate)n=t.getIndex(s);else if(r instanceof a){t.push(r);return}else o?n=t.create(o):n=t.create();r===n||Kt(r)&&(n instanceof a?n.config=r:Kt(n)&&Kt(r)?Jn(r,n):t.setIndex(t.indexOf(n),r))});e.length>t.length;)t.pop()},a.prototype.processOrderedTemplate=function(e,t){var i=this;W(e,function(r,s){var o=i.getConfigEntryType(r),n;o?n=t.create(o):n=t.create(),Kt(r)&&(n instanceof a?n.config=r:Kt(n)&&Kt(r)?Jn(r,n):t.insert(r))})},a.prototype.processList=function(e,t,i){var r=this;oe(e)||(e=[e]);var s=t.length,o=0;for(W(e,function(n,l){if(Kt(n)){var h=void 0;if(l<s&&!n.forceCreate)h=t.getIndex(l);else if(n instanceof a){t.push(n);return}else o++,h=r.createEntryInstance(n),i?h.parent=i:t.push(h);h instanceof a?h.config=n:Kt(h)&&Kt(n)&&Jn(n,h)}else t.hasIndex(l)?t.setIndex(l,n):t.push(n)});!i&&e.length+o<t.length;)t.pop()},a.prototype.configOrder=function(e,t){return e==t?0:e=="language"?-1:t=="language"?1:0},a.prototype.asIs=function(e){return Ii(["locale"],e)!=-1},a.prototype.asFunction=function(e){return!1},a.prototype.createClassInstance=function(e){if(C(w.registeredClasses[e]))return new w.registeredClasses[e];throw Error('Invalid type: "'+e+'".')},a.prototype.createEntryInstance=function(e){var t;return C(e.type)&&(t=this.createClassInstance(e.type)),t||e},a.prototype.getConfigEntryType=function(e){if(C(e.type)){if(C(w.registeredClasses[e.type]))return w.registeredClasses[e.type];throw Error('Invalid type: "'+e.type+'".')}},a.prototype.hasProperty=function(e){return e in this},a.prototype.isReserved=function(e){return["type","forceCreate"].indexOf(e)!==-1},Object.defineProperty(a.prototype,"processingErrors",{get:function(){return this._processingErrors||(this._processingErrors=[]),this._processingErrors},enumerable:!0,configurable:!0}),a})();var fi=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="BaseObjectEvents",t}return Object.defineProperty(e.prototype,"events",{get:function(){return this._eventDispatcher||(this._eventDispatcher=new _r,this._disposers.push(this._eventDispatcher)),this._eventDispatcher},enumerable:!0,configurable:!0}),e.prototype.dispatch=function(t,i){this._eventDispatcher&&this.events.isEnabled(t)&&(i?(i.type=t,i.target=i.target||this,this.events.dispatch(t,{type:t,target:this})):this.events.dispatch(t,{type:t,target:this}))},e.prototype.dispatchImmediately=function(t,i){this._eventDispatcher&&this.events.isEnabled(t)&&(i?(i.type=t,i.target=i.target||this,this.events.dispatchImmediately(t,i)):this.events.dispatchImmediately(t,{type:t,target:this}))},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),t._eventDispatcher&&this.events.copyFrom(t._eventDispatcher)},e})(we);var Jf={_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_second:"HH:mm:ss",_date_minute:"HH:mm",_date_hour:"HH:mm",_date_day:"MMM dd",_date_week:"ww",_date_month:"MMM",_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(a){var e="th";if(a<11||a>13)switch(a%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"Zoom Out":"",Play:"",Stop:"",Legend:"","Click, tap or 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":"","Click, tap or press ENTER to open":"","Click, tap or press ENTER to print.":"","Click, tap or press ENTER to export as %1.":"",'To save the image, right-click this link and choose "Save picture as..."':"",'To save the image, right-click thumbnail on the left and choose "Save picture as..."':"","(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:"","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:""};var er=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.adapter=new Ve(t),t._locale=Jf,t._defaultLocale=Jf,t.className="Language",C($t.defaultLocale)&&(t.locale=$t.defaultLocale),t.applyTheme(),t}return e.prototype.getLocale=function(t){return t==null&&(t=this._locale),this.adapter.apply("locale",{locale:t}).locale},e.prototype.translate=function(t,i){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];i=this.getLocale(i);var o=t,n=this.getTranslations(i),l=n[t];if(l===null)o="";else if(C(l))l&&(o=l);else if(i!==this._defaultLocale)return this.translate.apply(this,pa([t,this._defaultLocale],r));if(r.length)for(var h=r.length,u=0;u<h;++u)o=o.split("%"+(u+1)).join(r[u]);return this.adapter.apply("translate",{translation:o,locale:i}).translation},e.prototype.translateAny=function(t,i){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];return this.translate.apply(this,pa([t,i],r))},e.prototype.setTranslationAny=function(t,i,r){var s=r||this.locale;s[t]=i},e.prototype.translateEmpty=function(t,i){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var o=this.translate.apply(this,pa([t,i],r));return o==t?"":o},e.prototype.translateFunc=function(t,i){i=this.getLocale(i);var r=this.getTranslations(i),s=r[t];return s??(i!==this._defaultLocale?this.translateFunc(t,this._defaultLocale):function(){return""})},e.prototype.translateAll=function(t,i){var r=this;return this.isDefault()?t:da(t,function(s){return r.translate(s,i)})},e.prototype.isDefault=function(){return this._defaultLocale===this._locale},Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},set:function(t){if(this._locale!=t&&(this._locale=t,this.events.isEnabled("localechanged"))){var i={type:"localechanged",locale:t,target:this};this.events.dispatchImmediately("localechanged",i)}},enumerable:!0,configurable:!0}),e.prototype.getTranslations=function(t){return this.adapter.apply("translations",{translations:t,locale:t}).translations},e})(fi);var tm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.adapter=new Ve(t),t.className="TextFormatter",t.applyTheme(),t}return e.prototype.debug=function(){},e.prototype.format=function(t,i){C(i)||(i="svg");var r="";t=this.escape(t);var s=t.match(/\[([^\]]*?)\]/gm);if(!s)return this.wrap(t,"",i);for(var o=t.split(/\[[^\[\]]*\]/),n=0,l=o.length;n<l;n++){var h=o[n];if(h!==""){h=this.adapter.apply("chunk",h);var u="";n>0&&(u=s[n-1].replace("[","").replace("]","")),r+=this.wrap(h,u,i)}}return r=this.unescape(r),this.cleanUp(r)},e.prototype.escape=function(t){return t.replace(/\[\[/g,w.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g,"$1"+w.getPlaceholder("2")).replace(/\]\]/g,w.getPlaceholder("2")).replace(/\{\{/g,w.getPlaceholder("3")).replace(/\}\}/g,w.getPlaceholder("4")).replace(/\'\'/g,w.getPlaceholder("5"))},e.prototype.unescape=function(t){return t.replace(new RegExp(w.getPlaceholder("1"),"g"),"[[").replace(new RegExp(w.getPlaceholder("2"),"g"),"]]").replace(new RegExp(w.getPlaceholder("3"),"g"),"{{").replace(new RegExp(w.getPlaceholder("4"),"g"),"}}").replace(new RegExp(w.getPlaceholder("5"),"g"),"''")},e.prototype.cleanUp=function(t){return t.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")},e.prototype.wrap=function(t,i,r){return(i===""||i==="/")&&(i=""),r==="html"?this.wrapHtml(t,this.translateStyleShortcuts(i)):this.wrapSvg(t,this.translateStyleShortcuts(i))},e.prototype.wrapSvg=function(t,i){return i===""?"<tspan>"+t+"</tspan>":"<tspan style='"+i+"'>"+t+"</tspan>"},e.prototype.getSvgElement=function(t,i){var r=new Wa("tspan");return r.textContent=t,i&&r.node.setAttribute("style",i),r},e.prototype.wrapHtml=function(t,i){return i===""?"<span>"+t+"</span>":"<span style='"+this.styleSvgToHtml(i)+"'>"+t+"</span>"},e.prototype.getHtmlElement=function(t,i){var r=document.createElement("span");return r.innerHTML=t,i&&r.setAttribute("style",i),r},e.prototype.styleSvgToHtml=function(t){return t=t.replace(/fill:/,"color:"),t},e.prototype.translateStyleShortcuts=function(t){if(t==""||t=="[ ]")return"";var i=w.getCache("translateStyleShortcuts_"+t);if(i)return i;var r=t.match(/('[^']*')|("[^"]*")/gi);if(r)for(var s=0;s<r.length;s++)t=t.replace(r[s],r[s].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));var o=t.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w]+)|(\/)/gi);if(!o)return t;for(var s=0;s<o.length;s++)o[s].match(/^bold$/i)?o[s]="font-weight:"+o[s]:o[s]=="/"?o[s]="":o[s].match(/:/)?o[s]=o[s].replace(/\+/g," "):o[s]="fill:"+o[s];var n=o.join(";");return w.setCache("translateStyleShortcuts_"+t,n),n},e.prototype.chunk=function(t,i,r){i===void 0&&(i=!1),r===void 0&&(r=!1);var s=[];t=this.escape(t);for(var o=i?t.split("'"):[t],n=0;n<o.length;n++){var l=o[n];if(l!=="")if(n%2===0){l=l.replace(/\]\[/g,"]"+_i+"["),l=l.replace(/\[\]/g,"[ ]");for(var h=l.split(/[\[\]]+/),u=0;u<h.length;u++){var p=this.cleanUp(this.unescape(h[u]));p!==_i&&p!==""&&(u%2===0?s.push({type:"value",text:this.adapter.apply("chunk",p)}):s.push({type:r?"value":"format",text:"["+p+"]"}))}}else for(var h=l.split(/[\[\]]+/),u=0;u<h.length;u++){var p=this.cleanUp(this.unescape(h[u]));p!==""&&(u%2===0?s.push({type:"text",text:p}):this.isImage(p)?s.push({type:"image",text:"["+p+"]"}):s.push({type:"format",text:"["+p+"]"}))}}return s},e.prototype.isImage=function(t){return!!t.match(/img[ ]?:/)},e})(we);var Qf;function fr(){return Qf==null&&(Qf=new tm),Qf}w.registeredClasses.TextFormatter=tm;var ml=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._negativeBase=0,t._numberFormat="#,###.#####",t._outputFormat="svg",t._smallNumberThreshold=1,t._forceLTR=!1,t.className="NumberFormatter",t.applyTheme(),t}return e.prototype.dispose=function(){a.prototype.dispose.call(this),this.language&&this.language.dispose()},Object.defineProperty(e.prototype,"language",{get:function(){return this._language||(this.sprite?this._language=this.sprite.language:this._language=new er),this._language},set:function(t){this._language=t},enumerable:!0,configurable:!0}),e.prototype.format=function(t,i,r){(typeof i>"u"||vt(i)&&i.toLowerCase()==="number")&&(i=this._numberFormat);var s,o=Number(t);if(Kt(i))try{return this.intlLocales?new Intl.NumberFormat(this.intlLocales,i).format(o):new Intl.NumberFormat(void 0,i).format(o)}catch{return"Invalid"}else{i=Ya(i);var n=this.parseFormat(i,this.language),l=void 0;o>this._negativeBase?l=n.positive:o<this._negativeBase?l=n.negative:l=n.zero,C(r)&&!l.mod&&(l=Kv(l),l.decimals.active=o==0?0:r),s=l.template.split(_i).join(this.applyFormat(o,l))}return this.forceLTR&&(s="\u200E"+s),s},e.prototype.parseFormat=function(t,i){var r=this,s=this.getCache(t);if(C(s))return s;var o={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:i.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:i.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:i.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1}};t=t.replace("||",ga);var n=t.split("|");return o.positive.source=n[0],typeof n[2]>"u"?o.zero=o.positive:o.zero.source=n[2],typeof n[1]>"u"?o.negative=o.positive:o.negative.source=n[1],at(o,function(l,h){if(!h.parsed){if(typeof r.getCache(h.source)<"u"){o[l]=r.getCache(h.source);return}var u=h.source;u.toLowerCase()==="number"&&(u=vt(r._numberFormat)?r._numberFormat:"#,###.#####");for(var p=fr().chunk(u,!0),d=0;d<p.length;d++){var c=p[d];if(c.text=c.text.replace(ga,"|"),c.type==="value"){var f=c.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(f)if(f===null||f[0]==="")h.template+=c.text;else{var g=f[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);g&&(h.mod=g[0].toLowerCase(),h.modSpacing=!!f[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));var m=f[0].split(".");if(m[0]!==""){h.thousands.active=(m[0].match(/0/g)||[]).length,h.thousands.passive=(m[0].match(/\#/g)||[]).length+h.thousands.active;var y=m[0].split(",");y.length===1||(h.thousands.interval=ee(y.pop()).length,h.thousands.interval===0&&(h.thousands.interval=-1))}typeof m[1]>"u"||(h.decimals.active=(m[1].match(/0/g)||[]).length,h.decimals.passive=(m[1].match(/\#/g)||[]).length+h.decimals.active),h.template+=c.text.split(f[0]).join(_i)}}else h.template+=c.text}r.setCache(h.source,h),h.parsed=!0}}),this.setCache(t,o),o},e.prototype.applyFormat=function(t,i){var r=t<0;t=Math.abs(t);var s="",o="",n=i.mod?i.mod.split(""):[];if(n.indexOf("b")!==-1){var l=this.applyPrefix(t,this.bytePrefixes,n.indexOf("!")!==-1);t=l[0],s=l[1],o=l[2],i.modSpacing&&(o=" "+o)}else if(n.indexOf("a")!==-1){var h=this.applyPrefix(t,t<this.smallNumberThreshold?this.smallNumberPrefixes:this.bigNumberPrefixes,n.indexOf("!")!==-1);t=h[0],s=h[1],o=h[2],i.modSpacing&&(o=" "+o)}else if(n.indexOf("p")!==-1){var u=Math.min(t.toString().length+2,21);t=parseFloat(t.toPrecision(u)),s=this.language.translate("_percentPrefix")||"",o=this.language.translate("_percentSuffix")||"",s==""&&o==""&&(o="%")}else if(n.indexOf("%")!==-1){var u=Pt(t.toString().length+2,21);t*=100,t=parseFloat(t.toPrecision(u)),o="%"}else if(n.indexOf("\u2030")!==-1){var u=Pt(t.toString().length+3,21);t*=1e3,t=parseFloat(t.toPrecision(u)),o="\u2030"}if(n.indexOf("e")!==-1){var p=void 0;i.decimals.passive>=0?p=t.toExponential(i.decimals.passive).split("e"):p=t.toExponential().split("e"),t=Number(p[0]),o="e"+p[1],i.modSpacing&&(o=" "+o)}else if(i.decimals.passive===0)t=Math.round(t);else if(i.decimals.passive>0){var d=Math.pow(10,i.decimals.passive);t=Math.round(t*d)/d}var c="",f=Rf(t).split("."),g=f[0];if(g.length<i.thousands.active&&(g=Array(i.thousands.active-g.length+1).join("0")+g),i.thousands.interval>0){for(var m=[],y=g.split("").reverse().join(""),v=0,x=g.length;v<=x;v+=i.thousands.interval){var _=y.substr(v,i.thousands.interval).split("").reverse().join("");_!==""&&m.unshift(_)}g=m.join(i.thousands.separator)}c+=g,f.length===1&&f.push("");var $=f[1];return $.length<i.decimals.active&&($+=Array(i.decimals.active-$.length+1).join("0")),$!==""&&(c+=i.decimals.separator+$),c===""&&(c="0"),t!==0&&r&&n.indexOf("s")===-1&&(c="-"+c),s&&(c=s+c),o&&(c+=o),c},e.prototype.applyPrefix=function(t,i,r){r===void 0&&(r=!1);for(var s=t,o="",n="",l=!1,h=1,u=0,p=i.length;u<p;u++)i[u].number<=t&&(i[u].number===0?s=0:(s=t/i[u].number,h=i[u].number),o=i[u].prefix,n=i[u].suffix,l=!0);return!l&&r&&i.length&&t!=0&&(s=t/i[0].number,o=i[0].prefix,n=i[0].suffix,l=!0),l&&(s=parseFloat(s.toPrecision(Pt(h.toString().length+Math.floor(s).toString().replace(/[^0-9]*/g,"").length,21)))),[s,o,n]},e.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},Object.defineProperty(e.prototype,"numberFormat",{get:function(){return this._numberFormat},set:function(t){this._numberFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intlLocales",{get:function(){return this._intlLocales},set:function(t){this._intlLocales=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"negativeBase",{get:function(){return this._negativeBase},set:function(t){this._negativeBase=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bigNumberPrefixes",{get:function(){return C(this._bigNumberPrefixes)||(this._bigNumberPrefixes=[{number:1e3,suffix:this.language.translate("_big_number_suffix_3")},{number:1e6,suffix:this.language.translate("_big_number_suffix_6")},{number:1e9,suffix:this.language.translate("_big_number_suffix_9")},{number:1e12,suffix:this.language.translate("_big_number_suffix_12")},{number:1e15,suffix:this.language.translate("_big_number_suffix_15")},{number:1e18,suffix:this.language.translate("_big_number_suffix_18")},{number:1e21,suffix:this.language.translate("_big_number_suffix_21")},{number:1e24,suffix:this.language.translate("_big_number_suffix_24")}]),this._bigNumberPrefixes},set:function(t){this._bigNumberPrefixes=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallNumberPrefixes",{get:function(){return C(this._smallNumberPrefixes)||(this._smallNumberPrefixes=[{number:1e-24,suffix:this.language.translate("_small_number_suffix_24")},{number:1e-21,suffix:this.language.translate("_small_number_suffix_21")},{number:1e-18,suffix:this.language.translate("_small_number_suffix_18")},{number:1e-15,suffix:this.language.translate("_small_number_suffix_15")},{number:1e-12,suffix:this.language.translate("_small_number_suffix_12")},{number:1e-9,suffix:this.language.translate("_small_number_suffix_9")},{number:1e-6,suffix:this.language.translate("_small_number_suffix_6")},{number:.001,suffix:this.language.translate("_small_number_suffix_3")}]),this._smallNumberPrefixes},set:function(t){this._smallNumberPrefixes=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallNumberThreshold",{get:function(){return this._smallNumberThreshold},set:function(t){this._smallNumberThreshold=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bytePrefixes",{get:function(){return C(this._bytePrefixes)||(this._bytePrefixes=[{number:1,suffix:this.language.translate("_byte_suffix_B")},{number:1024,suffix:this.language.translate("_byte_suffix_KB")},{number:1048576,suffix:this.language.translate("_byte_suffix_MB")},{number:1073741824,suffix:this.language.translate("_byte_suffix_GB")},{number:1099511627776,suffix:this.language.translate("_byte_suffix_TB")},{number:0x4000000000000,suffix:this.language.translate("_byte_suffix_PB")}]),this._bytePrefixes},set:function(t){this._bytePrefixes=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(t){this._outputFormat=t.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forceLTR",{get:function(){return this._forceLTR},set:function(t){this._forceLTR=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),e.prototype.escape=function(t){return t.replace("||",ga)},e.prototype.unescape=function(t){return t.replace(ga,"|")},e})(we);w.registeredClasses.NumberFormatter=ml;var uP={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6};function em(a){switch(a){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function Ee(a,e){return C(e)||(e=1),uP[a]*e}function pP(){return new Date}function xs(){return pP().getTime()}function Jo(a){return new Date(a.getTime())}function Fp(a,e,t,i){a=new Date(a.getTime()),e=new Date(e.getTime());var r=0,s=0;!i&&t!="millisecond"&&(r=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-r),s=e.getTimezoneOffset(),e.setUTCMinutes(e.getUTCMinutes()-s));var o=!1;switch(t){case"year":a.getUTCFullYear()!=e.getUTCFullYear()&&(o=!0);break;case"month":(a.getUTCFullYear()!=e.getUTCFullYear()||a.getUTCMonth()!=e.getUTCMonth())&&(o=!0);break;case"day":(a.getUTCMonth()!=e.getUTCMonth()||a.getUTCDate()!=e.getUTCDate())&&(o=!0);break;case"hour":a.getUTCHours()!=e.getUTCHours()&&(o=!0);break;case"minute":a.getUTCMinutes()!=e.getUTCMinutes()&&(o=!0);break;case"second":a.getUTCSeconds()!=e.getUTCSeconds()&&(o=!0);break;case"millisecond":a.getTime()!=e.getTime()&&(o=!0);break}if(o)return!0;var n=em(t);return n?(a.setUTCMinutes(a.getUTCMinutes()+r),e.setUTCMinutes(e.getUTCMinutes()+s),Fp(a,e,n,i)):!1}function Ai(a,e,t,i){var r=0;switch(!i&&e!="millisecond"&&(r=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-r)),e){case"day":var s=a.getUTCDate();a.setUTCDate(s+t);break;case"second":var o=a.getUTCSeconds();a.setUTCSeconds(o+t);break;case"millisecond":var n=a.getUTCMilliseconds();a.setUTCMilliseconds(n+t);break;case"hour":var l=a.getUTCHours();a.setUTCHours(l+t);break;case"minute":var h=a.getUTCMinutes();a.setUTCMinutes(h+t);break;case"year":var u=a.getUTCFullYear();a.setUTCFullYear(u+t);break;case"month":var p=a.getUTCMonth();a.setUTCMonth(p+t);break;case"week":var d=a.getUTCDate();a.setUTCDate(d+t*7);break}if(!i&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+r),e=="day"||e=="week"||e=="month"||e=="year")){var c=a.getTimezoneOffset();if(c!=r){var f=c-r;a.setUTCMinutes(a.getUTCMinutes()+f),a.getTimezoneOffset()!=c&&a.setUTCMinutes(a.getUTCMinutes()-f)}}return a}function ri(a,e,t,i,r,s,o,n){o===void 0&&(o=0),P(t)||(t=1);var l=0;switch(n&&["day","month","week","year"].indexOf(e)!=-1&&(a=gl(a,n)),!r&&e!="millisecond"&&(l=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-l)),e){case"day":var h=a.getUTCDate();if(t>1){if(s){s=ri(s,"day",1);var u=a.getTime()-s.getTime(),p=Math.floor(u/Ee("day")/t),d=Ee("day",p*t);a.setTime(s.getTime()+d-l*Ee("minute"))}}else a.setUTCDate(h);a.setUTCHours(0,0,0,0);break;case"second":var c=a.getUTCSeconds();t>1&&(c=Math.floor(c/t)*t),a.setUTCSeconds(c,0);break;case"millisecond":if(t==1)return a;var f=a.getUTCMilliseconds();f=Math.floor(f/t)*t,a.setUTCMilliseconds(f);break;case"hour":var g=a.getUTCHours();t>1&&(g=Math.floor(g/t)*t),a.setUTCHours(g,o,0,0);break;case"minute":var m=a.getUTCMinutes();f=a.getUTCMilliseconds(),t>1&&(m=Math.floor(m/t)*t),a.setUTCMinutes(m,0,0);break;case"month":var y=a.getUTCMonth();t>1&&(y=Math.floor(y/t)*t),a.setUTCMonth(y,1),a.setUTCHours(0,o,0,0);break;case"year":var v=a.getUTCFullYear();t>1&&(v=Math.floor(v/t)*t),a.setUTCFullYear(v,0,1),a.setUTCHours(0,o,0,0);break;case"week":var x=a.getUTCDate(),_=a.getUTCDay();P(i)||(i=1),_>=i?x=x-_+i:x=x-(7+_)+i,a.setUTCDate(x),a.setUTCHours(0,o,0,0);break}if(!r&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+l),e=="day"||e=="week"||e=="month"||e=="year")){var $=a.getTimezoneOffset();if($!=l){var T=$-l;a.setUTCMinutes(a.getUTCMinutes()+T)}}return a}function gl(a,e){var t=new Date(a.toLocaleString("en-US",{timeZone:e}));return t}function pb(a){var e=new Date;e.setHours(0,0,0,0);var t=gl(e,a);return t.getMinutes()}var js=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._dateFormat="yyyy-MM-dd",t._inputDateFormat="yyyy-MM-dd",t._utc=!1,t.timezoneMinutes=0,t._firstDayOfWeek=1,t.months=["January","February","March","April","May","June","July","August","September","October","November","December"],t.monthsShort=["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t.weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.weekdaysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t._outputFormat="svg",t.capitalize=!0,t.className="DateFormatter",t.applyTheme(),t}return Object.defineProperty(e.prototype,"language",{get:function(){return this._language},set:function(t){this._language=t,this.dateFormat=this._language.translate("_date")},enumerable:!0,configurable:!0}),e.prototype.format=function(t,i,r){this.language||(this.sprite?this.language=this.sprite.language:this.language=new er),(typeof i>"u"||i==="")&&(i=this._dateFormat);var s,o;if(vt(t)?o=this.parse(t):o=Ph(t),Kt(i))try{return this.intlLocales?new Intl.DateTimeFormat(this.intlLocales,i).format(o):new Intl.DateTimeFormat(void 0,i).format(o)}catch{return"Invalid"}else{i=Ya(i);var n=this.parseFormat(i);if(C(this.timezoneOffset)?o.setMinutes(o.getMinutes()+o.getTimezoneOffset()-this.timezoneOffset):C(this.timezone)&&r!==!1&&(o=gl(o,this.timezone)),!P(o.getTime()))return this.language.translate("Invalid date");s=this.applyFormat(o,n,this.language),this.capitalize&&(s=s.replace(/^.{1}/,s.substr(0,1).toUpperCase()))}return s},e.prototype.parseFormat=function(t){var i=this.getCache(t);if(C(i))return i;for(var r={template:"",parts:[]},s=fr().chunk(t,!0),o=0;o<s.length;o++){var n=s[o];if(n.type==="value"){n.text.match(/^date$/i)&&vt(this._dateFormat)&&(n.text=this._dateFormat);var l=n.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(l)for(var h=0;h<l.length;h++)r.parts.push(l[h]),n.text=n.text.replace(l[h],_i)}r.template+=n.text}return this.setCache(t,r),r},e.prototype.applyFormat=function(t,i,r){var s=i.template,o,n,l,h,u,p,d,c,f=t.getTimezoneOffset(),g=t.getTime();this.utc?(o=t.getUTCFullYear(),n=t.getUTCMonth(),l=t.getUTCDay(),h=t.getUTCDate(),u=t.getUTCHours(),p=t.getUTCMinutes(),d=t.getUTCSeconds(),c=t.getUTCMilliseconds()):(o=t.getFullYear(),n=t.getMonth(),l=t.getDay(),h=t.getDate(),u=t.getHours(),p=t.getMinutes(),d=t.getSeconds(),c=t.getMilliseconds());for(var m=0,y=i.parts.length;m<y;m++){var v="";switch(i.parts[m]){case"G":v=r.translate(o<0?"_era_bc":"_era_ad");break;case"yyyy":v=Math.abs(o).toString(),o<0&&(v+=r.translate("_era_bc"));break;case"yyy":case"yy":case"y":v=Math.abs(o).toString().substr(-i.parts[m].length),o<0&&(v+=r.translate("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":var x=Ef(t);i.parts[m]=="YYYY"?v=Math.abs(x).toString():v=Math.abs(x).toString().substr(-i.parts[m].length),x<0&&(v+=r.translate("_era_bc"));break;case"u":break;case"q":v=""+Math.ceil((t.getMonth()+1)/3);break;case"MMMMM":v=r.translate(this.months[n]).substr(0,1);break;case"MMMM":v=r.translate(this.months[n]);break;case"MMM":v=r.translate(this.monthsShort[n]);break;case"MM":v=ci(n+1,2,"0");break;case"M":v=(n+1).toString();break;case"ww":v=ci(el(t,this.utc),2,"0");break;case"w":v=el(t,this.utc).toString();break;case"W":v=If(t,this.utc).toString();break;case"dd":v=ci(h,2,"0");break;case"d":v=h.toString();break;case"DD":case"DDD":v=ci(Tp(t,this.utc).toString(),i.parts[m].length,"0");break;case"D":v=Tp(t,this.utc).toString();break;case"F":break;case"g":break;case"t":v=r.translateFunc("_dateOrd").call(this,h);break;case"E":v=(l||7).toString();break;case"EE":v=ci((l||7).toString(),2,"0");break;case"EEE":case"eee":v=r.translate(this.weekdaysShort[l]);break;case"EEEE":case"eeee":v=r.translate(this.weekdays[l]);break;case"EEEEE":case"eeeee":v=r.translate(this.weekdays[l]).substr(0,1);break;case"e":case"ee":v=(l-this.firstDayOfWeek+1).toString(),i.parts[m]=="ee"&&(v=ci(v,2,"0"));break;case"a":u>=12?v=r.translate("PM"):v=r.translate("AM");break;case"aa":u>=12?v=r.translate("P.M."):v=r.translate("A.M.");break;case"aaa":u>=12?v=r.translate("P"):v=r.translate("A");break;case"h":v=ol(u).toString();break;case"hh":v=ci(ol(u),2,"0");break;case"H":v=u.toString();break;case"HH":v=ci(u,2,"0");break;case"K":v=ol(u,0).toString();break;case"KK":v=ci(ol(u,0),2,"0");break;case"k":v=(u+1).toString();break;case"kk":v=ci(u+1,2,"0");break;case"m":v=p.toString();break;case"mm":v=ci(p,2,"0");break;case"s":v=d.toString();break;case"ss":v=ci(d,2,"0");break;case"S":case"SS":case"SSS":v=Math.round(c/1e3*Math.pow(10,i.parts[m].length)).toString();break;case"x":v=g.toString();break;case"n":case"nn":case"nnn":v=ci(c,i.parts[m].length,"0");break;case"z":v=nl(t,!1,!1,this.utc);break;case"zz":v=nl(t,!0,!1,this.utc);break;case"zzz":v=nl(t,!1,!0,this.utc);break;case"zzzz":v=nl(t,!0,!0,this.utc);break;case"Z":case"ZZ":var _=Math.abs(f)/60,$=Math.floor(_),T=_*60-$*60;this.utc&&($=0,T=0),i.parts[m]=="Z"?(v="GMT",v+=f>0?"-":"+",v+=ci($,2)+":"+ci(T,2)):(v=f>0?"-":"+",v+=ci($,2)+ci(T,2));break;case"i":v=t.toISOString();break;case"I":v=t.toUTCString();break}s=s.replace(_i,v)}return s},e.prototype.parse=function(t,i){if(C(i)||(i=this.inputDateFormat),t instanceof Date)return t;if(typeof t=="number")return new Date(t);typeof t!="string"&&(t=t.toString()),this.language||(this.sprite?this.language=this.sprite.language:this.language=new er);var r,s="";i=Ya(i),i=i.substr(0,t.length);for(var o=this.parseFormat(i),n={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},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:this.utc},h=0,u=0,p=0;p<o.parts.length;p++){switch(u=p+h+1,o.parts[p]){case"yyyy":case"YYYY":s+="([0-9]{4})",n.year=u;break;case"yyy":case"YYY":s+="([0-9]{3})",n.year3=u;break;case"yy":case"YY":s+="([0-9]{2})",n.year2=u;break;case"y":case"Y":s+="([0-9]{1})",n.year1=u;break;case"MMMM":s+="("+this.getStringList(this.months).join("|")+")",n.monthLong=u;break;case"MMM":s+="("+this.getStringList(this.monthsShort).join("|")+")",n.monthShort=u;break;case"MM":case"M":s+="([0-9]{2}|[0-9]{1})",n.month=u;break;case"ww":case"w":s+="([0-9]{2}|[0-9]{1})",n.week=u;break;case"dd":case"d":s+="([0-9]{2}|[0-9]{1})",n.day=u;break;case"DDD":case"DD":case"D":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.yearDay=u;break;case"dddd":s+="("+this.getStringList(this.weekdays).join("|")+")",n.weekdayLong=u;break;case"ddd":s+="("+this.getStringList(this.weekdaysShort).join("|")+")",n.weekdayShort=u;break;case"aaa":case"aa":case"a":s+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",n.am=u;break;case"hh":case"h":s+="([0-9]{2}|[0-9]{1})",n.hour12Base1=u;break;case"HH":case"H":s+="([0-9]{2}|[0-9]{1})",n.hourBase0=u;break;case"KK":case"K":s+="([0-9]{2}|[0-9]{1})",n.hour12Base0=u;break;case"kk":case"k":s+="([0-9]{2}|[0-9]{1})",n.hourBase1=u;break;case"mm":case"m":s+="([0-9]{2}|[0-9]{1})",n.minute=u;break;case"ss":case"s":s+="([0-9]{2}|[0-9]{1})",n.second=u;break;case"SSS":case"SS":case"S":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u,n.millisecondDigits=o.parts[p].length;break;case"nnn":case"nn":case"n":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u;break;case"x":s+="([0-9]{1,})",n.timestamp=u;break;case"Z":s+="GMT([-+]+[0-9]{2}:[0-9]{2})",n.zone=u;break;case"ZZ":s+="([\\-+]+[0-9]{2}[0-9]{2})",n.zone=u;break;case"i":s+="([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}|$)",n.iso=u,h+=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":h--;break}s+="[^0-9]*"}var d=new RegExp(s),c=t.match(d);if(c){if(n.year>-1&&(l.year=parseInt(c[n.year])),n.year3>-1){var f=parseInt(c[n.year3]);f+=1e3,l.year=f}if(n.year2>-1){var f=parseInt(c[n.year2]);f>50?f+=1e3:f+=2e3,l.year=f}if(n.year1>-1){var f=parseInt(c[n.year1]);f=Math.floor(new Date().getFullYear()/10)*10+f,l.year=f}if(n.monthLong>-1&&(l.month=this.resolveMonth(c[n.monthLong])),n.monthShort>-1&&(l.month=this.resolveShortMonth(c[n.monthShort])),n.month>-1&&(l.month=parseInt(c[n.month])-1),n.week>-1&&n.day===-1&&(l.month=0,l.day=Vf(parseInt(c[n.week]),l.year,1,this.utc)),n.day>-1&&(l.day=parseInt(c[n.day])),n.yearDay>-1&&(l.month=0,l.day=parseInt(c[n.yearDay])),n.hourBase0>-1&&(l.hour=parseInt(c[n.hourBase0])),n.hourBase1>-1&&(l.hour=parseInt(c[n.hourBase1])-1),n.hour12Base0>-1){var f=parseInt(c[n.hour12Base0]);f==11&&(f=0),n.am>-1&&!this.isAm(c[n.am])&&(f+=12),l.hour=f}if(n.hour12Base1>-1){var f=parseInt(c[n.hour12Base1]);f==12&&(f=0),n.am>-1&&!this.isAm(c[n.am])&&(f+=12),l.hour=f}if(n.minute>-1&&(l.minute=parseInt(c[n.minute])),n.second>-1&&(l.second=parseInt(c[n.second])),n.millisecond>-1){var f=parseInt(c[n.millisecond]);n.millisecondDigits==2?f*=10:n.millisecondDigits==1&&(f*=100),l.millisecond=f}if(n.timestamp>-1){l.timestamp=parseInt(c[n.timestamp]);var g=new Date(l.timestamp);l.year=g.getUTCFullYear(),l.month=g.getUTCMonth(),l.day=g.getUTCDate(),l.hour=g.getUTCHours(),l.minute=g.getUTCMinutes(),l.second=g.getUTCSeconds(),l.millisecond=g.getUTCMilliseconds()}n.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[n.zone])),n.iso>-1&&(l.year=Wt(c[n.iso+0]),l.month=Wt(c[n.iso+1])-1,l.day=Wt(c[n.iso+2]),l.hour=Wt(c[n.iso+3]),l.minute=Wt(c[n.iso+4]),l.second=Wt(c[n.iso+5]),l.millisecond=Wt(c[n.iso+6]),c[n.iso+7]=="Z"||c[n.iso+7]=="z"?l.utc=!0:c[n.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[n.iso+7]))),l.utc?r=new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):r=new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else r=new Date(t);return r},e.prototype.resolveTimezoneOffset=function(t,i){var r=i.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/);if(r){var s=ee(i.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)),o=s[1],n=s[2],l=s[3],h=parseInt(n)*60+parseInt(l);o=="+"&&(h*=-1);var u=(t||new Date).getTimezoneOffset(),p=h-u;return p}return 0},e.prototype.resolveMonth=function(t){var i=this.months.indexOf(t);return i>-1||this.language&&!this.language.isDefault()&&(i=this.language.translateAll(this.months).indexOf(t),i>-1)?i:0},e.prototype.resolveShortMonth=function(t){var i=this.monthsShort.indexOf(t);return i>-1||(i=this.months.indexOf(t),i>-1)||this.language&&!this.language.isDefault()&&(i=this.language.translateAll(this.monthsShort).indexOf(t),i>-1)?i:0},e.prototype.isAm=function(t){var i=this.getStringList(["AM","A.M.","A"]);return i.indexOf(t.toUpperCase())>-1},e.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},e.prototype.getStringList=function(t){for(var i=[],r=0;r<t.length;r++)this.language?i.push(il(this.language.translate(t[r]))):i.push(il(t[r]));return i},Object.defineProperty(e.prototype,"dateFormat",{get:function(){return this._dateFormat},set:function(t){this._dateFormat=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDateFormat",{get:function(){return this._inputDateFormat},set:function(t){this._inputDateFormat=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intlLocales",{get:function(){return this._intlLocales},set:function(t){this._intlLocales=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"utc",{get:function(){return this._utc},set:function(t){this._utc=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezoneOffset",{get:function(){return this._timezoneOffset},set:function(t){this._timezoneOffset!=t&&(this._timezoneOffset=t,this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezone",{get:function(){return this._timezone},set:function(t){this._timezone!=t&&(this._timezone=t,this.timezoneMinutes=pb(t),this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstDayOfWeek",{get:function(){return this._firstDayOfWeek},set:function(t){this._firstDayOfWeek=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(t){this._outputFormat=t.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),e})(we);w.registeredClasses.DateFormatter=js;function rm(a){return+a}w.registeredClasses["ease.linear"]=rm;function dP(a){return a*a}w.registeredClasses["ease.quadIn"]=dP;function cP(a){return a*(2-a)}w.registeredClasses["ease.quadOut"]=cP;function fP(a){return a*=2,(a<=1?a*a:--a*(2-a)+1)/2}w.registeredClasses["ease.quadInOut"]=fP;function db(a,e){return Math.pow(a,e)}w.registeredClasses["ease.polyIn"]=db;function cb(a,e){return 1-Math.pow(1-a,e)}w.registeredClasses["ease.polyOut"]=cb;function fb(a,e){return a*=2,(a<=1?Math.pow(a,e):2-Math.pow(2-a,e))/2}w.registeredClasses["ease.polyInOut"]=fb;function mP(a){return db(a,3)}w.registeredClasses["ease.polyIn3"]=mP;function Vp(a){return cb(a,3)}w.registeredClasses["ease.polyOut3"]=Vp;function gP(a){return fb(a,3)}w.registeredClasses["ease.polyInOut3"]=gP;function yP(a){return Math.pow(2,10*a-10)}w.registeredClasses["ease.expIn"]=yP;function vP(a){return 1-Math.pow(2,-10*a)}w.registeredClasses["ease.expOut"]=vP;function bP(a){return a*=2,(a<=1?Math.pow(2,10*a-10):2-Math.pow(2,10-10*a))/2}w.registeredClasses["ease.expInOut"]=bP;function xP(a){return 1-Math.cos(a*pf)}w.registeredClasses["ease.sinIn"]=xP;function sm(a){return Math.sin(a*pf)}w.registeredClasses["ease.sinOut"]=sm;function _P(a){return(1-Math.cos(ph*a))/2}w.registeredClasses["ease.sinInOut"]=_P;function am(a){return a*a*a}w.registeredClasses["ease.cubicIn"]=am;function Jr(a){return--a*a*a+1}w.registeredClasses["ease.cubicOut"]=Jr;function PP(a){return a*=2,(a<=1?a*a*a:(a-=2)*a*a+2)/2}w.registeredClasses["ease.cubicInOut"]=PP;function $P(a){return 1-Math.sqrt(1-a*a)}w.registeredClasses["ease.circleIn"]=$P;function wP(a){return Math.sqrt(1- --a*a)}w.registeredClasses["ease.circleOut"]=wP;function CP(a){return a*=2,(a<=1?1-Math.sqrt(1-a*a):Math.sqrt(1-(a-=2)*a)+1)/2}w.registeredClasses["ease.circleInOut"]=CP;var im=4/11,SP=6/11,TP=8/11,DP=3/4,kP=9/11,AP=10/11,OP=15/16,LP=21/22,FP=63/64,Mp=1/im/im;function MP(a){return 1-Rp(1-a)}w.registeredClasses["ease.bounceIn"]=MP;function Rp(a){return a=+a,a<im?Mp*a*a:a<TP?Mp*(a-=SP)*a+DP:a<AP?Mp*(a-=kP)*a+OP:Mp*(a-=LP)*a+FP}w.registeredClasses["ease.bounceOut"]=Rp;function RP(a){return a*=2,(a<=1?1-Rp(1-a):Rp(a-1)+1)/2}w.registeredClasses["ease.bounceInOut"]=RP;var IP=2*Math.PI,Mh=1,Rh=.3/IP,Ip=Math.asin(1/Mh)*Rh;function VP(a){return Mh*Math.pow(2,10*--a)*Math.sin((Ip-a)/Rh)}w.registeredClasses["ease.elasticIn"]=VP;function EP(a){return 1-Mh*Math.pow(2,-10*(a=+a))*Math.sin((a+Ip)/Rh)}w.registeredClasses["ease.elasticOut"]=EP;function NP(a){return a=a*2-1,(a<0?Mh*Math.pow(2,10*a)*Math.sin((Ip-a)/Rh):2-Mh*Math.pow(2,-10*a)*Math.sin((Ip+a)/Rh))/2}w.registeredClasses["ease.elasticInOut"]=NP;var Qo=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.transitionDuration=0,t.transitionEasing=Jr,t.properties={},t.propertyFields={},t.filters=new wt,t.isTemplate=!1,t.className="SpriteState",t._disposers.push(new Ft(t.filters)),t.applyTheme(),t}return Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return this._adapterO||(this._adapterO=new Ve(this),this._adapterO.events.on("inserted",function(i){t[i.newValue.key]=t[i.newValue.key]},void 0,!1),this._adapterO.events.on("removed",function(i){t[i.newValue.key]=t[i.newValue.key]},void 0,!1)),this._adapterO},enumerable:!0,configurable:!0}),e.prototype.getPropertyValue=function(t){var i=this.properties[t],r=this.sprite;if(r){var s=this.propertyFields[t];if(C(s)&&(r.dataItem&&(i=r.dataItem.dataContext[s]),i==null&&(i="__unset")),C(i))this._adapterO&&(i=this._adapterO.apply(t,i));else{var o=r.getPropertyValue(t);this._adapterO?i=this._adapterO.apply(t,o):i=o,i==o&&(i=void 0)}}return i},e.prototype.copyFrom=function(t){t&&t!=this&&(this.transitionDuration=t.transitionDuration,this.transitionEasing=t.transitionEasing,tr(t.properties,this.properties),tr(t.propertyFields,this.propertyFields),this.filters.copyFrom(t.filters),t._adapterO&&this.adapter.copyFrom(t._adapterO))},Object.defineProperty(e.prototype,"allValues",{get:function(){var t=this,i={};if(at(this.properties,function(o,n){i[o]=t.getPropertyValue(o)}),this._adapterO){var r=this._adapterO.keys();at(r,function(o,n){var l=t.getPropertyValue(n);i[n]=l})}var s=this.propertyFields;return at(s,function(o){var n=t.getPropertyValue(o);i[o]=n}),i},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this.properties={},this.filters.clear()},e.prototype.processConfig=function(t){C(t)&&C(t.properties)&&at(t.properties,function(i,r){vt(r)&&(r.match(/^[0-9.\-]+\%$/)?t.properties[i]=N(Wt(r)):r.match(/^\#[0-9abcdef]{3,}$/i)&&(t.properties[i]=Hi(r)))}),a.prototype.processConfig.call(this,t)},e.prototype.asFunction=function(t){return t=="transitionEasing"||a.prototype.asIs.call(this,t)},e})(we);w.registeredClasses.SpriteState=Qo;var om=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._interactionEvents=new It,t}return e.prototype._dispatchSpriteEvent=function(t){if(!(this.target.disabled||this.target.isTemplate)&&this.target.events.isEnabled(t.type)){var i=yh(t,{target:this.target});this.target.events.dispatchImmediately(i.type,i)}},e.prototype._dispatchSpritePointEvent=function(t){if(!(this.target.disabled||this.target.isTemplate)&&this.target.events.isEnabled(t.type)){var i=yh(t,{target:this.target,spritePoint:t.point?Ns(t.point,this.target):void 0,svgPoint:this.target.getSvgPoint(t.point)});this.target.events.dispatchImmediately(i.type,i)}},e.prototype._addInteractionObjectEvent=function(t,i,r,s){var o=this,n=s+"-"+t,l=this._interactionEvents.insertKeyIfEmpty(n,function(){var h=o.target.interactions.events.on(t,i,r,s);return new fa(function(){o._interactionEvents.removeKey(n),h.dispose()})});return l.increment()},e.prototype._on=function(t,i,r,s,o,n){var l=a.prototype._on.call(this,t,i,r,s,o,n),h=[l.disposer];switch(i){case"hit":case"track":case"doublehit":case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":h.push(this._addInteractionObjectEvent(i,this._dispatchSpritePointEvent,this,o));break;case"rightclick":case"down":case"up":case"drag":case"dragged":case"dragstart":case"dragstop":case"over":case"out":case"swipe":case"swipeleft":case"swiperight":case"resize":case"focus":case"blur":case"toggled":h.push(this._addInteractionObjectEvent(i,this._dispatchSpriteEvent,this,o));break}switch(i){case"hit":case"doublehit":case"rightclick":case"down":case"up":this.target.clickable=!0;break;case"toggled":this.target.togglable=!0;break;case"drag":case"dragstart":case"dragstop":this.target.draggable=!0;break;case"track":this.target.trackable=!0;break;case"resize":this.target.resizable=!0;break;case"swipe":case"swipeleft":case"swiperight":this.target.swipeable=!0;break;case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":this.target.wheelable=!0;break;case"over":this.target.hoverable=!0;case"out":this.target.hoverable=!0;break;case"focus":case"blur":this.target.focusable=!0;break}return l.disposer=new Bt(h),l},e})(gh);var nm=(function(){function a(){}return a.opacity=1,a.strokeOpacity=1,a.strokeWidth=1,a.fillOpacity=1,a.fill=nt("#000000"),a.stroke=nt("#000000"),a.focusable=void 0,a.tabindex=0,a})();var lm=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._domEvents={},t}return e.prototype._addDOMEvent=function(t,i,r,s){var o=this;if(!this._domEvents[t]){var n=function(l){r.call(s,i,l)};this.target.element.addEventListener(t,n,!1),this._domEvents[t]=new fa(function(){delete o._domEvents[t],o.target.element.removeEventListener(t,n,!1)})}return this._domEvents[t].increment()},e.prototype._dispatchKeyboardEvent=function(t,i){this.target.events.isEnabled(t)&&this.target.events.dispatchImmediately(t,{type:t,target:this.target,event:i})},e.prototype._on=function(t,i,r,s,o,n){var l=a.prototype._on.call(this,t,i,r,s,o,n),h=[l.disposer];switch(i){case"hit":case"doublehit":case"rightclick":case"down":case"up":this.target.clickable=!0;break;case"drag":case"dragstart":case"dragstop":this.target.draggable=!0;break;case"track":this.target.trackable=!0;break;case"resize":this.target.resizable=!0;break;case"swipe":case"swipeleft":case"swiperight":this.target.swipeable=!0;break;case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":this.target.wheelable=!0;break;case"over":case"out":this.target.hoverable=!0;break;case"focus":case"blur":case"focusin":case"focusout":this.target.focusable=!0;break;case"keydown":h.push(this._addDOMEvent(i,i,this._dispatchKeyboardEvent,this));break;case"keyup":h.push(this._addDOMEvent(i,i,this._dispatchKeyboardEvent,this));break;case"keypress":h.push(this._addDOMEvent(i,i,this._dispatchKeyboardEvent,this));break;case"input":h.push(this._addDOMEvent(i,i,this._dispatchKeyboardEvent,this));break}return l.disposer=new Bt(h),l},e})(gh);var hm=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i._eventDispatcher=new lm(i),i.eventDisposers=new It,i.replacedStyles=new It,i._clickable=!1,i._contextMenuDisabled=!1,i._hoverable=!1,i._trackable=!1,i._draggable=!1,i._swipeable=!1,i._resizable=!1,i._wheelable=!1,i._inert=!1,i._isHover=!1,i.isRealHover=!1,i._isHoverByTouch=!1,i._isDown=!1,i._isFocused=!1,i._isTouchProtected=!1,i._inertiaOptions=new It,i.inertias=new It,i._hitOptions={},i._hoverOptions={},i._swipeOptions={},i._keyboardOptions={},i._mouseOptions={},i._cursorOptions={defaultStyle:[{property:"cursor",value:"default"}]},i._disposers.push(i._eventDispatcher),i._element=t,i.className="InteractionObject",i._disposers.push(new Pr(i.inertias)),i._disposers.push(new Pr(i.eventDisposers)),i.applyTheme(),i}return Object.defineProperty(e.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHover",{get:function(){return this._isHover},set:function(t){this.isHover!=t&&(this._isHover=t,t?gt().overObjects.moveValue(this):(this.isRealHover=!1,gt().overObjects.removeValue(this)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHoverByTouch",{get:function(){return this._isHoverByTouch},set:function(t){this.isHoverByTouch!=t&&(this._isHoverByTouch=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overPointers",{get:function(){return this._overPointers||(this._overPointers=new wt),this._overPointers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDown",{get:function(){return this._isDown},set:function(t){this.isDown!=t&&(this._isDown=t,t?gt().downObjects.moveValue(this):gt().downObjects.removeValue(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"downPointers",{get:function(){return this._downPointers||(this._downPointers=new wt),this._downPointers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},set:function(t){this.isFocused!=t&&(this._isFocused=t,t?gt().focusedObject=this:gt().focusedObject=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTouchProtected",{get:function(){return this._isTouchProtected},set:function(t){this._isTouchProtected!=t&&(this._isTouchProtected=t,t?gt().unprepElement(this):(this.draggable||this.swipeable||this.trackable||this.resizable)&&gt().prepElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clickable",{get:function(){return this._clickable},set:function(t){this._clickable!==t&&(this._clickable=t,gt().processClickable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contextMenuDisabled",{get:function(){return this._contextMenuDisabled},set:function(t){this._contextMenuDisabled!==t&&(this._contextMenuDisabled=t,gt().processContextMenu(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverable",{get:function(){return this._hoverable},set:function(t){this._hoverable!==t&&(this._hoverable=t,gt().processHoverable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackable",{get:function(){return this._trackable},set:function(t){this._trackable!==t&&(this._trackable=t,gt().processTrackable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(t){this._draggable!==t&&(this._draggable=t,gt().processDraggable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"swipeable",{get:function(){return this._swipeable},set:function(t){this._swipeable!==t&&(this._swipeable=t,gt().processSwipeable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resizable",{get:function(){return this._resizable},set:function(t){this._resizable!==t&&(this._resizable=t,gt().processResizable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wheelable",{get:function(){return this._wheelable},set:function(t){this._wheelable!==t&&(this._wheelable=t,gt().processWheelable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inert",{get:function(){return this._inert},set:function(t){this._inert!==t&&(this._inert=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusable",{get:function(){return this._focusable},set:function(t){this._focusable!==t&&(this._focusable=t,this._focusable&&this.tabindex==-1&&(this._tabindex=1),gt().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabindex",{get:function(){return hp(this._tabindex,-1)},set:function(t){this._tabindex!==t&&(this._tabindex=t,t>-1&&(this.focusable=!0),gt().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._element},set:function(t){this._element=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalPosition",{get:function(){return this._originalPosition||{x:0,y:0}},set:function(t){this._originalPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalScale",{get:function(){return hp(this._originalScale,1)},set:function(t){this._originalScale!==t&&(this._originalScale=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalAngle",{get:function(){return hp(this._originalAngle,0)},set:function(t){this._originalAngle!==t&&(this._originalAngle=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inertiaOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("inertiaOptions",this._inertiaOptions):this._inertiaOptions},set:function(t){this._inertiaOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hitOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hitOptions",this._hitOptions):this._hitOptions},set:function(t){this._hitOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hoverOptions",this._hoverOptions):this._hoverOptions},set:function(t){this._hoverOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"swipeOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("swipeOptions",this._swipeOptions):this._swipeOptions},set:function(t){this._swipeOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keyboardOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("keyboardOptions",this._keyboardOptions):this._keyboardOptions},set:function(t){this._keyboardOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mouseOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("mouseOptions",this._mouseOptions):this._mouseOptions},set:function(t){this._mouseOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("cursorOptions",this._cursorOptions):this._cursorOptions},set:function(t){this._cursorOptions=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.inertiaOptions=t.inertiaOptions,this.hitOptions=t.hitOptions,this.hoverOptions=t.hoverOptions,this.swipeOptions=t.swipeOptions,this.keyboardOptions=t.keyboardOptions,this.cursorOptions=t.cursorOptions,this.contextMenuDisabled=t.contextMenuDisabled,gt().applyCursorOverStyle(this)},e.prototype.setEventDisposer=function(t,i,r){var s=this.eventDisposers.getKey(t);i?s==null&&this.eventDisposers.setKey(t,r()):s!=null&&(s.dispose(),this.eventDisposers.removeKey(t))},e.prototype.dispose=function(){a.prototype.dispose.call(this);var t=gt();t.overObjects.removeValue(this),t.downObjects.removeValue(this),t.trackedObjects.removeValue(this),t.transformedObjects.removeValue(this),this.isHover&&this.wheelable&&t.unlockWheel(),t.focusedObject===this&&(t.focusedObject=void 0)},e})(fi);var um=(function(){function a(e,t){this._disposed=!1,this.directionX=0,this.directionY=0,this.interaction=e,this.keyboardEvent=t,this._startedOn=new Date().getTime(),gt().processDragStart(e),Ot.animations.push(this),this.update()}return a.prototype.update=function(){var e=this.interaction,t=gt().getKeyboardOption(e,"speed"),i=gt().getKeyboardOption(e,"accelleration"),r=gt().getKeyboardOption(e,"accellerationDelay"),s={x:0,y:0};this.keyboardEvent.shiftKey?(t*=.5,i=1):this.keyboardEvent.ctrlKey&&(t*=2);var o=new Date().getTime()-this._startedOn,n=o-r;if(i>0&&n>0){var l=o/r;o=r,s.x+=this.directionX*(t*i*l*n),s.y+=this.directionY*(t*i*l*n)}s.x+=this.directionX*(t*o),s.y+=this.directionY*(t*o),gt().handleTransformMove(e,s,{x:0,y:0},this.keyboardEvent,!0,!1)},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(gt().processDragStop(this.interaction),ft(Ot.animations,this))},a})();var pm=(function(a){D(e,a);function e(t,i,r,s){var o=a.call(this)||this;return o.animations=[],o.className="Inertia",o.interaction=t,o.type=i,o.point=r,o.startPoint=s,o._disposers.push(new Qr(o.animations)),o}return Object.defineProperty(e.prototype,"x",{get:function(){return this.point.x},set:function(t){P(t)&&(this.point.x=t,this.handleMove())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.point.y},set:function(t){P(t)&&(this.point.y=t,this.handleMove())},enumerable:!0,configurable:!0}),e.prototype.handleMove=function(){if(this.interaction.events.isEnabled("drag")){var t={type:"drag",target:this.interaction,shift:{x:this.x-this.startPoint.x,y:this.y-this.startPoint.y},startPoint:this.startPoint,point:{x:this.x,y:this.y},touch:!1};this.interaction.events.dispatchImmediately("drag",t)}},e.prototype.done=function(){this.interaction.inertias.removeKey(this.type),this.type==="move"&&gt().processDragStop(this.interaction),this.dispose()},e})(we);var mb=(function(){function a(){}return a.prototype.getEventKey=function(e){var t=e.keyCode||e.which,i;switch(t){case 38:i="up";break;case 40:i="down";break;case 37:i="left";break;case 39:i="right";break;case 13:i="enter";break;case 27:i="esc";break;case 36:i="home";break;case 35:i="end";break;case 9:i="tab";break;case 17:i="ctrl";break;case 18:i="alt";break;case 16:i="shift";break;case 32:i="space";break;case 36:i="home";break;case 35:i="end";break;case 33:i="pgup";break;case 34:i="pgdn";break;case 45:i="ins";break;case 46:i="del";break;case 107:i="plus";break;case 109:i="minus";break;default:i="other";break}return i},a.prototype.isKey=function(e,t){var i=this.getEventKey(e);return vt(t)&&(t=[t]),t.indexOf(i)!==-1},a.prototype.shiftKey=function(e){return e.shiftKey},a.prototype.ctrlKey=function(e){return e.ctrlKey},a.prototype.altKey=function(e){return e.altKey},a.prototype.metaKey=function(e){return e.metaKey},a})();var ir=new mb;var gb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._globalEventsAdded=!1,t._pointerEvents={pointerdown:"mousedown",pointerup:"mouseup",pointermove:"mousemove",pointercancel:"mouseup",pointerover:"mouseover",pointerout:"mouseout",wheel:"wheel"},t._usePointerEventsOnly=!1,t._useTouchEventsOnly=!1,t._addHoverEvents=!0,t._passiveSupported=!1,t._delayedEvents={out:[]},t.overObjects=new wt,t.downObjects=new wt,t.trackedObjects=new wt,t.transformedObjects=new wt,t.pointers=new It,t.inertiaOptions=new It,t.hitOptions={doubleHitTime:300,hitTolerance:10,noFocus:!0},t.hoverOptions={touchOutBehavior:"leave",touchOutDelay:1e3},t.swipeOptions={time:500,verticalThreshold:75,horizontalThreshold:30},t.keyboardOptions={speed:.1,accelleration:1.2,accellerationDelay:2e3},t.mouseOptions={sensitivity:1},t.className="Interaction",t.body=t.getInteraction(document.body),t._disposers.push(t.body),window.hasOwnProperty("PointerEvent")?(t._pointerEvents.pointerdown="pointerdown",t._pointerEvents.pointerup="pointerup",t._pointerEvents.pointermove="pointermove",t._pointerEvents.pointercancel="pointercancel",t._pointerEvents.pointerover="pointerover",t._pointerEvents.pointerout="pointerout"):window.hasOwnProperty("MSPointerEvent")?(t._pointerEvents.pointerdown="MSPointerDown",t._pointerEvents.pointerup="MSPointerUp",t._pointerEvents.pointermove="MSPointerMove",t._pointerEvents.pointercancel="MSPointerUp",t._pointerEvents.pointerover="MSPointerOver",t._pointerEvents.pointerout="MSPointerOut"):typeof matchMedia<"u"&&matchMedia("(pointer:fine)").matches?"ontouchstart"in window&&(t._addHoverEvents=!1,t._useTouchEventsOnly=!0):window.navigator.userAgent.match(/MSIE /)||t.fullFF()?t._usePointerEventsOnly=!0:t._useTouchEventsOnly=!0,"onwheel"in document.createElement("div")?t._pointerEvents.wheel="wheel":C(document.onmousewheel)&&(t._pointerEvents.wheel="mousewheel"),t.inertiaOptions.setKey("move",{time:100,duration:500,factor:1,easing:Vp}),t.inertiaOptions.setKey("resize",{time:100,duration:500,factor:1,easing:Vp}),t._passiveSupported=e.passiveSupported,t.applyTheme(),t}return e.prototype.fullFF=function(){return window.navigator.userAgent.match(/Firefox/)&&!window.navigator.userAgent.match(/Android/)},e.prototype.debug=function(){},e.prototype.addGlobalEvents=function(){var t=this;this._globalEventsAdded||(this._useTouchEventsOnly||(this._disposers.push($e(document,this._pointerEvents.pointerdown,function(i){t.handleGlobalPointerDown(i)})),this._disposers.push($e(document,this._pointerEvents.pointermove,function(i){t.handleGlobalPointerMove(i)})),this._disposers.push($e(document,this._pointerEvents.pointerup,function(i){t.handleGlobalPointerUp(i)})),this._disposers.push($e(document,this._pointerEvents.pointercancel,function(i){t.handleGlobalPointerUp(i,!0)})),this._disposers.push($e(document,"mouseenter",function(i){!C(i.relatedTarget)&&(i.buttons==0||i.which==0)&&t.handleDocumentLeave(i)}))),this._usePointerEventsOnly||(this._disposers.push($e(document,"touchstart",function(i){t.handleGlobalTouchStart(i)})),this._disposers.push($e(document,"touchmove",function(i){t.handleGlobalTouchMove(i)})),this._disposers.push($e(document,"touchend",function(i){t.handleGlobalTouchEnd(i)}))),this._disposers.push($e(document,"keydown",function(i){t.handleGlobalKeyDown(i)})),this._disposers.push($e(document,"keyup",function(i){t.handleGlobalKeyUp(i)})),this._globalEventsAdded=!0)},e.prototype.processClickable=function(t){this.processTouchable(t)},e.prototype.processContextMenu=function(t){t.contextMenuDisabled?t.eventDisposers.hasKey("contextMenuDisabled")||t.eventDisposers.setKey("contextMenuDisabled",$e(t.element,"contextmenu",function(i){i.preventDefault()})):t.eventDisposers.hasKey("contextMenuDisabled")&&t.eventDisposers.getKey("contextMenuDisabled").dispose()},e.prototype.processHoverable=function(t){var i=this;if(t.hoverable||t.trackable)this.addGlobalEvents(),this.applyCursorOverStyle(t),!t.eventDisposers.hasKey("hoverable")&&this._addHoverEvents&&t.eventDisposers.setKey("hoverable",new Bt([$e(t.element,this._pointerEvents.pointerout,function(s){return i.handlePointerOut(t,s)}),$e(t.element,this._pointerEvents.pointerover,function(s){return i.handlePointerOver(t,s)})])),t.trackable;else{var r=t.eventDisposers.getKey("hoverable");r!=null&&(r.dispose(),t.eventDisposers.removeKey("hoverable"))}this.processTouchable(t)},e.prototype.processMovable=function(t){(t.draggable||t.swipeable||t.trackable||t.resizable)&&(!this.isGlobalElement(t)&&!t.isTouchProtected&&this.prepElement(t),this.applyCursorOverStyle(t)),this.processTouchable(t)},e.prototype.processTrackable=function(t){this.processHoverable(t),this.processMovable(t),t.trackable?this.trackedObjects.moveValue(t):this.trackedObjects.removeValue(t)},e.prototype.processDraggable=function(t){this.processMovable(t)},e.prototype.processSwipeable=function(t){this.processMovable(t)},e.prototype.processResizable=function(t){this.processMovable(t)},e.prototype.processWheelable=function(t){var i=this;if(t.wheelable)t.eventDisposers.hasKey("wheelable")||t.eventDisposers.setKey("wheelable",new Bt([$e(t.element,this._pointerEvents.wheel,function(s){return i.handleMouseWheel(t,s)},this._passiveSupported?{passive:!1}:!1),t.events.on("out",function(s){t.wheelable&&i.unlockWheel()}),t.events.on("over",function(s){t.wheelable&&i.lockWheel()})]));else{var r=t.eventDisposers.getKey("wheelable");r!=null&&(r.dispose(),t.eventDisposers.removeKey("wheelable"))}},e.prototype.processFocusable=function(t){var i=this;if(t.focusable===!0&&t.tabindex>-1&&!this._useTouchEventsOnly)t.eventDisposers.hasKey("focusable")||t.eventDisposers.setKey("focusable",new Bt([$e(t.element,"focus",function(s){return i.handleFocus(t,s)}),$e(t.element,"blur",function(s){return i.handleBlur(t,s)}),$e(t.element,this._pointerEvents.pointerdown,function(s){return i.handleFocusBlur(t,s)}),$e(t.element,"touchstart",function(s){return i.handleFocusBlur(t,s)},this._passiveSupported?{passive:!1}:!1)]));else{var r=t.eventDisposers.getKey("focusable");r!=null&&(r.dispose(),t.eventDisposers.removeKey("focusable"))}},e.prototype.processTouchable=function(t){var i=this;if(t.clickable||t.hoverable||t.trackable||t.draggable||t.swipeable||t.resizable)this.addGlobalEvents(),t.eventDisposers.hasKey("touchable")||(!this._useTouchEventsOnly&&!this._usePointerEventsOnly?t.eventDisposers.setKey("touchable",new Bt([$e(t.element,this._pointerEvents.pointerdown,function(s){return i.handlePointerDown(t,s)}),$e(t.element,"touchstart",function(s){return i.handleTouchDown(t,s)},this._passiveSupported?{passive:!1}:!1)])):this._useTouchEventsOnly?this._usePointerEventsOnly||t.eventDisposers.setKey("touchable",$e(t.element,"touchstart",function(s){return i.handleTouchDown(t,s)},this._passiveSupported?{passive:!1}:!1)):t.eventDisposers.setKey("touchable",$e(t.element,this._pointerEvents.pointerdown,function(s){return i.handlePointerDown(t,s)})));else{var r=t.eventDisposers.getKey("touchable");r!=null&&(r.dispose(),t.eventDisposers.removeKey("touchable"))}},e.prototype.handleFocus=function(t,i){if(!t.focusable){i.preventDefault();return}if(t.isFocused=!0,t.events.isEnabled("focus")&&!Ot.isPaused){var r={type:"focus",target:t,event:i};t.events.dispatchImmediately("focus",r)}},e.prototype.handleFocusBlur=function(t,i){t.focusable!==!1&&this.getHitOption(t,"noFocus")&&t.events.once("focus",function(){t.events.disableType("blur"),Zo(),t.sprite&&t.sprite.handleBlur(),t.events.enableType("blur")})},e.prototype.handleBlur=function(t,i){if(!t.focusable){i.preventDefault();return}if(t.isFocused=!1,t.events.isEnabled("blur")&&!Ot.isPaused){var r={type:"blur",target:t,event:i};t.events.dispatchImmediately("blur",r)}},e.prototype.handleGlobalKeyDown=function(t){if(this.focusedObject){if(ir.isKey(t,"esc"))Zo();else if(this.focusedObject.draggable&&ir.isKey(t,["up","down","left","right"])){t.preventDefault();var i=this.focusedObject,r="interactionKeyboardObject";if(i.eventDisposers.hasKey(r))return;var s=new um(i,t);switch(i.eventDisposers.setKey(r,s),ir.getEventKey(t)){case"up":s.directionY=-1;break;case"down":s.directionY=1;break;case"left":s.directionX=-1;break;case"right":s.directionX=1;break}}}},e.prototype.handleGlobalKeyUp=function(t){var i="interactionKeyboardObject";if(this.focusedObject){var r=this.focusedObject.eventDisposers.getKey(i);r!=null&&(t.preventDefault(),r.dispose(),this.focusedObject.eventDisposers.removeKey(i));var s=this.focusedObject.sprite;ir.isKey(t,"enter")&&s&&(s.events.isEnabled("hit")||s.events.isEnabled("toggled")?this.focusedObject.dispatchImmediately("hit"):s.showTooltipOn=="hit"&&this.focusedObject.dispatchImmediately("up"))}},e.prototype.handleGlobalPointerMove=function(t){var i=this.getPointer(t);if(i.point=this.getPointerPoint(t),this.events.isEnabled("track")&&!Ot.isPaused){var r={type:"track",target:this,event:t,pointer:i,touch:i.touch};this.events.dispatchImmediately("track",r)}this.addBreadCrumb(i,i.point),this.handleGlobalMove(i,t)},e.prototype.handleGlobalPointerDown=function(t){this.processDelayed();var i=this.getPointer(t);if(this.events.isEnabled("down")&&!Ot.isPaused){var r={type:"down",target:this,event:t,pointer:i,touch:i.touch};this.events.dispatchImmediately("down",r)}},e.prototype.preventTouchAction=function(t){t.defaultPrevented||t.preventDefault()},e.prototype.handleGlobalPointerUp=function(t,i){i===void 0&&(i=!1);var r=this.getPointer(t);if(this.events.isEnabled("up")&&!Ot.isPaused){var s={type:"up",target:this,event:t,pointer:r,touch:r.touch};this.events.dispatchImmediately("up",s)}this.handleGlobalUp(r,t,i)},e.prototype.handleGlobalTouchMove=function(t){for(var i=0;i<t.changedTouches.length;i++){var r=this.getPointer(t.changedTouches[i]);if(r.point=this.getPointerPoint(t.changedTouches[i]),this.events.isEnabled("track")&&!Ot.isPaused){var s={type:"track",target:this,event:t,pointer:r,touch:r.touch};this.events.dispatchImmediately("track",s)}this.addBreadCrumb(r,r.point),this.handleGlobalMove(r,t)}},e.prototype.handleGlobalTouchStart=function(t){this.processDelayed();for(var i=0;i<t.changedTouches.length;i++){var r=this.getPointer(t.changedTouches[i]);if(!this._usePointerEventsOnly&&this.events.isEnabled("down")&&!Ot.isPaused){var s={type:"down",target:this,event:t,pointer:r,touch:r.touch};this.events.dispatchImmediately("down",s)}}},e.prototype.handleGlobalTouchEnd=function(t){for(var i=0;i<t.changedTouches.length;i++){var r=this.getPointer(t.changedTouches[i]);if(this.events.isEnabled("up")&&!Ot.isPaused){var s={type:"up",target:this,event:t,pointer:r,touch:r.touch};this.events.dispatchImmediately("up",s)}this.handleGlobalUp(r,t)}},e.prototype.handlePointerDown=function(t,i){var r=this.getPointer(i);!r.touch&&i.which!=1&&i.which!=3||(r.button=i.which,this.resetPointer(r,i),this.handleDown(t,r,i))},e.prototype.handlePointerOver=function(t,i){var r=this.getPointer(i);this.handleOver(t,r,i)},e.prototype.handlePointerOut=function(t,i){var r=this.getPointer(i);this.handleOut(t,r,i)},e.prototype.handleMouseWheel=function(t,i){var r=this.getPointer(i);r.point=this.getPointerPoint(i);var s=0,o=0,n=1;if(i.deltaMode==1&&(n=50),n*=this.getMouseOption(t,"sensitivity"),i instanceof WheelEvent)s=Math.round(-1*i.wheelDeltaX||i.deltaX*n),o=Math.round(-1*i.wheelDeltaY||i.deltaY*n);else throw new Error("Invalid event type");this.handleWheel(t,r,s,o,i)},e.prototype.handleTouchDown=function(t,i){for(var r=0;r<i.changedTouches.length;r++){var s=this.getPointer(i.changedTouches[r]);this.maybePreventDefault(t,i,s),this.resetPointer(s,i.changedTouches[r]),this.handleDown(t,s,i)}},e.prototype.handleHit=function(t,i,r){var s=xs();if(t.lastHit&&t.lastHit>=s-this.getHitOption(t,"doubleHitTime")){if(s-t.lastHit<100)return;if(t.lastHit=void 0,t.lastHitPointer=void 0,t.events.isEnabled("doublehit")&&!Ot.isPaused){var o={type:"doublehit",target:t,point:i.point,event:r,touch:i.touch};t.events.dispatchImmediately("doublehit",o)}}else if(t.lastHit=s,t.lastHitPointer=i,i.button===3){if(t.events.isEnabled("rightclick")&&!Ot.isPaused){var o={type:"rightclick",target:t,event:r};t.events.dispatchImmediately("rightclick",o)}}else if(t.events.isEnabled("hit")&&!Ot.isPaused){var o={type:"hit",target:t,event:r,point:i.point,touch:i.touch};t.events.dispatchImmediately("hit",o)}},e.prototype.handleOver=function(t,i,r,s){if(s===void 0&&(s=!1),!!t.hoverable){var o=!1;if(this.shouldCancelHovers(i)&&this.areTransformed()&&this.moved(i,this.getHitOption(t,"hitTolerance"))&&(o=!0,this.cancelAllHovers(r)),this.processDelayed(),t.overPointers.moveValue(i),!t.isRealHover&&(o||(t.isHover=!0,t.isRealHover=!0,this.overObjects.moveValue(t)),this.handleTrack(this.body,i,r,!0),t.events.isEnabled("over")&&!Ot.isPaused&&!o)){var n={type:"over",target:t,event:r,pointer:i,touch:i.touch};t.events.dispatchImmediately("over",n)}}},e.prototype.handleOut=function(t,i,r,s,o){var n=this;if(s===void 0&&(s=!1),o===void 0&&(o=!1),!!t.hoverable&&(t.overPointers.removeValue(i),t.isHover&&(!t.hasDelayedOut||o))){if(s&&t.overPointers.length)return;if(i&&i.touch&&!o&&!this.old(i)){var l=this.getHoverOption(t,"touchOutBehavior");if(l=="leave"){this._delayedEvents.out.push({type:"out",io:t,pointer:i,event:r,keepUntil:xs()+500}),t.hasDelayedOut=!0;return}else if(l=="delay"&&this.getHoverOption(t,"touchOutDelay")){this._delayedEvents.out.push({type:"out",io:t,pointer:i,event:r,keepUntil:xs()+500,timeout:this.setTimeout(function(){n.handleOut(t,i,r,!0)},this.getHoverOption(t,"touchOutDelay"))});return}}if(t.isHover=!1,this.overObjects.removeValue(t),!t.isDisposed()&&t.events.isEnabled("out")&&!Ot.isPaused){var h={type:"out",target:t,event:r,pointer:i,touch:i.touch};t.events.dispatchImmediately("out",h)}t.overPointers.clear(),t.hasDelayedOut=!1}},e.prototype.processDelayed=function(){for(var t;t=this._delayedEvents.out.pop(),!!t;)t.timeout&&t.timeout.dispose(),this.handleOut(t.io,t.pointer,t.event,!1,!0)},e.prototype.handleDown=function(t,i,r){if(this.maybePreventDefault(t,r,i),t.inert&&this.stopInertia(t),this.handleOver(t,i,r,!0),t.downPointers.moveValue(i),this.applyCursorDownStyle(t,i),t.isDown||(t.focusable!==!1&&this.getHitOption(t,"noFocus")&&this.focusedObject&&Zo(),t.isDown=!0,this.downObjects.moveValue(t),t.draggable&&this.processDragStart(t,i,r),t.resizable&&this.processResizeStart(t,i,r)),t.events.isEnabled("down")&&!Ot.isPaused){var s={type:"down",target:t,event:r,pointer:i,touch:i.touch};t.events.dispatchImmediately("down",s)}},e.prototype.handleGlobalUp=function(t,i,r){var s=this;r===void 0&&(r=!1);var o=this.downObjects.values.slice();o.sort(function(n,l){if(n&&l){var h=n.element.compareDocumentPosition(l.element);return h&Node.DOCUMENT_POSITION_CONTAINED_BY?1:h&Node.DOCUMENT_POSITION_CONTAINS?-1:0}else return 0}),W(o,function(n){n&&n.downPointers.contains(t)&&s.handleUp(n,t,i,r)})},e.prototype.handleDocumentLeave=function(t){var i=this;E(this.downObjects.backwards().iterator(),function(r){r.downPointers.each(function(s){i.handleUp(r,s,t)})})},e.prototype.handleUp=function(t,i,r,s){if(s===void 0&&(s=!1),this.restoreCursorDownStyle(t,i),t.downPointers.removeValue(i),(i&&i.touch||this._useTouchEventsOnly)&&this.handleOut(t,i,r,!0),t.isDown){if(t.downPointers.length==0&&(t.isDown=!1,this.downObjects.removeValue(t)),t.events.isEnabled("up")&&!Ot.isPaused&&i){var o={type:"up",target:t,event:r,pointer:i,touch:i.touch};t.events.dispatchImmediately("up",o)}s||(t.swipeable&&this.swiped(t,i)?this.handleSwipe(t,i,r):(t.clickable&&!this.moved(i,this.getHitOption(t,"hitTolerance"))&&this.handleHit(t,i,r),t.inert&&this.moved(i,this.getHitOption(t,"hitTolerance"))?this.handleInertia(t,i):t.draggable&&this.processDragStop(t,i,r),t.resizable&&this.processResizeStop(t,i,r)))}},e.prototype.maybePreventDefault=function(t,i,r){C(i)&&(t.draggable||t.swipeable||t.trackable||t.resizable)&&!this.isGlobalElement(t)&&i.cancelable!==!1&&(!t.isTouchProtected||!r||!r.touch)&&i.preventDefault()},e.prototype.cancelAllHovers=function(t){var i=this;E(this.overObjects.backwards().iterator(),function(r){if(r){var s=r.overPointers.getIndex(0);i.handleOut(r,s,t,!0,!0)}})},e.prototype.shouldCancelHovers=function(t){return $t.disableHoverOnTransform=="always"||$t.disableHoverOnTransform=="touch"&&t.touch},e.prototype.handleGlobalMove=function(t,i){var r=this;if(!t.touch){var s=hb(t.lastEvent);E(this.overObjects.backwards().iterator(),function(o){if(o&&o.overPointers.contains(t)&&o.hoverable){var n=!1;o.element&&t.lastEvent&&zf(o.element,s)||(n=!0),n&&r.handleOut(o,t,i,!0)}})}E(this.transformedObjects.backwards().iterator(),function(o){o.downPointers.contains(t)&&!(o.swipeable&&r.swiping(o,t))&&(o.draggable||o.resizable)&&r.handleTransform(o,i)}),E(this.trackedObjects.backwards().iterator(),function(o){o.overPointers.contains(t)||r.handleTrack(o,t,i)})},e.prototype.handleTrack=function(t,i,r,s){if(s===void 0&&(s=!1),!(!s&&!this.moved(i,0))&&t.events.isEnabled("track")&&!Ot.isPaused){var o={type:"track",target:t,event:r,point:i.point,pointer:i,touch:i.touch};t.events.dispatchImmediately("track",o)}},e.prototype.handleSwipe=function(t,i,r){if(t.events.isEnabled("swipe")&&!Ot.isPaused){var s={type:"swipe",target:t,event:r,touch:i.touch};t.events.dispatchImmediately("swipe",s)}if(i.startPoint.x<i.point.x){if(t.events.isEnabled("swiperight")&&!Ot.isPaused){var s={type:"swiperight",target:t,event:r,touch:i.touch};t.events.dispatchImmediately("swiperight",s)}}else if(t.events.isEnabled("swipeleft")&&!Ot.isPaused){var s={type:"swipeleft",target:t,event:r,touch:i.touch};t.events.dispatchImmediately("swipeleft",s)}},e.prototype.handleWheel=function(t,i,r,s,o){var n={x:r,y:s};t.events.isEnabled("wheel")&&!Ot.isPaused&&t.events.dispatchImmediately("wheel",{type:"wheel",target:t,event:o,point:i.point,shift:n}),r<0?t.events.isEnabled("wheelleft")&&!Ot.isPaused&&t.events.dispatchImmediately("wheelleft",{type:"wheelleft",target:t,event:o,point:i.point,shift:n}):r>0?t.events.isEnabled("swiperight")&&!Ot.isPaused&&t.events.dispatchImmediately("wheelright",{type:"wheelright",target:t,event:o,point:i.point,shift:n}):s<0?t.events.isEnabled("wheelup")&&!Ot.isPaused&&t.events.dispatchImmediately("wheelup",{type:"wheelup",target:t,event:o,point:i.point,shift:n}):s>0&&t.events.isEnabled("wheeldown")&&!Ot.isPaused&&t.events.dispatchImmediately("wheeldown",{type:"wheeldown",target:t,event:o,point:i.point,shift:n})},e.prototype.handleInertia=function(t,i){t.draggable&&t.downPointers.length===0&&this.handleMoveInertia(t,i),t.resizable&&t.downPointers.length>1&&this.handleResizeInertia(t,i)},e.prototype.handleMoveInertia=function(t,i){var r=t,s="move",o={x:i.point.x,y:i.point.y},n={x:i.startPoint.x,y:i.startPoint.y},l=new pm(r,s,o,n),h=this.getTrailPoint(i,xs()-this.getInertiaOption(t,"move","time"));if(typeof h>"u"){this.processDragStop(t,i,i.lastUpEvent);return}var u=this.getInertiaOption(t,"move","factor"),p=[{to:i.point.x+(i.point.x-h.point.x)*u,property:"x"},{to:i.point.y+(i.point.y-h.point.y)*u,property:"y"}],d=new Pi(l,p,this.getInertiaOption(t,"move","duration"),this.getInertiaOption(t,"move","easing")).start();this._disposers.push(d.events.on("animationended",function(c){l.done()})),t.inertias.setKey("move",l)},e.prototype.handleResizeInertia=function(t,i){},e.prototype.handleTransform=function(t,i){var r=t.downPointers.getIndex(0),s=null,o=null;r&&(s=r.point,o=r.startPoint);var n,l,h;l={x:t.originalPosition.x,y:t.originalPosition.y},h=l;for(var u=!0,p=1;p<t.downPointers.length;p++){var d=t.downPointers.getIndex(p);if(o.x!=d.startPoint.x&&o.y!=d.startPoint.y){u=!1,n=d,l=n.point,h=n.startPoint;break}}var c=r&&this.moved(r,0);if(t.draggable&&r&&r.dragStartEvents&&r.dragStartEvents.length&&c&&t.events.isEnabled("dragstart")&&!Ot.isPaused&&t.events.dispatchImmediately("dragstart",r.dragStartEvents.shift()),u&&t.draggable)this.handleTransformMove(t,s,o,i,c,r.touch),this.shouldCancelHovers(r)&&this.moved(r,this.getHitOption(t,"hitTolerance"))&&this.cancelAllHovers(i);else{var f=n&&this.moved(n,0);(this.shouldCancelHovers(r)&&this.moved(r,this.getHitOption(t,"hitTolerance"))||this.shouldCancelHovers(n)&&this.moved(n,this.getHitOption(t,"hitTolerance")))&&this.cancelAllHovers(i),t.draggable&&t.resizable?(this.handleTransformMove(t,s,o,i,c&&f,r.touch),this.handleTransformResize(t,s,o,l,h,i,c&&f,r.touch)):(t.draggable&&this.handleTransformMove(t,s,o,i,c,r.touch),t.resizable&&(!u||i.ctrlKey)&&this.handleTransformResize(t,s,o,l,h,i,c&&f,r.touch))}},e.prototype.handleTransformMove=function(t,i,r,s,o,n){if(o&&t.events.isEnabled("drag")&&!Ot.isPaused&&(!t.isTouchProtected||!n)){var l={type:"drag",target:t,event:s,shift:{x:i.x-r.x,y:i.y-r.y},startPoint:r,point:i,touch:n};t.events.dispatchImmediately("drag",l)}},e.prototype.handleTransformResize=function(t,i,r,s,o,n,l,h){if(t.events.isEnabled("resize")&&!Ot.isPaused&&(!t.isTouchProtected||!h)){var u={type:"resize",target:t,event:n,scale:Ov(i,r,s,o),startPoint1:r,point1:i,startPoint2:o,point2:s,touch:h};t.events.dispatchImmediately("resize",u)}},e.prototype.processDragStart=function(t,i,r){this.transformedObjects.moveValue(t),this.shouldCancelHovers(i)&&this.cancelAllHovers(r);var s={type:"dragstart",target:t,event:r,touch:i?i.touch:!1};i&&(i.dragTarget=t),i&&i.dragStartEvents?i.dragStartEvents.push(s):Ot.isPaused||t.dispatchImmediately("dragstart",s)},e.prototype.processDragStop=function(t,i,r){if(i||(i=this.getDragPointer(t)),i&&(i.dragTarget=void 0),this.transformedObjects.removeValue(t),(!i||this.moved(i,0))&&t.events.isEnabled("dragstop")&&!Ot.isPaused){var s={type:"dragstop",target:t,touch:i?i.touch:!1};t.events.dispatchImmediately("dragstop",s)}},e.prototype.processResizeStart=function(t,i,r){this.transformedObjects.moveValue(t)},e.prototype.processResizeStop=function(t,i,r){this.transformedObjects.removeValue(t)},e.prototype.dragStart=function(t,i){i||(i=this.getDragPointer(t)),i&&this.handleDown(t,i,i.lastDownEvent)},e.prototype.dragStop=function(t,i,r){i||(i=this.getDragPointer(t)),i&&!r&&this.handleGlobalUp(i,i.lastUpEvent,r)},e.prototype.getDragPointer=function(t){return t?t.downPointers.getIndex(0):this.transformedObjects.length?this.getDragPointer(this.transformedObjects.getIndex(0)):void 0},e.prototype.getPointerId=function(t){var i="";return C(t.identifier)?i=""+t.identifier:C(t.pointerId)?i=""+t.pointerId:i="m",i.replace("-","")},e.prototype.getPointerPoint=function(t){return{x:t.clientX,y:t.clientY}},e.prototype.getPointer=function(t){var i=this.getPointerId(t),r=this.getPointerPoint(t),s;return this.pointers.hasKey(i)?(s=this.pointers.getKey(i),s.touch=this.isPointerTouch(t)):(s={id:i,touch:this.isPointerTouch(t),startPoint:r,startTime:xs(),point:r,track:[],swipeCanceled:!1,dragStartEvents:[]},this.addBreadCrumb(s,r),this.pointers.setKey(i,s)),s.lastEvent=t,this.lastPointer=s,s},e.prototype.isPointerTouch=function(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&C(t.pointerType))switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(C(t.type)&&t.type.match(/^mouse/))return!1;return!0},e.prototype.resetPointer=function(t,i){var r=this.getPointerPoint(i);t.startTime=xs(),t.startPoint={x:r.x,y:r.y},t.point={x:r.x,y:r.y},t.track=[],t.swipeCanceled=!1},e.prototype.addBreadCrumb=function(t,i){t.track.push({timestamp:xs(),point:i})},e.prototype.lockDocument=function(){this.prepElement(this.body)},e.prototype.unlockDocument=function(){this.transformedObjects.length==0&&this.restoreAllStyles(this.body)},e.prototype.lockElement=function(t){this.prepElement(t)},e.prototype.unlockElement=function(t){this.restoreAllStyles(t)},e.prototype.lockWheel=function(){window.addEventListener(this._pointerEvents.wheel,this.wheelLockEvent,this._passiveSupported?{passive:!1}:!1)},e.prototype.unlockWheel=function(){window.removeEventListener(this._pointerEvents.wheel,this.wheelLockEvent)},e.prototype.isLocalElement=function(t,i,r){var s=this.getCache("local_pointer_"+t.id);if(C(s))return s;var o=Ap(i)||document;if(o.elementFromPoint){var n=o.elementFromPoint(t.point.x,t.point.y),l=n&&zf(i,n);return this.setCache("local_pointer_"+t.id+"_"+r,l,100),l}return!1},e.prototype.wheelLockEvent=function(t){return t.preventDefault(),!1},e.prototype.prepElement=function(t){var i=t.element;if(i){for(var r=["touchAction","webkitTouchAction","MozTouchAction","MSTouchAction","msTouchAction","oTouchAction","userSelect","webkitUserSelect","MozUserSelect","MSUserSelect","msUserSelect","oUserSelect","touchSelect","webkitTouchSelect","MozTouchSelect","MSTouchSelect","msTouchSelect","oTouchSelect","touchCallout","webkitTouchCallout","MozTouchCallout","MSTouchCallout","msTouchCallout","oTouchCallout","contentZooming","webkitContentZooming","MozContentZooming","MSContentZooming","msContentZooming","oContentZooming","userDrag","webkitUserDrag","MozUserDrag","MSUserDrag","msUserDrag","oUserDrag"],s=0;s<r.length;s++)r[s]in i.style&&this.setTemporaryStyle(t,r[s],"none");this.setTemporaryStyle(t,"tapHighlightColor","rgba(0, 0, 0, 0)")}},e.prototype.unprepElement=function(t){var i=t.element;if(i){for(var r=["touchAction","webkitTouchAction","MozTouchAction","MSTouchAction","msTouchAction","oTouchAction","userSelect","webkitUserSelect","MozUserSelect","MSUserSelect","msUserSelect","oUserSelect","touchSelect","webkitTouchSelect","MozTouchSelect","MSTouchSelect","msTouchSelect","oTouchSelect","touchCallout","webkitTouchCallout","MozTouchCallout","MSTouchCallout","msTouchCallout","oTouchCallout","contentZooming","webkitContentZooming","MozContentZooming","MSContentZooming","msContentZooming","oContentZooming","userDrag","webkitUserDrag","MozUserDrag","MSUserDrag","msUserDrag","oUserDrag"],s=0;s<r.length;s++)r[s]in i.style&&this.restoreStyle(t,r[s]);this.restoreStyle(t,"tapHighlightColor")}},e.prototype.getHitOption=function(t,i){var r=t.hitOptions[i];return typeof r>"u"&&(r=this.hitOptions[i]),r},e.prototype.getHoverOption=function(t,i){var r=t.hoverOptions[i];return typeof r>"u"&&(r=this.hoverOptions[i]),r},e.prototype.getSwipeOption=function(t,i){var r=t.swipeOptions[i];return typeof r>"u"&&(r=this.swipeOptions[i]),r},e.prototype.getKeyboardOption=function(t,i){var r=t.keyboardOptions[i];return typeof r>"u"&&(r=this.keyboardOptions[i]),r},e.prototype.getMouseOption=function(t,i){var r=t.mouseOptions[i];return typeof r>"u"&&(r=this.mouseOptions[i]),r},e.prototype.getInertiaOption=function(t,i,r){var s=t.inertiaOptions.getKey(i),o;return s&&C(s[r])?o=s[r]:o=this.inertiaOptions.getKey(i)[r],o},e.prototype.stopInertia=function(t){for(var i,r=["move","resize"],s=0;s<r.length;s++)if(i=r[s],t.inertias.hasKey(i)){var o=t.inertias.getKey(i);if(o){o.dispose();continue}}},e.prototype.swiping=function(t,i){var r=xs();return i.swipeCanceled||!t.swipeable?!1:Math.abs(i.startPoint.y-i.point.y)<this.getSwipeOption(t,"verticalThreshold")&&i.startTime>r-this.getSwipeOption(t,"time")},e.prototype.swiped=function(t,i){var r=xs();return i.swipeCanceled?!1:Math.abs(i.startPoint.x-i.point.x)>this.getSwipeOption(t,"horizontalThreshold")&&Math.abs(i.startPoint.y-i.point.y)<this.getSwipeOption(t,"verticalThreshold")&&i.startTime>r-this.getSwipeOption(t,"time")},e.prototype.applyCursorOverStyle=function(t){var i=t.cursorOptions;if(C(i.overStyle))for(var r=0;r<i.overStyle.length;r++)Yf(t.element,i.overStyle[r].property,i.overStyle[r].value)},e.prototype.applyCursorDownStyle=function(t,i){if(!(i&&i.touch)){var r=t.cursorOptions.downStyle;if(t.downPointers.contains(i)&&C(r))for(var s=0;s<r.length;s++)this.setTemporaryStyle(this.body,r[s].property,r[s].value),this.setTemporaryStyle(t,r[s].property,r[s].value)}},e.prototype.restoreCursorDownStyle=function(t,i){if(!(i&&i.touch)){var r=t.cursorOptions.downStyle;if(t.downPointers.contains(i)&&C(r))for(var s=0;s<r.length;s++)this.restoreStyle(this.body,r[s].property),this.restoreStyle(t,r[s].property)}},e.prototype.setGlobalStyle=function(t){for(var i=gt().body,r=oe(t)?t:[t],s=0;s<r.length;s++)this.setTemporaryStyle(i,r[s].property,r[s].value)},e.prototype.restoreGlobalStyle=function(t){for(var i=gt().body,r=oe(t)?t:[t],s=0;s<r.length;s++)this.restoreStyle(i,r[s].property)},e.prototype.isGlobalElement=function(t){return document.body===t.element},e.prototype.moved=function(t,i,r){r===void 0&&(r=300);var s=this.getShift(t);return Math.abs(s.x)>i||Math.abs(s.y)>i},e.prototype.old=function(t,i){return i===void 0&&(i=300),xs()-t.startTime>i},e.prototype.getShift=function(t){return{x:t.startPoint.x-t.point.x,y:t.startPoint.y-t.point.y}},e.prototype.getTrailPoint=function(t,i){for(var r,s=0;s<t.track.length;s++)if(t.track[s].timestamp>=i){r=t.track[s];break}return r},e.prototype.pointerExists=function(t,i){var r=!1;return t.each(function(s){s!=i&&(r=s.point.x==i.point.x&&s.point.y==i.point.y)}),r},e.prototype.getInteraction=function(t){return new hm(t)},e.prototype.setTemporaryStyle=function(t,i,r){var s=t.element;C(s.style[i])&&!t.replacedStyles.hasKey(i)&&t.replacedStyles.setKey(i,s.style[i]),Yf(s,i,r)},e.prototype.restoreStyle=function(t,i){t.replacedStyles.hasKey(i)?(t.element.style[i]=t.replacedStyles.getKey(i),t.replacedStyles.removeKey(i)):delete t.element.style[i]},e.prototype.restoreAllStyles=function(t){E(t.replacedStyles.iterator(),function(i){var r=i[0],s=i[1];t.element.style[r]=s,t.replacedStyles.removeKey(r)})},e.prototype.dispose=function(){this.isDisposed()||(a.prototype.dispose.call(this),this.restoreAllStyles(this.body),this.unlockWheel())},e.prototype.log=function(t,i,r){var s=!0;if(s){if(i.changedTouches){for(var o=0;o<i.changedTouches.length;o++)this.logTouch(t,i.type,i.changedTouches[o]);return}var n="";if(i.pointerType)switch(i.pointerType){case 2:n="touch";break;case 4:n="mouse";break;default:n=i.pointerType;break}else typeof TouchEvent<"u"&&i instanceof TouchEvent?n="touch":i.type.match(/^mouse/)?n="mouse":n="???";var l="";C(i.identifier)?l=i.identifier:C(i.pointerId)?l=i.pointerId:l="???",console.log(r?t+" ("+r.uid+") "+i.type+" "+n+" "+l:t+" "+i.type+" "+n+" "+l)}},e.prototype.areTransformed=function(t){var i=this.transformedObjects.length;if(t)for(var r=oe(t)?t:[t],s=0;s<r.length;s++)this.transformedObjects.contains(r[s])&&i--;return i>0},e.prototype.logTouch=function(t,i,r){console.log(t+" "+i+" touch "+r.identifier)},Object.defineProperty(e,"passiveSupported",{get:function(){var t=this;if(this._passiveSupported==null)try{var i=Object.defineProperty({},"passive",{get:function(){t._passiveSupported=!0}});window.addEventListener("test",i,i),window.removeEventListener("test",i,i)}catch{this._passiveSupported=!1}return this._passiveSupported},enumerable:!0,configurable:!0}),e})(fi);var dm=null;function gt(){return dm==null&&(dm=new gb),dm}var Ua=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Rectangle",t.element=t.paper.add("rect"),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this._positionPrecision;this.pixelPerfect&&(t=0);var i=H(this.innerWidth,t),r=H(this.innerHeight,t);this.element.attr({width:i,height:r})},e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Rectangle=Ua;var ct=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._purposes={stroke:nt("#e5e5e5"),fill:nt("#f3f3f3"),primaryButton:nt("#6794dc"),primaryButtonHover:nt("#6771dc"),primaryButtonDown:nt("#68dc75"),primaryButtonActive:nt("#68dc75"),primaryButtonText:nt("#FFFFFF"),primaryButtonStroke:nt("#FFFFFF"),secondaryButton:nt("#d9d9d9"),secondaryButtonHover:nt("#d9d9d9").brighten(-.25),secondaryButtonDown:nt("#d9d9d9").brighten(-.35),secondaryButtonActive:nt("#d9d9d9").brighten(.35),secondaryButtonText:nt("#000000"),secondaryButtonStroke:nt("#FFFFFF"),grid:nt("#000000"),background:nt("#ffffff"),alternativeBackground:nt("#000000"),text:nt("#000000"),alternativeText:nt("#FFFFFF"),disabledBackground:nt("#999999"),positive:nt("#67dc75"),negative:nt("#dc6788")},t.className="InterfaceColorSet",t.applyTheme(),t}return e.prototype.debug=function(){},e.prototype.getFor=function(t){return this._purposes[t]},e.prototype.setFor=function(t,i){this._purposes[t]=i},e})(we);w.registeredClasses.InterfaceColorSet=ct;var Q=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._childrenByLayout=[],t._childrenDisposers=new It,t.hasFocused=!1,t.setStateOnSprites=[],t.layoutInvalid=!1,t._absoluteWidth=0,t._absoluteHeight=0,t._shouldBeReady=[],t._tapToActivate=!1,t.tapTimeout=3e3,t.className="Container",t._element=t.paper.addGroup("g"),t.group.add(t.element),t.setPropertyValue("pixelPerfect",!1),t.setPropertyValue("layout","absolute"),t.setPropertyValue("fixedWidthGrid",!1),t.setPropertyValue("verticalCenter","none"),t.setPropertyValue("horizontalCenter","none"),t._positionPrecision=4,t._disposers.push(new Pr(t._childrenDisposers)),t.children.events.on("inserted",t.handleChildAdded,t),t.children.events.on("removed",t.handleChildRemoved,t),t.applyTheme(),t}return e.prototype.handleChildAdded=function(t){this.processChild(t.newValue)},e.prototype.processChild=function(t){try{this._childrenDisposers.insertKey(t.uid,new Bt([t.events.on("transformed",this.handleChildTransform,this),t.events.on("zIndexChanged",this.sortAndAdd,this)]))}catch{}if(this.element){var i=this.element;i.add(t.group)}t.parent=this,t.paper=this.paper,this.dispatchImmediately("childadded",{type:"childadded",newValue:t}),this.invalidate()},e.prototype.sortAndAdd=function(){this.sortChildren(),this.addChildren()},e.prototype.handleChildRemoved=function(t){var i=t.oldValue;if(this._childrenDisposers.removeKey(i.uid),this.element){var r=this.element;r.removeElement(i.group)}i.isMeasured&&this.invalidateLayout(),this.dispatchImmediately("childremoved",{type:"childremoved",oldValue:i})},e.prototype.handleChildTransform=function(t){var i=t.target;i.isMeasured&&this.invalidateLayout()},e.prototype.invalidateLayout=function(){this.layoutInvalid||this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||(this.layoutInvalid=!0,w.addToInvalidLayouts(this),Ot.requestFrame())},e.prototype.invalidate=function(){a.prototype.invalidate.call(this),this.invalidateLayout()},e.prototype.deepInvalidate=function(){a.prototype.invalidate.call(this),W(this._childrenByLayout,function(t){t instanceof e?t.deepInvalidate():t.invalidate()}),this.invalidateLayout()},Object.defineProperty(e.prototype,"children",{get:function(){return this._children||(this._children=new wt),this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(t){this.setPropertyValue("minWidth",t)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this.getPropertyValue("minHeight")},set:function(t){this.setPropertyValue("minHeight",t)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),e.prototype.removeElement=function(){},e.prototype.sortChildren=function(){var t=this;if(this._childrenByLayout=[],this.layout=="none"||this.layout=="absolute"||!this.layout)this._childrenByLayout=this.children.values;else{var i=[],r=[];E(this.children.iterator(),function(s){t.layout=="horizontal"||t.layout=="grid"?P(s.percentWidth)?r.push(s):i.push(s):t.layout=="vertical"&&P(s.percentHeight)?r.push(s):i.push(s)}),this._childrenByLayout=i.concat(r)}this.calculateRelativeSize()},e.prototype.calculateRelativeSize=function(){var t=this,i=0,r=0;W(this._childrenByLayout,function(s){s.isMeasured&&(P(s.percentWidth)&&(i+=s.percentWidth),P(s.percentHeight)&&(r+=s.percentHeight))}),W(this._childrenByLayout,function(s){s.isMeasured&&(t.layout=="horizontal"&&(P(s.percentWidth)&&(s.relativeWidth=s.percentWidth/i),P(s.percentHeight)&&(s.relativeHeight=s.percentHeight/100)),t.layout=="vertical"&&(P(s.percentHeight)&&(s.relativeHeight=s.percentHeight/r),P(s.percentWidth)&&(s.relativeWidth=s.percentWidth/100)),t.layout=="grid"&&(P(s.percentHeight)&&(s.relativeHeight=s.percentHeight/100),P(s.percentWidth)&&(s.relativeWidth=s.percentWidth/100))),(t.layout=="absolute"||!s.isMeasured)&&(P(s.percentWidth)&&(s.relativeWidth=s.percentWidth/100),P(s.percentHeight)&&(s.relativeHeight=s.percentHeight/100))})},e.prototype.addChildren=function(){if(this.element){var t=ca(this.children.values),i=t.map(function(l,h){return{idx:h,data:l}});i.sort(function(l,h){var u=l.data.zIndex||0,p=h.data.zIndex||0;return u<p?-1:u>p?1:l.idx-h.idx}),t=i.map(function(l){return l.data});var r=this.element,s=!0;if(r.node&&r.node.childNodes){for(var o=0,n=r.node.childNodes.length;o<n;o++)if(r.node.childNodes[o]!=t[o].group.node){s=!1;break}}s||(W(t,function(l){l.group&&r.add(l.group)}),this._background&&this.group.addToBack(this._background.group),this.invalidateLayout())}},e.prototype.createChild=function(t){var i=new t;return i.parent=this,i},e.prototype.removeChildren=function(){for(;this.children.length>0;){var t=this.children.getIndex(0);t.parent=void 0,this.children.removeValue(t)}},e.prototype.disposeChildren=function(){for(;this.children.length>0;){var t=this.children.getIndex(0);t.dispose(),this.children.removeValue(t)}},Object.defineProperty(e.prototype,"background",{get:function(){return this._background||(this._background=this.createBackground(),this.processBackground()),this._background},set:function(t){this._background&&this.background!=t&&this.removeDispose(this._background),t&&(this._background=t,this._disposers.push(t),this.processBackground())},enumerable:!0,configurable:!0}),e.prototype.handleGlobalScale=function(){a.prototype.handleGlobalScale.call(this),this.children.each(function(t){t.handleGlobalScale()})},e.prototype.createBackground=function(){return new Ua},e.prototype.processBackground=function(){var t=this._background;t&&(t.isMeasured=!1,this._background.fill=new ct().getFor("background"),t.parent=this,t.isMeasured=!1,this.children.removeValue(t),this._disposers.push(t),this.group.addToBack(this._background.group))},e.prototype.validateLayout=function(){var t=this;w.removeFromInvalidLayouts(this),this.layoutInvalid=!1,this._availableWidth=this.innerWidth,this._availableHeight=this.innerHeight;var i=0,r=0,s=!0;this.children&&(this.sortChildren(),W(this._childrenByLayout,function(o){var n,l;if(P(o.relativeWidth)?(n=H(t._availableWidth*o.relativeWidth,2),t.layout=="horizontal"&&(n-=o.pixelMarginRight+o.pixelMarginLeft)):t.layout=="horizontal"&&o.invalid&&o.validate(),P(o.relativeHeight)?(l=H(t._availableHeight*o.relativeHeight,2),t.layout=="vertical"&&(l-=o.pixelMarginTop+o.pixelMarginBottom)):t.layout=="vertical"&&o.invalid&&o.validate(),o.invalid==!1){if(P(o.relativeWidth)&&(o.maxWidth=n),P(o.relativeHeight)&&(o.maxHeight=l),o.isMeasured){t.layout=="horizontal"&&(P(o.percentWidth)||o.measuredWidth>0&&(t._availableWidth-=o.measuredWidth+o.pixelMarginLeft+o.pixelMarginRight)),t.layout=="vertical"&&(P(o.percentHeight)||o.measuredHeight>0&&(t._availableHeight-=o.measuredHeight+o.pixelMarginTop+o.pixelMarginBottom));var h=o.measuredWidth,u=o.measuredHeight;o.align!="none"&&(h+=o.pixelMarginLeft+o.pixelMarginRight),o.valign!="none"&&(u+=o.pixelMarginTop+o.pixelMarginBottom),i=Math.max(i,h),r=Math.max(r,u)}}else o.isMeasured&&(P(o.relativeWidth)&&o.maxWidth!=n&&(o.maxWidth=n,s=!1),P(o.relativeHeight)&&o.maxHeight!=l&&(o.maxHeight=l,s=!1))})),this._absoluteWidth=i,this._absoluteHeight=r,s&&this.arrange()},e.prototype.arrange=function(){var t=this,i=this.children,r=0,s=0,o=mt(this.innerWidth,this._absoluteWidth),n=mt(this.innerHeight,this._absoluteHeight),l,h,u,p,d=this.pixelPaddingLeft,c=this.pixelPaddingRight,f=this.pixelPaddingTop,g=this.pixelPaddingBottom,m=0,y=0,v=0,x=0,_=[],$=[],T,S,k,A=this.maxWidth,L=this.maxHeight,O=this.minWidth,I=this.minHeight,R=ca(i.values);if(this.reverseOrder&&R.reverse(),this.layout=="grid"){S=A,T=1;for(var B=0,Z=R.length;B<Z;B++){var j=R[B];if(j.isMeasured&&!j.disabled&&!j.__disabled){var it=j.measuredWidth;it<S&&(S=it),it>T&&(T=it)}}S=J(S,1,A),T=J(T,1,A),this.fixedWidthGrid?k=A/T:k=A/S,k=mt(1,Math.floor(k)),k=Pt(this.maxColumns,k),_=this.getColumnWidth(R,k,T)}for(var st,ht,dt,Xt,B=0,Z=R.length;B<Z;B++){var j=R[B];if(j.isMeasured&&!j.disabled&&!j.__disabled){var tt=void 0,Tt=void 0,Nt=j.pixelMarginLeft,Pe=j.pixelMarginRight,ye=j.pixelMarginTop,ke=j.pixelMarginBottom,We=j.measuredWidth,ae=j.measuredHeight,Zi=void 0,Ji=void 0,Mo=void 0,ju=void 0;switch(this.layout){case"none":break;case"absolute":switch(j.align){case"left":tt=Nt-j.maxLeft;break;case"center":tt=(o-We)/2-j.maxLeft;break;case"right":tt=o-Pe-j.maxRight;break;default:j.x instanceof _t||(tt=j.pixelX);break}switch(j.valign){case"top":Tt=ye-j.maxTop;break;case"middle":Tt=(n-ae)/2-j.maxTop;break;case"bottom":Tt=n-ke-j.maxBottom;break;default:j.y instanceof _t||(Tt=j.pixelY);break}break;case"vertical":switch(j.align){case"left":tt=Nt-j.maxLeft;break;case"center":tt=(o-We)/2-j.maxLeft;break;case"right":tt=o-Pe-j.maxRight;break;default:tt=j.pixelX;break}Tt=y+ye-j.maxTop,y=Tt+j.maxBottom+ke;break;case"horizontal":switch(j.valign){case"top":Tt=ye-j.maxTop;break;case"middle":Tt=(n-ae)/2-j.maxTop;break;case"bottom":Tt=n-ke-j.maxBottom;break;default:Tt=j.pixelY;break}tt=m+Nt-j.maxLeft,m=tt+j.maxRight+Pe;break;case"grid":switch(tt=m+Nt-j.maxLeft,j.valign){case"top":Tt=y+ye-j.maxTop;break;case"middle":Tt=y+(n-ae)/2-j.maxTop;break;case"bottom":Tt=y+n-ke-j.maxBottom;break;default:Tt=y-j.maxTop;break}m+=_[x],$[v]=mt($[v],ae),x++;var Oc=_[x];if(P(Oc)||(Oc=T),m>Pt(this.innerWidth,A)-Oc+1&&x<k){k=x,m=0,y=0,v=0,x=0,_=this.getColumnWidth(R,k,T),$=[],B=-1;continue}x>=k&&(x=0,y+=$[v],v++,m=0);break}this.layout!=="none"&&(j.moveTo({x:tt,y:Tt}),Zi=tt+j.maxLeft-Nt,Ji=tt+j.maxRight+Pe,Mo=Tt+j.maxTop-ye,ju=Tt+j.maxBottom+ke,(Ji>h||!P(h))&&(h=Ji),(Zi<l||!P(l))&&(l=Zi),(Mo<u||!P(u))&&(u=Mo),(ju>p||!P(p))&&(p=ju),(Ji>ht||!P(ht))&&(ht=Ji),(Zi<st||!P(st))&&(st=Zi),(Mo<dt||!P(dt))&&(dt=Mo),(ju>Xt||!P(Xt))&&(Xt=Xt))}else j.validatePosition()}if(this.layout=="none"){var Rn=this.bbox;l=Rn.x,h=Rn.x+Rn.width,u=Rn.y,p=Rn.y+Rn.height}P(l)||(l=0,st=0),P(h)||(h=this._availableWidth,ht=h),P(u)||(u=0,dt=0),P(p)||(p=this._availableHeight,Xt=p),P(dt)||(dt=0),P(Xt)||(Xt=dt),P(st)||(st=0),P(ht)||(ht=st),r=h-l,s=p-u,P(this.relativeWidth)&&(r=A-d-c,l=0,h=r),P(this.relativeHeight)&&(s=L-f-g,u=0,p=s),P(this._pixelWidth)&&(l=0,r=this._pixelWidth-d-c),P(O)&&r<O&&(l=0,r=this.minWidth-d-c),P(this._pixelHeight)&&(u=0,s=this._pixelHeight-f-g),P(I)&&s<I&&(u=0,s=I-f-g);var Hu=ht-st,Xu=Xt-dt;if(this.layout!="none"&&(this.contentAlign||this.contentValign)&&i.length>0){var Yu,zu,Wu=r,Gu=s;Wu<Hu&&(Wu=Hu),Gu<Xu&&(Gu=Xu),this.contentAlign=="center"&&(Yu=(Wu-Hu)/2),this.contentAlign=="right"&&(Yu=Wu-Hu),this.contentValign=="middle"&&(zu=(Gu-Xu)/2),this.contentValign=="bottom"&&(zu=Gu-Xu),P(Yu)&&E(i.iterator(),function(ti){var In=ti.maxLeft,br=Yu;t.layout=="horizontal"&&(ti.x=ti.pixelX+br),t.layout=="grid"&&(ti.x=ti.pixelX+br),t.layout=="vertical"&&(br+=ti.pixelMarginLeft,ti.align=="none"&&(ti.x=br-In)),t.layout=="absolute"&&(br+=ti.pixelMarginLeft,ti.align=="none"&&(ti.x=br-In))}),P(zu)&&E(i.iterator(),function(ti){var In=ti.maxTop,br=zu;t.layout=="horizontal"&&(br+=ti.pixelMarginTop,ti.valign=="none"&&(ti.y=br-In)),t.layout=="grid"&&(br+=ti.pixelMarginTop,ti.y=br-In),t.layout=="vertical"&&(ti.y=ti.pixelY+br),t.layout=="absolute"&&(br+=ti.pixelMarginTop,ti.valign=="none"&&(ti.y=br-In))})}var Lc=this.bbox;r=mt(r,O),s=mt(s,I),this.contentWidth=r,this.contentHeight=s,r=Pt(r,A),s=Pt(s,L),this._bbox={x:l,y:u,width:r,height:s};var H0=this.maxLeft,X0=this.maxTop,Y0=this.maxBottom,z0=this.maxRight;if(this.measure(),(H0!=this.maxLeft||z0!=this.maxRight||X0!=this.maxTop||Y0!=this.maxBottom)&&this.events.isEnabled("transformed")){var xy={type:"transformed",target:this};Lc&&(xy.dummyData=Lc.width+" "+r+" "+Lc.height+" "+s),this.events.dispatchImmediately("transformed",xy)}this.dispatchImmediately("layoutvalidated")},e.prototype.updateCenter=function(){a.prototype.updateCenter.call(this),this.updateBackground()},e.prototype.updateBackground=function(){var t=this._background;t&&(t.x=this.maxLeft,t.y=this.maxTop,t.width=this.maxRight-this.maxLeft,t.height=this.maxBottom-this.maxTop)},e.prototype.getColumnWidth=function(t,i,r){var s=this,o=[],n=0;return W(t,function(l){l.isMeasured&&!l.disabled&&!l.__disabled&&(s.fixedWidthGrid?o[n]=r:o[n]=mt(o[n],l.measuredWidth+l.pixelMarginRight+l.pixelMarginLeft),n++,n==i&&(n=0))}),o},Object.defineProperty(e.prototype,"layout",{get:function(){return this.getPropertyValue("layout")},set:function(t){this.setPropertyValue("layout",t)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentValign",{get:function(){return this.getPropertyValue("contentValign")},set:function(t){this.setPropertyValue("contentValign",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentAlign",{get:function(){return this.getPropertyValue("contentAlign")},set:function(t){this.setPropertyValue("contentAlign",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fixedWidthGrid",{get:function(){return this.getPropertyValue("fixedWidthGrid")},set:function(t){this.setPropertyValue("fixedWidthGrid",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxColumns",{get:function(){return this.getPropertyValue("maxColumns")},set:function(t){this.setPropertyValue("maxColumns",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverseOrder",{get:function(){return this.getPropertyValue("reverseOrder")},set:function(t){this.setPropertyValue("reverseOrder",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setStateOnChildren",{get:function(){return this.getPropertyValue("setStateOnChildren")},set:function(t){this.setPropertyValue("setStateOnChildren",t,!0)},enumerable:!0,configurable:!0}),e.prototype.fitsToBounds=function(t){var i=t.x,r=t.y,s=.5;return i>=-s&&i<=this.pixelWidth+s&&r>=-s&&r<=this.pixelHeight+s},e.prototype.copyFrom=function(t){var i=this;a.prototype.copyFrom.call(this,t),this.layout=t.layout,this.setStateOnChildren=t.setStateOnChildren,t._background&&(this.background=t._background.clone(),this.background.copyFrom(t._background)),E(t.children.iterator(),function(r){if(r.shouldClone){var s=r.clone();s.parent=i}})},Object.defineProperty(e.prototype,"preloader",{get:function(){var t=this._preloader;if(t)return t;if(this.parent)return this.parent.preloader},set:function(t){this._preloader&&this.removeDispose(this._preloader),this._preloader=t,t&&(t.parent=this.tooltipContainer,this._disposers.push(t))},enumerable:!0,configurable:!0}),e.prototype.setPaper=function(t){var i=this,r=a.prototype.setPaper.call(this,t);return r&&(this._background&&(this._background.paper=t,this._background.topParent=this.topParent),this.children.each(function(s){s.setPaper(t),s.topParent=i.topParent})),r},e.prototype.removeFromInvalids=function(){a.prototype.removeFromInvalids.call(this),w.removeFromInvalidLayouts(this)},e.prototype.setDataItem=function(t){this._dataItem!=t&&(E(this.children.iterator(),function(i){i.dataItem=t}),this._background&&(this._background.dataItem=t)),a.prototype.setDataItem.call(this,t)},e.prototype.measureElement=function(){this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||this.validateLayout()},Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.getPropertyValue("fontFamily")},set:function(t){this.setPropertyValue("fontFamily",t,!0)&&(this.setSVGAttribute({"font-family":t}),this.invalidateLabels())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this.getPropertyValue("fontSize")},set:function(t){this.setPropertyValue("fontSize",t,!0)&&(this.setSVGAttribute({"font-size":t}),this.invalidateLabels())},enumerable:!0,configurable:!0}),e.prototype.invalidateLabels=function(){this.children.each(function(t){t.hardInvalidate?(t.hardInvalidate(),t.events.once("validated",t.handleValidate,t,!1)):t instanceof e&&t.invalidateLabels()})},Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this.getPropertyValue("fontWeight")},set:function(t){this.setPropertyValue("fontWeight",t),this.setSVGAttribute({"font-weight":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textDecoration",{get:function(){return this.getPropertyValue("textDecoration")},set:function(t){this.setPropertyValue("textDecoration",t),this.setSVGAttribute({"text-decoration":t})},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._background&&this._background.dispose(),this._shouldBeReady=[],this.disposeChildren(),a.prototype.dispose.call(this)},e.prototype.setState=function(t,i,r){var s=t;return t instanceof Qo&&(s=t.name),this.setStateOnChildren&&E(this.children.iterator(),function(o){o.setState(s,i,r),s!="active"&&(o.isActive=!1)}),this._background&&this._background.setState(s),this.setStateOnSprites.length&&W(this.setStateOnSprites,function(o){o.setState(s,i,r)}),a.prototype.setState.call(this,t,i,r)},e.prototype.setActive=function(t){a.prototype.setActive.call(this,t),this._background&&(this._background.isActive=t)},e.prototype.dispatchReady=function(){var t=this;if(!this.isReady()&&!this.isDisposed()){var i=!0;ii(this.children.iterator(),function(r){return!r.__disabled&&!r.disabled&&!r.isReady()?(i=!1,!1):!0}),qn(this._shouldBeReady,function(r){return!r.__disabled&&!r.disabled&&!r.isReady()?(i=!1,!1):!0}),i?a.prototype.dispatchReady.call(this):w.events.once("exitframe",function(){t.dispatchReady(),Ot.requestFrame()},void 0,!1)}},e.prototype._systemUpdate=function(t){this.children.each(function(i){i.invalid&&(i._systemCheckIfValidate()?i.dataItem&&i.dataItem.component&&i.dataItem.component.dataInvalid?t.push(i):i.validate():t.push(i))}),a.prototype._systemUpdate.call(this,t)},e.prototype._systemValidatePositions=function(){this.children.each(function(t){t.positionInvalid&&t.validatePosition()}),a.prototype._systemValidatePositions.call(this)},e.prototype._systemValidateLayouts=function(){this.layoutInvalid&&!this.isDisposed()&&this.validateLayout()},Object.defineProperty(e.prototype,"tapToActivate",{get:function(){return this._tapToActivate},set:function(t){this._tapToActivate!=t&&this.setTapToActivate(t)},enumerable:!0,configurable:!0}),e.prototype.setTapToActivate=function(t){var i=this;this._tapToActivate=t,this.interactions.isTouchProtected=t,t&&this.interactions.setEventDisposer("container-tapToActivate",t,function(){return new Bt([i.events.on("hit",i.handleTapToActivate,i,!1),i.events.on("down",i.initTapTimeout,i,!1),i.events.on("track",i.initTapTimeout,i,!1),gt().body.events.on("down",function(r){gt().isLocalElement(r.pointer,i.paper.svg,i.uid)||i.handleTapToActivateDeactivation()},i,!1)])}),gt()},e.prototype.handleTapToActivate=function(){this.interactions.isTouchProtected=!1,this.initTapTimeout()},e.prototype.handleTapToActivateDeactivation=function(){this.interactions.isTouchProtected=!0},e.prototype.initTapTimeout=function(){var t=this;this._tapToActivateTimeout&&this._tapToActivateTimeout.dispose(),this.tapToActivate&&!this.interactions.isTouchProtected&&this.tapTimeout&&(this._tapToActivateTimeout=this.setTimeout(function(){t.handleTapToActivateDeactivation()},this.tapTimeout))},e.prototype.moveHtmlContainer=function(t){var i=Sh(t);if(i){this.htmlContainer=i;var r=this.svgContainer;r.htmlElement=i,r.htmlElement.appendChild(r.SVGContainer),r.initSensor(),r.measure()}else vt(t)&&t!=""&&Ot.log("html container '"+t+"' not found")},e.prototype.hasLicense=function(){if($t.commercialLicense)return!0;for(var t=0;t<$t.licenses.length;t++)if($t.licenses[t].match(/^CH.{5,}/i))return!0;return!1},e})(rt);w.registeredClasses.Container=Q;function yb(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];$t.verbose&&console&&console.log.apply(console,pa(a))}function yl(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];$t.suppressWarnings||console&&console.warn.apply(console,pa(a))}var vb=(function(){function a(){this._isPaused=!1,this.animations=[],this.uid=w.getUniqueId(),this.dummyCounter=0,this._frameRequested=!1,this.updateStepDuration=45,this.time=Date.now()}return a.prototype.reportTime=function(e,t){this.dummyCounter<6,t&&(this.time=Date.now())},a.prototype.update=function(){var e=this;if(!this._isPaused){this._frameRequested=!1;var t=Date.now();w.dispatchImmediately("enterframe");var i=[];for(var r in w.invalidDatas)if(Kr(w.invalidDatas,r)){for(var s=w.invalidDatas[r];s.length>0;){var o=s[0],n=o.dataProvider;if(o.isDisposed())ft(s,o);else if(n&&n.dataInvalid)try{if(n.validateData(),n.dataValidationProgress<1)break}catch(p){ft(s,n),n.raiseCriticalError(p)}else try{if(o.validateData(),o.dataValidationProgress<1)break}catch(p){ft(s,o),o.raiseCriticalError(p)}}if(Date.now()-t>this.updateStepDuration)break}for(;w.invalidRawDatas.length>0;){var o=w.invalidRawDatas[0];if(o.isDisposed())ft(w.invalidRawDatas,o);else try{o.validateRawData()}catch(d){ft(w.invalidRawDatas,o),o.raiseCriticalError(d)}}for(;w.invalidDataItems.length>0;){var o=w.invalidDataItems[0],n=o.dataProvider;if(!(o.isDisposed()||o.dataInvalid||n&&n.dataInvalid))try{o.validateDataItems()}catch(c){ft(w.invalidDataItems,o),o.raiseCriticalError(c)}ft(w.invalidDataItems,o)}for(;w.invalidDataRange.length>0;){var o=w.invalidDataRange[0],n=o.dataProvider;if(!(o.isDisposed()||o.dataInvalid||n&&n.dataInvalid))try{o.validateDataRange(),o.skipRangeEvent||o.dispatchImmediately("datarangechanged"),o.skipRangeEvent=!1}catch(c){ft(w.invalidDataRange,o),o.raiseCriticalError(c)}ft(w.invalidDataRange,o)}var l=[];at(w.invalidLayouts,function(p){e.validateLayouts(p)}),at(w.invalidPositions,function(p){e.validatePositions(p)});var h=!1;if(t=Date.now(),at(w.invalidSprites,function(p,d){for(var c=0;d.length>0;){if(e.validateLayouts(p),e.validatePositions(p),c++,c==5){if(Date.now()-t>e.updateStepDuration)break;c=0}var f=d[d.length-1];if(f&&!f.isDisposed()){if(!f._systemCheckIfValidate())l.push(f);else if(!e.checkIfValidate2(f))l.push(f);else try{f._systemUpdate(l)}catch(g){f.invalid=!1,ft(d,f),f.raiseCriticalError(g)}f.invalid=!1}ft(d,f)}w.invalidSprites[p]=w.invalidSprites[p].concat(l)}),at(w.invalidSprites,function(p,d){d.length>0&&(h=!0)}),at(w.invalidDatas,function(p,d){d.length>0&&(h=!0)}),W(ca(this.animations),function(p){p.update()}),at(w.invalidLayouts,function(p){e.validateLayouts(p)}),at(w.invalidPositions,function(p){e.validatePositions(p)}),$f(),at(w.invalidLayouts,function(p){e.validateLayouts(p)}),at(w.invalidPositions,function(p){e.validatePositions(p)}),w.dispatchImmediately("exitframe"),(h||this.animations.length>0||i.length>0)&&this.requestFrame(),this.updateStepDuration<200){var u=!0;at(w.invalidDatas,function(p,d){d.length>0&&(u=!1)}),at(w.invalidSprites,function(p,d){d.length>0&&(u=!1)}),u&&(this.updateStepDuration=200)}}},a.prototype.checkIfValidate2=function(e){return!(e.dataItem&&e.dataItem.component&&e.dataItem.component.dataInvalid&&!e.dataItem.component.isTemplate)},a.prototype.requestFrame=function(){var e=this;this._frameRequested||(xp(function(){e.update()}),this._frameRequested=!0)},a.prototype.softInvalidate=function(e){var t=this;e.children.each(function(i){i instanceof Q&&t.softInvalidate(i),i.measureFailed&&(Sf(i,"Label")?i.hardInvalidate():i.invalidate(),i.measureFailed=!1)})},a.prototype.validatePositions=function(e){for(var t=w.invalidPositions[e];t.length>0;){var i=t[t.length-1];if(i.isDisposed())ft(t,i);else try{i._systemValidatePositions()}catch(r){i.positionInvalid=!1,ft(t,i),i.raiseCriticalError(r)}}},a.prototype.validateLayouts=function(e){for(var t=w.invalidLayouts[e];t.length>0;){var i=t[t.length-1];if(i.isDisposed())ft(t,i);else try{i.children.each(function(r){r._systemValidateLayouts()}),i.validateLayout()}catch(r){i.layoutInvalid=!1,ft(t,i),i.raiseCriticalError(r)}}},a.prototype.log=function(e){yb(e)},Object.defineProperty(a.prototype,"isPaused",{get:function(){return this._isPaused},set:function(e){this._isPaused=e,e||(this._frameRequested=!1,this.requestFrame())},enumerable:!0,configurable:!0}),a.VERSION="4.10.39",a})();var Ot=new vb;function xb(a,e,t){return e+(t-e)*a}function jP(a,e,t){return new _t(xb(a,e.percent,t.percent))}function HP(a,e,t){var i=new Dt(Bo(e.rgb,t.rgb,a));return e.alpha!=t.alpha&&(i.alpha=e.alpha+(t.alpha-e.alpha)*a),i}function bb(a,e){return e+a.charAt(0).toUpperCase()+a.substr(1)}var Qr=(function(){function a(e){this._disposer=new Lt(function(){for(;e.length!==0;)e[0].dispose()})}return a.prototype.isDisposed=function(){return this._disposer.isDisposed()},a.prototype.dispose=function(){this._disposer.dispose()},a})();var Pi=(function(a){D(e,a);function e(t,i,r,s){var o=a.call(this)||this;return o.duration=0,o.easing=rm,o.progress=0,o._loop=0,o._pause=!1,o._delayTimeout=null,o._time=0,o._isFinished=!1,o.className="Animation",$t.animationsEnabled===!1&&(r=0),o.object=t,o.animationOptions=gp(i),o.duration=r,s&&(o.easing=s),o.applyTheme(),o}return e.prototype.debug=function(){},e.prototype.dispose=function(){a.prototype.dispose.call(this),this.pause()},e.prototype.delay=function(t){var i=this;if(t>0){this.pause(),Qi(this.object.animations,this);var r=setTimeout(function(){i._delayTimeout=null,i.start()},t);this._delayTimeout=new Lt(function(){clearTimeout(r)})}return this},e.prototype._start=function(){this._isFinished=!1,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),this.stopSameAnimations(),this._pause=!1,Qi(Ot.animations,this),Qi(this.object.animations,this),Ot.requestFrame()},e.prototype.start=function(){this._start(),this._startTime=Date.now(),this._time=0,this.staticOptions=[];for(var t=this.animationOptions.length-1;t>=0;t--){var i=this.animationOptions[t];if(C(i.from)||(i.childObject?i.from=i.childObject[i.property]:(i.from=this.object[i.property],C(i.from)||(i.from=nm[i.property]))),i.from==i.to)ft(this.animationOptions,i);else if(!C(i.from)||!(i.from instanceof _t)&&i.to instanceof _t||i.from instanceof _t&&!(i.to instanceof _t))this.staticOptions.push(i),ft(this.animationOptions,i);else if(P(i.to))if(i.updateMethod=xb,i.from instanceof _t){var r=this.object[bb(i.property,"pixel")];isNaN(r)?(this.staticOptions.push(i),ft(this.animationOptions,i)):i.from=r}else isNaN(i.from)&&(this.staticOptions.push(i),ft(this.animationOptions,i));else if(i.to instanceof Dt)i.from?i.updateMethod=HP:(this.staticOptions.push(i),ft(this.animationOptions,i));else if(i.to instanceof _t){if(i.updateMethod=jP,!isNaN(i.from)){var r=this.object[bb(i.property,"relative")];isNaN(r)||(i.from=N(r*100))}}else this.staticOptions.push(i),ft(this.animationOptions,i)}if(this.applyStaticOptions(),this.events.isEnabled("animationstarted")){var s={type:"animationstarted",target:this,progress:this.progress};this.events.dispatchImmediately("animationstarted",s)}return this.update(),this.duration===0&&this.end(),this},e.prototype.loop=function(t){return P(t)||(t=1/0),this._loop=t,this},e.prototype.pause=function(){return this._pause=!0,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),ft(Ot.animations,this),ft(this.object.animations,this),this},e.prototype.resume=function(){return this._start(),this._startTime=Date.now()-this._time,this},e.prototype.end=function(){if(this._loop==0&&this.pause(),this.setProgress(1),this.applyStaticOptions(),this.events.isEnabled("animationended")){var t={type:"animationended",target:this,progress:this.progress};this.events.dispatchImmediately("animationended",t)}return this._loop>0?(this._loop--,this.start()):(this.stop(),this._isFinished=!0),this},e.prototype.kill=function(){this.pause(),this._isFinished=!0},e.prototype.isFinished=function(){return this._isFinished},e.prototype.applyStaticOptions=function(){var t=this;W(this.staticOptions,function(i){i.childObject?i.childObject[i.property]=t.progress==1?i.to:i.from:t.object[i.property]=t.progress==1?i.to:i.from})},e.prototype.stop=function(t){if(this.pause(),!t&&this.events.isEnabled("animationstopped")){var i={type:"animationstopped",target:this,progress:this.progress};this.events.dispatchImmediately("animationstopped",i)}return this},e.prototype.setProgress=function(t){var i=this;if(this._time=this.duration*t,W(this.animationOptions,function(s){if(s.updateMethod&&C(s.from)){var o=s.updateMethod(t,s.from,s.to);s.childObject?s.childObject[s.property]=o:i.object[s.property]=o}}),this.progress=t,this.events.isEnabled("animationprogress")){var r={type:"animationprogress",target:this,progress:this.progress};this.events.dispatchImmediately("animationprogress",r)}Ot.requestFrame()},e.prototype.update=function(){if(!this._pause){var t=void 0;this._time=J(Date.now()-this._startTime,0,this.duration);var i=this._time/this.duration;t=this.easing(i),(this.duration==0||!P(t)||i>=1)&&(t=1),this.setProgress(t),H(this._time/this.duration,6)==1&&this.end()}return this},Object.defineProperty(e.prototype,"delayed",{get:function(){return!!this._delayTimeout},enumerable:!0,configurable:!0}),e.prototype.stopSameAnimations=function(){var t=this;W(ca(this.object.animations),function(i){if(i!==t&&!i.delayed){var r=[];W(t.animationOptions,function(s){W(i.animationOptions,function(o){s.property==o.property&&s.childObject==o.childObject&&(r.push(o),i.animationOptions.length==0&&i.kill())})}),W(r,function(s){ft(i.animationOptions,s)})}})},e.prototype.asFunction=function(t){return t=="easing"||a.prototype.asIs.call(this,t)},e})(fi);var _b=new It;function Pb(a,e){e||(e="ampopup");var t=new ct,i=t.getFor("text"),r=t.getFor("background");r.alpha=.8;var s=t.getFor("alternativeBackground");s.alpha=.05;var o=_b.insertKeyIfEmpty(e,function(){var n=new Bt([new ne(a,"."+e,{overflow:"visible",position:"absolute",top:"0",left:"0","z-index":"2000"}),new ne(a,"."+e+"-curtain",{width:"100%",height:"100%",position:"absolute",top:"0",left:"0","z-index":"2001","background-color":r.hex,opacity:"0.5"}),new ne(a,"."+e+"-header",{display:"block",width:"100%","min-height":"1.8em",background:s.rgba}),new ne(a,"."+e+"-title",{"font-weight":"bold","font-size":"110%",padding:"0.5em 1.2em 0.5em 1em"}),new ne(a,"."+e+"-content",{background:r.hex,"background-color":r.rgba,color:i.hex,display:"inline-block",position:"absolute",top:"0",left:"0","max-width":"90%","max-height":"90%",overflow:"auto","z-index":"2002"}),new ne(a,"."+e+"-inside",{padding:"1em"}),new ne(a,"."+e+"-close",{display:"block",position:"absolute",top:"0.3em",right:"0.3em","background-color":"rgb(100, 100, 100)",background:"rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center","background-size":"80%",width:"1.2em",height:"1.2em",cursor:"pointer"})]);return new fa(function(){_b.removeKey(e),n.dispose()})});return o.increment()}var Ih=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.adapter=new Ve(t),t._elements={},t._IOs={},t._content="",t._title="",t._classPrefix="ampopup",t._defaultStyles=!0,t._showCurtain=!1,t._draggable=!0,t._align="center",t._dynamicResize=!0,t._verticalAlign="middle",t._shift={x:0,y:0},t._tempShift={x:0,y:0},t._readerTitle="",t._closable=!0,t._cssLoaded=!1,t._fitTo="window",t.isTemplate=!1,t._sized=!1,t.className="Popup",t}return e.prototype.open=function(){this.container&&(this._elements.wrapper&&this.container.appendChild(this._elements.wrapper),this._elements.curtain&&(this.container.appendChild(this._elements.curtain),this.showCurtain=this.showCurtain),this.positionElement(),this.dispatchImmediately("opened"))},e.prototype.close=function(){this._elements.wrapper&&this._elements.wrapper.parentElement&&this._elements.wrapper.parentElement.removeChild(this._elements.wrapper),this._elements.curtain&&this._elements.curtain.parentElement&&this._elements.curtain.parentElement.removeChild(this._elements.curtain),this.dispatchImmediately("closed"),this.releasePointers()},e.prototype.dispose=function(){this.close(),a.prototype.dispose.call(this)},e.prototype.positionElement=function(t){var i=this;t===void 0&&(t=!0),this._elements.wrapper&&setTimeout(function(){if(i._elements.wrapper){if(t||!i._sized){i._elements.wrapper.style.opacity="0.01",i._elements.wrapper.style.left="0",i._elements.wrapper.style.top="0",i._elements.wrapper.style.margin="0 0 0 0",i._elements.wrapper.style.width="",i._elements.wrapper.style.height="";var r=i._elements.wrapper.getBoundingClientRect();i._elements.wrapper.style.width=r.width+"px",i._elements.wrapper.style.height=r.height+"px",i._sized=!0}if(i.dynamicResize)for(var s=i._elements.wrapper.getElementsByTagName("img"),o=0;o<s.length;o++){var n=s[o];if(!n.complete){n.addEventListener("load",function(){i.positionElement(!0)});break}}setTimeout(function(){if(i._elements.wrapper){var l;switch((t||!i._sized)&&i._bbox?l=i._bbox:(l=i._elements.wrapper.getBoundingClientRect(),i._elements.wrapper.style.opacity=""),i.align){case"left":i._elements.wrapper.style.left="0",i._elements.wrapper.style.right="auto",i._elements.wrapper.style.marginLeft=i.toStyle(i._shift.x+i._tempShift.x);break;case"center":i._elements.wrapper.style.left="50%",i._elements.wrapper.style.right="auto",i._elements.wrapper.style.marginLeft=i.toStyle(Math.round(-l.width/2)+(i._shift.x+i._tempShift.x));break;case"right":i._elements.wrapper.style.left="auto",i._elements.wrapper.style.right="0",i._elements.wrapper.style.marginLeft=i.toStyle(i._shift.x+i._tempShift.x);break;default:i._elements.wrapper.style.left=i.toStyle(i.left)||"auto",i._elements.wrapper.style.right=i.toStyle(i.right)||"auto",i._elements.wrapper.style.marginLeft=i.toStyle(i._shift.x+i._tempShift.x);break}switch(i.verticalAlign){case"top":i._elements.wrapper.style.top="0",i._elements.wrapper.style.bottom="auto",i._elements.wrapper.style.marginTop=i.toStyle(i._shift.y+i._tempShift.y);break;case"middle":i._elements.wrapper.style.top="50%",i._elements.wrapper.style.bottom="auto",i._elements.wrapper.style.marginTop=i.toStyle(Math.round(-l.height/2)+(i._shift.y+i._tempShift.y));break;case"bottom":i._elements.wrapper.style.top="auto",i._elements.wrapper.style.bottom="0",i._elements.wrapper.style.marginTop=i.toStyle(i._shift.y+i._tempShift.y);break;default:i._elements.wrapper.style.top=i.toStyle(i.top)||"auto",i._elements.wrapper.style.bottom=i.toStyle(i.bottom)||"auto",i._elements.wrapper.style.marginTop=i.toStyle(i._shift.y+i._tempShift.y);break}}},1)}},1)},e.prototype.setupDragging=function(){var t=this;this.draggable?(this._IOs.header.events.has("drag")||this._IOs.header.events.on("drag",function(i){t._tempShift.x=i.shift.x,t._tempShift.y=i.shift.y,t.positionElement(!1)}),this._IOs.header.events.has("dragstop")||this._IOs.header.events.on("dragstop",function(i){t._shift.x+=t._tempShift.x,t._shift.y+=t._tempShift.y,t._tempShift.x=0,t._tempShift.y=0,t.positionElement(!1)})):this._IOs.header&&(gt().unprepElement(this._IOs.header),this._IOs.header.events.has("drag")&&this._IOs.header.events.off("drag"),this._IOs.header.events.has("dragstop")&&this._IOs.header.events.off("dragstop"))},e.prototype.toStyle=function(t){return C(t)?P(t)?""+t+"px":t.toString():null},Object.defineProperty(e.prototype,"classPrefix",{get:function(){return this.adapter.apply("classPrefix",this._classPrefix)},set:function(t){this._classPrefix=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classPrefixRaw",{get:function(){return this._classPrefix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){return this.adapter.apply("content",this._content)},set:function(t){this._content!=t&&(this._content=t,this._elements.content||this.createContentElement(),this._elements.content.innerHTML=t,this.positionElement())},enumerable:!0,configurable:!0}),e.prototype.getClassNames=function(){return this.adapter.apply("classNames",{wrapperClass:this.classPrefix+"",headerClass:this.classPrefix+"-header",titleClass:this.classPrefix+"-title",contentClass:this.classPrefix+"-content",insideClass:this.classPrefix+"-inside",curtainClass:this.classPrefix+"-curtain",closeClass:this.classPrefix+"-close"})},e.prototype.createContentElement=function(){if(!this._elements.wrapper){var t=this.getClassNames(),i=document.createElement("div");i.className=t.contentClass,i.style.opacity="0.01";var r=document.createElement("a");r.className=t.closeClass;var s=document.createElement("div");s.className=t.headerClass;var o=document.createElement("div");o.innerHTML=this.title,o.className=t.titleClass,this.title||(o.style.display="none");var n=document.createElement("div");n.className=t.insideClass,n.innerHTML=this.content,this._IOs.wrapper=gt().getInteraction(i),this._IOs.header=gt().getInteraction(s),this._disposers.push(this._IOs.wrapper),this._IOs.wrapper.events.on("over",this.disablePointers,this),this._IOs.wrapper.events.on("out",this.releasePointers,this),this._IOs.close=gt().getInteraction(r),this._disposers.push(this._IOs.close),r.style.visibility="hidden",i.setAttribute("role","dialog"),s.appendChild(r),s.appendChild(o),i.appendChild(s),i.appendChild(n),this.container.appendChild(i),this._elements.wrapper=i,this._elements.header=s,this._elements.content=n,this._elements.title=o,this._elements.close=r,this.defaultStyles&&this.loadDefaultCSS(),this.createCurtainElement(),this.applyEvents(),this.applyReaderSettings(),this.setupDragging()}},Object.defineProperty(e.prototype,"title",{get:function(){return this.adapter.apply("title",this._title)},set:function(t){this._title!=t&&(this._title=t,this._elements.content||this.createContentElement(),this._elements.title.innerHTML=t,this.positionElement(),this.applyReaderSettings())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerTitle",{get:function(){return this.adapter.apply("readerTitle",this._readerTitle!=""?this._readerTitle:this.title)},set:function(t){this._readerTitle!=t&&(this._readerTitle=t,this.applyReaderSettings())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"closable",{get:function(){return this.adapter.apply("closable",this._closable)},set:function(t){t!==this._closable&&(this._closable=t,this.applyEvents())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fitTo",{get:function(){return this.adapter.apply("fitTo",this._fitTo)},set:function(t){t!=this._fitTo&&(this._fitTo=t,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultStyles",{get:function(){return this.adapter.apply("defaultStyles",this._defaultStyles)},set:function(t){this._defaultStyles!=t&&(this._defaultStyles=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showCurtain",{get:function(){return this.adapter.apply("showCurtain",this._showCurtain)},set:function(t){this._showCurtain!=t&&(this._showCurtain=t,this._elements.curtain&&(this._elements.curtain.style.display=t?"block":"none"))},enumerable:!0,configurable:!0}),e.prototype.createCurtainElement=function(){var t=this.getClassNames(),i=document.createElement("div");i.className=t.curtainClass,this.container.appendChild(i),this._IOs.curtain=gt().getInteraction(i),this._disposers.push(this._IOs.curtain),this._IOs.curtain.events.on("over",this.disablePointers,this),this._IOs.curtain.events.on("out",this.releasePointers,this),i.style.display=this.showCurtain?"block":"none",this._elements.curtain=i},Object.defineProperty(e.prototype,"draggable",{get:function(){return this.adapter.apply("draggable",this._draggable)},set:function(t){this._draggable!=t&&(this._draggable=t,this.setupDragging())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dynamicResize",{get:function(){return this.adapter.apply("dynamicResize",this._dynamicResize)},set:function(t){this._dynamicResize!=t&&(this._dynamicResize=t,this.positionElement(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this.adapter.apply("align",this._align)},set:function(t){this._align!=t&&(this._align=t,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalAlign",{get:function(){return this.adapter.apply("verticalAlign",this._verticalAlign)},set:function(t){this._verticalAlign!=t&&(this._verticalAlign=t,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.adapter.apply("left",this._left)},set:function(t){this.left!=t&&(this._left=t,this._align="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.adapter.apply("right",this._right)},set:function(t){this.right!=t&&(this._right=t,this._align="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.adapter.apply("top",this._top)},set:function(t){this.top!=t&&(this._top=t,this._verticalAlign="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.adapter.apply("bottom",this._bottom)},set:function(t){this.bottom!=t&&(this._bottom=t,this._verticalAlign="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),e.prototype.loadDefaultCSS=function(){this._cssLoaded||(this._disposers.push(Pb(dl(this.container),this.classPrefix)),at(this._elements,function(t,i){i.style.display=""}),this._cssLoaded=!0)},e.prototype.applyEvents=function(){var t=this;if(this._IOs.close)if(this.closable){this._IOs.close.element.style.visibility="visible";var i=[gt().body.events.on("keyup",function(r){ir.isKey(r.event,"esc")&&t.closable&&t.close()}),this._IOs.close.events.on("hit",function(r){t.close()})];i.push(this._IOs.curtain.events.on("hit",function(r){t.showCurtain&&t.closable&&t.close()})),this._disposers.push(new Bt(i))}else this._IOs.close.element.style.visibility="hidden"},e.prototype.disablePointers=function(){this.sprite&&(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled,this.sprite.interactionsEnabled=!1)},e.prototype.releasePointers=function(){C(this._spriteInteractionsEnabled)&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled,this._spriteInteractionsEnabled=void 0)},e.prototype.applyReaderSettings=function(){this.elements.wrapper.setAttribute("aria-label",this.readerTitle)},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.container=t.container,this.sprite=t.sprite,this.classPrefix=t.classPrefixRaw,this.content=t.content,this.title=t.title,this.readerTitle=t.readerTitle,this.defaultStyles=t.defaultStyles,this.showCurtain=t.showCurtain,this.align=t.align,this.verticalAlign=t.verticalAlign,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.adapter.copyFrom(t.adapter)},e})(fi);var Vh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.adapter=new Ve(t),t.className="Modal",t.showCurtain=!0,t.draggable=!1,t}return e})(Ih);var XP=(function(){function a(){var e=this;this._targets=[],this._observer=new ResizeObserver(function(t){W(t,function(i){W(e._targets,function(r){r.target===i.target&&r.callback()})})})}return a.prototype.addTarget=function(e,t){this._observer.observe(e,{box:"content-box"}),this._targets.push({target:e,callback:t})},a.prototype.removeTarget=function(e){this._observer.unobserve(e),vf(this._targets,function(t){return t.target!==e})},a})(),YP=(function(){function a(){this._targets=[]}return a.prototype.addTarget=function(e,t){var i=this;if(this._targets.length===0){var r=null,s=function(){var n=Date.now();(r===null||n>r+a.delay)&&(r=n,W(i._targets,function(l){var h=l.target.getBoundingClientRect();(h.width!==l.size.width||h.height!==l.size.height)&&(l.size=h,l.callback())})),i._timer=requestAnimationFrame(s)};this._timer=requestAnimationFrame(s)}var o=e.getBoundingClientRect();this._targets.push({target:e,callback:t,size:o})},a.prototype.removeTarget=function(e){vf(this._targets,function(t){return t.target!==e}),this._targets.length===0&&cancelAnimationFrame(this._timer)},a.delay=200,a})(),Np=null;function zP(){return Np===null&&(typeof ResizeObserver<"u"?Np=new XP:Np=new YP),Np}var $b=(function(){function a(e,t){this._disposed=!1,this._sensor=zP(),this._element=e,this._sensor.addTarget(e,t)}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element))},Object.defineProperty(a.prototype,"sensor",{get:function(){return this._sensor},enumerable:!0,configurable:!0}),a.prototype.reset=function(){yl("resizeSensor.reset() is no longer needed and can be removed")},a})();var Bp=[],Eh=(function(){function a(e,t){var i=this;this._disposed=!1,this.autoResize=!0,this.nonExportableSprites=[],this._disposers=[],this.cssScale=1,this._printing=!1,this.htmlElement=e,t||(this._printing=!1,this.initSensor(),this._disposers.push($e(window,"beforeprint",function(){i._printing=!0})),this._disposers.push($e(window,"afterprint",function(){i._printing=!1}))),Bp.push(this);var r=document.createElement("div"),s=r.style;s.width="100%",s.height="100%",s.position="relative",e.appendChild(r),this.SVGContainer=r}return a.prototype.initSensor=function(){var e=this;this.resizeSensor&&this.resizeSensor.dispose();var t=function(){e.autoResize&&!e._printing&&e.measure()};this.resizeSensor=new $b(this.htmlElement,t),this._disposers.push(this.resizeSensor)},a.prototype.measure=function(){var e=Nf(this.htmlElement),t=Bf(this.htmlElement),i=this.container;i&&((this.width!=e||this.height!=t)&&(this.width=e,this.height=t,e>0&&(i.maxWidth=e),t>0&&(i.maxHeight=t),Wf(this.SVGContainer)),i.maxWidth||(i.maxWidth=0),i.maxHeight||(i.maxHeight=0),this.cssScale=1,this.checkTransform(this.htmlElement))},Object.defineProperty(a.prototype,"container",{get:function(){return this._container},set:function(e){this._container=e,this.measure()},enumerable:!0,configurable:!0}),a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||ft(Bp,this),W(this._disposers,function(e){e.dispose()})},Object.defineProperty(a.prototype,"hideOverflow",{set:function(e){e?this.SVGContainer.style.overflow="hidden":this.SVGContainer.style.overflow=""},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"modal",{get:function(){return C(this._modal)||(this._modal=new Vh,this._modal.container=this.SVGContainer,this._disposers.push(this._modal)),this._modal},enumerable:!0,configurable:!0}),a.prototype.openModal=function(e,t){this.closeModal();var i=this.modal;return i.content=e,i.readerTitle=t||"",i.title=t||"",i.open(),i},a.prototype.closeModal=function(){this._modal&&this.modal.close()},Object.defineProperty(a.prototype,"popups",{get:function(){if(!C(this._popups)){var e=new Ih;e.container=this.SVGContainer,this._popups=new zt(e),this._disposers.push(new Ft(this._popups)),this._disposers.push(this._popups.template)}return this._popups},enumerable:!0,configurable:!0}),a.prototype.openPopup=function(e,t){var i=this.popups.create();return i.content=e,C(t)&&(i.title=t),i.open(),i},a.prototype.closeAllPopups=function(){this.popups.each(function(e){e.close()})},Object.defineProperty(a.prototype,"readerAlertElement",{get:function(){if(!C(this._readerAlertElement)){var e=document.createElement("div");e.setAttribute("role","alert"),e.style.zIndex="-100000",e.style.opacity="0",e.style.position="absolute",e.style.top="0",this.SVGContainer.appendChild(e),this._readerAlertElement=e}return this._readerAlertElement},enumerable:!0,configurable:!0}),a.prototype.readerAlert=function(e){this.readerAlertElement.innerHTML=e},a.prototype.checkTransform=function(e){if(window.getComputedStyle){if(e&&e.style){var t=window.getComputedStyle(e,null);if(t){var i=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");if(i&&i!=="none"){var r=i.split("(")[1].split(")")[0].split(","),s=Number(r[0]),o=Number(r[1]),n=Math.sqrt(s*s+o*o);isNaN(n)||(this.cssScale*=n)}}}e.parentNode&&e.parentNode instanceof HTMLElement&&this.checkTransform(e.parentNode)}},a})();var jp=(function(){function a(e,t){this.container=e,this.id=t;var i=document.createElementNS(za,"svg");i.setAttribute("version","1.1"),i.setAttributeNS(Xf,"xmlns",za),i.setAttributeNS(Xf,"xmlns:xlink",hl),i.setAttribute("role","group"),this.container.appendChild(i),this.defs=document.createElementNS(za,"defs"),i.appendChild(this.defs),i.style.width="100%",i.style.height="100%",i.style.overflow="visible",this.svg=i}return a.prototype.add=function(e){return new Wa(e)},a.prototype.addGroup=function(e){return new Uf(e)},a.prototype.append=function(e){e&&this.svg.appendChild(e.node)},a.prototype.appendDef=function(e){e&&this.defs.appendChild(e.node)},a.prototype.foreignObject=function(){var e=new Wa("foreignObject");return e},a.prototype.supportsForeignObject=function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility","1.1")},a})();var cm=null;function _s(){if(cm===null){var a=document.createElement("div");a.hidden=!0,a.style.width="1px",a.style.height="1px",a.style.position="absolute",a.style.zIndex="-1000000",document.body.appendChild(a);var e=new Eh(a,!0);cm=new jp(e.SVGContainer,"ghost")}return cm}var Ps=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._elements=new wt,t.properties={},t.className="Pattern",t.width=10,t.height=10,t.x=0,t.y=0,t.patternUnits="userSpaceOnUse";var i=new ct;return t.backgroundFill=i.getFor("background"),t.backgroundOpacity=0,t.fillOpacity=1,t.fill=i.getFor("alternativeBackground"),t.stroke=i.getFor("alternativeBackground"),t.strokeOpacity=1,t.strokeWidth=1,t.shapeRendering="crispEdges",t.rotation=0,t.element=t.paper.addGroup("pattern"),t.id="pattern-"+w.getUniqueId(),t.element.attr({id:t.id}),t._disposers.push(t.element),t._disposers.push(new Ft(t._elements)),t.patternUnits=t.patternUnits,t.width=t.width,t.height=t.height,t.applyTheme(),t}return e.prototype.draw=function(){var t=this,i=this.element;if(i){i.removeChildNodes();var r=this.paper.add("rect");r.attr({width:this.width,height:this.height,"shape-rendering":"crispEdges",fill:this.backgroundFill.hex,"fill-opacity":this.backgroundOpacity,stroke:this.backgroundFill.hex,"stroke-opacity":0}),i.add(r),i.attr({x:this.x,y:this.y,width:this.width,height:this.height,stroke:this.stroke.hex,fill:this.fill.hex,"fill-opacity":this.fillOpacity,"stroke-opacity":this.strokeOpacity,"stroke-width":this.strokeWidth,"shape-rendering":this.shapeRendering,patternUnits:this.patternUnits,"stroke-dasharray":this.strokeDasharray}),E(this._elements.iterator(),function(s){s.rotation=t.rotation,s.rotationX=t.properties.rotationX,s.rotationY=t.properties.rotationY,t.element.add(s)})}},e.prototype.animate=function(t,i,r){return new Pi(this,t,i,r).start()},e.prototype.addElement=function(t){this._elements.push(t),this._disposers.push(t)},e.prototype.removeElement=function(t){this._elements.removeValue(t),this.removeDispose(t)},Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillOpacity",{get:function(){return this.properties.fillOpacity},set:function(t){this.properties.fillOpacity=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this.properties.fill},set:function(t){this.properties.fill=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundFill",{get:function(){return this.properties.backgroundFill},set:function(t){this.properties.backgroundFill=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundOpacity",{get:function(){return this.properties.backgroundOpacity},set:function(t){this.properties.backgroundOpacity=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(t){this.properties.stroke=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeOpacity",{get:function(){return this.properties.strokeOpacity},set:function(t){this.properties.strokeOpacity=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(t){this.properties.strokeWidth=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shapeRendering",{get:function(){return this.properties.shapeRendering},set:function(t){this.properties.shapeRendering=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.properties.rotation},set:function(t){this.properties.rotation=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patternUnits",{get:function(){return this.properties.patternUnits},set:function(t){this.properties.patternUnits=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.properties.width},set:function(t){this.properties.width=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.properties.height},set:function(t){this.properties.height=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.properties.x},set:function(t){this.properties.x=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.properties.y},set:function(t){this.properties.y=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paper",{get:function(){return this._paper?this._paper:_s()},set:function(t){this._paper!=t&&(this._paper=t,this.draw(),t.appendDef(this.element))},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;a.prototype.copyFrom.call(this,t),at(t.properties,function(r,s){i[r]=s})},Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Qr(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeDasharray",{get:function(){return this.properties.strokeDashArray},set:function(t){this.properties.strokeDashArray=t,this.draw()},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){if(t&&C(t.elements)&&oe(t.elements))for(var i=0,r=t.elements.length;i<r;i++){var s=t.elements[i];if(C(s.type)){var o=this.createEntryInstance(s);o instanceof we&&(o.config=s),this.addElement(C(s.typeProperty)?o[s.typeProperty]:o.element)}}a.prototype.processConfig.call(this,t)},e})(we);w.registeredClasses.Pattern=Ps;var mi=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._stops=new wt,t._rotation=0,t.className="LinearGradient",t._stops.events.on("setIndex",t.validate,t),t._stops.events.on("inserted",t.validate,t),t.element=t.paper.addGroup("linearGradient"),t.id="gradient-"+w.getUniqueId(),t.element.attr({id:t.id}),t._disposers.push(t.element),t.applyTheme(),t}return e.prototype.validate=function(){var t=this,i=(this._rotation+90)*zn,r=Math.round(50+Math.sin(i+Math.PI)*50)+"%",s=Math.round(50+Math.cos(i)*50)+"%",o=Math.round(50+Math.sin(i)*50)+"%",n=Math.round(50+Math.cos(i+Math.PI)*50)+"%",l=this.element;l.removeChildNodes(),l.attr({x1:r,x2:o,y1:s,y2:n}),E(qr(this._stops.iterator()),function(h){var u=h[0],p=h[1],d=p.offset;P(d)||(d=u/(t._stops.length-1));var c=t.paper.add("stop");C(p.color)&&c.attr({"stop-color":p.color.toString()}),P(p.opacity)&&c.attr({"stop-opacity":p.opacity}),P(d)&&c.attr({offset:d}),l.add(c)})},e.prototype.clear=function(){this._stops.clear()},e.prototype.addColor=function(t,i,r){this._stops.push({color:t,opacity:i,offset:r})},Object.defineProperty(e.prototype,"stops",{get:function(){return this._stops},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paper",{get:function(){return this._paper?this._paper:_s()},set:function(t){this._paper!=t&&(this._paper=t,this.validate(),t.appendDef(this.element))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation=t,this.validate()},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.stops.copyFrom(t.stops),this._rotation=t.rotation},Object.defineProperty(e.prototype,"gradientUnits",{set:function(t){this.element.attr({gradientUnits:t})},enumerable:!0,configurable:!0}),e})(we);w.registeredClasses.LinearGradient=mi;var $r=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._stops=new wt,t.element=t.paper.addGroup("radialGradient"),t.id="gradient-"+w.getUniqueId(),t.element.attr({id:t.id}),t._disposers.push(t.element),t.applyTheme(),t}return e.prototype.draw=function(){var t=this,i=this.element;if(P(this.cx)){var r=this.cx;r instanceof _t&&(r=r.percent+"%"),i.attr({cx:r})}if(P(this.cy)){var r=this.cy;r instanceof _t&&(r=r.percent+"%"),i.attr({cy:r})}if(this.fx){var r=this.fx;r instanceof _t&&(r=r.percent+"%"),i.attr({fx:r})}if(this.fy){var r=this.fy;r instanceof _t&&(r=r.percent+"%"),i.attr({fy:r})}i.removeChildNodes(),E(qr(this._stops.iterator()),function(s){var o=s[0],n=s[1],l=n.offset;P(l)||(l=o/(t._stops.length-1));var h=t.paper.add("stop");C(n.color)&&h.attr({"stop-color":n.color.toString()}),P(n.opacity)&&h.attr({"stop-opacity":n.opacity}),P(l)&&h.attr({offset:l}),i.add(h)})},e.prototype.addColor=function(t,i,r){this._stops.push({color:t,opacity:i,offset:r}),this.draw()},Object.defineProperty(e.prototype,"paper",{get:function(){return this._paper?this._paper:_s()},set:function(t){this._paper!=t&&(this._paper=t,this.draw(),t.appendDef(this.element))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cx",{get:function(){return this._cx},set:function(t){this._cx=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cy",{get:function(){return this._cy},set:function(t){this._cy=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fx",{get:function(){return this._fx},set:function(t){this._fx=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fy",{get:function(){return this._fy},set:function(t){this._fy=t,this.draw()},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.stops.copyFrom(t.stops),this.cx=t.cx,this.cy=t.cy,this.fx=t.fx,this.fy=t.fy},Object.defineProperty(e.prototype,"stops",{get:function(){return this._stops},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._stops.clear()},e})(we);w.registeredClasses.RadialGradient=$r;var vl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._negativeBase=0,t._baseUnit="second",t._outputFormat="svg",t._unitValues={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6},t._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"},t.className="DurationFormatter",t.applyTheme(),t}return e.prototype.format=function(t,i,r){this.language||(this.sprite?this.language=this.sprite.language:this.language=new er);var s=r||this._baseUnit;(typeof i>"u"||i==="")&&(C(this.durationFormat)?i=this.durationFormat:i=this.getFormat(Wt(t),null,s)),i=Ya(i);var o=this.parseFormat(i,s),n=Number(t),l;n>this._negativeBase?l=o.positive:n<this._negativeBase?l=o.negative:l=o.zero;var h=this.applyFormat(n,l);return l.color!==""&&(this._outputFormat==="svg"?h="<tspan fill='"+l.color+"'>"+h+"</tspan>":this._outputFormat==="html"&&(h="<span style='color: "+l.color+";'>"+h+"</span>")),h},e.prototype.parseFormat=function(t,i){var r=this,s=this.getCache(t);if(C(s))return s;var o=i||this._baseUnit,n={positive:{color:"",template:"",parts:[],source:"",baseUnit:o,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:o,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:o,parsed:!1,absolute:!1}};t=t.replace("||",ga);var l=t.split("|");return n.positive.source=l[0],typeof l[2]>"u"?n.zero=n.positive:n.zero.source=l[2],typeof l[1]>"u"?n.negative=n.positive:n.negative.source=l[1],at(n,function(h,u){if(!u.parsed){if(typeof r.getCache(u.source)<"u"){n[h]=r.getCache(u.source);return}var p=u.source,d=[];d=u.source.match(/^\[([^\]]*)\]/),d&&d.length&&d[0]!==""&&(p=u.source.substr(d[0].length),u.color=d[1]);for(var c=fr().chunk(p,!0),f=0;f<c.length;f++){var g=c[f];if(g.text=g.text.replace(ga,"|"),g.type==="value"){g.text.match(/[yYMdDwhHKkmsSn]+a/)&&(u.absolute=!0,g.text=g.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));var m=g.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(m)for(var y=0;y<m.length;y++)C(m[y])||(m[y]=r._unitAliases[m[y]]),u.parts.push(m[y]),g.text=g.text.replace(m[y],_i)}u.template+=g.text}r.setCache(u.source,u),u.parsed=!0}}),this.setCache(t,n),n},e.prototype.applyFormat=function(t,i){var r=!i.absolute&&t<this._negativeBase;t=Math.abs(t);for(var s=this.toTimeStamp(t,i.baseUnit),o=i.template,n=0,l=i.parts.length;n<l;n++){var h=i.parts[n],u=this.toTimeUnit(h.substr(0,1)),p=h.length,d=Math.floor(s/this._unitValues[u]);o=o.replace(_i,ci(d,p,"0")),s-=d*this._unitValues[u]}return r&&(o="-"+o),o},e.prototype.toTimeStamp=function(t,i){return t*this._unitValues[i]},e.prototype.toTimeUnit=function(t){switch(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"}},e.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},Object.defineProperty(e.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(t){this._baseUnit=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(t){this._outputFormat=t.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),e.prototype.getFormat=function(t,i,r){if(C(this.durationFormat))return this.durationFormat;if(r||(r=this.baseUnit),C(i)&&t!=i){t=Math.abs(t),i=Math.abs(i);var s=this.getValueUnit(mt(t,i),r);return this.durationFormats[r][s]}else{var o=this.getValueUnit(t,r);return this.durationFormats[r][o]}},e.prototype.getValueUnit=function(t,i){i||(i=this.baseUnit);var r,s=this.getMilliseconds(t,i);return wf(this._unitValues,function(o,n){if(o==i||r){var l=s/n;if(l<=1)return r||(r=o),!1;r=o}return!0}),r},e.prototype.getMilliseconds=function(t,i){return i||(i=this.baseUnit),t*this._unitValues[i]},Object.defineProperty(e.prototype,"durationFormat",{get:function(){return this._durationFormat},set:function(t){this._durationFormat!=t&&(this._durationFormat=t,this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormats",{get:function(){return this._durationFormats||(this._durationFormats={millisecond:{millisecond:this.language.translate("_duration_millisecond"),second:this.language.translate("_duration_millisecond_second"),minute:this.language.translate("_duration_millisecond_minute"),hour:this.language.translate("_duration_millisecond_hour"),day:this.language.translate("_duration_millisecond_day"),week:this.language.translate("_duration_millisecond_week"),month:this.language.translate("_duration_millisecond_month"),year:this.language.translate("_duration_millisecond_year")},second:{second:this.language.translate("_duration_second"),minute:this.language.translate("_duration_second_minute"),hour:this.language.translate("_duration_second_hour"),day:this.language.translate("_duration_second_day"),week:this.language.translate("_duration_second_week"),month:this.language.translate("_duration_second_month"),year:this.language.translate("_duration_second_year")},minute:{minute:this.language.translate("_duration_minute"),hour:this.language.translate("_duration_minute_hour"),day:this.language.translate("_duration_minute_day"),week:this.language.translate("_duration_minute_week"),month:this.language.translate("_duration_minute_month"),year:this.language.translate("_duration_minute_year")},hour:{hour:this.language.translate("_duration_hour"),day:this.language.translate("_duration_hour_day"),week:this.language.translate("_duration_hour_week"),month:this.language.translate("_duration_hour_month"),year:this.language.translate("_duration_hour_year")},day:{day:this.language.translate("_duration_day"),week:this.language.translate("_duration_day_week"),month:this.language.translate("_duration_day_month"),year:this.language.translate("_duration_day_year")},week:{week:this.language.translate("_duration_week"),month:this.language.translate("_duration_week_month"),year:this.language.translate("_duration_week_year")},month:{month:this.language.translate("_duration_month"),year:this.language.translate("_duration_month_year")},year:{year:this.language.translate("_duration_year")}}),this._durationFormats},set:function(t){this._durationFormats=t,this.invalidateSprite()},enumerable:!0,configurable:!0}),e})(we);w.registeredClasses.DurationFormatter=vl;var wb=new It;function Cb(a,e){var t=e||"amexport",i=new ct,r=wb.insertKeyIfEmpty(t,function(){var s=new Bt([new ne(a,"."+t+"-menu *",{"box-sizing":"border-box"}),new ne(a,"."+t+"-menu-level-0",{position:"absolute",top:"5px",right:"5px"}),new ne(a,"."+t+"-menu-level-0."+t+"-left",{right:"auto",left:"5px"}),new ne(a,"."+t+"-menu-level-0."+t+"-right",{right:"5px",left:"auto"}),new ne(a,"."+t+"-menu-level-0."+t+"-top",{top:"5px",bottom:"auto"}),new ne(a,"."+t+"-menu-level-0."+t+"-bottom",{top:"auto",bottom:"5px"}),new ne(a,"."+t+"-item."+t+"-item-level-0",{opacity:"0.3",width:"30px","min-height":"30px",transition:"all 100ms ease-in-out"}),new ne(a,"div:hover > div > ."+t+"-menu ."+t+"-item."+t+"-item-level-0, ."+t+"-item."+t+"-item-level-0.active",{opacity:"0.9"}),new ne(a,"."+t+"-item."+t+"-item-level-0 > a",{padding:"0","text-align":"center",overflow:"hidden"}),new ne(a,"."+t+"-item."+t+"-item-level-0:before",{display:"block"}),new ne(a,"."+t+"-item",{position:"relative",display:"block",opacity:"0","z-index":"1","border-radius":"3px","background-color":i.getFor("secondaryButton").hex,padding:"0",margin:"1px 1px 0 0",color:i.getFor("secondaryButton").alternative.hex,transition:"all 100ms ease-in-out, opacity 0.5s ease 0.5s"}),new ne(a,"."+t+"-left ."+t+"-item",{margin:"1px 0 0 1px"}),new ne(a,"."+t+"-item:hover, ."+t+"-item.active",{background:i.getFor("secondaryButtonHover").hex,color:i.getFor("secondaryButtonText").hex}),new ne(a,"."+t+"-item > ."+t+"-menu",{position:"absolute",top:"-1px",right:"0","margin-right":"100%"}),new ne(a,"."+t+"-left ."+t+"-item > ."+t+"-menu",{left:"0",right:"auto","margin-left":"100%","margin-right":"auto"}),new ne(a,"."+t+"-right ."+t+"-item > ."+t+"-menu",{left:"auto",right:"0","margin-left":"auto","margin-right":"100%"}),new ne(a,"."+t+"-top ."+t+"-item > ."+t+"-menu",{top:"-1px",bottom:"auto"}),new ne(a,"."+t+"-bottom ."+t+"-item > ."+t+"-menu",{top:"auto",bottom:"0"}),new ne(a,"."+t+"-item > ."+t+"-menu",{display:"none"}),new ne(a,"."+t+"-item:hover > ."+t+"-menu, ."+t+"-item.active > ."+t+"-menu",{display:"block"}),new ne(a,"."+t+"-item:hover > ."+t+"-menu > ."+t+"-item, ."+t+"-item.active > ."+t+"-menu > ."+t+"-item",{opacity:"1"}),new ne(a,"."+t+"-menu",{display:"block","list-style":"none",margin:"0",padding:"0"}),new ne(a,"."+t+"-label",{display:"block",cursor:"default",padding:"0.5em 1em"}),new ne(a,"."+t+"-icon",{display:"block",cursor:"default",padding:"0.2em 0.4em",width:"1.2em",height:"1.2em","min-width":"32px","min-height":"32px",margin:"auto auto","border-radius":"3px"}),new ne(a,"."+t+"-item-level-0 > ."+t+"-icon",{padding:"0.1em 0.2em"}),new ne(a,"."+t+"-clickable",{cursor:"pointer"})]);return new fa(function(){wb.removeKey(t),s.dispose()})});return r.increment()}var Nh=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._validateDisposer=null,t}return e.prototype.invalidate=function(){this._validateDisposer===null&&(this._validateDisposer=w.events.on("exitframe",this.validate,this))},e.prototype.validate=function(){this._validateDisposer!==null&&(this._validateDisposer.dispose(),this._validateDisposer=null)},e.prototype.dispose=function(){this._validateDisposer!==null&&(this._validateDisposer.dispose(),this._validateDisposer=null),a.prototype.dispose.call(this)},e})(fi);var fm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.adapter=new Ve(t),t.closeDelay=1e3,t.closeOnClick=!0,t._language=new ce,t._menuTag="ul",t._itemTag="li",t._labelTag="a",t._iconTag="img",t._classPrefix="amexport",t._defaultStyles=!0,t._align="right",t._verticalAlign="top",t._tabindex=0,t._ignoreNextClose=!1,t._items=[{label:"...",menu:[{label:"Image",menu:[{type:"png",label:"PNG"},{type:"jpg",label:"JPG"},{type:"svg",label:"SVG"},{type:"pdf",label:"PDF"}]},{label:"Data",menu:[{type:"json",label:"JSON"},{type:"csv",label:"CSV"},{type:"xlsx",label:"XLSX"},{type:"html",label:"HTML"},{type:"pdfdata",label:"PDF"}]},{label:"Print",type:"print"}]}],t.className="ExportMenu",t._disposers.push(t._language),t.invalidate(),t.applyTheme(),t}return e.prototype.validate=function(){this.draw(),a.prototype.validate.call(this)},e.prototype.draw=function(){var t=this;this._element?(this._element.innerHTML="",this._element.className=this.getMenuItemClass(0)):this._element=this.createMenuElement(0),this.defaultStyles&&(this._element.style.display="none"),ee(this._container).appendChild(this._element);for(var i=this.adapter.apply("items",{items:this._items}).items,r=i.length,s=0;s<r;s++)this.drawBranch(this._element,i[s],0);this._element=this.adapter.apply("menuElement",{menuElement:this._element}).menuElement,this._disposers.push(gt().body.events.on("down",function(o){o.pointer.touch||(t._ignoreNextClose=!1),t.close()})),this._disposers.push(gt().body.events.on("keydown",function(o){var n=ir.getEventKey(o.event);switch(n){case"esc":t.close();break;case"up":case"down":case"left":case"right":t._currentSelection&&o.event.preventDefault(),t.moveSelection(n);break}})),this.defaultStyles&&this.loadDefaultCSS()},e.prototype.drawBranch=function(t,i,r){var s=this;if(i=this.adapter.apply("branch",{branch:i,level:r}).branch,i.unsupported!==!0){i.ascendants||(i.ascendants=new wt);var o=i.type,n=this.createItemElement(r,o),l;i.icon?(l=this.createIconElement(r,o),l.src=i.icon,(i.label||i.title)&&(l.title=i.title||i.label)):i.svg?(l=this.createSvgElement(r,o,i.svg),(i.label||i.title)&&(l.title=i.title||i.label)):(l=this.createLabelElement(r,o),l.innerHTML=i.label?this.language.translate(i.label):"",i.title&&(l.title=i.title));var h=this.getReaderLabel(i,l.innerHTML);l.setAttribute("aria-label",h),n.appendChild(l),i.interactions=gt().getInteraction(n),i.element=n,this.typeClickable(o)&&(i.interactions.events.on("hit",function(m){if(s.events.isEnabled("hit")&&!s.isDisposed()){var y={type:"hit",event:m.event,target:s,branch:i};s.events.dispatchImmediately("hit",y)}}),i.interactions.events.on("keyup",function(m){if(ir.isKey(m.event,"enter")&&s.events.isEnabled("enter")){var y={type:"enter",event:m.event,target:s,branch:i};s.events.dispatchImmediately("enter",y)}}));{var u=this.getSubMenu(i);u!=null&&(i.interactions.events.on("keyup",function(m){ir.isKey(m.event,"enter")&&(s.selectBranch(u[0]),s.setFocus(u[0]))}),i.interactions.events.on("hit",function(m){s.selectBranch(i)}))}i.interactions.events.on("over",function(m){if(m.pointer.touch&&(s._ignoreNextClose=!0),s.selectBranch(i),s.events.isEnabled("over")){var y={type:"over",event:m.event,target:s,branch:i};s.events.dispatchImmediately("over",y)}}),i.interactions.events.on("out",function(m){if(!s.isDisposed()&&(m.pointer.touch||s.delayUnselectBranch(i),s.events.isEnabled("out"))){var y={type:"out",event:m.event,target:s,branch:i};s.events.dispatchImmediately("out",y)}}),i.interactions.events.on("focus",function(m){s.selectBranch(i)}),i.interactions.events.on("blur",function(m){s.delayUnselectBranch(i)});var p=r+1;if(i.menu){var d=this.createMenuElement(p);i.submenuElement=d;for(var c=i.menu.length,f=0;f<c;f++){var g=new wt;i.menu[f].ascendants=g,i.ascendants.length&&g.copyFrom(i.ascendants),g.push(i),this.drawBranch(d,i.menu[f],p)}if(d.innerHTML=="")return;n.appendChild(d)}i.hidden&&this.hideBranch(i),i.id&&n.setAttribute("id",i.id),i.color&&(n.style.backgroundColor=i.color.hex),t.appendChild(n)}},e.prototype.createMenuElement=function(t){var i=document.createElement(this.menuTag);return i.className=this.getMenuItemClass(t),t===0?i.setAttribute("role","menubar"):i.setAttribute("role","menu"),i},e.prototype.getMenuItemClass=function(t){var i=this.classPrefix+"-menu "+this.classPrefix+"-menu-level-"+t;return t===0&&(i+=" "+this.classPrefix+"-menu-root "+this.classPrefix+"-"+this.align+" "+this.classPrefix+"-"+this.verticalAlign),this.adapter.apply("menuClass",{className:i,level:t}).className},e.prototype.createItemElement=function(t,i){var r=document.createElement(this.itemTag),s=this.classPrefix+"-item "+this.classPrefix+"-item-level-"+t+" "+this.classPrefix+"-item-"+(i||"blank");return r.className=this.adapter.apply("itemClass",{className:s,level:t,type:i}).className,r.setAttribute("role","menuitem"),r.setAttribute("tabindex",this.tabindex.toString()),r},e.prototype.createLabelElement=function(t,i){var r=document.createElement(this.labelTag),s=this.classPrefix+"-label "+this.classPrefix+"-label-level-"+t+" "+this.classPrefix+"-item-"+(i||"blank");return this.typeClickable(i)&&(s+=" "+this.classPrefix+"-clickable"),r.className=this.adapter.apply("labelClass",{className:s,level:t,type:i}).className,r},e.prototype.createIconElement=function(t,i){var r=document.createElement(this.iconTag),s=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+t+" "+this.classPrefix+"-item-"+(i||"blank");return this.typeClickable(i)&&(s+=" "+this.classPrefix+"-clickable"),r.className=this.adapter.apply("labelClass",{className:s,level:t,type:i}).className,r.setAttribute("tabindex",this.tabindex.toString()),r.setAttribute("role","menuitem"),r},e.prototype.createSvgElement=function(t,i,r){var s=new DOMParser,o=s.parseFromString(r,"image/svg+xml").documentElement,n=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+t+" "+this.classPrefix+"-item-"+(i||"blank");return this.typeClickable(i)&&(n+=" "+this.classPrefix+"-clickable"),o.setAttribute("class",this.adapter.apply("labelClass",{className:n,level:t,type:i}).className),o.setAttribute("tabindex",this.tabindex.toString()),o.setAttribute("role","menuitem"),o},e.prototype.dispose=function(){this._disposed||(a.prototype.dispose.call(this),this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element))},e.prototype.typeClickable=function(t){return C(t)},e.prototype.hasSubMenu=function(t){return!!(t.menu&&t.menu.length)},e.prototype.getSubMenu=function(t){if(t.menu&&t.menu.length)return t.menu},e.prototype.getReaderLabel=function(t,i){return i=Sp(i),t.ascendants.length==0?(i=i=="..."?this.language.translate("Export"):i,i+=" ["+this.language.translate("Press ENTER or use arrow keys to navigate")+"]"):this.hasSubMenu(t)?i+=" ["+this.language.translate("Click, tap or press ENTER to open")+"]":t.type=="print"?i=this.language.translate("Click, tap or press ENTER to print."):this.typeClickable(t.type)&&(i=this.language.translate("Click, tap or press ENTER to export as %1.",void 0,i)),this.adapter.apply("rederLabel",{label:i,branch:t}).label},Object.defineProperty(e.prototype,"container",{get:function(){return this._container},set:function(t){this._container=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(t){this._items=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tag",{set:function(t){this._menuTag=t,this._itemTag=t=="ul"?"li":"div",this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuTag",{get:function(){return this.adapter.apply("menuTag",{tag:this._menuTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemTag",{get:function(){return this.adapter.apply("itemTag",{tag:this._itemTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelTag",{get:function(){return this.adapter.apply("labelTag",{tag:this._labelTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconTag",{get:function(){return this.adapter.apply("iconTag",{tag:this._iconTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this.adapter.apply("align",{align:this._align}).align},set:function(t){this._align=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalAlign",{get:function(){return this.adapter.apply("verticalAlign",{verticalAlign:this._verticalAlign}).verticalAlign},set:function(t){this._verticalAlign=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classPrefix",{get:function(){return this.adapter.apply("classPrefix",{classPrefix:this._classPrefix}).classPrefix},set:function(t){this._classPrefix=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultStyles",{get:function(){return this.adapter.apply("defaultStyles",{defaultStyles:this._defaultStyles}).defaultStyles},set:function(t){this._defaultStyles!=t&&(this._defaultStyles=t,t&&this.loadDefaultCSS()),this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.loadDefaultCSS=function(){this._disposers.push(Cb(dl(this.container),this.classPrefix)),this._element&&(this._element.style.display="")},Object.defineProperty(e.prototype,"tabindex",{get:function(){return this.adapter.apply("tabindex",{tabindex:this._tabindex}).tabindex},set:function(t){this._tabindex=t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){var t=this,i=this._language.get();return i==null&&(i=new er,this._language.set(i,i.events.on("localechanged",function(r){t.invalidate()}))),i},set:function(t){var i=this;this._language.set(t,t.events.on("localechanged",function(r){i.invalidate()})),this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(!this.isDisposed()){if(this._ignoreNextClose){this._ignoreNextClose=!1;return}if(this.closeOnClick&&(this._element.style.pointerEvents="none",setTimeout(function(){t._element.style.pointerEvents="auto"},100)),this._currentSelection&&(this.setBlur(this._currentSelection),this._currentSelection=void 0),this._element)for(var i=this._element.getElementsByClassName("active"),r=i.length,s=r-1;s>=0;s--)i[s]&&pl(i[s],"active");this.events.dispatchImmediately("closed",{type:"closed",target:this})}},e.prototype.selectBranch=function(t){var i=this;if(!this.isDisposed()&&(t.closeTimeout&&(this.removeDispose(t.closeTimeout),t.closeTimeout=void 0),ul(t.element,"active"),t.submenuElement&&t.submenuElement.setAttribute("aria-expanded","true"),this._currentSelection&&this._currentSelection!==t&&this._currentSelection.ascendants&&E(Jv(Vs([this._currentSelection]),this._currentSelection.ascendants.iterator()),function(s){!t.ascendants.contains(s)&&t!==s&&i.unselectBranch(s,!0)}),E(t.ascendants.iterator(),function(s){s.closeTimeout&&(i.removeDispose(s.closeTimeout),s.closeTimeout=void 0),ul(s.element,"active")}),this._currentSelection=t,this.events.isEnabled("branchselected"))){var r={type:"branchselected",target:this,branch:t};this.events.dispatchImmediately("branchselected",r)}},e.prototype.unselectBranch=function(t,i){if(!this.isDisposed()&&(pl(t.element,"active"),t.submenuElement&&t.submenuElement.removeAttribute("aria-expanded"),this._currentSelection==t&&(this._currentSelection=void 0),this.events.isEnabled("branchunselected"))){var r={type:"branchunselected",target:this,branch:t};this.events.dispatchImmediately("branchunselected",r)}},e.prototype.delayUnselectBranch=function(t,i){var r=this;this.isDisposed()||(t.closeTimeout&&(this.removeDispose(t.closeTimeout),t.closeTimeout=void 0),t.closeTimeout=this.setTimeout(function(){r.unselectBranch(t,i)},this.closeDelay),i!==!0&&t.ascendants&&E(t.ascendants.iterator(),function(s){r.delayUnselectBranch(s,!0)}))},e.prototype.moveSelection=function(t){if(!this.isDisposed()&&this._currentSelection){var i;if(t=="up")i=this.getPrevSibling(this._currentSelection);else if(t=="down")i=this.getNextSibling(this._currentSelection);else if(t=="left"&&this.align=="right"||t=="right"&&this.align=="left"){var r=this.getSubMenu(this._currentSelection);r!=null&&(i=r[0])}else(t=="right"&&this.align=="right"||t=="left"&&this.align=="left")&&(i=this.getParentItem(this._currentSelection));i&&i!==this._currentSelection&&(this.selectBranch(i),this.setFocus(i),this._currentSelection=i)}},e.prototype.getSiblings=function(t){var i=this.getParentItem(t);return i&&i.menu?i.menu:[]},e.prototype.getParentItem=function(t){if(t.ascendants&&t.ascendants.length)return t.ascendants.getIndex(t.ascendants.length-1)},e.prototype.getNextSibling=function(t){var i=this.getSiblings(t);if(i.length>1){var r=i.indexOf(t)+1;return r=i.length==r?0:r,i[r].unsupported?this.getNextSibling(i[r]):i[r]}else return t},e.prototype.getPrevSibling=function(t){var i=this.getSiblings(t);if(i.length>1){var r=i.indexOf(t)-1;return r=r==-1?i.length-1:r,i[r].unsupported?this.getPrevSibling(i[r]):i[r]}else return t},e.prototype.setFocus=function(t){if(t.interactions)try{t.interactions.element.focus()}catch{}},e.prototype.setBlur=function(t){if(t.interactions)try{t.interactions.element.blur()}catch{}},e.prototype.hideBranch=function(t){t.element.style.display="none"},e.prototype.showBranch=function(t){t.element.style.display=""},Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),e})(Nh);function bl(a,e,t){return new Promise(function(i,r){var s=C(t)&&t.responseType=="blob",o=new XMLHttpRequest;if(o.onload=function(){if(o.status===200){var h=void 0,u;if(s){u=o.response,WP(u).then(function(d){var c={xhr:o,error:!1,response:d,blob:u,type:o.getResponseHeader("Content-Type"),target:e};i(c)});return}else h=o.responseText||o.response;var p={xhr:o,error:!1,response:h,blob:u,type:o.getResponseHeader("Content-Type"),target:e};i(p)}else r({xhr:o,error:!0,type:o.getResponseHeader("Content-Type"),target:e})},o.onerror=function(){r({xhr:o,error:!0,type:o.getResponseHeader("Content-Type"),target:e})},o.open("GET",a,!0),t&&t.withCredentials&&(o.withCredentials=!0),C(t)){if(C(t.requestHeaders))for(var n=0;n<t.requestHeaders.length;n++){var l=t.requestHeaders[n];o.setRequestHeader(l.key,l.value)}C(t.responseType)&&(o.responseType=t.responseType)}o.send()})}function WP(a){return new Promise(function(e,t){var i=new FileReader;i.onload=function(r){e(i.result)},i.onerror=function(r){t(r)},i.readAsText(a)})}var gm;function GP(){return ut(this,void 0,void 0,function(){var a,e,t,i;return qt(this,function(r){switch(r.label){case 0:return[4,Promise.all([import("./YAVQSNZ6.js"),import("./DXMV5YU3.js")])];case 1:return a=r.sent(),e=a[0].default||a[0],t=a[1].default||a[1],i=window,i.pdfMake=i.pdfMake||{},i.pdfMake.vfs=t,e.vfs=t,[2,e]}})})}var Sb=/src: ([^;]+);/;function UP(){return window.navigator.msSaveOrOpenBlob!=null}function KP(a){return new Promise(function(e,t){var i=new FileReader;i.onload=function(r){e(i.result)},i.onerror=function(r){t(r)},i.readAsDataURL(a)})}function qP(a){return ut(this,void 0,void 0,function(){var e,t;return qt(this,function(i){switch(i.label){case 0:e=a.sheet,i.label=1;case 1:return i.trys.push([1,2,,4]),[2,e.cssRules];case 2:return t=i.sent(),[4,new Promise(function(r,s){a.addEventListener("load",function(){r(e.cssRules)},!0),a.addEventListener("error",function(o){s(o)},!0),setTimeout(function(){s(new Error("Timeout while waiting for <style> to load"))},1e4)})];case 3:return[2,i.sent()];case 4:return[2]}})})}function Tb(a,e,t){return ut(this,void 0,void 0,function(){var i,r,s,o;return qt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,bl(e)];case 1:return i=n.sent(),[3,3];case 2:return r=n.sent(),console.error("Failed to load stylesheet",e,r),[2];case 3:s=a.createElement("style"),s.textContent=i.response,$t.nonce!=""&&s.setAttribute("nonce",$t.nonce),a.head.appendChild(s),n.label=4;case 4:return n.trys.push([4,,7,8]),[4,qP(s)];case 5:return o=n.sent(),[4,Db(a,e,o,t)];case 6:return n.sent(),[3,8];case 7:return a.head.removeChild(s),[7];case 8:return[2]}})})}function Db(a,e,t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l;return qt(this,function(h){switch(h.label){case 0:for(r=[],s=t.length,o=0;o<s;o++)n=t[o],n.type===CSSRule.IMPORT_RULE?(l=n.href,l&&(l=Ch(e,l),r.push(Tb(a,l,i)))):i(e,n);return r.length?[4,Promise.all(r)]:[3,2];case 1:h.sent(),h.label=2;case 2:return[2]}})})}function ZP(a){return ut(this,void 0,void 0,function(){var e,t;return qt(this,function(i){switch(i.label){case 0:e=document.createElement("iframe"),e.src="about:blank",e.setAttribute("title",""),document.head.appendChild(e),i.label=1;case 1:return i.trys.push([1,,3,4]),t=e.contentDocument,[4,Promise.all(da(document.styleSheets,function(r){var s=r.href;return s==null?Db(t,location.href,r.cssRules,a):(s=Ch(location.href,s),Tb(t,s,a))}))];case 2:return i.sent(),[3,4];case 3:return document.head.removeChild(e),[7];case 4:return[2]}})})}var ym=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i.adapter=new Ve(i),i._formatOptions=new It,i._extraSprites=[],i._validateSprites=[],i.dataFieldsOrder=[],i._dynamicDataFields=!0,i._removedObjects=new wt,i._hiddenObjects=[],i._objectsAlreadyHidden=!1,i._filePrefix="amCharts",i.useWebFonts=!0,i.useRetina=!0,i.useSimplifiedExport=!0,i.timeoutDelay=2e3,i._exportRunning=!1,i._prevHasData=!1,i._container=t,i.className="Export",i._formatOptions.setKey("png",{}),i._formatOptions.setKey("jpg",{quality:.8}),i._formatOptions.setKey("gif",{}),i._formatOptions.setKey("svg",{}),i._formatOptions.setKey("pdf",{fontSize:14,imageFormat:"png",align:"left",addURL:!0,addColumnNames:!0}),i._formatOptions.setKey("json",{indent:2,useLocale:!0}),i._formatOptions.setKey("csv",{addColumnNames:!0,emptyAs:"",addBOM:!0}),i._formatOptions.setKey("xlsx",{addColumnNames:!0,useLocale:!0,emptyAs:""}),i._formatOptions.setKey("html",{addColumnNames:!0,emptyAs:""}),i._formatOptions.setKey("pdfdata",{fontSize:14,imageFormat:"png",addURL:!0,addColumnNames:!0,emptyAs:""}),i._formatOptions.setKey("print",{delay:500,printMethod:"iframe"}),i.adapter.add("options",function(r){var s=i._formatOptions.getKey(r.type);return r.options?r.options=yh(s,r.options):r.options=s,r}),i.applyTheme(),i.dispatchImmediately("inited"),i}return Object.defineProperty(e.prototype,"menu",{get:function(){return this._menu},set:function(t){var i=this;this._menu&&this.removeDispose(this._menu),this._menu=t,this._menu.container=this.container,this._menu.language=this._language,this._menu.adapter.add("branch",function(r){return r.branch.unsupported=!i.typeSupported(r.branch.type),r}),this._menu.events.on("hit",function(r){i.export(r.branch.type,r.branch.options),i.menu.close()}),this._menu.events.on("enter",function(r){i.export(r.branch.type,r.branch.options),i.menu.close()}),this._menu.events.on("over",function(r){i._disablePointers()}),this._menu.events.on("out",function(r){setTimeout(function(){i._releasePointers()},10)}),this.dispatchImmediately("menucreated"),this._menu.adapter.add("classPrefix",function(r){return r.classPrefix=$t.classNamePrefix+r.classPrefix,r}),this._disposers.push(this._menu)},enumerable:!0,configurable:!0}),e.prototype.typeSupported=function(t){var i=!0,r=this.getFormatOptions(t);return C(r)&&r.disabled?i=!1:t==="pdf"||(t==="xlsx"?i=!!this._hasData():(t=="print"&&!window.print||["json","csv","html","pdfdata"].indexOf(t)!==-1&&!this._hasData())&&(i=!1)),this.adapter.apply("supported",{supported:i,type:t}).supported},e.prototype._hasData=function(){return this.data&&this.data.length},e.prototype._getFunction=function(t){switch(t){case"png":case"gif":case"jpg":return this.getImage;case"svg":return this.getSVG;case"pdf":case"pdfdata":return this.getPDF;case"xlsx":return this.getExcel;case"csv":return this.getCSV;case"json":return this.getJSON;case"html":return this.getHTML;case"print":return this.getPrint;default:return this.unsupported}},e.prototype.export=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l,h=this;return qt(this,function(u){switch(u.label){case 0:return t=="custom"?(this.handleCustom(i),[2,!0]):(this._exportRunning=!0,this.events.isEnabled("exportstarted")&&(r={type:"exportstarted",target:this,format:t,options:i},this.events.dispatchImmediately("exportstarted",r)),this.showPreloader(),this.timeoutDelay&&(this.hideTimeout(),this._timeoutTimeout=this.setTimeout(function(){if(h.events.isEnabled("exporttimedout")){var p={type:"exporttimedout",target:h,format:t,options:i};h.events.dispatchImmediately("exporttimedout",p)}h.showTimeout()},this.timeoutDelay)),this.hideNonExportableSprites(),s=this._getFunction(t),i=this.adapter.apply("options",{options:i,type:t}).options,s=this.adapter.apply("exportFunction",{func:s,type:t,options:i}).func,[4,s.call(this,t,i)]);case 1:return o=u.sent(),this._exportRunning=!1,this._releasePointers(),this.restoreNonExportableSprites(),o?(this.events.isEnabled("exportfinished")&&(n={type:"exportfinished",target:this,format:t,options:i},this.events.dispatchImmediately("exportfinished",n)),this.hidePreloader(),this.hideTimeout(),this.menu&&this.menu.close(),t==="print"?[2,this.print(o,i,this.adapter.apply("title",{title:this.title,options:i}).title)]:t=="pdfdata"?[2,this.download(o,this.filePrefix+".pdf")]:[2,this.download(o,this.filePrefix+"."+t,i&&i.addBOM)]):(this.events.isEnabled("error")&&(l={type:"error",target:this,format:t,options:i},this.events.dispatchImmediately("error",l)),[2,!1])}})})},e.prototype.unsupported=function(t,i){return ut(this,void 0,void 0,function(){return qt(this,function(r){return[2,""]})})},e.prototype.handleCustom=function(t){C(t)&&C(t.callback)&&t.callback.call(t.callbackTarget||this,t)},e.prototype.getPrint=function(t,i){return ut(this,void 0,void 0,function(){return qt(this,function(r){return[2,this.getImage("png",i)]})})},e.prototype.getFontFamilies=function(){return ut(this,void 0,void 0,function(){var t,i,r,s,o=this;return qt(this,function(n){switch(n.label){case 0:return t=this.getDOMURL(),i=[],r=[],[4,ZP(function(l,h){if(h.type===CSSRule.FONT_FACE_RULE){var u=h.cssText,p=Sb.exec(u);if(p!==null){var d=p[1].split(/ *, */).map(function(c){return ut(o,void 0,void 0,function(){var f,g,m,y,v,x;return qt(this,function(_){switch(_.label){case 0:return f=/^url\(["']?([^"'\)]+)["']?\)([^,]*)$/.exec(c),f!==null?[3,1]:[2,c];case 1:if(g=f[2],m=Ch(l,f[1]),this.webFontFilter&&!m.match(this.webFontFilter))return[2,null];_.label=2;case 2:return _.trys.push([2,7,,8]),[4,bl(m,void 0,{responseType:"blob"})];case 3:return y=_.sent(),UP()?(v=t.createObjectURL(y.blob),i.push(v),[3,6]):[3,4];case 4:return[4,KP(y.blob)];case 5:v=_.sent(),_.label=6;case 6:return[2,'url("'+v+'")'+g];case 7:return x=_.sent(),console.error("Failed to load font",m,x),[2,null];case 8:return[2]}})})});r.push(Promise.all(d).then(function(c){return c=c.filter(function(f){return f!=null}),c.length===0?"":u.replace(Sb,"src: "+c.join(", ")+";")}))}}})];case 1:return n.sent(),[4,Promise.all(r)];case 2:return s=n.sent(),[2,{blobs:i,cssText:s.filter(function(l){return!!l}).join(`
4
+ `)}]}})})},e.prototype.getImage=function(t,i,r){return ut(this,void 0,void 0,function(){var s,o,n,l,h,u,u;return qt(this,function(p){switch(p.label){case 0:return s=this._objectsAlreadyHidden,s||this.hideNonExportableSprites(),C(i)||(i=this.getFormatOptions(t)),[4,this.awaitValidSprites()];case 1:return p.sent(),[4,this.simplifiedImageExport()];case 2:if(!p.sent())return[3,10];o=void 0,p.label=3;case 3:return p.trys.push([3,7,,9]),[4,this.getCanvas(i)];case 4:return o=p.sent(),r===!1?[3,6]:[4,this.addExtras(o,i)];case 5:n=p.sent(),this.disposeCanvas(o),o=n,p.label=6;case 6:return l=o.toDataURL(this.getContentType(t),i.quality),this.disposeCanvas(o),s||this.restoreNonExportableSprites(),[2,l];case 7:return h=p.sent(),console.error(h.message+`
5
+ `+h.stack),yl("Simple export failed, falling back to advanced export"),o&&this.disposeCanvas(o),[4,this.getImageAdvanced(t,i,r)];case 8:return u=p.sent(),s||this.restoreNonExportableSprites(),[2,u];case 9:return[3,12];case 10:return[4,this.getImageAdvanced(t,i,r)];case 11:return u=p.sent(),s||this.restoreNonExportableSprites(),[2,u];case 12:return[2]}})})},e.prototype.addExtras=function(t,i,r){return ut(this,void 0,void 0,function(){var s,o,n,l,h,u,p,d,c,f,g,m,y,v,x=this;return qt(this,function(_){switch(_.label){case 0:return this.extraSprites.length?(s=0,o=0,n=t.width,l=t.height,h=0,u=0,[4,Promise.all(da(this.extraSprites,function($){return ut(x,void 0,void 0,function(){var T,S,k,A;return qt(this,function(L){switch(L.label){case 0:return $ instanceof rt?T={sprite:$,position:"bottom"}:T=$,T.position=T.position||"bottom",T.marginTop=T.marginTop||0,T.marginRight=T.marginRight||0,T.marginBottom=T.marginBottom||0,T.marginLeft=T.marginLeft||0,r?[4,T.sprite.exporting.getCanvasAdvanced(i)]:[3,2];case 1:return S=L.sent(),[3,4];case 2:return[4,T.sprite.exporting.getCanvas(i)];case 3:S=L.sent(),L.label=4;case 4:return k=S.width+T.marginLeft+T.marginRight,A=S.height+T.marginTop+T.marginBottom,T.position=="top"?(n=T.crop?l:mt(n,k),o+=A):T.position=="right"?(l=T.crop?l:mt(l,A),h+=k):T.position=="left"?(l=T.crop?l:mt(l,A),s+=k):T.position==="bottom"&&(n=T.crop?l:mt(n,k),u+=A),[2,{canvas:S,position:T.position,left:T.marginLeft,top:T.marginTop,width:k,height:A}]}})})}))]):[3,2];case 1:return p=_.sent(),d=this.getDisposableCanvas(),d.width=s+n+h,d.height=o+l+u,c=d.getContext("2d"),f=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),f&&(c.fillStyle=f.toString(),c.fillRect(0,0,d.width,d.height)),g=s,m=o,y=g+n,v=m+l,W(p,function($){$.position=="top"?(m-=$.height,c.drawImage($.canvas,s+$.left,m+$.top)):$.position=="right"?(c.drawImage($.canvas,y+$.left,o+$.top),y+=$.width):$.position=="left"?(g-=$.width,c.drawImage($.canvas,g+$.left,o+$.top)):$.position==="bottom"&&(c.drawImage($.canvas,s+$.left,v+$.top),v+=$.height),x.disposeCanvas($.canvas)}),c.drawImage(t,s,o),[2,d];case 2:return[2,t]}})})},e.prototype.getCanvas=function(t){return ut(this,void 0,void 0,function(){var i,r,s,o,n,l,h,u,p,d,c,f,g,m,y,v,x;return qt(this,function(_){switch(_.label){case 0:C(t)||(t={}),i=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),r=this.getDOMURL(),s=null,o=null,_.label=1;case 1:return _.trys.push([1,,4,5]),l=this.sprite.pixelWidth,h=this.sprite.pixelHeight,u=Th(this.sprite.dom),p=Dh(this.sprite.dom),d=t.scale||1,c=this.getPixelRatio(t),d=this.getAdjustedScale(l*c,h*c,d,t),n=this.getDisposableCanvas(),n.style.width=l*d+"px",n.style.height=h*d+"px",n.width=l*d,n.height=h*d,f=n.getContext("2d"),i&&(f.fillStyle=i.toString(),f.fillRect(0,0,l*d,h*d)),g=[],this.useWebFonts&&g.push(this.getFontFamilies().then(function($){return o=$.blobs,$.cssText})),g.push(this.imagesToDataURI(this.sprite.dom,t)),g.push(this.prepForeignObjects(this.sprite.dom,t)),[4,Promise.all(g)];case 2:return m=_.sent(),y=this.normalizeSVG("<style>"+m[0]+"</style>"+this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),t,l,h,d,u,p),v=new Blob([y],{type:"image/svg+xml"}),s=r.createObjectURL(v),[4,this.loadNewImage(s,l*d*c,h*d*c,"anonymous")];case 3:return x=_.sent(),f.drawImage(x,0,0),[3,5];case 4:return s!==null&&r.revokeObjectURL(s),o!==null&&W(o,function($){r.revokeObjectURL($)}),this.restoreRemovedObjects(),[7];case 5:return[2,n]}})})},e.prototype.getCanvasAdvanced=function(t){return ut(this,void 0,void 0,function(){var i,r,s,o,n,l,h,u,p,d,c;return qt(this,function(f){switch(f.label){case 0:return C(t)||(t={}),[4,this.imagesToDataURI(this.sprite.dom,t)];case 1:return f.sent(),i=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),[4,this.canvg];case 2:return r=f.sent(),s=this.sprite.pixelWidth,o=this.sprite.pixelHeight,n=Th(this.sprite.dom),l=Dh(this.sprite.dom),h=t.scale||1,u=this.getPixelRatio(t),h=this.getAdjustedScale(s*u,o*u,h,t),p=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),t,s,o,h,n,l,i),d=this.getDisposableCanvas(),d.style.width=s*u*h+"px",d.style.height=o*u*h+"px",d.width=s*u*h,d.height=o*u*h,c={useCORS:!0},u!=1&&(c.ignoreDimensions=!0,c.scaleWidth=s*u*h,c.scaleHeight=o*u*h),[4,r.fromString(d.getContext("2d"),p,c).render()];case 3:return f.sent(),[2,d]}})})},e.prototype.getImageAdvanced=function(t,i,r){return ut(this,void 0,void 0,function(){var s,o,n;return qt(this,function(l){switch(l.label){case 0:return s=this._objectsAlreadyHidden,s||this.hideNonExportableSprites(),C(i)||(i=this.getFormatOptions(t)),[4,this.getCanvasAdvanced(i)];case 1:return o=l.sent(),r===!1?[3,3]:[4,this.addExtras(o,i,!0)];case 2:o=l.sent(),l.label=3;case 3:return n=o.toDataURL(this.getContentType(t),i.quality),this.disposeCanvas(o),s||this.restoreNonExportableSprites(),[2,n]}})})},e.prototype.getDisposableCanvas=function(){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="-10000px",document.body.appendChild(t),t},e.prototype.disposeCanvas=function(t){document.body.contains(t)&&document.body.removeChild(t)},e.prototype.getPixelRatio=function(t){return this.useRetina?Of():1},e.prototype.getAdjustedScale=function(t,i,r,s){if(!s)return r;var o=t*r,n=t*r,l,h;return s.maxWidth&&o>s.maxWidth&&(l=s.maxWidth/t),s.maxHeight&&n>s.maxHeight&&(h=s.maxHeight/i),l||h?Pt(l,h):(s.minWidth&&o<s.minWidth&&(l=s.minWidth/t),s.minHeight&&n<s.minHeight&&(h=s.minHeight/i),l||h?mt(l,h):r)},e.prototype.imagesToDataURI=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l,h;return qt(this,function(u){switch(u.label){case 0:if(r=t.querySelectorAll("image"),!r.length)return[3,2];for(s=[],o=r.length,n=0;n<o;n++)l=r[n],h=l.getAttributeNS(e.XLINK,"href"),h&&(h.indexOf("data:image")!==-1||(h.indexOf(".svg")!==-1?s.push(this.svgToDataURI(l,i)):s.push(this.imageToDataURI(l,i))));return[4,Promise.all(s)];case 1:return u.sent(),[2];case 2:return[2]}})})},e.prototype.prepForeignObjects=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o;return qt(this,function(n){if(r=t.querySelectorAll("foreignObject"),r.length)for(s=r.length,o=0;o<s;o++)this.temporarilyRemoveObject(r[o]);return[2]})})},e.prototype.imageToDataURI=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n;return qt(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,this.loadNewImage(t.getAttributeNS(e.XLINK,"href"),null,null,"anonymous")];case 1:r=l.sent(),s=document.createElement("canvas"),s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0);try{return o=s.toDataURL(),t.setAttribute("href",o),[2,o]}catch{return i.keepTainted!==!1&&this.temporarilyRemoveObject(t),[2,void 0]}return[3,3];case 2:return n=l.sent(),(!i||i.keepTainted!==!1)&&this.temporarilyRemoveObject(t),[2,void 0];case 3:return[2]}})})},e.prototype.svgToDataURI=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l;return qt(this,function(h){switch(h.label){case 0:r=t.getAttributeNS(e.XLINK,"href"),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,bl(r)];case 2:return s=h.sent(),o=this.adapter.apply("charset",{charset:"base64",type:"svg",options:i}).charset,n=this.adapter.apply("svgToDataURI",{data:"data:"+this.getContentType("svg")+";"+o+","+btoa(s.response),options:i}).data,t.setAttributeNS(e.XLINK,"href",n),[2,n];case 3:return l=h.sent(),(!i||i.keepTainted!==!1)&&this.temporarilyRemoveObject(t),[2,void 0];case 4:return[2]}})})},e.prototype.temporarilyRemoveObject=function(t,i){var r=t.parentElement||t.parentNode;i||(i=this.sprite.paper.add("g").node),r.insertBefore(i,t),t.textContent,r.removeChild(t),this._removedObjects.push({element:t,placeholder:i})},e.prototype.restoreRemovedObjects=function(){for(var t;t=this._removedObjects.pop(),!!t;){var i=t.placeholder.parentElement||t.placeholder.parentNode;i.insertBefore(t.element,t.placeholder)}},e.prototype.simplifiedImageExport=function(){return ut(this,void 0,void 0,function(){var t,i,r,s,o,n,l,h,u;return qt(this,function(p){switch(p.label){case 0:if(this.useSimplifiedExport===!1)return[2,!1];if(t=w.getCache("simplifiedImageExport"),t===!1||t===!0)return[2,t];p.label=1;case 1:p.trys.push([1,6,,7]),i=document.createElement("canvas"),i.width=1,i.height=1,r=i.getContext("2d"),s=this.getDOMURL(),o=new Blob([this.normalizeSVG("<g></g>",{},1,1)],{type:"image/svg+xml"}),n=s.createObjectURL(o),l=void 0,p.label=2;case 2:return p.trys.push([2,4,,5]),[4,this.loadNewImage(n,1,1)];case 3:return l=p.sent(),[3,5];case 4:return h=p.sent(),[2,!1];case 5:r.drawImage(l,0,0),s.revokeObjectURL(n);try{return w.setCache("simplifiedImageExport",!0),[2,!0]}catch{return w.setCache("simplifiedImageExport",!1),[2,!1]}return[3,7];case 6:return u=p.sent(),w.setCache("simplifiedImageExport",!1),[2,!1];case 7:return[2]}})})},e.prototype.loadNewImage=function(t,i,r,s){return new Promise(function(o,n){var l;i&&r?l=new Image(i,r):l=new Image,s&&l.setAttribute("crossOrigin",s),l.onload=function(){o(l)};function h(){if(s){var u=l.src;l.onerror=function(){n(new Error('Loading image "'+t+'" failed'))},l.removeAttribute("crossorigin"),l.src="",l.src=u}else n(new Error('Loading image "'+t+'" failed'))}l.onabort=h,l.onerror=h,l.src=t})},e.prototype.getDOMURL=function(){return self.URL||self.webkitURL||self},e.prototype.getSVG=function(t,i,r){return r===void 0&&(r=!0),ut(this,void 0,void 0,function(){var s,o,n,l,h,u,p,d,c,f;return qt(this,function(g){switch(g.label){case 0:return s=this._objectsAlreadyHidden,s||this.hideNonExportableSprites(),C(i)||(i=this.getFormatOptions("svg")),[4,this.awaitValidSprites()];case 1:return g.sent(),o=this.sprite.pixelWidth,n=this.sprite.pixelHeight,l=Th(this.sprite.dom),h=Dh(this.sprite.dom),u=i.scale||1,p=this.getPixelRatio(i),u=this.getAdjustedScale(o*p,n*p,u,i),d=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),i,o,n,u,l,h),c=this.adapter.apply("charset",{charset:"charset=utf-8",type:"svg",options:i}).charset,f=this.adapter.apply("getSVG",{data:r?"data:"+this.getContentType(t)+";"+c+","+encodeURIComponent(d):d,options:i}).data,s||this.restoreNonExportableSprites(),[2,f]}})})},e.prototype.normalizeSVG=function(t,i,r,s,o,n,l,h){var u="";r&&(u+='width="'+Math.round(r*(o||1))+'px" '),s&&(u+='height="'+Math.round(s*(o||1))+'px" ');var p="";n&&(p+="font-family: "+n.replace(/"/g,"")+";"),l&&(p+="font-size: "+l+";"),o&&(u+='viewBox="0 0 '+r+" "+s+'" ');var d=[],c=t.match(/<foreignObject[\s\S]*<\/foreignObject>/gi);if(c)for(var f=0;f<c.length;f++)t=t.replace(c[f],_i),d.push(c[f]);t.match(/<svg/)?u!==""&&(t=t.replace(/(<svg[^>]*)width="[^"]*"/,"$1"),t=t.replace(/(<svg[^>]*)height="[^"]*"/,"$1"),t=t.replace(/(<svg)/,"$1"+u)):t='<?xml version="1.0" encoding="utf-8"?><svg '+u+' style="'+p+'" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t+"</svg>",h&&(t=t.replace(/(<svg[^>]*>)/,'$1<rect width="100%" height="100%" fill="'+h.rgba+'"/>')),nb()&&(t=t.replace(/<feColorMatrix [^\/>]*\/>/gi,""));var g=new RegExp("url\\("+il(Xa()),"g");if(t=t.replace(g,"url(#"),t=t.replace(/url\(&quot;([^)]*)&quot;\)/gm,"url($1)"),d.length)for(var f=0;f<d.length;f++)t=t.replace(_i,d[f]);return t=this.adapter.apply("normalizeSVG",{data:t,options:i}).data,t},e.prototype.serializeElement=function(t){return new XMLSerializer().serializeToString(t)},e.prototype.getPDF=function(t,i){return ut(this,void 0,void 0,function(){function r(m){var y={};y.normal=m.normal.path,g[m.normal.path]=m.normal.bytes,m.bold?(y.bold=m.bold.path,g[m.bold.path]=m.bold.bytes):y.bold=m.normal.path,m.italics?(y.italics=m.italics.path,g[m.italics.path]=m.italics.bytes):y.italics=m.normal.path,m.bolditalics?(y.bolditalics=m.bolditalics.path,g[m.bolditalics.path]=m.bolditalics.bytes):y.bolditalics=m.normal.path,f[m.name]=y}var s,o,n,l,h,u,p,d,c,f,g;return qt(this,function(m){switch(m.label){case 0:return[4,this.getImage(i.imageFormat||"png",i)];case 1:return s=m.sent(),[4,this.pdfmake];case 2:return o=m.sent(),n=[30,30,30,30],l={pageSize:i.pageSize||"A4",pageOrientation:i.pageOrientation||"portrait",pageMargins:i.pageMargins||n,defaultStyle:{font:i.font?i.font.name:void 0},content:[]},h=this.adapter.apply("title",{title:this.title,options:i}).title,u=0,h&&(l.content.push({text:h,fontSize:i.fontSize||14,bold:!0,margin:[0,0,0,15]}),u+=50),i.addURL&&(l.content.push({text:this.language.translate("Saved from")+": "+document.location.href,fontSize:i.fontSize,margin:[0,0,0,15]}),u+=50),t!="pdfdata"&&l.content.push({image:s,alignment:i.align||"left",fit:this.getPageSizeFit(l.pageSize,l.pageMargins,u)}),t=="pdfdata"||i.addData?(d=(p=l.content).push,c={},[4,this.getPDFData("pdf",i)]):[3,4];case 3:d.apply(p,[(c.table=m.sent(),c.fontSize=i.fontSize||14,c)]),m.label=4;case 4:return l=this.adapter.apply("pdfmakeDocument",{doc:l,options:i}).doc,f=null,g=null,i.font&&(f={},g={},r(i.font),i.extraFonts&&W(i.extraFonts,r)),[4,new Promise(function(y,v){o.createPdf(l,null,f,g).getDataUrl(function(x){y(x)})})];case 5:return[2,m.sent()]}})})},e.prototype.getPDFData=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l,h,u=this;return qt(this,function(p){if(r={body:[]},s=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"pdf"}).dataFields,o=this.data,i.pivot)n=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder,ys(s,function(d,c){var f=[];i.addColumnNames&&f.push(c);for(var g=o.length,m=0;m<g;m++){var y=o[m][d];f.push(u.convertToSpecialFormat(d,y,i,!0))}r.body.push(u.getPDFDataRow(f,i,void 0,!0))},function(d,c){var f=n.indexOf(d),g=n.indexOf(c);return f>g?1:f<g?-1:0});else for(i.addColumnNames&&(r.body.push(this.getPDFDataRow(s,i,void 0,!0)),r.headerRows=1),l=o.length,h=0;h<l;h++)r.body.push(this.getPDFDataRow(o[h],i,s));return[2,this.adapter.apply("pdfmakeTable",{table:r,options:i}).table]})})},e.prototype.getPDFDataRow=function(t,i,r,s){var o=this;s===void 0&&(s=!1);var n=[];r||(r=t);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder;return ys(r,function(h,u){var p=o.convertEmptyValue(h,t[h],i),d=s?p:o.convertToSpecialFormat(h,p,i);d=""+d,n.push(d)},function(h,u){var p=l.indexOf(h),d=l.indexOf(u);return p>d?1:p<d?-1:0}),n},e.prototype.getPageSizeFit=function(t,i,r){r===void 0&&(r=0);var s=[0,0,0,0];typeof i=="number"?s=[i,i,i,i]:i.length==2?s=[i[0],i[1],i[0],i[1]]:i.length==4&&(s=i);var o={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},n=o[t];return n[0]-=s[0]+s[2],n[1]-=s[1]+s[3]+r,n},e.prototype.getExcel=function(t,i){return ut(this,void 0,void 0,function(){var r,s,o,n,l,h,u,p,d,c,f=this;return qt(this,function(g){switch(g.label){case 0:return C(i)||(i=this.getFormatOptions("xlsx")),[4,this.xlsx];case 1:if(r=g.sent(),s=this.adapter.apply("xlsxWorkbookOptions",{xlsx:r,options:{bookType:"xlsx",bookSST:!1,type:"base64"}}).options,o=this.normalizeExcelSheetName(this.adapter.apply("xlsxSheetName",{xlsx:r,name:this.title||this.language.translate("Data")}).name),n={SheetNames:[o],Sheets:{}},l=[],h=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"xslx"}).dataFields,i.pivot)u=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder,ys(h,function(m,y){var v=[];i.addColumnNames&&v.push(y);for(var x=f.data.length,_=0;_<x;_++){var $=f.data[_][m];v.push(f.convertToSpecialFormat(m,$,i,!0))}l.push(f.getExcelRow(v,i,void 0,!0))},function(m,y){var v=u.indexOf(m),x=u.indexOf(y);return v>x?1:v<x?-1:0});else for(i.addColumnNames&&l.push(this.getExcelRow(h,i,void 0,!0)),p=this.data.length,d=0;d<p;d++)l.push(this.getExcelRow(this.data[d],i,h));return n.Sheets[o]=r.utils.aoa_to_sheet(l),n=this.adapter.apply("xlsxWorkbook",{xlsx:r,workbook:n,options:i}).workbook,c=this.adapter.apply("getExcel",{data:"data:"+this.getContentType(t)+";base64,"+r.write(n,s),options:i}).data,[2,c]}})})},e.prototype.normalizeExcelSheetName=function(t){return t=t.replace(/([:\\\/?*\[\]]+)/g," "),rl(t,31,"...",!0)},e.prototype.getExcelRow=function(t,i,r,s){var o=this;s===void 0&&(s=!1);var n=[];r||(r=t);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder;return ys(r,function(h,u){var p=o.convertEmptyValue(h,t[h],i),d=s?p:o.convertToSpecialFormat(h,p,i,!0);n.push(d)},function(h,u){var p=l.indexOf(h),d=l.indexOf(u);return p>d?1:p<d?-1:0}),n},e.prototype.getCSV=function(t,i,r){return r===void 0&&(r=!0),ut(this,void 0,void 0,function(){var s,o,n,l,h,u,p,d,c,f,g=this;return qt(this,function(m){if(C(i)||(i=this.getFormatOptions("csv")),s="",o=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"csv"}).dataFields,n="",l=this.data,i.pivot)h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder,ys(o,function(y,v){var x=[];i.addColumnNames&&x.push(v);for(var _=l.length,$=0;$<_;$++){var T=l[$][y];x.push(g.convertToSpecialFormat(y,T,i,!0))}s+=n+g.getCSVRow(x,i,void 0,!0),n=`
6
+ `},function(y,v){var x=h.indexOf(y),_=h.indexOf(v);return x>_?-1:x<_?1:0});else{for(u=l.length,p=0;p<u;p++)d=this.getCSVRow(l[p],i,o),i.reverse?s=d+n+s:s+=n+d,n=`
7
+ `;i.addColumnNames&&(s=this.getCSVRow(o,i,void 0,!0)+n+s)}return c=this.adapter.apply("charset",{charset:"charset=utf-8",type:t,options:i}).charset,f=this.adapter.apply("getCSV",{data:r?"data:"+this.getContentType(t)+";"+c+","+encodeURIComponent(s):s,options:i}).data,[2,f]})})},e.prototype.getCSVRow=function(t,i,r,s){var o=this;s===void 0&&(s=!1);var n=i.separator||",",l=[];r||(r=t);var h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder;return ys(r,function(u,p){var d=o.convertEmptyValue(u,t[u],i),c=s?d:o.convertToSpecialFormat(u,d,i);c=""+c,c=c.replace(/"/g,'""'),(i.forceQuotes||c.search(new RegExp(`"|
8
+ |`+n,"g"))>=0)&&(c='"'+c+'"'),l.push(c)},function(u,p){var d=h.indexOf(u),c=h.indexOf(p);return d>c?1:d<c?-1:0}),l.join(n)},e.prototype.getHTML=function(t,i,r){return r===void 0&&(r=!0),ut(this,void 0,void 0,function(){var s,o,n,l,h,u,p,d,c=this;return qt(this,function(f){if(C(i)||(i=this.getFormatOptions("html")),s="<table>",i.tableClass&&(s='<table class="'+i.tableClass+'">'),o=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"html"}).dataFields,n=this.data,i.pivot)l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,s+=`
9
+ <tbody>`,ys(o,function(g,m){var y=[];i.addColumnNames&&y.push(m);for(var v=n.length,x=0;x<v;x++){var _=n[x][g];y.push(c.convertToSpecialFormat(g,_,i,!0))}s+=`
10
+ `+c.getHTMLRow(y,i,void 0,!0)},function(g,m){var y=l.indexOf(g),v=l.indexOf(m);return y>v?-1:y<v?1:0}),s+=`
11
+ </tbody>`;else{for(i.addColumnNames&&(s+=`
12
+ <thead>
13
+ `+this.getHTMLRow(o,i,void 0,!0,!0)+`
14
+ </thead>`),s+=`
15
+ <tbody>`,h=n.length,u=0;u<h;u++)s+=`
16
+ `+this.getHTMLRow(n[u],i,o);s+=`
17
+ </tbody>`}return s+=`
18
+ </table>`,p=this.adapter.apply("charset",{charset:"charset=utf-8",type:t,options:i}).charset,d=this.adapter.apply("getHTML",{data:r?"data:"+this.getContentType(t)+";"+p+","+encodeURIComponent(s):s,options:i}).data,[2,d]})})},e.prototype.getHTMLRow=function(t,i,r,s,o){var n=this;s===void 0&&(s=!1),o===void 0&&(o=!1);var l=" <tr>";i.rowClass&&(l=' <tr class="'+i.rowClass+'">'),r||(r=t);var h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,u=o?"th":"td",p=!0;return ys(r,function(d,c){var f=n.convertEmptyValue(d,t[d],i),g=s?f:n.convertToSpecialFormat(d,f,i);g=""+g,g=g.replace(/[\u00A0-\u9999<>\&]/gim,function(y){return"&#"+y.charCodeAt(0)+";"});var m=u;i.pivot&&p&&(m="th"),i.cellClass?l+=`
19
+ <`+m+' class="'+i.cellClass+'">'+g+"</"+m+">":l+=`
20
+ <`+m+">"+g+"</"+m+">",p=!1},function(d,c){var f=h.indexOf(d),g=h.indexOf(c);return f>g?1:f<g?-1:0}),l+=`
21
+ </tr>`,l},e.prototype.getJSON=function(t,i,r){return r===void 0&&(r=!0),ut(this,void 0,void 0,function(){var s,o,n,l,h,u,p,d,c,f=this;return qt(this,function(g){if(C(i)||(i=this.getFormatOptions("json")),o=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"json"}).dataFields,this._dynamicDataFields)s=this.data;else for(s=[],n=this.data,l=function(m,y){var v=n[y];if(typeof v=="object"){var x={};at(v,function(_,$){C(o[_])&&(x[o[_]]=f.convertToSpecialFormat(_,$,i))}),s.push(x)}},h=n.length,u=0;u<h;u++)l(h,u);return p=JSON.stringify(s,function(m,y){return typeof y=="object"&&at(y,function(v,x){y[v]=f.convertToSpecialFormat(v,x,i)}),y},i.indent),d=this.adapter.apply("charset",{charset:"charset=utf-8",type:t,options:i}).charset,c=this.adapter.apply("getJSON",{data:r?"data:"+this.getContentType(t)+";"+d+","+encodeURIComponent(p):p,options:i}).data,[2,c]})})},e.prototype.convertToSpecialFormat=function(t,i,r,s){if(typeof i=="number")if(this.isDateField(t))i=new Date(i);else{if(this.isDurationField(t))return this.durationFormatter.format(i,this.durationFormat);if(this.isNumberField(t)&&this.numberFormat)return this.numberFormatter.format(i,this.numberFormat)}return i instanceof Date?r.useTimestamps?i=i.getTime():r.useLocale?s||(i=i.toLocaleString()):i=this.dateFormatter.format(i,this.dateFormat):vt(i)&&this.isDateField(t)&&this.dateFormat&&(i=this.dateFormatter.format(this.dateFormatter.parse(i),this.dateFormat)),i},e.prototype.convertEmptyValue=function(t,i,r){return C(i)?i:r.emptyAs},e.prototype.download=function(t,i,r){return r===void 0&&(r=!1),ut(this,void 0,void 0,function(){var m,y,n,s,u,p,d,c,o,m,y,n,l,h,u,p,d,c,f,g,m,y,v,x;return qt(this,function(_){if(this.msBlobDownloadSupport()){if(m=t.split(";"),y=m.shift().replace(/data:/,""),t=decodeURIComponent(m.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv"].indexOf(y)==-1)try{n=atob(t),t=n}catch{return[2,!1]}else return s=new Blob([t],{type:y}),window.navigator.msSaveBlob(s,i),[2,!0];for(u=new Array(t.length),p=0;p<t.length;++p)d=t.charCodeAt(p),u[p]=d;c=new Blob([new Uint8Array(u)],{type:y}),window.navigator.msSaveBlob(c,i)}else if(this.blobDownloadSupport()){if(o=document.createElement("a"),o.download=i,document.body.appendChild(o),m=t.split(";"),y=m.shift().replace(/data:/,""),t=decodeURIComponent(m.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(y)==-1)try{n=atob(t),t=n}catch{return[2,!1]}else return r&&(t="\uFEFF"+t),l=new Blob([t],{type:y}),h=window.URL.createObjectURL(l),o.href=h,o.download=i,o.click(),setTimeout(function(){document.body.removeChild(o),window.URL.revokeObjectURL(h)},100),[2,!0];for(u=new Array(t.length),p=0;p<t.length;++p)d=t.charCodeAt(p),u[p]=d;r&&(u=[239,187,191].concat(u)),c=new Blob([new Uint8Array(u)],{type:y}),f=window.URL.createObjectURL(c),o.href=f,o.download=i,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(function(){window.URL.revokeObjectURL(f)},100)}else this.linkDownloadSupport()?(g=document.createElement("a"),g.download=i,g.href=t,document.body.appendChild(g),g.click(),document.body.removeChild(g)):this.legacyIE()?(m=t.match(/^data:(.*);[ ]*([^,]*),(.*)$/),m.length===4&&(m[2]=="base64"?m[1].match(/^image\//)&&this.showModal('<img src="'+t+'" style="float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;" /><p>'+this.language.translate('To save the image, right-click thumbnail on the left and choose "Save picture as..."')+'</p><p style="text-align: center;"><small>'+this.language.translate("(Press ESC to close this message)")+"</small></p>",this.language.translate("Image Export Complete")):(y=void 0,i.match(/\.svg$/)?y="image/svg+xml":(y="text/plain",i+=".txt"),v=document.createElement("iframe"),v.width="1px",v.height="1px",v.style.display="none",document.body.appendChild(v),x=v.contentDocument,x.open(y,"replace"),x.write(decodeURIComponent(m[3])),x.close(),x.execCommand("SaveAs",!0,i),document.body.removeChild(v)))):window.location.href=t;return[2,!0]})})},e.prototype.downloadSupport=function(){return this.linkDownloadSupport()||this.msBlobDownloadSupport()},e.prototype.linkDownloadSupport=function(){var t=w.getCache("linkDownloadSupport");if(t===!1||t===!0)return t;var i=document.createElement("a"),r=typeof i.download<"u";return w.setCache("linkDownloadSupport",r),r},e.prototype.blobDownloadSupport=function(){return C(window.Blob)},e.prototype.msBlobDownloadSupport=function(){return C(window.navigator.msSaveOrOpenBlob)},e.prototype.legacyIE=function(){var t=document.createElement("div");return t.innerHTML="<!--[if lt IE 10]><i></i><![endif]-->",t.getElementsByTagName("i").length==1},e.prototype.print=function(t,i,r){return ut(this,void 0,void 0,function(){return qt(this,function(s){return i.printMethod=="css"?[2,this.printViaCSS(t,i,r)]:[2,this.printViaIframe(t,i,r)]})})},e.prototype.printViaCSS=function(t,i,r){return ut(this,void 0,void 0,function(){var s,o,n,l,h;return qt(this,function(u){return s=document.documentElement.scrollTop||document.body.scrollTop,o=new ne(dl(this.container),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"}),r&&document&&document.title&&(n=document.title,document.title=r),l=new Image,l.src=t,l.style.maxWidth="100%",l.style.display="block",l.style.position="relative",l.style.visibility="visible",l.style.opacity="1",l.style.clipPath="none",document.body.appendChild(l),this.setTimeout(function(){window.print()},50),h=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,h&&i.delay<1e3?i.delay=1e3:i.delay<100&&(i.delay=100),this.setTimeout(function(){document.body.removeChild(l),o.dispose(),n&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=s},i.delay||500),[2,!0]})})},e.prototype.printViaIframe=function(t,i,r){return ut(this,void 0,void 0,function(){var s,o,n;return qt(this,function(l){return s=document.createElement("iframe"),s.style.visibility="hidden",document.body.appendChild(s),s.contentWindow.document.open(),s.contentWindow.document.close(),o=new Image,o.src=t,o.style.maxWidth="100%",o.style.height="auto",r&&(s.contentWindow.document.title=r),s.contentWindow.document.body.appendChild(o),s.load=function(){s.contentWindow.document.body.appendChild(o)},this.setTimeout(function(){try{s.contentWindow.document.execCommand("print",!1,null)||s.contentWindow.print()}catch{s.contentWindow.print()}},i.delay||50),n=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,n&&i.delay<1e3?i.delay=1e3:i.delay<100&&(i.delay=100),this.setTimeout(function(){document.body.removeChild(s)},i.delay+50||100),[2,!0]})})},e.prototype.findBackgroundColor=function(t){var i=1,r=kp(t,"background-color");if((r.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||r=="transparent")&&(i=0),i==0){var s=t.parentElement;return s?this.findBackgroundColor(s):nt("#fff")}else return nt(r,i)},Object.defineProperty(e.prototype,"container",{get:function(){return this.adapter.apply("container",{container:this._container}).container},set:function(t){this._container=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sprite",{get:function(){return this.adapter.apply("sprite",{sprite:this._sprite}).sprite},set:function(t){this._sprite=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraSprites",{get:function(){return this.adapter.apply("extraSprites",{extraSprites:this._extraSprites}).extraSprites},set:function(t){this._extraSprites=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validateSprites",{get:function(){return this.adapter.apply("validateSprites",{validateSprites:this._validateSprites}).validateSprites},set:function(t){this._validateSprites=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.adapter.apply("data",{data:this._data}).data},set:function(t){this._data=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataFields",{get:function(){return this._dataFields||this.generateDataFields(),this.adapter.apply("dataFields",{dataFields:this._dataFields}).dataFields},set:function(t){this._dataFields=t,this._dynamicDataFields=!1},enumerable:!0,configurable:!0}),e.prototype.handleDataUpdated=function(){this._dynamicDataFields&&(this._dataFields=void 0);var t=this.data.length>0;this._prevHasData!=t&&(this._prevHasData=t,this.menu&&this.menu.invalidate())},Object.defineProperty(e.prototype,"dateFormatter",{get:function(){return this._dateFormatter||(this._dateFormatter=new js,this._dateFormatter.language=this.language),this.adapter.apply("dateFormatter",{dateFormatter:this._dateFormatter}).dateFormatter},set:function(t){this._dateFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFormat",{get:function(){return this.adapter.apply("dateFormat",{dateFormat:this._dateFormat}).dateFormat},set:function(t){this._dateFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFields",{get:function(){return this._dateFields||(this._dateFields=new wt),this.adapter.apply("dateFields",{dateFields:this._dateFields}).dateFields},set:function(t){this._dateFields=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormatter",{get:function(){return this._numberFormatter||(this._numberFormatter=new ml,this._numberFormatter.language=this.language),this.adapter.apply("numberFormatter",{numberFormatter:this._numberFormatter}).numberFormatter},set:function(t){this._numberFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormat",{get:function(){return this.adapter.apply("numberFormat",{numberFormat:this._numberFormat}).numberFormat},set:function(t){this._numberFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFields",{get:function(){return this._numberFields||(this._numberFields=new wt),this.adapter.apply("numberFields",{numberFields:this._numberFields}).numberFields},set:function(t){this._numberFields=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormatter",{get:function(){return this._durationFormatter||(this._durationFormatter=new vl,this._durationFormatter.language=this.language),this.adapter.apply("durationFormatter",{durationFormatter:this._durationFormatter}).durationFormatter},set:function(t){this._durationFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormat",{get:function(){return this.adapter.apply("durationFormat",{durationFormat:this._durationFormat}).durationFormat},set:function(t){this._durationFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFields",{get:function(){return this._durationFields||(this._durationFields=new wt),this.adapter.apply("durationFields",{durationFields:this._durationFields}).durationFields},set:function(t){this._durationFields=t},enumerable:!0,configurable:!0}),e.prototype.generateDataFields=function(){var t=this;this._dataFields={},this.data.length&&W(this.data,function(i){at(i,function(r,s){C(t._dataFields[r])||(t._dataFields[r]=t.adapter.apply("dataFieldName",{name:r,field:r}).name)})})},e.prototype.isDateField=function(t){return this.adapter.apply("isDateField",{isDateField:this.dateFields.contains(t),field:t}).isDateField},e.prototype.isNumberField=function(t){return this.adapter.apply("isNumberField",{isNumberField:this.numberFields.contains(t),field:t}).isNumberField},e.prototype.isDurationField=function(t){return this.adapter.apply("isDurationField",{isDurationField:this.durationFields.contains(t),field:t}).isDurationField},e.prototype.getContentType=function(t){var i="";switch(t){case"png":case"gif":i="image/"+t;break;case"jpg":i="image/jpeg";break;case"svg":i="image/svg+xml";break;case"csv":i="text/csv";break;case"json":i="application/json";break;case"html":i="text/html";break;case"pdf":case"pdfdata":i="application/pdf";break;case"xlsx":i="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break}return this.adapter.apply("contentType",{contentType:i,type:t}).contentType},Object.defineProperty(e.prototype,"filePrefix",{get:function(){return this.adapter.apply("filePrefix",{filePrefix:this._filePrefix}).filePrefix},set:function(t){this._filePrefix=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.adapter.apply("backgroundColor",{backgroundColor:this._backgroundColor}).backgroundColor},set:function(t){this._backgroundColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.adapter.apply("title",{title:this._title}).title},set:function(t){this._title=t},enumerable:!0,configurable:!0}),e.prototype.showPreloader=function(){var t=this.preloader;t&&(t.progress=.5,t.label.text="...")},e.prototype.hidePreloader=function(){var t=this.preloader;t&&(t.progress=1)},Object.defineProperty(e.prototype,"preloader",{get:function(){return this._sprite&&this._sprite.parent&&this._sprite.parent.preloader?this._sprite.parent.preloader:void 0},enumerable:!0,configurable:!0}),e.prototype.showTimeout=function(){this.showModal(this.adapter.apply("timeoutMessage",{message:this.language.translate("Export operation took longer than expected. Something might have gone wrong.")}).message)},e.prototype.hideTimeout=function(){this._timeoutTimeout&&(this.removeDispose(this._timeoutTimeout),this._timeoutTimeout=null),this.hideModal()},Object.defineProperty(e.prototype,"language",{get:function(){return this._language||(this._language=new er),this._language},set:function(t){this._language=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modal",{get:function(){return this._modal||(this._modal=new Vh,this._modal.adapter.add("classPrefix",function(t){return t=$t.classNamePrefix+t,t})),this._modal},enumerable:!0,configurable:!0}),e.prototype.showModal=function(t,i){this.hideModal(),this.hidePreloader();var r=this.modal;r.container=this.sprite.svgContainer.SVGContainer,r.content=t,r.readerTitle=i,r.open()},e.prototype.hideModal=function(){this._modal&&this.modal.close()},e.prototype._canvg=function(){return ut(this,void 0,void 0,function(){var t;return qt(this,function(i){switch(i.label){case 0:return[4,import("./SXJYUHC3.js")];case 1:return t=i.sent(),t.default!=null?[2,t.default]:[2,t]}})})},Object.defineProperty(e.prototype,"canvg",{get:function(){return this._canvg()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pdfmake",{get:function(){return gm==null&&(gm=GP()),gm},enumerable:!0,configurable:!0}),e.prototype._xlsx=function(){return ut(this,void 0,void 0,function(){return qt(this,function(t){switch(t.label){case 0:return[4,import("./LZNL4CV3.js")];case 1:return[2,t.sent()]}})})},Object.defineProperty(e.prototype,"xlsx",{get:function(){return this._xlsx()},enumerable:!0,configurable:!0}),e.prototype.setFormatOptions=function(t,i){this._formatOptions.setKey(t,i)},e.prototype.getFormatOptions=function(t){return this._formatOptions.getKey(t)},Object.defineProperty(e.prototype,"formatOptions",{get:function(){return this._formatOptions},enumerable:!0,configurable:!0}),e.prototype._disablePointers=function(){C(this._spriteInteractionsEnabled)||(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled),this.sprite.interactionsEnabled=!1},e.prototype._releasePointers=function(){C(this._spriteInteractionsEnabled)&&!this._exportRunning&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled)},e.prototype.hideNonExportableSprites=function(){var t=this;if(!this._objectsAlreadyHidden){var i=this.sprite.svgContainer;i&&W(i.nonExportableSprites,function(r){!r.isHidden&&!r.isHiding&&r.visible&&t._hiddenObjects.push(r),r.hide(0)}),this._objectsAlreadyHidden=!0}},e.prototype.restoreNonExportableSprites=function(){this._objectsAlreadyHidden&&(W(this._hiddenObjects,function(t){t.show(0)}),this._hiddenObjects=[],this._objectsAlreadyHidden=!1)},e.prototype.awaitValidSprites=function(){return ut(this,void 0,void 0,function(){var t;return qt(this,function(i){switch(i.label){case 0:return t=[],this.validateSprites.length&&W(this.validateSprites,function(r,s){r.invalid&&t.push(new Promise(function(o,n){r.events.once("validated",function(l){o()})}))}),t.length?[4,Promise.all(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.processConfig=function(t){w.registeredClasses.ExportMenu=fm,t&&(C(t.menu)&&!C(t.menu.type)&&(t.menu.type="ExportMenu"),C(t.dataFields)&&Kt(t.dataFields)&&(this.dataFields=t.dataFields,delete t.dataFields)),a.prototype.processConfig.call(this,t)},e.XLINK="http://www.w3.org/1999/xlink",e})(Nh);var fe=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin"],rt=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.properties={},t._eventDispatcher=new om(t),t._bindings={},t._isTemplate=!1,t._isPath=!1,t._inited=!1,t._ready=!1,t.isHiding=!1,t._isHidden=!1,t.isShowing=!1,t.isStandaloneInstance=!1,t._isActive=!1,t._mask=new ce,t._positionPrecision=3,t._language=new ce,t._exporting=new ce,t._exportable=!0,t._bbox={x:0,y:0,width:0,height:0},t.invalid=!1,t.positionInvalid=!1,t.propertyFields={},t.applyOnClones=!1,t._measuredWidthSelf=0,t._measuredHeightSelf=0,t.maxLeft=0,t.maxRight=0,t.maxTop=0,t.maxBottom=0,t.maxLeftSelf=0,t.maxRightSelf=0,t.maxTopSelf=0,t.maxBottomSelf=0,t._isDragged=!1,t._isResized=!1,t._disabled=!1,t._internalDisabled=!1,t._updateDisabled=!1,t._internalDefaultsApplied=!1,t.rollOutDelay=0,t.isBaseSprite=!1,t.shouldClone=!0,t.appeared=!1,t.ex=0,t.ey=0,t.dragWhileResize=!1,t.measureFailed=!1,t.preventShow=!1,t.cloneTooltip=!0,t.className="Sprite",t._disposers.push(t._eventDispatcher),t.uid,t.group=t.paper.addGroup("g"),t.setPropertyValue("scale",1),t.setPropertyValue("rotation",0),t.setPropertyValue("align","none"),t.setPropertyValue("valign","none"),t.setPropertyValue("pixelPerfect",!1),t.setPropertyValue("visible",!0),t.setPropertyValue("tooltipPosition","fixed"),t.setPropertyValue("verticalCenter","none"),t.setPropertyValue("horizontalCenter","none"),t.setPropertyValue("tooltipX",N(50)),t.setPropertyValue("tooltipX",N(50)),t.setPropertyValue("marginTop",0),t.setPropertyValue("marginBottom",0),t.setPropertyValue("marginLeft",0),t.setPropertyValue("marginRight",0),t.setPropertyValue("dx",0),t.setPropertyValue("dy",0),t.setPropertyValue("paddingTop",0),t.setPropertyValue("paddingBottom",0),t.setPropertyValue("paddingRight",0),t.setPropertyValue("paddingLeft",0),t.setPropertyValue("togglable",!1),t.setPropertyValue("hidden",!1),t.setPropertyValue("urlTarget","_self"),t.setPropertyValue("alwaysShowTooltip",!1),t.setPropertyValue("showTooltipOn","hover"),t._prevMeasuredWidth=0,t._prevMeasuredHeight=0,t._measuredWidth=0,t._measuredHeight=0,t._isMeasured=!0,t.invalidate(),t.applyTheme(),t._disposers.push(t.events),t._disposers.push(t.group),t._disposers.push(t._mask),t._disposers.push(t._language),t._disposers.push(t._exporting),t._disposers.push(new Lt(function(){at(t._bindings,function(i,r){r.dispose()})})),t.setPropertyValue("interactionsEnabled",!0),t}return Object.defineProperty(e.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new Ve(this)),this._adapterO},enumerable:!0,configurable:!0}),e.prototype.applyTheme=function(){a.prototype.applyTheme.call(this),$t.autoSetClassName&&this.setClassName()},e.prototype.getCurrentThemes=function(){var t=this._themes;if(t)return t;var i=this._parent;return i?i.getCurrentThemes():w.themes},e.prototype.applyInternalDefaults=function(){this._internalDefaultsApplied=!0},e.prototype.invalidate=function(){this.disabled||this._isTemplate||this.__disabled||this.invalid||(this.invalid=!0,w.addToInvalidSprites(this),Ot.requestFrame())},e.prototype.validate=function(){this.dispatchImmediately("beforevalidated"),this._internalDefaultsApplied||this.applyInternalDefaults(),this.beforeDraw(),this.draw(),this.invalid=!1,w.removeFromInvalidSprites(this),this.afterDraw()},e.prototype.invalidatePosition=function(){this.disabled||this._isTemplate||this.positionInvalid||(this.positionInvalid=!0,w.addToInvalidPositions(this),Ot.requestFrame())},e.prototype.validatePosition=function(){var t=this.pixelX,i=this.pixelY,r=this.dx,s=this.dy,o=t+r,n=i+s;this._updateDisabled&&(this._internalDisabled?this.group.attr({display:"none"}):this.disabled||this.removeSVGAttribute("display"),this._updateDisabled=!1);var l=this.measure(),h=this.group.transformString;this.group.moveTo({x:o,y:n}),this.group.rotation=this.rotation,this.nonScaling?this.group.scale=this.scale/this.globalScale:this.group.scale=this.scale,(h!=this.group.transformString||l)&&(h==null?this.dispatch("transformed"):this.dispatchImmediately("transformed"),this.dispatch("positionchanged"),(this.showTooltipOn=="hit"||this.showTooltipOn=="always")&&this.updateTooltipPosition()),t+r==o&&i+s==n&&(w.removeFromInvalidPositions(this),this.positionInvalid=!1);var u=this._maskRectangle;u&&this._clipElement.moveTo({x:u.x-t,y:u.y-i})},e.prototype.beforeDraw=function(){},e.prototype.draw=function(){},e.prototype.afterDraw=function(){var t,i;if((this.isMeasured||this.horizontalCenter!=="none"||this.verticalCenter!=="none")&&this.measureElement(),this._inited)this.dispatch("validated");else{if(this._adapterO)try{for(var r=jo(this._adapterO.keys()),s=r.next();!s.done;s=r.next()){var o=s.value;switch(o){case"mask":case"fill":case"opacity":case"fillOpacity":case"stroke":case"strokeOpacity":case"strokeWidth":case"shapeRendering":case"strokeDasharray":case"strokeDashoffset":case"strokeLinecap":case"strokeLinejoin":case"textDecoration":case"fontSize":case"fontFamily":case"fontWeight":this[o]=this[o];break}}}catch(n){t={error:n}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}this.applyFilters(),this.visible=this.visible,this.interactionsEnabled=this.getPropertyValue("interactionsEnabled"),this._inited=!0,this.showOnInit||(this.appeared=!0),this.hidden&&this.hide(0),this.applyMask(),this.dispatch("validated"),this.dispatch("inited"),this.dispatchReady()}this.showTooltipOn=="always"&&(this.visible&&!this.disabled&&!this.__disabled?this.showTooltip():this.hideTooltip(0))},e.prototype.dispatchReady=function(){this.isReady()||(this._ready=!0,this.dispatch("ready"))},e.prototype.reinit=function(){this._inited=!1,this.setState(this.defaultState),this.invalidate()},e.prototype.handleGlobalScale=function(){this.dispatch("globalscalechanged"),this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth),this.nonScaling&&this.validatePosition(),this.updateFilterScale()},e.prototype.updateFilterScale=function(){var t=this;E(this.filters.iterator(),function(i){i.scale=t.globalScale})},e.prototype.removeFromInvalids=function(){w.removeFromInvalidSprites(this),w.removeFromInvalidPositions(this)},e.prototype.copyFrom=function(t){var i=this;a.prototype.copyFrom.call(this,t),this.isMeasured=t.isMeasured,this.states.copyFrom(t.states),t.filters.length>0&&t.filters.each(function(r){i.filters.push(r.clone())}),t._adapterO&&this.adapter.copyFrom(t._adapterO),t._interaction&&this.interactions.copyFrom(t.interactions),t._plugins&&this.plugins.copyFrom(t.plugins),this.configField=t.configField,this.applyOnClones=t.applyOnClones,this.disabled=t.disabled,this.virtualParent=t.virtualParent,this.exportable=t.exportable,t._tooltip&&(this._tooltip?this._tooltip.copyFrom(t.tooltip):t.cloneTooltip?this.tooltip=t.tooltip.clone():this._tooltip=t.tooltip),this._showSystemTooltip=t.showSystemTooltip,tr(t.propertyFields,this.propertyFields),tr(t.properties,this),t.fillModifier&&(this.fillModifier=t.fillModifier.clone()),t.strokeModifier&&(this.strokeModifier=t.strokeModifier.clone()),t.focusFilter&&(this.focusFilter=t.focusFilter.clone())},e.prototype.dispose=function(){if(!this.isDisposed()){if(this.showTooltipOn=="always"&&this.tooltip&&this.tooltip.hide(),this.dispatchImmediately("beforedisposed"),this.isBaseSprite){if(this.htmlContainer)for(;this.htmlContainer.childNodes.length>0;)this.htmlContainer.removeChild(this.htmlContainer.firstChild);this.isBaseSprite=!1}if(a.prototype.dispose.call(this),this._adapterO&&this._adapterO.clear(),this.applyOnClones&&this._clones)for(var t=this._clones.length-1;t>=0;t--){var i=this._clones.getIndex(t);i.dispose()}this._svgContainer&&this._svgContainer.dispose(),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0),this._urlDisposer&&this._urlDisposer.dispose(),this.removeFromInvalids(),this.element&&this.element.dispose(),this.group&&this.group.dispose(),this._numberFormatter&&this._numberFormatter.dispose(),this._focusFilter&&this._focusFilter.dispose();var r=this.stroke;r&&!(r instanceof Dt)&&r.dispose&&(this.clonedFrom&&this.clonedFrom.stroke==r||r.dispose());var s=this.fill;if(s&&!(s instanceof Dt)&&s.dispose&&(this.clonedFrom&&this.clonedFrom.fill==s||s.dispose()),C(this.id)&&this.map.removeKey(this.id),this.parent=void 0,this._filters)for(;this._filters.length>0;){var o=this._filters.getIndex(0);o.dispose(),this._filters.removeValue(o)}this._alwaysShowDisposers=void 0}},Object.defineProperty(e.prototype,"isTemplate",{get:function(){return this._isTemplate},set:function(t){t=xe(t),this._isTemplate!=t&&(this._isTemplate=t,this instanceof Q&&E(this.children.iterator(),function(i){i.isTemplate=t}),t?(this.parent=this._parent,this.removeFromInvalids()):this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showSystemTooltip",{get:function(){return C(this._showSystemTooltip)?this._showSystemTooltip:this.virtualParent?this.virtualParent.showSystemTooltip:this._parent?this._parent.showSystemTooltip:!1},set:function(t){t=xe(t),this._showSystemTooltip!=t&&(this._showSystemTooltip=t,this.applyAccessibility())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topParent",{get:function(){if(this._topParent)return this._topParent;if(this._parent)return this._parent.topParent},set:function(t){this._topParent=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(t){if(!this._isTemplate){this.paper;var i=this._parent;i!=t&&(i&&i.children.removeValue(this),this._parent=t,t?(this.topParent=t.topParent,t.isTemplate&&(this.isTemplate=!0),this.baseId=t.baseId,t.children.push(this),this._tooltip&&!this._tooltipContainer&&(this._tooltip.parent=t.tooltipContainer),this._dataItem||(this.dataItem=t.dataItem),this.handleAlwaysShowTooltip(),this.dataItem&&this.applyAccessibility(),this.dispatchImmediately("parentset")):this.topParent=void 0)}},enumerable:!0,configurable:!0}),e.prototype.handleAlwaysShow=function(){this.showTooltip()},e.prototype.handleAlwaysShowTooltip=function(){var t=this,i=this._alwaysShowDisposers;if(i&&W(i,function(s){s.dispose()}),this._alwaysShowDisposers=[],this.showTooltipOn=="always")for(;t!=null;){var r=t.events.on("visibilitychanged",this.handleAlwaysShow,this,!1);this.addDisposer(r),this._alwaysShowDisposers.push(r),t=t.parent}},Object.defineProperty(e.prototype,"virtualParent",{get:function(){return this._virtualParent},set:function(t){this._virtualParent=t,this.dataItem&&this.applyAccessibility()},enumerable:!0,configurable:!0}),e.prototype.appendDefs=function(){this.filterElement&&this.paper.appendDef(this.filterElement);var t=this.fill;t&&t.element&&this.paper.appendDef(t.element);var i=this.stroke;if(i&&i.element&&this.paper.appendDef(i.element),this.fillModifier&&this.fill instanceof Dt){var r=this.fillModifier.modify(this.fill);r&&r.element&&this.paper.appendDef(r.element)}if(this.strokeModifier&&this.stroke instanceof Dt){var s=this.strokeModifier.modify(this.stroke);s&&s.element&&this.paper.appendDef(s.element)}this._clipPath&&this.paper.appendDef(this._clipPath),this._exportable===!1&&(this.exportable=!1)},Object.defineProperty(e.prototype,"map",{get:function(){var t=this.topParent;return t?t.map:(this._map||(this._map=new It),this._map)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delayedMap",{get:function(){var t=this.topParent;return t?t.delayedMap:(this._delayedMap||(this._delayedMap=new It),this._delayedMap)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(t){if(this._id!=t){if(this._id=t,this.map.hasKey(t))throw Error("Duplicate id ("+t+") used on multiple objects.");this.map.setKey(t,this),$t.autoSetClassName&&this.setClassName()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dom",{get:function(){return this.group.node},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paper",{get:function(){if(this._paper)return this._paper;var t=this._parent;return t?t.paper:_s()},set:function(t){this.setPaper(t)},enumerable:!0,configurable:!0}),e.prototype.setPaper=function(t){var i=this._paper;return i!=t?(this._paper=t,this.appendDefs(),!0):!1},Object.defineProperty(e.prototype,"htmlContainer",{get:function(){if(this._htmlContainer)return this._htmlContainer;var t=this._parent;if(t)return t.htmlContainer},set:function(t){this._htmlContainer=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titleElement",{get:function(){return this._titleElement||(this._titleElement=this.paper.add("title"),this.group.add(this._titleElement)),this._titleElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptionElement",{get:function(){return this._descriptionElement||(this._descriptionElement=this.paper.add("desc"),this.group.add(this._descriptionElement)),this._descriptionElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filters",{get:function(){return this._filters||(this._filters=new wt,this._disposers.push(this._filters.events.onAll(this.applyFilters,this)),this._disposers.push(new Ft(this._filters))),this._filters},enumerable:!0,configurable:!0}),e.prototype.setSVGAttributes=function(){this.fill=this.fill,this.opacity=this.opacity,this.fillOpacity=this.fillOpacity,this.stroke=this.stroke,this.strokeOpacity=this.strokeOpacity,this.shapeRendering=this.shapeRendering,this.strokeDasharray=this.strokeDasharray,this.strokeDashoffset=this.strokeDashoffset,this.strokeLinecap=this.strokeLinecap,this.strokeLinejoin=this.strokeLinejoin,this.focusable=this.focusable,this.tabindex=this.tabindex,this.role=this.role},e.prototype.setSVGAttribute=function(t){this.group.attr(t)},e.prototype.removeSVGAttribute=function(t){this.group.removeAttr(t)},e.prototype.setClassName=function(){var t=this.className,i=$t.classNamePrefix;this.element&&this.element.addClass(i+t),this.group.addClass(i+t+"-group"),C(this.id)&&this.group.addClass(i+this.id),this.userClassName&&this.group.addClass(this.userClassName)},e.prototype.uidAttr=function(){return this.setSVGAttribute({id:this.uid}),this.uid},e.prototype.updateClipPath=function(){var t=this._clipElement;t&&t.moveTo({x:this.mask.pixelX,y:this.mask.pixelY})},e.prototype.createClipPath=function(){if(!this._clipPath){this._clipPath=this.paper.addGroup("clipPath"),this.paper.appendDef(this._clipPath),this._disposers.push(this._clipPath);var t=w.getUniqueId();this._clipPath.attr({id:t}),this.group.attr({"clip-path":'url("'+Xa()+t+'")'})}},e.prototype.applyMask=function(){var t=this.mask;if(this._clipPath&&t)if(t instanceof Q){this._clipElement.attr({width:mt(0,t.pixelWidth),height:mt(0,t.pixelHeight)});var i=ni({x:t.pixelX,y:t.pixelY},t.parent,this);this._clipPath.x=i.x,this._clipPath.y=i.y}else t.element&&t.element!=this._clipElement&&(this._clipElement=t.element,this._clipPath.add(this._clipElement)),this._clipPath.scale=t.scale,this._clipPath.x=t.pixelX,this._clipPath.y=t.pixelY,this._clipPath.rotation=t.rotation},e.prototype.applyFilters=function(){var t=this;if(this._filters&&this._filters.length>0){var i=100,r=100;this.filterElement?this.filterElement.removeChildNodes():(this.filterElement=this.paper.addGroup("filter"),this._disposers.push(this.filterElement)),this.paper.appendDef(this.filterElement);var s="filter-"+this.uid;this.filterElement.attr({id:s}),E(this.filters.iterator(),function(l){l.sprite=t,l.paper=t.paper,t.filterElement.attr({filterUnits:l.filterUnits}),l.appendPrimitives(t.filterElement),l.width>i&&(i=l.width),l.height>r&&(r=l.height),l.scale=t.globalScale});var o=i+"%",n=r+"%";this.filterElement.attr({width:o,height:n,x:-(i-100)/2+"%",y:-(r-100)/2+"%"}),this.group.attr({filter:'url("'+Xa()+s+'")'})}else this.filterElement&&(this.group.removeAttr("filter"),this.filterElement.removeChildNodes())},e.prototype.removeClipPath=function(){this._clipPath&&(this.removeDispose(this._clipPath),this._clipPath=void 0)},e.prototype.setElement=function(t){this.element=t,this.setSVGAttributes(),this.applyAccessibility()},Object.defineProperty(e.prototype,"element",{get:function(){return this._element},set:function(t){this.removeElement(),this._element=t,this.group.add(t),t.node instanceof SVGPathElement&&(this._isPath=!0),this.invalid||this.validate(),$t.autoSetClassName&&this.setClassName()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"svgContainer",{get:function(){if(this._svgContainer)return this._svgContainer;if(this._parent)return this._parent.svgContainer},set:function(t){this._svgContainer=t},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){if(this.element)if(this.definedBBox)this._bbox=this.definedBBox;else{var t=this.element.getBBox();this._bbox={x:t.x,y:t.y,width:t.width,height:t.height}}},e.prototype.updateCenter=function(){if(this.element){var t=this.element.transformString,i=this.bbox,r=0,s=0,o=i.x,n=i.y,l=i.width,h=i.height,u=this.pixelPaddingLeft,p=this.pixelPaddingRight,d=this.pixelPaddingTop,c=this.pixelPaddingBottom,f=mt(l+u+p,this.pixelWidth),g=mt(h+d+c,this.pixelHeight),m=i.x,y=i.x+f,v=i.y,x=i.y+g,_=this.horizontalCenter,$=this.verticalCenter;switch(_){case"none":r=o+u;break;case"left":r=u;break;case"middle":r=u-(l+p+u)/2;break;case"right":r=-p-l;break}switch($){case"none":s=n+d;break;case"top":s=d;break;case"middle":s=d-(h+c+d)/2;break;case"bottom":s=-c-h;break}this._measuredHeight=g,this._measuredWidth=f;var T=H(r-o,this._positionPrecision,!0),S=H(s-n,this._positionPrecision,!0);this.ex=T-u,this.ey=S-d,this.maxLeft=m+T-u,this.maxRight=y+T-u,this.maxTop=v+S-d,this.maxBottom=x+S-d,this.pixelPerfect&&$t.pixelPerfectPrecision==0&&(T-=.5,S-=.5),this.element.moveTo({x:T,y:S}),t!=this.element.transformString&&this.dispatchImmediately("transformed")}},e.prototype.measure=function(){this.updateCenter();var t=this._measuredWidth,i=this._measuredHeight,r=this.maxLeft,s=this.maxRight,o=this.maxTop,n=this.maxBottom;this._measuredWidthSelf=t,this._measuredHeightSelf=i;var l=this._positionPrecision;if(this.maxLeftSelf=this.maxLeft,this.maxRightSelf=this.maxRight,this.maxTopSelf=this.maxTop,this.maxBottomSelf=this.maxBottom,this.rotation!==0||this.scale!==1||this.nonScaling){this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth);var h=this.paper.svg,u=h.createSVGMatrix(),p=this.rotation,d=this.scale;this.nonScaling&&(d=this.scale/this.globalScale),u.a=U(p)*d,u.c=-G(p)*d,u.e=0,u.b=G(p)*d,u.d=U(p)*d,u.f=0;var c=h.createSVGPoint();c.x=r,c.y=o;var f=h.createSVGPoint();f.x=s,f.y=o;var g=h.createSVGPoint();g.x=s,g.y=n;var m=h.createSVGPoint();m.x=r,m.y=n;var y=c.matrixTransform(u),v=f.matrixTransform(u),x=g.matrixTransform(u),_=m.matrixTransform(u);r=Math.min(y.x,v.x,x.x,_.x),s=Math.max(y.x,v.x,x.x,_.x),o=Math.min(y.y,v.y,x.y,_.y),n=Math.max(y.y,v.y,x.y,_.y),t=s-r,i=n-o,this.maxLeft=H(r,l,!0),this.maxRight=H(s,l,!0),this.maxTop=H(o,l,!0),this.maxBottom=H(n,l,!0)}return this._measuredWidth=H(t,l,!0),this._measuredHeight=H(i,l,!0),this._measuredWidth!=this._prevMeasuredWidth||this._measuredHeight!=this._prevMeasuredHeight?(this._prevMeasuredHeight=this._measuredHeight,this._prevMeasuredWidth=this._measuredWidth,this.dispatch("sizechanged"),(this.isHover||this.showTooltipOn=="hit"||this.showTooltipOn=="always")&&this.tooltip&&this.tooltip.visible&&(C(this.tooltipText)||C(this.tooltipHTML))&&this.updateTooltipPosition(),!0):!1},e.prototype.insertBefore=function(t){var i=this._parent;if(i){var r=i.children.indexOf(t);r!==-1&&(i.children.moveValue(this,r),i.sortChildren())}return this},e.prototype.insertAfter=function(t){var i=this._parent;if(i){var r=i.children.indexOf(t);r!==-1&&(i.children.moveValue(this,r+1),i.sortChildren())}return this},e.prototype.removeElement=function(){this._element&&(this.removeDispose(this._element),this._element=void 0)},e.prototype.getRelativeX=function(t){return t instanceof _t?t.value:this._parent?t/this._parent.innerWidth:0},e.prototype.getRelativeY=function(t){return t instanceof _t?t.value:this._parent?t/this._parent.innerHeight:0},e.prototype.getPixelX=function(t){var i=0;if(P(t))i=t;else if(t instanceof _t){var r=t.value;this._parent&&(i=H(this._parent.innerWidth*r,this._positionPrecision,!0))}return i},e.prototype.getPixelY=function(t){var i=0;if(P(t))i=t;else if(t instanceof _t){var r=t.value;this._parent&&(i=H(this._parent.innerHeight*r,this._positionPrecision,!0))}return i},e.prototype.moveTo=function(t,i,r,s){this.isDragged&&!s||(t&&(P(t.x)&&this.setPropertyValue("x",H(t.x,this._positionPrecision,!0)),P(t.y)&&this.setPropertyValue("y",H(t.y,this._positionPrecision,!0))),P(i)&&(this.rotation=i),P(r)&&(this.scale=r),this.invalidatePosition())},Object.defineProperty(e.prototype,"mask",{get:function(){return this._adapterO?this._adapterO.apply("mask",this._mask.get()):this._mask.get()},set:function(t){var i=this;this._mask.get()!==t&&(t?(this.createClipPath(),t instanceof Q?this._clipElement=this.paper.add("rect"):(t.isMeasured=!1,t.element&&(this._clipElement=t.element)),this._clipElement&&this._clipPath.add(this._clipElement),this._mask.set(t,new Bt([t.events.on("maxsizechanged",function(){i.inited&&i.applyMask()},void 0,!1),t.events.on("validated",this.applyMask,this,!1),t.events.on("positionchanged",this.applyMask,this,!1)])),this.applyMask()):(this._mask.reset(),this.group.removeAttr("clip-path"),this.removeClipPath()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskRectangle",{get:function(){return this._maskRectangle},set:function(t){t?(this.createClipPath(),this._clipElement||(this._clipElement=this.paper.add("rect"),this._clipPath.add(this._clipElement)),this._clipElement.attr({width:t.width,height:t.height})):(this.removeClipPath(),this._clipElement=void 0),this._maskRectangle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMeasured",{get:function(){return this._isMeasured},set:function(t){t=xe(t),t||(this._measuredWidth=0,this._measuredHeight=0),this._isMeasured!=t&&(this._isMeasured=t,this.invalidatePosition())},enumerable:!0,configurable:!0}),e.prototype.hitTest=function(t){this.invalid&&this.validate(),t.invalid&&t.validate();var i=this.pixelX+this.maxLeft,r=this.pixelY+this.maxTop,s=i+this.maxRight,o=r+this.maxBottom,n=t.pixelX+t.maxLeft,l=t.pixelY+t.maxTop,h=n+t.maxRight,u=l+t.maxBottom;return!(n>s||h<i||l>o||u<r)},Object.defineProperty(e.prototype,"inited",{get:function(){return this._inited},enumerable:!0,configurable:!0}),e.prototype.isReady=function(){return this._ready},Object.defineProperty(e.prototype,"states",{get:function(){if(!this._states){var t=new Qo;this._states=new Es(t),this._disposers.push(this._states.events.on("insertKey",this.processState,this,!1)),this._disposers.push(this._states.events.on("setKey",this.processState,this,!1)),this._disposers.push(new Pr(this._states)),this._disposers.push(t)}return this._states},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenState",{get:function(){if(!this.states.getKey("hidden")){var t=this.states.create("hidden");t.properties.opacity=0,t.properties.visible=!1}return this.states.getKey("hidden")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultState",{get:function(){if(!this.states.getKey("default")){var t=this.states.create("default");t.properties.opacity=1}return this.states.getKey("default")},enumerable:!0,configurable:!0}),e.prototype.processState=function(t){var i=t.newValue;if(i.sprite=this,i.name=t.key,(this.states.hasKey("hover")||this.showTooltipOn=="hover"&&(C(this.tooltipHTML)||C(this.tooltipText)))&&(this.hoverable=!0),(this.states.hasKey("down")||this.showTooltipOn=="hover"&&(C(this.tooltipHTML)||C(this.tooltipText)))&&(this.clickable=!0),this.states.hasKey("focus")&&(this.focusable=!0),this.applyOnClones)for(var r=this.clones.values,s=r.length,o=0;o<s;++o){var n=r[o];n.isDisposed()||n.states.setKey(i.name,i)}},Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Qr(this._animations))),this._animations},enumerable:!0,configurable:!0}),e.prototype.getSvgPoint=function(t){try{var i=this.htmlContainer.getBoundingClientRect();return{x:t.x-i.left,y:t.y-i.top}}catch{return t}},e.prototype.animate=function(t,i,r){return new Pi(this,t,i,r).start()},e.prototype.setState=function(t,i,r){var s;if(t instanceof Qo)this.states.setKey(t.name,t),s=t;else if(s=this.states.getKey(t),!s)return;if(s.name=="hover"){if(this.isHidden)return;this.isHover=!0}return s.name=="hidden"?this.isHiding=!0:this.visible||this.setVisibility(s.properties.visible||this.defaultState.properties.visible),s.name=="active"&&(this.isActive=!0),P(i)||(i=s.transitionDuration),C(r)||(r=s.transitionEasing),this.transitTo(s,i,r)},e.prototype.applyCurrentState=function(t){var i=this.setState(this.defaultState,t);return this.isHover&&(i=this.setState("hover",t)),this.isDown&&this.interactions.downPointers.length&&(i=this.setState("down",t)),this.isFocused=this.isFocused,this.isActive&&(i=this.setState("active",t),this.isHover&&this.states.hasKey("hoverActive")&&(i=this.setState("hoverActive",t))),i},e.prototype.transitTo=function(t,i,r){var s=this,o=[],n=t.allValues,l;if(at(n,function(u,p){var d=s[u];if(p!=d&&s.defaultState.properties[u]==null&&(s.defaultState.properties[u]=d),p!="__unset"){var c={from:d,to:p,property:u};o.push(c)}}),o.length>0&&(l=this.animate(o,i,r),l&&!l.isFinished()?this._disposers.push(l.events.on("animationended",function(){s.dispatchImmediately("transitionended")})):this.dispatchImmediately("transitionended")),t.filters.length>0){var h=[];E(t.filters.iterator(),function(u){var p=u.clone();h.push(p);var d=[];E(s.filters.iterator(),function(c){c.className==p.className&&(Qn(s.defaultState.filters.iterator(),function(f){return f.className===p.className})||s.defaultState.filters.push(c),at(p.properties,function(f,g){var m=c.properties[f];m!=g&&d.push({property:f,from:m,to:g})}))}),p.animate(d,i,r)}),this.filters.clear(),this.filters.pushAll(h)}return l},e.prototype.isInTransition=function(){return this.animations.length>0},Object.defineProperty(e.prototype,"isHover",{get:function(){return this.isInteractive()?this.interactions.isHover:!1},set:function(t){t=xe(t),t!==this.isHover&&this.isInteractive()&&(this.interactions.isHover=t,t?this.handleOver():(this.interactions.isRealHover=!1,this.handleOut()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDragged",{get:function(){return this._isDragged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResized",{get:function(){return this._isResized},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDown",{get:function(){return this.isInteractive()?this.interactions.isDown:!1},set:function(t){t=xe(t),this.isInteractive()&&this.isDown!=t&&(this.interactions.isDown=t,t?this.handleDown():this.handleUp())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFocused",{get:function(){return this.isInteractive()?this.interactions.isFocused:!1},set:function(t){t=xe(t),this.focusable&&this.isFocused!=t&&this.isInteractive()&&(this.interactions.isFocused=t,t===!0?this.handleFocus():this.handleBlur())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(t){this.setActive(t)},enumerable:!0,configurable:!0}),e.prototype.setActive=function(t){t=xe(t),this._isActive!==t&&(this._isActive=t,t&&this.states.hasKey("active")?(this.setState("active"),this.isHover&&this.states.hasKey("hoverActive")&&this.setState("hoverActive")):this.applyCurrentState(),this.dispatchImmediately("toggled"))},Object.defineProperty(e.prototype,"disabled",{get:function(){var t=this.getPropertyValue("disabled");return C(t)?t:this.virtualParent?this.virtualParent.disabled:this._parent?this._parent.disabled:!1},set:function(t){this.setDisabled(t)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){t=xe(t);var i=this.getPropertyValue("disabled");if(i!=t){if(this.setPropertyValue("disabled",t,!0),t)this.parent=this._parent,this.removeFromInvalids(),this.group.attr({display:"none"}),this.dispatch("disabled");else{if(this._parent){var r=this._parent.element;r.hasChild(this.group)||r.add(this.group)}this instanceof Q?(this.deepInvalidate(),this._background&&this._background.invalidate()):this.invalidate(),this.__disabled||this.removeSVGAttribute("display"),this.dispatch("enabled")}return this.dispatch("transformed"),Ot.requestFrame(),!0}return!1},Object.defineProperty(e.prototype,"__disabled",{get:function(){return this._internalDisabled},set:function(t){this._internalDisabled!=t&&(this._internalDisabled=t,this._updateDisabled=!0,this.invalidatePosition(),t||this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormatter",{get:function(){return this._numberFormatter?this._numberFormatter:this.virtualParent?this.virtualParent.numberFormatter:this._parent?this._parent.numberFormatter:(this._numberFormatter=new ml,this._numberFormatter.language=this.language,this.numberFormatter)},set:function(t){this._numberFormatter=t,this._numberFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.virtualParent?this.virtualParent.dateFormatter:this._parent?this._parent.dateFormatter:(this._dateFormatter=new js,this._dateFormatter.language=this.language,this.dateFormatter)},set:function(t){this._dateFormatter=t,this._dateFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormatter",{get:function(){return this._durationFormatter?this._durationFormatter:this.virtualParent?this.virtualParent.durationFormatter:this._parent?this._parent.durationFormatter:(this._durationFormatter=new vl,this._durationFormatter.language=this.language,this.durationFormatter)},set:function(t){this._durationFormatter=t,this._durationFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){var t=this._language.get();return t||(this.virtualParent?this.virtualParent.language:this._parent?this._parent.language:(t=new er,this.language=t,t))},set:function(t){var i=this;this._language.get()!==t&&this._language.set(t,t.events.on("localechanged",function(r){if(i._numberFormatter&&(i._numberFormatter.language=i.language),i._dateFormatter&&(i._dateFormatter.language=i.language),i._durationFormatter&&(i._durationFormatter.language=i.language),i._exporting.get()){var s=i._exporting.get();s.numberFormatter.language=i.language,s.dateFormatter.language=i.language,s.durationFormatter.language=i.language,s.language=i.language}i instanceof Q&&i.deepInvalidate()}))},enumerable:!0,configurable:!0}),e.prototype.populateString=function(t,i){if(C(t)){t=Yn(t),t=fr().escape(t);var r=t.match(/\{([^}]+)\}/g),s=void 0;if(r)for(s=0;s<r.length;s++){var o=r[s].replace(/\{([^}]+)\}/,"$1"),n=this.getTagValue(o,"",i);C(n)||(n=""),t=t.split(r[s]).join(n)}t=fr().unescape(t)}else t="";return this._adapterO?this._adapterO.apply("populateString",t):t},e.prototype.getTagValue=function(t,i,r){var s;C(r)||(r=this.dataItem);for(var o=[],n=/([^.]+)\(([^)]*)\)|([^.]+)/g,l;l=n.exec(t),l!==null;)if(l[3])o.push({prop:l[3]});else{var h=[];if(_h(l[2])!="")for(var u=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,p=void 0;p=u.exec(l[2]),p!==null;)h.push(p[1]||p[2]||p[3]);o.push({method:l[1],params:h})}if(r){s=this.getTagValueFromObject(o,r.values),(!C(s)||Kt(s))&&(s=this.getTagValueFromObject(o,r));var d=r.dataContext;!C(s)&&d&&(s=this.getTagValueFromObject(o,r.dataContext),C(s)||(s=this.getTagValueFromObject([{prop:t}],d)),!C(s)&&d.dataContext&&(s=this.getTagValueFromObject(o,d.dataContext))),!C(s)&&r.component&&r.component.dataItem!==r&&(s=r.component.getTagValue(t,i))}return C(s)||(s=this.getTagValueFromObject(o,this.populateStringFrom||this)),!C(s)&&this._parent&&(s=this._parent.getTagValue(t,i)),s},e.prototype.getTagValueFromObject=function(t,i,r){for(var s=i,o=!1,n=0,l=t.length;n<l;n++){var h=t[n];if(h.prop){if(s=s[h.prop],!C(s))return}else switch(h.method){case"formatNumber":var u=al(s);C(u)&&(s=this.numberFormatter.format(u,r||h.params[0]||void 0),o=!0);break;case"formatDate":var p=void 0;if(vt(s)?p=this.dateFormatter.parse(s):p=Ph(s),!Ea(p)||Ke(p.getTime()))return;C(p)&&(s=this.dateFormatter.format(p,r||h.params[0]||void 0),o=!0);break;case"formatDuration":var d=al(s);C(d)&&(s=this.durationFormatter.format(d,r||h.params[0]||void 0,h.params[1]||void 0),o=!0);break;case"urlEncode":case"encodeURIComponent":s=encodeURIComponent(s);break;default:s[h.method]&&s[h.method].apply(this,h.params);break}}if(!o){var c=[{method:"",params:r}];if(!C(r))P(s)?(c[0].method="formatNumber",c[0].params=""):Ea(s)&&(c[0].method="formatDate",c[0].params="");else{var f=Mf(r);f===zo?c[0].method="formatNumber":f===Wo?c[0].method="formatDate":f===tl&&(c[0].method="formatDuration")}c[0].method&&(s=this.getTagValueFromObject(c,s))}return s},Object.defineProperty(e.prototype,"dataItem",{get:function(){if(!this._dataItem){if(this.virtualParent)return this.virtualParent.dataItem;if(this._parent)return this._parent.dataItem}return this._dataItem},set:function(t){this.setDataItem(t)},enumerable:!0,configurable:!0}),e.prototype.setDataItem=function(t){var i=this;if(this._dataItem!=t){if(this._dataItem=t,t){if(this.configField){var r=t.dataContext;r&&(this.config=r[this.configField],!this.config&&r.dataContext&&(this.config=r.dataContext[this.configField]))}var s=t.dataContext;if(s){var o=s.dataContext;at(this.propertyFields,function(n,l){if(C(s[l])){var h=i;h[n]=s[l]}else if(o){var u=o[l];if(C(u)){var h=i;h[n]=u}}})}}this.invalidate()}},e.prototype.getPropertyValue=function(t){var i=this.properties[t];return this._isTemplate||(this._adapterO&&(i=this._adapterO.apply(t,i)),i=Lh.applyAll(this,t,i)),i},e.prototype.setColorProperty=function(t,i,r){var s=this.properties[t];return i instanceof Dt&&s instanceof Dt&&i.toString()==s.toString()?!1:this.setPropertyValue(t,i,r)},e.prototype.setPercentProperty=function(t,i,r,s,o,n){if(i=Cv(i),P(i))return P(o)&&(i=H(i,o,n)),this.setPropertyValue(t,i,r,s);var l=this.properties[t];return i instanceof _t&&l instanceof _t&&i.value==l.value?!1:this.setPropertyValue(t,i,r,s)},e.prototype.setPropertyValue=function(t,i,r,s){if(this.properties[t]!==i&&!this.isDisposed()){if(this.properties[t]=i,this.events.isEnabled("propertychanged")){var o={type:"propertychanged",target:this,property:t};this.events.dispatchImmediately("propertychanged",o)}if(r&&this.invalidate(),s&&this.invalidatePosition(),this.applyOnClones)for(var n=this.clones.values,l=n.length,h=0;h<l;++h){var u=n[h];u.isDisposed()||(u[t]=i)}return!0}return!1},e.prototype.bind=function(t,i,r,s){var o=this;r===void 0&&(r=t),C(this._bindings[t])&&this._bindings[t].dispose(),this[t]=i[r],this._bindings[t]=i.events.on("propertychanged",function(n){if(n.property===r){var l=i[r];s&&(l=s(l)),o[t]=l}})},e.prototype.observe=function(t,i,r,s){var o=this;return new Bt(da(gp(t),function(n){return o.events.on("propertychanged",function(l){l.property===n&&i.call(r,l)},r,s)}))},e.prototype.applyAccessibility=function(){var t=this.readerTitle,i=this.readerDescription,r=this.role,s=this.readerHidden,o=this.readerChecked,n=this.readerControls,l=this.readerLive,h=this.readerOrientation,u=this.readerValueNow,p=this.readerValueText,d=[],c=[],f=this.readerLabelledBy;f&&d.push(f);var g=this.readerDescribedBy;if(g&&c.push(g),t)if(d.length||this.showSystemTooltip){var m=this.titleElement,y=this.uid+"-title";m.node.textContent!=t&&(m.node.textContent=t,m.attr({id:y})),d.push(y)}else this._titleElement&&(this.group.removeElement(this._titleElement),this._titleElement=void 0),this.setSVGAttribute({"aria-label":t});else this.removeSVGAttribute("aria-label"),this._titleElement&&(this.group.removeElement(this._titleElement),this._titleElement=void 0);if(i){var v=this.descriptionElement,x=this.uid+"-description";v.node.textContent!=i&&(v.node.textContent=i,v.attr({id:x})),c.push(x)}else this._descriptionElement&&(this.group.removeElement(this._descriptionElement),this._descriptionElement=void 0);d.length?this.setSVGAttribute({"aria-labelledby":d.join(" ")}):this.removeSVGAttribute("aria-labelledby"),c.length?this.setSVGAttribute({"aria-describedby":c.join(" ")}):this.removeSVGAttribute("aria-describedby"),r?this.setSVGAttribute({role:r}):this.removeSVGAttribute("role"),s?this.setSVGAttribute({"aria-hidden":"true"}):this.removeSVGAttribute("aria-hidden"),o?this.setSVGAttribute({"aria-checked":"true"}):o===!1?this.setSVGAttribute({"aria-checked":"false"}):this.removeSVGAttribute("aria-checked"),n?this.setSVGAttribute({"aria-controls":n}):this.removeSVGAttribute("aria-controls"),l?this.setSVGAttribute({"aria-live":l}):this.removeSVGAttribute("aria-live"),h?this.setSVGAttribute({"aria-orientation":h}):this.removeSVGAttribute("aria-orientation"),u?this.setSVGAttribute({"aria-valuenow":u}):this.removeSVGAttribute("aria-valuenow"),p?this.setSVGAttribute({"aria-valuetext":p}):this.removeSVGAttribute("aria-valuetext")},Object.defineProperty(e.prototype,"readerTitle",{get:function(){var t=this.getPropertyValue("readerTitle");return C(t)&&this.dataItem?this.populateString(t):t},set:function(t){t=di(t),this.setPropertyValue("readerTitle",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerDescription",{get:function(){var t=this.getPropertyValue("readerDescription");return C(t)&&this.dataItem?this.populateString(t):this.getPropertyValue("readerDescription")},set:function(t){t=di(t),this.setPropertyValue("readerDescription",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"role",{get:function(){return this.getPropertyValue("role")},set:function(t){t=di(t),this.setPropertyValue("role",t)&&(this.applyAccessibility(),t=="slider"&&(this.setSVGAttribute({"aria-valuemin":"0"}),this.setSVGAttribute({"aria-valuemax":"100"})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerHidden",{get:function(){return this.getPropertyValue("readerHidden")},set:function(t){t=xe(t),this.setPropertyValue("readerHidden",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerChecked",{get:function(){return this.getPropertyValue("readerChecked")},set:function(t){t=xe(t),this.setPropertyValue("readerChecked",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerControls",{get:function(){return this.getPropertyValue("readerControls")},set:function(t){t=di(t),this.setPropertyValue("readerControls",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerLive",{get:function(){return this.getPropertyValue("readerLive")},set:function(t){t=di(t),this.setPropertyValue("readerLive",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerLabelledBy",{get:function(){return this.getPropertyValue("readerLabelledBy")},set:function(t){t=di(t),this.setPropertyValue("readerLabelledBy",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerDescribedBy",{get:function(){return this.getPropertyValue("readerDescribedBy")},set:function(t){t=di(t),this.setPropertyValue("readerDescribedBy",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerOrientation",{get:function(){return this.getPropertyValue("readerOrientation")},set:function(t){t=di(t),this.setPropertyValue("readerOrientation",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerValueNow",{get:function(){return this.getPropertyValue("readerValueNow")},set:function(t){t=di(t),this.setPropertyValue("readerValueNow",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readerValueText",{get:function(){return this.getPropertyValue("readerValueText")},set:function(t){t=di(t),this.setPropertyValue("readerValueText",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keyboardOptions",{get:function(){if(!this.interactions.keyboardOptions){if(this.virtualParent)return this.virtualParent.keyboardOptions;if(this._parent)return this._parent.keyboardOptions}return this.interactions.keyboardOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mouseOptions",{get:function(){if(!this.interactions.mouseOptions){if(this.virtualParent)return this.virtualParent.mouseOptions;if(this._parent)return this._parent.mouseOptions}return this.interactions.mouseOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactions",{get:function(){if(!this._interaction){var t=gt().getInteraction(this.dom);this._interaction=t,t.clickable=this.clickable,t.hoverable=this.hoverable,t.trackable=this.trackable,t.draggable=this.draggable,t.swipeable=this.swipeable,t.resizable=this.resizable,t.wheelable=this.wheelable,t.contextMenuDisabled=this.contextMenuDisabled,t.inert=this.inert,t.sprite=this,this._disposers.push(t)}return this._interaction},enumerable:!0,configurable:!0}),e.prototype.isInteractive=function(){return!!this._interaction},Object.defineProperty(e.prototype,"focusable",{get:function(){return this.getPropertyValue("focusable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("focusable",t)&&(!t&&!this.isInteractive()||(this.interactions.focusable=t,t?(this.setSVGAttribute({focusable:t}),C(this._tabindex)||(this.tabindex=0)):(this.removeSVGAttribute("focusable"),this.tabindex=void 0),this.interactions.setEventDisposer("sprite-focusable",t,function(){return new Bt([i.events.on("blur",i.handleBlur,i,!1),i.events.on("focus",i.handleFocus,i,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleFocus=function(t){this.focusable&&(this.topParent&&(this.topParent.hasFocused=!0,this.topParent.focusedElement=this),this.focusFilter&&this.filters.push(this.focusFilter),this.hoverOnFocus&&(this.isHover=!0,this.handleOver()))},e.prototype.handleBlur=function(t){this.focusable&&(this.topParent&&(this.topParent.hasFocused=!1,this.topParent.focusedElement=void 0),this.focusFilter&&this.filters.removeValue(this.focusFilter),this.hoverOnFocus&&(this.isHover=!1,this.handleOut()))},Object.defineProperty(e.prototype,"focusFilter",{get:function(){var t=this._focusFilter;if(t)return t;if(this.virtualParent)return this.virtualParent.focusFilter;if(this._parent)return this._parent.focusFilter},set:function(t){this._focusFilter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverOnFocus",{get:function(){return this.getPropertyValue("hoverOnFocus")},set:function(t){t!==this.hoverOnFocus&&this.setPropertyValue("hoverOnFocus",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabindex",{get:function(){var t=this._tabindex;if(t!=null)return t;if(this.virtualParent)return this.virtualParent.tabindex;if(this._parent)return this._parent.tabindex},set:function(t){t=Wt(t),this.setPropertyValue("tabindex",t)&&P(t)&&(this.interactions.tabindex=t,this.setSVGAttribute({tabindex:t}),this._tabindex=t,this.focusable=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inertiaOptions",{get:function(){return!this.interactions.inertiaOptions&&this._parent?this._parent.inertiaOptions:this.interactions.inertiaOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this.getPropertyValue("draggable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("draggable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.draggable=t,this.interactions.setEventDisposer("sprite-draggable",t,function(){return new Bt([i.events.on("down",i.handleDown,i,!1),i.events.on("dragstart",i.handleDragStart,i,!1),i.events.on("drag",i.handleDragMove,i,!1),i.events.on("dragstop",i.handleDragStop,i,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleDragStart=function(t){(!this.interactions.isTouchProtected||!t.touch)&&(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this._isDragged=!0,this.hideTooltip(0))},e.prototype.dragStart=function(t){this._isDragged=!0,gt().dragStart(this.interactions,t)},e.prototype.handleDragStop=function(t){(!this.interactions.isTouchProtected||!t.touch)&&(this._isDragged=!1,this.showTooltip(),this.interactions.originalPosition=void 0)},e.prototype.dragStop=function(t,i){this._isDragged=!1,gt().dragStop(this.interactions,t,i)},e.prototype.handleDragMove=function(t){if(!this.interactions.isTouchProtected||!t.touch){var i=this.interactions.originalPosition;if(i&&this._isDragged){var r=this._parent.globalScale*this.svgContainer.cssScale;this.moveTo({x:i.x+t.shift.x/r,y:i.y+t.shift.y/r},void 0,void 0,!0)}this.dispatchImmediately("dragged",t)}},Object.defineProperty(e.prototype,"inert",{get:function(){return this.getPropertyValue("inert")},set:function(t){t=xe(t),this.setPropertyValue("inert",t)&&(!t&&!this.isInteractive()||(this.interactions.inert=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverOptions",{get:function(){if(!this.interactions.hoverOptions){if(this.virtualParent)return this.virtualParent.hoverOptions;if(this._parent)return this._parent.hoverOptions}return this.interactions.hoverOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverable",{get:function(){return this.getPropertyValue("hoverable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("hoverable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.hoverable=t,this.interactions.setEventDisposer("sprite-hoverable",t,function(){return new Bt([i.events.on("over",i.handleOver,i,!1),i.events.on("out",i.handleOut,i,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleOver=function(t){if(this._outTimeout&&this._outTimeout.dispose(),this.isHover){this.states.hasKey("hover")&&(this.isHidden||this.applyCurrentState());var i=void 0;t&&t.pointer&&(i=vs(t.pointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale)),this.showTooltipOn=="hover"&&this.showTooltip(i)}else this.showTooltipOn=="hover"&&this.hideTooltip(),!this.isHidden&&this.states.hasKey("hover")&&this.applyCurrentState()},e.prototype.handleOut=function(t){var i=this;if(this.tooltip&&this.tooltip.targetSprite==this&&this.tooltip.keepTargetHover){this._outTimeout=this.setTimeout(function(){i.tooltip.isHover||(i.tooltip.targetSprite==i&&i.hideTooltip(),i._outTimeout=i.setTimeout(i.handleOutReal.bind(i),i.rollOutDelay))},10);return}this.showTooltipOn=="hover"&&this.hideTooltip(),this._outTimeout=this.setTimeout(this.handleOutReal.bind(this),this.rollOutDelay)},e.prototype.handleOutReal=function(){!this.isHidden&&!this.isHiding&&this.states.hasKey("hover")&&this.applyCurrentState()},Object.defineProperty(e.prototype,"hitOptions",{get:function(){if(!this.interactions.hitOptions){if(this.virtualParent)return this.virtualParent.hitOptions;if(this._parent)return this._parent.hitOptions}return this.interactions.hitOptions},enumerable:!0,configurable:!0}),e.prototype.handleDown=function(t){this.interactions.downPointers.length===1&&(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this.interactions.originalAngle=this.rotation,this.interactions.originalScale=this.scale,this.states.hasKey("down")&&this.setState("down"))},e.prototype.handleUp=function(t){var i=this;this._isResized=!1,this.states.hasKey("down")&&this.applyCurrentState(),this.showTooltipOn=="hit"&&(this.updateTooltipPosition(t.pointer?t.pointer.point:void 0),this._disposers.push(w.events.once("exitframe",function(){i.showTooltip()})),this._disposers.push(gt().body.events.once("down",function(r){i.hideTooltip()})))},Object.defineProperty(e.prototype,"clickable",{get:function(){return this.getPropertyValue("clickable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("clickable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.clickable=t,this.interactions.setEventDisposer("sprite-clickable",t,function(){return new Bt([i.events.on("down",i.handleDown,i,!1),i.events.on("up",i.handleUp,i,!1)])})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.getPropertyValue("togglable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("togglable",t)&&(!t&&!this.isInteractive()||this.interactions.setEventDisposer("sprite-togglable",t,function(){return i.events.on("hit",i.handleToggle,i,!1)}))},enumerable:!0,configurable:!0}),e.prototype.handleToggle=function(t){this.isActive=!this.isActive},Object.defineProperty(e.prototype,"contextMenuDisabled",{get:function(){return this.getPropertyValue("contextMenuDisabled")},set:function(t){t=xe(t),this.setPropertyValue("contextMenuDisabled",t)&&(this.interactions.contextMenuDisabled=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.getPropertyValue("url")},set:function(t){this.setPropertyValue("url",t)&&(this._urlDisposer&&this._urlDisposer.dispose(),Uo(t)&&(this._urlDisposer=this.events.on("hit",this.urlHandler,this,!1),this.clickable=!0,this.cursorOverStyle=Le.pointer))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseId",{get:function(){return!this._baseId&&this._parent&&(this.baseId=this._parent.baseId),this._baseId},set:function(t){this.setBaseId(t)},enumerable:!0,configurable:!0}),e.prototype.setBaseId=function(t){t!=this._baseId&&(this.invalid&&(this.invalid=!1,w.removeFromInvalidSprites(this),this.invalidate()),this._baseId=t)},Object.defineProperty(e.prototype,"baseSprite",{get:function(){if(this.isBaseSprite)return this;if(this._parent)return this._parent.baseSprite},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlTarget",{get:function(){return this.getPropertyValue("urlTarget")},set:function(t){this.setPropertyValue("urlTarget",t)},enumerable:!0,configurable:!0}),e.prototype.urlHandler=function(t){if(Uo(this.url)){var i=this.populateString(this.url);this.urlTarget==="_self"?window.location.href=i:window.open(i,this.urlTarget)}},Object.defineProperty(e.prototype,"swipeOptions",{get:function(){if(!this.interactions.swipeOptions){if(this.virtualParent)return this.virtualParent.swipeOptions;if(this._parent)return this._parent.swipeOptions}return this.interactions.swipeOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"swipeable",{get:function(){return this.getPropertyValue("swipeable")},set:function(t){t=xe(t),this.setPropertyValue("swipeable",t)&&(this.applyCursorStyle(),!t&&!this.isInteractive()||(this.interactions.swipeable=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackable",{get:function(){return this.getPropertyValue("trackable")},set:function(t){t=xe(t),this.setPropertyValue("trackable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.trackable=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wheelable",{get:function(){return this.getPropertyValue("wheelable")},set:function(t){this.setPropertyValue("wheelable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.wheelable=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resizable",{get:function(){return this.getPropertyValue("resizable")},set:function(t){var i=this;t=xe(t),this.setPropertyValue("resizable",t)&&(!t&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.resizable=t,this.interactions.setEventDisposer("sprite-resizable",t,function(){return new Bt([i.events.on("down",i.handleDown,i,!1),i.events.on("resize",i.handleResize,i,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleResize=function(t){if((!this.interactions.isTouchProtected||!t.touch)&&(this._isResized=!0,this.scale=this.interactions.originalScale*t.scale,this.validatePosition(),this.draggable||this.dragWhileResize)){this._isDragged=!1;var i=vs(t.point1,this.htmlContainer,this.svgContainer.cssScale),r=vs(t.point2,this.htmlContainer,this.svgContainer.cssScale),s=No(i,r),o=Ns(t.startPoint1,this._parent),n=Ns(t.startPoint2,this._parent),l=this.interactions.originalPosition,h=this.interactions.originalScale;if(l){var u={x:(o.x-l.x)/h,y:(o.y-l.y)/h},p={x:(n.x-l.x)/h,y:(n.y-l.y)/h},d=No(u,p),c=ki(s,this._parent);this.moveTo({x:c.x-d.x*this.scale,y:c.y-d.y*this.scale},void 0,void 0,!0)}}},Object.defineProperty(e.prototype,"cursorOptions",{get:function(){if(!this.interactions.cursorOptions){if(this.virtualParent)return this.virtualParent.cursorOptions;if(this._parent)return this._parent.cursorOptions}return this.interactions.cursorOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorOverStyle",{set:function(t){this.cursorOptions.overStyle||(this.interactions.cursorOptions={defaultStyle:this.cursorOptions.defaultStyle}),this.cursorOptions.overStyle=t,gt().applyCursorOverStyle(this.interactions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorDownStyle",{set:function(t){this.cursorOptions.downStyle=t},enumerable:!0,configurable:!0}),e.prototype.applyCursorStyle=function(){},Object.defineProperty(e.prototype,"interactionsEnabled",{get:function(){var t=this.getPropertyValue("interactionsEnabled");return t===!1?!1:this.virtualParent?this.virtualParent.interactionsEnabled:this._parent?this._parent.interactionsEnabled:!0},set:function(t){if(t=xe(t),this.setPropertyValue("interactionsEnabled",t)){var i=null;t?this.group.node.style.pointerEvents="":i="none",this.group.node.style.pointerEvents=i}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exporting",{get:function(){return this.getExporting()},set:function(t){this._exporting.set(t,t)},enumerable:!0,configurable:!0}),e.prototype.getExporting=function(){var t=this._exporting.get();if(t)return t;if(this.isStandaloneInstance||!this._parent)t=new ym(this.svgContainer.SVGContainer),t.sprite=this,t.language=this.language,t.numberFormatter=this.numberFormatter,t.dateFormatter=this.dateFormatter,t.durationFormatter=this.durationFormatter,this._exporting.set(t,t);else return this._parent.exporting;return t},Object.defineProperty(e.prototype,"exportable",{get:function(){return this._exportable},set:function(t){var i=this.svgContainer;this._exportable=t,i&&(t?ft(i.nonExportableSprites,this):Ii(i.nonExportableSprites,this)==-1&&i.nonExportableSprites.push(this))},enumerable:!0,configurable:!0}),e.prototype.modalPrefix=function(t){return t=$t.classNamePrefix+t,t},Object.defineProperty(e.prototype,"modal",{get:function(){var t=this.svgContainer;if(t){var i=t.modal;return i.adapter.has("classPrefix",this.modalPrefix)||i.adapter.add("classPrefix",this.modalPrefix),i}},enumerable:!0,configurable:!0}),e.prototype.openModal=function(t,i){var r=this.svgContainer;if(r)return r.openModal(t,i)},e.prototype.closeModal=function(){var t=this.svgContainer;t&&t.closeModal()},Object.defineProperty(e.prototype,"popups",{get:function(){var t=this.svgContainer;if(t){var i=t.popups;return i.template.sprite=this,i.template.adapter.has("classPrefix",this.modalPrefix)||i.template.adapter.add("classPrefix",this.modalPrefix),i}},enumerable:!0,configurable:!0}),e.prototype.openPopup=function(t,i){var r=this.svgContainer;if(r)return r.openPopup(t,i)},e.prototype.closeAllPopups=function(){var t=this.svgContainer;t&&t.closeAllPopups()},Object.defineProperty(e.prototype,"x",{get:function(){return this.getPropertyValue("x")},set:function(t){this.isDragged||this.setPercentProperty("x",t,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelX",{get:function(){var t=J(this.getPixelX(this.x),this.minX,this.maxX);return this._adapterO?this._adapterO.apply("pixelX",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeX",{get:function(){return this._adapterO?this._adapterO.apply("relativeX",this.getRelativeX(this.x)):this.getRelativeX(this.x)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minX",{get:function(){return this.getPropertyValue("minX")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("minX",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.getPropertyValue("maxX")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("maxX",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.getPropertyValue("y")},set:function(t){this.isDragged||this.setPercentProperty("y",t,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelY",{get:function(){var t=J(this.getPixelY(this.y),this.minY,this.maxY);return this._adapterO?this._adapterO.apply("pixelY",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeY",{get:function(){return this._adapterO?this._adapterO.apply("relativeY",this.getRelativeX(this.y)):this.getRelativeX(this.y)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.getPropertyValue("minY")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("minY",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.getPropertyValue("maxY")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("maxY",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx",{get:function(){return this.getPropertyValue("dx")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("dx",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy",{get:function(){return this.getPropertyValue("dy")},set:function(t){P(t)&&(t=H(t,this._positionPrecision,!0),this.setPropertyValue("dy",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.getPropertyValue("rotation")},set:function(t){t=Wt(t),P(t)||(t=0),this.setPropertyValue("rotation",t,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this.getPropertyValue("align")},set:function(t){t=di(t),this.setPropertyValue("align",t)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valign",{get:function(){return this.getPropertyValue("valign")},set:function(t){t=di(t),this.setPropertyValue("valign",t)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalCenter",{get:function(){return this.getPropertyValue("horizontalCenter")},set:function(t){t=di(t),this.setPropertyValue("horizontalCenter",t)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalCenter",{get:function(){return this.getPropertyValue("verticalCenter")},set:function(t){t=di(t),this.setPropertyValue("verticalCenter",t)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){var t=this.getPropertyValue("maxWidth");if(!P(t)&&this._parent){var i=this._parent.maxWidth;return this._parent.layout!="absolute"&&this.align!="none"&&this.align!=null&&(i=i-this.pixelMarginLeft-this.pixelMarginRight),i}return t},set:function(t){this.setMaxWidth(t)},enumerable:!0,configurable:!0}),e.prototype.setMaxWidth=function(t){var i=this.maxWidth,r=this.maxHeight;if(this.setPropertyValue("maxWidth",t)){P(this.relativeWidth)&&this.invalidate();var s={type:"maxsizechanged",target:this,previousWidth:i,previousHeight:r};this.dispatchImmediately("maxsizechanged",s)}},Object.defineProperty(e.prototype,"maxHeight",{get:function(){var t=this.getPropertyValue("maxHeight");if(!P(t)&&this._parent){var i=this._parent.maxHeight;return this._parent.layout!="absolute"&&this.valign!="none"&&this.valign!=null&&(i=i-this.pixelMarginTop-this.pixelMarginBottom),i}return t},set:function(t){this.setMaxHeight(t)},enumerable:!0,configurable:!0}),e.prototype.setMaxHeight=function(t){var i=this.maxWidth,r=this.maxHeight;if(this.setPropertyValue("maxHeight",t)){P(this.relativeHeight)&&this.invalidate();var s={type:"maxsizechanged",target:this,previousWidth:i,previousHeight:r};this.dispatchImmediately("maxsizechanged",s)}},Object.defineProperty(e.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(t){this.setPropertyValue("minWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this.getPropertyValue("minHeight")},set:function(t){this.setPropertyValue("minHeight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.getPropertyValue("width")},set:function(t){var i=this.setPercentProperty("width",t,!0,!1,this._positionPrecision,!0);i&&(this.percentWidth=void 0,this.relativeWidth=void 0,t instanceof _t?(this.percentWidth=t.percent,P(this._pixelWidth)&&(this.maxWidth=void 0),this._pixelWidth=void 0):(this._pixelWidth=Number(t),this.maxWidth=this._pixelWidth),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.getPropertyValue("height")},set:function(t){var i=this.setPercentProperty("height",t,!0,!1,this._positionPrecision,!0);i&&(this.percentHeight=void 0,this._relativeHeight=void 0,t instanceof _t?(this.percentHeight=t.percent,P(this._pixelHeight)&&(this.maxHeight=void 0),this._pixelHeight=void 0):(this._pixelHeight=Number(t),this.maxHeight=this._pixelHeight),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelWidth",{get:function(){var t;P(this.percentWidth)?t=this.maxWidth:P(this._pixelWidth)?t=this._pixelWidth:t=0;var i=this.minWidth;i!=null&&t<i&&(t=i);var r=H(t,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelWidth",r):r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelHeight",{get:function(){var t;P(this.percentHeight)?t=this.maxHeight:P(this._pixelHeight)?t=this._pixelHeight:t=0;var i=this.minHeight;i!=null&&t<i&&(t=i);var r=H(t,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelHeight",r):r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeWidth",{get:function(){var t=this._relativeWidth;if(P(t))return this._adapterO?this._adapterO.apply("relativeWidth",t):t},set:function(t){this._relativeWidth!=t&&(this._relativeWidth=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeHeight",{get:function(){var t=this._relativeHeight;if(P(t))return this._adapterO?this._adapterO.apply("relativeHeight",t):t},set:function(t){this._relativeHeight!=t&&(this._relativeHeight=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"measuredWidth",{get:function(){return this.disabled||this.__disabled?0:this._adapterO?this._adapterO.apply("measuredWidth",this._measuredWidth):this._measuredWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"measuredHeight",{get:function(){return this.disabled||this.__disabled?0:this._adapterO?this._adapterO.apply("measuredHeight",this._measuredHeight):this._measuredHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outerWidth",{get:function(){var t=this.pixelWidth+this.pixelMarginRight+this.pixelMarginLeft;return this._adapterO?this._adapterO.apply("outerWidth",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outerHeight",{get:function(){var t=this.pixelHeight+this.pixelMarginTop+this.pixelMarginBottom;return this._adapterO?this._adapterO.apply("outerHeight",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerWidth",{get:function(){var t=Math.max(0,this.pixelWidth-this.pixelPaddingRight-this.pixelPaddingLeft);return this._adapterO?this._adapterO.apply("innerWidth",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerHeight",{get:function(){var t=Math.max(0,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom);return this._adapterO?this._adapterO.apply("innerHeight",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalScale",{get:function(){var t=this.scale;return this._parent&&(t=t*this._parent.globalScale),this._adapterO?this._adapterO.apply("globalScale",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.getPropertyValue("scale")},set:function(t){t=Wt(t),t<0&&(t=0),t!=this.getPropertyValue("scale")&&(this.setPropertyValue("scale",t,!1,!0),this.handleGlobalScale())},enumerable:!0,configurable:!0}),e.prototype.margin=function(t,i,r,s){return this.marginTop=t,this.marginRight=i,this.marginBottom=r,this.marginLeft=s,this},Object.defineProperty(e.prototype,"marginLeft",{get:function(){return this.getPropertyValue("marginLeft")},set:function(t){this.setPercentProperty("marginLeft",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginRight",{get:function(){return this.getPropertyValue("marginRight")},set:function(t){this.setPercentProperty("marginRight",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginTop",{get:function(){return this.getPropertyValue("marginTop")},set:function(t){this.setPercentProperty("marginTop",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginBottom",{get:function(){return this.getPropertyValue("marginBottom")},set:function(t){this.setPercentProperty("marginBottom",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelMarginRight",{get:function(){var t=this.getPixelX(this.marginRight);return this._adapterO?this._adapterO.apply("pixelMarginRight",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeMarginRight",{get:function(){var t=this.getRelativeX(this.marginRight);return this._adapterO?this._adapterO.apply("relativeMarginRight",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelMarginLeft",{get:function(){var t=this.getPixelX(this.marginLeft);return this._adapterO?this._adapterO.apply("pixelMarginLeft",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeMarginLeft",{get:function(){var t=this.getRelativeX(this.marginLeft);return this._adapterO?this._adapterO.apply("relativeMarginLeft",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelMarginTop",{get:function(){var t=this.getPixelY(this.marginTop);return this._adapterO?this._adapterO.apply("pixelMarginTop",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeMarginTop",{get:function(){var t=this.getRelativeY(this.marginTop);return this._adapterO?this._adapterO.apply("relativeMarginTop",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelMarginBottom",{get:function(){var t=this.getPixelY(this.marginBottom);return this._adapterO?this._adapterO.apply("pixelMarginBottom",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeMarginBottom",{get:function(){var t=this.getRelativeY(this.marginBottom);return this._adapterO?this._adapterO.apply("relativeMarginBottom",t):t},enumerable:!0,configurable:!0}),e.prototype.padding=function(t,i,r,s){return this.paddingTop=t,this.paddingRight=i,this.paddingBottom=r,this.paddingLeft=s,this},Object.defineProperty(e.prototype,"paddingLeft",{get:function(){return this.getPropertyValue("paddingLeft")},set:function(t){this.setPercentProperty("paddingLeft",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingRight",{get:function(){return this.getPropertyValue("paddingRight")},set:function(t){this.setPercentProperty("paddingRight",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingTop",{get:function(){return this.getPropertyValue("paddingTop")},set:function(t){this.setPercentProperty("paddingTop",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingBottom",{get:function(){return this.getPropertyValue("paddingBottom")},set:function(t){this.setPercentProperty("paddingBottom",t,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelPaddingRight",{get:function(){return this.getPixelX(this.paddingRight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePaddingRight",{get:function(){return this.getRelativeX(this.paddingRight)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelPaddingLeft",{get:function(){return this.getPixelX(this.paddingLeft)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePaddingLeft",{get:function(){return this.getRelativeX(this.paddingLeft)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelPaddingTop",{get:function(){return this.getPixelY(this.paddingTop)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePaddingTop",{get:function(){return this.getRelativeY(this.paddingTop)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelPaddingBottom",{get:function(){return this.getPixelY(this.paddingBottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePaddingBottom",{get:function(){return this.getRelativeY(this.paddingBottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getPropertyValue("path")},set:function(t){this.setPath(t)},enumerable:!0,configurable:!0}),e.prototype.setPath=function(t){return this.setPropertyValue("path",t)?(this._adapterO&&(t=this._adapterO.apply("path",t)),this._isPath||((!this.element||this.element.node&&!(this.element.node instanceof SVGPathElement))&&(this.element=this.paper.add("path")),this._isPath=!0),C(t)?this.element.attr({d:t}):this.element.removeAttr("d"),this.invalidatePosition(),this.inited||this.events.once("inited",this.validatePosition,this,!1),!0):!1},Object.defineProperty(e.prototype,"fillModifier",{get:function(){return this.getPropertyValue("fillModifier")},set:function(t){this.setPropertyValue("fillModifier",t)&&this.setFill(this.fill)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeModifier",{get:function(){return this.getPropertyValue("strokeModifier")},set:function(t){this.setPropertyValue("strokeModifier",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillOpacity",{get:function(){return this.getPropertyValue("fillOpacity")},set:function(t){t=pp(t,0,1),this.setPropertyValue("fillOpacity",t)&&this.setSVGAttribute({"fill-opacity":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this.getPropertyValue("fill")},set:function(t){this.setFill(t)},enumerable:!0,configurable:!0}),e.prototype.setFill=function(t){if((!Kt(t)||"r"in t)&&(t=Hi(t)),this.setColorProperty("fill",t)||this.fillModifier){if(t instanceof Dt&&this.fillModifier&&(t=this.fillModifier.modify(t)),this.realFill=t,t instanceof Dt)this.setSVGAttribute({fill:t.toString()});else if(!C(t))this.removeSVGAttribute("fill");else if(t instanceof Ps||t instanceof mi||t instanceof $r){var i=t;i.paper=this.paper,this.setSVGAttribute({fill:'url("'+Xa()+i.id+'")'})}}},Object.defineProperty(e.prototype,"opacity",{get:function(){return this.getPropertyValue("opacity")},set:function(t){t=pp(t,0,1),this.setPropertyValue("opacity",t)&&this.setSVGAttribute({opacity:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this.getPropertyValue("stroke")},set:function(t){this.setStroke(t)},enumerable:!0,configurable:!0}),e.prototype.setStroke=function(t){if((!Kt(t)||"r"in t)&&(t=Hi(t)),this.setColorProperty("stroke",t)||this.strokeModifier){if(t instanceof Dt&&this.strokeModifier&&(t=this.strokeModifier.modify(t)),this.realStroke=t,t instanceof Dt)t.hex=="none"?this.removeSVGAttribute("stroke"):this.setSVGAttribute({stroke:t.toString()});else if(!C(t))this.removeSVGAttribute("stroke");else if(t instanceof Ps||t instanceof mi||t instanceof $r){var i=t;i.paper=this.paper,this.setSVGAttribute({stroke:'url("'+Xa()+i.id+'")'})}}},Object.defineProperty(e.prototype,"strokeOpacity",{get:function(){return this.getPropertyValue("strokeOpacity")},set:function(t){t=pp(t,0,1),this.setPropertyValue("strokeOpacity",t)&&this.setSVGAttribute({"stroke-opacity":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nonScalingStroke",{get:function(){return this.getPropertyValue("nonScalingStroke")},set:function(t){t=xe(t),this.setPropertyValue("nonScalingStroke",t)&&(this.strokeWidth=this.strokeWidth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nonScaling",{get:function(){return this.getPropertyValue("nonScaling")},set:function(t){t=xe(t),this.setPropertyValue("nonScaling",t,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.getPropertyValue("strokeWidth")},set:function(t){t=Wt(t),this.setPropertyValue("strokeWidth",t,!0),this.nonScalingStroke&&(P(t)||(t=1),t=t/this.globalScale),this.setSVGAttribute({"stroke-width":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeDasharray",{get:function(){return this.getPropertyValue("strokeDasharray")},set:function(t){t=di(t),this.setPropertyValue("strokeDasharray",t)&&this.setSVGAttribute({"stroke-dasharray":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeDashoffset",{get:function(){return this.getPropertyValue("strokeDashoffset")},set:function(t){t=Wt(t),this.setPropertyValue("strokeDashoffset",t)&&this.setSVGAttribute({"stroke-dashoffset":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeLinecap",{get:function(){return this.getPropertyValue("strokeLinecap")},set:function(t){this.setPropertyValue("strokeLinecap",t)&&this.setSVGAttribute({"stroke-linecap":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeLinejoin",{get:function(){return this.getPropertyValue("strokeLinejoin")},set:function(t){this.setPropertyValue("strokeLinejoin",t)&&this.setSVGAttribute({"stroke-linejoin":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shapeRendering",{get:function(){return this.getPropertyValue("shapeRendering")},set:function(t){t=di(t),this.setPropertyValue("shapeRendering",t)&&this.setSVGAttribute({"shape-rendering":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelPerfect",{get:function(){return this.getPropertyValue("pixelPerfect")},set:function(t){t=xe(t),t?this._positionPrecision=$t.pixelPerfectPrecision:this._positionPrecision=3,this.setPropertyValue("pixelPerfect",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rtl",{get:function(){return C(this._rtl)?this._rtl:this._topParent?this._topParent.rtl:!1},set:function(t){t=xe(t),this.isBaseSprite&&(this.topParent.rtl=t),this._rtl=t},enumerable:!0,configurable:!0}),e.prototype.show=function(t){return this.showReal(t)},e.prototype.showReal=function(t){var i=this;if(!this.preventShow){var r,s=this.defaultState.properties;if(!this.disabled&&(this.isHidden||!this.visible||this.isHiding||s.opacity!=null&&this.opacity<s.opacity&&!this.isShowing)&&!this.isDisposed()){this.invalid&&this.validate(),this.positionInvalid&&this.validatePosition(),P(t)||(t=this.defaultState.transitionDuration),this._hideAnimation&&(this._hideAnimation.kill(),this._hideAnimation=void 0),this._showHideDisposer&&this.removeDispose(this._showHideDisposer),this._isHidden=!1,this.isHiding=!1,this.isShowing=!0,r=this.applyCurrentState(t),r&&!r.isFinished()?(this._showHideDisposer=r.events.on("animationended",function(){i.isShowing=!1}),this._disposers.push(this._showHideDisposer)):this.isShowing=!1;var o=this.defaultState.properties.visible;C(o)||(o=!0),this.visible=o,this.readerHidden=!1,this.dispatchImmediately("shown")}return r}},e.prototype.hide=function(t){return this.hideReal(t)},e.prototype.hideReal=function(t){var i=this,r;if(!this.isHiding&&this.visible&&!this.isDisposed()){this.tooltip&&this.tooltip.currentSprite==this&&this.hideTooltip(0),this._hideAnimation&&(this._hideAnimation.kill(),this._hideAnimation=void 0),this.isShowing=!1,this._showHideDisposer&&this.removeDispose(this._showHideDisposer);var s=this.hiddenState;s?(r=this.setState(s,t,void 0),r&&!r.isFinished()?(this._hideAnimation=r,this._showHideDisposer=r.events.on("animationended",function(){i.isHiding=!1,i._isHidden=!0,s.properties.visible==!1&&(i.visible=!1)},this),this._disposers.push(this._showHideDisposer),this._disposers.push(r)):(this.isHiding=!1,this._isHidden=!0)):(this.visible=!1,this.isHiding=!1,this._isHidden=!0),this.readerHidden=!0,this.dispatchImmediately("hidden"),this.invalidate()}return P(t)||(t=this.hiddenState.transitionDuration),r},Object.defineProperty(e.prototype,"visible",{get:function(){return this.getVisibility()},set:function(t){t=xe(t),this.setVisibility(t)},enumerable:!0,configurable:!0}),e.prototype.getVisibility=function(){var t=this.getPropertyValue("visible");return C(t)||(t=!0),t},e.prototype.setVisibility=function(t){if(this.setPropertyValue("visible",t)&&(t?this.group.removeAttr("visibility"):this.group.attr({visibility:"hidden"}),this.events.isEnabled("visibilitychanged"))){var i={type:"visibilitychanged",target:this,visible:t};this.events.dispatchImmediately("visibilitychanged",i)}},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this.getPropertyValue("zIndex")},set:function(t){t=Wt(t),this.setPropertyValue("zIndex",t)&&this.dispatch("zIndexChanged")},enumerable:!0,configurable:!0}),e.prototype.toFront=function(){var t=this._parent;t&&t.children.indexOf(this)!=t.children.length-1&&(t.children.moveValue(this,t.children.length-1),this.dispatch("zIndexChanged"))},e.prototype.toBack=function(){var t=this._parent;t&&t.children.indexOf(this)!=0&&(t.children.moveValue(this,0),this.dispatch("zIndexChanged"))},Object.defineProperty(e.prototype,"userClassName",{get:function(){return this.getPropertyValue("userClassName")},set:function(t){this.setPropertyValue("userClassName",t)&&(!t&&this.userClassName&&this.group.removeClass(this.userClassName),this.setClassName())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){if(this._tooltip)return this._tooltip;if(this.virtualParent)return this.virtualParent.tooltip;if(this._parent)return this._parent.tooltip},set:function(t){this._tooltip&&this.removeDispose(this._tooltip),this._tooltip=t,t&&(t.parent=this.tooltipContainer)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipDataItem",{get:function(){var t=this._tooltipDataItem;return t||this.dataItem},set:function(t){this._tooltipDataItem=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipColorSource",{get:function(){return this._tooltipColorSource},set:function(t){this._tooltipColorSource=t},enumerable:!0,configurable:!0}),e.prototype.showTooltip=function(t){this.showTooltipOn=="always"&&!this._tooltip&&this.tooltip&&(this._tooltip=this.tooltip.clone()),!t&&this.tooltipPosition=="pointer"&&this.isHover&&(t=vs(gt().lastPointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale));for(var i=this;i!=null;){if(!i.visible||i.disabled||i.__disabled){this._tooltip&&this._tooltip.visible&&this._tooltip.hide(0);return}i=i.parent}if(C(this.tooltipText)||C(this.tooltipHTML)){var r=this.tooltip,s=this.tooltipDataItem;if(r){r.targetSprite=this;var o=this,n=this.tooltipColorSource;if((r.getStrokeFromObject||r.getFillFromObject)&&n&&(n.isTemplate?s&&qn(s.sprites,function(c){return c.clonedFrom==n?(o=c,!1):!0}):o=n),r.getStrokeFromObject){for(var l=this.stroke,h=o;h.parent!=null&&(l=h.stroke,l==null&&(h=h.parent),l==null););l instanceof Dt?r.background.animate({property:"stroke",to:l},r.animationDuration):r.background.stroke=l}if(r.dataItem=s,r.label.populateStringFrom=this,r.getFillFromObject){for(var u=this.fill,h=o;h.parent!=null;)if(u=h.fill,u==null||u instanceof Dt&&u.rgb==null)h=h.parent;else if(u!=null)break;u==null&&(u=nt("#000000")),u instanceof Dt&&r.visible?r.background.animate({property:"fill",to:u},r.animationDuration):r.background.fill=u,r.autoTextColor&&u instanceof Dt&&(r.label.fill=u.alternative)}var p="";if(this.tooltipHTML&&(r.html=this.tooltipHTML,p=this.tooltipHTML),this.tooltipText&&(r.text=this.tooltipText,p=this.tooltipText),this.updateTooltipPosition(t))if(r.readerDescribedBy=this.uidAttr(),r.label.invalid&&r.label.validate(),p!=null&&p!=""&&r.label.currentText!=""){r&&!r.parent&&(r.parent=this.tooltipContainer);var d=r.defaultState.transitionDuration;return d<=0&&(d=1),r.show(d),r.currentSprite=this,!0}else this.hideTooltip(0);else this.hideTooltip(0)}}return!1},e.prototype.updateTooltipPosition=function(t){var i=this;if(this.tooltipPosition=="pointer"){if(this._interactionDisposer&&this._interactionDisposer.dispose(),this._interactionDisposer=gt().body.events.on("track",function(s){return i.pointTooltipTo(vs(s.point,i.svgContainer.SVGContainer,i.svgContainer.cssScale),!0)}),t)return this.pointTooltipTo(t,!0)}else{var r=Xi({x:this.getTooltipX(),y:this.getTooltipY()},this);return this.pointTooltipTo(r)}},e.prototype.pointTooltipTo=function(t,i){var r=this.tooltip;return r&&this.topParent&&(r.showInViewport||fp(t,{x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight}))?(r.pointTo(t,i),!0):!1},e.prototype.hideTooltip=function(t){if(this.showTooltipOn!="always"){var i=this.tooltip;i&&(i.targetSprite==this&&(i.targetSprite=void 0),i.hide(t),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0))}},Object.defineProperty(e.prototype,"tooltipHTML",{get:function(){return this.getPropertyValue("tooltipHTML")},set:function(t){t=di(t),this.hoverable=!0,this.setPropertyValue("tooltipHTML",t)&&this.tooltip&&this.tooltip.visible&&this.showTooltip()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this.getPropertyValue("tooltipText")},set:function(t){t=di(t),t&&(this.hoverable=!0),this.setPropertyValue("tooltipText",t)&&this.tooltip&&this.tooltip.visible&&this.showTooltip()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipContainer",{get:function(){if(this._tooltipContainer)return this._tooltipContainer;if(this._parent)return this._parent.tooltipContainer},set:function(t){this._tooltipContainer=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipX",{get:function(){return this.getTooltipX()},set:function(t){this.setPercentProperty("tooltipX",t)&&this.tooltip&&this.tooltip.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alwaysShowTooltip",{get:function(){return this.getPropertyValue("showTooltipOn")=="always"},set:function(t){t=xe(t),t&&(this.showTooltipOn="always")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTooltipOn",{get:function(){return this.getPropertyValue("showTooltipOn")},set:function(t){this.setPropertyValue("showTooltipOn",t)&&(t=="hit"&&(this.clickable=!0),this.tooltip&&(t=="always"?this.showTooltip():this.handleAlwaysShowTooltip()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipPosition",{get:function(){return this.getPropertyValue("tooltipPosition")},set:function(t){this.setPropertyValue("tooltipPosition",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipY",{get:function(){return this.getTooltipY()},set:function(t){this.setPercentProperty("tooltipY",t)&&this.tooltip&&this.tooltip.invalidate()},enumerable:!0,configurable:!0}),e.prototype.getTooltipX=function(){var t=this.getPropertyValue("tooltipX");C(t)||(t=N(50));var i;return P(t)&&(i=t),t instanceof _t&&(i=this.maxLeftSelf+this._measuredWidthSelf*t.value-this.pixelPaddingLeft-this.ex),P(i)||(i=0),i},e.prototype.getTooltipY=function(){var t=this.getPropertyValue("tooltipY");C(t)||(t=N(50));var i;return P(t)&&(i=t),t instanceof _t&&(i=this.maxTopSelf+this._measuredHeightSelf*t.value-this.pixelPaddingTop-this.ey),P(i)||(i=0),i},e.prototype.raiseCriticalError=function(t,i){this.svgContainer&&(this._adapterO?this.modal.content=this._adapterO.apply("criticalError",t).message:this.modal.content=t.message,i?this.modal.closable=!0:this.disabled=!0,$t.suppressErrors||this.modal.open()),$t.verbose&&console.log(t)},e.prototype.processConfig=function(t){t&&(C(t.tooltipColorSource)&&vt(t.tooltipColorSource)&&this.map.hasKey(t.tooltipColorSource)&&(t.tooltipColorSource=this.map.getKey(t.tooltipColorSource)),C(t.cursorOverStyle)&&vt(t.cursorOverStyle)&&(t.cursorOverStyle=this.getCursorStyle(t.cursorOverStyle)),C(t.cursorDowntyle)&&vt(t.cursorDowntyle)&&(t.cursorDowntyle=this.getCursorStyle(t.cursorDowntyle)),C(t.cursorOptions)&&(C(t.cursorOptions.overStyle)&&vt(t.cursorOptions.overStyle)&&(t.cursorOptions.overStyle=this.getCursorStyle(t.cursorOptions.overStyle)),C(t.cursorOptions.downStyle)&&vt(t.cursorOptions.downStyle)&&(t.cursorOptions.downStyle=this.getCursorStyle(t.cursorOptions.downStyle)))),a.prototype.processConfig.call(this,t),this.processDelayedMap()},e.prototype.getCursorStyle=function(t){switch(t){case"grab":return Le.grab;case"grabbing":return Le.grabbing;case"pointer":return Le.pointer;case"horizontalResize":return Le.horizontalResize;case"verticalResize":return Le.verticalResize;default:return Le.default}},e.prototype.configOrder=function(t,i){return t==i?0:t=="tooltipColorSource"?1:i=="tooltipColorSource"?-1:a.prototype.configOrder.call(this,t,i)},Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._isHidden?this._isHidden:this._parent?this._parent.isHidden:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showOnInit",{get:function(){return this.getPropertyValue("showOnInit")},set:function(t){t=xe(t),this.setShowOnInit(t)},enumerable:!0,configurable:!0}),e.prototype.setShowOnInit=function(t){this.setPropertyValue("showOnInit",t)&&(this.isTemplate||(t&&!this.inited&&!this.hidden?(this._showOnInitDisposer=new Bt([w.events.once("enterframe",this.hideInitially,this),this.events.once("beforevalidated",this.hideInitially,this,!1),this.events.on("inited",this.appear,this,!1)]),this._disposers.push(this._showOnInitDisposer)):this._showOnInitDisposer&&this._showOnInitDisposer.dispose()))},e.prototype.hideInitially=function(){this.isDisposed()||(this.appeared=!1,this.inited||this.hide(0))},e.prototype.appear=function(){var t=this;if(this.appeared=!1,!this.hidden&&!this.isHidden&&this.hide(0),this.hidden)this.appeared=!0,this.dispatch("appeared");else{var i=this.show();i&&!i.isFinished()?this.addDisposer(i.events.on("animationended",function(){t.appeared=!0,t.dispatch("appeared")})):(this.appeared=!0,this.dispatch("appeared"))}},Object.defineProperty(e.prototype,"hidden",{get:function(){return this.getPropertyValue("hidden")},set:function(t){t=xe(t),this.setPropertyValue("hidden",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this._bbox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"plugins",{get:function(){var t=this;return this._plugins||(this._plugins=new wt,this._disposers.push(this._plugins.events.on("inserted",function(i){i.newValue.target=t,i.newValue.init()})),this._disposers.push(new Ft(this._plugins))),this._plugins},enumerable:!0,configurable:!0}),e.prototype._systemUpdate=function(t){this.validate()},e.prototype._systemCheckIfValidate=function(){return!0},e.prototype._systemValidatePositions=function(){this.validatePosition()},e.prototype._systemValidateLayouts=function(){},e})(fi);w.registeredClasses.Sprite=rt;var vm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._rules=new wt,t._appliedRules={},t._appliedTargets=[],t._useDefault=!0,t.adapter=new Ve(t),t._enabled=!1,t._responsiveDisposers=[],t._noStates=[],t.className="Responsive",t.rules.events.on("inserted",function(){t.checkRules()},!0),t.rules.events.on("removed",function(){t.checkRules()},!0),t._disposers.push(t.rules.events),t.applyTheme(),t}return Object.defineProperty(e.prototype,"component",{get:function(){return this._component},set:function(t){var i=this;t!=this._component&&(this.disposeResponsiveHandlers(),this._component=t,this._responsiveDisposers.push(ee(this.component).events.on("sizechanged",function(){i.checkRules()},this)),this._responsiveDisposers.push(ee(this.component).events.once("datavalidated",function(){i._component.isReady()&&i.checkRules(!0)},this)),this.enabled=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this.adapter.apply("enabled",this._enabled)},set:function(t){this._enabled!=t&&(this._enabled=t,this.applyRules())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useDefault",{get:function(){return this.adapter.apply("useDefault",this._useDefault)},set:function(t){this._useDefault!=t&&(this._useDefault=t,this.applyRules())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rules",{get:function(){return this.adapter.apply("rules",this._rules)},set:function(t){this._rules=t,this._enabled=!0,this.applyRules()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultRules",{get:function(){return this.adapter.apply("defaultRules",De)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allRules",{get:function(){var t=new wt;return this.useDefault&&t.copyFrom(this.defaultRules),t.copyFrom(this.rules),this.adapter.apply("allRules",t)},enumerable:!0,configurable:!0}),e.prototype.isApplied=function(t){var i=this._appliedRules[t];return C(i)?i:!1},e.prototype.checkRules=function(t){var i=this;t===void 0&&(t=!1);var r=this.allRules;if(!(!r||r.length==0)){var s=!1,o=ee(this.component);if(!(o.pixelWidth==0||o.pixelHeight==0)&&(E(r.iterator(),function(n){n.id||(n.id=w.getUniqueId());var l=n.relevant(o);(l&&!i.isApplied(n.id)||!l&&i.isApplied(n.id))&&(s=!0),i._appliedRules[n.id]=l}),t&&(s=!0),s)){if(!this.component.isReady()){o.hidden=!0,o.events.once("ready",function(n){n.target.show(0),i._applyRules()});return}this.dispatchImmediately("ruleschanged"),this._applyRules()}}},e.prototype._applyRules=function(){var t=this;this._timeout&&this._timeout.dispose(),this._timeout=this.setTimeout(function(){t.applyRules()},10)},e.prototype.applyRules=function(t){var i=this,r=C(t)?t:ee(this.component),s=!1;if(this.enabled){var o=!1;E(this.allRules.iterator(),function(n){var l=i.getState(n,r);l&&(s||(Ii(i._appliedTargets,r.uid)!==-1&&r.setState(i.getDefaultState(r),0),s=!0),i.isApplied(ee(n.id))&&(l.transitionDuration=0,i.setTargetState(r,l),i.dispatchImmediately("ruleapplied",{rule:n}),o=!0))}),o?Xv(this._appliedTargets,r.uid):ft(this._appliedTargets,r.uid)}r.children&&E(r.children.iterator(),function(n){i.applyRules(n)})},e.prototype.getState=function(t,i){var r="responsive-"+t.id,s=i.uid+"_"+r;if(Ii(this._noStates,s)===-1){if(i.states.hasKey(r))return i.states.getKey(r);var o=t.state(i,r);return o||this._noStates.push(s),o}},e.prototype.getDefaultState=function(t){return t.states.hasKey("responsive-default")?t.states.getKey("responsive-default"):t.states.create("responsive-default")},e.prototype.setTargetState=function(t,i){var r=this,s=this.getDefaultState(t);at(i.properties,function(o,n){C(s.properties[o])||(s.properties[o]=r.getValue(t,o))}),t.setState(i)},e.prototype.getValue=function(t,i){var r=t.getPropertyValue(i);return!C(r)&&C(t[i])&&(r=t[i]),r},e.prototype.dispose=function(){this.disposeResponsiveHandlers(),a.prototype.dispose.call(this)},e.prototype.disposeResponsiveHandlers=function(){for(var t=this._responsiveDisposers.pop();t;)t.dispose(),t=this._responsiveDisposers.pop()},e})(fi);var De=new wt;De.events.on("inserted",function(a){a.newValue.id=w.getUniqueId()});var Fe=(function(){function a(){}return a.widthXXS=function(e){return e.pixelWidth<=a.XXS},a.widthXS=function(e){return e.pixelWidth<=a.XS},a.widthS=function(e){return e.pixelWidth<=a.S},a.widthM=function(e){return e.pixelWidth<=a.M},a.widthL=function(e){return e.pixelWidth<=a.L},a.widthXL=function(e){return e.pixelWidth<=a.XL},a.widthXXL=function(e){return e.pixelWidth<=a.XXL},a.heightXXS=function(e){return e.pixelHeight<=a.XXS},a.heightXS=function(e){return e.pixelHeight<=a.XS},a.heightS=function(e){return e.pixelHeight<=a.S},a.heightM=function(e){return e.pixelHeight<=a.M},a.heightL=function(e){return e.pixelHeight<=a.L},a.heightXL=function(e){return e.pixelHeight<=a.XL},a.heightXXL=function(e){return e.pixelHeight<=a.XXL},a.isXXS=function(e){return e.pixelWidth<=a.XXS&&e.pixelHeight<=a.XXS},a.isXS=function(e){return e.pixelWidth<=a.XS&&e.pixelHeight<=a.XS},a.isS=function(e){return e.pixelWidth<=a.S&&e.pixelHeight<=a.S},a.isM=function(e){return e.pixelWidth<=a.M&&e.pixelHeight<=a.M},a.isL=function(e){return e.pixelWidth<=a.L&&e.pixelHeight<=a.L},a.isXL=function(e){return e.pixelWidth<=a.XL&&e.pixelHeight<=a.XL},a.isXXL=function(e){return e.pixelWidth<=a.XXL&&e.pixelHeight<=a.XXL},a.maybeXXS=function(e){return e.pixelWidth<=a.XXS||e.pixelHeight<=a.XXS},a.maybeXS=function(e){return e.pixelWidth<=a.XS||e.pixelHeight<=a.XS},a.maybeS=function(e){return e.pixelWidth<=a.S||e.pixelHeight<=a.S},a.maybeM=function(e){return e.pixelWidth<=a.M||e.pixelHeight<=a.M},a.maybeL=function(e){return e.pixelWidth<=a.L||e.pixelHeight<=a.L},a.maybeXL=function(e){return e.pixelWidth<=a.XL||e.pixelHeight<=a.XL},a.maybeXXL=function(e){return e.pixelWidth<=a.XXL||e.pixelHeight<=a.XXL},a.XXS=100,a.XS=200,a.S=300,a.M=400,a.L=600,a.XL=800,a.XXL=1e3,a})();var Me=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.isOversized=!1,t.className="Label",t.fill=new ct().getFor("text"),t.wrap=!1,t.truncate=!1,t.fullWords=!0,t.ellipsis="\u2026",t.textAlign="start",t.textValign="top",t.layout="absolute",t.baseLineRatio=-.27,t._positionPrecision=1,t.events.on("maxsizechanged",function(){t.inited&&t.handleMaxSize()},t,!1),t.events.once("validated",t.handleValidate,t,!1),t.applyTheme(),t}return e.prototype.afterDraw=function(){a.prototype.afterDraw.call(this),this.validatePosition()},e.prototype.setPaper=function(t){var i=a.prototype.setPaper.call(this,t);return i&&this.hardInvalidate(),i},e.prototype.handleValidate=function(){(this.currentText||this.text)&&(this.bbox.width==0||this.bbox.height==0)&&w.events.once("exitframe",this.hardInvalidate,this)},e.prototype.handleMaxSize=function(){(this.bbox.width>this.availableWidth||this.bbox.width<this.availableWidth&&(this.isOversized||this.truncate)||this.bbox.height>this.availableHeight||this.bbox.height<this.availableHeight&&this.isOversized)&&this.invalidate()},e.prototype.arrange=function(){},e.prototype.updateCurrentText=function(){var t,i;Uo(this.html)&&this.paper.supportsForeignObject()?(t="html",i=this.html):(t="svg",i=this.text),Kt(i)&&(i=i.toString()),C(i)&&i!==""&&(i=this.populateString(i,this.dataItem)),t=="html"?this._adapterO&&(i=this._adapterO.apply("htmlOutput",i)):this._adapterO&&(i=this._adapterO.apply("textOutput",i));var r=i!=this.currentText||t!=this._currentFormat;return this.currentText=i,this._currentFormat=t,r},e.prototype.hardInvalidate=function(){this._prevStatus="",this.invalidate()},e.prototype.getLineBBox=function(t){var i=t&&t.element,r=i&&i.node;r&&r.parentNode&&(t.bbox=i.getBBox())},e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.bbox.width,i=this.bbox.height,r=this.topParent;if(r&&(!r.maxWidth||!r.maxHeight)){r.events.once("maxsizechanged",this.hardInvalidate,this,!1);return}var s=mt(this.availableWidth-this.pixelPaddingLeft-this.pixelPaddingRight,0),o=mt(this.availableHeight-this.pixelPaddingTop-this.pixelPaddingBottom,0),n=o+","+s+this.wrap+this.truncate+this.fullWords+this.rtl+this.ellipsis;if(!(!this.updateCurrentText()&&this.inited&&this._prevStatus==n)){this._measuredWidth=0,this._measuredHeight=0,this.isOversized=!1;var l=this._currentFormat,h=this.currentText;if(!C(h)||h==""){this.element.attr({display:"none"});return}var u=h.split(`
22
+ `);this._prevStatus=n,this.textAlign=this.textAlign;var p=this.group.getAttr("display");if(p=="none"&&this.group.removeAttr("display"),this.textPathElement&&this.textPathElement.removeChildren(),l==="svg"){this.element.removeAttr("display");var d=this.element;this.resetBBox();for(var c=0,f="",g=0;g<u.length;g++){var m=u[g];if(m==""){var y=this.getSVGLineElement("",0);y.add(this.getSvgElement(".",fr().translateStyleShortcuts(f))),d.add(y);var v=Math.ceil(y.getBBox().height);v>0&&(c+=v),d.removeElement(y);var x=this.getLineInfo(g);x&&(x.text="",x.element.textContent="");continue}var _=fr().chunk(m,null,this.ignoreFormatting),$=0,T=!0,S=!1,k=this.getLineInfo(g);k?(k.text="",k.element.textContent=""):(k={text:"",element:this.getSVGLineElement("",0),complex:!1},d.add(k.element)),k.element.removeAttr("display"),k.element.removeChildren(),this.textPathElement&&k.element.add(this.textPathElement);for(var A=0;A<_.length;A++){A&&(k.complex=!0);var L=_[A];if(L.type==="format")f=L.text;else{if(S)continue;if(k.text=L.text,k.style=fr().translateStyleShortcuts(f),this.textPathElement?this.getSvgElement(k.text,k.style,this.textPathElement):this.getSvgElement(k.text,k.style,k.element),this.getLineBBox(k),k.bbox.width=Math.ceil(k.bbox.width),$<k.bbox.height&&($=k.bbox.height),(this.wrap||this.truncate)&&k.bbox.width>s){this.isOversized=!0;var O=k.element.textContent,I=k.bbox.width/O.length,R=Pt(Math.ceil((k.bbox.width-s)/I),O.length);if(this.truncate){var B=!1,Z=k.element.node;if(Z&&Z.childNodes)for(var j=k.element.node.childNodes.length-1;j>=0;j--){var it=k.element.node.childNodes[j];if(B&&k.bbox.width<=s&&(it.textContent+=" "+this.ellipsis,k.bbox=k.element.getBBox(),k.bbox.width=Math.floor(k.bbox.width),k.bbox.width<=s))break;B=!1;var st=it.textContent;for(O=k.element.textContent,R=Pt(Math.ceil((k.bbox.width-s)/I),O.length);k.bbox.width>s&&R<=O.length&&R>0;){var ht=mt(O.length-R-this.ellipsis.length,1);ht<=1&&(R=0,j>0&&(B=!0,k.element.node.removeChild(it))),st=rl(st,ht,this.ellipsis,this.fullWords,this.rtl),st.length>ht&&this.fullWords&&(st=rl(st,ht,this.ellipsis,!1,this.rtl)),it.textContent=st,k.bbox=k.element.getBBox(),k.bbox.width=Math.floor(k.bbox.width),R=Math.ceil(R*1.1)}S=!0}}else{var dt=k.element.node;if(dt){for(var Xt=k.element.node.lastChild,tt=void 0;k.bbox.width>s&&R<=O.length&&R>0;){var ht=mt(L.text.length-R,1);if(T?tt=xh(L.text,ht,!0,this.rtl):(tt=xh(L.text,ht,!0,this.rtl,!1),(tt[0].length>ht||ht===1)&&(k.element.node.removeChild(Xt),R=0)),R>0){var Tt=tt.shift();T&&(Tt=_h(Tt)),Xt.textContent=fr().cleanUp(Tt)}k.bbox=k.element.getBBox(),k.bbox.width=Math.floor(k.bbox.width),R++}if(tt.length>0){var Nt="";C(tt)&&(this.rtl?Nt+=tt.join("")+f:Nt+=f+tt.join("").replace(/([\[\]]{1})/g,"$1$1"));for(var Pe=A+1;Pe<_.length;Pe++)_[Pe].type=="value"?Nt+=_[Pe].text.replace(/([\[\]]{1})/g,"$1$1"):Nt+=_[Pe].text;u.splice(g+1,0,Nt)}S=!0}}}this.bbox.width<k.bbox.width&&(this.bbox.width=k.bbox.width),this.bbox.height=c+$,this.textPathElement?k.element.attr({dy:-this.paddingBottom.toString()}):k.element.attr({x:"0",y:c+$,dy:H(this.baseLineRatio*$,3).toString()}),T=!1}}var ye=k.element.node;if(ye){var Xt=ye.lastChild;Xt&&(Xt.textContent=this.rtl?Ff(Xt.textContent):Lf(Xt.textContent))}c+=$,this.addLineInfo(k,g)}this.maybeHideOversized(),this.measureFailed=!1,(this.bbox.width==0||this.bbox.height==0)&&(this.measureFailed=!0),this._measuredWidth=H(mt(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight)),this._measuredHeight=H(mt(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom)),this.alignSVGText(),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,(i!=this._measuredHeight||t!=this._measuredWidth)&&this.dispatch("transformed"),this.hideUnused(u.length)}else{this.element.removeAttr("display"),this.resetBBox();var d=this.element;d.removeChildren(),this.setCache("lineInfo",[],0);var ke=this.paper.foreignObject();d.add(ke),this.maxWidth&&ke.attr({width:this.maxWidth-this.pixelPaddingLeft-this.pixelPaddingRight}),this.maxHeight&&ke.attr({height:this.maxHeight-this.pixelPaddingTop-this.pixelPaddingBottom});var We=this.getHTMLLineElement(h);ke.node.appendChild(We),We.style.display="inline-block";var ae=We.clientWidth,Zi=We.clientHeight;We.style.display="block",this._bbox={x:0,y:0,width:ae,height:Zi},ke.attr({width:ae+1,height:Zi}),this.maybeHideOversized(),this._measuredWidth=mt(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight),this._measuredHeight=mt(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,this.truncate&&(We.style.overflow="hidden"),(ae>s||Zi>o)&&(this.isOversized=!0)}this.setStyles(),this.updateCenter(),this.updateBackground(),p=="none"&&this.group.attr({display:"none"}),this.pathElement&&this.paper.appendDef(this.pathElement)}},e.prototype.maybeHideOversized=function(){this.hideOversized&&(this.availableWidth<this.bbox.width||this.availableHeight<this.bbox.height?(this.element.attr({display:"none"}),this.isOversized=!0):(this.element.removeAttr("display"),this.isOversized=!1))},e.prototype.alignSVGText=function(){var t=this.element,i=t.node.children||t.node.childNodes;if(!(!i||i&&i.length==0)){var r=this._measuredWidth,s=this._measuredHeight;this.pixelPaddingLeft,this.pixelPaddingRight,this.pixelPaddingTop,this.pixelPaddingBottom,this.rtl?t.attr({direction:"rtl"}):t.removeAttr("direction");for(var o=i.length-1;o>=0;o--){var n=i[o];if(n.setAttribute("text-anchor",this.textAlign),this.textPathElement)n.removeAttribute("x"),n.removeAttribute("y");else{switch(this.textAlign){case"middle":n.setAttribute("x",(r/2).toString()+"px");break;case"end":this.rtl||n.setAttribute("x",r.toString());break;default:this.rtl?n.setAttribute("x",r.toString()):n.removeAttribute("text-anchor");break}var l=Wt(n.getAttribute("y"));switch(this.textValign){case"middle":n.setAttribute("y",((l||0)+(s-this.bbox.height)/2).toString());break;case"bottom":n.setAttribute("y",((l||0)+s-this.bbox.height).toString());break;default:n.setAttribute("y",(l||0).toString());break}}}}},e.prototype.getSVGLineElement=function(t,i){var r=this.paper.addGroup("text");return r.textContent=t,r.attr({x:"0"}),C(i)&&r.attr({y:i.toString()}),(this.truncate||this.wrap)&&r.attr({overflow:"hidden"}),r},Object.defineProperty(e.prototype,"rtl",{get:function(){return C(this._rtl)?this._rtl:this._topParent?this._topParent.rtl:!1},set:function(t){t=xe(t),this._rtl=t,this.element&&this.alignSVGText()},enumerable:!0,configurable:!0}),e.prototype.resetBBox=function(){this._bbox={x:0,y:0,width:0,height:0}},e.prototype.getHTMLLineElement=function(t){var i=document.createElement("div");switch(i.innerHTML=t,this.textAlign){case"middle":i.style.textAlign="center";break;case"end":i.style.textAlign="right";break}return this.wrap?i.style.wordWrap="break-word":i.style.whiteSpace="nowrap",this.rtl&&(i.style.direction="rtl"),C(this.fill)&&(i.style.color=this.fill.toString()),i},e.prototype.setStyles=function(){var t=this.element;!this.selectable||this.draggable||this.resizable||this.swipeable?t.addStyle({webkitUserSelect:"none",msUserSelect:"none"}):this.selectable&&(t.removeStyle("webkitUserSelect"),t.removeStyle("msUserSelect"))},e.prototype.hideUnused=function(t){this.initLineCache();var i=this.getCache("lineInfo");if(i.length>=t)for(var r=t;r<i.length;r++){var s=i[r];s&&s.element&&s.element.attr({display:"none"})}},Object.defineProperty(e.prototype,"text",{get:function(){return this.getPropertyValue("text")},set:function(t){this.setPropertyValue("text",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getPropertyValue("path")},set:function(t){this.setPropertyValue("path",t,!0)&&(this.pathElement&&this.pathElement.dispose(),this.textPathElement&&this.textPathElement.dispose(),this.pathElement=this.paper.add("path"),this.pathElement.attr({d:t}),this.pathElement.attr({id:"text-path-"+this.uid}),this._disposers.push(this.pathElement),this.textPathElement=this.paper.addGroup("textPath"),this.textPathElement.attrNS(hl,"xlink:href","#text-path-"+this.uid),this.textPathElement.attr({path:t}),this._disposers.push(this.textPathElement),this.hardInvalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locationOnPath",{get:function(){return this.getPropertyValue("locationOnPath")},set:function(t){this.setPropertyValue("locationOnPath",t),this.textPathElement&&this.textPathElement.attr({startOffset:t*100+"%"})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseLineRatio",{get:function(){return this.getPropertyValue("baseLineRatio")},set:function(t){this.setPropertyValue("baseLineRatio",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrap",{get:function(){return this.getPropertyValue("wrap")},set:function(t){this.resetBBox(),this.setPropertyValue("wrap",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"truncate",{get:function(){return this.getPropertyValue("truncate")},set:function(t){this.resetBBox(),this.setPropertyValue("truncate",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullWords",{get:function(){return this.getPropertyValue("fullWords")},set:function(t){this.setPropertyValue("fullWords",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ellipsis",{get:function(){return this.getPropertyValue("ellipsis")},set:function(t){this.setPropertyValue("ellipsis",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectable",{get:function(){return this.getPropertyValue("selectable")},set:function(t){this.setPropertyValue("selectable",t,!0),this.setStyles()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textAlign",{get:function(){return this.getPropertyValue("textAlign")},set:function(t){this.setPropertyValue("textAlign",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textValign",{get:function(){return this.getPropertyValue("textValign")},set:function(t){this.setPropertyValue("textValign",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.getPropertyValue("html")},set:function(t){if(this.setPropertyValue("html",t,!0),!C(t)){var i=this.element;i.removeChildrenByTag("foreignObject")}},enumerable:!0,configurable:!0}),e.prototype.setFill=function(t){if(a.prototype.setFill.call(this,t),this.html)for(var i=this.element,r=i.node.getElementsByTagName("div"),s=0;s<r.length;s++){var o=r[s];C(this.fill)&&(o.style.color=this.fill.toString())}},Object.defineProperty(e.prototype,"hideOversized",{get:function(){return this.getPropertyValue("hideOversized")},set:function(t){this.setPropertyValue("hideOversized",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ignoreFormatting",{get:function(){return this.getPropertyValue("ignoreFormatting")},set:function(t){this.setPropertyValue("ignoreFormatting",t,!0)},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){},e.prototype.getLineInfo=function(t){this.initLineCache();var i=this.getCache("lineInfo");return i.length>t?i[t]:void 0},e.prototype.addLineInfo=function(t,i){this.initLineCache(),this.getCache("lineInfo")[i]=t},e.prototype.initLineCache=function(){C(this.getCache("lineInfo"))||this.setCache("lineInfo",[],0)},e.prototype.setDataItem=function(t){this._sourceDataItemEvents&&this._sourceDataItemEvents.dispose(),t&&(this._sourceDataItemEvents=new Bt([t.events.on("valuechanged",this.invalidate,this,!1),t.events.on("workingvaluechanged",this.invalidate,this,!1),t.events.on("calculatedvaluechanged",this.invalidate,this,!1),t.events.on("propertychanged",this.invalidate,this,!1)])),a.prototype.setDataItem.call(this,t)},Object.defineProperty(e.prototype,"availableWidth",{get:function(){return C(this.maxWidth)?this.maxWidth:this.pixelWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"availableHeight",{get:function(){return C(this.maxHeight)?this.maxHeight:this.pixelHeight},enumerable:!0,configurable:!0}),e.prototype.getSvgElement=function(t,i,r){var s=this.paper.add("tspan");if(s.textContent=t,i)if($t.nonce&&r){var o="amcharts_element_style_"+btoa(i).replace(/[^\w]*/g,"");s.node.setAttribute("class",o);var n=document.createElementNS(za,"defs");r.node.appendChild(n);var l=document.createElement("style");l.type="text/css",l.innerHTML="."+o+" { "+i+"}",l.setAttribute("nonce",$t.nonce),n.appendChild(l)}else s.node.setAttribute("style",i);return r&&r.add(s),s},e.prototype.deepInvalidate=function(){a.prototype.deepInvalidate.call(this),this.hardInvalidate()},Object.defineProperty(e.prototype,"readerTitle",{get:function(){var t=this.getPropertyValue("readerTitle");return t?this.dataItem&&(t=this.populateString(t)):t=this.populateString(sl(Uo(this.html)?this.html:this.text)),t},set:function(t){t=di(t),this.setPropertyValue("readerTitle",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.Label=Me;De.push({relevant:Fe.heightXS,state:function(a,e){if(a instanceof Me&&a.parent&&a.parent.isBaseSprite){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var $i=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RoundedRectangle",t.element=t.paper.add("path"),t.cornerRadius(3,3,3,3),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.innerWidth,i=this.innerHeight;if(P(t)&&P(i)){var r=Pt(t,i)/2,s=te(this.cornerRadiusTopLeft,r),o=te(this.cornerRadiusTopRight,r),n=te(this.cornerRadiusBottomRight,r),l=te(this.cornerRadiusBottomLeft,r),h=Pt(Math.abs(t/2),Math.abs(i/2)),u=J(s,0,h),p=J(o,0,h),d=J(n,0,h),c=J(l,0,h),f="M"+u+",0 L"+(t-p)+",0",g=" L"+c+","+i,m=" L0,"+u,y=" L"+t+","+(i-d),v=" a"+p+","+p+" 0 0 1 "+p+","+p,x=" a"+d+","+d+" 0 0 1 -"+d+","+d,_=" a"+c+","+c+" 0 0 1 -"+c+",-"+c,$=" a"+u+","+u+" 0 0 1 "+u+",-"+u,T=f+v+y+x+g+_+m+$+" Z";this.path=T}},e.prototype.cornerRadius=function(t,i,r,s){this.cornerRadiusTopLeft=t,this.cornerRadiusTopRight=i,this.cornerRadiusBottomLeft=r,this.cornerRadiusBottomRight=s},Object.defineProperty(e.prototype,"cornerRadiusTopLeft",{get:function(){return this.getPropertyValue("cornerRadiusTopLeft")},set:function(t){this.setPercentProperty("cornerRadiusTopLeft",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusTopRight",{get:function(){return this.getPropertyValue("cornerRadiusTopRight")},set:function(t){this.setPercentProperty("cornerRadiusTopRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusBottomRight",{get:function(){return this.getPropertyValue("cornerRadiusBottomRight")},set:function(t){this.setPercentProperty("cornerRadiusBottomRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusBottomLeft",{get:function(){return this.getPropertyValue("cornerRadiusBottomLeft")},set:function(t){this.setPercentProperty("cornerRadiusBottomLeft",t,!0)},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.RoundedRectangle=$i;var Bh=(function(){function a(){}return a.prototype.parse=function(e){return[]},Object.defineProperty(a.prototype,"parsableNumbers",{get:function(){return this.options.numberFields&&this.options.numberFields.length>0},enumerable:!0,configurable:!0}),a.prototype.maybeToNumber=function(e,t){return this.options.numberFields.indexOf(e)!==-1?al(t):t},Object.defineProperty(a.prototype,"parsableDates",{get:function(){return this.options.dateFields&&this.options.dateFields.length>0},enumerable:!0,configurable:!0}),a.prototype.maybeToDate=function(e,t){return this.options.dateFields.indexOf(e)!==-1?this.options.dateFormatter.parse(t,this.dateFormat):t},a.prototype.maybeToEmpty=function(e){return(!C(e)||e=="")&&C(this.options.emptyAs)?this.options.emptyAs:e},Object.defineProperty(a.prototype,"dateFormatter",{get:function(){return this.options.dateFormatter||(this.options.dateFormatter=new js,this.options.dateFormat&&(this.options.dateFormat=this.options.dateFormat)),this.options.dateFormatter},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dateFormat",{get:function(){return this.options.dateFormat||this.dateFormatter.inputDateFormat},enumerable:!0,configurable:!0}),a})();var JP=[",",";"," "],tn=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.contentType="text/csv",t.options={delimiter:"",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1},t}return e.isCSV=function(t){return!!e.getDelimiterFromData(t)},e.getDelimiterFromData=function(t){var i=t.split(`
23
+ `),r=i.length,s;return W(JP,function(o){for(var n=0,l=0,h=0;h<r;++h)if(n=i[h].split(o).length,n>1){if(l===0)l=n;else if(n!=l){l=0;break}}else{l=0;break}l&&(s=o)}),s},e.prototype.parse=function(t){this.options.delimiter||(this.options.delimiter=e.getDelimiterFromData(t));var i=this.CSVToArray(t,this.options.delimiter),r=C(this.options.emptyAs),s=this.parsableNumbers,o=this.parsableDates,n=[],l=[],h,u;for(u=0;u<this.options.skipRows;u++)i.shift();if(this.options.useColumnNames){l=i.shift();for(var p=0;p<l.length;p++)h=C(l[p])?l[p].replace(/^\s+|\s+$/gm,""):"",h===""&&(h="col"+p),l[p]=h}for(var d;d=this.options.reverse?i.pop():i.shift(),!!d;)if(!(this.options.skipEmpty&&d.length===1&&d[0]==="")){var c={};for(u=0;u<d.length;u++)h=l[u]===void 0?"col"+u:l[u],c[h]=d[u]===""?this.options.emptyAs:d[u],r&&(c[h]=this.maybeToEmpty(c[h])),s&&(c[h]=this.maybeToNumber(h,c[h])),o&&(c[h]=this.maybeToDate(h,c[h]));n.push(c)}return n},e.prototype.CSVToArray=function(t,i){i=i||",";for(var r=new RegExp("(\\"+i+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+i+"\\r\\n]*))","gi"),s=[[]],o=null;o=r.exec(t),!!o;){var n=o[1];n.length&&n!==i&&s.push([]);var l=void 0;o[2]?l=o[2].replace(new RegExp('""',"g"),'"'):l=o[3],s[s.length-1].push(l)}return s},e})(Bh);var Ka=(function(a){D(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.contentType="application/json",t.options={},t}return e.isJSON=function(t){try{return JSON.parse(t),!0}catch{return!1}},e.prototype.parse=function(t){var i=this,r;try{C(JSON)&&(r=JSON.parse(t))}catch{return}var s=C(this.options.emptyAs),o=this.parsableNumbers,n=this.parsableDates;if(Array.isArray(r)&&(o||n||s))for(var l=function(p,d){var c=r[p];at(c,function(f,g){s&&(c[f]=i.maybeToEmpty(c[f])),o&&(c[f]=i.maybeToNumber(f,c[f])),n&&(c[f]=i.maybeToDate(f,c[f]))})},h=0,u=r.length;h<u;h++)l(h,u);return r},e})(Bh);var kb=(function(){function a(){this.adapter=new Ve(this)}return a.prototype.load=function(e){var t=Array.isArray(e)?e:[e],i=da(t,function(r){return r.dispatchImmediately("started"),r.dispatchImmediately("loadstarted"),bl(r.url,r,r.requestOptions)});Promise.all(i).then(function(r){W(r,function(s){var o=s.target;o.dispatchImmediately("loadended"),s.error?o.events.isEnabled("error")&&o.events.dispatchImmediately("error",{type:"error",code:s.xhr.status,message:o.language.translate("Unable to load file: %1",null,o.url),target:o}):o.processData(s.response,s.type),o.dispatchImmediately("ended")})}).catch(function(r){r.target&&(r.target.dispatchImmediately("loadended"),r.target.events.isEnabled("error")&&r.target.events.dispatchImmediately("error",{type:"error",code:r.xhr.status,message:r.target.language.translate("Unable to load file: %1",null,r.target.url),target:r.target}),r.target.dispatchImmediately("ended"))})},a.prototype.getParserByType=function(e){var t=this.adapter.apply("getParserByType",{parser:null,type:e}).parser;if(t)return t;if(e=="csv"||e=="text/csv"||e=="application/vnd.ms-excel")return new tn;if(e=="json"||e=="application/json")return new Ka},a.prototype.getParserByData=function(e,t){var i=this.adapter.apply("getParserByData",{parser:null,data:e,type:t}).parser;if(!i){if(i=this.getParserByType(t),i)return i;if(Ka.isJSON(e))return this.getParserByType("json");if(tn.isCSV(e))return this.getParserByType("csv")}return i},a})();var jh=new kb;var bm=(function(a){D(e,a);function e(t,i){var r=a.call(this)||this;return r.adapter=new Ve(r),r._requestOptions={},r._incremental=!1,r._incrementalParams={},r._keepCount=!1,r._updateCurrentData=!1,r.showPreloader=!0,r.className="DataSource",t&&(r.url=t),i&&(typeof i=="string"?r.parser=jh.getParserByType(i):r.parser=i),r}return e.prototype.processData=function(t,i){if(this.dispatchImmediately("parsestarted"),!this.parser&&(this.parser=jh.getParserByData(t,i),!this.parser)){if(this.events.isEnabled("parseerror")){var r={type:"parseerror",message:this.language.translate("No parser available for file: %1",null,this.url),target:this};this.events.dispatchImmediately("parseerror",r)}this.dispatchImmediately("parseended");return}if(this.parser.options=this.adapter.apply("parserOptions",this.parser.options),this.parser.options.dateFields=this.adapter.apply("dateFields",this.parser.options.dateFields||[]),this.parser.options.numberFields=this.adapter.apply("numberFields",this.parser.options.numberFields||[]),this.parser.options.dateFields&&!this.parser.options.dateFormatter&&(this.parser.options.dateFormatter=this.dateFormatter),this.data=this.adapter.apply("parsedData",this.parser.parse(this.adapter.apply("unparsedData",t))),!C(this.data)&&this.events.isEnabled("parseerror")){var s={type:"parseerror",message:this.language.translate("Error parsing file: %1",null,this.url),target:this};this.events.dispatchImmediately("parseerror",s)}this.dispatchImmediately("parseended"),C(this.data)&&this.dispatchImmediately("done",{data:this.data}),this.lastLoad=new Date},Object.defineProperty(e.prototype,"url",{get:function(){var t=this.disableCache?this.timestampUrl(this._url):this._url;return this.incremental&&this.component.data.length&&(t=this.addUrlParams(t,this.incrementalParams)),this.adapter.apply("url",t)},set:function(t){this._url=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requestOptions",{get:function(){return this.adapter.apply("requestOptions",this._requestOptions)},set:function(t){this._requestOptions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._parser||(this._parser=new Ka),this.adapter.apply("parser",this._parser)},set:function(t){this._parser=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reloadFrequency",{get:function(){return this.adapter.apply("reloadTimeout",this._reloadFrequency)},set:function(t){var i=this;this._reloadFrequency!=t&&(this._reloadFrequency=t,t?C(this._reloadDisposer)||(this._reloadDisposer=this.events.on("ended",function(r){i._reloadTimeout=setTimeout(function(){i.load()},i.reloadFrequency)})):C(this._reloadDisposer)&&(this._reloadDisposer.dispose(),this._reloadDisposer=void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incremental",{get:function(){return this.adapter.apply("incremental",this._incremental)},set:function(t){this._incremental=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incrementalParams",{get:function(){return this.adapter.apply("incrementalParams",this._incrementalParams)},set:function(t){this._incrementalParams=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keepCount",{get:function(){return this.adapter.apply("keepCount",this._keepCount)},set:function(t){this._keepCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"updateCurrentData",{get:function(){return this.adapter.apply("updateCurrentData",this._updateCurrentData)},set:function(t){this._updateCurrentData=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){return this._language?this._language:this.component?(this._language=this.component.language,this._language):(this.language=new er,this.language)},set:function(t){this._language=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.component?(this._dateFormatter=this.component.dateFormatter,this._dateFormatter):(this.dateFormatter=new js,this.dateFormatter)},set:function(t){this._dateFormatter=t},enumerable:!0,configurable:!0}),e.prototype.timestampUrl=function(t){var i=new Date().getTime().toString(),r={};return r[i]="",this.addUrlParams(t,r)},e.prototype.dispose=function(){a.prototype.dispose.call(this),this._reloadTimeout&&clearTimeout(this._reloadTimeout),C(this._reloadDisposer)&&(this._reloadDisposer.dispose(),this._reloadDisposer=void 0)},e.prototype.load=function(){this.url&&(this._reloadTimeout&&clearTimeout(this._reloadTimeout),jh.load(this))},e.prototype.addUrlParams=function(t,i){var r=t.match(/\?/)?"&":"?",s=[];return at(i,function(o,n){n!=""?s.push(o+"="+encodeURIComponent(n)):s.push(o)}),s.length?t+r+s.join("&"):t},e.prototype.processConfig=function(t){w.registeredClasses.json=Ka,w.registeredClasses.JSONParser=Ka,w.registeredClasses.csv=tn,w.registeredClasses.CSVParser=tn,a.prototype.processConfig.call(this,t)},e})(fi);var wr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._disabled=!1,t.hasProperties=!1,t.values={},t.categories={},t.dates={},t.locations={},t.workingLocations={},t.properties={},t.sprites=[],t.isTemplate=!1,t._index=null,t._visible=!0,t._hidden=!1,t._ignoreMinMax=!1,t.hasChildren={},t.isHiding=!1,t._valueAnimations={},t._locationAnimations={},t.className="DataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new Ve(this)),this._adapterO},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.component&&this._index!=null?this._index:-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Qr(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._hidden?!1:this._visible},set:function(t){t&&(this.hidden=!1),this._visible!=t&&this.setVisibility(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},set:function(t){this._hidden!=t&&(this._hidden=t,t?this.setVisibility(!1):this.setVisibility(!0,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,W(this.sprites,function(i){i.__disabled=t})},enumerable:!0,configurable:!0}),e.prototype.setVisibility=function(t,i){if(W(this.sprites,function(s){t?s.visible=s.defaultState.properties.visible:s.hiddenState?s.visible=s.hiddenState.properties.visible:s.visible=!1}),this._visible=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("visibilitychanged")){var r={type:"visibilitychanged",target:this,visible:t};this.events.dispatchImmediately("visibilitychanged",r)}},e.prototype.show=function(t,i,r){var s=this;if(!this.hidden){this.setVisibility(!0,!0),this.isHiding=!1,this._hideDisposer&&this.removeDispose(this._hideDisposer);var o;return r&&W(r,function(n){o=s.setWorkingValue(n,s.values[n].value,t,i)}),W(this.sprites,function(n){var l=n.show(t);l!=null&&!l.isFinished()&&(s._disposers.push(l),i!=null&&i>0&&l.delay(i))}),o}},e.prototype.dispose=function(){a.prototype.dispose.call(this),W(this.sprites,function(t){t.dispose()}),this.sprites=[]},e.prototype.hide=function(t,i,r,s){var o=this;if(this.isHiding=!0,W(this.sprites,function(l){var h=l.hide(t);h!=null&&!h.isFinished()&&(o._disposers.push(h),i!=null&&i>0&&h.delay(i))}),P(r)&&s){var n;if(W(s,function(l){var h=o.setWorkingValue(l,r,t,i);h&&(n=h)}),n&&!n.isFinished())return this._hideDisposer=n.events.on("animationended",function(){o.setVisibility(!1,!0),o.isHiding=!1}),this._disposers.push(this._hideDisposer),n;this.isHiding=!1,this.setVisibility(!1,!0)}else this.isHiding=!1,this.setVisibility(!1)},e.prototype.getDuration=function(t){if(!P(t)){var i=this.component;i&&(t=i.interpolationDuration)}if(t!=null)return this._adapterO?this._adapterO.apply("duration",t):t},e.prototype.getValue=function(t,i){if(t&&this.component){i||(i=this.component.dataFields[t+"Show"],i||(i="value"));var r=this.values[t][i];return this._adapterO&&this._adapterO.isEnabled("value")?this._adapterO.apply("value",{value:r,field:t}).value:r}},e.prototype.getWorkingValue=function(t){if(t&&this.component){var i=this.component.dataFields[t+"Show"];return i||(i="workingValue"),this._adapterO?this._adapterO.apply("workingValue",{workingValue:this.values[t][i],field:t}).workingValue:this.values[t][i]}},e.prototype.getActualWorkingValue=function(t){return this.values[t].workingValue},e.prototype.setValue=function(t,i,r,s){var o=this.values[t].value,n=this.getDuration(r);if(i=Wt(i),o!==i){if(this.values[t].value=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("valuechanged")){var l={type:"valuechanged",target:this,property:t};this.events.dispatchImmediately("valuechanged",l)}this.component&&this.component.handleDataItemValueChange(this,t)}this.setWorkingValue(t,i,n,s)},e.prototype.setCalculatedValue=function(t,i,r){var s=this.values[t][r];if(s!==i&&P(i)){if(this.values[t][r]=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("calculatedvaluechanged")){var o={type:"calculatedvaluechanged",target:this,property:t};this.events.dispatchImmediately("calculatedvaluechanged",o)}this.component&&this.component.handleDataItemCalculatedValueChange(this,t)}},e.prototype.setWorkingValue=function(t,i,r,s){if(P(this.values[t].value)){var o=this.getDuration(r),n=this.values[t].workingValue;if(o!=null&&o>0&&P(n)&&this.component)if(n!=i){var l=this.animate({childObject:this.values[t],property:"workingValue",from:n,to:i,dummyData:t},o,this.component.interpolationEasing);return s!=null&&l.delay(s),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._valueAnimations[t]=l,l}else{var h=this._valueAnimations[t];h&&h.stop(),this.values[t].workingValue=i}else{var h=this._valueAnimations[t];if(h&&h.stop(),this.values[t].workingValue=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var u={type:"workingvaluechanged",target:this,property:t};this.events.dispatchImmediately("workingvaluechanged",u)}this.component&&this.component.handleDataItemWorkingValueChange(this,t)}}},e.prototype.setLocation=function(t,i,r,s){var o=this.locations[t];if(o!==i){if(this.locations[t]=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("locationchanged")){var n={type:"locationchanged",target:this,property:t};this.events.dispatchImmediately("locationchanged",n)}this.component&&this.component.handleDataItemValueChange(this,t),this.setWorkingLocation(t,i,r,s)}},e.prototype.setWorkingLocation=function(t,i,r,s){var o=this.getDuration(r),n=this.workingLocations[t];if(o!=null&&o>0&&P(n)&&this.component)if(n!=i){var l=this.animate({childObject:this.workingLocations,property:t,from:n,to:i,dummyData:t},o,this.component.interpolationEasing);return s!=null&&l.delay(s),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._locationAnimations[t]=l,l}else{var h=this._locationAnimations[t];h&&h.stop(),this.workingLocations[t]=i}else{var h=this._locationAnimations[t];if(h&&h.stop(),this.workingLocations[t]=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workinglocationchanged")){var u={type:"workinglocationchanged",target:this,property:t};this.events.dispatchImmediately("workinglocationchanged",u)}this.component&&this.component.handleDataItemWorkingLocationChange(this,t)}},e.prototype.setDate=function(t,i,r){!Ea(i)&&this.component&&(i=this.component.dateFormatter.parse(i));var s=this.dates[t];s!==i&&(this.dates[t]=i,this.setValue(t,i.getTime(),r))},e.prototype.getDate=function(t){return this._adapterO?this._adapterO.apply("date",{date:this.dates[t],field:t}).date:this.dates[t]},e.prototype.setProperty=function(t,i){if(this.properties[t]!==i){if(this.hasProperties=!0,this.properties[t]=i,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var r={type:"propertychanged",target:this,property:t,value:i};this.events.dispatchImmediately("propertychanged",r)}this.component&&this.component.handleDataItemPropertyChange(this,t)}},e.prototype.setCategory=function(t,i){vt(i)||(i=Yn(i)),this.categories[t]!==i&&(this.categories[t]=i)},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),t.dataContext&&(this.dataContext=Af(t.dataContext,{})),tr(t.locations,this.locations),t._adapterO&&this.adapter.copyFrom(t._adapterO),this.component=t.component},Object.defineProperty(e.prototype,"opacity",{set:function(t){W(this.sprites,function(i){i.opacity=t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(t){if(this._ignoreMinMax=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var i={type:"propertychanged",target:this,property:"ignoreMinMax",value:t};this.events.dispatchImmediately("propertychanged",i)}this.component&&this.component.handleDataItemPropertyChange(this,"ignoreMinMax")},enumerable:!0,configurable:!0}),e.prototype.animate=function(t,i,r){return new Pi(this,t,i,r).start()},e.prototype.handleInterpolationProgress=function(t){var i=t.target,r=i.animationOptions[0];if(r){if(this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var s={type:"workingvaluechanged",target:this,property:r.dummyData};this.events.dispatchImmediately("workingvaluechanged",s)}this.component&&this.component.handleDataItemWorkingValueChange(this,r.dummyData)}},e.prototype.hasValue=function(t){for(var i=0,r=t.length;i<r;i++){var s=this.values[t[i]];if(!s||!C(s.value))return!1}return!0},Object.defineProperty(e.prototype,"depth",{get:function(){return this.parent?this.parent.depth+1:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataContext",{get:function(){return this._dataContext},set:function(t){this._dataContext=t},enumerable:!0,configurable:!0}),e.prototype.addSprite=function(t){t.dataItem&&t.dataItem!=this&&ft(t.dataItem.sprites,t),this.visible||t.hide(0),this.isHiding&&t.hide(),this.sprites.push(t),t.dataItem=this},e})(fi);var Cr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.dataFields={},t._dataSources={},t._parseDataFrom=0,t._dataDisposers=[],t._currentDataSetId="",t._start=0,t._end=1,t.skipRangeEvent=!1,t.rangeChangeDuration=0,t.rangeChangeEasing=Jr,t.parsingStepDuration=50,t.dataInvalid=!1,t.rawDataInvalid=!1,t.dataRangeInvalid=!1,t.dataItemsInvalid=!1,t.interpolationDuration=0,t.interpolationEasing=Jr,t.sequencedInterpolation=!0,t.sequencedInterpolationDelay=0,t.dataValidationProgress=0,t._addAllDataItems=!0,t._usesData=!0,t.className="Component",t.minZoomCount=1,t.maxZoomCount=0,t._dataItems=new Ga(t.createDataItem()),t._dataItems.events.on("inserted",t.handleDataItemAdded,t,!1),t._dataItems.events.on("removed",t.handleDataItemRemoved,t,!1),t._disposers.push(new Ft(t._dataItems)),t._disposers.push(t._dataItems.template),t.invalidateData(),t.dataUsers.events.on("inserted",t.handleDataUserAdded,t,!1),t._disposers.push(new Bt(t._dataDisposers)),t._start=0,t._end=1,t.maxZoomDeclination=1,t.applyTheme(),t}return e.prototype.createDataItem=function(){return new wr},e.prototype.handleDataUserAdded=function(t){var i=t.newValue;i.dataProvider=this},e.prototype.handleDataItemValueChange=function(t,i){this.dataItemsInvalid||this.invalidateDataItems()},e.prototype.handleDataItemWorkingValueChange=function(t,i){},e.prototype.handleDataItemWorkingLocationChange=function(t,i){},e.prototype.handleDataItemCalculatedValueChange=function(t,i){},e.prototype.handleDataItemPropertyChange=function(t,i){},e.prototype.processDataItem=function(t,i){var r=this;if(t){i||(i={}),t.dataContext=i;var s=!1;at(this.dataFields,function(o,n){var l=o,h=i[n];if(r._adapterO&&r._adapterO.isEnabled("dataContextValue")&&(h=r._adapterO.apply("dataContextValue",{field:l,value:h,dataItem:t}).value),C(h))if(s=!0,t.hasChildren[l]){var u=r.createDataItem();u.copyFrom(r.mainDataSet.template);var p=new Ga(u);p.events.on("inserted",r.handleDataItemAdded,r,!1),p.events.on("removed",r.handleDataItemRemoved,r,!1),r._dataDisposers.push(new Ft(p));for(var d=h.length,c=0;c<d;c++){var f=h[c],g=p.create();g.parent=t,r.processDataItem(g,f)}var m=t;m[l]=p}else t[l]=h}),at(this.propertyFields,function(o,n){var l=o,h=i[n];C(h)&&(s=!0,t.setProperty(l,h))}),!this._addAllDataItems&&!s&&this.mainDataSet.remove(t)}},e.prototype.updateDataItem=function(t){var i=this;if(t){var r=t.dataContext;at(this.dataFields,function(s,o){var n=s,l=r[o];if(i._adapterO&&(l=i._adapterO.apply("dataContextValue",{field:n,value:l,dataItem:t}).value),C(l))if(t.hasChildren[n]){var h=t,u=h[n];u.each(function(p){i.updateDataItem(p)})}else t[n]=l}),at(this.propertyFields,function(s,o){var n=s,l=r[o];C(l)&&t.setProperty(n,l)})}},e.prototype.validateDataElements=function(){for(var t=this.endIndex,i=this.startIndex;i<t;i++){var r=this.dataItems.getIndex(i);r&&this.validateDataElement(r)}},e.prototype.validate=function(){this.validateDataElements(),a.prototype.validate.call(this)},e.prototype.validateDataElement=function(t){},e.prototype.addData=function(t,i,r){var s=this;if(!this.dataInvalid&&this.inited&&(this._parseDataFrom=this.data.length),r||(t instanceof Array?W(t,function(o){s.data.push(o)}):this.data.push(t)),this.inited)this.removeData(i,r);else if(P(i))for(;i>0;)this.data.shift(),i--;this.invalidateData()},e.prototype.removeData=function(t,i){if(P(t)&&t>0){for(;t>0;){var r=this.mainDataSet.getIndex(0);r&&this.mainDataSet.remove(r),this.dataUsers.each(function(s){if(!s.data||s.data.length==0){var o=s.mainDataSet.getIndex(0);o&&s.mainDataSet.remove(o)}}),i||this.data.shift(),this._parseDataFrom>0&&this._parseDataFrom--,t--}this.invalidateDataItems()}},e.prototype.invalidateData=function(){this.disabled||this.isTemplate||(w.addToInvalidComponents(this),Ot.requestFrame(),this.dataInvalid=!0,E(this.dataUsers.iterator(),function(t){t.invalidateDataItems()}))},e.prototype.invalidateDataUsers=function(){E(this.dataUsers.iterator(),function(t){t.invalidate()})},e.prototype.invalidateDataItems=function(){this.disabled||this.isTemplate||(Qi(w.invalidDataItems,this),Ot.requestFrame(),this.dataItemsInvalid=!0,E(this.dataUsers.iterator(),function(t){t.invalidateDataItems()}))},e.prototype.invalidateDataRange=function(){this.disabled||this.isTemplate||(this.dataRangeInvalid=!0,Qi(w.invalidDataRange,this),Ot.requestFrame())},e.prototype.validateDataRange=function(){ft(w.invalidDataRange,this),this.dataRangeInvalid=!1,(this.startIndex!=this._prevStartIndex||this.endIndex!=this._prevEndIndex)&&(this.rangeChangeUpdate(),this.appendDataItems(),this.invalidate(),this.dispatchImmediately("datarangechanged"))},e.prototype.sliceData=function(){this._workingStartIndex=this.startIndex,this._workingEndIndex=this.endIndex},e.prototype.rangeChangeUpdate=function(){this.sliceData(),this._prevStartIndex=this.startIndex,this._prevEndIndex=this.endIndex},e.prototype.appendDataItems=function(){for(var t=this.endIndex,i=this.startIndex;i<t;i++){var r=this.dataItems.getIndex(i);r&&(r.__disabled=!1)}for(var i=0;i<this.startIndex;i++){var r=this.dataItems.getIndex(i);r&&(r.__disabled=!0)}for(var i=this.endIndex;i<this.dataItems.length;i++){var r=this.dataItems.getIndex(i);r&&(r.__disabled=!0)}},e.prototype.invalidateRawData=function(){this.disabled||this.isTemplate||(Qi(w.invalidRawDatas,this),Ot.requestFrame(),this.rawDataInvalid=!0,E(this.dataUsers.iterator(),function(t){t.invalidateRawData()}))},e.prototype.validateRawData=function(){var t=this;ft(w.invalidRawDatas,this),E(this.mainDataSet.iterator(),function(i){i&&t.updateDataItem(i)})},e.prototype.dispose=function(){var t=this;this.mainDataSet.template.clones.clear(),at(this._dataSources,function(i,r){t.removeDispose(r)}),this.disposeData(),a.prototype.dispose.call(this)},e.prototype.disposeData=function(){this.mainDataSet.template.clones.clear(),W(this._dataDisposers,function(t){t.dispose()}),E(this.dataUsers.iterator(),function(t){t.disposeData()}),this._dataDisposers.length=0,this._startIndex=void 0,this._endIndex=void 0,this.mainDataSet.clear(),this.mainDataSet.template.clones.clear(),this._dataSets&&this._dataSets.clear()},e.prototype.getDataItem=function(t){return this.mainDataSet.create()},e.prototype.validateData=function(){if(this.dispatchImmediately("beforedatavalidated"),this.dataInvalid=!1,w.removeFromInvalidComponents(this),!this.__disabled){if(this.dataValidationProgress=0,this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.dataFields.data&&this.dataItem){var t=this.dataItem.dataContext;this._data=t[this.dataFields.data]}if(this._parseDataFrom===0&&this.data.length>0&&this.disposeData(),this.data.length>0){var i=this.preloader;E(this.dataUsers.iterator(),function(p){p._startIndex=void 0,p._endIndex=void 0});var r=0,s=Date.now(),o=this._parseDataFrom,n=this.data.length,l=function(){var p=h.data[o];if(h._usesData){var d=h.getDataItem(p);h.processDataItem(d,p)}if(h.dataUsers.each(function(f){if(f.data.length==0){var g=f.getDataItem(p);f.processDataItem(g,p)}}),r++,r==100){r=0;var c=Date.now()-s;if(c>h.parsingStepDuration&&o<h.data.length-10)return h._parseDataFrom=o+1,i&&(o/h.data.length>.5&&!i.visible||(i.progress=o/h.data.length)),h.dataValidationProgress=o/h.data.length,o=h.data.length,h.invalidateData(),{value:void 0}}},h=this;for(o;o<n;o++){var u=l();if(typeof u=="object")return u.value}i&&(i.progress=1),this.dataUsers.each(function(p){(p.hidden||p.appeared&&!p.visible&&p.stacked)&&p.hide(0)})}this.dataValidationProgress=1,this._parseDataFrom=0,this.invalidateDataItems(),this._internalDefaultsApplied||this.applyInternalDefaults(),this.dispatch("datavalidated")}},e.prototype.validateDataItems=function(){ft(w.invalidDataItems,this),this.dataItemsInvalid=!1,this.invalidateDataRange(),this.invalidate(),this.dispatch("dataitemsvalidated")},Object.defineProperty(e.prototype,"data",{get:function(){return this._data||(this._data=[]),this._adapterO?this._adapterO.apply("data",this._data):this._data},set:function(t){this.setData(t)},enumerable:!0,configurable:!0}),e.prototype.setData=function(t){this.isDisposed()||(this._parseDataFrom=0,this.disposeData(),this._data=t,t&&t.length>0?this.invalidateData():(this.dispatchImmediately("beforedatavalidated"),this.dispatch("datavalidated")))},e.prototype.getDataSource=function(t){var i=this;return C(this._dataSources[t])||(this._dataSources[t]=new bm,this._dataSources[t].component=this,this.setDataSourceEvents(this._dataSources[t],t),this._dataSources[t].adapter.add("dateFields",function(r){return i.dataSourceDateFields(r)}),this._dataSources[t].adapter.add("numberFields",function(r){return i.dataSourceNumberFields(r)}),this.events.on("inited",function(){i.loadData(t)},this,!1)),this._dataSources[t]},Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSources.data||this.getDataSource("data"),this._dataSources.data},set:function(t){var i=this;this._dataSources.data&&this.removeDispose(this._dataSources.data),this._dataSources.data=t,this._dataSources.data.component=this,this.events.on("inited",function(){i.loadData("data")},this,!1),this.setDataSourceEvents(t,"data")},enumerable:!0,configurable:!0}),e.prototype.loadData=function(t){this._dataSources[t].load()},e.prototype.dataSourceDateFields=function(t){return t},e.prototype.dataSourceNumberFields=function(t){return t},e.prototype.populateDataSourceFields=function(t,i,r){return W(r,function(s){i[s]&&Ii(t,i[s])===-1&&t.push(i[s])}),t},e.prototype.setDataSourceEvents=function(t,i){var r=this;t.events.on("started",function(s){var o=r.preloader;o&&(o.progress=0)},void 0,!1),t.events.on("loadstarted",function(s){var o=r.preloader;o&&(o.progress=.25)},void 0,!1),t.events.on("loadended",function(s){var o=r.preloader;o&&(o.progress=.5)},void 0,!1),t.events.on("parseended",function(s){var o=r.preloader;o&&(o.progress=.75)},void 0,!1),t.events.on("ended",function(s){var o=r.preloader;o&&(o.progress=1)},void 0,!1),t.events.on("error",function(s){var o=r.preloader;o&&(o.progress=1),r.openModal(s.message)},void 0,!1),i&&t.events.on("done",function(s){var o=r.preloader;o&&(o.progress=1),i=="data"&&!oe(s.data)&&(s.data=[s.data]),t.incremental&&i=="data"&&r.data.length?r.addData(s.data,t.keepCount?s.data.length:0):t.updateCurrentData&&i=="data"&&r.data.length?(W(r.data,function(n,l){C(s.data[l])&&at(n,function(h,u){C(s.data[l][h])&&(n[h]=s.data[l][h])})}),r.invalidateRawData()):r[i]=s.data})},Object.defineProperty(e.prototype,"responsive",{get:function(){return this._responsive||(this._responsive=new vm,this._responsive.component=this),this._responsive},set:function(t){this._responsive=t,this._responsive.component=this},enumerable:!0,configurable:!0}),e.prototype.zoom=function(t,i,r,s){var o=this;i===void 0&&(i=!1),r===void 0&&(r=!1);var n=t.start,l=t.end,h=t.priority;if(t.start==t.end&&(t.start=t.start-.5/this.maxZoomFactor,t.end=t.end+.5/this.maxZoomFactor),h=="end"&&l==1&&n!=0&&n<this.start&&(h="start"),h=="start"&&n==0&&l>this.end&&(h="end"),P(s)||(s=this.maxZoomDeclination),!P(n)||!P(l))return{start:this.start,end:this.end};if(this._finalStart!=n||this._finalEnd!=l){var u=this.maxZoomFactor/this.minZoomCount,p=this.maxZoomFactor/this.maxZoomCount;if(h=="start"?(this.maxZoomCount>0&&1/(l-n)<p&&(l=n+1/p),1/(l-n)>u&&(l=n+1/u),l>1&&l-n<1/u&&(n=l-1/u)):(this.maxZoomCount>0&&1/(l-n)<p&&(n=l-1/p),1/(l-n)>u&&(n<=0?l=n+1/u:n=l-1/u),n<0&&l-n<1/u&&(l=n+1/u)),n<-s&&(n=-s),1/(l-n)>u&&(l=n+1/u),l>1+s&&(l=1+s),1/(l-n)>u&&(n=l-1/u),this._finalEnd=l,this._finalStart=n,this.skipRangeEvent=i,this.dispatchImmediately("rangechangestarted"),this.rangeChangeDuration>0&&!r){var d=this.rangeChangeAnimation;if(d&&d.progress<1){var c=d.animationOptions;if(c.length>1){if(c[0].to==n&&c[1].to==l)return{start:n,end:l};d.isDisposed()||d.stop()}}this.rangeChangeAnimation&&this.rangeChangeAnimation.kill(),d=this.animate([{property:"start",to:n},{property:"end",to:l}],this.rangeChangeDuration,this.rangeChangeEasing),this.rangeChangeAnimation=d,d&&!d.isFinished()?d.events.on("animationended",function(){o.dispatchImmediately("rangechangeended")}):this.dispatchImmediately("rangechangeended")}else this.start=n,this.end=l,this.dispatch("rangechangeended")}return{start:n,end:l}},e.prototype.zoomToIndexes=function(t,i,r,s){if(!(!P(t)||!P(i))){var o=t/this.dataItems.length,n=i/this.dataItems.length;this.zoom({start:o,end:n},r,s)}},Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return J(1/(this.end-this.start),1,this.maxZoomFactor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomFactor",{get:function(){return this.getPropertyValue("maxZoomFactor")},set:function(t){this.setPropertyValue("maxZoomFactor",t)&&(t==1&&(this.maxZoomDeclination=0),this.invalidateDataRange())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomDeclination",{get:function(){return this.getPropertyValue("maxZoomDeclination")},set:function(t){this.setPropertyValue("maxZoomDeclination",t)&&this.invalidateDataRange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startIndex",{get:function(){return P(this._startIndex)||(this._startIndex=0),this._startIndex},set:function(t){this._startIndex=J(Math.round(t),0,this.dataItems.length),this.start=this.indexToPosition(this._startIndex)},enumerable:!0,configurable:!0}),e.prototype.indexToPosition=function(t){return t/this.dataItems.length},Object.defineProperty(e.prototype,"endIndex",{get:function(){var t=this.dataItems.length;return(!P(this._endIndex)||this._endIndex>t)&&(this._endIndex=t),this._endIndex},set:function(t){this._endIndex=J(Math.round(t),0,this.dataItems.length),this.end=this.indexToPosition(this._endIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._adapterO?this._adapterO.apply("start",this._start):this._start},set:function(t){if(this._start!=t){this._start=t;var i=Math.max(0,Math.floor(this.dataItems.length*t)||0);this._startIndex=Math.min(i,this.dataItems.length),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("startchanged"),this.dispatch("startendchanged")}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._adapterO?this._adapterO.apply("end",this._end):this._end},set:function(t){this._end!=t&&(this._end=t,this._endIndex=Math.min(this.dataItems.length,Math.ceil(this.dataItems.length*t)||0),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("endchanged"),this.dispatch("startendchanged"))},enumerable:!0,configurable:!0}),e.prototype.removeFromInvalids=function(){a.prototype.removeFromInvalids.call(this),w.removeFromInvalidComponents(this),ft(w.invalidDataItems,this),ft(w.invalidDataRange,this),ft(w.invalidRawDatas,this)},Object.defineProperty(e.prototype,"dataItems",{get:function(){if(this._currentDataSetId!=""){var t=this.dataSets.getKey(this._currentDataSetId);if(t)return t}return this._dataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSets",{get:function(){return this._dataSets||(this._dataSets=new It),this._dataSets},enumerable:!0,configurable:!0}),e.prototype.setDataSet=function(t){if(this._currentDataSetId!=t){var i=this.dataSets.getKey(t);if(i)return this.dataItems.each(function(r){r.__disabled=!0}),this._currentDataSetId=t,this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(r){r.__disabled=!1}),!0;if(this._currentDataSetId!="")return this.dataItems.each(function(r){r.__disabled=!0}),this._currentDataSetId="",this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(r){r.__disabled=!1}),!0}return!1},Object.defineProperty(e.prototype,"currentDataSetId",{get:function(){return this._currentDataSetId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mainDataSet",{get:function(){return this._dataItems},enumerable:!0,configurable:!0}),e.prototype._updateDataItemIndexes=function(t){for(var i=this.mainDataSet.values,r=i.length,s=t;s<r;++s)i[s]._index=s},e.prototype.handleDataItemAdded=function(t){t.newValue.component=this,this._updateDataItemIndexes(t.index),this.dataItemsInvalid||this.invalidateDataItems()},e.prototype.handleDataItemRemoved=function(t){this._updateDataItemIndexes(t.index),this.dataItemsInvalid||this.invalidateDataItems()},e.prototype.bindDataField=function(t,i){this.dataFields[t]=i,this.invalidateDataRange()},e.prototype.invalidateProcessedData=function(){this.resetProcessedRange(),this.invalidateDataRange()},e.prototype.resetProcessedRange=function(){this._prevEndIndex=null,this._prevStartIndex=null},Object.defineProperty(e.prototype,"dataUsers",{get:function(){var t=this;return this._dataUsers||(this._dataUsers=new wt,this._disposers.push(new Lt(function(){E(t._dataUsers.iterator(),function(i){i.dispose()})}))),this._dataUsers},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=a.prototype.clone.call(this);return t.dataFields=tr(this.dataFields,{}),t},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.data=t.data,this.sequencedInterpolation=t.sequencedInterpolation,this.sequencedInterpolationDelay=t.sequencedInterpolationDelay,this.interpolationDuration=t.interpolationDuration,this.interpolationEasing=t.interpolationEasing},e.prototype.reinit=function(){this._inited=!1,this.deepInvalidate()},e.prototype.getExporting=function(){var t=a.prototype.getExporting.call(this);return t.adapter.has("data",this._exportData,-1,this)||(t.adapter.add("data",this._exportData,-1,this),this.events.on("datavalidated",function(i){t.handleDataUpdated()})),t},e.prototype._exportData=function(t){return t.data=this.data,t},e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return i&&this.invalidateData(),i},e.prototype.setShowOnInit=function(t){t!=this.getPropertyValue("showOnInit")&&(t&&!this.inited&&!this.hidden?(this._showOnInitDisposer2=this.events.once("dataitemsvalidated",this.hideInitially,this,!1),this._disposers.push(this._showOnInitDisposer2)):this._showOnInitDisposer2&&this.removeDispose(this._showOnInitDisposer2)),a.prototype.setShowOnInit.call(this,t)},e.prototype.setBaseId=function(t){t!=this._baseId&&this.dataInvalid&&(this.dataInvalid=!1,w.removeFromInvalidComponents(this),this._baseId=t,this.invalidateData()),a.prototype.setBaseId.call(this,t)},Object.defineProperty(e.prototype,"minZoomCount",{get:function(){return this.getPropertyValue("minZoomCount")},set:function(t){this.setPropertyValue("minZoomCount",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomCount",{get:function(){return this.getPropertyValue("maxZoomCount")},set:function(t){this.setPropertyValue("maxZoomCount",t)},enumerable:!0,configurable:!0}),e.prototype._systemCheckIfValidate=function(){return!(this.dataInvalid||this.dataProvider&&this.dataProvider.dataInvalid)},e.prototype.asFunction=function(t){return t=="interpolationEasing"||t=="rangeChangeEasing"||a.prototype.asIs.call(this,t)},e})(Q);w.registeredClasses.Component=Cr;var rr=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Button",t.tooltipY=0,t.iconPosition="left",t.layout="horizontal",t.contentAlign="center",t.contentValign="middle",t.padding(8,16,8,16),t.setStateOnChildren=!0;var i=new ct,r=t.background;r.fill=i.getFor("secondaryButton"),r.stroke=i.getFor("secondaryButtonStroke"),r.fillOpacity=1,r.strokeOpacity=1,r.cornerRadius(3,3,3,3),t.label=new Me,t.label.fill=i.getFor("secondaryButtonText"),t.label.shouldClone=!1;var s=r.states.create("hover");s.properties.fillOpacity=1,s.properties.fill=i.getFor("secondaryButtonHover");var o=r.states.create("down");return o.transitionDuration=100,o.properties.fill=i.getFor("secondaryButtonDown"),o.properties.fillOpacity=1,t.role="button",t.focusable=!0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(t){var i=this._icon;i&&(i.parent=void 0),t&&(this._icon=t,t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this.iconPosition=this.iconPosition,this._disposers.push(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconPosition",{get:function(){return this.getPropertyValue("iconPosition")},set:function(t){this.setPropertyValue("iconPosition",t),this.icon&&(t=="left"?this.icon.toBack():this.icon.toFront())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._label&&this.removeDispose(this._label),this._label=t,t&&(t.parent=this,t.interactionsEnabled=!1,this._disposers.push(this._label))},enumerable:!0,configurable:!0}),e.prototype.createBackground=function(){return new $i},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),t.label&&this.label.copyFrom(t.label),t.icon&&(this.icon=t.icon.clone())},e})(Q);w.registeredClasses.Button=rr;function en(a){var e=V(a[0]),t={x:0,y:0},i=$t.minPolylineStep;P(i)||(i=.5);for(var r=0,s=a.length;r<s;r++){var o=a[r];Mt(o,t)>i&&(e+=V(o),t=o)}return e}function z(a){return" M"+H(a.x,4)+","+H(a.y,4)+" "}function V(a){return" L"+H(a.x,4)+","+H(a.y,4)+" "}function Xs(a,e){return" Q"+H(e.x,4)+","+H(e.y,4)+" "+H(a.x,4)+","+H(a.y,4)}function ya(a,e,t){return" C"+H(e.x,4)+","+H(e.y,4)+" "+H(t.x,4)+","+H(t.y,4)+" "+H(a.x,4)+","+H(a.y,4)}function pe(){return" Z"}function Ne(a,e,t,i){if(e==0)return"";P(i)||(i=t);var r="",s=",",o=Math.ceil(Math.abs(e)/180),n=1;e<0&&(n=0);var l=0,h=0,u=-U(a)*t,p=-G(a)*i;if(e<.5&&t>3e3){var d=a+e,c=H(U(d)*t,4),f=H(G(d)*i,4);return V({x:c,y:f})}for(var g=0;g<o;g++){var d=a+e/o*(g+1),c=H(U(d)*t+u-l,4),f=H(G(d)*i+p-h,4);r+=" a"+t+s+i+s+0+s+0+s+n+s+c+s+f,l=c,h=f}return r}function ts(a,e,t,i,r,s,o){if(e==0||(P(i)||(i=0),t==0&&i<=0))return"";if(t<i){var n=t;t=i,i=n,P(r)&&(r=r/i*t)}e=Pt(e,360),e==360&&(s=0,o=0);var l=a+e,h=G(Pt(e,45)/2);r=P(r)?r:t,s=s||0,o=P(o)?o:s;var u=r/t*i,p=r/t*s,d=r/t*o;s=J(s,0,(t-i)/2),p=J(p,0,(r-u)/2),o=J(o,0,(t-i)/2),d=J(d,0,(r-u)/2),s=H(J(s,0,t*h),4),p=H(J(p,0,r*h),4),o=H(J(o,0,i*h),4),d=H(J(d,0,u*h),4);var c=Math.asin(s/t/2)*Rs*2,f=Math.asin(p/r/2)*Rs*2;i<o&&(i=o),u<d&&(u=d);var g=Math.asin(o/i/2)*Rs*2,m=Math.asin(d/u/2)*Rs*2;P(g)||(g=0),P(m)||(m=0);var y=a+e/2,v={x:H(U(y)*i,4),y:G(y)*u},x={x:U(a)*(i+o),y:G(a)*(u+d)},_={x:U(a)*(t-s),y:G(a)*(r-p)},$={x:U(l)*(t-s),y:G(l)*(r-p)},T={x:U(l)*(i+o),y:G(l)*(u+d)},S={x:U(a+c)*t,y:G(a+f)*r},k={x:U(l-g)*i,y:G(l-m)*u};o+=o*G(g/2),d+=d*G(m/2),g>(l-a)/2&&(k=v);var A="";return e==360?A=z(_):(A=z(x),A+=V(_),A+=Sr(S,s,p,!0)),A+=Ne(a+c,e-2*c,t,r),P(i)&&i!=0?(e==360&&s==0?A+=z(T):(A+=Sr($,s,p,!0),A+=V(T),A+=Sr(k,o,d,!0)),A+=Ne(l-g,-(e-2*g),i,u),(e<360||s>0)&&(A+=Sr(x,o,d,!0)),A+=V(x)):(A+=Sr($,s,p,!0),e<360&&(A+=V(x))),A}function Sr(a,e,t,i,r,s){if(e==0)return"";s=s||0,r=!!r,i=!!i;var o=",",n=+i,l=+r;return" A"+e+o+t+o+s+o+l+o+n+o+H(a.x,4)+o+H(a.y,4)}function Hp(a,e,t,i){return P(t)||(t=0),P(i)||(i=0),z({x:t,y:i})+V({x:t+a,y:i})+V({x:t+a,y:i+e})+V({x:t,y:i+e})+pe()}function Nr(a,e){var t=",",i=" L";return e?"M"+a.x+t+a.y+i+a.x+t+(a.y+a.height)+i+(a.x+a.width)+t+(a.y+a.height)+i+(a.x+a.width)+t+a.y+i+a.x+t+a.y:"M"+a.x+t+a.y+i+(a.x+a.width)+t+a.y+i+(a.x+a.width)+t+(a.y+a.height)+i+a.x+t+(a.y+a.height)+i+a.x+t+a.y}var xm=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Grip";var i=new ct;t.layout="absolute",t.padding(10,10,10,10),t.margin(3,3,3,3),t.background.fillOpacity=.3,t.background.cornerRadius(10,10,10,10);var r=new rt;r.element=t.paper.add("path");var s=z({x:-6,y:0});return s+=V({x:6,y:0}),s+=z({x:-8,y:-6}),s+=V({x:0,y:-12}),s+=V({x:8,y:-6}),s+=z({x:-8,y:6}),s+=V({x:0,y:12}),s+=V({x:8,y:6}),r.path=s,r.strokeWidth=2,r.fillOpacity=0,r.pixelPerfect=!0,r.padding(0,4,0,4),r.stroke=i.getFor("text"),r.strokeOpacity=.7,r.align="center",r.valign="middle",t.icon=r,t.label.dispose(),t.label=void 0,t.position="right",t.autoHideDelay=3e3,t.events.on("shown",function(o){t._autoHideTimeout&&t._autoHideTimeout.dispose(),t.autoHideDelay&&(t._autoHideTimeout=t.setTimeout(function(){t.hide()},t.autoHideDelay))}),t.events.on("down",function(o){t._autoHideTimeout&&t._autoHideTimeout.dispose()}),t.events.on("out",function(o){t.autoHideDelay&&(t._autoHideTimeout=t.setTimeout(function(){t.hide()},t.autoHideDelay))}),t.applyTheme(),t}return Object.defineProperty(e.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(t){if(this.setPropertyValue("position",t))switch(t){case"left":this.align="left",this.valign="middle",this.horizontalCenter="left",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=N(30);break;case"right":this.align="right",this.valign="middle",this.horizontalCenter="right",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=N(30);break;case"top":this.align="center",this.valign="top",this.horizontalCenter="middle",this.verticalCenter="top",this.icon.rotation=90,this.width=N(30),this.height=void 0;break;case"bottom":this.align="center",this.valign="bottom",this.horizontalCenter="middle",this.verticalCenter="bottom",this.icon.rotation=90,this.width=N(30),this.height=void 0;break;default:this.align="center",this.valign="middle",this.horizontalCenter="middle",this.verticalCenter="middle",this.icon.rotation=90,this.width=N(30),this.height=void 0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoHideDelay",{get:function(){return this.getPropertyValue("autoHideDelay")},set:function(t){this.setPropertyValue("autoHideDelay",t)},enumerable:!0,configurable:!0}),e})(rr);w.registeredClasses.Grip=xm;var Hh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ChartDataItem",t.applyTheme(),t}return e})(wr);var Ys=(function(a){D(e,a);function e(){var t=a.call(this)||this;if(t._legend=new ce,t.constructor===e)throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");t.className="Chart";var i=new Me;t.titles=new zt(i),t._disposers.push(new Ft(t.titles)),t._disposers.push(i),t.width=N(100),t.height=N(100),t.layout="vertical";var r=t.createChild(Q);r.shouldClone=!1,r.layout="vertical",r.width=N(100),r.height=N(100),t.chartAndLegendContainer=r;var s=r.createChild(Q);return s.shouldClone=!1,s.width=N(100),s.height=N(100),t.chartContainer=s,t.showOnInit=!0,t._disposers.push(t._legend),t.titles.events.on("inserted",function(o){t.processTitle(o),t.updateReaderTitleReferences()},t,!1),t.titles.events.on("removed",function(o){t.updateReaderTitleReferences()},t,!1),t.role="region",t.defaultState.transitionDuration=1,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Chart"))},e.prototype.draw=function(){this.fixLayout(),a.prototype.draw.call(this)},e.prototype.fixLayout=function(){var t=this.legend;if(t){var i=this.chartAndLegendContainer,r=this.chartContainer;switch(r.x=void 0,r.y=void 0,t.position!="absolute"&&(t.x=void 0,t.y=void 0),t.position){case"left":i.layout="horizontal",t.toBack();break;case"right":i.layout="horizontal",t.toFront();break;case"top":i.layout="vertical",t.toBack();break;case"bottom":i.layout="vertical",t.toFront();break;case"absolute":t.isMeasured=!1;break}}},e.prototype.feedLegend=function(){},e.prototype.processTitle=function(t){var i=t.newValue;return i.parent=this,i.toBack(),i.shouldClone=!1,i.align="center",i.uidAttr(),i},e.prototype.updateReaderTitleReferences=function(){if(this.titles.length){var t=[];E(this.titles.iterator(),function(i){t.push(i.uid)}),this.setSVGAttribute({"aria-labelledby":t.join(" ")})}else this.removeSVGAttribute("aria-labelledby")},Object.defineProperty(e.prototype,"legend",{get:function(){return this._legend.get()},set:function(t){this.setLegend(t)},enumerable:!0,configurable:!0}),e.prototype.setLegend=function(t){var i=this;this._legend.get()!==t&&(t?(t.parent=this.chartAndLegendContainer,this._legend.set(t,t.events.on("propertychanged",function(r){r.property=="position"&&i.fixLayout()},void 0,!1)),t.addDisposer(new Lt(function(){i.legend=void 0}))):this._legend.reset(),this.feedLegend())},e.prototype.dispose=function(){this.legend&&this.legend.dispose(),a.prototype.dispose.call(this)},e.prototype.processConfig=function(t){t&&C(t.legend)&&!C(t.legend.type)&&(t.legend.type="Legend"),a.prototype.processConfig.call(this,t)},e.prototype.copyFrom=function(t){this.titles.copyFrom(t.titles),this.chartContainer.copyFrom(t.chartContainer),t.legend&&(this.legend=t.legend.clone(),this.legend.removeChildren()),a.prototype.copyFrom.call(this,t)},Object.defineProperty(e.prototype,"dragGrip",{get:function(){var t=this;if(!this._dragGrip){var i=this.tooltipContainer.createChild(xm);i.align="right",i.valign="middle",i.hide(0),i.events.on("down",function(r){r.touch&&(t.interactionsEnabled=!1)}),i.events.on("up",function(r){t.interactionsEnabled=!0}),this.events.on("down",function(r){r.touch&&i.show()}),this._dragGrip=i}return this._dragGrip},set:function(t){this._dragGrip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.parent.focusable},set:function(t){this.parent.focusable=t},enumerable:!0,configurable:!0}),e})(Cr);w.registeredClasses.Chart=Ys;De.push({relevant:Fe.widthXS,state:function(a,e){if(a instanceof Ys){var t=a.states.create(e);return a.pixelPaddingLeft>10&&(t.properties.paddingLeft=10),a.pixelPaddingRight>10&&(t.properties.paddingRight=10),t}return null}});De.push({relevant:Fe.heightXS,state:function(a,e){if(a instanceof Ys){var t=a.states.create(e);return a.pixelPaddingTop>10&&(t.properties.paddingTop=10),a.pixelPaddingBottom>10&&(t.properties.paddingBottom=10),t}return null}});De.push({relevant:Fe.widthXXS,state:function(a,e){if(a instanceof Ys){var t=a.states.create(e);return t.properties.paddingLeft=0,t.properties.paddingRight=0,t}return null}});De.push({relevant:Fe.heightXXS,state:function(a,e){if(a instanceof Ys){var t=a.states.create(e);return t.properties.paddingTop=0,t.properties.paddingBottom=0,t}return null}});var Br=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.properties={},t.isTemplate=!1,t._scale=1,t._nonScaling=!0,t.className="Filter",t.filterPrimitives=new wt,t.properties.filterUnits="objectBoundingBox",t.filterPrimitives.events.on("inserted",function(i){t._disposers.push(i.newValue)}),t.width=120,t.height=120,t.applyTheme(),t}return e.prototype.appendPrimitives=function(t){E(this.filterPrimitives.iterator(),function(i){t.add(i)})},e.prototype.animate=function(t,i,r){var s=new Pi(this,t,i,r).start();return s},Object.defineProperty(e.prototype,"width",{get:function(){return this.properties.width},set:function(t){this.properties.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.properties.height},set:function(t){this.properties.height=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;a.prototype.copyFrom.call(this,t),at(t.properties,function(r,s){i[r]=s})},Object.defineProperty(e.prototype,"paper",{get:function(){return this._paper?this._paper:_s()},set:function(t){this._paper!=t&&(this._paper=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Qr(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t,this.updateScale()},enumerable:!0,configurable:!0}),e.prototype.updateScale=function(){},Object.defineProperty(e.prototype,"filterUnits",{get:function(){return this.properties.filterUnits},set:function(t){this.properties.filterUnits=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nonScaling",{get:function(){return this._nonScaling},set:function(t){this._nonScaling=t,t||(this._scale=1),this.updateScale()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sprite",{set:function(t){this.setSprite(t)},enumerable:!0,configurable:!0}),e.prototype.setSprite=function(t){this._sprite&&this._sprite!=t&&this._sprite.filters.removeValue(this),this._sprite=t},e})(we);var Xp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="DropShadowFilter",t.color=nt("#000"),t.feGaussianBlur=t.paper.add("feGaussianBlur"),t.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),t.filterPrimitives.push(t.feGaussianBlur),t.feOffset=t.paper.add("feOffset"),t.feOffset.attr({result:"offsetBlur"}),t.filterPrimitives.push(t.feOffset),t.feFlood=t.paper.add("feFlood"),t.feFlood.attr({"flood-color":t.color}),t.filterPrimitives.push(t.feFlood),t.feComposite=t.paper.add("feComposite"),t.feComposite.attr({in2:"offsetBlur",operator:"in"}),t.filterPrimitives.push(t.feComposite),t.feMerge=t.paper.addGroup("feMerge"),t.feMerge.add(t.paper.add("feMergeNode")),t.feMerge.add(t.paper.add("feMergeNode").attr({in:"SourceGraphic"})),t.filterPrimitives.push(t.feMerge),t.width=200,t.height=200,t.blur=1.5,t.dx=3,t.dy=3,t.opacity=.5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.properties.color=t,this.feFlood&&this.feFlood.attr({"flood-color":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(t){this.properties.opacity=t,this.feFlood.attr({"flood-opacity":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx",{get:function(){return this.properties.dx},set:function(t){this.properties.dx=t,this.feOffset.attr({dx:t/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy",{get:function(){return this.properties.dy},set:function(t){this.properties.dy=t,this.feOffset.attr({dy:t/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this.properties.blur},set:function(t){this.properties.blur=t,this.feGaussianBlur.attr({stdDeviation:t/this.scale})},enumerable:!0,configurable:!0}),e.prototype.updateScale=function(){this.dx=this.dx,this.dy=this.dy,this.blur=this.blur},e})(Br);w.registeredClasses.DropShadowFilter=Xp;var _m=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PointedShape",t.pointerBaseWidth=15,t.pointerLength=10,t.pointerY=0,t.pointerX=0,t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this),P(this.pointerX)||(this.pointerX=this.pixelWidth/2),P(this.pointerY)||(this.pointerY=this.pixelHeight+10)},Object.defineProperty(e.prototype,"pointerBaseWidth",{get:function(){return this.getPropertyValue("pointerBaseWidth")},set:function(t){this.setPropertyValue("pointerBaseWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerLength",{get:function(){return this.getPropertyValue("pointerLength")},set:function(t){this.setPropertyValue("pointerLength",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerX",{get:function(){return this.getPropertyValue("pointerX")},set:function(t){this.setPropertyValue("pointerX",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerY",{get:function(){return this.getPropertyValue("pointerY")},set:function(t){this.setPropertyValue("pointerY",t,!0)},enumerable:!0,configurable:!0}),e})(rt);var Pm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PointedRectangle",t.element=t.paper.add("path"),t.cornerRadius=6,t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.cornerRadius,i=this.innerWidth,r=this.innerHeight;if(i>0&&r>0){var s=this.pointerX,o=this.pointerY,n=this.pointerBaseWidth/2,l=Pt(i/2,r/2),h=J(t,0,l),u=J(t,0,l),p=J(t,0,l),d=J(t,0,l),c=0,f=0,g=i,m=0,y=i,v=r,x=0,_=r,$=void 0,T=void 0,S=void 0,k=void 0,A=(s-c)*(v-f)-(o-f)*(y-c),L=(s-x)*(m-_)-(o-_)*(g-x);if(A>0&&L>0){var O=J(s,h+n,i-n-u);o=J(o,-1/0,0),$="M"+h+",0 L"+(O-n)+",0 L"+s+","+o+" L"+(O+n)+",0 L"+(i-u)+",0"}else $="M"+h+",0 L"+(i-u)+",0";if(A<0&&L<0){var O=J(s,d+n,i-n-p);o=J(o,r,1/0),S=" L"+(i-p)+","+r+" L"+(O+n)+","+r+" L"+s+","+o+" L"+(O-n)+","+r+" L"+d+","+r}else S=" L"+d+","+r;if(A<0&&L>0){var I=J(o,h+n,r-d-n);s=J(s,-1/0,0),k=" L0,"+(r-d)+" L0,"+(I+n)+" L"+s+","+o+" L0,"+(I-n)+" L0,"+h}else k=" L0,"+h;if(A>0&&L<0){var I=J(o,u+n,r-n-p);s=J(s,i,1/0),T=" L"+i+","+u+" L"+i+","+(I-n)+" L"+s+","+o+" L"+i+","+(I+n)+" L"+i+","+(r-p)}else T=" L"+i+","+(r-p);var R=" a"+u+","+u+" 0 0 1 "+u+","+u,B=" a"+p+","+p+" 0 0 1 -"+p+","+p,Z=" a"+d+","+d+" 0 0 1 -"+d+",-"+d,j=" a"+h+","+h+" 0 0 1 "+h+",-"+h;this.path=$+R+T+B+S+Z+k+j}},Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),e})(_m);var qa=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._boundingRect={x:-4e4,y:-4e4,width:8e4,height:8e4},t._pointTo={x:0,y:0},t.fitPointerToBounds=!1,t._verticalOrientation="up",t.fixDoc=!0,t.className="Tooltip",t.isMeasured=!1,t.getFillFromObject=!0,t.margin(5,5,5,5),t.defaultState.transitionDuration=1,t.hiddenState.transitionDuration=1;var i=t.background;i.interactionsEnabled=!1,i.fillOpacity=.9,i.strokeWidth=1,i.strokeOpacity=1,i.stroke=nt("#ffffff"),i.cornerRadius=3,i.pointerLength=6,i.pointerBaseWidth=10;var r=new Xp;r.dy=1,r.dx=1,r.opacity=.5,i.filters.push(r),t.autoTextColor=!0;var s=t.createChild(Me);return s.shouldClone=!1,t.label=s,s.padding(7,12,4,12),s.interactionsEnabled=!1,s.horizontalCenter="middle",s.fill=nt("#ffffff"),t._disposers.push(s),t.label.events.on("sizechanged",t.drawBackground,t),t.label.zIndex=1,t.pointerOrientation="vertical",t.animationDuration=0,t.animationEasing=Jr,t.setPropertyValue("showInViewport",!1),t.role="tooltip",t.visible=!1,t.opacity=0,t.x=0,t.y=0,t.events.on("visibilitychanged",t.handleVisibility,t),t.applyTheme(),t}return e.prototype.handleVisibility=function(){this.visible&&this.label.invalidate()},Object.defineProperty(e.prototype,"getStrokeFromObject",{get:function(){return this.getPropertyValue("getStrokeFromObject")},set:function(t){this.setPropertyValue("getStrokeFromObject",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoTextColor",{get:function(){return this.getPropertyValue("autoTextColor")},set:function(t){this.setPropertyValue("autoTextColor",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keepTargetHover",{get:function(){return this.getPropertyValue("keepTargetHover")},set:function(t){var i=this;this.setPropertyValue("keepTargetHover",t,!0)&&t&&(this.hoverable=!0,this.background.interactionsEnabled=!0,this._disposers.push(this.events.on("over",function(r){i.targetSprite&&i.targetSprite.hoverable&&(i.targetSprite.isHover=!0)})),this._disposers.push(this.events.on("out",function(r){i.targetSprite&&i.targetSprite.hoverable&&(i.targetSprite.isHover=!1)})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showInViewport",{get:function(){return this.getPropertyValue("showInViewport")},set:function(t){this.setPropertyValue("showInViewport",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getFillFromObject",{get:function(){return this.getPropertyValue("getFillFromObject")},set:function(t){this.setPropertyValue("getFillFromObject",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createBackground=function(){return new Pm},Object.defineProperty(e.prototype,"pointerOrientation",{get:function(){return this.getPropertyValue("pointerOrientation")},set:function(t){this.setPropertyValue("pointerOrientation",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(t){this.setPropertyValue("animationDuration",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(t){this.setPropertyValue("animationEasing",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.label.html},set:function(t){this.label.html!=t&&(this.label.html=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.label.text},set:function(t){this.label.text!=t&&(this.label.text=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.label;t.invalid&&t.validate();var i=this._pointTo.x,r=this._pointTo.y,s=this._boundingRect,o=t.measuredWidth,n=t.measuredHeight,l=this.background.pointerLength,h,u;if(this.ignoreBounds&&(s=void 0),s&&this.fixDoc&&o>s.width){ll({x:s.x,y:s.y},this.parent);var p=ll({x:s.x+s.width,y:s.y+s.height},this.parent),d=document.body.offsetWidth;document.body.offsetHeight,p.x>d/2?s.x=s.width-o:s.width=s.x+o}var c=this.pointerOrientation;c=="horizontal"||c=="left"||c=="right"?(u=-n/2,c=="horizontal"?s&&i>s.x+s.width/2?h=-o/2-l:h=o/2+l:c=="left"?h=o/2+l:h=-o/2-l):(s&&(h=J(0,s.x-i+o/2,s.x-i+s.width-o/2)),c=="vertical"?s&&r>s.y+n+l?(u=-n-l,this._verticalOrientation="up"):(u=l,this._verticalOrientation="down"):c=="down"?(u=-n-l,this._verticalOrientation="up"):(u=l,this._verticalOrientation="down")),s&&(u=J(u,s.y-r,s.y+s.height-n-r)),t.x=h,t.y=u,this.drawBackground()},e.prototype.updateBackground=function(){this.group.addToBack(this.background.group)},e.prototype.drawBackground=function(){var t=this.label,i=this.background,r=t.measuredWidth,s=t.measuredHeight,o=this._boundingRect,n=r,l=t.pixelX-r/2,h=s,u=t.pixelY,p=this._pointTo.x,d=this._pointTo.y,c=o.x-p,f=c+o.width,g=o.y-d,m=g+o.height;i.x=l,i.y=u,i.width=n,i.height=h,this.fitPointerToBounds?(i.pointerX=J(-i.x,c-i.x,f-i.x),i.pointerY=J(-i.y,g-i.y,m-i.y)):(i.pointerX=-i.x,i.pointerY=-i.y),i.validate()},e.prototype.delayedPointTo=function(t,i){var r=this;this._pointToDisposer&&this._pointToDisposer.dispose(),this._pointToDisposer=w.events.once("exitframe",function(){r.pointTo(t,i)}),this.addDisposer(this._pointToDisposer)},e.prototype.pointTo=function(t,i){(this._pointTo.x!=t.x||this._pointTo.y!=t.y)&&(this._pointTo=t,this.invalidate(),!this.visible||i?(this.moveTo(this._pointTo),this._animation&&this._animation.kill()):this.pixelX==0&&this.pixelY==0?this.moveTo(this._pointTo):(this._animation&&this._animation.kill(),this._animation=new Pi(this,[{property:"x",to:t.x,from:this.pixelX},{property:"y",to:t.y,from:this.pixelY}],this.animationDuration,this.animationEasing).start()))},e.prototype.setBounds=function(t){var i=this._boundingRect;(i.x!=t.x||i.y!=t.y||i.width!=t.width||i.height!=t.height)&&(this._boundingRect=t,this.invalidate())},Object.defineProperty(e.prototype,"boundingContainer",{set:function(t){this._boundingContainer=t,t.events.on("sizechanged",this.updateBounds,this),t.events.on("positionchanged",this.updateBounds,this)},enumerable:!0,configurable:!0}),e.prototype.updateBounds=function(){var t=this._boundingContainer,i=qo({x:t.pixelX,y:t.pixelY,width:t.maxWidth,height:t.maxHeight},t);this.setBounds(i)},Object.defineProperty(e.prototype,"ignoreBounds",{get:function(){return this.getPropertyValue("ignoreBounds")},set:function(t){this.setPropertyValue("ignoreBounds",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalOrientation",{get:function(){return this._verticalOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.label.copyFrom(t.label),t._boundingRect&&(this._boundingRect=t._boundingRect)},e.prototype.asFunction=function(t){return t=="animationEasing"||a.prototype.asIs.call(this,t)},e})(Q);w.registeredClasses.Tooltip=qa;var Xh=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="ResizeButton",t.orientation="horizontal",t.layout="absolute",t.horizontalCenter="middle",t.verticalCenter="middle",t.draggable=!0,t.padding(8,8,8,8),t.background.cornerRadius(20,20,20,20);var i=new rt;i.element=t.paper.add("path");var r=z({x:-2,y:-6});return r+=V({x:-2,y:6}),r+=z({x:2,y:-6}),r+=V({x:2,y:6}),i.path=r,i.pixelPerfect=!0,i.padding(0,4,0,4),i.stroke=new ct().getFor("alternativeText"),i.strokeOpacity=.7,t.icon=i,t.label.dispose(),t.label=void 0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"orientation",{set:function(t){var i=this.icon;i&&(t=="horizontal"?i.rotation=0:i.rotation=-90)},enumerable:!0,configurable:!0}),e})(rr);w.registeredClasses.ResizeButton=Xh;var Za=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._previousStart=0,t._previousEnd=1,t._prevStart=0,t._prevEnd=1,t._isBusy=!1,t._skipRangeEvents=!1,t.updateWhileMoving=!0,t.className="Scrollbar",t.minHeight=12,t.minWidth=12,t.animationDuration=0,t.animationEasing=Jr,t.margin(10,10,10,10);var i=new ct,r=t.background;return r.cornerRadius(10,10,10,10),r.fill=i.getFor("fill"),r.fillOpacity=.5,t.showSystemTooltip=!0,t.startGrip=new Xh,t.endGrip=new Xh,t.events.on("transformed",function(){t.updateThumb()},t,!1),t.start=0,t.end=1,t.role="scrollbar",t.thumb.role="slider",t.thumb.readerLive="polite",t.startGrip.role="slider",t.endGrip.role="slider",t.events.once("inited",function(){t._previousStart=void 0,t.dispatchRangeChange()},void 0,!1),t.hideGrips=!1,t.orientation="horizontal",t.setSVGAttribute({"aria-valuemin":"0"}),t.setSVGAttribute({"aria-valuemax":"100"}),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),this.orientation==="horizontal"?(C(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")),C(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use left and right arrows to move selection")),C(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use left and right arrows to move left selection")),C(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use left and right arrows to move right selection")),this.readerOrientation="horizontal"):(C(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")),C(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use up and down arrows to move selection")),C(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use up and down arrows to move upper selection")),C(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use up and down arrows to move lower selection")),this.readerOrientation="vertical"),this.readerControls=this.baseSprite.uidAttr()},e.prototype.validateLayout=function(){this.updateSize(),a.prototype.validateLayout.call(this),this.updateExtremes()},e.prototype.processBackground=function(){a.prototype.processBackground.call(this);var t=this.background;t.clickable=!0,t.events.on("hit",this.handleBgHit,this,void 0)},e.prototype.handleBgHit=function(t){this.makeBusy();var i=t.spritePoint;i=ni(i,this.background,this);var r=this.thumb;if(this.orientation=="horizontal"){var s=i.x-r.pixelWidth/2;s=J(s,0,this.innerWidth-r.pixelWidth),this._thumbAnimation=r.animate({property:"x",to:s},this.animationDuration,this.animationEasing)}else{var o=i.y-r.pixelHeight/2;o=J(o,0,this.innerHeight-r.pixelHeight),this._thumbAnimation=r.animate({property:"y",to:o},this.animationDuration,this.animationEasing)}this.animationDuration>0?this._thumbAnimation.events.on("animationended",this.makeUnbusy,this,!1):(this._thumb.validate(),this.makeUnbusy())},e.prototype.makeBusy=function(){this._isBusy=!0,this._skipRangeEvents=!1,this._unbusyTimeout&&this.removeDispose(this._unbusyTimeout),this._unbusyTimeout=void 0,this.stopAnimations()},e.prototype.stopAnimations=function(){this._thumbAnimation&&this._thumbAnimation.stop(!0),this._zoomAnimation&&this._zoomAnimation.stop(!0)},e.prototype.makeUnbusy=function(){this._unbusyTimeout=this.setTimeout(this.makeUnbusyReal.bind(this),this.animationDuration*1.1)},e.prototype.makeUnbusyReal=function(){this._usingGrip=void 0,this._isBusy=!1,this.updateWhileMoving||this.dispatchRangeChange()},e.prototype.dispatchRangeChange=function(){(this._previousEnd!=this.end||this._previousStart!=this.start)&&(this._previousStart=this.start,this._previousEnd=this.end,this.dispatch("rangechanged"))},e.prototype.updateThumb=function(t){if(t===void 0&&(t=!0),!!this.parent){var i=this.thumb,r=this.start,s=this.end,o=this.startGrip,n=this.endGrip,l=this.adapter.apply("positionValueDirection",{flipped:!1}).flipped,h=l?"To %1":"From %1",u=l?"From %1":"To %1",p,d;if(this.orientation=="horizontal"){var c=this.innerWidth;i.width=c*(s-r),i.maxX=c-i.pixelWidth,i.x=r*c,o.moveTo({x:i.pixelX,y:0},void 0,void 0,!0),n.moveTo({x:i.pixelX+i.pixelWidth,y:0},void 0,void 0,!0),p=this.adapter.apply("positionValue",{value:Math.round(r*100)+"%",position:r}).value,d=this.adapter.apply("positionValue",{value:Math.round(s*100)+"%",position:s}).value,o.readerTitle=this.language.translate(h,void 0,p),o.readerValueNow=""+Math.round(r*100),o.readerValueText=o.readerTitle,n.readerTitle=this.language.translate(u,void 0,d),n.readerValueNow=""+Math.round(s*100),n.readerValueText=n.readerTitle}else{var f=this.innerHeight;i.height=f*(s-r),i.maxY=f-i.pixelHeight,i.y=(1-s)*f,o.moveTo({x:0,y:i.pixelY+i.pixelHeight},void 0,void 0,!0),n.moveTo({x:0,y:i.pixelY},void 0,void 0,!0),p=this.adapter.apply("positionValue",{value:Math.round((1-r)*100)+"%",position:1-r}).value,d=this.adapter.apply("positionValue",{value:Math.round((1-s)*100)+"%",position:1-s}).value,o.readerTitle=this.language.translate(u,void 0,p),o.readerValueNow=""+Math.round(r*100),o.readerValueText=o.readerTitle,n.readerTitle=this.language.translate(h,void 0,d),n.readerValueNow=""+Math.round(s*100),n.readerValueText=n.readerTitle}i.readerTitle=this.language.translate("From %1 to %2",void 0,p,d),i.readerValueNow=""+Math.round(r*100),i.readerValueText=i.readerTitle,this.readerValueNow=""+Math.round(r*100),this.readerValueText=i.readerTitle,!this._skipRangeEvents&&this.updateWhileMoving&&t&&this.dispatchRangeChange()}},e.prototype.updateExtremes=function(){var t=this.orientation,i=0,r=0,s=0,o=0;t=="horizontal"?(s=this.innerWidth,r=o=this.innerHeight/2):(o=this.innerHeight,i=s=this.innerWidth/2);var n=this.startGrip;n.minX=i,n.maxX=s,n.minY=r,n.maxY=o;var l=this.endGrip;l.minX=i,l.maxX=s,l.minY=r,l.maxY=o;var h=this.thumb;h.minX=i,h.maxX=s,h.minY=r,h.maxY=o},e.prototype.updateSize=function(){var t=this.orientation,i=this.startGrip;i&&(i.orientation=t),this.endGrip&&(this.endGrip.orientation=t);var r=this.thumb;r&&(t=="horizontal"?(P(this._pixelWidth)||this.width instanceof _t||(this.width=N(100)),C(this.percentHeight)&&(this.height=this.minHeight),r.height=this.innerHeight,r.verticalCenter="middle",r.horizontalCenter="left"):(P(this._pixelHeight)||this.height instanceof _t||(this.height=N(100)),C(this.percentWidth)&&(this.width=this.minWidth),r.width=this.innerWidth,r.verticalCenter="top",r.horizontalCenter="middle"))},Object.defineProperty(e.prototype,"isBusy",{get:function(){return this._isBusy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return Math.min(this.getPosition(this._start),this.getPosition(this._end))},set:function(t){this._isBusy||(this.__start=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__start",{get:function(){return this._start},set:function(t){this._start=this.getPosition(t),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return Math.max(this.getPosition(this._start),this.getPosition(this._end))},set:function(t){this._isBusy||(this.__end=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__end",{get:function(){return this._end},set:function(t){this._end=this.getPosition(t),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return{start:this.start,end:this.end,priority:this._usingGrip}},enumerable:!0,configurable:!0}),e.prototype.skipRangeEvents=function(){this._isBusy||(this._skipRangeEvents=!0)},e.prototype.fixRange=function(t){(t.start!=H(this._start,2)||t.end!=H(this._end,2))&&(this._start=t.start,this._end=t.end,this._skipRangeEvents=!0,this.updateThumb(),this._skipRangeEvents=!1,this.thumb.validate(),this.thumb.background.validate())},e.prototype.getPosition=function(t){return J(H(t,4),0,1)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t)&&(t==="horizontal"?(this.startGrip.cursorOverStyle=Le.horizontalResize,this.endGrip.cursorOverStyle=Le.horizontalResize):(this.startGrip.cursorOverStyle=Le.verticalResize,this.endGrip.cursorOverStyle=Le.verticalResize),this.updateByOrientation(),this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.updateByOrientation=function(){},Object.defineProperty(e.prototype,"startGrip",{get:function(){return this._startGrip},set:function(t){this._startGrip&&this.removeDispose(this._startGrip),this._startGrip=t,this.processGrip(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endGrip",{get:function(){return this._endGrip},set:function(t){this._endGrip&&this.removeDispose(this._endGrip),this._endGrip=t,this.processGrip(t)},enumerable:!0,configurable:!0}),e.prototype.processGrip=function(t){t.parent=this,t.isMeasured=!1,t.focusable=!0,t.shouldClone=!1,t.zIndex=100,t.events.on("drag",this.handleGripDrag,this,!1),t.events.on("dragstop",this.makeUnbusy,this,!1),t.events.on("down",this.makeBusy,this,!1),t.events.on("up",this.makeUnbusy,this,!1),this._disposers.push(t)},e.prototype.handleGripDrag=function(t){this.makeBusy(),t.target===this._startGrip?this._usingGrip="start":this._usingGrip="end",this.orientation=="horizontal"?(this._start=this.startGrip.pixelX/this.innerWidth,this._end=this.endGrip.pixelX/this.innerWidth):(this._start=1-this.startGrip.pixelY/this.innerHeight,this._end=1-this.endGrip.pixelY/this.innerHeight),this.updateThumb()},Object.defineProperty(e.prototype,"thumb",{get:function(){if(!this._thumb){var t=new rr;t.background.cornerRadius(10,10,10,10),t.padding(0,0,0,0),this.thumb=t}return this._thumb},set:function(t){var i=this;t&&(this._thumb&&this.removeDispose(this._thumb),this._thumb=t,t.parent=this,t.isMeasured=!1,t.inert=!0,t.draggable=!0,t.clickable=!0,t.hoverable=!0,t.focusable=!0,t.shouldClone=!1,t.zIndex=0,t.cursorOverStyle=Le.grab,t.cursorDownStyle=Le.grabbing,t.events.on("dragstart",this.makeBusy,this,!1),t.events.on("dragstop",this.makeUnbusy,this,!1),t.events.on("positionchanged",this.handleThumbPosition,this,!1),t.events.on("sizechanged",this.handleThumbPosition,this,!1),t.events.on("doublehit",this.handleDoubleClick,this,!1),this._disposers.push(gt().body.events.on("keyup",function(r){ir.isKey(r.event,["space","enter"])&&i.thumb.isFocused&&(r.event.preventDefault(),i.handleDoubleClick())})),this._disposers.push(this._thumb))},enumerable:!0,configurable:!0}),e.prototype.handleDoubleClick=function(){this.makeBusy();var t=0,i=1;this.start!=0||this.end!=1?(this._prevStart=this.start,this._prevEnd=this.end):(t=this._prevStart,i=this._prevEnd);var r=this.animate([{property:"__start",to:t},{property:"__end",to:i}],this.animationDuration,this.animationEasing);r&&!r.isFinished()?(r.events.on("animationended",this.makeUnbusy,this,!1),this._zoomAnimation=r):this.makeUnbusy()},e.prototype.handleThumbPosition=function(){var t=this.thumb;if(this.orientation=="horizontal"){var i=this.innerWidth,r=t.innerWidth,s=t.pixelX;this._start=s/i,this._end=(s+r)/i,this.updateThumb()}else{var o=this.innerHeight,n=t.innerHeight,l=t.pixelY;l+n>o&&(l=o-n,t.y=l),this._start=1-(l+n)/o,this._end=1-l/o,this.updateThumb()}},e.prototype.createBackground=function(){return new $i},Object.defineProperty(e.prototype,"hideGrips",{get:function(){return this._hideGrips},set:function(t){var i=this;this._hideGrips=t,this._overDisposer&&this.removeDispose(this._overDisposer),this._outDisposer&&this.removeDispose(this._outDisposer),t?(this._overDisposer=this.events.on("over",function(){i.startGrip.show(),i.endGrip.show()},void 0,!1),this._outDisposer=this.events.on("out",function(){i.startGrip.hide(),i.endGrip.hide()},void 0,!1),this.startGrip.hide(),this.endGrip.hide()):(this.startGrip.show(),this.endGrip.show())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(t){this.setPropertyValue("animationDuration",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(t){this.setPropertyValue("animationEasing",t)},enumerable:!0,configurable:!0}),e.prototype.asFunction=function(t){return t=="animationEasing"||a.prototype.asIs.call(this,t)},e})(Q);w.registeredClasses.Scrollbar=Za;var Ab=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.childrenCreated=!1,t.className="LegendDataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"label",{get:function(){var t=this;if(!this._label){var i=this.component.labels.create();this._label=i,this.addSprite(i),this._disposers.push(i),i.parent=this.itemContainer,this._disposers.push(new Lt(function(){C(t.component)&&t.component.labels.removeValue(i)}))}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.setProperty("color",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueLabel",{get:function(){var t=this;if(!this._valueLabel){var i=this.component.valueLabels.create();this._valueLabel=i,this.addSprite(i),this._disposers.push(i),i.parent=this.itemContainer,this._disposers.push(new Lt(function(){C(t.component)&&t.component.valueLabels.removeValue(i)}))}return this._valueLabel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemContainer",{get:function(){var t=this;if(!this._itemContainer){var i=this.component,r=i.itemContainers.create();r.parent=i,this._itemContainer=r,this.addSprite(r),this._disposers.push(r),r.togglable&&r.events.on("toggled",function(n){i.toggleDataItem(n.target.dataItem)},void 0,!1),r.focusable&&(r.events.on("hit",function(n){i.focusedItem=void 0},void 0,!1),r.events.on("focus",function(n){i.focusedItem=n.target.dataItem},void 0,!1),r.events.on("blur",function(n){i.focusedItem=void 0},void 0,!1)),this._disposers.push(new Lt(function(){C(t.component)&&t.component.itemContainers.removeValue(r)})),this.dataContext.uidAttr&&(r.readerControls=this.dataContext.uidAttr(),r.readerLabelledBy=this.dataContext.uidAttr());var s=this.dataContext;if((s instanceof wr||s instanceof rt)&&!s.isDisposed()){var o=function(n){r.readerChecked=n.visible,r.events.disableType("toggled"),r.isActive=!n.visible,r.events.enableType("toggled")};s.addDisposer(new Lt(function(){t.component&&t.component.dataItems.remove(t)})),s instanceof rt?(r.addDisposer(s.events.on("visibilitychanged",o,void 0,!1)),r.addDisposer(s.events.on("hidden",function(n){r.readerChecked=!1,r.events.disableType("toggled"),r.isActive=!0,r.events.enableType("toggled")},void 0,!1)),r.addDisposer(s.events.on("shown",function(n){r.readerChecked=!0,r.events.disableType("toggled"),r.isActive=!1,r.events.enableType("toggled")},void 0,!1))):r.addDisposer(s.events.on("visibilitychanged",o,void 0,!1))}}return this._itemContainer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marker",{get:function(){var t=this;if(!this._marker){var i=this.component.markers.create();this._marker=i,i.parent=this.itemContainer,this.addSprite(i),this._disposers.push(i),this._disposers.push(new Lt(function(){C(t.component)&&t.component.markers.removeValue(i)}))}return this._marker},enumerable:!0,configurable:!0}),e})(wr);var Yh=(function(){function a(){this.createMarker=!0}return a})();var zh=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Legend",t.layout="grid",t.setPropertyValue("useDefaultMarker",!1),t.setPropertyValue("scrollable",!1),t.setPropertyValue("contentAlign","center");var i=new Q;i.applyOnClones=!0,i.padding(8,0,8,0),i.margin(0,10,0,10),i.layout="horizontal",i.clickable=!0,i.focusable=!0,i.role="switch",i.togglable=!0,i.cursorOverStyle=Le.pointer,i.background.fillOpacity=0,t.itemContainers=new zt(i),t._disposers.push(new Ft(t.itemContainers)),t._disposers.push(t.itemContainers.template),t._disposers.push(gt().body.events.on("keyup",function(u){if(ir.isKey(u.event,"enter")&&t.focusedItem){var p=t.focusedItem,d=p.itemContainer;d.togglable?t.toggleDataItem(p):d.clickable&&d.events.isEnabled("hit")&&(d.dispatchImmediately("hit",{event:u}),t.focusedItem=p)}},t));var r=new ct,s=new Q;s.width=23,s.height=23,s.interactionsEnabled=!1,s.applyOnClones=!0,s.setStateOnChildren=!0,s.background.fillOpacity=0,s.background.strokeOpacity=0,s.propertyFields.fill="fill",s.valign="middle";var o=r.getFor("disabledBackground");s.events.on("childadded",function(u){var p=u.newValue,d=p.states.create("active");d.properties.stroke=o,d.properties.fill=o}),t.markers=new zt(s),t._disposers.push(new Ft(t.markers)),t._disposers.push(t.markers.template);var n=s.createChild($i);n.width=N(100),n.height=N(100),n.applyOnClones=!0,n.propertyFields.fill="fill",n.strokeOpacity=0;var l=new Me;l.text="{name}",l.margin(0,5,0,5),l.valign="middle",l.applyOnClones=!0,l.states.create("active").properties.fill=r.getFor("disabledBackground"),t.labels=new zt(l),t._disposers.push(new Ft(t.labels)),t._disposers.push(t.labels.template),l.interactionsEnabled=!1,l.truncate=!0,l.fullWords=!1;var h=new Me;return h.margin(0,5,0,0),h.valign="middle",h.width=50,h.align="right",h.textAlign="end",h.applyOnClones=!0,h.states.create("active").properties.fill=r.getFor("disabledBackground"),h.interactionsEnabled=!1,t.valueLabels=new zt(h),t._disposers.push(new Ft(t.valueLabels)),t._disposers.push(t.valueLabels.template),t.position="bottom",i.states.create("active"),i.setStateOnChildren=!0,t.role="group",t.events.on("layoutvalidated",t.handleScrollbar,t,!1),t.events.on("parentset",function(){var u=t.parent;u&&t._disposers.push(u.events.on("maxsizechanged",function(){t.scrollable&&t.setTimeout(function(){t.updateMasks(),t.handleScrollbar(),t._handleWheelReal(1)},100)}))}),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Legend"))},e.prototype.createDataItem=function(){return new Ab},e.prototype.validateDataElements=function(){this.scrollbar&&(this.scrollbar.start=0,this.scrollbar.end=1),a.prototype.validateDataElements.call(this)},e.prototype.validateDataElement=function(t){a.prototype.validateDataElement.call(this,t);var i=t.itemContainer,r=t.marker;t.label;var s=t.valueLabel;i.readerChecked=t.dataContext.visible,t.dataContext.legendDataItem=t;var o=t.label.maxWidth;t.label.width instanceof _t||(t.label.width=void 0),o>0&&(t.label.maxWidth=o),s.align=="right"&&(s.width=void 0);var n=t.dataContext.legendSettings,l=t.dataContext;l.createLegendMarker&&(!this.useDefaultMarker||!(l instanceof rt))?t.childrenCreated||(l.createLegendMarker(r),t.childrenCreated=!0):this.markers.template.propertyFields.fill=void 0,l.updateLegendValue&&l.updateLegendValue(),l.component&&l.component.updateLegendValue&&l.component.updateLegendValue(l),s.invalid&&s.validate(),s.text==""||s.text==null?s.__disabled=!0:s.__disabled=!1,n&&(n.itemValueText!=null||n.valueText!=null)&&(s.__disabled=!1);var h=t.dataContext.visible;h===void 0&&(h=!0),h=xe(h),t.dataContext.visible=h,i.events.disableType("toggled"),i.isActive=!h,i.isActive?i.setState("active",0):i.setState("default",0),i.events.enableType("toggled")},e.prototype.afterDraw=function(){var t=this,i=this.getPropertyValue("maxWidth"),r=0;this.labels.each(function(p){p.invalid&&(p.maxWidth=void 0,p.validate()),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>r&&(r=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var s=0;this.valueLabels.each(function(p){p.invalid&&p.validate(),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>s&&(s=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var o=0;this.markers.each(function(p){p.invalid&&p.validate(),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>o&&(o=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var n=this.itemContainers.template,l=n.pixelMarginRight+n.pixelMarginLeft,h,u=r+s+o;P(i)?(i=i-l,i>u&&(i=u),h=i-o-s):h=r,this.labels.each(function(p){(t.valueLabels.template.align=="right"||p.measuredWidth>h)&&(p.width instanceof _t||(p.width=Math.min(p.maxWidth,h-p.pixelMarginLeft-p.pixelMarginRight),p.maxWidth=p.width))}),this.valueLabels.template.align=="right"&&this.valueLabels.each(function(p){p.width=s-p.pixelMarginRight-p.pixelMarginLeft}),a.prototype.afterDraw.call(this)},e.prototype.handleScrollbar=function(){var t=this.scrollbar;if(this.scrollable&&t){var i=this.maxHeight;t.height=i,t.x=this.measuredWidth-t.pixelWidth-t.pixelMarginLeft,this.contentHeight>i?(t.visible=!0,t.thumb.height=t.height*i/this.contentHeight,this.paddingRight=t.pixelWidth+t.pixelMarginLeft+t.pixelMarginRight):(t.thumb.height=t.height*i/this.contentHeight,this.paddingRight=t.pixelWidth+t.pixelMarginLeft+t.pixelMarginRight,t.visible=!1,t.start=0,t.end=1),t.handleThumbPosition(),this.updateMasks()}},Object.defineProperty(e.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(t){this.setPropertyValue("position",t)&&(t=="left"||t=="right"?(this.margin(10,5,10,10),this.valign="middle",this.contentAlign="none",this.valueLabels.template.align="right",P(this.maxColumns)||(this.maxColumns=1),this.width=void 0,this.maxWidth=220):(this.maxColumns=void 0,this.width=N(100),this.valueLabels.template.align="left"),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useDefaultMarker",{get:function(){return this.getPropertyValue("useDefaultMarker")},set:function(t){this.setPropertyValue("useDefaultMarker",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollable",{get:function(){return this.getPropertyValue("scrollable")},set:function(t){if(this.setPropertyValue("scrollable",t,!0))if(t){var i=this.createChild(Za);this.scrollbar=i,i.isMeasured=!1,i.orientation="vertical",i.endGrip.__disabled=!0,i.startGrip.__disabled=!0,i.visible=!1,i.marginLeft=5,this._mouseWheelDisposer=this.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer),this._disposers.push(i.events.on("rangechanged",this.updateMasks,this,!1))}else this._mouseWheelDisposer&&(this._mouseWheelDisposer.dispose(),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=void 0))},enumerable:!0,configurable:!0}),e.prototype.handleWheel=function(t){this._handleWheelReal(t.shift.y)},e.prototype._handleWheelReal=function(t){var i=this.scrollbar;if(i){var r=t/1e3*this.measuredHeight/this.contentHeight,s=i.end-i.start;t>0?(i.start=mt(0,i.start-r),i.end=i.start+s):(i.end=Pt(1,i.end-r),i.start=i.end-s)}},e.prototype.updateMasks=function(){var t=this;this.scrollbar&&this.itemContainers.each(function(i){i.dy=-t.scrollbar.thumb.pixelY*t.contentHeight/t.maxHeight,i.maskRectangle={x:0,y:-i.dy,width:t.measuredWidth,height:t.maxHeight}}),this.invalidatePosition()},e.prototype.toggleDataItem=function(t){var i=t.dataContext;!i.visible||i.isHiding||i instanceof rt&&i.isHidden?(t.color=t.colorOrig,i.appeared=!0,t.itemContainer.isActive=!1,i.hidden===!0&&(i.hidden=!1),i.show?i.show():i.visible=!0,this.svgContainer.readerAlert(this.language.translate("%1 shown",this.language.locale,t.label.readerTitle))):(t.itemContainer.isActive=!0,i.appeared=!0,i.hide?i.hide():i.visible=!1,this.svgContainer.readerAlert(this.language.translate("%1 hidden",this.language.locale,t.label.readerTitle)),t.color=new ct().getFor("disabledBackground"))},Object.defineProperty(e.prototype,"preloader",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.handleDataItemPropertyChange=function(t,i){t.valueLabel.invalidate(),t.label.invalidate()},e})(Cr);w.registeredClasses.Legend=zh;De.push({relevant:Fe.widthXS,state:function(a,e){if(a instanceof zh&&(a.position=="left"||a.position=="right")){var t=a.states.create(e);return t.properties.position="bottom",t}return null}});De.push({relevant:Fe.heightXS,state:function(a,e){if(a instanceof zh&&(a.position=="top"||a.position=="bottom")){var t=a.states.create(e);return t.properties.position="right",t}return null}});De.push({relevant:Fe.isXS,state:function(a,e){if(a instanceof zh){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var Vi=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Bullet",t.isMeasured=!1,t.tooltipX=0,t.tooltipY=0,t.layout="none",t.applyOnClones=!0,t.copyToLegendMarker=!0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(t){if(this.setPropertyValue("locationX",t)){var i=this.dataItem;i&&i.component&&i.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(t){if(this.setPropertyValue("locationY",t)){var i=this.dataItem;i&&i.component&&i.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xField",{get:function(){return this.getPropertyValue("xField")},set:function(t){this.setPropertyValue("xField",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yField",{get:function(){return this.getPropertyValue("yField")},set:function(t){this.setPropertyValue("yField",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDynamic",{get:function(){return this.getPropertyValue("isDynamic")},set:function(t){this.setPropertyValue("isDynamic",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"copyToLegendMarker",{get:function(){return this.getPropertyValue("copyToLegendMarker")},set:function(t){this.setPropertyValue("copyToLegendMarker",t)},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.Bullet=Vi;De.push({relevant:Fe.isXS,state:function(a,e){if(a instanceof Vi){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var rn=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SeriesDataItem",t.values.value={},t.values.value={},t.applyTheme(),t}return Object.defineProperty(e.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new It,this._disposers.push(new Pr(this._bullets))),this._bullets},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.bullets.clear(),a.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),e})(wr);var Ja=(function(a){D(e,a);function e(){var t=a.call(this)||this;if(t._ignoreMinMax=!1,t._showBullets=!0,t.legendSettings=new Yh,t._tmin=new It,t._tmax=new It,t._smin=new It,t._smax=new It,t.dataItemsByAxis=new It,t.skipFocusThreshold=20,t._itemReaderTextChanged=!1,t.calculatePercent=!1,t.usePercentHack=!0,t.autoDispose=!0,t.simplifiedProcessing=!1,t.constructor===e)throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");t.className="Series",t.isMeasured=!1,t.layout="none",t.shouldClone=!1,t.setPropertyValue("hidden",!1),t.axisRanges=new wt,t.axisRanges.events.on("inserted",t.processAxisRange,t,!1),t.minBulletDistance=0,t.mainContainer=t.createChild(Q),t.mainContainer.shouldClone=!1,t.mainContainer.mask=t.createChild(rt),t._disposers.push(t.mainContainer);var i=t.mainContainer.createChild(Q);return t._shouldBeReady.push(i),i.shouldClone=!1,i.layout="none",i.virtualParent=t,t._disposers.push(i),t.bulletsContainer=i,t.tooltip=new qa,t.tooltip.virtualParent=t,t._disposers.push(t.tooltip),t.hiddenState.transitionEasing=am,t.dataItem=t.createDataItem(),t._disposers.push(t.dataItem),t.dataItem.component=t,t.role="group",t.applyTheme(),t}return e.prototype.applyTheme=function(){a.prototype.applyTheme.call(this),$t.autoSetClassName&&this.bulletsContainer&&(this.bulletsContainer.className=this.className+"-bullets",this.bulletsContainer.setClassName())},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Series"))},e.prototype.createDataItem=function(){return new rn},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart},set:function(t){this._chart=t},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){},e.prototype.processBullet=function(t){var i=this,r=t.newValue;r.isTemplate=!0,this.events.once("datavalidated",function(s){i.itemsFocusable()&&(r.focusable=!0)}),this.invalidate()},e.prototype.removeBullet=function(t){var i=t.oldValue;this.dataItems.each(function(r){var s=r.bullets.getKey(i.uid);s&&s.dispose()}),this.invalidate()},e.prototype.validateDataItems=function(){a.prototype.validateDataItems.call(this),this.processValues(!1)},e.prototype.getFirstValue=function(t,i){for(var r=i;r>=0;r--){var s=this.dataItems.getIndex(r),o=s.getActualWorkingValue(t);if(P(o))return o}return null},e.prototype.getAbsoluteFirstValue=function(t){for(var i=0;i<this.dataItems.length;i++){var r=this.dataItems.getIndex(i),s=r.values[t].value;if(P(s))return s}return null},e.prototype.rangeChangeUpdate=function(){a.prototype.rangeChangeUpdate.call(this),this.processValues(!0)},e.prototype.processValues=function(t){var i=this;if(!this.simplifiedProcessing){var r=this.dataItems,s={},o={},n={},l={},h={},u={},p={},d={},c={},f={},g=mt(0,this.startIndex);g=Pt(g,this.dataItems.length);var m=Pt(this.endIndex,this.dataItems.length);if(P(g)||(g=0),P(m)||(m=this.dataItems.length),g>0){var y=r.getIndex(g-1);at(y.values,function(S,k){var A=y.getActualWorkingValue(S);P(A)&&(d[S]=A)})}for(var v=function(S){var k=r.getIndex(S);at(k.values,function(A,L){var O=k.getActualWorkingValue(A);if(P(O)){P(s[A])||(s[A]=0),s[A]++,P(o[A])||(o[A]=0),o[A]+=O,P(n[A])||(n[A]=0),n[A]+=Math.abs(O),P(u[A])||(u[A]=O),p[A]=O,P(l[A])?l[A]>O&&(l[A]=O):l[A]=O,P(h[A])?h[A]<O&&(h[A]=O):h[A]=O,P(c[A])||(c[A]=i.getFirstValue(A,g)),P(f[A])||(f[A]=i.getAbsoluteFirstValue(A)),k.setCalculatedValue(A,O-c[A],"change"),k.setCalculatedValue(A,(O-c[A])/c[A]*100,"changePercent"),k.setCalculatedValue(A,O-f[A],"startChange"),k.setCalculatedValue(A,(O-f[A])/f[A]*100,"startChangePercent");var I=d[A];P(I)||(I=O),k.setCalculatedValue(A,O-I,"previousChange"),k.setCalculatedValue(A,(O-I)/I*100,"previousChangePercent"),d[A]=O}})},x=g;x<m;x++)v(x);if(this.calculatePercent)for(var _=function(S){var k=r.getIndex(S);at(k.values,function(A){var L=n[A],O=k.getActualWorkingValue(A);if(P(O))if(L>0){i.usePercentHack&&O==L&&(L=k.values[A].value);var I=O/L*100;k.setCalculatedValue(A,I,"percent")}else k.setCalculatedValue(A,0,"percent")})},x=g;x<m;x++)_(x);if(g>0){var $=r.getIndex(g-1);at($.values,function(S){var k=$.values[S].value;$.setCalculatedValue(S,k-u[S],"change"),$.setCalculatedValue(S,(k-u[S])/u[S]*100,"changePercent")})}var T=this.dataItem;at(T.values,function(S){T.setCalculatedValue(S,o[S],"sum"),T.setCalculatedValue(S,n[S],"absoluteSum"),T.setCalculatedValue(S,o[S]/s[S],"average"),T.setCalculatedValue(S,u[S],"open"),T.setCalculatedValue(S,p[S],"close"),T.setCalculatedValue(S,l[S],"low"),T.setCalculatedValue(S,h[S],"high"),T.setCalculatedValue(S,s[S],"count")})}},e.prototype.validate=function(){Bs()&&this.filters.clear(),E(this.axisRanges.iterator(),function(s){s.validate()}),a.prototype.validate.call(this);var t=this.bulletsContainer;if(t.fill=this.fill,t.stroke=this.stroke,t.x=this.pixelX,t.y=this.pixelY,this.bulletsContainer.children.length>0)if(this._showBullets){for(var i=0;i<this.startIndex;i++){var r=this.dataItems.getIndex(i);r&&r.bullets.each(function(s,o){o.__disabled=!0})}for(var i=this.dataItems.length-1;i>this.endIndex;i--){var r=this.dataItems.getIndex(i);r&&r.bullets.each(function(n,l){l.__disabled=!0})}}else this.bulletsContainer.children.each(function(s){s.__disabled=!0});this.updateTooltipBounds()},e.prototype.updateTooltipBounds=function(){if(this.topParent){var t=0,i=0,r=this.topParent.maxWidth,s=this.topParent.maxHeight,o={x:t,y:i,width:r,height:s};this.tooltip.setBounds(o)}},e.prototype.shouldCreateBullet=function(t,i){return!0},e.prototype.validateDataElement=function(t){var i=this;a.prototype.validateDataElement.call(this,t),this._showBullets?(this.isHidden||(this.bulletsContainer.visible=!0),this.bullets.each(function(r){var s=t.bullets.getKey(r.uid);if(i.shouldCreateBullet(t,r)){if(!s){var o=r.propertyFields.disabled,n=t.dataContext;o&&n&&n[o]===!1?(r.applyOnClones=!1,r.disabled=!1,s=r.clone(),r.disabled=!0,r.applyOnClones=!0):s=r.clone(),s.shouldClone=!1,t.addSprite(s),(!i.visible||i.isHiding)&&s.hide(0)}var l=s.dataItem;if(l!=t){l&&l.bullets.setKey(r.uid,void 0);var h=i.itemReaderText;s instanceof Vi&&(h||(h="{"+s.xField+"}: {"+s.yField+"}"),s.isDynamic&&(t.events.on("workingvaluechanged",s.deepInvalidate,s,!1),i.dataItem.events.on("workingvaluechanged",s.deepInvalidate,s,!1)),s.deepInvalidate()),s.focusable&&(s.events.on("focus",function(u){s.readerTitle=i.populateString(h,s.dataItem)},void 0,!1),s.events.on("blur",function(u){s.readerTitle=""},void 0,!1)),s.hoverable&&(s.events.on("over",function(u){s.readerTitle=i.populateString(h,s.dataItem)},void 0,!1),s.events.on("out",function(u){s.readerTitle=""},void 0,!1))}s.parent=i.bulletsContainer,t.bullets.setKey(r.uid,s),s.maxWidth=t.itemWidth,s.maxHeight=t.itemHeight,s.__disabled=!1,i.positionBullet(s)}else s&&(s.__disabled=!0)})):this.bulletsContainer.visible=!1},e.prototype.handleDataItemWorkingValueChange=function(t,i){this.dataRangeInvalid||this.invalidateProcessedData()},Object.defineProperty(e.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(t){this._ignoreMinMax=t,this.invalidateDataItems()},enumerable:!0,configurable:!0}),e.prototype.createMask=function(){},e.prototype.processAxisRange=function(t){this.rangesContainer||(this.rangesContainer=this.createChild(Q),this.rangesContainer.shouldClone=!1,this.rangesContainer.isMeasured=!1);var i=t.newValue;i&&(i.contents.parent=this.rangesContainer,i.isRange=!0,i.events.on("valuechanged",this.invalidateDataItems,this,!1))},e.prototype.getAxisField=function(t){},e.prototype.showTooltipAtPosition=function(t,i){},Object.defineProperty(e.prototype,"minBulletDistance",{get:function(){return this.getPropertyValue("minBulletDistance")},set:function(t){this.setPropertyValue("minBulletDistance",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new zt(new Vi),this._bullets.template.virtualParent=this,this._bullets.events.on("inserted",this.processBullet,this,!1),this._bullets.events.on("removed",this.removeBullet,this,!1),this._disposers.push(new Ft(this._bullets)),this._disposers.push(this._bullets.template)),this._bullets},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){},Object.defineProperty(e.prototype,"hiddenInLegend",{get:function(){return this.getPropertyValue("hiddenInLegend")},set:function(t){this.setPropertyValue("hiddenInLegend",t)&&this.chart&&this.chart.feedLegend()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(t){this.setPropertyValue("name",t);var i=this.legendDataItem;i&&(i.component.invalidate(),i.component.invalidateRawData()),this.readerTitle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemReaderText",{get:function(){var t=this._itemReaderText;return t||(this.tooltipText?t=sl(this.tooltipText):this.tooltipHTML&&(t=sl(this.tooltipHTML))),this._adapterO?this._adapterO.apply("itemReaderText",t):t},set:function(t){this._itemReaderText=t,this._itemReaderTextChanged=!0},enumerable:!0,configurable:!0}),e.prototype.itemsFocusable=function(){return!(this.dataItems.length>=this.skipFocusThreshold)},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),e.prototype.updateLegendValue=function(t,i){if(this.legendDataItem){var r=this.legendSettings,s=this.legendDataItem,o=s.label,n=s.valueLabel;t&&!t.isDisposed()||i?(n&&(r.itemValueText&&(n.text=r.itemValueText),n.dataItem=t),o&&(r.itemLabelText&&(o.text=r.itemLabelText),o.dataItem=t)):(o&&((r.labelText||r.itemLabelText!=null)&&(o.text=r.labelText),o.dataItem=this.dataItem),n&&((r.valueText||r.itemValueText!=null)&&(n.text=r.valueText),n.dataItem=this.dataItem))}},e.prototype.copyFrom=function(t){this.bullets.copyFrom(t.bullets),this.bulletsContainer.copyFrom(t.bulletsContainer),this.calculatePercent=t.calculatePercent,this.usePercentHack=t.usePercentHack,this.simplifiedProcessing=t.simplifiedProcessing,a.prototype.copyFrom.call(this,t)},e.prototype.raiseCriticalError=function(t){this._chart&&this._chart.modal&&(this._chart.modal.content=this._chart.adapter.apply("criticalError",t).message,this._chart.modal.closable=!1,$t.suppressErrors||this._chart.modal.open(),this._chart.disabled=!0),$t.verbose&&console.log(t)},e.prototype.applyFilters=function(){var t=this;a.prototype.applyFilters.call(this),this.bulletsContainer.filters.clear(),E(this.filters.iterator(),function(i){t.bulletsContainer.filters.push(i.clone())})},Object.defineProperty(e.prototype,"heatRules",{get:function(){var t=this;return this._heatRules||(this._heatRules=new wt,this._heatRules.events.on("inserted",function(i){var r=i.newValue,s=r.target;if(s){var o=r.dataField;C(o)||(o="value");var n=t.dataItem,l=r.property,h=Wt(r.minValue),u=Wt(r.maxValue);!P(h)&&!P(u)&&t.dataItem.events.on("calculatedvaluechanged",function(p){p.property==o&&E(t.dataItems.iterator(),function(d){var c=!1;W(d.sprites,function(f){if(f.clonedFrom==s){var g=f;g[l]=g[l],c=!0}}),c||W(d.sprites,function(f){f instanceof Q&&E(f.children.iterator(),function(g){if(g.className==s.className){var m=g;m[l]=m[l]}else g instanceof Q&&g.deepInvalidate()})})})}),t.dataItems.template.events.on("workingvaluechanged",function(p){if(p.property==o){var d=p.target,c=!1;W(d.sprites,function(f){if(f.clonedFrom==s){var g=f;g[l]=g[l],c=!0}}),c||W(d.sprites,function(f){f instanceof Q&&E(f.children.iterator(),function(g){if(g.className==s.className){var m=g;m[l]=m[l]}else g instanceof Q&&g.deepInvalidate()})})}}),s.adapter.add(l,function(p,d,c){var f=Wt(r.minValue),g=Wt(r.maxValue),m=r.min,y=r.max;if(d instanceof rt){var v=d,x=v.propertyFields[c];if(x&&d.dataItem){var _=d.dataItem.dataContext;if(_&&C(_[x]))return p}}var $=d.dataItem;if(P(f)||(f=n.values[o].low),P(g)||(g=n.values[o].high),$){var T=$.values[o];if(T){var S=$.getActualWorkingValue(o);if(C(m)&&C(y)&&P(f)&&P(g)&&P(S)){var k=void 0;if(r.logarithmic?k=(Math.log(S)*Math.LOG10E-Math.log(f)*Math.LOG10E)/(Math.log(g)*Math.LOG10E-Math.log(f)*Math.LOG10E):k=(S-f)/(g-f),P(S)&&(!P(k)||Math.abs(k)==1/0)&&(k=.5),P(m))return m+(y-m)*k;if(m instanceof Dt)return new Dt(Bo(m.rgb,y.rgb,k))}}}return p})}})),this._heatRules},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){var i;if(t){if(C(t.bullets)&&oe(t.bullets))for(var r=0,s=t.bullets.length;r<s;r++){var o=t.bullets[r];C(o.type)||(o.type="Bullet")}C(t.heatRules)&&oe(t.heatRules)&&(i=t.heatRules,delete t.heatRules)}if(a.prototype.processConfig.call(this,t),i){for(var r=0,s=i.length;r<s;r++){var n=i[r],l=this;if(C(n.target)&&vt(n.target))if(this.map.hasKey(n.target))l=this.map.getKey(n.target);else for(var h=n.target.split("."),u=0;u<h.length;u++)if(l instanceof wt){var p=l.getIndex(Wt(h[u]));p?l=p:l=l[h[u]]}else{var d=h[u].match(/^(.*)\[([0-9]+)\]/);d?l[d[1]]instanceof wt?l=l[d[1]].getIndex(Wt(d[2])):l=l[d[1]][Wt(d[2])]:l=l[h[u]]}n.target=l,C(n.min)&&(n.min=this.maybeColorOrPercent(n.min)),C(n.max)&&(n.max=this.maybeColorOrPercent(n.max))}a.prototype.processConfig.call(this,{heatRules:i})}},e.prototype.configOrder=function(t,i){return t==i?0:t=="heatRules"?1:i=="heatRules"?-1:a.prototype.configOrder.call(this,t,i)},e.prototype.setVisibility=function(t){a.prototype.setVisibility.call(this,t),this.bulletsContainer.visible=t},e})(Cr);w.registeredClasses.Series=Ja;w.registeredClasses.SeriesDataItem=rn;var zs=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._list=[],t._currentStep=0,t._startIndex=0,t._currentPass=0,t.baseColor=new Dt({r:103,g:183,b:220}),t.stepOptions={},t.passOptions={brighten:-.2},t.step=1,t.minColors=20,t.minLightness=.2,t.maxLightness=.9,t.shuffle=!1,t.wrap=!0,t.reuse=!1,t.saturation=1,t.className="ColorSet",t.applyTheme(),t}return Object.defineProperty(e.prototype,"list",{get:function(){return this._list||this.generate(this.minColors),this._list},set:function(t){this._list=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.getReusableColor=function(t){if(this._list.length==0)return this.generate(1),this.list[0];var i=t-Math.floor(t/this._list.length)*this.list.length;return this.list[i]},e.prototype.next=function(){var t;return this.list.length<=this._currentStep?this.reuse?t=this.getReusableColor(this._currentStep):(this.generate(mt(this.minColors,this._currentStep+1)),t=this.list[this._currentStep]):t=this.list[this._currentStep],this._currentStep+=this.step,t.saturate(this.saturation)},e.prototype.getIndex=function(t){var i;return this.list.length<=t?this.reuse?i=this.getReusableColor(t):(this.generate(this.minColors),i=this.getIndex(t)):i=this.list[t],i.saturate(this.saturation)},e.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(e.prototype,"currentStep",{get:function(){return this._currentStep},set:function(t){this._currentStep=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startIndex",{get:function(){return this._startIndex},set:function(t){this._startIndex=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.generate=function(t){var i=this.currentColor,r=ch(ee(i.rgb)),s=C(this.stepOptions.hue)?this.stepOptions.hue:1/t,o={brighten:0,lighten:0,hue:r.h,lightness:r.l,saturation:r.s},n=[],l=this.list.length==0?0:1;if(this.reuse)for(var h=l;h<=t;h++)n.push(ch(ee(this._list[h].rgb)).h);else for(var h=l;h<=t;h++){var u=r.h+s*h;this.wrap&&u>1&&(u-=1),n.push(u)}this.shuffle&&n.sort(function(f,g){return Math.random()-.5});for(var h=0;h<t;h++){this.reuse?r=ch(ee(this._list[h].rgb)):r.h=n.shift(),this.applyStepOptions(r,o,h,this._currentPass);var p=nt(gf(r)),d=(this.stepOptions.brighten||0)*h+(this.passOptions.brighten||0)*this._currentPass;d!=0&&(this.wrap?d=wh(d,this.minLightness,this.maxLightness):d=$h(d,this.minLightness,this.maxLightness),p=p.brighten(d));var c=(this.stepOptions.lighten||0)*h+(this.passOptions.lighten||0)*this._currentPass;c!=0&&(this.wrap?c=wh(c,this.minLightness,this.maxLightness):c=$h(c,this.minLightness,this.maxLightness),p=p.lighten(c)),this._list.push(p)}this._currentPass++},Object.defineProperty(e.prototype,"currentColor",{get:function(){return this._list.length==0?this.baseColor.saturate(this.saturation):this._list[this._list.length-1].saturate(this.saturation)},enumerable:!0,configurable:!0}),e.prototype.applyStepOptions=function(t,i,r,s){t.l=i.lightness+(this.stepOptions.lightness||0)*r+(this.passOptions.lightness||0)*s,this.wrap?(t.l>1?t.l=t.l-Math.floor(t.l):t.l<0&&(t.l=-(t.l-Math.floor(t.l))),t.l=wh(t.l,this.minLightness,this.maxLightness)):(t.l>1?t.l=1:t.l<0&&(t.l=0),t.l=$h(t.l,this.minLightness,this.maxLightness))},e.prototype.processConfig=function(t){if(t){if(C(t.list)&&oe(t.list))for(var i=0,r=t.list.length;i<r;i++)t.list[i]instanceof Dt||(t.list[i]=nt(t.list[i]));C(t.baseColor)&&!(t.baseColor instanceof Dt)&&(t.baseColor=nt(t.baseColor))}a.prototype.processConfig.call(this,t)},e})(we);w.registeredClasses.ColorSet=zs;var Wh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SerialChartDataItem",t.applyTheme(),t}return e})(Hh);var xl=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._exitDP={},t.className="SerialChart",t.colors=new zs,t._usesData=!1;var i=t.chartContainer.createChild(Q);i.shouldClone=!1,i.width=N(100),i.height=N(100),i.isMeasured=!1,i.layout="none",i.zIndex=2,t.seriesContainer=i;var r=t.chartContainer.createChild(Q);return r.shouldClone=!1,r.width=N(100),r.height=N(100),r.isMeasured=!1,r.zIndex=3,r.layout="none",t.bulletsContainer=r,t.applyTheme(),t}return e.prototype.dispose=function(){a.prototype.dispose.call(this),this.colors&&this.colors.dispose(),this.patterns&&this.patterns.dispose()},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Serial chart"))},Object.defineProperty(e.prototype,"series",{get:function(){return this._series||(this._series=new zt(this.createSeries()),this._series.events.on("inserted",this.handleSeriesAdded,this,!1),this._series.events.on("removed",this.handleSeriesRemoved,this,!1),this._disposers.push(new Ft(this._series,!1)),this._disposers.push(this._series.template)),this._series},enumerable:!0,configurable:!0}),e.prototype.handleSeriesRemoved=function(t){var i=t.oldValue;this.dataUsers.removeValue(i),this.dataUsers.each(function(h){h.invalidateDataItems()}),this._exitDP[i.uid]&&(this._exitDP[i.uid].dispose(),delete this._exitDP[i.uid]),i.autoDispose?i.dispose():(i.parent=void 0,i.bulletsContainer.parent=void 0);var r=this.legend;if(r){for(var s=this.legend.dataItems,o=s.length-1;o>=0;o--){var n=s.getIndex(o);n&&n.dataContext==i&&r.dataItems.remove(n)}for(var o=r.data.length-1;o>=0;o--){var l=r.data[o];l&&l==i&&ft(r.data,l)}}},e.prototype.handleSeriesAdded=function(t){var i=this,r=t.newValue;r.isDisposed()||(r.chart=this,r.parent=this.seriesContainer,r.bulletsContainer.parent=this.bulletsContainer,this._dataUsers.moveValue(r),r.addDisposer(new Lt(function(){i.dataUsers.removeValue(r)})),this.handleSeriesAdded2(r),this.handleLegendSeriesAdded(r))},e.prototype.handleLegendSeriesAdded=function(t){t.hiddenInLegend||this.legend&&this.legend.addData(t)},e.prototype.handleSeriesAdded2=function(t){var i=this;this.dataInvalid||(this._exitDP[t.uid]=w.events.once("exitframe",function(){(!t.data||t.data.length==0)&&(t.data=i.data,t.showOnInit&&(t.reinit(),t.setPropertyValue("showOnInit",!1),t.showOnInit=!0),t.isDisposed()||t.events.once("datavalidated",function(){t.data==i.data&&(t._data=[])}))}),this._disposers.push(this._exitDP[t.uid]))},e.prototype.feedLegend=function(){var t=this.legend;if(t){var i=[];E(this.series.iterator(),function(r){r.hiddenInLegend||i.push(r)}),t.dataFields.name="name",t.data=i}},e.prototype.createSeries=function(){return new Ja},Object.defineProperty(e.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(t){this.setPropertyValue("colors",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(t){this.setPropertyValue("patterns",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.series.copyFrom(t.series)},e.prototype.appear=function(){a.prototype.appear.call(this),this.series.each(function(t){t.showOnInit&&t.inited&&t.appear()})},e})(Ys);w.registeredClasses.SerialChart=xl;var _l=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisLabel",t.isMeasured=!1,t.padding(10,10,10,10),t.location=.5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(t){this.setPropertyValue("inside",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.axis&&this.axis.invalidateDataItems(),i},e})(Me);w.registeredClasses.AxisLabel=_l;var Ei=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Line",t.element=t.paper.add("line"),t.fill=nt(),t.x1=0,t.y1=0,t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this),this.x1==this.x2||this.y1==this.y2?this.pixelPerfect=!0:this.pixelPerfect=!1,this.x1=this.x1,this.x2=this.x2,this.y1=this.y1,this.y2=this.y2},Object.defineProperty(e.prototype,"x1",{get:function(){return this.getPropertyValue("x1")},set:function(t){P(t)||(t=0);var i=0;this.pixelPerfect&&this.stroke instanceof mi&&(i=1e-5),this.setPropertyValue("x1",t,!0),this.element.attr({x1:t+i})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){var t=this.getPropertyValue("x2");return P(t)||(t=this.pixelWidth),t},set:function(t){P(t)||(t=0),this.setPropertyValue("x2",t,!0),this.element.attr({x2:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this.getPropertyValue("y1")},set:function(t){P(t)||(t=0);var i=0;this.pixelPerfect&&this.stroke instanceof mi&&(i=1e-5),this.setPropertyValue("y1",t,!0),this.element.attr({y1:t+i})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){var t=this.getPropertyValue("y2");return P(t)||(t=this.pixelHeight),t},set:function(t){P(t)||(t=0),this.setPropertyValue("y2",t,!0),this.element.attr({y2:t})},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t){var i={x:this.x1,y:this.y1},r={x:this.x2,y:this.y2},s=No(i,r,t),o=Ae(i,r);return{x:s.x,y:s.y,angle:o}},e})(rt);w.registeredClasses.Line=Ei;var jr=(function(){function a(e,t){this._tensionX=e,this._tensionY=t}return a.prototype.smooth=function(e){for(var t=e.length-1;t>0;t--){var i=e[t],r=e[t-1];Math.abs(i.x-r.x)<.1&&Math.abs(i.y-r.y)<.1&&e.splice(t-1,1)}var s=this._tensionX,o=this._tensionY;if(e.length<3||s>=1&&o>=1)return en(e);var n=e[0],l=e[e.length-1],h=!1;H(n.x,3)==H(l.x)&&H(n.y)==H(l.y)&&(h=!0);for(var u="",t=0,p=e.length-1;t<p;t++){var i=e[t-1],r=e[t],d=e[t+1],c=e[t+2];t===0?h?i=e[e.length-2]:i=e[t]:t==e.length-2&&(h?c=e[1]:c=e[t+1]);var f=dp(i,r,d,c,s,o),g=cp(i,r,d,c,s,o);u+=ya(d,f,g)}return u},a})();function sn(a,e,t,i,r,s){var o=a.x,n=a.y,l=e.x,h=e.y,u=Mt(a,e);s&&(t=u/Math.round(u/t));var p=w.getCache(Cp(["wavedLine",a.x,e.x,a.y,e.y,t,i]));if(!p){if(u>0){var d=Math.atan2(h-n,l-o),c=Math.cos(d),f=Math.sin(d),g=t*c,m=t*f;if(t<=1||i<=1)p=V(e);else{var y=Math.round(2*u/t),v=[],x=1;l<o&&(x*=-1),h<n&&(x*=-1);for(var _=0;_<=y;_++){x*=-1;var $=o+_*g/2+x*i/2*f,T=n+_*m/2-x*i/2*c;v.push({x:$,y:T})}p=new jr(r,r).smooth(v)}}else p="";w.setCache(Cp(["wavedLine",a.x,e.x,a.y,e.y,t,i]),p)}return p}var Mb=(function(){function a(e,t){this._reversed=e,this._closed=t.closed}return a.prototype._curve=function(e,t,i,r,s,o){var n=(t-e)/3;return this._reversed?ya({x:r,y:t},{x:i+n*s,y:e+n},{x:r-n*o,y:t-n}):ya({x:t,y:r},{x:e+n,y:i+n*s},{x:t-n,y:r-n*o})},a.prototype.smooth=function(e){var t=this,i=NaN,r=NaN,s=NaN,o=NaN,n=NaN,l=0,h="";switch(W(e,function(u){var p=u.x,d=u.y;if(t._reversed){var c=p;p=d,d=c}var f=NaN;if(!(p===r&&d===o)){switch(l){case 0:l=1,t._reversed?h+=V({x:d,y:p}):h+=V({x:p,y:d});break;case 1:l=2;break;case 2:l=3,h+=t._curve(i,r,s,o,Lb(i,r,s,o,f=Fb(i,r,s,o,p,d)),f);break;default:h+=t._curve(i,r,s,o,n,f=Fb(i,r,s,o,p,d));break}i=r,r=p,s=o,o=d,n=f}}),l){case 2:this._reversed?h+=V({x:o,y:r}):h+=V({x:r,y:o});break;case 3:h+=this._curve(i,r,s,o,n,Lb(i,r,s,o,n));break}return this._closed&&(h+=pe()),h},a})();function Ob(a){return a<0?-1:1}function Lb(a,e,t,i,r){var s=e-a;return s?(3*(i-t)/s-r)/2:r}function Fb(a,e,t,i,r,s){var o=e-a,n=r-e,l=(i-t)/(o||n<0&&-0),h=(s-i)/(n||o<0&&-0),u=(l*n+h*o)/(o+n);return(Ob(l)+Ob(h))*Math.min(Math.abs(l),Math.abs(h),.5*Math.abs(u))||0}var $m=(function(a){D(e,a);function e(t){return a.call(this,!1,t)||this}return e})(Mb);var wm=(function(a){D(e,a);function e(t){return a.call(this,!0,t)||this}return e})(Mb);var QP=(function(){function a(e){this._closed=e.closed}return a.prototype.smooth=function(e){var t=this,i=NaN,r=NaN,s=NaN,o=NaN,n=NaN,l=NaN,h=NaN,u=NaN,p=NaN,d=NaN,c=0,f="",g=function(y,v){f+=ya({x:(i+4*r+y)/6,y:(l+4*h+v)/6},{x:(2*i+r)/3,y:(2*l+h)/3},{x:(i+2*r)/3,y:(l+2*h)/3})},m=function(y){var v=y.x,x=y.y;switch(c){case 0:c=1,t._closed?(s=v,u=x):f+=V({x:v,y:x});break;case 1:c=2,t._closed&&(o=v,p=x);break;case 2:if(c=3,t._closed){n=v,d=x,f+=z({x:(i+4*r+v)/6,y:(l+4*h+x)/6});break}else f+=V({x:(5*i+r)/6,y:(5*l+h)/6});default:g(v,x);break}i=r,r=v,l=h,h=x};if(W(e,m),this._closed)switch(c){case 1:f+=z({x:s,y:u}),f+=pe();break;case 2:f+=z({x:(s+2*o)/3,y:(u+2*p)/3}),f+=V({x:(o+2*s)/3,y:(p+2*u)/3}),f+=pe();break;case 3:m({x:s,y:u}),m({x:o,y:p}),m({x:n,y:d});break}else{switch(c){case 3:g(r,h);case 2:f+=V({x:r,y:h});break}f+=pe()}return f},a})();var $s=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="WavedLine",t.element=t.paper.add("path"),t.waveLength=16,t.waveHeight=4,t.tension=.8,t.pixelPerfect=!1,t.fill=nt(),t.applyTheme(),t}return e.prototype.draw=function(){var t={x:this.x1,y:this.y1},i={x:this.x2,y:this.y2};this.path=z(t)+sn(t,i,this.waveLength,this.waveHeight,this.tension,!0)},Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),e})(Ei);var Qa=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._axis=new ce,t.dataItems=new wt,t.className="AxisBreak",t.breakSize=.01,t.marginLeft=-5,t.marginRight=-5,t.marginTop=-5,t.marginBottom=-5;var i=new ct,r=new $s;r.fill=i.getFor("background"),r.stroke=nt(),r.fillOpacity=.9,r.zIndex=0,t._fillShape=r;var s=new $s;s.fill=nt(),s.stroke=i.getFor("grid"),s.strokeOpacity=.3,s.zIndex=1,t._startLine=s;var o=new $s;return o.fill=nt(),o.stroke=nt("#000000"),o.strokeOpacity=.3,o.zIndex=2,t._endLine=o,t._disposers.push(t._axis),t.applyTheme(),t}return e.prototype.dispose=function(){a.prototype.dispose.call(this),this._fillShape&&this._fillShape.dispose(),this._startLine&&this._startLine.dispose(),this._endLine&&this._endLine.dispose()},Object.defineProperty(e.prototype,"startLine",{get:function(){return this._startLine},set:function(t){this._startLine&&this._startLine.dispose(),this._startLine=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLine",{get:function(){return this._endLine},set:function(t){this._endLine&&this._endLine.dispose(),this._endLine=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillShape",{get:function(){return this._fillShape},set:function(t){this._fillShape&&this._fillShape.dispose(),this._fillShape=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),e.prototype.addBreakSprite=function(t){t.parent=this,t.isMeasured=!1,this._disposers.push(t)},Object.defineProperty(e.prototype,"axis",{get:function(){return this._axis.get()},set:function(t){if(this._axis.get()!==t){this._axis.set(t,t.renderer.gridContainer.events.on("transformed",this.invalidate,this,!1)),t.renderer.createBreakSprites(this);var i=t.axisBreaks.template;this.startLine.copyFrom(i.startLine),this.endLine.copyFrom(i.endLine),this.fillShape.copyFrom(i.fillShape)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"breakSize",{get:function(){return this.getPropertyValue("breakSize")},set:function(t){this.setPropertyValue("breakSize",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){var t=this.axis.renderer;if(t)return t.positionToPoint(this.startPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){var t=this.axis.renderer;if(t)return t.positionToPoint(this.endPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startPosition",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.draw=function(){if(a.prototype.draw.call(this),this.axis){var t=this.axis.renderer;t.updateBreakElement(this)}},Object.defineProperty(e.prototype,"startValue",{get:function(){return this.getPropertyValue("startValue")},set:function(t){this.setPropertyValue("startValue",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){return this.getPropertyValue("endValue")},set:function(t){this.setPropertyValue("endValue",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.AxisBreak=Qa;var va=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisDataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"grid",{get:function(){if(!this._grid){var t=this.component;if(t){var i=void 0,r;if(this.isRange){if(i=t.axisRanges.template.grid,i.disabled)return;r=i.clone()}else{if(i=t.renderer.grid.template,i.disabled)return;r=t.renderer.grid.create(),this._disposers.push(new Lt(function(){t.renderer.grid.removeValue(r)}))}this.grid=r,r.shouldClone=!1,this._disposers.push(r),r.axis=this.component}}return this._grid},set:function(t){this._grid&&this._grid!=t&&(ft(this.sprites,this._grid),this._grid.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(ft(t.dataItem.sprites,t),t.dataItem.grid=void 0),this.addSprite(t)),this._grid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tick",{get:function(){if(!this._tick){var t=this.component;if(t){var i=void 0,r;if(this.isRange){if(i=t.axisRanges.template.tick,i.disabled)return;r=i.clone()}else{if(i=t.renderer.ticks.template,i.disabled)return;r=t.renderer.ticks.create(),this._disposers.push(new Lt(function(){t.renderer.ticks.removeValue(r)}))}this.tick=r,r.axis=this.component,r.shouldClone=!1,this._disposers.push(r)}}return this._tick},set:function(t){this._tick&&this._tick!=t&&(ft(this.sprites,this._tick),this._tick.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(ft(t.dataItem.sprites,t),t.dataItem.tick=void 0),this.addSprite(t)),this._tick=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){if(!this._label){var t=this.component;if(t){var i=void 0,r;if(this.isRange){if(i=t.axisRanges.template.label,i.disabled)return;r=i.clone()}else{if(i=t.renderer.labels.template,i.disabled)return;r=t.renderer.labels.create(),this._disposers.push(new Lt(function(){t.renderer.labels.removeValue(r)}))}this._disposers.push(r),this.label=r,r.shouldClone=!1,r.axis=this.component,r.virtualParent=t}}return this._label},set:function(t){this._label&&this._label!=t&&(ft(this.sprites,this._label),this._label.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(ft(t.dataItem.sprites,t),t.dataItem.label=void 0),this.addSprite(t)),this._label=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisFill",{get:function(){if(!this._axisFill){var t=this.component;if(t){var i=void 0,r;if(this.isRange){if(i=t.axisRanges.template.axisFill,!this.isTemplate&&i.disabled)return;r=i.clone()}else{if(i=t.renderer.axisFills.template,i.disabled)return;r=t.renderer.axisFills.create(),this._disposers.push(new Lt(function(){t.renderer.axisFills.removeValue(r)}))}this.axisFill=r,r.shouldClone=!1,this._disposers.push(r)}}return this._axisFill},set:function(t){this._axisFill&&this._axisFill!=t&&(ft(this.sprites,this._axisFill),this._axisFill.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(ft(t.dataItem.sprites,t),t.dataItem.axisFill=void 0),t.axis=this.component,this.addSprite(t)),this._axisFill=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text=t,this._label&&(this._label.text=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contents",{get:function(){if(!this._contents){var t=new Q;this.addSprite(t),t.isMeasured=!1,this._contents=t;var i=this.component;if(i){var r=i.renderer.createFill(this.component);r.disabled=!1,r.axis=i,this.addSprite(r),this._mask=r,t.mask=r}}return this._contents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisBreak",{get:function(){return this._axisBreak},set:function(t){this._axisBreak&&this._axisBreak.dataItems.removeValue(this),t&&t.dataItems.push(this),this._axisBreak=t},enumerable:!0,configurable:!0}),e.prototype.validate=function(){this.component&&this.component.validateDataElement(this)},e.prototype.appendChildren=function(){this.component&&this.component.appendDataItem(this)},e.prototype.hasProperty=function(t){return t=="component"?!0:a.prototype.hasProperty.call(this,t)},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.text=t.text,t.bullet&&(this.bullet=t.bullet.clone()),this.minPosition=t.minPosition,this.maxPosition=t.maxPosition},e.prototype.setVisibility=function(t,i){a.prototype.setVisibility.call(this,t,i),this._contents&&(this._contents.visible=t)},Object.defineProperty(e.prototype,"bullet",{get:function(){return this._bullet},set:function(t){this._bullet&&this._bullet!=t&&(ft(this.sprites,this._bullet),this._bullet.dataItem=void 0),this._bullet=t,t&&this.addSprite(t)},enumerable:!0,configurable:!0}),e})(wr);var Rb;(function(a){a[a.Start=0]="Start",a[a.Middle=.5]="Middle",a[a.End=1]="End"})(Rb||(Rb={}));var an=(function(a){D(e,a);function e(){var t=a.call(this)||this;if(t._gridCount=10,t._series=new wt,t.autoDispose=!0,t._axisItemCount=0,t.constructor===e)throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");t.hideTooltipWhileZooming=!0,t.minWidth=1e-4,t.minHeight=1e-4,t.className="Axis",t.shouldClone=!1,t.setPropertyValue("cursorTooltipEnabled",!0),t.toggleZoomOutButton=!0,t.zoomable=!0;var i=new ct;t.title=new Me,t.title.shouldClone=!1,t._disposers.push(t.title),t.setPropertyValue("startLocation",0),t.setPropertyValue("endLocation",1),t._dataItemsIterator=new Yo(t.dataItems,function(){return t.dataItems.create()}),t._dataItemsIterator.createNewItems=!0;var r=new qa;t._disposers.push(r),r.label.padding(5,10,5,10),r.background.pointerLength=5,r.fitPointerToBounds=!0,r.background.filters.clear(),r.virtualParent=t;var s=r.background;return s.cornerRadius=0,s.fill=i.getFor("alternativeBackground"),s.stroke=s.fill,s.strokeWidth=1,s.fillOpacity=1,r.label.fill=i.getFor("alternativeText"),t.tooltip=r,t.readerHidden=!0,t.events.on("rangechangestarted",function(){t.series.each(function(o){o.hideTooltipWhileZooming&&(o.tooltip.hide(),o.tooltip.preventShow=!0)}),t.hideTooltipWhileZooming&&(t.tooltip.hide(),t.tooltip.preventShow=!0)},void 0,!1),t.events.on("rangechangeended",function(){t.series.each(function(o){o.hideTooltipWhileZooming&&(o.tooltip.hide(),o.tooltip.preventShow=!1)}),t.hideTooltipWhileZooming&&(t.tooltip.hide(),t.tooltip.preventShow=!1)},void 0,!1),t.applyTheme(),t}return e.prototype.fillRule=function(t,i){P(i)||(i=t.index),i/2==Math.round(i/2)?(t.axisFill.__disabled=!0,t.axisFill.opacity=0):(t.axisFill.opacity=1,t.axisFill.__disabled=!1)},e.prototype.createDataItem=function(){return new va},e.prototype.invalidateLayout=function(){a.prototype.invalidateLayout.call(this),E(this.series.iterator(),function(t){t.invalidateLayout()})},e.prototype.invalidateSeries=function(){E(this.series.iterator(),function(t){t.invalidate()})},e.prototype.validateDataElements=function(){this._axisItemCount=0,this.ghostLabel&&(this.renderer.updateLabelElement(this.ghostLabel,this.start,this.end),this.ghostLabel.validate())},e.prototype.updateGridCount=function(){if(this.renderer){var t=this.axisLength/this.renderer.minGridDistance;t!=this._gridCount&&(this._gridCount=t,this.clearCache())}},e.prototype.validateLayout=function(){this.axisFullLength=this.axisLength/(this.end-this.start),a.prototype.validateLayout.call(this),this.updateGridCount();var t=this.renderer;t&&(t.updateAxisLine(),t.updateTooltip(),t.updateBaseGridElement()),this._prevLength!=this.axisLength&&(this.dispatchImmediately("lengthchanged"),this._prevLength=this.axisLength)},e.prototype.initRenderer=function(){},e.prototype.appendDataItem=function(t){var i=this.renderer,r=t.tick;r&&(r.above?r.parent=i.bulletsContainer:r.parent=i.gridContainer),t.label&&(t.label.parent=i);var s=t.axisFill;s&&(s.above?s.parent=i.bulletsContainer:s.parent=i.gridContainer);var o=t.grid;o&&(o.above?o.parent=i.bulletsContainer:o.parent=i.gridContainer),t.bullet&&(t.bullet.parent=i.bulletsContainer)},e.prototype.validate=function(){a.prototype.validate.call(this),this.validateLayout(),this.renderer.updateGridContainer()},e.prototype.validateAxisRanges=function(){var t=this;E(this.axisRanges.iterator(),function(i){t.appendDataItem(i),t.validateDataElement(i),i.grid&&i.grid.validate(),i.tick&&i.tick.validate(),i.axisFill&&i.axisFill.validate(),i.label&&i.label.validate()})},e.prototype.validateBreaks=function(){this._axisBreaks&&E(this._axisBreaks.iterator(),function(t){t.invalidate()})},e.prototype.processBreak=function(t){var i=t.newValue;i.parent=this.renderer.breakContainer,i.axis=this},e.prototype.registerSeries=function(t){var i=this;return this.series.moveValue(t),new Bt([new Lt(function(){i.series.removeValue(t)}),this.events.on("lengthchanged",t.invalidate,t,!1),this.events.on("lengthchanged",t.createMask,t,!1),this.events.on("startchanged",t.invalidate,t,!1),this.events.on("endchanged",t.invalidate,t,!1)])},Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},set:function(t){if(t!=this._renderer){this._renderer=t,t.chart=this.chart,t.axis=this,t.parent=this,this.title.parent=this,this.initRenderer(),this._disposers.push(t.gridContainer.events.on("maxsizechanged",this.invalidate,this,!1));var i=this.renderer.labels.create();this._disposers.push(i),i.dataItem=this.dataItems.template.clone(),i.text="L",i.parent=this.renderer,i.shouldClone=!1,i.fillOpacity=0,i.opacity=0,i.strokeOpacity=0,i.interactionsEnabled=!1,i.validate(),this.ghostLabel=i,this.events.on("beforedatavalidated",function(){i.text="L"},void 0,!1)}},enumerable:!0,configurable:!0}),e.prototype.positionToAngle=function(t){return this.renderer.positionToAngle(t)},e.prototype.pointToPosition=function(t){return this.renderer.pointToPosition(t)},e.prototype.positionToCoordinate=function(t){return this.renderer.positionToCoordinate(t)},e.prototype.getAnyRangePath=function(t,i){return this.renderer.getPositionRangePath(t,i)},e.prototype.anyToPosition=function(t){return 0},e.prototype.anyToPoint=function(t){return{x:0,y:0,angle:0}},e.prototype.getPositionRangePath=function(t,i){return this.renderer?this.renderer.getPositionRangePath(t,i):""},Object.defineProperty(e.prototype,"axisLength",{get:function(){return this.renderer?this.renderer.axisLength:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(t){this.setPropertyValue("cursorTooltipEnabled",t)&&(t&&this.renderer?this.renderer.updateTooltip():this.tooltip&&this.tooltip.hide(0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toggleZoomOutButton",{get:function(){return this.getPropertyValue("toggleZoomOutButton")},set:function(t){this.setPropertyValue("toggleZoomOutButton",t)},enumerable:!0,configurable:!0}),e.prototype.hideTooltip=function(t){a.prototype.hideTooltip.call(this,t),this._tooltipPosition=void 0},e.prototype.showTooltipAtPosition=function(t,i){var r=this._tooltip;if(!r||this.dataItems.length<=0)this._tooltipPosition=void 0;else{if(i||(t=this.toAxisPosition(t)),!P(t)||t<this.start||t>this.end){r.hide(0),this._tooltipPosition=void 0;return}var s=this.renderer;r.parent||(r.parent=this.tooltipContainer);var o=s.tooltipLocation,n=this.getCellStartPosition(t),l=this.getCellEndPosition(t);if(this.tooltipPosition=="fixed"&&(t=n+(l-n)*o),t=J(t,this.start,this.end),this._tooltipPosition!=t){this._tooltipPosition=t;var h=s.tooltipLocation2,u=s.positionToPoint(n,h),p=s.positionToPoint(l,h);this.currentItemStartPoint=u,this.currentItemEndPoint=p,s.fullWidthTooltip&&(r.width=p.x-u.x,r.height=p.y-u.y);var d=s.positionToPoint(t,h),c=Xi(d,this.renderer.line);r.text=this.getTooltipText(t),r.text&&(r.delayedPointTo(c),r.show())}(!this.cursorTooltipEnabled||this.tooltip.disabled)&&r.hide(0)}},e.prototype.toAxisPosition=function(t){if(t=this.renderer.toAxisPosition(t),t!=null)return t=t*(this.end-this.start),this.renderer.inversed?t=this.end-t:t=this.start+t,t},e.prototype.toGlobalPosition=function(t){return this.renderer.inversed?t=this.end-t:t=t-this.start,t/(this.end-this.start)},e.prototype.getTooltipText=function(t){},e.prototype.updateTooltip=function(t,i){var r=this._tooltip;r&&(r.fixDoc=!1,r.pointerOrientation=t,r.setBounds(qo(i,this.renderer.line)))},e.prototype.roundPosition=function(t,i,r){return t},e.prototype.getCellStartPosition=function(t){return t},e.prototype.getCellEndPosition=function(t){return t},Object.defineProperty(e.prototype,"axisRanges",{get:function(){if(!this._axisRanges){var t=this.createDataItem();t.isRange=!0,t.axisFill=this.renderer.axisFills.template.clone(),t.grid=this.renderer.grid.template.clone(),t.tick=this.renderer.ticks.template.clone(),t.label=this.renderer.labels.template.clone(),t.isTemplate=!0,t.component=this,t.axisFill.disabled=!1,t.tick.disabled=!1,t.grid.disabled=!1,t.label.disabled=!1,this._axisRanges=new zt(t),this._axisRanges.events.on("inserted",this.processAxisRange,this,!1),this._disposers.push(new Ft(this._axisRanges)),this._disposers.push(this._axisRanges.template)}return this._axisRanges},enumerable:!0,configurable:!0}),e.prototype.processAxisRange=function(t){var i=t.newValue;i.component=this,i.isRange=!0},Object.defineProperty(e.prototype,"axisBreaks",{get:function(){return this._axisBreaks||(this._axisBreaks=new Oh(this.createAxisBreak(),function(t,i){return cr(t.adjustedStartValue,i.adjustedStartValue)}),this._axisBreaks.events.on("inserted",this.processBreak,this,!1),this._disposers.push(new Ft(this._axisBreaks)),this._disposers.push(this._axisBreaks.template)),this._axisBreaks},enumerable:!0,configurable:!0}),e.prototype.createAxisBreak=function(){return new Qa},Object.defineProperty(e.prototype,"series",{get:function(){return this._series||(this._series=new wt),this._series},enumerable:!0,configurable:!0}),e.prototype.processSeriesDataItems=function(){},e.prototype.processSeriesDataItem=function(t,i){},e.prototype.postProcessSeriesDataItems=function(t){},e.prototype.postProcessSeriesDataItem=function(t){},e.prototype.updateAxisBySeries=function(){},e.prototype.hideUnusedDataItems=function(){var t=this,i=this._dataItemsIterator;i.createNewItems=!1,E(i.iterator(),function(r){t.validateDataElement(r),r.__disabled=!0}),i.clear(),i.createNewItems=!0},e.prototype.getSeriesDataItem=function(t,i,r){},e.prototype.getAngle=function(t,i,r,s,o){},e.prototype.getX=function(t,i,r,s,o){},e.prototype.getPositionX=function(t,i,r,s,o){},e.prototype.getY=function(t,i,r,s,o){},e.prototype.getPositionY=function(t,i,r,s,o){},Object.defineProperty(e.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),e.prototype.dataChangeUpdate=function(){},e.prototype.seriesDataChangeUpdate=function(t){},e.prototype.adjustDifference=function(t,i){var r=i-t;if(P(r))return this._axisBreaks&&ii(this._axisBreaks.iterator(),function(s){var o=s.adjustedStartValue,n=s.adjustedEndValue;if(P(o)&&P(n)){if(o>i)return!1;if(n>=t&&P(o)&&P(n)){var l=s.breakSize,h=Tv({start:o,end:n},{start:t,end:i});h&&(r-=(h.end-h.start)*(1-l))}return!0}}),r},e.prototype.isInBreak=function(t){if(this._axisBreaks)return tb(this._axisBreaks.iterator(),function(i){return t>=i.adjustedStartValue&&t<=i.adjustedEndValue})},e.prototype.fixAxisBreaks=function(){var t=this;if(this._axisBreaks){var i=this._axisBreaks;if(i.length>0){W(Xo(i.iterator()),function(o){var n=Pt(o.startValue,o.endValue),l=mt(o.startValue,o.endValue);o.adjustedStartValue=n,o.adjustedEndValue=l,t._axisBreaks.update(o)});var r=i.first,s=Math.min(r.startValue,r.endValue);E(i.iterator(),function(o){var n=o.adjustedStartValue,l=o.adjustedEndValue;n<s&&(n=s,l<s&&(l=s)),o.adjustedStartValue=n,o.adjustedEndValue=l})}}},Object.defineProperty(e.prototype,"startIndex",{get:function(){return 0},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endIndex",{get:function(){return this.dataItems.length},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.getPositionLabel=function(t){return Math.round(t*100)+"%x"},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart},set:function(t){this._chart=t},enumerable:!0,configurable:!0}),e.prototype.createSeriesRange=function(t){var i=this.axisRanges.create();return i.component=this,i.axisFill=this.renderer.axisFills.template.clone(),i.axisFill.disabled=!1,i.axisFill.fillOpacity=0,i.grid=this.renderer.grid.template.clone(),i.grid.disabled=!0,i.tick=this.renderer.ticks.template.clone(),i.tick.disabled=!0,i.label=this.renderer.labels.template.clone(),i.label.disabled=!0,i.addDisposer(new Lt(function(){t.axisRanges.removeValue(i)})),t.axisRanges.push(i),i},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.renderer?this.renderer.copyFrom(t.renderer):t.renderer&&(this.renderer=t.renderer.clone(),this._disposers.push(this.renderer)),t.title&&(this.title?this.title.copyFrom(t.title):(this.title=t.title.clone(),this.title.parent=this),this._disposers.push(this.title))},e.prototype.resetIterators=function(){this._dataItemsIterator.reset()},e.prototype.processConfig=function(t){if(t&&C(t.axisRanges)&&oe(t.axisRanges))for(var i=0,r=t.axisRanges.length;i<r;i++){var s=t.axisRanges[i];C(s.series)&&vt(s.series)&&this.map.hasKey(s.series)&&(t.axisRanges[i]=this.createSeriesRange(this.map.getKey(s.series)),delete s.series,t.axisRanges[i].config=s)}a.prototype.processConfig.call(this,t)},e.prototype.configOrder=function(t,i){return t==i?0:t=="title"?1:i=="title"||t=="component"?-1:i=="component"?1:a.prototype.configOrder.call(this,t,i)},Object.defineProperty(e.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(t){this.setPropertyValue("startLocation",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(t){this.setPropertyValue("endLocation",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.renderer&&(this.renderer.gridContainer.disabled=t),i},Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(t){this._title&&this._title!=t&&this._title.dispose(),t&&(this._title=t,t.parent=this,t.shouldClone=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideTooltipWhileZooming",{get:function(){return this.getPropertyValue("hideTooltipWhileZooming")},set:function(t){this.setPropertyValue("hideTooltipWhileZooming",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zoomable",{get:function(){return this.getPropertyValue("zoomable")},set:function(t){this.setPropertyValue("zoomable",t)},enumerable:!0,configurable:!0}),e})(Cr);w.registeredClasses.Axis=an;w.registeredClasses.AxisDataItem=va;De.push({relevant:Fe.maybeXS,state:function(a,e){if(a instanceof an&&a.tooltip){var t=a.states.create(e);return t.properties.cursorTooltipEnabled=!1,t}return null}});var zp=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="AxisLine",t.element=t.paper.add("path");var i=new ct;return t.stroke=i.getFor("grid"),t.strokeOpacity=.15,t.pixelPerfect=!0,t.fill=nt(),t.applyTheme(),t.interactionsEnabled=!1,t}return e})(rt);w.registeredClasses.AxisLine=zp;var to=(function(a){D(e,a);function e(t){var i=a.call(this)||this;i.axis=t,i.element=i.paper.add("path"),i.className="AxisFill",i.isMeasured=!1,i.location=0,i.above=!1;var r=new ct;return i.fill=r.getFor("alternativeBackground"),i.fillOpacity=0,i.applyTheme(),i}return e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.axis&&this.axis.invalidateDataItems(),i},e.prototype.draw=function(){a.prototype.draw.call(this),!(this.__disabled||this.disabled)&&this.axis&&P(this.startPosition)&&P(this.endPosition)&&(this.fillPath=this.axis.getPositionRangePath(this.startPosition,this.endPosition),this.path=this.fillPath,this.isMeasured&&this.measure())},Object.defineProperty(e.prototype,"startPosition",{get:function(){return this.getPropertyValue("startPosition")},set:function(t){this.setPropertyValue("startPosition",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){return this.getPropertyValue("endPosition")},set:function(t){this.setPropertyValue("endPosition",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setPath=function(t){return this.setPropertyValue("path",t)?(this.element.attr({d:t}),!0):!1},Object.defineProperty(e.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(t){this.setPropertyValue("above",t,!0)},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.AxisFill=to;var eo=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Grid",t.element=t.paper.add("path"),t.location=.5,t.isMeasured=!1,t.above=!1;var i=new ct;return t.stroke=i.getFor("grid"),t.pixelPerfect=!0,t.strokeOpacity=.15,t.fill=nt(),t.applyTheme(),t}return Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(t){this.setPropertyValue("above",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.axis&&this.axis.invalidateDataItems(),i},e})(rt);w.registeredClasses.Grid=eo;De.push({relevant:Fe.maybeXS,state:function(a,e){if(a instanceof eo){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var Ws=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Tick";var i=new ct;return t.fillOpacity=0,t.length=6,t.strokeOpacity=.2,t.stroke=i.getFor("grid"),t.isMeasured=!1,t.nonScalingStroke=!0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"length",{get:function(){return this.disabled?0:this.getPropertyValue("length")},set:function(t){this.setPropertyValue("length",t,!0)},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Tick=Ws;var Wp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisTick",t.element=t.paper.add("path"),t.location=.5,t.above=!1,t.isMeasured=!1,t.pixelPerfect=!0,t.strokeOpacity=0,t.length=5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(t){this.setPropertyValue("inside",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(t){this.setPropertyValue("above",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.axis&&this.axis.invalidateDataItems(),i},e})(Ws);w.registeredClasses.AxisTick=Wp;var io=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._chart=new ce,t.className="AxisRenderer",t.minGridDistance=50,t.inside=!1,t.inversed=!1,t.tooltipLocation=.5,t.fullWidthTooltip=!1,t.cellStartLocation=0,t.cellEndLocation=1,t.minLabelPosition=0,t.maxLabelPosition=1,t.shouldClone=!1;var i=t.createChild(Q);i.shouldClone=!1,i.layout="none",i.virtualParent=t,i.width=N(100),i.height=N(100),t.gridContainer=i,i.events.on("maxsizechanged",function(){t.inited&&t.invalidateAxisItems()},t,!1);var r=t.createChild(Q);r.shouldClone=!1,r.isMeasured=!1,r.layout="none",r.width=N(100),r.height=N(100),t.breakContainer=r;var s=t.createChild(Q);s.shouldClone=!1,s.isMeasured=!1,s.layout="none",s.width=N(100),s.height=N(100),t.bulletsContainer=s,t.line=t.createChild(zp),t.line.shouldClone=!1,t.line.strokeOpacity=0;var o=t.createChild(eo);o.shouldClone=!1,t.baseGrid=o;var n=t._disposers;return n.push(o),n.push(t.line),n.push(i),n.push(r),n.push(s),n.push(t._chart),t.ticks.template.disabled=!0,t.axisFills.template.disabled=!0,t.axisFills.template.interactionsEnabled=!1,t.applyTheme(),t}return Object.defineProperty(e.prototype,"axis",{get:function(){return this._axis},set:function(t){this.setAxis(t)},enumerable:!0,configurable:!0}),e.prototype.setAxis=function(t){this._axis=t,this.baseGrid.parent=t,this.line.parent=t,this.gridContainer.bind("opacity",t)},e.prototype.processRenderer=function(){this.events.on("sizechanged",this.updateTooltip,this,!1),this.events.on("positionchanged",this.updateTooltip,this,!1),this.labels.template.inside=this.inside,this.ticks.template.inside=this.inside},e.prototype.updateTooltip=function(){},Object.defineProperty(e.prototype,"axisLength",{get:function(){return 0},enumerable:!0,configurable:!0}),e.prototype.positionItem=function(t,i){t&&t.moveTo(i)},e.prototype.positionToPoint=function(t,i){return{x:0,y:0}},e.prototype.positionToAngle=function(t){return 0},e.prototype.positionToCoordinate=function(t){var i,r=this.axis,s=r.axisFullLength;return r.renderer.inversed?i=(r.end-t)*s:i=(t-r.start)*s,i},e.prototype.updateGridContainer=function(){},e.prototype.getHeight=function(){var t=this.gridContainer;return t.parent?t.parent.pixelHeight:this.gridContainer.pixelHeight||0},e.prototype.getWidth=function(){var t=this.gridContainer;return t.parent?t.parent.pixelWidth:this.gridContainer.pixelWidth||0},e.prototype.coordinateToPosition=function(t,i){var r,s=this.axis,o=s.axisFullLength;return s.renderer.inversed?r=s.end-t/o:r=t/o+s.start,H(r,5)},e.prototype.pointToPosition=function(t){return 0},e.prototype.getPositionRangePath=function(t,i){return""},e.prototype.invalidateAxisItems=function(){var t=this.axis;t&&t.invalidateDataItems()},e.prototype.updateGridElement=function(t,i,r){},e.prototype.updateTickElement=function(t,i,r){},e.prototype.updateBullet=function(t,i,r){},e.prototype.updateLabelElement=function(t,i,r,s){},e.prototype.updateFillElement=function(t,i,r){t.startPosition=i,t.endPosition=r},e.prototype.updateAxisLine=function(){},e.prototype.updateBaseGridElement=function(){},e.prototype.updateBreakElement=function(t){this.positionItem(t.startLine,t.startPoint),this.toggleVisibility(t.startLine,t.startPosition,0,1),this.positionItem(t.endLine,t.endPoint),this.toggleVisibility(t.endLine,t.endPosition,0,1)},Object.defineProperty(e.prototype,"minGridDistance",{get:function(){return this.getPropertyValue("minGridDistance")},set:function(t){this.setPropertyValue("minGridDistance",t)&&this.axis&&this.axis.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){this._chart.set(t,null)},enumerable:!0,configurable:!0}),e.prototype.toggleVisibility=function(t,i,r,s){var o=this.axis,n=t.dataItem;n&&n instanceof va&&(P(n.minPosition)&&(r=n.minPosition),P(n.maxPosition)&&(s=n.maxPosition));var l=o.start+(o.end-o.start)*(r-1e-4),h=o.start+(o.end-o.start)*(s+1e-4);t.disabled||(i<l||i>h?t.__disabled=!0:t.__disabled=!1)},e.prototype.createBreakSprites=function(t){},Object.defineProperty(e.prototype,"axisFills",{get:function(){if(!this._axisFills){var t=this.createFill(this.axis);this._axisFills=new zt(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Ft(this._axisFills)),this._disposers.push(this._axisFills.template)}return this._axisFills},enumerable:!0,configurable:!0}),e.prototype.createFill=function(t){return new to(t)},Object.defineProperty(e.prototype,"grid",{get:function(){if(!this._grid){var t=this.createGrid();this._grid=new zt(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Ft(this._grid)),this._disposers.push(this._grid.template)}return this._grid},enumerable:!0,configurable:!0}),e.prototype.createGrid=function(){return new eo},Object.defineProperty(e.prototype,"ticks",{get:function(){if(!this._ticks){var t=this.createTick();t.applyOnClones=!0,t.isMeasured=!1,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._ticks=new zt(t),this._disposers.push(new Ft(this._ticks)),this._disposers.push(this._ticks.template)}return this._ticks},enumerable:!0,configurable:!0}),e.prototype.createTick=function(){return new Wp},Object.defineProperty(e.prototype,"labels",{get:function(){if(!this._labels){var t=this.createLabel();this._labels=new zt(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Ft(this._labels)),this._disposers.push(this._labels.template)}return this._labels},enumerable:!0,configurable:!0}),e.prototype.createLabel=function(){return new _l},Object.defineProperty(e.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(t){this.setPropertyValue("inside",t)&&this.axis&&this.axis.invalidate(),t?(this.width=0,this.height=0):(this.width=void 0,this.height=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opposite",{get:function(){return this.getPropertyValue("opposite")},set:function(t){this.setPropertyValue("opposite",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullWidthTooltip",{get:function(){return this.getPropertyValue("fullWidthTooltip")},set:function(t){this.setPropertyValue("fullWidthTooltip",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(t){this.setPropertyValue("tooltipLocation",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation2",{get:function(){return this.getPropertyValue("tooltipLocation2")},set:function(t){this.setPropertyValue("tooltipLocation2",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellStartLocation",{get:function(){return this.getPropertyValue("cellStartLocation")},set:function(t){this.setPropertyValue("cellStartLocation",t)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellEndLocation",{get:function(){return this.getPropertyValue("cellEndLocation")},set:function(t){this.setPropertyValue("cellEndLocation",t)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inversed",{get:function(){return this.getPropertyValue("inversed")},set:function(t){this.setPropertyValue("inversed",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minLabelPosition",{get:function(){return this.getPropertyValue("minLabelPosition")},set:function(t){this.setPropertyValue("minLabelPosition",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxLabelPosition",{get:function(){return this.getPropertyValue("maxLabelPosition")},set:function(t){this.setPropertyValue("maxLabelPosition",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.grid.template.copyFrom(t.grid.template),this.ticks.template.copyFrom(t.ticks.template),this.labels.template.copyFrom(t.labels.template),this.axisFills.template.copyFrom(t.axisFills.template),this.line.copyFrom(t.line),this.baseGrid.copyFrom(t.baseGrid)},e.prototype.toAxisPosition=function(t){return t},e.prototype.setVisibility=function(t){a.prototype.setVisibility.call(this,t),this.bulletsContainer.visible=t},e})(Q);w.registeredClasses.AxisRenderer=io;var Gh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="WavedRectangle",t.element=t.paper.add("path"),t.waveLength=16,t.waveHeight=4,t.tension=.8,t.setPropertyValue("wavedLeft",!0),t.setPropertyValue("wavedRight",!0),t.setPropertyValue("wavedTop",!0),t.setPropertyValue("wavedBottom",!0),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.pixelWidth,i=this.pixelHeight;if(t>0&&i>0){var r={x:0,y:0},s={x:t,y:0},o={x:t,y:i},n={x:0,y:i},l=Math.min(t,this.waveLength),h=Math.min(i,this.waveHeight),u=Math.min(i,this.waveLength),p=Math.min(t,this.waveHeight),d="",c="",f="",g="";this.wavedTop&&(d=sn(r,s,l,h,this.tension,!0)),this.wavedRight&&(c=sn(s,o,u,p,this.tension,!0)),this.wavedBottom&&(f=sn(o,n,l,h,this.tension,!0)),this.wavedLeft&&(g=sn(n,r,u,p,this.tension,!0)),this.path=z(r)+d+V(s)+c+V(o)+f+V(n)+g+"z"}},Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.setWavedSides=function(t,i,r,s){this.wavedTop=t,this.wavedRight=i,this.wavedBottom=r,this.wavedLeft=s},Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedRight",{get:function(){return this.getPropertyValue("wavedRight")},set:function(t){this.setPropertyValue("wavedRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedLeft",{get:function(){return this.getPropertyValue("wavedLeft")},set:function(t){this.setPropertyValue("wavedLeft",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedTop",{get:function(){return this.getPropertyValue("wavedTop")},set:function(t){this.setPropertyValue("wavedTop",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedBottom",{get:function(){return this.getPropertyValue("wavedBottom")},set:function(t){this.setPropertyValue("wavedBottom",t,!0)},enumerable:!0,configurable:!0}),e})(Ua);var Gs=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisBullet",t.location=.5,t.isMeasured=!1,t.applyTheme(),t}return Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){var i=a.prototype.setDisabled.call(this,t);return this.axis&&this.axis.invalidateDataItems(),i},e})(Q);w.registeredClasses.AxisBullet=Gs;var Ni=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisRendererY",t.minGridDistance=40,t.opposite=!1,t.height=N(100),t.labels.template.verticalCenter="middle",t.applyTheme(),t}return e.prototype.setAxis=function(t){a.prototype.setAxis.call(this,t),t.layout="horizontal"},e.prototype.updateGridContainer=function(){var t=this.axis;if(t){var i=this.gridContainer;i.y=t.pixelY,i.height=t.axisLength}},e.prototype.toAxisPosition=function(t){var i=this.axis;if(i){var r=1-t,s=i.relativePositionSprite,o=i.pixelY;if(s?o=ni({x:0,y:this.pixelY},this.parent,s).y:s=i.parent,s){var n=o/s.innerHeight,l=i.axisLength/s.innerHeight;return 1-(r-n)/l}}return t},e.prototype.processRenderer=function(){a.prototype.processRenderer.call(this);var t=this.axis;if(t){var i=t.title;i.valign="middle",t.height instanceof _t||(t.height=N(100)),this.opposite?(i.rotation=90,this.line.toBack(),i.toFront()):(i.rotation=-90,i.toBack(),this.line.toFront())}},e.prototype.updateTooltip=function(){var t=this.axis;if(t){var i=2e3,r=0,s=0,o=i,n=this.axisLength;this.opposite?this.inside&&(r=-i,o=i):this.inside||(r=-i,o=i),this.axis.updateTooltip("horizontal",{x:r,y:s,width:o,height:n})}},Object.defineProperty(e.prototype,"axisLength",{get:function(){var t=this.axis;return t.measuredHeight-t.pixelPaddingTop-t.pixelPaddingBottom||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,i){return{x:0,y:this.positionToCoordinate(t)}},e.prototype.pointToPosition=function(t){return this.coordinateToPosition(t.y,t.x)},e.prototype.coordinateToPosition=function(t,i){var r,s=this.axis,o=s.axisFullLength;return s.renderer.inversed?r=1-s.start-t/o:r=t/o+(1-s.end),H(r,5)},e.prototype.getPositionRangePath=function(t,i){var r=J(this.positionToCoordinate(t),0,this.axisLength),s=J(this.positionToCoordinate(i),0,this.axisLength),o=Math.abs(s-r),n=this.getWidth(),l=Math.min(r,s),h=0;return Nr({x:h,y:l,width:n,height:o},!0)},e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);t.path=z({x:0,y:0})+V({x:this.getWidth(),y:0}),this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateTickElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i),o=t.length;try{this.axis.title.measuredWidth}catch{}s.x=ni({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.opposite?o*=t.inside?-1:1:o*=t.inside?1:-1,t.path=z({x:0,y:0})+V({x:o,y:0}),this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateAxisLine=function(){this.line.path=z({x:0,y:0})+V({x:0,y:this.axisLength})},e.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var t=this.axis,i=this.getWidth(),r=this.axisLength,s=t.basePoint.y,o=this.baseGrid;if(s<-.2||s>r+.2)o.hide(0);else{var n=ni({x:0,y:0},this.gridContainer,o.parent).x;o.path=z({x:0,y:0})+V({x:i,y:0}),o.moveTo({x:n,y:s}),o.show(0)}},e.prototype.updateLabelElement=function(t,i,r,s){C(s)||(s=t.location),i=i+(r-i)*s,t.isMeasured=!t.inside;var o=this.positionToPoint(i),n,l=0,h=this.gridContainer.maxWidth;this.opposite?(t.inside?(n="right",t.align=="left"&&(l=-h,n="left"),t.align=="center"&&(l=-h/2,n="middle")):n="left",o.x=0+l):(t.inside?(n="left",t.align=="right"&&(l=h,n="right"),t.align=="center"&&(l=h/2,n="middle")):n="right",o.x=this.measuredWidth+l),t.rotation==0&&(t.horizontalCenter=n),this.positionItem(t,o),this.toggleVisibility(t,i,this.minLabelPosition,this.maxLabelPosition)},e.prototype.updateBreakElement=function(t){a.prototype.updateBreakElement.call(this,t);var i=t.startLine,r=t.endLine,s=t.fillShape,o=t.startPoint,n=t.endPoint,l=t.pixelMarginLeft,h=this.getWidth()-t.pixelMarginLeft-t.pixelMarginRight;o.y=J(o.y,-1,this.axisLength+1),n.y=J(n.y,-1,this.axisLength+1),o.y==n.y&&(o.y<0||o.y>this.axisLength)?t.fillShape.__disabled=!0:t.fillShape.__disabled=!1;var u=Math.abs(h-l);i.x=l,i.height=0,i.width=u,r.x=l,r.height=0,r.width=u,s.width=u,s.height=Math.abs(n.y-o.y),s.x=l,s.y=n.y},e.prototype.createBreakSprites=function(t){t.startLine=new $s,t.endLine=new $s;var i=new Gh;i.setWavedSides(!0,!1,!0,!1),t.fillShape=i},e.prototype.positionToCoordinate=function(t){var i,r=this.axis,s=r.axisFullLength;return r.renderer.inversed?i=(t-r.start)*s:i=(r.end-t)*s,i},e.prototype.updateBullet=function(t,i,r){var s=.5;t instanceof Gs&&(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i);o.x=ni({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.positionItem(t,o),this.toggleVisibility(t,i,0,1)},e})(io);w.registeredClasses.AxisRendererY=Ni;De.push({relevant:Fe.widthS,state:function(a,e){if(a instanceof Ni){var t=a.states.create(e);return t.properties.inside=!0,t.properties.maxLabelPosition=.9,t.properties.minLabelPosition=.1,t}return null}});De.push({relevant:Fe.widthXS,state:function(a,e){if(a instanceof Ni){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var Pl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ValueAxisBreak",t.applyTheme(),t}return Object.defineProperty(e.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedStartValue)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedEndValue)},enumerable:!0,configurable:!0}),e})(Qa);w.registeredClasses.ValueAxisBreak=Pl;var on=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ValueAxisDataItem",t.values.value={},t.values.endValue={},t.applyTheme(),t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){return this.values.endValue.value},set:function(t){this.setValue("endValue",t)},enumerable:!0,configurable:!0}),e})(va);var At=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._stepDecimalPlaces=0,t._prevStepDecimalPlaces=0,t._adjustLabelPrecision=!0,t._baseValue=0,t._adjustedStart=0,t._adjustedEnd=1,t._extremesChanged=!1,t._deltaMinMax=1,t._dsc=!1,t.calculateTotals=!1,t.className="ValueAxis",t.axisFieldName="value",t.setPropertyValue("maxZoomFactor",1e3),t.setPropertyValue("extraMin",0),t.setPropertyValue("extraMax",0),t.setPropertyValue("strictMinMax",!1),t.setPropertyValue("maxPrecision",Number.MAX_VALUE),t.setPropertyValue("adjustLabelPrecision",!0),t.setPropertyValue("extraTooltipPrecision",0),t.keepSelection=!1,t.includeRangesInMinMax=!1,t.applyTheme(),t}return e.prototype.fillRule=function(t){var i=t.value,r=t.component;t.axisFill.disabled||(H(i/r.step/2,5)==Math.round(i/r.step/2)?t.axisFill.__disabled=!0:t.axisFill.__disabled=!1)},e.prototype.createDataItem=function(){return new on},e.prototype.createAxisBreak=function(){return new Pl},e.prototype.dataChangeUpdate=function(){this.clearCache(),this.keepSelection?(this._start!=0&&this.dispatchImmediately("startchanged"),this._end!=1&&this.dispatchImmediately("endchanged"),(this._start!=0||this._end!=1)&&this.dispatchImmediately("startendchanged")):(this._start!=0||this._end!=1)&&(this._start=0,this._end=1,this.dispatchImmediately("startendchanged")),this._maxZoomed=this._maxDefined,this._minZoomed=this._minDefined,this._maxAdjusted=this._maxDefined,this._minAdjusted=this._minDefined},e.prototype.processSeriesDataItems=function(){if(this.calculateTotals){var t=this.series.getIndex(0),i=t.startIndex;if(t.dataItems.length>0){i>0&&i--;var r=t.endIndex;r<t.dataItems.length&&r++;for(var s=function(l){var h={},u={};o.series.each(function(p){if(!p.excludeFromTotal){var d=p.dataItems.getIndex(l);d&&at(d.values,function(c){var f=d.values[c].workingValue;P(f)&&(P(h[c])?h[c]+=Math.abs(f):h[c]=Math.abs(f),P(u[c])?u[c]+=f:u[c]=f)})}}),o.series.each(function(p){if(!p.excludeFromTotal){var d=p.dataItems.getIndex(l);d&&at(d.values,function(c){var f=d.values[c].workingValue;P(f)&&(d.setCalculatedValue(c,h[c],"total"),d.setCalculatedValue(c,100*f/h[c],"totalPercent"),d.setCalculatedValue(c,u[c],"sum"))})}})},o=this,n=i;n<r;++n)s(n)}}},e.prototype.validate=function(){this.axisLength<=0||(a.prototype.validate.call(this),this.getMinMax(),P(this._minAdjusted)||this.dataItems.each(function(t){t.value=null}),this.fixAxisBreaks(),this.calculateZoom(),this.validateAxisElements(),this.validateAxisRanges(),this.validateBreaks(),this.hideUnusedDataItems(),this.renderer.invalidateLayout())},e.prototype.calculateZoom=function(){if(P(this.min)&&P(this.max)){var t=this.positionToValue(this.start),i=this.positionToValue(this.end),r=this.adjustDifference(t,i),s=this.adjustMinMax(t,i,r,this._gridCount,!0),o=jf(s.step);this._stepDecimalPlaces=o,t=H(t,o),i=H(i,o),s=this.adjustMinMax(t,i,r,this._gridCount,!0);var n=s.step;if(this.syncWithAxis){var l=this.getCache(t+"-"+i);P(l)&&(n=l)}else t=s.min,i=s.max;(this._minZoomed!=t||this._maxZoomed!=i||this._step!=n||this._dsc)&&(this._dsc=!1,this._minZoomed=t,this._maxZoomed=i,this._step=n,this.dispatchImmediately("selectionextremeschanged"))}},e.prototype.fixSmallStep=function(t){return 1+t==1?(t*=2,this.fixSmallStep(t)):t},e.prototype.validateAxisElements=function(){var t=this;if(P(this.max)&&P(this.min)){var i=this.minZoomed-this._step*2;if(!this.logarithmic)i=Math.floor(i/this._step)*this._step;else{var r=Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E;r>1?i=Math.pow(10,Math.log(this.min)*Math.LOG10E):(i=Math.floor(this.minZoomed/this._step)*this._step,i==0&&(i=this.minZoomed))}var s=this._maxZoomed+this._step;this.resetIterators();var o=this._dataItemsIterator;if(this._step==0)return;this._step=this.fixSmallStep(this._step);var n=0,l=this._prevStepDecimalPlaces!=this._stepDecimalPlaces;for(this._prevStepDecimalPlaces=this._stepDecimalPlaces;i<=s;){var h=this.isInBreak(i);if(!h){var u=o.find(function(m){return m.value===i});u.__disabled&&(u.__disabled=!1),this.appendDataItem(u),u.axisBreak=void 0,(u.value!=i||l)&&(u.value=i,u.text=this.formatLabel(i),u.label&&u.label.invalid&&u.label.validate(),u.value>=this.min&&u.value<=this.max&&u.label&&(this.axisLetter=="Y"&&u.label.measuredWidth>this.ghostLabel.measuredWidth||this.axisLetter=="X"&&u.label.measuredHeight>this.ghostLabel.measuredHeight)&&(this.ghostLabel.text=u.label.currentText,this.ghostLabel.validate())),this.validateDataElement(u)}n++;var p=i;if(!this.logarithmic)i+=this._step;else{var r=Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E;r>1?i=Math.pow(10,Math.log(this.min)*Math.LOG10E+n):i+=this._step}var d=Math.pow(10,Math.floor(Math.log(Math.abs(this._step))*Math.LOG10E));if(d<1){var c=Math.round(Math.abs(Math.log(Math.abs(d))*Math.LOG10E))+2;if(c=Math.min(13,c),i=H(i,c),p==i){i=s;break}}}var f=this._axisBreaks;if(f){var g=this.renderer;E(f.iterator(),function(m){if(m.breakSize>0&&Mt(m.startPoint,m.endPoint)>g.minGridDistance)for(var y=m.adjustedMin;y<=m.adjustedMax;){if(y>=m.adjustedStartValue&&y<=m.adjustedEndValue){var v=o.find(function(x){return x.value===y});v.__disabled&&(v.__disabled=!1),t.appendDataItem(v),v.axisBreak=m,v.value!=y&&(v.value=y,v.text=t.formatLabel(y),v.label&&v.label.invalid&&v.label.validate()),t.validateDataElement(v)}y+=m.adjustedStep}})}}},e.prototype.validateDataElement=function(t){a.prototype.validateDataElement.call(this,t),t.itemIndex=this._axisItemCount,this._axisItemCount++;var i=this.renderer,r=t.value,s=t.endValue,o=this.valueToPosition(r);t.position=o;var n=o,l=this.valueToPosition(r+this._step);P(s)&&(n=this.valueToPosition(s),l=n),t.point=i.positionToPoint(o);var h=t.tick;h&&!h.disabled&&i.updateTickElement(h,o,n);var u=t.grid;u&&!u.disabled&&i.updateGridElement(u,o,n);var p=t.label;p&&!p.disabled&&i.updateLabelElement(p,o,n);var d=t.axisFill;d&&!d.disabled&&(i.updateFillElement(d,o,l),t.isRange||this.fillRule(t)),t.bullet&&i.updateBullet(t.bullet,o,n);var c=t.mask;c&&i.updateFillElement(c,o,l)},e.prototype.formatLabel=function(t){return this.adjustLabelPrecision&&t!=0?this.numberFormatter.format(t,void 0,this._stepDecimalPlaces):this.numberFormatter.format(t)},Object.defineProperty(e.prototype,"basePoint",{get:function(){var t=this.baseValue,i=this.valueToPosition(t),r=this.renderer.positionToPoint(i);return r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseValue",{get:function(){var t=this._baseValue;return this.logarithmic&&(t=this.min),this._adapterO?this._adapterO.apply("baseValue",t):t},set:function(t){this._baseValue=t,this.invalidateLayout(),this.invalidateSeries()},enumerable:!0,configurable:!0}),e.prototype.anyToPosition=function(t){return this.valueToPosition(t)},e.prototype.valueToPoint=function(t){var i=this.valueToPosition(t),r=this.renderer.positionToPoint(i),s=this.renderer.positionToAngle(i);return{x:r.x,y:r.y,angle:s}},e.prototype.anyToPoint=function(t){return this.valueToPoint(t)},e.prototype.valueToPosition=function(t){if(P(t)){var i=this.min,r=this.max;if(P(i)&&P(r)){var s=this._difference,o=this._axisBreaks;o&&o.length>0&&ii(o.iterator(),function(h){var u=h.adjustedStartValue,p=h.adjustedEndValue;if(P(u)&&P(p)){if(t<u)return!1;if(Wn({start:u,end:p},{start:i,end:r})){u=Math.max(u,i),p=Math.min(p,r);var d=h.breakSize;t>p?i+=(p-u)*(1-d):t<u||(t=u+(t-u)*d)}}return!0});var n=void 0;if(!this.logarithmic)n=(t-i)/s;else{var l=this.treatZeroAs;P(l)&&t<=l&&(t=l),n=(Math.log(t)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)/(Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)}return n}}return 0},e.prototype.invalidateLabels=function(){a.prototype.invalidateLabels.call(this),this.dataItems&&(this.dataItems.each(function(t){t.value=void 0}),this.invalidate())},e.prototype.positionToValue=function(t){var i=this.min,r=this.max;if(P(i)&&P(r)){var s=r-i,o=null,n=this._axisBreaks;return n&&n.length>0&&ii(n.iterator(),function(l){var h=l.startPosition,u=l.endPosition,p=l.adjustedStartValue,d=l.adjustedEndValue;if(P(p)&&P(d)){if(p>r)return!1;if(Wn({start:p,end:d},{start:i,end:r})){p=mt(p,i),d=Pt(d,r);var c=l.breakSize;if(s-=(d-p)*(1-c),t>u)i+=(d-p)*(1-c);else if(!(t<h)){var f=(t-h)/(u-h);return o=p+f*(d-p),!1}}return!0}}),P(o)||(this.logarithmic?o=Math.pow(Math.E,(t*(Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)+Math.log(this.min)*Math.LOG10E)/Math.LOG10E):o=t*s+i),o}},e.prototype.xToValue=function(t){return this.positionToValue(this.pointToPosition({x:t,y:0}))},e.prototype.yToValue=function(t){return this.positionToValue(this.pointToPosition({x:0,y:t}))},e.prototype.pointToPosition=function(t){return this.renderer instanceof Ni?1-this.renderer.pointToPosition(t):this.renderer.pointToPosition(t)},e.prototype.animateMinMax=function(t,i){return this.animate([{property:"_minAdjusted",from:this._minAdjusted,to:t},{property:"_maxAdjusted",from:this._maxAdjusted,to:i}],this.rangeChangeDuration,this.rangeChangeEasing)},e.prototype.getMinMax=function(){var t=this;this.updateGridCount();var i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;if((!P(this._minDefined)||!P(this._maxDefined))&&(this.series.each(function(d){if(!d.ignoreMinMax){var c=d.min(t);P(c)&&c<i&&(i=c);var f=d.max(t);P(f)&&f>r&&(r=f)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(d){if(!d.ignoreMinMax){var c=Pt(d.value,d.endValue),f=mt(d.value,d.endValue);(c<i||!P(i))&&(i=c),(f>r||!P(r))&&(r=f)}})),this.logarithmic){var s=this.treatZeroAs;P(s)&&i<=0&&(i=s),i<=0&&this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."),!0)}if(i==0&&r==0&&(r=.9,i=-.9),P(this._minDefined)&&(i=this._minDefined),P(this._maxDefined)&&(r=this._maxDefined),this._adapterO&&(i=this._adapterO.apply("min",i)),this._adapterO&&(r=this._adapterO.apply("max",r)),!(!P(i)||!P(r))){this._minReal=i,this._maxReal=r,i==Number.POSITIVE_INFINITY&&(i=void 0),r==Number.NEGATIVE_INFINITY&&(r=void 0);var o=this.adjustDifference(i,r);if(i=this.fixMin(i),r=this.fixMax(r),r-i<=1/Math.pow(10,15)){if(r-i!=0)this._deltaMinMax=(r-i)/2;else{var n=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(n));l=l/10,this._deltaMinMax=l}i-=this._deltaMinMax,r+=this._deltaMinMax}i-=(r-i)*this.extraMin,r+=(r-i)*this.extraMax;var h=this.strictMinMax;P(this._maxDefined)&&(h=!0);var u=this.adjustMinMax(i,r,o,this._gridCount,h);if(i=u.min,r=u.max,o=r-i,u=this.adjustMinMax(i,r,r-i,this._gridCount,!0),i=u.min,r=u.max,this.strictMinMax&&(P(this._minDefined)?i=this._minDefined:i=this._minReal,P(this._maxDefined)?r=this._maxDefined:r=this._maxReal,r-i<=1e-8&&(i-=this._deltaMinMax,r+=this._deltaMinMax),i-=(r-i)*this.extraMin,r+=(r-i)*this.extraMax),this._adapterO&&(i=this._adapterO.apply("min",i)),this._adapterO&&(r=this._adapterO.apply("max",r)),this._step=u.step,!P(i)&&!P(r)&&(this.start=0,this.end=1,this.renderer.labels.each(function(d){d.dataItem.text=""})),(this._minAdjusted!=i||this._maxAdjusted!=r)&&P(i)&&P(r)){var p=this._minMaxAnimation;if(this._extremesChanged&&P(this._minAdjusted)&&P(this._maxAdjusted)&&this.inited){if(p&&!p.isFinished()&&this._finalMax==r&&this._finalMin==i)return;this._finalMin=i,this._finalMax=r,p=this.animateMinMax(i,r),p&&!p.isFinished()?(p.events.on("animationprogress",this.validateDataItems,this),p.events.on("animationended",function(){t.series.each(function(d){d.validate()}),t.validateDataItems(),t.handleSelectionExtremesChange()}),this._minMaxAnimation=p):this.series.each(function(d){d.invalidate()}),this.validateDataItems(),this.dispatchImmediately("extremeschanged"),this.handleSelectionExtremesChange()}else{if(p&&!p.isFinished()&&this._finalMax==r&&this._finalMin==i)return;this._minAdjusted=i,this._maxAdjusted=r,this._finalMin=i,this._finalMax=r,this.invalidateDataItems(),this.dispatchImmediately("extremeschanged"),this._saveMinMax(i,r)}}this._extremesChanged=!1,this._difference=this.adjustDifference(i,r)}},e.prototype.fixMin=function(t){return t},e.prototype.fixMax=function(t){return t},e.prototype.adjustMinMax=function(t,i,r,s,o){s<=1&&(s=1),s=Math.round(s);var n=t,l=i;r===0&&(r=Math.abs(i));var h=Math.log(Math.abs(r))*Math.LOG10E,u=Math.pow(10,Math.floor(h));u=u/10;var p=u;o&&(p=0),this.logarithmic?(t<=0&&(t=this.baseValue),t==1/0&&(t=1),i==-1/0&&(i=10),this.strictMinMax?(this._minDefined>0?t=this._minDefined:t=t,this._maxDefined>0&&(i=i)):(t=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),i=Math.pow(10,Math.ceil(Math.log(Math.abs(i))*Math.LOG10E)))):(o?(t=Math.floor(t/u)*u,i=Math.ceil(i/u)*u):(t=Math.ceil(t/u)*u-p,i=Math.floor(i/u)*u+p),t<0&&n>=0&&(t=0),i>0&&l<=0&&(i=0)),h=Math.log(Math.abs(r))*Math.LOG10E,u=Math.pow(10,Math.floor(h)),u=u/10;var d=Math.ceil(r/s/u)*u,c=Math.pow(10,Math.floor(Math.log(Math.abs(d))*Math.LOG10E)),f=Math.ceil(d/c);f>5?f=10:f<=5&&f>2&&(f=5),d=Math.ceil(d/(c*f))*c*f,this.maxPrecision<Number.MAX_VALUE&&d!=df(d,this.maxPrecision)&&(d=df(d,this.maxPrecision));var g=0;if(c<1&&(g=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1,d=H(d,g)),!this.logarithmic){var m=Math.floor(t/d);t=H(d*m,g);var y=void 0;o?y=Math.floor(i/d):y=Math.ceil(i/d),y==m&&y++,i=H(d*y,g),i<l&&(i=i+d),t>n&&(t=t-d)}return{min:t,max:i,step:d}},Object.defineProperty(e.prototype,"min",{get:function(){var t=this._minAdjusted;return P(t)||(t=this._minDefined),t},set:function(t){this._minDefined!=t&&(this._minDefined=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDefined",{get:function(){return this._minDefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDefined",{get:function(){return this._maxDefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraMin",{get:function(){return this.getPropertyValue("extraMin")},set:function(t){this.setPropertyValue("extraMin",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraMax",{get:function(){return this.getPropertyValue("extraMax")},set:function(t){this.setPropertyValue("extraMax",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){var t=this._maxAdjusted;return P(t)||(t=this._maxDefined),t},set:function(t){this._maxDefined!=t&&(this._maxDefined=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adjustLabelPrecision",{get:function(){return this.getPropertyValue("adjustLabelPrecision")},set:function(t){this.setPropertyValue("adjustLabelPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.registerSeries=function(t){return new Bt([a.prototype.registerSeries.call(this,t),t.events.on("extremeschanged",this.handleExtremesChange,this,!1),t.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1),this.events.on("extremeschanged",t.invalidate,t,!1)])},e.prototype.handleSelectionExtremesChange=function(){var t=this,i,r,s=!0;if(E(this.series.iterator(),function(c){if(!c.ignoreMinMax&&!c.isHidden&&!c.outOfRange){c.visible&&!c.isHiding&&(s=!1);var f=c.selectionMin(t),g=c.selectionMax(t);P(f)&&(!P(i)||f<i)&&(i=f),P(g)&&(!P(r)||g>r)&&(r=g)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(c){if(!c.ignoreMinMax){var f=Pt(c.value,c.endValue),g=mt(c.value,c.endValue);f<i&&(i=f),g>r&&(r=g)}}),P(this._minDefined)?this.strictMinMax?i=this._minDefined:i=this.min:this.strictMinMax&&(i=this._minReal),P(this._maxDefined)?this.strictMinMax?r=this._maxDefined:r=this.max:this.strictMinMax&&(r=this._maxReal),i==r){i-=this._deltaMinMax,r+=this._deltaMinMax;var o=this.adjustMinMax(i,r,0,this._gridCount,this.strictMinMax);i=o.min,r=o.max}var n=this.adjustDifference(i,r),l=this.adjustMinMax(i,r,n,this._gridCount);i=l.min,r=l.max,i-=(r-i)*this.extraMin,r+=(r-i)*this.extraMax,i=J(i,this.min,this.max),r=J(r,this.min,this.max),n=this.adjustDifference(i,r),l=this.adjustMinMax(i,r,n,this._gridCount,!0),i=l.min,r=l.max,this.strictMinMax&&(i=mt(i,this._minDefined),r=Pt(r,this._maxDefined));var h=l.step;this.syncWithAxis&&(l=this.syncAxes(i,r,h),i=l.min,r=l.max,this.invalidate()),h=l.step,this._difference=this.adjustDifference(this.min,this.max);var u=this.valueToPosition(i),p=this.valueToPosition(r);s&&!this.syncWithAxis&&(u=0,p=1);var d=0;this.syncWithAxis?(d=5,this.setCache(i+"-"+r,h)):((this._step!=h||this._minZoomed!=i||this._maxZoomed!=r)&&(this._dsc=!0),this._step=h,this._minZoomed=i,this._maxZoomed=r),this.keepSelection||this.zoom({start:u,end:p},!1,!1,d)},Object.defineProperty(e.prototype,"strictMinMax",{get:function(){return this.getPropertyValue("strictMinMax")},set:function(t){this.setPropertyValue("strictMinMax",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logarithmic",{get:function(){return this.getPropertyValue("logarithmic")},set:function(t){this.setPropertyValue("logarithmic",t)&&(this.invalidate(),this.series.each(function(i){i.invalidateDataItems()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keepSelection",{get:function(){return this.getPropertyValue("keepSelection")},set:function(t){this.setPropertyValue("keepSelection",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"includeRangesInMinMax",{get:function(){return this.getPropertyValue("includeRangesInMinMax")},set:function(t){this.setPropertyValue("includeRangesInMinMax",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxPrecision",{get:function(){return this.getPropertyValue("maxPrecision")},set:function(t){this.setPropertyValue("maxPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraTooltipPrecision",{get:function(){return this.getPropertyValue("extraTooltipPrecision")},set:function(t){this.setPropertyValue("extraTooltipPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.handleExtremesChange=function(){var t=this;if(this._extremesChanged=!0,this.getMinMax(),this.ghostLabel){var i=0;this.dataItems.each(function(r){r.label&&r.label.pixelWidth>i&&(t.ghostLabel.text=r.label.currentText)})}},e.prototype.getX=function(t,i,r,s,o){return this.renderer.positionToPoint(this.getPositionX(t,i,r,s,o)).x},e.prototype.getPositionX=function(t,i,r,s,o){var n=t.getWorkingValue(i);C(s)||(s="valueX");var l=t.getValue(s,"stack");P(n)||(n=this.baseValue,this.logarithmic&&l>0&&(n=0));var h=this.valueToPosition(n+l);return o&&(h=J(h,o.start,o.end)),h},e.prototype.getY=function(t,i,r,s,o){return this.renderer.positionToPoint(this.getPositionY(t,i,r,s,o)).y},e.prototype.getPositionY=function(t,i,r,s,o){var n=t.getWorkingValue(i);C(s)||(s="valueY");var l=t.getValue(s,"stack");P(n)||(n=this.baseValue,this.logarithmic&&l>0&&(n=0));var h=this.valueToPosition(n+l);return o&&(h=J(h,o.start,o.end)),h},e.prototype.getAngle=function(t,i,r,s,o){var n=t.getWorkingValue(i),l=t.getValue(s,"stack");P(n)||(n=this.baseValue);var h=this.valueToPosition(n+l);return o&&(h=J(h,o.start,o.end)),this.positionToAngle(h)},e.prototype.getAnyRangePath=function(t,i,r){var s=this.valueToPosition(t),o=this.valueToPosition(i);return this.getPositionRangePath(s,o)},e.prototype.getTooltipText=function(t){var i=H(this.positionToValue(t),this._stepDecimalPlaces+this.extraTooltipPrecision),r=this.tooltip.numberFormatter.format(i);return this._adapterO?this._adapterO.apply("getTooltipText",r):r},e.prototype.zoomToValues=function(t,i,r,s){var o=(t-this.min)/(this.max-this.min),n=(i-this.min)/(this.max-this.min);this.zoom({start:o,end:n},r,s)},Object.defineProperty(e.prototype,"minZoomed",{get:function(){return this.syncWithAxis?this._minZoomed:mt(this.min,this._minZoomed)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomed",{get:function(){return this.syncWithAxis?this._maxZoomed:Pt(this.max,this._maxZoomed)},enumerable:!0,configurable:!0}),e.prototype.fixAxisBreaks=function(){var t=this;a.prototype.fixAxisBreaks.call(this);var i=this._axisBreaks;i&&i.length>0&&i.each(function(r){var s=r.adjustedStartValue,o=r.adjustedEndValue,n=o-s,l=Math.ceil(n*r.breakSize)*t._gridCount/(t.max-t.min),h=t.adjustMinMax(s,o,n,l,!0);r.adjustedStep=h.step,r.adjustedMin=h.min,r.adjustedMax=h.max}),this._difference=this.adjustDifference(this.min,this.max)},e.prototype.getPositionLabel=function(t){var i=this.positionToValue(t);return this.numberFormatter.format(i)},e.prototype.showTooltipAt=function(t){this.showTooltipAtPosition(this.valueToPosition(t))},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.min=t.min,this.max=t.max,this.calculateTotals=t.calculateTotals,this._baseValue=t.baseValue},Object.defineProperty(e.prototype,"syncWithAxis",{get:function(){return this.getPropertyValue("syncWithAxis")},set:function(t){var i=this;this.setPropertyValue("syncWithAxis",t,!0)&&t&&(this._disposers.push(t.events.on("extremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(t.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(t.events.on("startendchanged",this.handleSelectionExtremesChange,this,!1)),this.events.on("shown",this.handleSelectionExtremesChange,this,!1),this.events.on("maxsizechanged",function(){i.clearCache(),i._disposers.push(w.events.once("exitframe",function(){i.handleSelectionExtremesChange()}))},this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treatZeroAs",{get:function(){return this.getPropertyValue("treatZeroAs")},set:function(t){this.setPropertyValue("treatZeroAs",t,!0)},enumerable:!0,configurable:!0}),e.prototype.syncAxes=function(t,i,r){var s=this.syncWithAxis;if(s){P(t)||(t=this.min),P(i)||(i=this.max),P(r)||(r=this._step);var o=Math.round((s.maxZoomed-s.minZoomed)/s.step),n=Math.round((i-t)/r);if(P(o)&&P(n))for(var l=!1,h=0,u=(i-t)*.01,p=t,d=i,c=r;l!=!0;)if(l=this.checkSync(p,d,c,o),h++,h>1e3&&(l=!0),l)t=p,i=d,r=c;else{h/3==Math.round(h/3)?(p=t-u*h,t>=0&&p<0&&(p=0)):(d=i+u*h,d<=0&&d>0&&(d=0));var f=this.adjustMinMax(p,d,d-p,this._gridCount,!0);p=f.min,d=f.max,c=f.step}}return{min:t,max:i,step:r}},e.prototype.checkSync=function(t,i,r,s){for(var o=(i-t)/r,n=1;n<s;n++)if(H(o/n,1)==s||o*n==s)return!0;return!1},e.prototype.processConfig=function(t){t&&C(t.syncWithAxis)&&vt(t.syncWithAxis)&&(this.map.hasKey(t.syncWithAxis)?t.syncWithAxis=this.map.getKey(t.syncWithAxis):(this.processingErrors.push('[ValueAxis] No axis with id "'+t.syncWithAxis+'" found for `syncWithAxis`'),delete t.xAxis)),a.prototype.processConfig.call(this,t)},e.prototype._saveMinMax=function(t,i){},e})(an);w.registeredClasses.ValueAxis=At;w.registeredClasses.ValueAxisDataItem=on;var Gp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="DateAxisBreak",t.applyTheme(),t}return Object.defineProperty(e.prototype,"startDate",{get:function(){return this.getPropertyValue("startDate")},set:function(t){this.setPropertyValue("startDate",t)&&(this.startValue=t.getTime(),this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endDate",{get:function(){return this.getPropertyValue("endDate")},set:function(t){this.setPropertyValue("endDate",t)&&(this.endValue=t.getTime(),this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries()))},enumerable:!0,configurable:!0}),e})(Pl);w.registeredClasses.DateAxisBreak=Gp;var Cm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="DateAxisDataItem",t.applyTheme(),t.values.date={},t.values.endDate={},t}return Object.defineProperty(e.prototype,"date",{get:function(){return this.dates.date},set:function(t){this.setDate("date",t),this.value=t.getTime()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endDate",{get:function(){return this.dates.endDate},set:function(t){this.setDate("endDate",t),this.endValue=t.getTime()},enumerable:!0,configurable:!0}),e})(on);var me=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._gapBreaks=!1,t.gridIntervals=new wt,t.groupIntervals=new wt,t.dateFormats=new It,t.periodChangeDateFormats=new It,t._baseIntervalReal={timeUnit:"day",count:1},t._prevSeriesTime={},t._minDifference={},t._firstWeekDay=1,t.groupMin={},t.groupMax={},t._intervalMax={},t._intervalMin={},t.className="DateAxis",t.setPropertyValue("markUnitChange",!0),t.snapTooltip=!0,t.tooltipPosition="pointer",t.setPropertyValue("groupData",!1),t.groupCount=200,t.events.on("parentset",t.getDFFormatter,t,!1),t.gridIntervals.pushAll([{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}]),t.groupIntervals.pushAll([{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}]),t.axisFieldName="date",t.applyTheme(),t}return e.prototype.fillRule=function(t){var i=t.value,r=t.component,s=r._gridInterval,o=Ee(s.timeUnit,s.count);Math.round((i-r.min)/o)/2==Math.round(Math.round((i-r.min)/o)/2)?t.axisFill.__disabled=!0:t.axisFill.__disabled=!1},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),this.dateFormats.hasKey("millisecond")||this.dateFormats.setKey("millisecond",this.language.translate("_date_millisecond")),this.dateFormats.hasKey("second")||this.dateFormats.setKey("second",this.language.translate("_date_second")),this.dateFormats.hasKey("minute")||this.dateFormats.setKey("minute",this.language.translate("_date_minute")),this.dateFormats.hasKey("hour")||this.dateFormats.setKey("hour",this.language.translate("_date_hour")),this.dateFormats.hasKey("day")||this.dateFormats.setKey("day",this.language.translate("_date_day")),this.dateFormats.hasKey("week")||this.dateFormats.setKey("week",this.language.translate("_date_day")),this.dateFormats.hasKey("month")||this.dateFormats.setKey("month",this.language.translate("_date_month")),this.dateFormats.hasKey("year")||this.dateFormats.setKey("year",this.language.translate("_date_year")),this.periodChangeDateFormats.hasKey("millisecond")||this.periodChangeDateFormats.setKey("millisecond",this.language.translate("_date_millisecond")),this.periodChangeDateFormats.hasKey("second")||this.periodChangeDateFormats.setKey("second",this.language.translate("_date_second")),this.periodChangeDateFormats.hasKey("minute")||this.periodChangeDateFormats.setKey("minute",this.language.translate("_date_minute")),this.periodChangeDateFormats.hasKey("hour")||this.periodChangeDateFormats.setKey("hour",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("day")||this.periodChangeDateFormats.setKey("day",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("week")||this.periodChangeDateFormats.setKey("week",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("month")||this.periodChangeDateFormats.setKey("month",this.language.translate("_date_month")+" "+this.language.translate("_date_year"))},e.prototype.createDataItem=function(){return new Cm},e.prototype.createAxisBreak=function(){return new Gp},e.prototype.validateDataItems=function(){var t=this.start,i=this.end,r=this.baseDuration,s=(this.max-this.min)/r;this._firstWeekDay=this.getFirstWeekDay(),this.getDFFormatter(),a.prototype.validateDataItems.call(this);var o=Ee(this.mainBaseInterval.timeUnit,this.mainBaseInterval.count);this.maxZoomFactor=Math.max(1,(this.max-this.min)/o),this._deltaMinMax=this.baseDuration/2;var n=(this.max-this.min)/r;t=t+(i-t)*(1-s/n),this.zoom({start:t,end:i},!1,!0)},e.prototype.handleSelectionExtremesChange=function(){},e.prototype.getIntervalMax=function(t){return this._intervalMax[t.timeUnit+t.count]},e.prototype.getIntervalMin=function(t){return this._intervalMin[t.timeUnit+t.count]},e.prototype.calculateZoom=function(){var t=this;a.prototype.calculateZoom.call(this);var i=this.adjustDifference(this._minZoomed,this._maxZoomed),r=!1;if(this.groupData&&C(i)){var s=this.mainBaseInterval,o=this.getIntervalMin(s),n=this.getIntervalMax(s),l=o+(n-o)*this.start,h=o+(n-o)*this.end,u=this.adjustDifference(l,h),p=u+(this.startLocation+(1-this.endLocation))*this.baseDuration,d=void 0;this.groupInterval?d=Er({},this.groupInterval):(d=this.chooseInterval(0,p,this.groupCount,this.groupIntervals),Ee(d.timeUnit,d.count)<Ee(s.timeUnit,s.count)&&(d=Er({},s))),this._groupInterval=d;var c=d.timeUnit+d.count;this._currentDataSetId!=c&&(this._currentDataSetId=c,this.dispatch("groupperiodchanged")),this.series.each(function(g){g.baseAxis==t&&g.setDataSet(t._currentDataSetId)&&(r=!0)})}var f=this.chooseInterval(0,i,this._gridCount);Ee(f.timeUnit,f.count)<this.baseDuration&&(f=Er({},this.baseInterval)),this._gridInterval=f,this._nextGridUnit=em(f.timeUnit),this._intervalDuration=Ee(f.timeUnit,f.count),this._gridDate=ri(new Date(this.minZoomed-Ee(f.timeUnit,f.count)),f.timeUnit,f.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),E(this.series.iterator(),function(g){if(g.baseAxis==t){var m=g.getAxisField(t),y=ri(new Date(t._minZoomed+t.baseDuration*.05),t.baseInterval.timeUnit,t.baseInterval.count,t._firstWeekDay,t._df.utc,void 0,t._df.timezoneMinutes,t._df.timezone).getTime(),v=y.toString(),x=g.dataItemsByAxis.getKey(t.uid).getKey(v+g.currentDataSetId),_=0;t.start!=0&&(x?(x=t.findFirst(x,y,m),_=x.index):_=g.dataItems.findClosestIndex(t._minZoomed,function(L){return L[m]},"left"));var $=t.baseInterval,T=Ai(ri(new Date(t._maxZoomed),$.timeUnit,$.count,t._firstWeekDay,t._df.utc,void 0,t._df.timezoneMinutes,t._df.timezone),$.timeUnit,$.count,t._df.utc).getTime(),S=T.toString(),k=g.dataItemsByAxis.getKey(t.uid).getKey(S+g.currentDataSetId),A=g.dataItems.length;t.end!=1&&(k?A=k.index:(T-=1,A=g.dataItems.findClosestIndex(T,function(L){return L[m]},"right"),A++)),g.max(t)<y?(g.startIndex=g.dataItems.length,g.endIndex=g.dataItems.length,g.outOfRange=!0):g.min(t)>T?(g.startIndex=0,g.endIndex=0,g.outOfRange=!0):(g.outOfRange=!1,g.startIndex=_,g.endIndex=A),!r&&g.dataRangeInvalid&&g.validateDataRange()}})},e.prototype.findFirst=function(t,i,r){var s=t.index;if(s>0){var o=t.component,n=o.dataItems.getIndex(s-1),l=n[r];return!l||l.getTime()<i?t:this.findFirst(n,i,r)}else return t},e.prototype.validateData=function(){a.prototype.validateData.call(this),P(this.baseInterval.count)||(this.baseInterval.count=1)},Object.defineProperty(e.prototype,"minDifference",{get:function(){var t=this,i=Number.MAX_VALUE;return this.series.each(function(r){i>t._minDifference[r.uid]&&(i=t._minDifference[r.uid])}),(i==Number.MAX_VALUE||i==0)&&(i=Ee("day")),i},enumerable:!0,configurable:!0}),e.prototype.seriesDataChangeUpdate=function(t){this._minDifference[t.uid]=Number.MAX_VALUE},e.prototype.postProcessSeriesDataItems=function(t){var i=this;this._firstWeekDay=this.getFirstWeekDay(),t?this.seriesGroupUpdate(t):this.series.each(function(r){i.seriesGroupUpdate(r)}),this.addEmptyUnitsBreaks()},e.prototype.seriesGroupUpdate=function(t){var i=this;JSON.stringify(t._baseInterval[this.uid])!=JSON.stringify(this.mainBaseInterval)&&(t._baseInterval[this.uid]=this.mainBaseInterval,t.mainDataSet.each(function(r){i.postProcessSeriesDataItem(r)}),this.groupData&&this.groupSeriesData(t))},e.prototype.groupSeriesData=function(t){var i=this;if(t.baseAxis==this&&t.dataItems.length>0&&!t.dataGrouped){t.bulletsContainer.removeChildren();var r=[],s=this.mainBaseInterval,o=Ee(s.timeUnit,s.count);this.groupIntervals.each(function(n){var l=Ee(n.timeUnit,n.count);(l>o&&l<i.max-i.min||i.groupInterval)&&r.push(n)}),t._dataSets&&(t._dataSets.each(function(n,l){l.each(function(h){h.dispose()}),l.clear()}),t._dataSets.clear()),t.dataGrouped=!0,W(r,function(n){var l="date"+i.axisLetter,h=n.timeUnit+n.count,u=new Ga(t.mainDataSet.template.clone());t.dataSets.setKey(h,u);var p=t.mainDataSet,d=Number.NEGATIVE_INFINITY,c=0,f,g=[];at(t.dataFields,function(y,v){var x=y;x!=l&&x.indexOf("Show")==-1&&g.push(x)});var m;p.each(function(y){var v=y.getDate(l);if(v){var x=v.getTime();m=ri(new Date(x),n.timeUnit,n.count,i._df.firstDayOfWeek,i._df.utc,void 0,i._df.timezoneMinutes,i._df.timezone);var _=m.getTime();d<_?(f&&t._adapterO&&W(g,function($){f.values[$].value=t._adapterO.apply("groupDataItem",{dataItem:f,interval:n,dataField:$,date:m,value:f.values[$].value}).value,f.values[$].workingValue=f.values[$].value}),f=u.create(),f.dataContext={},f.setWorkingLocation("dateX",t.dataItems.template.locations.dateX,0),f.setWorkingLocation("openDateX",t.dataItems.template.locations.openDateX,0),f.setWorkingLocation("dateY",t.dataItems.template.locations.dateY,0),f.setWorkingLocation("openDateY",t.dataItems.template.locations.openDateY,0),f.component=t,f.setDate(l,m),f._index=c,c++,W(g,function($){var T=y.values[$];if(T){var S=T.value;t._adapterO&&(S=t._adapterO.apply("groupValue",{dataItem:y,interval:n,dataField:$,date:m,value:S}).value);var k=f.values[$];P(S)?(k.value=S,k.workingValue=S,k.open=S,k.close=S,k.low=S,k.high=S,k.sum=S,k.average=S,k.count=1):k.count=0}}),i.postProcessSeriesDataItem(f,n),at(t.propertyFields,function($,T){var S=$,k=y.properties[$];C(k)&&(f.hasProperties=!0,f.setProperty(S,k))}),f.groupDataItems=[y],d=_):f&&(W(g,function($){var T=t.groupFields[$],S=y.values[$];if(S){var k=S.value;if(t._adapterO&&(k=t._adapterO.apply("groupValue",{dataItem:y,interval:n,dataField:$,date:m,value:k}).value),P(k)){var A=f.values[$];P(A.open)||(A.open=k),A.close=k,(A.low>k||!P(A.low))&&(A.low=k),(A.high<k||!P(A.high))&&(A.high=k),P(A.sum)?A.sum+=k:A.sum=k,A.count++,A.average=A.sum/A.count,P(A[T])&&(A.value=A[T],A.workingValue=A.value)}}}),tr(y.properties,f.properties),at(t.propertyFields,function($,T){var S=$,k=y.properties[$];C(k)&&(f.hasProperties=!0,f.setProperty(S,k))}),f.groupDataItems.push(y))}f&&tr(y.dataContext,f.dataContext)}),f&&t._adapterO&&W(g,function(y){f.values[y].value=t._adapterO.apply("groupDataItem",{dataItem:f,interval:n,dataField:y,date:m,value:f.values[y].value}).value,f.values[y].workingValue=f.values[y].value})}),this.calculateZoom()}},e.prototype.getDFFormatter=function(){this._df=this.dateFormatter},e.prototype.postProcessSeriesDataItem=function(t,i){var r=this,s="";i?s=i.timeUnit+i.count:i=this.mainBaseInterval;var o=t.component,n=o.dataItemsByAxis.getKey(this.uid);at(t.dates,function(l){var h=t.getDate(l),u=h.getTime(),p=ri(new Date(u),i.timeUnit,i.count,r._firstWeekDay,r._df.utc,void 0,r._df.timezoneMinutes,r._df.timezone),d=p.getTime(),c=Ai(new Date(d),i.timeUnit,i.count,r._df.utc);t.setCalculatedValue(l,d,"open"),t.setCalculatedValue(l,c.getTime(),"close"),n.setKey(d+s,t)})},e.prototype.addEmptyUnitsBreaks=function(){var t=this;if(this.skipEmptyPeriods&&P(this.min)&&P(this.max)){var i=this.baseInterval.timeUnit,r=this.baseInterval.count;this._axisBreaks&&this._axisBreaks.clear();for(var s=ri(new Date(this.min),i,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o=void 0,n=function(){Ai(s,i,r,l._df.utc);var h=s.getTime(),u=h.toString(),p=Qn(l.series.iterator(),function(d){return!!d.dataItemsByAxis.getKey(t.uid).getKey(u+d.currentDataSetId)});p?o&&(o.endDate=new Date(h-1),o=void 0):o||(o=l.axisBreaks.create(),o.startDate=new Date(h),l._gapBreaks=!0)},l=this;s.getTime()<this.max-this.baseDuration;)n()}},e.prototype.fixAxisBreaks=function(){var t=this;a.prototype.fixAxisBreaks.call(this);var i=this._axisBreaks;i&&i.length>0&&i.each(function(r){var s=Math.ceil(t._gridCount*(Math.min(t.end,r.endPosition)-Math.max(t.start,r.startPosition))/(t.end-t.start));r.gridInterval=t.chooseInterval(0,r.adjustedEndValue-r.adjustedStartValue,s);var o=ri(new Date(r.adjustedStartValue),r.gridInterval.timeUnit,r.gridInterval.count,t._firstWeekDay,t._df.utc,void 0,t._df.timezoneMinutes,t._df.timezone);o.getTime()>r.startDate.getTime()&&Ai(o,r.gridInterval.timeUnit,r.gridInterval.count,t._df.utc),r.gridDate=o})},e.prototype.getFirstWeekDay=function(){return this._df?this._df.firstDayOfWeek:1},e.prototype.getGridDate=function(t,i){var r=this._gridInterval.timeUnit,s=this._gridInterval.count;ri(t,r,1,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);var o=t.getTime(),n=Jo(t),l=Ai(n,r,i,this._df.utc).getTime(),h=this.isInBreak(l);h&&h.endDate&&(n=new Date(h.endDate.getTime()),ri(n,r,s,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),n.getTime()<h.endDate.getTime()&&Ai(n,r,s,this._df.utc),l=n.getTime());var u=this.adjustDifference(o,l),p=Math.round(u/Ee(r));return p<s?this.getGridDate(t,i+s):n},e.prototype.getBreaklessDate=function(t,i,r){var s=new Date(t.endValue);ri(s,i,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),Ai(s,i,r,this._df.utc);var o=s.getTime();return t=this.isInBreak(o),t?this.getBreaklessDate(t,i,r):s},e.prototype.validateAxisElements=function(){var t=this;if(P(this.max)&&P(this.min)){this.calculateZoom();var i=this._gridDate.getTime(),r=this._gridInterval.timeUnit,s=this._gridInterval.count,o=Jo(this._gridDate),n=this._dataItemsIterator;this.resetIterators();for(var l=function(){var p=h.getGridDate(Jo(o),s);i=p.getTime();var d=Jo(p);d=Ai(d,r,s,h._df.utc);var c=h.dateFormats.getKey(r);h.markUnitChange&&o&&Fp(p,o,h._nextGridUnit,h._df.utc)&&r!=="year"&&(c=h.periodChangeDateFormats.getKey(r));var f=h._df.format(p,c),g=n.find(function(m){return m.text===f});g.__disabled&&(g.__disabled=!1),h.appendDataItem(g),g.axisBreak=void 0,g.date=p,g.endDate=d,g.text=f,h.validateDataElement(g),o=p},h=this;i<=this._maxZoomed;)l();var u=this.renderer;this._axisBreaks&&E(this._axisBreaks.iterator(),function(p){if(p.breakSize>0){var d=p.gridInterval.timeUnit,c=p.gridInterval.count;if(Mt(p.startPoint,p.endPoint)>u.minGridDistance*4)for(var f=p.gridDate.getTime(),g,m=0,y=function(){var v=Jo(p.gridDate);if(f=Ai(v,d,c*m,t._df.utc).getTime(),m++,f>p.adjustedStartValue&&f<p.adjustedEndValue){var x=Jo(v);x=Ai(x,d,c,t._df.utc);var _=t.dateFormats.getKey(d);t.markUnitChange&&g&&Fp(v,g,t._nextGridUnit,t._df.utc)&&d!=="year"&&(_=t.periodChangeDateFormats.getKey(d));var $=t._df.format(v,_),T=n.find(function(S){return S.text===$});T.__disabled&&(T.__disabled=!1),t.appendDataItem(T),T.axisBreak=p,p.dataItems.moveValue(T),T.date=v,T.endDate=x,T.text=$,g=v,t.validateDataElement(T)}};f<=p.adjustedMax;)y()}})}},e.prototype.validateDataElement=function(t){if(t.itemIndex=this._axisItemCount,this._axisItemCount++,P(this.max)&&P(this.min)){var i=this.renderer,r=t.value,s=t.endValue;P(s)||(s=r);var o=this.valueToPosition(r),n=this.valueToPosition(s),l=n;!t.isRange&&this._gridInterval.count>this.baseInterval.count&&(n=o+(n-o)/(this._gridInterval.count/this.baseInterval.count)),t.position=o;var h=t.tick;h&&!h.disabled&&i.updateTickElement(h,o,n);var u=t.grid;u&&!u.disabled&&i.updateGridElement(u,o,n);var p=t.axisFill;p&&!p.disabled&&(i.updateFillElement(p,o,l),t.isRange||this.fillRule(t));var d=t.mask;d&&i.updateFillElement(d,o,n),t.bullet&&i.updateBullet(t.bullet,o,n);var c=t.label;if(c&&!c.disabled){var f=c.location;f==0&&(this._gridInterval.count==1&&this._gridInterval.timeUnit!="week"&&!t.isRange?f=.5:f=0),i.updateLabelElement(c,o,n,f)}}},Object.defineProperty(e.prototype,"baseDuration",{get:function(){return Ee(this.baseInterval.timeUnit,this.baseInterval.count)},enumerable:!0,configurable:!0}),e.prototype.adjustMinMax=function(t,i){return{min:t,max:i,step:this.baseDuration}},e.prototype.fixMin=function(t){var i=this.baseInterval,r=ri(new Date(t),i.timeUnit,i.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime(),s=Ai(new Date(r),i.timeUnit,i.count,this._df.utc).getTime();return r+(s-r)*this.startLocation},e.prototype.fixMax=function(t){var i=this.baseInterval,r=ri(new Date(t),i.timeUnit,i.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime(),s=Ai(new Date(r),i.timeUnit,i.count,this._df.utc).getTime();return r+(s-r)*this.endLocation},e.prototype.chooseInterval=function(t,i,r,s){s||(s=this.gridIntervals);var o=s.getIndex(t),n=Ee(o.timeUnit,o.count),l=s.length-1;if(t>=l)return Er({},s.getIndex(l));var h=Math.ceil(i/n);return i<n&&t>0?Er({},s.getIndex(t-1)):h<=r?Er({},s.getIndex(t)):t+1<s.length?this.chooseInterval(t+1,i,r,s):Er({},s.getIndex(t))},e.prototype.formatLabel=function(t){return this._df.format(t)},e.prototype.dateToPosition=function(t){return this.valueToPosition(t.getTime())},e.prototype.anyToPosition=function(t){return t instanceof Date?this.dateToPosition(t):this.valueToPosition(t)},e.prototype.dateToPoint=function(t){var i=this.dateToPosition(t),r=this.renderer.positionToPoint(i),s=this.renderer.positionToAngle(i);return{x:r.x,y:r.y,angle:s}},e.prototype.anyToPoint=function(t){return t instanceof Date?this.dateToPoint(t):this.valueToPoint(t)},e.prototype.positionToDate=function(t){return new Date(this.positionToValue(t))},e.prototype.getPositionX=function(t,i,r,s,o){var n=this.getTimeByLocation(t,i,r);P(n)||(n=this.baseValue);var l=this.valueToPosition(n);return o&&(l=J(l,o.start,o.end)),l},e.prototype.getPositionY=function(t,i,r,s,o){var n=this.getTimeByLocation(t,i,r),l=t.getValue("valueX","stack");P(n)||(n=this.baseValue);var h=this.valueToPosition(n+l);return o&&(h=J(h,o.start,o.end)),h},e.prototype.getAngle=function(t,i,r,s,o){var n=this.getTimeByLocation(t,i,r),l=t.getValue(s,"stack");P(n)||(n=this.baseValue);var h=this.valueToPosition(n+l);return o&&(h=J(h,o.start,o.end)),this.positionToAngle(h)},e.prototype.getTimeByLocation=function(t,i,r){if(C(i)){P(r)||(r=t.workingLocations[i],P(r)||(r=0));var s=t.values[i].open,o=t.values[i].close,n=t.values[i].workingValue,l=t.values[i].value,h=l-n;if(s-=h,o-=h,P(s)&&P(o))return s+(o-s)*r}},e.prototype.processSeriesDataItem=function(t,i){var r=t.component,s,o=t["date"+i];if(P(this.timezoneOffset)?(o.setTime(o.getTime()+(o.getTimezoneOffset()-this.timezoneOffset)*6e4),t.setValue("date"+i,o.getTime(),0)):C(this.timezone)&&(o=gl(o,this.timezone),t.setValue("date"+i,o.getTime(),0),t["date"+i]=o),o)s=o.getTime();else return;var n=t["openDate"+i],l=this._prevSeriesTime[r.uid],h;if(n&&(h=n.getTime()),P(h)){var u=Math.abs(s-h);this._minDifference[r.uid]>u&&(this._minDifference[r.uid]=u)}var p=s-l;p>0&&this._minDifference[r.uid]>p&&(this._minDifference[r.uid]=p),this._prevSeriesTime[r.uid]=s,r._baseInterval[this.uid]&&this.postProcessSeriesDataItem(t)},e.prototype.updateAxisBySeries=function(){a.prototype.updateAxisBySeries.call(this);var t=this.chooseInterval(0,this.minDifference,1);this.minDifference>=Ee("day",27)&&t.timeUnit=="week"&&(t.timeUnit="month",t.count=1),t.timeUnit=="month"&&(this.minDifference>=Ee("day",58)&&t.count==1&&(t.count=2),this.minDifference>=Ee("day",87)&&t.count==2&&(t.count=3),this.minDifference>=Ee("day",174)&&t.count==5&&(t.count=6)),this.minDifference>=Ee("hour",23)&&t.timeUnit=="hour"&&(t.timeUnit="day",t.count=1),this.minDifference>=Ee("week",1)-Ee("hour",1)&&t.timeUnit=="day"&&(t.timeUnit="week",t.count=1),this.minDifference>=Ee("year",1)-Ee("day",1.01)&&t.timeUnit=="month"&&(t.timeUnit="year",t.count=1),this._baseIntervalReal=t,this._mainBaseInterval=t},Object.defineProperty(e.prototype,"baseInterval",{get:function(){return this._groupInterval?this._groupInterval:this._baseInterval?this._baseInterval:this._baseIntervalReal},set:function(t){JSON.stringify(this._baseInterval)!=JSON.stringify(t)&&(this._baseInterval=t,this._mainBaseInterval=t,P(t.count)||(t.count=1),this.invalidate(),this.postProcessSeriesDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mainBaseInterval",{get:function(){return this._baseInterval?this._baseInterval:this._mainBaseInterval?this._mainBaseInterval:this._baseIntervalReal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skipEmptyPeriods",{get:function(){return this.getPropertyValue("skipEmptyPeriods")},set:function(t){if(t){var i=this.axisBreaks.template;i.startLine.disabled=!0,i.endLine.disabled=!0,i.fillShape.disabled=!0,i.breakSize=0}else this._gapBreaks&&(this.axisBreaks.clear(),this._gapBreaks=!1);this.setPropertyValue("skipEmptyPeriods",t)&&(this.invalidate(),this.postProcessSeriesDataItems(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipDateFormat",{get:function(){return this.getPropertyValue("tooltipDateFormat")},set:function(t){this.setPropertyValue("tooltipDateFormat",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markUnitChange",{get:function(){return this.getPropertyValue("markUnitChange")},set:function(t){this.setPropertyValue("markUnitChange",t)&&this.invalidateData()},enumerable:!0,configurable:!0}),e.prototype.getTooltipText=function(t){var i,r=this.positionToDate(t);if(r=ri(r,this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),this.tooltipDate=r,C(this.tooltipDateFormat))i=this._df.format(r,this.tooltipDateFormat,["day","month","week","year"].indexOf(this.baseInterval.timeUnit)==-1);else{var s=this.dateFormats.getKey(this.baseInterval.timeUnit);s?i=this._df.format(r,s):i=this.getPositionLabel(t)}return this._adapterO?this._adapterO.apply("getTooltipText",i):i},e.prototype.roundPosition=function(t,i,r){var s=this.baseInterval,o=s.timeUnit,n=s.count,l=this.positionToDate(t);if(ri(l,o,n,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),i>0&&Ai(l,o,i*n,this._df.utc),r>0&&r<1&&l.setTime(l.getTime()+this.baseDuration*r),this.isInBreak(l.getTime()))for(;l.getTime()<this.max&&(Ai(l,o,n,this._df.utc),!!this.isInBreak(l.getTime())););return this.dateToPosition(l)},e.prototype.getCellStartPosition=function(t){return this.roundPosition(t,0)},e.prototype.getCellEndPosition=function(t){return this.roundPosition(t,1)},e.prototype.getSeriesDataItem=function(t,i,r){var s=this.positionToValue(i),o=.5;this.axisLetter=="Y"?o=t.dataItems.template.locations.dateY:o=t.dataItems.template.locations.dateX;var n=s-o*this.baseDuration,l=ri(new Date(s),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),h=ri(new Date(s+this.baseDuration),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);h.getTime()>l.getTime()&&Math.abs(h.getTime()-n)<Math.abs(n-l.getTime())&&(l=h);var u=t.dataItemsByAxis.getKey(this.uid),p=u.getKey(l.getTime()+t.currentDataSetId);if(!p&&r){var d;this.axisLetter=="Y"?d="dateY":d="dateX",p=t.dataItems.getIndex(t.dataItems.findClosestIndex(l.getTime(),function(c){return c[d]?c[d].getTime():-1/0},"any"))}return p},e.prototype.getPositionLabel=function(t){var i=this.positionToDate(t);return this._df.format(i,this.getCurrentLabelFormat())},e.prototype.getCurrentLabelFormat=function(){return this.dateFormats.getKey(this._gridInterval?this._gridInterval.timeUnit:"day")},e.prototype.initRenderer=function(){a.prototype.initRenderer.call(this);var t=this.renderer;t&&(t.ticks.template.location=0,t.grid.template.location=0,t.labels.template.location=0,t.baseGrid.disabled=!0)},Object.defineProperty(e.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),e.prototype.animateMinMax=function(t,i){var r=this,s=this.animate([{property:"_minAdjusted",from:this._minAdjusted,to:t},{property:"_maxAdjusted",from:this._maxAdjusted,to:i}],this.rangeChangeDuration,this.rangeChangeEasing);return s.events.on("animationprogress",function(){r.dispatch("extremeschanged")}),s},e.prototype.handleExtremesChange=function(){if(a.prototype.handleExtremesChange.call(this),this.groupData){var t=this.baseInterval.timeUnit+this.baseInterval.count;this.groupMin[t]=this._finalMin,this.groupMax[t]=this._finalMax}},e.prototype.zoomToDates=function(t,i,r,s,o){t=this._df.parse(t),i=this._df.parse(i),this.zoomToValues(t.getTime(),i.getTime(),r,s,o)},e.prototype.zoomToValues=function(t,i,r,s,o){var n=this;if(this.groupData){var u=this.adjustDifference(t,i),p=!1;i==this.max&&(p=!0);var d=!1;if(t==this.min&&(d=!0),C(u)){var c=this.mainBaseInterval,f=this.chooseInterval(0,u,this.groupCount,this.groupIntervals);(f.timeUnit==c.timeUnit&&f.count<c.count||Ee(f.timeUnit,1)<Ee(c.timeUnit,1))&&(f=Er({},c));var g=f.timeUnit+f.count,m=this.groupMin[g],y=this.groupMax[g];(!P(m)||!P(y))&&(m=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,this.series.each(function(_){var $=_.min(n),T=_.max(n);if(_._dataSets){var S=_._dataSets.getKey(f.timeUnit+f.count);if(S){var k=S.getIndex(0),A=S.getIndex(S.length-1);k&&(_.xAxis==n?$=k.dateX.getTime():_.yAxis==n&&($=k.dateY.getTime())),A&&(_.xAxis==n?T=A.dateX.getTime():_.yAxis==n&&(T=A.dateY.getTime()))}}T=ri(Ai(new Date(T),f.timeUnit,1,n._df.utc),f.timeUnit,1,n._df.firstDayOfWeek,n._df.utc,void 0,n._df.timezoneMinutes,n._df.timezone).getTime(),$<m&&(m=$),T>y&&(y=T)}),this.groupMin[g]=m,this.groupMax[g]=y),t=J(t,m,y),i=J(i,m,y),o&&(p&&(t=i-u,t=J(t,m,y)),d&&(i=t+u,i=J(i,m,y)));var l=(t-m)/(y-m),h=(i-m)/(y-m);this.zoom({start:l,end:h},r,s)}}else{var l=this.valueToPosition(t),h=this.valueToPosition(i);this.zoom({start:l,end:h},r,s)}},e.prototype.asIs=function(t){return t=="baseInterval"||a.prototype.asIs.call(this,t)},e.prototype.copyFrom=function(t){var i=this;a.prototype.copyFrom.call(this,t),this.dateFormats=t.dateFormats,this.periodChangeDateFormats=t.periodChangeDateFormats,this.groupIntervals.clear(),t.groupIntervals.each(function(r){i.groupIntervals.push(Er({},r))}),this.gridIntervals.clear(),t.gridIntervals.each(function(r){i.gridIntervals.push(Er({},r))}),t._baseInterval&&(this.baseInterval=t._baseInterval)},e.prototype.showTooltipAtPosition=function(t,i){var r=this;if(i||(t=this.toAxisPosition(t)),this.snapTooltip){var s=this.positionToDate(t),o=s.getTime(),n;if(this.series.each(function(u){if(u.baseAxis==r){var p=r.getSeriesDataItem(u,t,!0);if(p){var d=void 0;u.xAxis==r&&(d=p.dateX),u.yAxis==r&&(d=p.dateY),n?Math.abs(n.getTime()-o)>Math.abs(d.getTime()-o)&&(n=d):n=d}}}),n){var l=n.getTime();n=ri(new Date(l),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),l=n.getTime();var h=this.renderer.tooltipLocation;h==0&&(h=1e-4),n=new Date(n.getTime()+this.baseDuration*h),t=this.dateToPosition(n),this.chart.cursor&&this.chart.cursor.snapToSeries||this.series.each(function(u){var p=u.dataItemsByAxis.getKey(r.uid).getKey(l+u.currentDataSetId),d=u.showTooltipAtDataItem(p);d?r.chart._seriesPoints.push({series:u,point:d}):(u.tooltipText||u.tooltipHTML)&&u.hideTooltip()})}}a.prototype.showTooltipAtPosition.call(this,t,!0)},Object.defineProperty(e.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(t){this.setPropertyValue("snapTooltip",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupData",{get:function(){return this.getPropertyValue("groupData")},set:function(t){var i=this;this.setPropertyValue("groupData",t)&&(this.series.each(function(r){r.setDataSet(""),t&&!r.dataGrouped&&r.inited&&(r._baseInterval[i.uid]=i.mainBaseInterval,i.groupSeriesData(r))}),this._currentDataSetId="",this._groupInterval=void 0,this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupInterval",{get:function(){return this.getPropertyValue("groupInterval")},set:function(t){this.setPropertyValue("groupInterval",t)&&(this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupCount",{get:function(){return this.getPropertyValue("groupCount")},set:function(t){this.setPropertyValue("groupCount",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezoneOffset",{get:function(){return this.getPropertyValue("timezoneOffset")},set:function(t){this.setPropertyValue("timezoneOffset",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezone",{get:function(){return this.getPropertyValue("timezone")},set:function(t){this.setPropertyValue("timezone",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridInterval",{get:function(){return this._gridInterval},enumerable:!0,configurable:!0}),e.prototype.makeGap=function(t,i){var r=t.component;if(t&&i&&!r.connect&&P(r.autoGapCount)&&r.baseAxis==this){var s=t.dates["date"+this.axisLetter],o=i.dates["date"+this.axisLetter];if(s&&o){var n=s.getTime(),l=o.getTime();if(n-l>r.autoGapCount*this.baseDuration)return!0}}return!1},Object.defineProperty(e.prototype,"baseValue",{get:function(){return this.min},enumerable:!0,configurable:!0}),e.prototype._saveMinMax=function(t,i){var r=this.groupInterval;r||(r=this.mainBaseInterval);var s=r.timeUnit+r.count;this._intervalMin[s]=t,this._intervalMax[s]=i},e})(At);w.registeredClasses.DateAxis=me;w.registeredClasses.DateAxisDataItem=Cm;var Tr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="AxisRendererX",t.minGridDistance=120,t.opposite=!1,t.rotation=0,t.width=N(100),t.labels.template.horizontalCenter="middle",t.applyTheme(),t}return e.prototype.setAxis=function(t){a.prototype.setAxis.call(this,t),t.layout="vertical"},e.prototype.updateGridContainer=function(){var t=this.axis;if(t){var i=this.gridContainer;i.x=t.pixelX,i.width=t.axisLength}},e.prototype.processRenderer=function(){a.prototype.processRenderer.call(this);var t=this.axis;if(t){t.width instanceof _t||(t.width=N(100)),this.line;var i=t.title;i.rotation=0,i.align="center",this.opposite?(this.line.toFront(),i.toBack()):(i.toFront(),this.toBack(),this.line.toBack())}},e.prototype.updateTooltip=function(){var t=this.axis;if(t){var i=1e3,r=this.line.pixelX,s=this.line.pixelY,o=this.axisLength,n=i;this.opposite?this.inside||(s=-i,n=i):this.inside&&(s=-i,n=i),this.axis.updateTooltip("vertical",{x:r,y:s,width:o,height:n})}},e.prototype.updateLabelElement=function(t,i,r,s){C(s)||(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i);t.isMeasured=!t.inside;var n=0,l,h=this.gridContainer.maxHeight;this.opposite?(t.inside?(l="top",t.valign=="bottom"&&(n=h,l="bottom"),t.valign=="middle"&&(n=h/2,l="middle")):l="bottom",o.y=n):(t.inside?(l="bottom",t.valign=="top"&&(n=-h,l="top"),t.valign=="middle"&&(n=-h/2,l="middle")):l="top",o.y+=n),t.rotation==0&&(t.verticalCenter=l),this.positionItem(t,o),this.toggleVisibility(t,i,this.minLabelPosition,this.maxLabelPosition)},Object.defineProperty(e.prototype,"axisLength",{get:function(){var t=this.axis;return t.measuredWidth-t.pixelPaddingRight-t.pixelPaddingLeft||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,i){return{x:this.positionToCoordinate(t),y:0}},e.prototype.pointToPosition=function(t){return this.coordinateToPosition(t.x,t.y)},e.prototype.getPositionRangePath=function(t,i){var r=J(this.positionToCoordinate(t),0,this.axisLength),s=J(this.positionToCoordinate(i),0,this.axisLength),o=Math.abs(s-r),n=this.getHeight(),l=Math.min(r,s),h=0;return Nr({x:l,y:h,width:o,height:n},!0)},e.prototype.updateBreakElement=function(t){a.prototype.updateBreakElement.call(this,t);var i=t.startLine,r=t.endLine,s=t.fillShape,o=t.startPoint,n=t.endPoint,l=t.pixelMarginLeft,h=this.getHeight()-t.pixelMarginTop-t.pixelMarginBottom;o.x=J(o.x,-1,this.axisLength+1),n.x=J(n.x,-1,this.axisLength+1),o.x==n.x&&(o.x<0||o.x>this.axisLength)?t.fillShape.__disabled=!0:t.fillShape.__disabled=!1,i.y=l,i.width=0,i.height=h,r.y=l,r.width=0,r.height=h,s.height=h,s.width=Math.abs(n.x-o.x),s.y=l,s.x=o.x},e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);t.path=z({x:0,y:0})+V({x:0,y:this.getHeight()}),this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateTickElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i),o=t.length;s.y=ni({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.opposite?o*=t.inside?1:-1:o*=t.inside?-1:1,t.path=z({x:0,y:0})+V({x:0,y:o}),this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateAxisLine=function(){this.line.path=z({x:0,y:0})+V({x:this.axisLength,y:0})},e.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var t=this.axis,i=this.getHeight(),r=this.axisLength,s=this.baseGrid,o=t.basePoint.x;if(o<-.2||o>r+.2)s.hide(0);else{var n=ni({x:0,y:0},this.gridContainer,s.parent).y;s.path=z({x:0,y:0})+V({x:0,y:i}),s.moveTo({x:o,y:n}),s.show(0)}},e.prototype.createBreakSprites=function(t){t.startLine=new $s,t.endLine=new $s;var i=new Gh;i.setWavedSides(!1,!0,!1,!0),t.fillShape=i},e.prototype.toAxisPosition=function(t){var i=t,r=this.axis;if(r){var s=r.relativePositionSprite,o=r.pixelX;if(s?o=ni({x:this.pixelX,y:0},this.parent,s).x:s=r.parent,s){var n=o/s.innerWidth,l=r.axisLength/s.innerWidth;return(i-n)/l}}return t},e.prototype.updateBullet=function(t,i,r){var s=.5;t instanceof Gs&&(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i);o.y=ni({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.positionItem(t,o),this.toggleVisibility(t,i,0,1)},e})(io);w.registeredClasses.AxisRendererX=Tr;De.push({relevant:Fe.heightXS,state:function(a,e){if(a instanceof Tr){var t=a.states.create(e);return t.properties.inside=!0,t.properties.maxLabelPosition=.9,t.properties.minLabelPosition=.1,t}return null}});De.push({relevant:Fe.heightXXS,state:function(a,e){if(a instanceof Tr){var t=a.states.create(e);return t.properties.disabled=!0,t}return null}});var Up=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="CategoryAxisBreak",t.properties.startLocation=.5,t.properties.endLocation=.5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedStartValue,this.startLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedEndValue,this.endLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startCategory",{get:function(){return this.getPropertyValue("startCategory")},set:function(t){this.setPropertyValue("startCategory",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endCategory",{get:function(){return this.getPropertyValue("endCategory")},set:function(t){this.setPropertyValue("endCategory",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startValue",{get:function(){var t=this.getPropertyValue("startCategory");return t?this.axis.categoryToIndex(t):this.getPropertyValue("startValue")},set:function(t){this.setPropertyValue("startValue",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){var t=this.getPropertyValue("endCategory");return t?this.axis.categoryToIndex(t):this.getPropertyValue("endValue")},set:function(t){this.setPropertyValue("endValue",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(t){this.setPropertyValue("startLocation",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(t){this.setPropertyValue("endLocation",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e})(Qa);w.registeredClasses.CategoryAxisBreak=Up;var Sm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.seriesDataItems={},t.className="CategoryAxisDataItem",t.text="{category}",t.locations.category=0,t.locations.endCategory=1,t.deltaPosition=0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"category",{get:function(){return this._adapterO&&this._adapterO.isEnabled("category")?this._adapterO.apply("category",this.properties.category):this.properties.category},set:function(t){var i=this.properties.category;this.setProperty("category",t),C(i)&&i!=t&&this.component&&this.component.validateDataElement(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endCategory",{get:function(){return this.properties.endCategory},set:function(t){this.setProperty("endCategory",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"deltaPosition",{get:function(){return this.properties.deltaCoordinate},set:function(t){t!=this.properties.deltaCoordinate&&(this.setProperty("deltaCoordinate",t),this.component&&(this.component.invalidateDataItems(),this.component.invalidateSeries()))},enumerable:!0,configurable:!0}),e})(va);var Ce=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.dataItemsByCategory=new It,t.className="CategoryAxis",t.axisFieldName="category",t._lastDataItem=t.createDataItem(),t._lastDataItem.component=t,t._disposers.push(t._lastDataItem),t.applyTheme();var i=t.dataItemsByCategory;return t.addDisposer(t.mainDataSet.events.on("removed",function(r){i.removeKey(r.oldValue.category)})),t}return e.prototype.createDataItem=function(){return new Sm},e.prototype.createAxisBreak=function(){return new Up},e.prototype.processSeriesDataItem=function(t,i){a.prototype.processSeriesDataItem.call(this,t,i);var r=t["category"+this.axisLetter];if(C(r)){var s=this.dataItemsByCategory.getKey(r);if(s){var o=t.component.uid,n=s.seriesDataItems[o];n||(n=[],s.seriesDataItems[o]=n),n.push(t)}}else t.component.dataItems.remove(t)},e.prototype.validateDataRange=function(){var t=this;a.prototype.validateDataRange.call(this),E(this._series.iterator(),function(i){if(i.xAxis instanceof e&&i.yAxis instanceof e)i.invalidateDataRange();else{var r=t.positionToIndex(t.start),s=t.positionToIndex(t.end);s>=t.dataItems.length&&s--;for(var o=i.uid,n=void 0,l=void 0,h=r;h<=s;h++){var u=t.dataItems.getIndex(h);if(u){var p=u.seriesDataItems[o];if(p)for(var d=0;d<p.length;d++){var c=p[d];if(c){var f=c.index;(!P(n)||f<n)&&(n=f),(!P(l)||f>l)&&(l=f)}}}}P(n)?i.startIndex=n:i.start=t.start,P(l)?i.endIndex=l+1:i.end=t.end,t._axisBreaks&&t._axisBreaks.length>0&&i.invalidateDataRange()}})},e.prototype.validate=function(){var t=this;a.prototype.validate.call(this);var i=this.dataItems.length,r=J(Math.floor(this.start*i-1),0,i),s=J(Math.ceil(this.end*i),0,i);this.renderer.invalid&&this.renderer.validate();var o=this.renderer.axisLength/Math.max(this.renderer.minGridDistance,1/Number.MAX_SAFE_INTEGER),n=Math.min(this.dataItems.length,Math.ceil((s-r)/o));if(this._startIndex=Math.floor(r/n)*n,this._endIndex=Math.ceil(this.end*i),this.fixAxisBreaks(),this._startIndex==this._endIndex&&this._endIndex++,this._frequency=n,!(this.axisLength<=0)){this.maxZoomFactor=this.dataItems.length,this.dataItems.length<=0&&(this.maxZoomFactor=1),this.resetIterators(),r=mt(0,this._startIndex-this._frequency),s=Pt(this.dataItems.length,this._endIndex+this._frequency);for(var l=0,h=0;h<r;h++){var u=this.dataItems.getIndex(h);u.__disabled=!0}for(var h=s,p=this.dataItems.length;h<p;h++){var u=this.dataItems.getIndex(h);u.__disabled=!0}for(var h=r;h<s;h++)if(h<this.dataItems.length){var u=this.dataItems.getIndex(h);if(h/this._frequency==Math.round(h/this._frequency)){var d=this.isInBreak(h);d||(this.appendDataItem(u),this.validateDataElement(u,l)),l++}else u.__disabled=!0}if(this.appendDataItem(this._lastDataItem),this.validateDataElement(this._lastDataItem,l+1,this.dataItems.length),this._axisBreaks){var c=this._axisBreaks;c.each(function(f){var g=f.adjustedStartValue,m=f.adjustedEndValue;if(Wn({start:g,end:m},{start:t._startIndex,end:t._endIndex})){for(var y=g;y<=m;y++){var v=t.dataItems.getIndex(y);v.__disabled=!0}var x=J(Math.ceil(t._frequency/f.breakSize),1,m-g),_=0;if(f.breakSize>0)for(var y=g;y<=m;y=y+x){var v=t.dataItems.getIndex(y);v.__disabled=!1,t.appendDataItem(v),t.validateDataElement(v,_),_++}}})}this.validateBreaks(),this.validateAxisRanges(),this.ghostLabel.invalidate(),this.renderer.invalidateLayout()}},e.prototype.validateDataElement=function(t,i,r){a.prototype.validateDataElement.call(this,t),t.itemIndex=this._axisItemCount,this._axisItemCount++;var s=this.renderer;P(r)||(r=this.categoryToIndex(t.category));var o=this.categoryToIndex(t.endCategory);P(o)||(o=r);var n=this.indexToPosition(r,t.locations.category),l=this.indexToPosition(o,t.locations.endCategory);t.position=n;var h,u,p;t.isRange&&(h=o,u=this.indexToPosition(r,t.locations.category),p=this.indexToPosition(h,t.locations.endCategory)),t.point=s.positionToPoint(n);var d=t.tick;d&&!d.disabled&&s.updateTickElement(d,n,l);var c=t.grid;c&&!c.disabled&&s.updateGridElement(c,n,l);var f=t.label;f&&!f.disabled&&((!t.isRange||f.text==null)&&(t.text=t.text),s.updateLabelElement(f,n,l),(s instanceof Ni&&t.label.measuredWidth>this.ghostLabel.measuredWidth||s instanceof Tr&&t.label.measuredHeight>this.ghostLabel.measuredHeight)&&(t.label.html?this.ghostLabel.html=t.label.currentText:this.ghostLabel.text=t.label.currentText));var g=t.axisFill;g&&!g.disabled&&(t.isRange||(h=r+this._frequency,u=this.indexToPosition(r,g.location),p=this.indexToPosition(h,g.location)),s.updateFillElement(g,u,p),t.isRange||this.fillRule(t,i)),t.bullet&&s.updateBullet(t.bullet,n,l);var m=t.mask;m&&s.updateFillElement(m,u,p)},e.prototype.disposeData=function(){this.dataItemsByCategory.clear(),a.prototype.disposeData.call(this)},e.prototype.processDataItem=function(t,i){t&&(a.prototype.processDataItem.call(this,t,i),C(t.category)&&this.dataItemsByCategory.setKey(t.category,t))},e.prototype.getDataItem=function(t){var i=t[this.dataFields.category];if(C(i)){var r=this.dataItemsByCategory.getKey(i);return r||this.dataItems.create()}},e.prototype.indexToPosition=function(t,i){P(i)||(i=.5);var r=this.startIndex,s=this.endIndex,o=this.adjustDifference(r,s),n=this.startLocation,l=this.endLocation;if(o-=n,o-=1-l,this._axisBreaks){var h=this._axisBreaks;ii(h.iterator(),function(d){var c=d.adjustedStartValue,f=d.adjustedEndValue;if(t<r||!P(c)||!P(f))return!1;if(Wn({start:c,end:f},{start:r,end:s})){c=Math.max(r,c),f=Math.min(s,f);var g=d.breakSize;t>f?r+=(f-c)*(1-g):t<c||(t=c+(t-c)*g)}return!0})}var u=0,p=this.dataItems.getIndex(t);return p&&(u=p.deltaPosition),H(u+(t+i-n-r)/o,5)},e.prototype.categoryToPosition=function(t,i){var r=this.categoryToIndex(t);return this.indexToPosition(r,i)},e.prototype.categoryToPoint=function(t,i){var r=this.categoryToPosition(t,i),s=this.renderer.positionToPoint(r),o=this.renderer.positionToAngle(r);return{x:s.x,y:s.y,angle:o}},e.prototype.anyToPoint=function(t,i){return this.categoryToPoint(t,i)},e.prototype.anyToPosition=function(t,i){return this.categoryToPosition(t,i)},e.prototype.categoryToIndex=function(t){if(C(t)){var i=this.dataItemsByCategory.getKey(t);if(i)return i.index}},e.prototype.zoomToCategories=function(t,i){this.zoomToIndexes(this.categoryToIndex(t),this.categoryToIndex(i)+1)},e.prototype.getAnyRangePath=function(t,i,r,s){var o=this.categoryToPosition(t,r),n=this.categoryToPosition(i,s);return this.getPositionRangePath(o,n)},e.prototype.roundPosition=function(t,i){var r=this.positionToIndex(t);return this.indexToPosition(r,i)},e.prototype.getFirstSeriesDataItem=function(t,i){for(var r=0;r<t.dataItems.length;r++){var s=t.dataItems.getIndex(r);if(t.xAxis==this&&s.categoryX==i||t.yAxis==this&&s.categoryY==i)return s}},e.prototype.getLastSeriesDataItem=function(t,i){for(var r=t.dataItems.length-1;r>=0;r--){var s=t.dataItems.getIndex(r);if(t.xAxis==this&&s.categoryX==i||t.yAxis==this&&s.categoryY==i)return s}},e.prototype.getSeriesDataItemByCategory=function(t,i){var r=this,s;return i.dataItems.each(function(o){i.xAxis==r?o.categoryX==t&&(s=o):i.yAxis==r&&o.categoryY==t&&(s=o)}),s},e.prototype.getSeriesDataItem=function(t,i,r){var s=this;if(P(i)){var o=this.positionToIndex(i);o>=this.dataItems.length&&o--;var n=this.dataItems.getIndex(o);if(n){var l=n.category,h,u=t.dataItems.getIndex(o);return u&&(t.xAxis==this&&u.categoryX==l||t.yAxis==this&&u.categoryY==l)?u:(t.dataItems.each(function(p){t.xAxis==s&&p.categoryX==l&&(h||(h=p),Math.abs(o-h.index)>Math.abs(o-p.index)&&(h=p)),t.yAxis==s&&p.categoryY==l&&(h||(h=p),Math.abs(o-h.index)>Math.abs(o-p.index)&&(h=p))}),h)}}},e.prototype.getX=function(t,i,r,s,o){var n=this.getPositionX(t,i,r,s,o);return Ke(n)?this.basePoint.x:this.renderer.positionToPoint(n).x},e.prototype.getPositionX=function(t,i,r,s,o){var n;return C(i)&&(n=this.categoryToPosition(t.categories[i],r)),o&&(n=J(n,o.start,o.end)),n},e.prototype.getY=function(t,i,r,s,o){var n=this.getPositionY(t,i,r,s,o);return Ke(n)?this.basePoint.y:this.renderer.positionToPoint(n).y},e.prototype.getPositionY=function(t,i,r,s,o){var n;return C(i)&&(n=this.categoryToPosition(t.categories[i],r)),o&&(n=J(n,o.start,o.end)),n},e.prototype.getAngle=function(t,i,r,s,o){var n=this.categoryToPosition(t.categories[i],r);return o&&(n=J(n,o.start,o.end)),this.positionToAngle(n)},e.prototype.getCellStartPosition=function(t){return this.roundPosition(t,0)},e.prototype.getCellEndPosition=function(t){return this.roundPosition(t,1)},e.prototype.getTooltipText=function(t){var i=this.dataItems.getIndex(this.positionToIndex(t));if(i)return this.tooltipDataItem=i,this.tooltip.dataItem=i,this.tooltipText?this.tooltipText:this._adapterO?this._adapterO.apply("getTooltipText",i.category):i.category},e.prototype.positionToIndex=function(t){t=H(t,10),t<0&&(t=0),t>1&&(t=1);var i=this.startIndex,r=this.endIndex,s=r-i-this.startLocation-(1-this.endLocation);t+=1/s*this.startLocation;var o=null;if(this._axisBreaks){var n=this._axisBreaks;ii(n.iterator(),function(l){var h=l.startPosition,u=l.endPosition,p=l.adjustedStartValue,d=l.adjustedEndValue;p=mt(p,i),d=Pt(d,r);var c=l.breakSize;if(s-=(d-p)*(1-c),t>u)i+=(d-p)*(1-c);else if(!(t<h)){var f=(t-h)/(u-h);return o=p+Math.round(f*(d-p)),!1}return!0})}return P(o)||(o=Math.floor(t*s+i)),o>=this.dataItems.length&&(o=this.dataItems.length-1),o},e.prototype.positionToCategory=function(t){return this.getPositionLabel(t)},e.prototype.getPositionLabel=function(t){var i=this.dataItems.getIndex(this.positionToIndex(t));if(i)return i.category},Object.defineProperty(e.prototype,"basePoint",{get:function(){return this.renderer.positionToPoint(1)},enumerable:!0,configurable:!0}),e.prototype.initRenderer=function(){a.prototype.initRenderer.call(this);var t=this.renderer;t.baseGrid.disabled=!0},Object.defineProperty(e.prototype,"frequency",{get:function(){return this._frequency},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBySeries",{get:function(){return this.getPropertyValue("sortBySeries")},set:function(t){this.setPropertyValue("sortBySeries",t,!0)},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){t&&C(t.sortBySeries)&&vt(t.sortBySeries)&&(this.map.hasKey(t.sortBySeries)?t.sortBySeries=this.map.getKey(t.sortBySeries):(this.addDelayedMap("sortBySeries",t.sortBySeries),delete t.sortBySeries)),a.prototype.processConfig.call(this,t)},e})(an);w.registeredClasses.CategoryAxis=Ce;w.registeredClasses.CategoryAxisDataItem=Sm;var Kp=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="ZoomOutButton",t.padding(9,9,9,9),t.showSystemTooltip=!0;var i=new ct,r=t.background;r.cornerRadius(20,20,20,20),r.fill=i.getFor("primaryButton"),r.stroke=i.getFor("primaryButtonStroke"),r.strokeOpacity=0,r.states.getKey("hover").properties.fill=i.getFor("primaryButtonHover"),r.states.getKey("down").properties.fill=i.getFor("primaryButtonActive");var s=new rt;s.element=t.paper.add("path");var o=z({x:0,y:0});return o+=V({x:11,y:0}),s.path=o,s.pixelPerfect=!0,s.padding(8,3,8,3),s.stroke=i.getFor("primaryButtonText"),t.icon=s,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Zoom Out"))},e})(rr);w.registeredClasses.ZoomOutButton=Kp;var nn=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="DesaturateFilter",t.feColorMatrix=t.paper.add("feColorMatrix"),t.feColorMatrix.attr({type:"saturate"}),t.filterPrimitives.push(t.feColorMatrix),t.width=120,t.height=120,t.saturation=0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"saturation",{get:function(){return this.properties.saturation},set:function(t){this.properties.saturation=t,this.feColorMatrix.attr({values:t.toString()})},enumerable:!0,configurable:!0}),e})(Br);w.registeredClasses.DesaturateFilter=nn;var ba=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._chart=new ce,t.className="XYChartScrollbar";var i=new ct;t.padding(0,0,0,0);var r=t.createChild(sr);if(r.shouldClone=!1,r.margin(0,0,0,0),r.padding(0,0,0,0),r.interactionsEnabled=!1,t._scrollbarChart=r,!Bs()){var s=new nn;s.filterUnits="userSpaceOnUse",r.plotContainer.filters.push(s)}t._disposers.push(t._scrollbarChart),t.minHeight=60,t.minWidth=60;var o=t.createChild(rt);o.shouldClone=!1,o.setElement(t.paper.add("path")),o.fill=i.getFor("background"),o.fillOpacity=.8,o.interactionsEnabled=!1,o.isMeasured=!1,o.toBack(),t._unselectedOverlay=o,t._disposers.push(t._unselectedOverlay),r.toBack(),t.background.cornerRadius(0,0,0,0);var n=t.thumb.background;n.cornerRadius(0,0,0,0),n.fillOpacity=0,n.fill=i.getFor("background");var l=n.states.getKey("hover");l&&(l.properties.fillOpacity=.2);var h=n.states.getKey("down");return h&&(h.properties.fillOpacity=.4),t._disposers.push(t._chart),t.applyTheme(),t}return Object.defineProperty(e.prototype,"series",{get:function(){return this._series||(this._series=new wt,this._disposers.push(this._series.events.on("inserted",this.handleSeriesAdded,this,!1)),this._disposers.push(this._series.events.on("removed",this.handleSeriesRemoved,this,!1))),this._series},enumerable:!0,configurable:!0}),e.prototype.handleSeriesAdded=function(t){var i=this,r=t.newValue;if(!(!r.xAxis||!r.yAxis)){var s=this.scrollbarChart;s.zoomOutButton.disabled=!0,this.chart=r.chart,s.dateFormatter.inputDateFormat=this.chart.dateFormatter.inputDateFormat,s.language.locale=this.chart.language.locale;var o=!0,n=!0;E(this.series.iterator(),function(x){x!=r&&(x.xAxis==r.xAxis&&i.scrollbarChart.xAxes.length>0&&(o=!1),x.yAxis==r.yAxis&&i.scrollbarChart.yAxes.length>0&&(n=!1))}),r.events.on("beforedisposed",function(){i.series.removeValue(r)});var l=new ct,h=r.clone();if(($t.onlyShowOnViewport||$t.queue)&&this.addDisposer(this.chart.events.on("removedfromqueue",function(){s.invalidateData()})),Bs()&&(h.stroke=nt("#aaaaaa"),h.fill=h.stroke,h.propertyFields.fill=void 0,h.propertyFields.stroke=void 0),r.scrollbarSeries=h,o){var u=r.xAxis.clone();s.xAxes.moveValue(u),u.title.disabled=!0,u.rangeChangeDuration=0;var p=u.renderer;p.ticks.template.disabled=!0,p.inside=!0,p.labels.template.inside=!0,p.line.strokeOpacity=0,p.minLabelPosition=.02,p.maxLabelPosition=.98,p.line.disabled=!0,p.axisFills.template.disabled=!0,p.baseGrid.disabled=!0,p.grid.template.strokeOpacity=.05,p.minWidth=void 0,p.minHeight=void 0,p.padding(0,0,0,0),p.chart=s,p.margin(0,0,0,0),u.width=N(100);var d=p.labels.template;if(d.fillOpacity=.5,u.maxZoomCount=void 0,u.minZoomCount=void 0,u instanceof me){var c=u,f=r.xAxis;c.groupCount=f.groupCount*5,c.min=void 0,c.max=void 0,this._disposers.push(c.clonedFrom.events.on("extremeschanged",function(){P(c.clonedFrom.minDefined)&&(c.min=c.clonedFrom.minDefined),P(c.clonedFrom.maxDefined)&&(c.max=c.clonedFrom.maxDefined)},void 0,!1))}else if(u instanceof At){var g=u;g.min=void 0,g.max=void 0,P(g.clonedFrom.minDefined)||(g.min=void 0),P(g.clonedFrom.maxDefined)||(g.max=void 0),this._disposers.push(g.clonedFrom.events.on("extremeschanged",function(){P(g.clonedFrom.minDefined)&&(g.min=g.clonedFrom.min),P(g.clonedFrom.maxDefined)&&(g.max=g.clonedFrom.max)},void 0,!1))}h.xAxis=u}else this.scrollbarChart.xAxes.each(function(x){x.clonedFrom==r.xAxis&&(h.xAxis=x)});if(n){var m=r.yAxis.clone();s.yAxes.moveValue(m),m.title.disabled=!0,m.rangeChangeDuration=0;var p=m.renderer;p.ticks.template.disabled=!0,p.inside=!0,p.labels.template.inside=!0,p.line.strokeOpacity=0,p.minLabelPosition=.02,p.maxLabelPosition=.98,p.line.disabled=!0,p.axisFills.template.disabled=!0,p.grid.template.stroke=l.getFor("background"),p.baseGrid.disabled=!0,p.grid.template.strokeOpacity=.05,p.minWidth=void 0,p.minHeight=void 0,p.chart=s,p.padding(0,0,0,0),p.margin(0,0,0,0),m.height=N(100);var d=p.labels.template;if(d.fillOpacity=.5,h.yAxis=m,m.maxZoomCount=void 0,m.minZoomCount=void 0,m instanceof me){var y=m;y.min=void 0,y.max=void 0;var f=r.yAxis;m.groupCount=f.groupCount*5,this._disposers.push(y.clonedFrom.events.on("extremeschanged",function(){P(y.clonedFrom.minDefined)&&(y.min=y.clonedFrom.minDefined),P(y.clonedFrom.maxDefined)&&(y.max=y.clonedFrom.maxDefined)}))}else if(m instanceof At){var v=m;v.min=void 0,v.max=void 0,P(v.clonedFrom.minDefined)||(v.min=void 0),P(v.clonedFrom.maxDefined)||(v.max=void 0),this._disposers.push(v.clonedFrom.events.on("extremeschanged",function(){P(v.clonedFrom.minDefined)&&(v.min=v.clonedFrom.minDefined),P(v.clonedFrom.maxDefined)&&(v.max=v.clonedFrom.maxDefined)}))}}else this.scrollbarChart.yAxes.each(function(x){x.clonedFrom==r.yAxis&&(h.yAxis=x)});h.rangeChangeDuration=0,h.interpolationDuration=0,h.defaultState.transitionDuration=0,h.showOnInit=!1,this._disposers.push(h.events.on("validated",this.zoomOutAxes,this,!1)),this._disposers.push(r.events.on("datavalidated",function(){h.data!=r.data&&(h.data=r.data)},void 0,!1)),h.defaultState.properties.visible=!0,s.series.push(h),this.updateByOrientation()}},e.prototype.updateByOrientation=function(){var t=this;this._scrollbarChart&&(E(this._scrollbarChart.xAxes.iterator(),function(i){var r=i.renderer;t.orientation=="vertical"?(r.grid.template.disabled=!0,r.labels.template.disabled=!0,r.minGridDistance=10):(r.grid.template.disabled=!1,r.labels.template.disabled=!1,r.minGridDistance=i.clonedFrom.renderer.minGridDistance)}),E(this._scrollbarChart.yAxes.iterator(),function(i){var r=i.renderer;t.orientation=="horizontal"?(r.grid.template.disabled=!0,r.labels.template.disabled=!0,r.minGridDistance=10):(r.grid.template.disabled=!1,r.labels.template.disabled=!1,r.minGridDistance=i.clonedFrom.renderer.minGridDistance)}))},e.prototype.handleSeriesRemoved=function(t){var i=t.oldValue,r=this.scrollbarChart;r.series.each(function(s){s&&s.clonedFrom==i&&r.series.removeValue(s)}),r.series.length==0&&(r.xAxes.clear(),r.yAxes.clear());try{i.events.off("validated",this.zoomOutAxes,this)}catch{}},Object.defineProperty(e.prototype,"scrollbarChart",{get:function(){return this._scrollbarChart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){this._chart.get()!==t&&(this._chart.set(t,t.events.on("datavalidated",this.handleDataChanged,this,!1)),this.handleDataChanged(),this._scrollbarChart.dataProvider=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unselectedOverlay",{get:function(){return this._unselectedOverlay},enumerable:!0,configurable:!0}),e.prototype.handleDataChanged=function(){this.chart.data!=this.scrollbarChart.data?this.scrollbarChart.data=this.chart.data:this.scrollbarChart.invalidateRawData()},e.prototype.zoomOutAxes=function(){var t=this.scrollbarChart;E(t.xAxes.iterator(),function(i){i.zoom({start:0,end:1},!0,!0)}),E(t.yAxes.iterator(),function(i){i.zoom({start:0,end:1},!0,!0)})},e.prototype.updateThumb=function(t){if(t===void 0&&(t=!0),a.prototype.updateThumb.call(this,t),this._unselectedOverlay){var i=this.thumb,r=i.pixelX||0,s=i.pixelY||0,o=i.pixelWidth||0,n=i.pixelHeight||0,l="";this.orientation=="horizontal"?(l=Nr({x:-1,y:0,width:r,height:n}),l+=Nr({x:r+o,y:0,width:(this.pixelWidth||0)-r-o,height:n})):(l=Nr({x:0,y:0,width:o,height:s}),l+=Nr({x:0,y:s+n,width:o,height:(this.pixelHeight||0)-s-n})),this._unselectedOverlay.path=l}},e.prototype.processConfig=function(t){if(t&&C(t.series)&&oe(t.series))for(var i=0,r=t.series.length;i<r;i++){var s=t.series[i];if(C(s)&&vt(s))if(this.map.hasKey(s))t.series[i]=this.map.getKey(s);else throw Error("XYChartScrollbar error: Series with id `"+s+"` does not exist.")}a.prototype.processConfig.call(this,t)},e})(Za);w.registeredClasses.XYChartScrollbar=ba;var ln=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="XYChartDataItem",t.applyTheme(),t}return e})(Wh);var sr=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._axisRendererX=Tr,t._axisRendererY=Ni,t._seriesPoints=[],t.className="XYChart",t.maskBullets=!0,t.arrangeTooltips=!0;var i=t.chartContainer;i.layout="vertical",t.padding(15,15,15,15);var r=i.createChild(Q);r.shouldClone=!1,r.layout="vertical",r.width=N(100),r.zIndex=1,t.topAxesContainer=r;var s=i.createChild(Q);s.shouldClone=!1,s.layout="horizontal",s.width=N(100),s.height=N(100),s.zIndex=0,t.yAxesAndPlotContainer=s;var o=i.createChild(Q);o.shouldClone=!1,o.width=N(100),o.layout="vertical",o.zIndex=1,t.bottomAxesContainer=o;var n=s.createChild(Q);n.shouldClone=!1,n.layout="horizontal",n.height=N(100),n.contentAlign="right",n.events.on("transformed",t.updateXAxesMargins,t,!1),n.zIndex=1,t.leftAxesContainer=n;var l=s.createChild(Q);l.shouldClone=!1,l.height=N(100),l.width=N(100),l.background.fillOpacity=0,t.plotContainer=l,t.mouseWheelBehavior="none",t._cursorContainer=l;var h=s.createChild(Q);h.shouldClone=!1,h.layout="horizontal",h.height=N(100),h.zIndex=1,h.events.on("transformed",t.updateXAxesMargins,t,!1),t.rightAxesContainer=h,t.seriesContainer.parent=l,t.bulletsContainer.parent=l;var u=l.createChild(Kp);u.shouldClone=!1,u.align="right",u.valign="top",u.zIndex=Number.MAX_SAFE_INTEGER,u.marginTop=5,u.marginRight=5,u.hide(0),t.zoomOutButton=u;var p=t.plotContainer.createChild(Q);return p.shouldClone=!1,p.width=N(100),p.height=N(100),p.isMeasured=!1,p.zIndex=4,p.layout="none",t.axisBulletsContainer=p,t._bulletMask=t.plotContainer,t.events.on("beforedatavalidated",function(){t.series.each(function(d){d.dataGrouped=!1,d._baseInterval={}})},t,!1),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),this.zoomOutButton.exportable=!1,C(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y chart"))},e.prototype.draw=function(){a.prototype.draw.call(this),this.seriesContainer.toFront(),this.bulletsContainer.toFront(),this.maskBullets&&(this.bulletsContainer.mask=this._bulletMask),this.updateSeriesLegend()},e.prototype.updatePlotElements=function(){E(this.series.iterator(),function(t){t.invalidate()})},e.prototype.validateData=function(){this._parseDataFrom==0&&(E(this.xAxes.iterator(),function(t){t.dataChangeUpdate()}),E(this.yAxes.iterator(),function(t){t.dataChangeUpdate()}),E(this.series.iterator(),function(t){t.dataChangeUpdate()})),a.prototype.validateData.call(this)},e.prototype.updateXAxesMargins=function(){var t=this.leftAxesContainer.measuredWidth,i=this.rightAxesContainer.measuredWidth,r=this.bottomAxesContainer;(r.paddingLeft!=t||r.paddingRight!=i)&&(r.paddingLeft=t,r.paddingRight=i);var s=this.topAxesContainer;(s.paddingLeft!=t||s.paddingRight!=i)&&(s.paddingLeft=t,s.paddingRight=i)},e.prototype.reinit=function(){a.prototype.reinit.call(this),this.series.each(function(t){t.appeared=!1})},e.prototype.handleXAxisChange=function(t){this.updateXAxis(t.target)},e.prototype.handleYAxisChange=function(t){this.updateYAxis(t.target)},e.prototype.processXAxis=function(t){var i=t.newValue;i.chart=this,i.renderer||(i.renderer=new this._axisRendererX,i.renderer.observe(["opposite","inside","inversed","minGridDistance"],this.handleXAxisChange,this,!1)),i.axisLetter="X",i.events.on("startendchanged",this.handleXAxisRangeChange,this,!1),i.dataProvider=this,this.updateXAxis(i.renderer),this.processAxis(i)},e.prototype.processYAxis=function(t){var i=t.newValue;i.chart=this,i.renderer||(i.renderer=new this._axisRendererY,i.renderer.observe(["opposite","inside","inversed","minGridDistance"],this.handleYAxisChange,this,!1)),i.axisLetter="Y",i.events.on("startendchanged",this.handleYAxisRangeChange,this,!1),i.dataProvider=this,this.updateYAxis(i.renderer),this.processAxis(i)},e.prototype.handleXAxisRangeChange=function(){var t=this.getCommonAxisRange(this.xAxes);this.scrollbarX&&this.zoomAxes(this.xAxes,t,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarX,t)},e.prototype.toggleZoomOutButton=function(){if(this.zoomOutButton){var t=!1;ii(this.xAxes.iterator(),function(i){if(i.toggleZoomOutButton){if(i.maxZoomCount>0){var r=i.maxZoomFactor/i.maxZoomCount;if(H(i.end-i.start,3)<1/r)return t=!0,!1}else if(H(i.start,3)>0||H(i.end,3)<1)return t=!0,!1}return!0}),ii(this.yAxes.iterator(),function(i){if(i.toggleZoomOutButton){if(i.maxZoomCount>0){var r=i.maxZoomFactor/i.maxZoomCount;if(H(i.end-i.start,3)<1/r)return t=!0,!1}else if(H(i.start,3)>0||H(i.end,3)<1)return t=!0,!1;return!0}}),this.seriesAppeared||(t=!1),t?this.zoomOutButton.show():this.zoomOutButton.hide()}},e.prototype.seriesAppeared=function(){var t=!1;return E(this.series.iterator(),function(i){if(!i.appeared)return t=!1,!1}),t},e.prototype.handleYAxisRangeChange=function(){var t=this.getCommonAxisRange(this.yAxes);this.scrollbarY&&this.zoomAxes(this.yAxes,t,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarY,t)},e.prototype.updateScrollbar=function(t,i){t&&(t.skipRangeEvents(),t.start=i.start,t.end=i.end)},e.prototype.getCommonAxisRange=function(t){var i,r;return t.each(function(s){if(!(!s.zoomable||s instanceof At&&s.syncWithAxis)){var o=s.start,n=s.end;s.renderer.inversed&&(o=1-s.end,n=1-s.start),(!P(i)||o<i)&&(i=o),(!P(r)||n>r)&&(r=n)}}),{start:i,end:r}},e.prototype.updateXAxis=function(t){var i=t.axis;t.opposite?(i.parent=this.topAxesContainer,i.toFront()):(i.parent=this.bottomAxesContainer,i.toBack()),i.renderer&&i.renderer.processRenderer()},e.prototype.updateYAxis=function(t){var i=t.axis;t.opposite?(i.parent=this.rightAxesContainer,i.toBack()):(i.parent=this.leftAxesContainer,i.toFront()),i.renderer&&i.renderer.processRenderer()},e.prototype.processAxis=function(t){var i=this;t instanceof Ce&&this._dataUsers.moveValue(t);var r=t.renderer;r.gridContainer.parent=this.plotContainer,r.gridContainer.toBack(),r.breakContainer.parent=this.plotContainer,r.breakContainer.toFront(),r.breakContainer.zIndex=10,t.addDisposer(new Lt(function(){i.dataUsers.removeValue(t)})),r.bulletsContainer.parent=this.axisBulletsContainer,this._disposers.push(t.events.on("positionchanged",function(){var s=ni({x:0,y:0},t,i.axisBulletsContainer);t.renderer instanceof Ni&&(r.bulletsContainer.y=s.y),t.renderer instanceof Tr&&(r.bulletsContainer.x=s.x)},void 0,!1)),this.plotContainer.events.on("maxsizechanged",function(){i.inited&&(t.invalidateDataItems(),i.updateSeriesMasks())},t,!1)},e.prototype.updateSeriesMasks=function(){Bs()&&this.series.each(function(t){var i=t.mainContainer.mask;t.mainContainer.mask=void 0,t.mainContainer.mask=i})},e.prototype.handleSeriesRemoved=function(t){var i=t.oldValue;i&&(i.xAxis&&(i.xAxis.series.removeValue(i),i.xAxis.invalidateProcessedData()),i.yAxis&&(i.yAxis.series.removeValue(i),i.yAxis.invalidateProcessedData()),this.series.each(function(r){r.resetExtremes()})),a.prototype.handleSeriesRemoved.call(this,t)},Object.defineProperty(e.prototype,"xAxes",{get:function(){return this._xAxes||(this._xAxes=new wt,this._xAxes.events.on("inserted",this.processXAxis,this,!1),this._xAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new Ft(this._xAxes,!1))),this._xAxes},enumerable:!0,configurable:!0}),e.prototype.handleAxisRemoval=function(t){var i=t.oldValue;this.dataUsers.removeValue(i),i.autoDispose&&i.dispose()},Object.defineProperty(e.prototype,"yAxes",{get:function(){return this._yAxes||(this._yAxes=new wt,this._yAxes.events.on("inserted",this.processYAxis,this,!1),this._yAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new Ft(this._yAxes,!1))),this._yAxes},enumerable:!0,configurable:!0}),e.prototype.handleSeriesAdded=function(t){try{a.prototype.handleSeriesAdded.call(this,t);var i=t.newValue;(this.xAxes.length==0||this.yAxes.length==0)&&(w.removeFromInvalidComponents(i),i.dataInvalid=!1),i.xAxis,i.yAxis,i.maskBullets=i.maskBullets,i.fill==null&&(this.patterns?(C(i.stroke)||(i.stroke=this.colors.next()),i.fill=this.patterns.next(),C(i.fillOpacity)&&(i.fill.backgroundOpacity=i.fillOpacity),i.stroke instanceof Dt&&(i.fill.stroke=i.stroke,i.fill.fill=i.stroke)):i.fill=this.colors.next()),C(i.stroke)||(i.stroke=i.fill)}catch(r){this.raiseCriticalError(r)}},Object.defineProperty(e.prototype,"cursor",{get:function(){return this._cursor},set:function(t){this._cursor!=t&&(this._cursor&&this.removeDispose(this._cursor),this._cursor=t,t&&(this._disposers.push(t),t.chart=this,t.shouldClone=!1,t.parent=this._cursorContainer,t.events.on("cursorpositionchanged",this.handleCursorPositionChange,this,!1),t.events.on("zoomstarted",this.handleCursorZoomStart,this,!1),t.events.on("zoomended",this.handleCursorZoomEnd,this,!1),t.events.on("panstarted",this.handleCursorPanStart,this,!1),t.events.on("panning",this.handleCursorPanning,this,!1),t.events.on("panended",this.handleCursorPanEnd,this,!1),t.events.on("behaviorcanceled",this.handleCursorCanceled,this,!1),t.events.on("hidden",this.handleHideCursor,this,!1),t.zIndex=Number.MAX_SAFE_INTEGER-1,this.tapToActivate&&this.setTapToActivate(this.tapToActivate)))},enumerable:!0,configurable:!0}),e.prototype.handleCursorPositionChange=function(){var t=this.cursor;if(t.visible&&!t.isHiding){var i=this.cursor.xPosition,r=this.cursor.yPosition;this.showSeriesTooltip({x:i,y:r});var s=[],o=t.snapToSeries;if(o&&!t.downPoint){o instanceof es&&(o=[o]);var n=[];W(o,function(h){if(!h.isHidden&&!h.isHiding){var u=h.xAxis,p=h.yAxis;u instanceof At&&!(u instanceof me)&&p instanceof At&&!(p instanceof me)?(h.dataItems.each(function(d){n.push(d)}),Qi(s,h.yAxis),Qi(s,h.xAxis)):(h.baseAxis==h.xAxis&&(Qi(s,h.yAxis),n.push(u.getSeriesDataItem(h,u.toAxisPosition(i),!0))),h.baseAxis==h.yAxis&&(Qi(s,h.xAxis),n.push(p.getSeriesDataItem(h,p.toAxisPosition(r),!0))))}});var l=this.getClosest(n,i,r);l&&(this.series.each(function(h){var u=l.component;h!=u&&(h.hideTooltip(),h.xAxis!=u.xAxis&&(h.xAxis.hideTooltip(),s.push(h.xAxis)),h.yAxis!=u.yAxis&&(h.yAxis.hideTooltip(),s.push(h.yAxis)))}),l.component.showTooltipAtDataItem(l),t.handleSnap(l.component))}this._seriesPoints=[],this._cursorXPosition!=i&&this.showAxisTooltip(this.xAxes,i,s),this._cursorYPosition!=r&&this.showAxisTooltip(this.yAxes,r,s),this.arrangeTooltips&&this.sortSeriesTooltips(this._seriesPoints),this.legend&&this.legend.afterDraw()}},e.prototype.getClosest=function(t,i,r){var s=1/0,o;return qn(t,function(n){if(n){var l=n.component.xAxis,h=n.component.yAxis,u=l.positionToCoordinate(l.toGlobalPosition(l.toAxisPosition(i))),p=h.positionToCoordinate(h.toGlobalPosition(h.toAxisPosition(r))),d=n.component.xField,c=n.component.yField;if(l instanceof At&&!P(n.getValue(d))||h instanceof At&&!P(n.getValue(c)))return!0;var f=l.positionToCoordinate(l.toGlobalPosition(l.getPositionX(n,d,n.locations[d],"valueX"))),g=h.positionToCoordinate(h.toGlobalPosition(h.getPositionY(n,c,n.locations[c],"valueY"))),m=Math.sqrt(Math.pow(u-f,2)+Math.pow(p-g,2));return m<s&&(s=m,o=n),!0}}),o},e.prototype.handleHideCursor=function(){this.hideObjectTooltip(this.xAxes),this.hideObjectTooltip(this.yAxes),this.hideObjectTooltip(this.series),this._cursorXPosition=void 0,this._cursorYPosition=void 0,this.updateSeriesLegend()},e.prototype.updateSeriesLegend=function(){E(this.series.iterator(),function(t){t.updateLegendValue()})},e.prototype.hideObjectTooltip=function(t){E(t.iterator(),function(i){i.cursorTooltipEnabled&&i.hideTooltip(0)})},e.prototype.showSeriesTooltip=function(t){var i=this;if(!t){this.series.each(function(s){s.hideTooltip()});return}var r=[];this.series.each(function(s){if(!(s.xAxis instanceof me&&s.xAxis.snapTooltip||s.yAxis instanceof me&&s.yAxis.snapTooltip)){var o=s.showTooltipAtPosition(t.x,t.y);o&&(s.tooltip.setBounds(qo({x:0,y:0,width:i.pixelWidth,height:i.pixelHeight},i)),r.push({series:s,point:o}))}}),this.arrangeTooltips&&this.sortSeriesTooltips(r)},e.prototype.sortSeriesTooltips=function(t){if(t.length>0){var i=this.cursor;if(i&&P(i.maxTooltipDistance)){var r=Xi({x:i.point.x,y:i.point.y},i),s,o,n=1/0;W(t,function(O){var I=O.series,R=O.point;if(R){var B={x:R.x,y:R.y},Z=Math.abs(Mt(B,r));Z<n&&(o=B,n=Z,s=I)}});var l=[];s&&(W(t,function(O){if(Math.abs(Mt(O.point,o))<=Math.abs(i.maxTooltipDistance))l.push({series:O.series,point:O.point});else{var I=O.series.tooltipDataItem;I&&W(I.sprites,function(R){R.isHover=!1,R.handleOutReal()}),O.series.hideTooltip(0)}}),i.maxTooltipDistance<0&&(l.length>0&&W(l,function(O){s!=O.series&&O.series.hideTooltip(0)}),l=[{series:s,point:o}])),t=l}var h=Xi({x:-.5,y:-.5},this.plotContainer),u=Xi({x:this.plotContainer.pixelWidth+.5,y:this.plotContainer.pixelHeight+.5},this.plotContainer),p=0,d=[];W(t,function(O){var I=O.point;I&&fp(I,{x:h.x,y:h.y,width:u.x-h.x,height:u.y-h.y})&&(d.push({point:I,series:O.series}),p+=I.y)}),t=d;var c=this.series.getIndex(0),f=!1;c&&c.yAxis&&c.yAxis.renderer.inversed&&(f=!0),f?t.sort(function(O,I){return cr(O.point.y,I.point.y)}):(t.sort(function(O,I){return cr(I.point.y,O.point.y)}),t.reverse());var g=p/t.length,m=Dp({x:0,y:0},this.svgContainer.SVGContainer).y;if(t.length>0){var y=h.y,v=u.y;ll({x:0,y},this);var x=!1;if(g>y+(v-y)/2)for(var _=v,$=t.length-1;$>=0;$--){var T=t[$].series,S=T.tooltip,k=t[$].point.y;if(S.setBounds({x:0,y:-m,width:this.pixelWidth,height:_+m}),S.invalid&&S.validate(),S.toBack(),_=Xi({x:0,y:S.label.pixelY-S.pixelY+k-S.pixelMarginTop},S).y,_<-m){x=!0;break}}if(g<=y+(v-y)/2||x)for(var A=y,$=0,L=t.length;$<L;$++){var T=t[$].series,k=t[$].point.y,S=T.tooltip;S.setBounds({x:0,y:A,width:this.pixelWidth,height:v}),S.invalid&&S.validate(),S.toBack(),A=Xi({x:0,y:S.label.pixelY+S.label.measuredHeight-S.pixelY+k+S.pixelMarginBottom},S).y}}}},e.prototype.showAxisTooltip=function(t,i,r){var s=this;E(t.iterator(),function(o){(!r||r.indexOf(o)==-1)&&(s.dataItems.length>0||o.dataItems.length>0)&&o.showTooltipAtPosition(i)})},e.prototype.getUpdatedRange=function(t,i){if(t){var r,s,o=t.renderer.inversed;o?(Gn(i),r=1-t.end,s=1-t.start):(r=t.start,s=t.end);var n=s-r;return{start:r+i.start*n,end:r+i.end*n}}},e.prototype.handleCursorZoomEnd=function(t){var i=this.cursor,r=i.behavior;if(r=="zoomX"||r=="zoomXY"){var s=i.xRange;s&&this.xAxes.length>0&&(s=this.getUpdatedRange(this.xAxes.getIndex(0),s),s.priority="start",this.zoomAxes(this.xAxes,s))}if(r=="zoomY"||r=="zoomXY"){var o=i.yRange;o&&this.yAxes.length>0&&(o=this.getUpdatedRange(this.yAxes.getIndex(0),o),o.priority="start",this.zoomAxes(this.yAxes,o))}this.handleHideCursor()},e.prototype.handleCursorPanStart=function(t){var i=this.xAxes.getIndex(0);i&&(this._panStartXRange={start:i.start,end:i.end},i.renderer.inversed&&(this._panStartXRange=Gn(this._panStartXRange)));var r=this.yAxes.getIndex(0);r&&(this._panStartYRange={start:r.start,end:r.end},r.renderer.inversed&&(this._panStartYRange=Gn(this._panStartYRange)))},e.prototype.handleCursorPanEnd=function(t){var i=this.cursor,r=i.behavior;if(this._panEndXRange&&(r=="panX"||r=="panXY")){var s=this._panEndXRange,o=this._panStartXRange,n=0;s.start<0&&(n=s.start),o.end>1?s.end>o.end&&(n=s.end-o.end):s.end>1&&(n=s.end-1),this.zoomAxes(this.xAxes,{start:s.start-n,end:s.end-n},!1,i.snapOnPan),this._panEndXRange=void 0,this._panStartXRange=void 0}if(this._panEndYRange&&(r=="panY"||r=="panXY")){var s=this._panEndYRange,n=0;s.start<0&&(n=s.start),s.end>1&&(n=s.end-1),this.zoomAxes(this.yAxes,{start:s.start-n,end:s.end-n},!1,i.snapOnPan),this._panEndYRange=void 0,this._panStartYRange=void 0}},e.prototype.handleCursorCanceled=function(){this._panEndXRange=void 0,this._panStartXRange=void 0},e.prototype.handleCursorPanning=function(t){var i=this.cursor,r=i.behavior,s=i.maxPanOut;if(this._panStartXRange&&(r=="panX"||r=="panXY")){var o=this._panStartXRange,n=i.xRange,l=this.getCommonAxisRange(this.xAxes),h=o.end-o.start,u=n.start*(l.end-l.start),p=Math.max(-s,u+o.start),d=Math.min(u+o.end,1+s);p<=0&&(d=p+h),d>=1&&(p=d-h);var c={start:p,end:d};this._panEndXRange=c,this.zoomAxes(this.xAxes,c,!1,!1,i.maxPanOut)}if(this._panStartYRange&&(r=="panY"||r=="panXY")){var o=this._panStartYRange,n=i.yRange,l=this.getCommonAxisRange(this.yAxes),h=o.end-o.start,u=n.start*(l.end-l.start),p=Math.max(-s,u+o.start),d=Math.min(u+o.end,1+s);p<=0&&(d=p+h),d>=1&&(p=d-h);var c={start:p,end:d};this._panEndYRange=c,this.zoomAxes(this.yAxes,c,!1,!1,i.maxPanOut)}this.handleHideCursor()},e.prototype.handleYAxisSet=function(t){},e.prototype.handleCursorZoomStart=function(t){},Object.defineProperty(e.prototype,"scrollbarX",{get:function(){return this._scrollbarX},set:function(t){var i=this;this._scrollbarX&&this.removeDispose(this._scrollbarX),this._scrollbarX=t,t&&(this._disposers.push(t),t.parent=this.topAxesContainer,t.shouldClone=!1,t.startGrip.exportable=!1,t.endGrip.exportable=!1,t.toBack(),t.orientation="horizontal",t.events.on("rangechanged",this.handleXScrollbarChange,this,!1),this.events.on("datavalidated",function(){return t.updateThumb(!1)},this,!1),t.adapter.add("positionValue",function(r){var s=i.xAxes.getIndex(0);return s&&(r.value=s.getPositionLabel(s.renderer.inversed?1-r.position:r.position)),r}),t.adapter.add("positionValueDirection",function(r){var s=i.xAxes.getIndex(0);return s&&(r.flipped=s.renderer.inversed),r}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollbarY",{get:function(){return this._scrollbarY},set:function(t){var i=this;this._scrollbarY&&this.removeDispose(this._scrollbarY),this._scrollbarY=t,t&&(this._disposers.push(t),t.parent=this.rightAxesContainer,t.startGrip.exportable=!1,t.shouldClone=!1,t.endGrip.exportable=!1,t.toFront(),t.orientation="vertical",t.events.on("rangechanged",this.handleYScrollbarChange,this,!1),this.events.on("datavalidated",function(){return t.updateThumb(!1)},this,!1),t.adapter.add("positionValue",function(r){var s=i.yAxes.getIndex(0);return s&&(r.value=s.getPositionLabel(s.renderer.inversed?r.position:1-r.position)),r}),t.adapter.add("positionValueDirection",function(r){var s=i.yAxes.getIndex(0);return s&&(r.flipped=!s.renderer.inversed),r}))},enumerable:!0,configurable:!0}),e.prototype.handleXScrollbarChange=function(t){if(this.inited){var i=t.target,r=i.range;r.start==0&&(r.priority="start"),r.end==1&&(r.priority="end"),r=this.zoomAxes(this.xAxes,r),i.fixRange(r)}},e.prototype.handleYScrollbarChange=function(t){if(this.inited){var i=t.target,r=i.range;r.end==1&&(r.priority="end"),r.start==0&&(r.priority="start"),r=this.zoomAxes(this.yAxes,r),i.fixRange(r)}},e.prototype.zoomAxes=function(t,i,r,s,o,n){var l={start:0,end:1};this.showSeriesTooltip();var h=i;return this.dataInvalid||E(t.iterator(),function(u){var p=u.maxZoomFactor;if(P(u.minZoomCount)&&(p=p/u.minZoomCount),!(n&&1/(i.end-i.start)>=p)){if(u.zoomable){if(u.renderer.inversed?i=Gn(h):i=h,u.hideTooltip(0),s)if(u instanceof Ce){var d=u.getCellEndPosition(0)-u.getCellStartPosition(0);i.start=u.roundPosition(i.start+d/2-u.startLocation*d,u.startLocation),i.end=u.roundPosition(i.end-d/2+(1-u.endLocation)*d,u.endLocation)}else{var c=1e-4;i.start=u.roundPosition(i.start+c,0,u.startLocation),i.end=u.roundPosition(i.end+c,0,u.endLocation)}var f=u.zoom(i,r,r,o);u.renderer.inversed&&(f=Gn(f)),l=f}}}),l},Object.defineProperty(e.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(t){this.setPropertyValue("maskBullets",t,!0)&&this.bulletsContainer&&(t?this.bulletsContainer.mask=this._bulletMask:this.bulletsContainer.mask=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arrangeTooltips",{get:function(){return this.getPropertyValue("arrangeTooltips")},set:function(t){this.setPropertyValue("arrangeTooltips",t,!0)},enumerable:!0,configurable:!0}),e.prototype.handleWheel=function(t){var i=this.plotContainer,r=vs(t.point,this.htmlContainer,this.svgContainer.cssScale),s=ki(r,i),o=t.shift.y;this.handleWheelReal(o,this.mouseWheelBehavior,s)},e.prototype.handleHorizontalWheel=function(t){var i=this.plotContainer,r=vs(t.point,this.htmlContainer,this.svgContainer.cssScale),s=ki(r,i);this.handleWheelReal(t.shift.x,this.horizontalMouseWheelBehavior,s)},e.prototype.handleWheelReal=function(t,i,r){if(t!=0){var s=this.plotContainer,o=this.getCommonAxisRange(this.xAxes),n=this.getCommonAxisRange(this.yAxes),l=.1,h=0;if(i=="panX"||i=="panXY"){var u=this.xAxes.getIndex(0),p=!1,d=l;u instanceof Ce&&(d=.5/((o.end-o.start)*u.dataItems.length),p=!0),l=Math.max(.2,d);var c=o.end-o.start,f=Math.max(-h,o.start+l*t/100*(o.end-o.start)),g=Math.min(o.end+l*t/100*(o.end-o.start),1+h);f<=0&&(g=f+c),g>=1&&(f=g-c),this.zoomAxes(this.xAxes,{start:f,end:g},void 0,p)}if(i=="panY"||i=="panXY"){var m=this.yAxes.getIndex(0),d=l,p=!1;m instanceof Ce&&(d=.5/((o.end-o.start)*m.dataItems.length),p=!0),l=Math.max(.2,d),t*=-1;var y=n.end-n.start,v=Math.max(-h,n.start+l*t/100*(n.end-n.start)),x=Math.min(n.end+l*t/100*(n.end-n.start),1+h);v<=0&&(x=v+y),x>=1&&(v=x-y),this.zoomAxes(this.yAxes,{start:v,end:x},void 0,p)}if(i=="zoomX"||i=="zoomXY"){var _=r.x/s.maxWidth,$=this.xAxes.getIndex(0).toAxisPosition(_),f=Math.max(-h,o.start-l*(o.end-o.start)*t/100*_);f=Math.min(f,$);var g=Math.min(o.end+l*(o.end-o.start)*t/100*(1-_),1+h);g=Math.max(g,$),this.zoomAxes(this.xAxes,{start:f,end:g},void 0)}if(i=="zoomY"||i=="zoomXY"){var T=r.y/s.maxHeight,S=this.yAxes.getIndex(0).toAxisPosition(T),v=Math.max(-h,n.start-l*(n.end-n.start)*t/100*(1-T));v=Math.min(v,S);var x=Math.min(n.end+l*t/100*T*(n.end-n.start),1+h);x=Math.max(x,S),this.zoomAxes(this.yAxes,{start:v,end:x},void 0)}}},Object.defineProperty(e.prototype,"mouseWheelBehavior",{get:function(){return this.getPropertyValue("mouseWheelBehavior")},set:function(t){this.setPropertyValue("mouseWheelBehavior",t)&&(t!="none"?(this._mouseWheelDisposer=this.plotContainer.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer)):this._mouseWheelDisposer&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer.dispose()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalMouseWheelBehavior",{get:function(){return this.getPropertyValue("horizontalMouseWheelBehavior")},set:function(t){this.setPropertyValue("horizontalMouseWheelBehavior",t)&&(t!="none"?(this._mouseWheelDisposer2=this.plotContainer.events.on("wheel",this.handleHorizontalWheel,this,!1),this._disposers.push(this._mouseWheelDisposer2)):this._mouseWheelDisposer2&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer2.dispose()))},enumerable:!0,configurable:!0}),e.prototype.dataSourceDateFields=function(t){var i=this;return t=a.prototype.dataSourceDateFields.call(this,t),E(this.series.iterator(),function(r){t=i.populateDataSourceFields(t,r.dataFields,["dateX","dateY","openDateX","openDateY"])}),t},e.prototype.dataSourceNumberFields=function(t){var i=this;return t=a.prototype.dataSourceDateFields.call(this,t),E(this.series.iterator(),function(r){t=i.populateDataSourceFields(t,r.dataFields,["valueX","valueY","openValueX","openValueY"])}),t},e.prototype.processConfig=function(t){if(t){var i=[],r=[];if(C(t.xAxes)&&oe(t.xAxes))for(var s=0,o=t.xAxes.length;s<o;s++)if(t.xAxes[s].type){if(C(t.xAxes[s].axisRanges)){for(var n=0,l=t.xAxes[s].axisRanges.length;n<l;n++){var h=t.xAxes[s].axisRanges[n];C(h.date)&&vt(h.date)&&(h.date=this.dateFormatter.parse(h.date)),C(h.endDate)&&vt(h.endDate)&&(h.endDate=this.dateFormatter.parse(h.endDate))}i.push({axisRanges:t.xAxes[s].axisRanges,index:s}),delete t.xAxes[s].axisRanges}}else throw Error("[XYChart error] No type set for xAxes["+s+"].");if(C(t.yAxes)&&oe(t.yAxes))for(var s=0,o=t.yAxes.length;s<o;s++)if(t.yAxes[s].type){if(C(t.yAxes[s].axisRanges)){for(var n=0,u=t.yAxes[s].axisRanges.length;n<u;n++){var h=t.yAxes[s].axisRanges[n];C(h.date)&&vt(h.date)&&(h.date=this.dateFormatter.parse(h.date)),C(h.endDate)&&vt(h.endDate)&&(h.endDate=this.dateFormatter.parse(h.endDate))}r.push({axisRanges:t.yAxes[s].axisRanges,index:s}),delete t.yAxes[s].axisRanges}}else throw Error("[XYChart error] No type set for yAxes["+s+"].");if(C(t.series)&&oe(t.series))for(var s=0,o=t.series.length;s<o;s++)t.series[s].type=t.series[s].type||"LineSeries";if(C(t.cursor)&&!C(t.cursor.type)&&(t.cursor.type="XYCursor"),C(t.scrollbarX)&&!C(t.scrollbarX.type)&&(t.scrollbarX.type="Scrollbar"),C(t.scrollbarY)&&!C(t.scrollbarY.type)&&(t.scrollbarY.type="Scrollbar"),a.prototype.processConfig.call(this,t),r.length)for(var s=0,o=r.length;s<o;s++)this.yAxes.getIndex(r[s].index).config={axisRanges:r[s].axisRanges};if(i.length)for(var s=0,o=i.length;s<o;s++)this.xAxes.getIndex(i[s].index).config={axisRanges:i[s].axisRanges}}},e.prototype.configOrder=function(t,i){return t==i?0:t=="scrollbarX"?1:i=="scrollbarX"?-1:t=="scrollbarY"?1:i=="scrollbarY"?-1:t=="cursor"?1:i=="cursor"?-1:t=="series"?1:i=="series"?-1:a.prototype.configOrder.call(this,t,i)},e.prototype.createSeries=function(){return new es},Object.defineProperty(e.prototype,"zoomOutButton",{get:function(){return this._zoomOutButton},set:function(t){var i=this;this._zoomOutButton=t,t&&t.events.on("hit",function(){i.zoomAxes(i.xAxes,{start:0,end:1}),i.zoomAxes(i.yAxes,{start:0,end:1})},void 0,!1)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){var i=this;t.xAxes.each(function(r){var s=i.xAxes.push(r.clone());s.chart=i,s.renderer.chart=i}),t.yAxes.each(function(r){var s=i.yAxes.push(r.clone());s.renderer.chart=i,s.chart=i}),a.prototype.copyFrom.call(this,t),t.cursor&&(this.cursor=t.cursor.clone()),t.scrollbarX&&(this.scrollbarX=t.scrollbarX.clone()),t.scrollbarY&&(this.scrollbarY=t.scrollbarY.clone())},e.prototype.disposeData=function(){a.prototype.disposeData.call(this);var t=this.scrollbarX;t&&t instanceof ba&&t.scrollbarChart.disposeData();var i=this.scrollbarY;i&&i instanceof ba&&i.scrollbarChart.disposeData(),this.xAxes.each(function(r){r instanceof Ce&&r.disposeData()}),this.yAxes.each(function(r){r instanceof Ce&&r.disposeData()})},e.prototype.addData=function(t,i){this.scrollbarX instanceof ba&&this.addScrollbarData(this.scrollbarX,i),this.scrollbarY instanceof ba&&this.addScrollbarData(this.scrollbarY,i),a.prototype.addData.call(this,t,i)},e.prototype.addScrollbarData=function(t,i){var r=t.scrollbarChart;r._parseDataFrom=r.data.length,r.invalidateData()},e.prototype.removeScrollbarData=function(t,i){var r=t.scrollbarChart;if(P(i)){for(;i>0;){var s=this.dataItems.getIndex(0);s&&r.dataItems.remove(s),r.dataUsers.each(function(o){var n=o.dataItems.getIndex(0);n&&o.dataItems.remove(n)}),r._parseDataFrom--,i--}r.invalidateData()}},e.prototype.removeData=function(t){this.scrollbarX instanceof ba&&this.removeScrollbarData(this.scrollbarX,t),this.scrollbarY instanceof ba&&this.removeScrollbarData(this.scrollbarY,t),a.prototype.removeData.call(this,t)},e.prototype.setTapToActivate=function(t){a.prototype.setTapToActivate.call(this,t),this.cursor&&(this.cursor.interactions.isTouchProtected=t,this.plotContainer.interactions.isTouchProtected=t)},e.prototype.handleTapToActivate=function(){a.prototype.handleTapToActivate.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!1,this.plotContainer.interactions.isTouchProtected=!1)},e.prototype.handleTapToActivateDeactivation=function(){a.prototype.handleTapToActivateDeactivation.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!0,this.plotContainer.interactions.isTouchProtected=!0)},e})(xl);w.registeredClasses.XYChart=sr;De.push({relevant:Fe.maybeXS,state:function(a,e){if(a instanceof sr&&a.scrollbarX){var t=a.states.create(e),i=a.scrollbarX.states.create(e);return i.properties.disabled=!0,t}return null}});De.push({relevant:Fe.maybeXS,state:function(a,e){if(a instanceof sr&&a.scrollbarY){var t=a.states.create(e),i=a.scrollbarY.states.create(e);return i.properties.disabled=!0,t}return null}});var hn=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="XYSeriesDataItem",t.values.customValue={},t.values.valueX={stack:0},t.values.valueY={stack:0},t.values.openValueX={},t.values.openValueY={},t.values.dateX={},t.values.dateY={},t.values.openDateX={},t.values.openDateY={},t.setLocation("dateX",.5,0),t.setLocation("dateY",.5,0),t.setLocation("categoryX",.5,0),t.setLocation("categoryY",.5,0),t.applyTheme(),t}return Object.defineProperty(e.prototype,"valueX",{get:function(){return this.values.valueX.value},set:function(t){this.setValue("valueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"customValue",{get:function(){return this.values.customValue.value},set:function(t){this.setValue("customValue",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueY",{get:function(){return this.values.valueY.value},set:function(t){this.setValue("valueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateX",{get:function(){return this.getDate("dateX")},set:function(t){this.setDate("dateX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateY",{get:function(){return this.getDate("dateY")},set:function(t){this.setDate("dateY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"categoryX",{get:function(){return this.categories.categoryX},set:function(t){this.setCategory("categoryX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"categoryY",{get:function(){return this.categories.categoryY},set:function(t){this.setCategory("categoryY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openValueX",{get:function(){return this.values.openValueX.value},set:function(t){this.setValue("openValueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openValueY",{get:function(){return this.values.openValueY.value},set:function(t){this.setValue("openValueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openDateX",{get:function(){return this.getDate("openDateX")},set:function(t){this.setDate("openDateX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openDateY",{get:function(){return this.getDate("openDateY")},set:function(t){this.setDate("openDateY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openCategoryX",{get:function(){return this.categories.openCategoryX},set:function(t){this.setCategory("openCategoryX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openCategoryY",{get:function(){return this.categories.openCategoryY},set:function(t){this.setCategory("openCategoryY",t)},enumerable:!0,configurable:!0}),e.prototype.getMin=function(t,i,r){var s=this,o;return P(r)||(r=0),W(t,function(n){var l;i?l=s.getWorkingValue(n):l=s.getValue(n),l+=r,(l<o||!P(o))&&(o=l)}),o},e.prototype.getMax=function(t,i,r){var s=this,o;return P(r)||(r=0),W(t,function(n){var l;i?l=s.getWorkingValue(n):l=s.getValue(n),l+=r,(l>o||!P(o))&&(o=l)}),o},e})(rn);var es=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.groupFields={},t._xAxis=new ce,t._yAxis=new ce,t._xValueFields=[],t._yValueFields=[],t._baseInterval={},t.dataGrouped=!1,t.usesShowFields=!1,t._dataSetChanged=!1,t._maxxX=1e5,t._maxxY=1e5,t._propertiesChanged=!1,t.outOfRange=!1,t.className="XYSeries",t.isMeasured=!1,t.groupFields.valueX="close",t.groupFields.valueY="close",t.groupFields.customValue="close",t.groupFields.openValueX="open",t.groupFields.openValueY="open",t.cursorTooltipEnabled=!0,t.cursorHoverEnabled=!0,t.excludeFromTotal=!1,t.mainContainer.mask=new rt,t.mainContainer.mask.setElement(t.paper.add("path")),t.stacked=!1,t.snapTooltip=!1,t._showBullets=!1,t.tooltip.pointerOrientation="horizontal",t.properties.stackToNegative=!0,t.hideTooltipWhileZooming=!0,t.setPropertyValue("maskBullets",!0),t.tooltip.events.on("hidden",function(){t.returnBulletDefaultState()},void 0,!1),t._disposers.push(t._xAxis),t._disposers.push(t._yAxis),t.observe(fe,function(){t.inited&&(t._propertiesChanged=!0,t.legendDataItem&&(t.legendDataItem.childrenCreated=!1),t.chart&&t.chart.legend&&t.chart.legend.invalidateDataItems(),t.invalidate())},void 0,!1),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y Series"))},e.prototype.createDataItem=function(){return new hn},e.prototype.resetExtremes=function(){this._tmin.clear(),this._tmax.clear(),this._smin.clear(),this._smax.clear()},e.prototype.dataChangeUpdate=function(){this.dataGrouped=!1,this._baseInterval={},this._currentDataSetId="",this.resetExtremes(),this.xAxis&&this.xAxis.seriesDataChangeUpdate(this),this.yAxis&&this.yAxis.seriesDataChangeUpdate(this)},e.prototype.validateData=function(){this._baseInterval={};var t=this.dataFields;if(t.valueYShow||t.openValueXShow||t.openValueXShow||t.openValueYShow?this.usesShowFields=!0:this.usesShowFields=!1,this.defineFields(),this.data.length>0&&this.dataChangeUpdate(),a.prototype.validateData.call(this),this.updateItemReaderText(),this.chart&&(!C(this.dataFields[this._xField])||!C(this.dataFields[this._yField])))throw Error('Data fields for series "'+(this.name?this.name:this.uid)+'" are not properly defined.');this.inited&&this.isHidden&&this.hide(0),this.dataGrouped=!1},e.prototype.processDataItem=function(t,i){try{a.prototype.processDataItem.call(this,t,i),this.xAxis.processSeriesDataItem(t,"X"),this.yAxis.processSeriesDataItem(t,"Y"),this.setInitialWorkingValues(t)}catch(r){this._chart&&this._chart.raiseCriticalError(r)}},e.prototype.updateDataItem=function(t){a.prototype.updateDataItem.call(this,t),this.xAxis.processSeriesDataItem(t,"X"),this.yAxis.processSeriesDataItem(t,"Y")},e.prototype.setInitialWorkingValues=function(t){},e.prototype.disposeData=function(){a.prototype.disposeData.call(this);var t=this.xAxis,i=this.yAxis;if(t){var r=this.dataItemsByAxis.getKey(t.uid);r&&r.clear(),t instanceof Ce&&this.clearCatAxis(t)}if(i){var s=this.dataItemsByAxis.getKey(i.uid);s&&s.clear(),i instanceof Ce&&this.clearCatAxis(i)}},e.prototype.clearCatAxis=function(t){var i=this.uid;t.dataItems.each(function(r){r.seriesDataItems[i]&&(r.seriesDataItems[i]=[])})},e.prototype.defineFields=function(){var t=this.xAxis,i=this.yAxis;if(t&&i){var r=t.axisFieldName,s=r+"X",o="open"+Ko(r)+"X",n=i.axisFieldName,l=n+"Y",h="open"+Ko(n)+"Y";this._xField=s,this._yField=l,this.dataFields[o]&&(this._xOpenField=o),this.dataFields[h]&&(this._yOpenField=h),!this.dataFields[h]&&this.baseAxis==i&&(this._yOpenField=l),!this.dataFields[o]&&this.baseAxis==t&&(this._xOpenField=s),this.stacked&&this.baseAxis==t&&(this._xOpenField=s),this.stacked&&this.baseAxis==i&&(this._yOpenField=l),t instanceof Ce&&i instanceof Ce&&(this._yOpenField||(this._yOpenField=l)),this._xValueFields=[],this._yValueFields=[],this.addValueField(t,this._xValueFields,this._xField),this.addValueField(t,this._xValueFields,this._xOpenField),this.addValueField(i,this._yValueFields,this._yField),this.addValueField(i,this._yValueFields,this._yOpenField)}},e.prototype.addValueField=function(t,i,r){t instanceof At&&C(this.dataFields[r])&&i.indexOf(r)==-1&&i.push(r)},e.prototype.setCategoryAxisField=function(t,i){C(this.dataFields[t])||(this.dataFields[t]=i.dataFields.category)},e.prototype.setDateAxisField=function(t,i){C(this.dataFields[t])||(this.dataFields[t]=i.dataFields.date)},e.prototype.afterDraw=function(){a.prototype.afterDraw.call(this),this.createMask()},e.prototype.createMask=function(){if(this.mainContainer.mask){var t=this.getMaskPath();E(this.axisRanges.iterator(),function(i){i.axisFill.fillPath&&(i.axisFill.validate(),t+=i.axisFill.fillPath)}),this.mainContainer.mask.path=t}},e.prototype.getMaskPath=function(){return this.xAxis&&this.yAxis?Nr({x:0,y:0,width:this.xAxis.axisLength,height:this.yAxis.axisLength}):""},e.prototype.getAxisField=function(t){if(t==this.xAxis)return this.xField;if(t==this.yAxis)return this.yField},e.prototype.validateDataItems=function(){var t=this.chart;t&&(this._maxxX=mt(1e5,t.plotContainer.maxWidth*2),this._maxxY=mt(1e5,t.plotContainer.maxHeight*2));var i=this.xAxis,r=this.yAxis;i&&r&&(i.updateAxisBySeries(),r.updateAxisBySeries()),a.prototype.validateDataItems.call(this),i&&r&&(i.postProcessSeriesDataItems(this),r.postProcessSeriesDataItems(this))},e.prototype.validateDataRange=function(){var t=this.xAxis,i=this.yAxis;t&&i&&(t.dataRangeInvalid&&t.validateDataRange(),i.dataRangeInvalid&&i.validateDataRange()),a.prototype.validateDataRange.call(this)},e.prototype.validate=function(){var t=this.xAxis,i=this.yAxis;if(t&&i){t.invalid&&t.validate(),i.invalid&&i.validate(),this.y=i.pixelY,this.x=t.pixelX,this._showBullets=!0;var r=this.minBulletDistance;P(r)&&this.baseAxis.axisLength/(this.endIndex-this.startIndex)<r&&(this._showBullets=!1)}if(this.updateTooltip(),!(t instanceof me&&t.groupData&&!this.dataGrouped||i instanceof me&&i.groupData&&!this.dataGrouped)){a.prototype.validate.call(this);var s=this.chart,o=this.maskBullets;s&&o&&s.className=="XYChart"&&((s.leftAxesContainer.layout=="vertical"||s.rightAxesContainer.layout=="vertical")&&(this.yAxis?this.bulletsContainer.mask=this.yAxis.renderer.gridContainer:this.bulletsContainer.mask=void 0),(s.topAxesContainer.layout=="horizontal"||s.bottomAxesContainer.layout=="horizontal")&&(this.xAxis?this.bulletsContainer.mask=this.xAxis.renderer.gridContainer:this.bulletsContainer.mask=void 0))}},Object.defineProperty(e.prototype,"xAxis",{get:function(){if(this.chart){if(!this._xAxis.get()){var t=this.chart.xAxes.getIndex(0);if(!t)throw Error("There are no X axes on chart.");this.xAxis=t}return this._xAxis.get()}},set:function(t){this.setXAxis(t)},enumerable:!0,configurable:!0}),e.prototype.setXAxis=function(t){var i=this._xAxis.get();i!=t&&(i&&(this.dataItemsByAxis.removeKey(i.uid),this._xAxis.dispose(),i.series.removeValue(this)),this._xAxis.set(t,t.registerSeries(this)),this.dataItemsByAxis.setKey(t.uid,new It),this.invalidateData())},Object.defineProperty(e.prototype,"yAxis",{get:function(){if(this.chart){if(!this._yAxis.get()){var t=this.chart.yAxes.getIndex(0);if(!t)throw Error("There are no Y axes on chart.");this.yAxis=t}return this._yAxis.get()}},set:function(t){this.setYAxis(t)},enumerable:!0,configurable:!0}),e.prototype.setYAxis=function(t){var i=this._yAxis.get();i!=t&&(i&&(this.dataItemsByAxis.removeKey(i.uid),this._yAxis.dispose(),i.series.removeValue(this)),this._yAxis.set(t,t.registerSeries(this)),t.chart instanceof sr&&t.chart.handleYAxisSet(this),this.dataItemsByAxis.setKey(t.uid,new It),this.invalidateData())},Object.defineProperty(e.prototype,"baseAxis",{get:function(){var t=this.xAxis,i=this.yAxis;return!this._baseAxis&&t&&i&&(i instanceof me&&(this._baseAxis=i),t instanceof me&&(this._baseAxis=t),i instanceof Ce&&(this._baseAxis=i),t instanceof Ce&&(this._baseAxis=t),this._baseAxis||(this._baseAxis=t)),this._baseAxis},set:function(t){this._baseAxis!=t&&(this._baseAxis=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.addData=function(t,i,r){a.prototype.addData.call(this,t,i,r);var s=this.scrollbarSeries;s&&(this.scrollbarSeries.addData(t,i,!0),this.scrollbarSeries._parseDataFrom=this._parseDataFrom)},e.prototype.setData=function(t){a.prototype.setData.call(this,t),this.scrollbarSeries&&this.scrollbarSeries.setData(t)},e.prototype.setDataSet=function(t){var i=a.prototype.setDataSet.call(this,t);if(i){this._dataSetChanged=!0;var r=this.dataItems;if(this.resetExtremes(),r&&r.length>0){var s=this.xAxis,o=this.yAxis;this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.appeared||this.processValues(!1),s instanceof me&&s==this.baseAxis&&(this._tmin.setKey(s.uid,r.getIndex(0).dateX.getTime()),this._tmax.setKey(s.uid,r.getIndex(r.length-1).dateX.getTime()),this.dispatch("extremeschanged")),o instanceof me&&o==this.baseAxis&&(this._tmin.setKey(o.uid,r.getIndex(0).dateY.getTime()),this._tmax.setKey(o.uid,r.getIndex(r.length-1).dateY.getTime()),this.dispatch("extremeschanged"))}}return i},e.prototype.processValues=function(t){a.prototype.processValues.call(this,t);var i=this.xAxis,r=this.yAxis;if(!(!i||!r)){var s=this.dataItems,o=1/0,n=-1/0,l=1/0,h=-1/0,u=this.startIndex,p=this.endIndex,d=u,c=p;t||(u=0,p=this.dataItems.length);for(var f=u;f<p;f++){var g=s.getIndex(f);this.getStackValue(g,t);var m=g.getValue("valueX","stack"),y=g.getValue("valueY","stack");t||(m=g.getValue("valueX","stackTrue"),y=g.getValue("valueY","stackTrue")),o=Pt(g.getMin(this._xValueFields,t,m),o),l=Pt(g.getMin(this._yValueFields,t,y),l),n=mt(g.getMax(this._xValueFields,t,m),n),h=mt(g.getMax(this._yValueFields,t,y),h),this.stacked&&(this.baseAxis==i&&(y<l&&(l=y),y>h&&(h=y)),this.baseAxis==r&&(m<o&&(o=m),m>n&&(n=m)))}i.processSeriesDataItems(),r.processSeriesDataItems();var v=i.uid,x=r.uid;if(this.xAxis instanceof At&&(o==1/0||n==-1/0)){this._smin.setKey(v,void 0),this._smax.setKey(v,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(this.yAxis instanceof At&&(l==1/0||h==-1/0)){this._smin.setKey(x,void 0),this._smax.setKey(x,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(!t&&(this._tmin.getKey(v)!=o||this._tmax.getKey(v)!=n||this._tmin.getKey(x)!=l||this._tmax.getKey(x)!=h)){this._tmin.setKey(v,o),this._tmax.setKey(v,n),this._tmin.setKey(x,l),this._tmax.setKey(x,h);var _=this.stackedSeries;_&&(_.isDisposed()?this.stackedSeries=void 0:_.processValues(!1)),this.dispatchImmediately("extremeschanged")}if(u!=d||p!=c){o=1/0,n=-1/0,l=1/0,h=-1/0;for(var f=d;f<c;f++){var g=s.getIndex(f);this.getStackValue(g,t);var m=g.getValue("valueX","stack"),y=g.getValue("valueY","stack");t||(m=g.getValue("valueX","stackTrue"),y=g.getValue("valueY","stackTrue")),o=Pt(g.getMin(this._xValueFields,t,m),o),l=Pt(g.getMin(this._yValueFields,t,y),l),n=mt(g.getMax(this._xValueFields,t,m),n),h=mt(g.getMax(this._yValueFields,t,y),h),this.stacked&&(this.baseAxis==i&&(y<l&&(l=y),y>h&&(h=y)),this.baseAxis==r&&(m<o&&(o=m),m>n&&(n=m)))}}if(this.xAxis instanceof At&&(o==1/0||n==-1/0)){this._smin.setKey(v,void 0),this._smax.setKey(v,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(this.yAxis instanceof At&&(l==1/0||h==-1/0)){this._smin.setKey(x,void 0),this._smax.setKey(x,void 0),this.dispatchImmediately("selectionextremeschanged");return}if((this._smin.getKey(v)!=o||this._smax.getKey(v)!=n||this._smin.getKey(x)!=l||this._smax.getKey(x)!=h)&&(this._smin.setKey(v,o),this._smax.setKey(v,n),this._smin.setKey(x,l),this._smax.setKey(x,h),this.appeared||this.start!=0||this.end!=1||this.dataItems!=this.mainDataSet)){var $=!1;if(r instanceof At&&!(r instanceof me)){var T=this._tmin.getKey(x);(!P(T)||(this.usesShowFields||this._dataSetChanged||i instanceof me&&i.groupData&&this.isShowing)&&l<T||this.stackedSeries&&!this.isHidden&&!t)&&(this._tmin.setKey(x,l),$=!0);var S=this._tmax.getKey(x);(!P(S)||(this.usesShowFields||this._dataSetChanged||i instanceof me&&i.groupData&&this.isShowing)&&h>S||this.stackedSeries&&!this.isHidden&&!t)&&(this._tmax.setKey(x,h),$=!0)}if(i instanceof At&&!(i instanceof me)){var T=this._tmin.getKey(v);(!P(T)||(this.usesShowFields||this._dataSetChanged||r instanceof me&&r.groupData&&this.isShowing)&&o<T||this.stackedSeries&&!this.isHidden&&!t)&&(this._tmin.setKey(v,o),$=!0);var S=this._tmax.getKey(v);(!P(S)||(this.usesShowFields||this._dataSetChanged||r instanceof me&&r.groupData&&this.isShowing)&&n>S||this.stackedSeries&&!this.isHidden&&!t)&&(this._tmax.setKey(v,n),$=!0)}$&&this.dispatchImmediately("extremeschanged"),this.start==0&&this.end==1&&(this._dataSetChanged=!1),this.dispatchImmediately("selectionextremeschanged")}!t&&this.stacked&&this.processValues(!0)}},e.prototype.hideTooltip=function(t){a.prototype.hideTooltip.call(this,t),this.returnBulletDefaultState(),this._prevTooltipDataItem=void 0},e.prototype.showTooltipAtPosition=function(t,i){var r;if(this.visible&&!this.isHiding&&!this.isShowing){var s=this._xAxis.get(),o=this._yAxis.get();s==this.baseAxis&&(r=s.getSeriesDataItem(this,s.toAxisPosition(t),this.snapTooltip)),o==this.baseAxis&&(r=o.getSeriesDataItem(this,o.toAxisPosition(i),this.snapTooltip));var n=this.showTooltipAtDataItem(r);if(n)return n;if(!this.tooltipText&&!this.tooltipHTML)return}this.hideTooltip()},e.prototype.getAdjustedXLocation=function(t,i,r){return t.locations[i]},e.prototype.getAdjustedYLocation=function(t,i,r){return t.locations[i]},e.prototype.showTooltipAtDataItem=function(t){var i,r,s=this.chart.cursor;if(s&&s.hideSeriesTooltipsOnSelection&&s.selection.visible&&s.downPoint){this.hideTooltip();return}if(this.returnBulletDefaultState(t),t&&t.visible){if(this.updateLegendValue(t),this.cursorTooltipEnabled){this.tooltipDataItem=t;var o=this.tooltipXField,n=this.tooltipYField;if(C(t[o])&&C(t[n])){var l=this.getPoint(t,o,n,this.getAdjustedXLocation(t,o),this.getAdjustedYLocation(t,n));if(l&&!(this.chart.className=="XYChart"&&(l.y<-1||l.y>this.yAxis.pixelHeight+1||l.x<-1||l.x>this.xAxis.pixelWidth+1))){if(this.tooltipX=l.x,this.tooltipY=l.y,this._prevTooltipDataItem!=t&&(this.dispatchImmediately("tooltipshownat",{type:"tooltipshownat",target:this,dataItem:t}),this._prevTooltipDataItem=t),this.cursorHoverEnabled)try{for(var h=jo(t.sprites),u=h.next();!u.done;u=h.next()){var p=u.value;!p.parent.visible||p.isHidden||p.__disabled||p.disabled||p.isHiding||(p.interactions.isRealHover||(p.dispatchImmediately("over"),p.interactions.isRealHover=!0),p.isHover=!0)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}return this.showTooltip()?Xi({x:l.x,y:l.y},this):void 0}}}}else this.updateLegendValue(t,!0)},e.prototype.returnBulletDefaultState=function(t){var i,r;if(this._prevTooltipDataItem&&this._prevTooltipDataItem!=t)try{for(var s=jo(this._prevTooltipDataItem.sprites),o=s.next();!o.done;o=s.next()){var n=o.value;if(n.isDisposed())this._prevTooltipDataItem=void 0;else{var l=n.interactions.isRealHover;n.isHover=!1,l&&n.dispatchImmediately("out")}}}catch(h){i={error:h}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},e.prototype.shouldCreateBullet=function(t,i){var r=i.xField;C(r)||(r=this.xField);var s=i.yField;if(C(s)||(s=this.yField),this.xAxis instanceof At&&!t.hasValue([r])||this.yAxis instanceof At&&!t.hasValue([s]))return!1;if(i.disabled){var o=i.propertyFields.disabled,n=t.dataContext;return!!(n&&n[o]===!1)}return!0},e.prototype.updateTooltip=function(){!this.hideTooltipWhileZooming&&this.tooltip&&!this.tooltip.isHidden&&!this.isHiding&&!this.isHidden&&this.tooltipDataItem&&this.showTooltipAtDataItem(this.tooltipDataItem)},e.prototype.positionBullet=function(t){a.prototype.positionBullet.call(this,t);var i=t.dataItem,r=t.xField;C(r)||(r=this.xField);var s=t.yField;C(s)||(s=this.yField);var o=this.xAxis,n=this.yAxis;if(o instanceof At&&!i.hasValue([r])||n instanceof At&&!i.hasValue([s]))t.visible=!1;else{var l=this.getBulletLocationX(t,r),h=this.getBulletLocationY(t,s),u=this.getPoint(i,r,s,l,h);if(u){var p=this.xOpenField,d=this.yOpenField,c=void 0,f=void 0;if(o instanceof me){P(l)||(l=0);var g=void 0,m=i.getWorkingValue(r);p?g=i.getWorkingValue(p):o==this.baseAxis&&(g=o.baseValue),P(g)||(g=m);var y=i.getValue("valueX","stack");if(g+=y,m+=y,g==m){var v=o.baseInterval,x=o.dateFormatter;g=ri(new Date(g),v.timeUnit,v.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),m=Ai(new Date(g),v.timeUnit,v.count,x.utc).getTime()}var _=void 0;o==this.baseAxis?_=g+(m-g)*l:_=g+(m-g)*(1-l),c=o.valueToPosition(_)}else if(o instanceof At){P(l)||(l=0);var g=void 0,m=i.getWorkingValue(r);p?g=i.getWorkingValue(p):g=o.baseValue;var y=i.getValue("valueX","stack");g+=y,m+=y;var _=g+(m-g)*(1-l);c=o.valueToPosition(_)}else if(o instanceof Ce){var $=this.getAdjustedXLocation(i,r,t.locationX),T=this.getAdjustedXLocation(i,p,t.locationX);c=o.categoryToPosition(i[r],$);var S=void 0;p&&(S=o.categoryToPosition(i[p],T)),P(S)||(S=1),c=S+(c-S)*l}if(n instanceof me){P(h)||(h=0);var g=void 0,m=i.getWorkingValue(s);d?g=i.getWorkingValue(d):n==this.baseAxis&&(g=n.baseValue),P(g)||(g=m);var y=i.getValue("valueY","stack");if(g+=y,m+=y,g==m){var v=n.baseInterval,x=n.dateFormatter;g=ri(new Date(g),v.timeUnit,v.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),m=Ai(new Date(g),v.timeUnit,v.count,x.utc).getTime()}var _=void 0;n==this.baseAxis?_=g+(m-g)*h:_=g+(m-g)*(1-h),f=n.valueToPosition(_)}else if(n instanceof At){P(h)||(h=0);var g=void 0,m=i.getWorkingValue(s);d?g=i.getWorkingValue(d):g=n.baseValue;var y=i.getValue("valueY","stack");g+=y,m+=y;var _=g+(m-g)*(1-h);f=n.valueToPosition(_)}else if(n instanceof Ce){f=n.categoryToPosition(i[s],h);var k=this.getAdjustedYLocation(i,s,t.locationY),A=this.getAdjustedYLocation(i,d,t.locationY);f=n.categoryToPosition(i[s],k);var L=void 0;d&&(L=n.categoryToPosition(i[d],A)),P(L)||(L=1),f=L+(f-L)*h}t.visible=!0,this.positionBulletReal(t,c,f)}else t.visible=!1}},e.prototype.positionBulletReal=function(t,i,r){t.x=this.xAxis.renderer.positionToPoint(i,r).x,t.y=this.yAxis.renderer.positionToPoint(r,i).y},e.prototype.getBulletLocationX=function(t,i){var r=t.locationX,s=t.dataItem;return P(r)||(r=s.workingLocations[i]),r},e.prototype.getBulletLocationY=function(t,i){var r=t.locationY,s=t.dataItem;return P(r)||(r=s.workingLocations[i]),r},e.prototype.updateStacking=function(){var t=this;this.invalidateDataItems(),this.chart&&this.chart.series.each(function(i){i.baseAxis==t.baseAxis&&(i.stackedSeries=void 0,i.invalidateDataItems(),i.invalidateProcessedData())})},Object.defineProperty(e.prototype,"stacked",{get:function(){return this.getPropertyValue("stacked")},set:function(t){if(this.setPropertyValue("stacked",t,!0)){this.updateStacking();var i=this.xAxis,r=this.yAxis;if(!t){var s;i!=this.baseAxis&&i instanceof At&&(s=this.xField),r!=this.baseAxis&&r instanceof At&&(s=this.yField),s&&this.dataItems.each(function(o){o.setCalculatedValue(s,0,"stack"),o.setCalculatedValue(s,0,"stackTrue")})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(t){this.setPropertyValue("snapTooltip",t)},enumerable:!0,configurable:!0}),e.prototype.show=function(t){var i=this;this.isHidden&&(this.appeared&&this.xAxis instanceof me&&this.xAxis.groupData&&(this._tmin.setKey(this.yAxis.uid,void 0),this._tmax.setKey(this.yAxis.uid,void 0)),this.appeared&&this.yAxis instanceof me&&this.yAxis.groupData&&(this._tmin.setKey(this.xAxis.uid,void 0),this._tmax.setKey(this.xAxis.uid,void 0)));var r;this.xAxis instanceof At&&this.xAxis!=this.baseAxis&&(r=this._xValueFields),this.yAxis instanceof At&&this.yAxis!=this.baseAxis&&(r=this._yValueFields);var s=this.startIndex,o=this.endIndex,n=0,l=this.defaultState.transitionDuration;P(t)&&(l=t),$t.animationsEnabled||(l=0);var h;E(qr(this.dataItems.iterator()),function(p){var d=p[0],c=p[1],f=l;(d<i.startIndex-10||d>i.endIndex+10)&&(f=0,n=0),i.sequencedInterpolation&&f>0&&(n=i.sequencedInterpolationDelay*d+l*(d-s)/(o-s)),h=c.show(f,n,r)}),this.dataSets.each(function(p,d){d!=i.dataItems&&d.each(function(c){c.events.disable(),c.show(0,0,r),c.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(p){p.events.disable(),p.show(0,0,r),p.events.enable()});var u=a.prototype.show.call(this,t);return h&&!h.isFinished()&&(u=h),this.hidden&&(this.dispatchImmediately("selectionextremeschanged"),this.hidden=!1),u},e.prototype.hide=function(t){var i=this,r,s,o=this.xAxis;o instanceof At&&o!=this.baseAxis&&(r=this._xValueFields,this.stacked||o.minZoomed<o.baseValue&&o.maxZoomed>o.baseValue||this.stackedSeries?s=o.baseValue:s=o.min);var n=this.yAxis;n instanceof At&&n!=this.baseAxis&&(r=this._yValueFields,this.stacked||n.minZoomed<n.baseValue&&n.maxZoomed>n.baseValue||this.stackedSeries?s=n.baseValue:s=n.min);var l=this.startIndex,h=this.endIndex,u=this.hiddenState.transitionDuration;P(t)&&(u=t),$t.animationsEnabled||(u=0);var p=0,d;E(qr(this.dataItems.iterator()),function(f){var g=f[0],m=f[1],y=u;(g<i.startIndex-10||g>i.endIndex+10)&&(y=0),y==0?m.hide(0,0,s,r):(i.sequencedInterpolation&&y>0&&(p=i.sequencedInterpolationDelay*g+u*(g-l)/(h-l)),d=m.hide(y,p,s,r))}),this.dataSets.each(function(f,g){g!=i.dataItems&&g.each(function(m){m.events.disable(),m.hide(0,0,s,r),m.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(f){f.events.disable(),f.hide(0,0,s,r),f.events.enable()});var c=a.prototype.hide.call(this,u);return c&&!c.isFinished()&&c.delay(p),d&&!d.isFinished()&&(c=d),this.appeared&&this.dispatch("selectionextremeschanged"),this.validateDataElements(),c},e.prototype.handleDataItemWorkingValueChange=function(t,i){a.prototype.handleDataItemWorkingValueChange.call(this,t,i);var r=this.baseAxis.series;E(r.iterator(),function(s){(s.stacked||s.stackedSeries)&&s.invalidateProcessedData()})},e.prototype.getStackValue=function(t,i){var r=this,s=this.xAxis,o=this.yAxis;if(!(!this.stacked||!s||!o)){var n=this.chart,l=n.series.indexOf(this),h;if(s!=this.baseAxis&&s instanceof At&&(h=this.xField),o!=this.baseAxis&&o instanceof At&&(h=this.yField),!h)return;t.setCalculatedValue(h,0,"stack"),t.setCalculatedValue(h,0,"stackTrue"),ii(n.series.range(0,l).backwards().iterator(),function(u){if(u.xAxis==s&&u.yAxis==o&&u.className==r.className){u.stackedSeries=r;var p=u.dataItems.getIndex(t.index);if(p&&p.hasValue(r._xValueFields)&&p.hasValue(r._yValueFields)){var d=t.getValue(h),c=void 0,f=p.getValue(h,"stackTrue");f==null&&(f=0);var g=p.getValue(h)+f;if(c=p.getWorkingValue(h)+p.getValue(h,"stack"),r.stackToNegative){if(d>=0&&g>=0||d<0&&g<0)return t.setCalculatedValue(h,c,"stack"),t.setCalculatedValue(h,g,"stackTrue"),!1;if(!u.stacked)return!1}else return t.setCalculatedValue(h,c,"stack"),t.setCalculatedValue(h,g,"stackTrue"),!1}else if(!u.stacked)return!1}return!0})}},Object.defineProperty(e.prototype,"stackToNegative",{get:function(){return this.getPropertyValue("stackToNegative")},set:function(t){this.setPropertyValue("stackToNegative",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xField",{get:function(){return this._xField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yField",{get:function(){return this._yField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xOpenField",{get:function(){return this._xOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yOpenField",{get:function(){return this._yOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipXField",{get:function(){return this._tooltipXField?this._tooltipXField:this._xField},set:function(t){this._tooltipXField=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipYField",{get:function(){return this._tooltipYField?this._tooltipYField:this._yField},set:function(t){this._tooltipYField=t},enumerable:!0,configurable:!0}),e.prototype.min=function(t){return this._tmin.getKey(t.uid)},e.prototype.max=function(t){return this._tmax.getKey(t.uid)},e.prototype.selectionMin=function(t){var i=this._smin.getKey(t.uid);return i},e.prototype.selectionMax=function(t){var i=this._smax.getKey(t.uid);return i},e.prototype.processConfig=function(t){if(t){if(C(t.baseAxis)&&vt(t.baseAxis)&&(this.map.hasKey(t.baseAxis)?t.baseAxis=this.map.getKey(t.baseAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+t.baseAxis+'" found for `baseAxis`.'),delete t.baseAxis)),C(t.xAxis)&&vt(t.xAxis)&&(this.map.hasKey(t.xAxis)?t.xAxis=this.map.getKey(t.xAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+t.xAxis+'" found for `xAxis`.'),delete t.xAxis)),C(t.yAxis)&&vt(t.yAxis)&&(this.map.hasKey(t.yAxis)?t.yAxis=this.map.getKey(t.yAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+t.yAxis+'" found for `yAxis`.'),delete t.yAxis)),C(t.axisRanges)&&oe(t.axisRanges))for(var i=0,r=t.axisRanges.length;i<r;i++){var s=t.axisRanges[i];C(s.type)||(s.type="AxisDataItem"),C(s.axis)&&vt(s.axis)&&this.map.hasKey(s.axis)?s.component=this.map.getKey(s.axis):C(s.component)&&vt(s.component)&&this.map.hasKey(s.component)&&(s.component=this.map.getKey(s.component))}(!C(t.dataFields)||!Kt(t.dataFields))&&this.processingErrors.push("`dataFields` is not set for series ["+(this.name||"unnamed")+"]")}a.prototype.processConfig.call(this,t)},e.prototype.getPoint=function(t,i,r,s,o,n,l){if(this.xAxis&&this.yAxis){var h=this.xAxis.getX(t,i,s),u=this.yAxis.getY(t,r,o);return h=J(h,-this._maxxX,this._maxxX),u=J(u,-this._maxxY,this._maxxY),{x:h,y:u}}},e.prototype.updateItemReaderText=function(){if(!this._itemReaderTextChanged){var t="";at(this.dataFields,function(i,r){t+="{"+i+"} "}),this.itemReaderText=t,this._itemReaderTextChanged=!1}},Object.defineProperty(e.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(t){this.setPropertyValue("cursorTooltipEnabled",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorHoverEnabled",{get:function(){return this.getPropertyValue("cursorHoverEnabled")},set:function(t){this.setPropertyValue("cursorHoverEnabled",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"excludeFromTotal",{get:function(){return this.getPropertyValue("excludeFromTotal")},set:function(t){this.setPropertyValue("excludeFromTotal",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideTooltipWhileZooming",{get:function(){return this.getPropertyValue("hideTooltipWhileZooming")},set:function(t){this.setPropertyValue("hideTooltipWhileZooming",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(t){this.setPropertyValue("maskBullets",t);var i=this.chart;i&&(t?this.bulletsContainer.parent=i.bulletsContainer:this.bulletsContainer.parent=i.axisBulletsContainer)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){this.groupFields=tr(t.groupFields,{}),a.prototype.copyFrom.call(this,t)},e.prototype.dispose=function(){this.scrollbarSeries&&this.scrollbarSeries.dispose(),a.prototype.dispose.call(this)},e})(Ja);w.registeredClasses.XYSeries=es;w.registeredClasses.XYSeriesDataItem=hn;var $l=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="LineSeriesSegment",t.isMeasured=!1,t.interactionsEnabled=!1,t.layout="none";var i=t.createChild(rt);t.fillSprite=i,i.shouldClone=!1,i.setElement(t.paper.add("path")),i.isMeasured=!1,t._disposers.push(i);var r=t.createChild(rt);return t.strokeSprite=r,r.shouldClone=!1,r.fill=nt(),r.setElement(t.paper.add("path")),r.isMeasured=!1,t._disposers.push(r),t}return e.prototype.drawSegment=function(t,i,r,s){if(!this.disabled)if(t.length>0&&i.length>0&&P(t[0].x)&&P(t[0].y)){var o=z({x:t[0].x-.2,y:t[0].y-.2})+z(t[0]),n=this.series;n.smoothing=="bezier"?o+=new jr(r,s).smooth(t):n.smoothing=="monotoneX"?o+=new $m({closed:!1}).smooth(t):n.smoothing=="monotoneY"&&(o+=new wm({closed:!1}).smooth(t)),this.strokeOpacity==0||this.strokeSprite.strokeOpacity==0||(this.strokeSprite.path=o),(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&P(i[0].x)&&P(i[0].y)&&(o+=V(i[0]),n.smoothing=="bezier"?o+=new jr(r,s).smooth(i):n.smoothing=="monotoneX"?o+=new $m({closed:!1}).smooth(i):n.smoothing=="monotoneY"&&(o+=new wm({closed:!1}).smooth(i)),o+=V(t[0]),o+=pe(),this.fillSprite.path=o)}else this.fillSprite.path="",this.strokeSprite.path=""},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t);var i=this.strokeSprite;_e(t,i.properties,fe),i.events.copyFrom(t.strokeSprite.events),i.fillOpacity=0;var r=this.fillSprite;_e(t,r.properties,fe),r.events.copyFrom(t.fillSprite.events),r.strokeOpacity=0},e})(Q);w.registeredClasses.LineSeriesSegment=$l;var Ib=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="DurationAxisDataItem",t.applyTheme(),t}return e})(on);var Uh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._baseUnit="second",t.className="DurationAxis",t.setPropertyValue("maxZoomFactor",1e6),t.applyTheme(),t}return e.prototype.formatLabel=function(t,i){return this.durationFormatter.format(t,i||this.axisDurationFormat)},e.prototype.adjustMinMax=function(t,i,r,s,o){var n,l,h,u=this.baseUnit;if(this.setPropertyValue("maxPrecision",0),u=="millisecond"||u=="second"||u=="minute"||u=="hour"){s<=1&&(s=1),s=Math.round(s);var p=t,d=i;r===0&&(r=Math.abs(i));var c=r/s,f=[60,30,20,15,10,2,1],g=1;u=="hour"&&(f=[24,12,6,4,2,1]);try{for(var m=jo(f),y=m.next();!y.done;y=m.next()){var v=y.value;if(r/v>s){g=v;break}}}catch(k){n={error:k}}finally{try{y&&!y.done&&(l=m.return)&&l.call(m)}finally{if(n)throw n.error}}var x=Math.ceil((i-t)/g/s),_=Math.log(Math.abs(x))*Math.LOG10E,$=Math.pow(10,Math.floor(_))/10,T=x/$,S=Sv(f,T);x=S*$,c=g*x,this.durationFormatter.getValueUnit(c,this.baseUnit),t=Math.floor(t/c)*c,i=Math.ceil(i/c)*c,o&&(t-=c,t<0&&p>=0&&(t=0),i+=c,i>0&&d<=0&&(i=0)),h={min:t,max:i,step:c}}else h=a.prototype.adjustMinMax.call(this,t,i,r,s,o);return this.axisDurationFormat=this.durationFormatter.getFormat(h.step,h.max,this.baseUnit),h},Object.defineProperty(e.prototype,"tooltipDurationFormat",{get:function(){return this._tooltipDurationFormat},set:function(t){this._tooltipDurationFormat=t},enumerable:!0,configurable:!0}),e.prototype.getTooltipText=function(t){var i=H(this.positionToValue(t),this._stepDecimalPlaces),r=this.formatLabel(i,this.tooltipDurationFormat);return this._adapterO?this._adapterO.apply("getTooltipText",r):r},Object.defineProperty(e.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(t){this._baseUnit!=t&&(this._baseUnit=t,this.durationFormatter.baseUnit=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.baseUnit=t.baseUnit},e})(At);w.registeredClasses.DurationAxis=Uh;w.registeredClasses.DurationAxisDataItem=Ib;var xa=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="LineSeriesDataItem",t}return e})(hn);var wl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.minDistance=.5,t.segments=new zt(t.createSegment()),t.segments.template.applyOnClones=!0,t._disposers.push(new Ft(t.segments)),t._disposers.push(t.segments.template),t._segmentsIterator=new Yo(t.segments,function(){return t.segments.create()}),t._segmentsIterator.createNewItems=!0,t.className="LineSeries",t.strokeOpacity=1,t.fillOpacity=0,t.connect=!0,t.tensionX=1,t.tensionY=1,t.autoGapCount=1.1,t.smoothing="bezier",t.segmentsContainer=t.mainContainer.createChild(Q),t.segmentsContainer.isMeasured=!1,t.bulletsContainer.toFront(),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Line Series"))},e.prototype.createSegment=function(){return new $l},e.prototype.createDataItem=function(){return new xa},e.prototype.setInitialWorkingValues=function(t){var i=this._yAxis.get(),r=this._xAxis.get();if(this.appeared&&this.visible){var s=this.dataItems.getIndex(t.index-1);if(t.component=this,this.baseAxis==r&&i instanceof At){var o=i.minZoomed;if(s&&(o=s.values.valueY.workingValue),t.setWorkingValue("valueY",o,0),t.setWorkingValue("valueY",t.values.valueY.value),r instanceof me)t.setWorkingLocation("dateX",t.locations.dateX-1,0),t.setWorkingLocation("dateX",t.locations.dateX);else if(r instanceof Uh&&s){var n=t.valueX;t.setWorkingValue("valueX",s.valueX,0),t.setWorkingValue("valueX",n)}}if(this.baseAxis==i&&r instanceof At){var l=r.minZoomed;if(s&&(l=s.values.valueX.workingValue),t.setWorkingValue("valueX",l,0),t.setWorkingValue("valueX",t.values.valueX.value),i instanceof me)t.setWorkingLocation("dateY",t.locations.dateX-1,0),t.setWorkingLocation("dateY",t.locations.dateY);else if(i instanceof Uh&&s){var n=t.valueY;t.setWorkingValue("valueY",s.valueY,0),t.setWorkingValue("valueY",n)}}}else this.baseAxis==r&&i instanceof At&&(r instanceof me&&t.setWorkingLocation("dateX",t.locations.dateX),r instanceof Ce&&t.setWorkingLocation("categoryX",t.locations.categoryX)),this.baseAxis==i&&r instanceof At&&(i instanceof me&&t.setWorkingLocation("dateY",t.locations.dateY),i instanceof Ce&&t.setWorkingLocation("categoryY",t.locations.categoryY))},e.prototype.updateLegendValue=function(t,i){a.prototype.updateLegendValue.call(this,t,i),t&&t.segment&&(this.tooltipColorSource=t.segment)},e.prototype.validate=function(){var t=this;a.prototype.validate.call(this),this.xAxis&&this.yAxis&&(this._segmentsIterator.reset(),this.openSegmentWrapper(this._adjustedStartIndex),E(this.axisRanges.iterator(),function(i){t.openSegmentWrapper(t._adjustedStartIndex,i)}),E(this._segmentsIterator.iterator(),function(i){i.__disabled=!0}))},e.prototype.sliceData=function(){for(var t=this.startIndex,i=this.endIndex,r=this.startIndex-1;r>=0;r--){var s=this.dataItems.getIndex(r);if(s&&s.hasValue(this._xValueFields)&&s.hasValue(this._yValueFields)){t=r;break}}this._adjustedStartIndex=this.findAdjustedIndex(t,["stroke","strokeWidth","strokeDasharray","strokeOpacity","fill","fillOpacity","opacity"]);for(var r=this.endIndex,o=this.dataItems.length;r<o;r++){var s=this.dataItems.getIndex(r);if(s&&s.hasValue(this._xValueFields)&&s.hasValue(this._yValueFields)){i=r+1;break}}this._workingStartIndex=t,this._workingEndIndex=i},e.prototype.findAdjustedIndex=function(t,i){var r=this,s=this.propertyFields,o=t;return W(i,function(n){if(C(s[n]))for(var l=o;l>=0;l--){var h=r.dataItems.getIndex(l);if(h&&C(h.properties[n])){t>l&&(t=l);break}}}),t},e.prototype.openSegmentWrapper=function(t,i){var r={index:t,axisRange:i};do r=this.openSegment(r.index,r.axisRange);while(r)},e.prototype.getSegment=function(){var t=this._segmentsIterator.getFirst();return t.series=this,t.isDisposed()?(this.segments.removeValue(t),this.getSegment()):t},e.prototype.openSegment=function(t,i){var r=!1,s=[];t=Math.min(t,this.dataItems.length);var o=Math.min(this._workingEndIndex,this.dataItems.length);this._workingEndIndex=Math.min(this._workingEndIndex,this.dataItems.length);var n,l=!1,h=this.getSegment();h.strokeDasharray=void 0,h.__disabled=!1,i?(h.parent=i.contents,_e(i.contents,h,fe)):(_e(this,h,fe),h.filters.clear(),h.parent=this.segmentsContainer),this.group.node.removeAttribute("fill");for(var u=this.connect,p=!1,d=t;d<o;d++){var c=this.dataItems.getIndex(d);if(c.segment=h,c.hasProperties&&(d==t?this.updateSegmentProperties(c.properties,h):l=this.updateSegmentProperties(c.properties,h,!0)),c.hasValue(this._xValueFields)&&c.hasValue(this._yValueFields))this.addPoints(s,c,this.xField,this.yField),p=!0;else{if(d==t)continue;if(!u&&p){n=d;break}}if(n=d,this.baseAxis instanceof me){var f=this.dataItems.getIndex(d+1);if(f&&this.baseAxis.makeGap(f,c)){r=!0;break}}if(l)break}return this.closeSegment(h,s,t,n,i,r)},e.prototype.addPoints=function(t,i,r,s,o){var n=this.getPoint(i,r,s,i.workingLocations[r],i.workingLocations[s]);o||(i.point=n),t.push(n)},e.prototype.closeSegment=function(t,i,r,s,o,n){var l=[];if(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)for(var h=s;h>=r;h--){var u=this.dataItems.getIndex(h);u.hasValue(this._xValueFields)&&u.hasValue(this._yValueFields)&&this.addPoints(l,u,this.xOpenField,this.yOpenField,!0)}else{var p=this.baseAxis,d=i.length,c=this.xAxis,f=this.yAxis;d>0&&(p==c?(l.push({x:i[d-1].x,y:f.basePoint.y}),l.push({x:i[0].x,y:f.basePoint.y})):(l.push({x:c.basePoint.x,y:i[d-1].y}),l.push({x:c.basePoint.x,y:i[0].y})))}return this.drawSegment(t,i,l),n&&s++,s<this._workingEndIndex-1?{index:s,axisRange:o}:null},e.prototype.drawSegment=function(t,i,r){t.drawSegment(i,r,this.tensionX,this.tensionY)},e.prototype.updateSegmentProperties=function(t,i,r){var s=!1;return at(t,function(o,n){if(C(n)){var l=i[o],h=void 0;l&&(l.toString?h=l.toString():h=l);var u=void 0;n&&(n.toString?u=n.toString():u=n),l==n||h!=null&&u!=null&&h==u||(r||(i[o]=n),s=!0)}}),s},Object.defineProperty(e.prototype,"connect",{get:function(){return this.getPropertyValue("connect")},set:function(t){this.setPropertyValue("connect",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tensionX",{get:function(){return this.getPropertyValue("tensionX")},set:function(t){this.setPropertyValue("tensionX",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tensionY",{get:function(){return this.getPropertyValue("tensionY")},set:function(t){this.setPropertyValue("tensionY",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){var i=this,r=t.pixelWidth,s=t.pixelHeight;t.disposeChildren();var o=t.createChild(Ei);if(o.shouldClone=!1,_e(this,o,fe),o.x2=r,o.y=s/2,o.y2=1e-5,o.visible=!0,this.fillOpacity>0){var n=t.createChild(Ua);_e(this,n,fe),n.width=r,n.height=s,n.y=0,n.strokeOpacity=0,n.visible=!0,o.y=0}var l=t.dataItem;l.color=this.stroke,l.colorOrig=this.fill,ii(this.bullets.iterator(),function(h){if(h instanceof Vi&&!h.copyToLegendMarker)return!1;var u=!1;if(h instanceof Q&&E(h.children.iterator(),function(d){if(d instanceof Me)return u=!0,!0}),!u){var p=h.clone();return p.parent=t,p.isMeasured=!0,p.tooltipText=void 0,p.x=r/2,i.fillOpacity>0?p.y=0:p.y=s/2,p.visible=!0,C(p.fill)||(p.fill=i.fill),C(p.stroke)||(p.stroke=i.stroke),!1}})},e.prototype.disposeData=function(){a.prototype.disposeData.call(this),this.segments.clear()},Object.defineProperty(e.prototype,"autoGapCount",{get:function(){return this.getPropertyValue("autoGapCount")},set:function(t){this.setPropertyValue("autoGapCount",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothing",{get:function(){return this.getPropertyValue("smoothing")},set:function(t){this.setPropertyValue("smoothing",t,!0)},enumerable:!0,configurable:!0}),e})(es);w.registeredClasses.LineSeries=wl;w.registeredClasses.LineSeriesDataItem=xa;var ro=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.fdx=0,t.fdy=0,t.className="AxisLabelCircular",t.padding(0,0,0,0),t.location=.5,t.locationOnPath=.5,t.radius=0,t.isMeasured=!1,t.applyTheme(),t}return Object.defineProperty(e.prototype,"relativeRotation",{get:function(){return this.getPropertyValue("relativeRotation")},set:function(t){if(this.setPropertyValue("relativeRotation",t,!0),!C(t)){this.rotation=void 0;var i=this.dataItem;i&&i.component&&i.component.invalidateDataItems()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bent",{get:function(){return this.getPropertyValue("bent")},set:function(t){this.setPropertyValue("bent",t,!0),this.setPropertyValue("wrap",!1),this.setPropertyValue("horizontalCenter","none"),this.setPropertyValue("verticalCenter","none"),t?(this.setPropertyValue("dx",0),this.setPropertyValue("dy",0),this.setPropertyValue("x",0),this.setPropertyValue("y",0),this.setPropertyValue("rotation",0),this.fdx=0,this.fdy=0,this.textAlign="middle"):this.textPathElement&&(this.textPathElement.dispose(),this.textPathElement=void 0)},enumerable:!0,configurable:!0}),e.prototype.pixelRadius=function(t){var i=1;return this.inside&&(i=-1),te(this.radius,t)*i},e.prototype.pixelRadiusY=function(t,i){var r=1;this.inside&&(r=-1);var s=this.radius;return P(s)?(s*=i/t,te(s,t)*r):te(s,i)*r},e.prototype.fixPosition=function(t,i,r,s,o){P(r)||(r=i),P(s)||(s=0),P(o)||(o=0);var n={x:i*U(t),y:r*G(t)};this.invalid&&this.validate();var l=!1,h=this.radius;(h instanceof _t&&h.value<0||h<0)&&(l=!0);var u=this.relativeRotation,p=this.pixelRadius(i);if(this.bent){var d={x:(i+p)*U(t+180),y:(r+p*r/i)*G(t+180)};this.path=z(d)+Ne(t+180,360,i+p,r+p*r/i),this.textPathElement&&this.textPathElement.attr({startOffset:this.locationOnPath*100+"%"});return}if(P(u)){this.horizontalCenter="none",this.verticalCenter="none",t=Vr(t,-180,180);var c=this.bbox.width,f=this.bbox.height,g=this.pixelPaddingBottom,m=this.pixelPaddingTop,y=this.pixelPaddingLeft,v=this.pixelPaddingRight;t>90||t<-90?u==-90&&(u=90,c=0):(u==-90&&(f=-f),u==90&&(u=-90,c=-y-v,f=-f-m-g)),this.rotation=u+t+90;var x=G(u)/2,_=U(u)/2,$=this.rotation;this.dx=f*x*G($)-c*_*U($),this.dy=-f*x*U($)-c*_*G($),this.inside?t>90||t<-90?p-=(g+m)*U(u)+(y+v)*G(u):p+=(g+this.bbox.height+m)*U(u)+(y+v+this.bbox.width)*G(u):p+=(f+g+m)*U(u)+(c+y+v)*G(u),n.x+=U(t)*p,n.y+=G(t)*p*r/i}else this.horizontalCenter="middle",this.verticalCenter="middle",l?(this.dx=0,this.dy=0,n.x=(i+p)*U(t),n.y=(r+p*r/i)*G(t)):(this.dy=this._measuredHeight/2*G(t),this.dx=this._measuredWidth/2*U(t),n.x+=U(t)*p,n.y+=G(t)*p*r/i);n.x+=s,n.y+=o,this.fdx=this.dx,this.fdy=this.dy,this.moveTo(n)},e})(_l);w.registeredClasses.AxisLabelCircular=ro;var Cl=(function(a){D(e,a);function e(t){var i=a.call(this,t)||this;return i.className="AxisFillCircular",i.element=i.paper.add("path"),i.radius=N(100),i.applyTheme(),i}return e.prototype.draw=function(){if(a.prototype.draw.call(this),!(this.__disabled||this.disabled)&&this.axis){var t=this.axis.renderer;this.fillPath=t.getPositionRangePath(this.startPosition,this.endPosition,this.radius,C(this.innerRadius)?this.innerRadius:t.innerRadius,this.cornerRadius),this.path=this.fillPath}},Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),e})(to);w.registeredClasses.AxisFillCircular=Cl;var qp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="GridCircular",t.pixelPerfect=!1,t.applyTheme(),t}return Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),e})(eo);w.registeredClasses.GridCircular=qp;var Zp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.pixelRadiusReal=0,t.layout="none",t.className="AxisRendererCircular",t.isMeasured=!1,t.startAngle=-90,t.endAngle=270,t.useChartAngles=!0,t.radius=N(100),t.isMeasured=!1,t.grid.template.location=0,t.labels.template.location=0,t.labels.template.radius=15,t.ticks.template.location=0,t.ticks.template.pixelPerfect=!1,t.tooltipLocation=0,t.line.strokeOpacity=0,t.applyTheme(),t}return e.prototype.setAxis=function(t){var i=this;a.prototype.setAxis.call(this,t),t.isMeasured=!1;var r=t.tooltip;r.adapter.add("dx",function(s,o){var n=ki({x:o.pixelX,y:o.pixelY},i);return i.pixelRadius*Math.cos(Math.atan2(n.y,n.x))-n.x}),r.adapter.add("dy",function(s,o){var n=ki({x:o.pixelX,y:o.pixelY},i);return i.pixelRadius*Math.sin(Math.atan2(n.y,n.x))-n.y})},e.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},Object.defineProperty(e.prototype,"axisLength",{get:function(){return 2*Math.PI*this.pixelRadius},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return Oe(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){var t=this.chart,i=this.getPropertyValue("innerRadius");if(t){if(!C(i))i=t.innerRadius,i instanceof _t&&t&&(i=N(i.value*t.innerRadiusModifyer*100));else if(i instanceof _t&&t){var r=t.mr,s=i.value;s=Math.max(r*s,r-Math.min(t.plotContainer.innerHeight,t.plotContainer.innerWidth))/r,i=N(s*100)}return i}},set:function(t){this.setPercentProperty("innerRadius",t,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useChartAngles",{get:function(){return this.getPropertyValue("useChartAngles")},set:function(t){this.setPropertyValue("useChartAngles",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return Oe(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,i){P(i)||(i=1);var r=this.positionToCoordinate(t),s=this.startAngle+(this.endAngle-this.startAngle)*r/this.axisLength,o=this.pixelRadius,n=this.pixelInnerRadius;if(this.axisRendererY){var l=J(this.axisRendererY.positionToCoordinate(i),0,1/0);l==0&&(l=1e-6);var h={x:l*U(s),y:l*G(s)};return h}return{x:U(s)*n+(o-n)*U(s)*i,y:G(s)*n+(o-n)*G(s)*i}},e.prototype.positionToAngle=function(t){var i=this.axis,r=(this.endAngle-this.startAngle)/(i.end-i.start),s;return i.renderer.inversed?s=this.startAngle+(i.end-t)*r:s=this.startAngle+(t-i.start)*r,H(s,3)},e.prototype.angleToPosition=function(t){var i=this.axis,r=(this.endAngle-this.startAngle)/(i.end-i.start),s;return i.renderer.inversed?s=i.end-(t-this.startAngle)/r:s=(t-this.startAngle)/r+i.start,H(s,5)},e.prototype.updateAxisLine=function(){var t=this.pixelRadius,i=this.startAngle,r=this.endAngle,s=Pt(360,r-i);this.line.path=z({x:t*U(i),y:t*G(i)})+Ne(i,s,t,t)},e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);if(P(s.x)&&P(s.y)&&t.element){var o=Rs*Math.atan2(s.y,s.x),n=Oe(C(t.radius)?t.radius:N(100),this.pixelRadius),l=Oe(t.innerRadius,this.pixelRadius);t.zIndex=0;var h=Oe(P(l)?l:this.innerRadius,this.pixelRadiusReal,!0);P(h)||(h=0),t.path=z({x:h*U(o),y:h*G(o)})+V({x:n*U(o),y:n*G(o)})}this.toggleVisibility(t,i,0,1)},e.prototype.updateTickElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);if(t.element){var o=this.pixelRadius,n=Rs*Math.atan2(s.y,s.x),l=t.length;t.inside&&(l=-l),t.zIndex=1,t.path=z({x:o*U(n),y:o*G(n)})+V({x:(o+l)*U(n),y:(o+l)*G(n)})}this.toggleVisibility(t,i,0,1)},e.prototype.updateBullet=function(t,i,r){var s=.5;t instanceof Gs&&(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i),n=this.pixelRadius,l=Rs*Math.atan2(o.y,o.x);o={x:n*U(l),y:n*G(l)},this.positionItem(t,o),this.toggleVisibility(t,i,0,1)},e.prototype.updateLabelElement=function(t,i,r,s){C(s)||(s=t.location),i=i+(r-i)*s,t.fixPosition(this.positionToAngle(i),this.pixelRadius),t.zIndex=2,this.toggleVisibility(t,i,this.minLabelPosition,this.maxLabelPosition)},e.prototype.fitsToBounds=function(t){return!0},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e.prototype.getPositionRangePath=function(t,i,r,s,o){var n="";if(P(t)&&P(i)){C(r)||(r=this.radius),t=mt(t,this.axis.start),i=Pt(i,this.axis.end),i<t&&(i=t);var l=Oe(r,this.pixelRadius),h=Oe(s,this.pixelRadius,!0),u=this.positionToAngle(t),p=this.positionToAngle(i),d=p-u;n=ts(u,d,l,h,l,o)}return n},e.prototype.createGrid=function(){return new qp},e.prototype.createFill=function(t){return new Cl(t)},e.prototype.createLabel=function(){return new ro},e.prototype.pointToPosition=function(t){var i=Vr(Ae(t),this.startAngle,this.endAngle);return this.coordinateToPosition((i-this.startAngle)/360*this.axisLength)},e})(io);w.registeredClasses.AxisRendererCircular=Zp;var Dr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Circle",t.element=t.paper.add("circle"),t.setPercentProperty("radius",N(100)),t.setPropertyValue("horizontalCenter","middle"),t.setPropertyValue("verticalCenter","middle"),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this),this.element.attr({r:this.pixelRadius})},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return te(this.radius,Pt(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){var t=this.pixelRadius;this._bbox={x:-t,y:-t,width:t*2,height:t*2}},e})(rt);w.registeredClasses.Circle=Dr;var Jp=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Trapezoid",t.element=t.paper.add("path"),t.topSide=N(100),t.bottomSide=N(100),t.leftSide=N(100),t.rightSide=N(100),t.isMeasured=!1,t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.pixelWidth,i=this.pixelHeight,r=te(this.topSide,t),s=te(this.bottomSide,t),o=te(this.leftSide,i),n=te(this.rightSide,i),l=(t-r)/2,h=(i-o)/2,u=t-(t-r)/2,p=(i-n)/2,d=t-(t-s)/2,c=i-(i-n)/2,f=(t-s)/2,g=i-(i-o)/2,m="",y="",v="",x="";if(C(this.horizontalNeck)){var _=this.horizontalNeck.value;m=V({x:t*_,y:Math.max(h,p)}),v=V({x:t*_,y:Math.min(c,g)})}if(C(this.verticalNeck)){var $=this.verticalNeck.value;y=V({x:Math.min(u,d),y:i*$}),x=V({x:Math.max(l,f),y:i*$})}var T=z({x:l,y:h})+m+V({x:u,y:p})+y+V({x:d,y:c})+v+V({x:f,y:g})+x;this.path=T},Object.defineProperty(e.prototype,"topSide",{get:function(){return this.getPropertyValue("topSide")},set:function(t){this.setPercentProperty("topSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomSide",{get:function(){return this.getPropertyValue("bottomSide")},set:function(t){this.setPercentProperty("bottomSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftSide",{get:function(){return this.getPropertyValue("leftSide")},set:function(t){this.setPercentProperty("leftSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightSide",{get:function(){return this.getPropertyValue("rightSide")},set:function(t){this.setPercentProperty("rightSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalNeck",{get:function(){return this.getPropertyValue("horizontalNeck")},set:function(t){this.setPropertyValue("horizontalNeck",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalNeck",{get:function(){return this.getPropertyValue("verticalNeck")},set:function(t){this.setPropertyValue("verticalNeck",t,!0)},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Trapezoid=Jp;var Qp=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._axis=new ce,t.className="ClockHand";var i=new ct;t.fill=i.getFor("alternativeBackground"),t.stroke=t.fill;var r=new Dr;r.radius=5,t.pin=r,t.isMeasured=!1,t.startWidth=5,t.endWidth=1,t.width=N(100),t.height=N(100),t.radius=N(100),t.innerRadius=N(0);var s=new Jp;return t.hand=s,t._disposers.push(t._axis),t.applyTheme(),t}return e.prototype.validate=function(){a.prototype.validate.call(this);var t=this.hand;t.width=this.pixelWidth;var i=Math.max(this.startWidth,this.endWidth);if(t.height=i,t.leftSide=N(this.startWidth/i*100),t.rightSide=N(this.endWidth/i*100),this.axis){var r=this.axis.renderer,s=Oe(this.innerRadius,r.pixelRadius),o=Oe(this.radius,r.pixelRadius);t.x=s,t.y=-i/2,t.width=o-s}},Object.defineProperty(e.prototype,"pin",{get:function(){return this._pin},set:function(t){this._pin&&this.removeDispose(this._pin),t&&(this._pin=t,t.parent=this,this._disposers.push(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hand",{get:function(){return this._hand},set:function(t){this._hand&&this.removeDispose(this._hand),t&&(this._hand=t,t.parent=this,this._disposers.push(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startWidth",{get:function(){return this.getPropertyValue("startWidth")},set:function(t){this.setPropertyValue("startWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endWidth",{get:function(){return this.getPropertyValue("endWidth")},set:function(t){this.setPropertyValue("endWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationDirection",{get:function(){return this.getPropertyValue("rotationDirection")},set:function(t){this.setPropertyValue("rotationDirection",t)},enumerable:!0,configurable:!0}),e.prototype.showValue=function(t,i,r){if(this._value=t,t!=null&&(P(i)||(i=0),this.axis)){var s=this.axis.renderer,o=s.positionToAngle(this.axis.anyToPosition(t)),n=this.rotation;this.rotationDirection=="clockWise"&&o<n&&(this.rotation=n-360),this.rotationDirection=="counterClockWise"&&o>n&&(this.rotation=n+360),this.animate({property:"rotation",to:o},i,r)}},Object.defineProperty(e.prototype,"currentPosition",{get:function(){if(this.axis){var t=this.axis.renderer;return t.angleToPosition(this.rotation)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this.showValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axis",{get:function(){return this._axis.get()},set:function(t){if(this.axis!=t&&this._axis.set(t,new Bt([t.events.on("datavalidated",this.updateValue,this,!1),t.events.on("datarangechanged",this.updateValue,this,!1),t.events.on("dataitemsvalidated",this.updateValue,this,!1),t.events.on("propertychanged",this.invalidate,this,!1)])),t){var i=t.chart;i&&(this.rotation=i.startAngle)}this.parent=t.renderer,this.zIndex=5},enumerable:!0,configurable:!0}),e.prototype.updateValue=function(){this.value=this.value},e.prototype.processConfig=function(t){t&&C(t.axis)&&vt(t.axis)&&this.map.hasKey(t.axis)&&(t.axis=this.map.getKey(t.axis)),a.prototype.processConfig.call(this,t)},e})(Q);w.registeredClasses.ClockHand=Qp;var Tm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarSeriesDataItem",t.setLocation("dateX",0,0),t.setLocation("dateY",0,0),t.setLocation("categoryX",0,0),t.setLocation("categoryY",0,0),t.applyTheme(),t}return e})(xa);var td=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarSeries",t.connectEnds=!0,t.applyTheme(),t}return e.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},e.prototype.createDataItem=function(){return new Tm},e.prototype.getPoint=function(t,i,r,s,o,n,l){n||(n="valueX"),l||(l="valueY");var h=this.yAxis.getX(t,r,o,l),u=this.yAxis.getY(t,r,o,l),p=Mt({x:h,y:u});p==0&&(p=1e-5);var d=this.xAxis.getAngle(t,i,s,n),c=this.chart.startAngle,f=this.chart.endAngle;if(!(d<c||d>f))return{x:p*U(d),y:p*G(d)}},e.prototype.addPoints=function(t,i,r,s,o){var n=this.getPoint(i,r,s,i.locations[r],i.locations[s]);n&&t.push(n)},e.prototype.getMaskPath=function(){var t=this.yAxis.renderer;return ts(t.startAngle,t.endAngle-t.startAngle,t.pixelRadius,t.pixelInnerRadius)},e.prototype.drawSegment=function(t,i,r){var s=this.yAxis,o=s.renderer;this.connectEnds&&Math.abs(o.endAngle-o.startAngle)==360&&(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)&&(i.push(i[0]),r.length>0&&r.unshift(r[r.length-1])),a.prototype.drawSegment.call(this,t,i,r)},Object.defineProperty(e.prototype,"connectEnds",{get:function(){return this.getPropertyValue("connectEnds")},set:function(t){this.setPropertyValue("connectEnds",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionBulletReal=function(t,i,r){var s=this.xAxis,o=this.yAxis;(i<s.start||i>s.end||r<o.start||r>o.end)&&(t.visible=!1),t.moveTo(this.xAxis.renderer.positionToPoint(i,r))},e.prototype.setXAxis=function(t){a.prototype.setXAxis.call(this,t),this.updateRendererRefs()},e.prototype.setYAxis=function(t){a.prototype.setYAxis.call(this,t),this.updateRendererRefs()},e.prototype.updateRendererRefs=function(){var t=this.xAxis.renderer,i=this.yAxis.renderer;t.axisRendererY=i},e})(wl);w.registeredClasses.RadarSeries=td;w.registeredClasses.RadarSeriesDataItem=Tm;var Sl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="WavedCircle",t.element=t.paper.add("path"),t.waveLength=16,t.waveHeight=4,t.fill=void 0,t.fillOpacity=0,t.tension=.8,t.applyTheme(),t}return e.prototype.draw=function(){var t="",i=this.pixelRadius;if(i>0){var r=this.getPoints(i);t=z(r[0])+new jr(this.tension,this.tension).smooth(r)}var s=this.pixelInnerRadius;if(s>0){var r=this.getPoints(s);r.reverse(),t+=z(r[0])+new jr(this.tension,this.tension).smooth(r)}this.path=t},e.prototype.getPoints=function(t){for(var i=t*Math.PI*2,r=this.waveHeight/2,s=i/Math.round(i/this.waveLength),o=s/2,n=[],l=i/s,h=0;h<=l;h++){var u=h*s/i*360,p=(h*s+o)/i*360;n.push({x:(t-r)*U(u),y:(t-r)*G(u)}),n.push({x:(t+r)*U(p),y:(t+r)*G(p)})}return n.pop(),n},Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return te(this.innerRadius,Pt(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),e})(Dr);w.registeredClasses.WavedCircle=Sl;var ed=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._chart=new ce,t.pixelRadiusReal=0,t.className="AxisRendererRadial",t.isMeasured=!1,t.startAngle=-90,t.endAngle=270,t.minGridDistance=30,t.gridType="circles",t.axisAngle=-90,t.isMeasured=!1,t.layout="none",t.radius=N(100),t.line.strokeOpacity=0,t.labels.template.horizontalCenter="middle",t._disposers.push(t._chart),t.applyTheme(),t}return e.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},Object.defineProperty(e.prototype,"axisLength",{get:function(){return this.pixelRadius-this.pixelInnerRadius},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return Oe(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){var t=this.chart,i=this.getPropertyValue("innerRadius");if(t){if(!C(i))i=t.innerRadius,i instanceof _t&&t&&(i=N(i.value*t.innerRadiusModifyer*100));else if(i instanceof _t&&t){var r=t.mr,s=i.value;s=Math.max(r*s,r-Math.min(t.plotContainer.innerHeight,t.plotContainer.innerWidth))/r,i=N(s*100)}}return i},set:function(t){this.setPercentProperty("innerRadius",t,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return Oe(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,i){var r=J(this.positionToCoordinate(t),0,1/0);return{x:r*U(this.axisAngle),y:r*G(this.axisAngle)}},e.prototype.updateAxisLine=function(){this.line.path=z({x:this.pixelInnerRadius*U(this.axisAngle),y:this.pixelInnerRadius*G(this.axisAngle)})+V({x:this.pixelRadius*U(this.axisAngle),y:this.pixelRadius*G(this.axisAngle)});var t=this.axis.title;t.valign="none",t.horizontalCenter="middle",t.verticalCenter="bottom",t.y=-this.axisLength/2;var i=90;this.opposite?this.inside||(i=-90):this.inside&&(i=-90),t.rotation=i},e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i),o,n=Mt(s),l=this.startAngle,h=this.endAngle,u=this.chart;if(P(n)&&t.element&&u){var p=u.xAxes.getIndex(0),d=0,c=u.series.getIndex(0);if(c&&(d=c.dataItems.length),this.gridType=="polygons"&&d>0&&c&&p&&p instanceof Ce){var f=p.renderer.grid.template.location,g=p.getAngle(c.dataItems.getIndex(0),"categoryX",f);o=z({x:n*U(g),y:n*G(g)});for(var m=1;m<d;m++)g=p.getAngle(c.dataItems.getIndex(m),"categoryX",f),o+=V({x:n*U(g),y:n*G(g)});g=p.getAngle(c.dataItems.getIndex(d-1),"categoryX",p.renderer.cellEndLocation),o+=V({x:n*U(g),y:n*G(g)})}else o=z({x:n*U(l),y:n*G(l)})+Ne(l,h-l,n,n);t.path=o}this.toggleVisibility(t,i,0,1)},e.prototype.updateLabelElement=function(t,i,r,s){C(s)||(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i);this.positionItem(t,o),this.toggleVisibility(t,i,this.minLabelPosition,this.maxLabelPosition)},e.prototype.updateBaseGridElement=function(){},e.prototype.fitsToBounds=function(t){return!0},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t)&&this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t)&&this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisAngle",{get:function(){return this.getPropertyValue("axisAngle")},set:function(t){this.setPropertyValue("axisAngle",Ms(t)),this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridType",{get:function(){var t=this.chart.xAxes.getIndex(0);return t instanceof Ce?this.getPropertyValue("gridType"):"circles"},set:function(t){this.setPropertyValue("gridType",t,!0)},enumerable:!0,configurable:!0}),e.prototype.getPositionRangePath=function(t,i){var r=this.pixelInnerRadius,s=this.axisLength+r,o=J(this.positionToCoordinate(t),r,s),n=J(this.positionToCoordinate(i),r,s),l=this.startAngle,h=this.endAngle,u=h-l,p,d=this.chart,c=d.xAxes.getIndex(0),f=d.series.getIndex(0),g=0;if(f&&(g=f.dataItems.length),this.gridType=="polygons"&&g>0&&f&&c&&c instanceof Ce){var m=c.renderer.grid.template.location,y=c.getAngle(f.dataItems.getIndex(0),"categoryX",m);p=z({x:n*U(y),y:n*G(y)});for(var v=1;v<g;v++)y=c.getAngle(f.dataItems.getIndex(v),"categoryX",m),p+=V({x:n*U(y),y:n*G(y)});y=c.getAngle(f.dataItems.getIndex(g-1),"categoryX",c.renderer.cellEndLocation),p+=V({x:n*U(y),y:n*G(y)}),p+=z({x:o*U(y),y:o*G(y)});for(var v=g-1;v>=0;v--)y=c.getAngle(f.dataItems.getIndex(v),"categoryX",m),p+=V({x:o*U(y),y:o*G(y)})}else p=ts(l,u,n,o);return p},e.prototype.updateBreakElement=function(t){var i=t.startLine,r=t.endLine,s=t.fillShape,o=t.startPoint,n=t.endPoint;i.radius=Math.abs(o.y),r.radius=Math.abs(n.y),s.radius=Math.abs(n.y),s.innerRadius=Math.abs(o.y)},e.prototype.createBreakSprites=function(t){t.startLine=new Sl,t.endLine=new Sl,t.fillShape=new Sl},e.prototype.updateTooltip=function(){var t=this.axis;if(t){var i=4e3,r=-4e3,s=-4e3,o=i*2,n=i*2,l=this.axisAngle;l<0&&(l+=360);var h="vertical";(l>45&&l<135||l>225&&l<315)&&(h="horizontal"),this.axis.updateTooltip(h,{x:r,y:s,width:o,height:n})}},e.prototype.updateTickElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);if(t.element){var o=Ms(this.axisAngle+90);o/90!=Math.round(o/90)?t.pixelPerfect=!1:t.pixelPerfect=!0;var n=-t.length;t.inside&&(n*=-1),t.path=z({x:0,y:0})+V({x:n*U(o),y:n*G(o)})}this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateBullet=function(t,i,r){var s=.5;t instanceof Gs&&(s=t.location),i=i+(r-i)*s;var o=this.positionToPoint(i);this.positionItem(t,o),this.toggleVisibility(t,i,0,1)},e.prototype.positionToCoordinate=function(t){var i,r=this.axis,s=r.axisFullLength,o=this.pixelInnerRadius;return r.renderer.inversed?i=(r.end-t)*s+o:i=(t-r.start)*s+o,H(i,1)},e.prototype.pointToPosition=function(t){var i=Mt(t)-this.pixelInnerRadius;return this.coordinateToPosition(i)},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){this._chart.set(t,null)},enumerable:!0,configurable:!0}),e})(Ni);w.registeredClasses.AxisRendererRadial=ed;var Dm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarChartDataItem",t.applyTheme(),t}return e})(ln);var id=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._axisRendererX=Zp,t._axisRendererY=ed,t.innerRadiusModifyer=1,t.mr=1,t.className="RadarChart",t.startAngle=-90,t.endAngle=270,t.radius=N(80),t.innerRadius=0;var i=t.plotContainer.createChild(Q);return i.shouldClone=!1,i.layout="absolute",i.align="center",i.valign="middle",t.seriesContainer.parent=i,t.radarContainer=i,t.bulletsContainer.parent=i,t.axisBulletsContainer=i,t._cursorContainer=i,t.chartContainer.events.on("maxsizechanged",t.invalidate,t,!1),t._bulletMask=i.createChild(Dr),t._bulletMask.shouldClone=!1,t._bulletMask.element=t.paper.add("path"),t._bulletMask.opacity=0,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Radar chart"))},e.prototype.processAxis=function(t){a.prototype.processAxis.call(this,t);var i=t.renderer;i.gridContainer.parent=i,i.breakContainer.parent=i,t.parent=this.radarContainer,i.toBack()},e.prototype.handleXAxisRangeChange=function(){a.prototype.handleXAxisRangeChange.call(this),E(this.yAxes.iterator(),function(t){t.invalidate()})},e.prototype.handleYAxisRangeChange=function(){a.prototype.handleYAxisRangeChange.call(this),E(this.xAxes.iterator(),function(t){t.invalidate()})},e.prototype.processConfig=function(t){if(t&&(C(t.cursor)&&!C(t.cursor.type)&&(t.cursor.type="RadarCursor"),C(t.series)&&oe(t.series)))for(var i=0,r=t.series.length;i<r;i++)t.series[i].type=t.series[i].type||"RadarSeries";a.prototype.processConfig.call(this,t)},e.prototype.beforeDraw=function(){a.prototype.beforeDraw.call(this);var t=this.plotContainer,i=dr(this.startAngle,this.endAngle,1),r={x:0,y:0,width:0,height:0},s=t.innerWidth/i.width,o=t.innerHeight/i.height,n=this.innerRadius;if(n instanceof _t){var l=n.value,h=Math.min(s,o);this.mr=h,l=Math.max(h*l,h-Math.min(t.innerHeight,t.innerWidth))/h,r=dr(this.startAngle,this.endAngle,l),this.innerRadiusModifyer=l/n.value,n=N(l*100)}i=Is([i,r]);var u=Math.min(t.innerWidth/i.width,t.innerHeight/i.height),p=Oe(this.radius,u)*2||0,d=p/2,c=this.startAngle,f=this.endAngle;this._pixelInnerRadius=Oe(n,d),this._bulletMask.path=ts(c,f-c,d,this._pixelInnerRadius),E(this.xAxes.iterator(),function(m){m.renderer.useChartAngles&&(m.renderer.startAngle=c,m.renderer.endAngle=f),m.width=p,m.height=p,m.renderer.pixelRadiusReal=d}),E(this.yAxes.iterator(),function(m){m.renderer.startAngle=c,m.renderer.endAngle=f,m.width=p,m.height=p,m.renderer.pixelRadiusReal=d});var g=this.cursor;g&&(g.width=p,g.height=p,g.startAngle=c,g.endAngle=f),this.radarContainer.definedBBox={x:d*i.x,y:d*i.y,width:d*i.width,height:d*i.height},this.radarContainer.validatePosition()},e.prototype.createSeries=function(){return new td},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),e.prototype.updateXAxis=function(t){t&&t.processRenderer()},e.prototype.updateYAxis=function(t){t&&t.processRenderer()},e})(sr);w.registeredClasses.RadarChart=id;var t$=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="GaugeChartDataItem",t.applyTheme(),t}return e})(Dm);var Vb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="GaugeChart",t.startAngle=180,t.endAngle=360,t.hands=new zt(new Qp),t.hands.events.on("inserted",t.processHand,t,!1),t._disposers.push(new Ft(t.hands)),t._disposers.push(t.hands.template),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Gauge chart"))},e.prototype.processHand=function(t){var i=t.newValue;i.axis||(i.axis=this.xAxes.getIndex(0))},e.prototype.configOrder=function(t,i){return t==i?0:t=="hands"?1:i=="hands"?-1:a.prototype.configOrder.call(this,t,i)},e})(id);w.registeredClasses.GaugeChart=Vb;var Hr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Slice",t.setPropertyValue("cornerRadius",0),t.setPropertyValue("startAngle",0),t.setPercentProperty("innerRadius",0),t.setPercentProperty("radius",0),t.setPropertyValue("arc",0),t.setPropertyValue("shiftRadius",0),t.strokeOpacity=1,t.setPropertyValue("layout","none"),t.slice=t.createChild(rt),t.slice.isMeasured=!1,t._disposers.push(t.slice),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.radiusY;this.radius>0&&t==0&&(t=.01),this.slice.path=ts(this.startAngle,this.arc,this.radius,this.pixelInnerRadius,t,this.cornerRadius,this.innerCornerRadius),this.slice.invalidate(),this.shiftRadius=this.shiftRadius,this.realFill instanceof $r&&this.updateGradient(this.realFill),this.realStroke instanceof $r&&this.updateGradient(this.realStroke)},e.prototype.updateGradient=function(t){t.element.attr({gradientUnits:"userSpaceOnUse"}),t.element.attr({r:this.radius}),t.cx=0,t.cy=0,t.element.attr({radius:this.radius})},Object.defineProperty(e.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;if(this.isMeasured){var t=dr(this.startAngle,this.startAngle+this.arc,this.pixelInnerRadius),i=dr(this.startAngle,this.startAngle+this.arc,this.radius);return Is([t,i])}else return{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",Ms(t),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(t){P(t)||(t=0),this.setPropertyValue("arc",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){var t=this.getPropertyValue("radius");return P(t)||(t=0),t},set:function(t){this.setPropertyValue("radius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radiusY",{get:function(){var t=this.getPropertyValue("radiusY");return P(t)||(t=this.radius),t},set:function(t){this.setPropertyValue("radiusY",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return te(this.innerRadius,this.radius)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerCornerRadius",{get:function(){return this.getPropertyValue("innerCornerRadius")},set:function(t){this.setPropertyValue("innerCornerRadius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftRadius",{get:function(){return this.getPropertyValue("shiftRadius")},set:function(t){this.setPropertyValue("shiftRadius",t),t=this.getPropertyValue("shiftRadius"),this.dx=t*this.radius*this.ix,this.dy=t*this.radiusY*this.iy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ix",{get:function(){return U(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iy",{get:function(){return G(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleAngle",{get:function(){return this.startAngle+this.arc/2},enumerable:!0,configurable:!0}),e.prototype.getTooltipX=function(){var t=this.getPropertyValue("tooltipX");if(P(t))return t;var i=.5;t instanceof _t&&(i=t.value);var r=te(this.innerRadius,this.radius);return this.ix*(r+(this.radius-r)*i)},e.prototype.getTooltipY=function(){var t=this.getPropertyValue("tooltipY");if(P(t))return t;var i=.5;t instanceof _t&&(i=t.value);var r=te(this.innerRadius,this.radius);return this.iy*(r+(this.radius-r)*i)+this.slice.dy},e})(Q);w.registeredClasses.Slice=Hr;var Tl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PercentSeriesDataItem",t.applyTheme(),t}return e.prototype.uidAttr=function(){return this.slice.uidAttr()},e.prototype.hide=function(t,i,r,s){return s||(s=["value"]),a.prototype.hide.call(this,t,i,0,s)},e.prototype.setVisibility=function(t,i){i||(t?this.setWorkingValue("value",this.values.value.value,0,0):this.setWorkingValue("value",0,0,0)),a.prototype.setVisibility.call(this,t,i)},e.prototype.show=function(t,i,r){return r||(r=["value"]),a.prototype.show.call(this,t,i,r)},Object.defineProperty(e.prototype,"category",{get:function(){return this.properties.category},set:function(t){this.setProperty("category",t)},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){this.component.createLegendMarker(t,this)},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,t.label&&(t.label.dataItem=this),t.valueLabel&&(t.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tick",{get:function(){var t=this;if(!this._tick){var i=this.component.ticks.create();this._tick=i,this.addSprite(i),this._disposers.push(i),i.parent=this.component.ticksContainer,this._disposers.push(new Lt(function(){t.component&&t.component.ticks.removeValue(i)})),i.visible=this.visible}return this._tick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){var t=this;if(!this._label){var i=this.component.labels.create();this.addSprite(i),this._label=i,this._disposers.push(i),i.parent=this.component.labelsContainer,this._disposers.push(new Lt(function(){t.component&&t.component.labels.removeValue(i)})),i.visible=this.visible}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"slice",{get:function(){var t=this;if(!this._slice){var i=this.component,r=i.slices.create();this.addSprite(r),this._slice=r,this._disposers.push(r),r.parent=i.slicesContainer,this._disposers.push(new Lt(function(){i.slices.removeValue(r)})),r.visible=this.visible,i.itemsFocusable()?(C(this.component.role)||(this.component.role="menu"),C(r.role)||(r.role="menuitem"),r.focusable=!0):(C(this.component.role)||(this.component.role="list"),C(r.role)||(r.role="listitem"),r.focusable=!1),r.focusable&&(r.events.on("focus",function(s){r.readerTitle=i.populateString(i.itemReaderText,t)},void 0,!1),r.events.on("blur",function(s){r.readerTitle=""},void 0,!1)),r.hoverable&&(r.events.on("over",function(s){r.readerTitle=i.populateString(i.itemReaderText,t)},void 0,!1),r.events.on("out",function(s){r.readerTitle=""},void 0,!1))}return this._slice},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenInLegend",{get:function(){return this.properties.hiddenInLegend},set:function(t){this.setProperty("hiddenInLegend",t)},enumerable:!0,configurable:!0}),e})(rn);var so=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="PercentSeries",t._addAllDataItems=!1,t.colors=new zs,t.colors.step=1,t.isMeasured=!0,t.calculatePercent=!0;var i=t.createChild(Q);i.shouldClone=!1,i.isMeasured=!1,t.slicesContainer=i;var r=t.createChild(Q);r.shouldClone=!1,r.isMeasured=!1,r.layout="none",t.ticksContainer=r;var s=t.createChild(Q);s.shouldClone=!1,s.isMeasured=!1,s.layout="none",t.labelsContainer=s,t.alignLabels=!1,t.bulletsContainer.toFront(),t.skipFocusThreshold=50;var o=t.defaultState;return o.transitionEasing=sm,t.itemReaderText="{category}: {value.percent.formatNumber('#.#p')}",t.applyTheme(),t}return e.prototype.createSlice=function(){return new rt},e.prototype.createTick=function(){return new Ws},e.prototype.createLabel=function(){return new Me},Object.defineProperty(e.prototype,"slices",{get:function(){if(!this._slices){var t=this.createSlice();t.applyOnClones=!0,this._disposers.push(t),this.initSlice(t),this._slices=new zt(t),this._disposers.push(new Ft(this._slices))}return this._slices},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ticks",{get:function(){if(!this._ticks){var t=this.createTick();t.applyOnClones=!0,this._disposers.push(t),this.initTick(t),this._ticks=new zt(t),this._disposers.push(new Ft(this._ticks))}return this._ticks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labels",{get:function(){if(!this._labels){var t=this.createLabel();t.applyOnClones=!0,this._disposers.push(t),this.initLabel(t),this._labels=new zt(t),this._disposers.push(new Ft(this._labels))}return this._labels},enumerable:!0,configurable:!0}),e.prototype.createDataItem=function(){return new Tl},e.prototype.initSlice=function(t){},e.prototype.initLabel=function(t){t.text="{category}: {value.percent.formatNumber('#.0p')}",t.isMeasured=!1,t.padding(5,5,5,5)},e.prototype.initTick=function(t){},e.prototype.validateDataItems=function(){this.colors.reset(),this.patterns&&this.patterns.reset(),a.prototype.validateDataItems.call(this)},e.prototype.validateDataElement=function(t){var i=t.slice;i&&(i.fill==null?this.patterns?(C(i.stroke)||(i.stroke=this.colors.next()),i.fill=this.patterns.next(),C(i.fillOpacity)&&(i.fill.backgroundOpacity=i.fillOpacity),i.stroke instanceof Dt&&(i.fill.stroke=i.stroke,i.fill.fill=i.stroke)):i.fill=this.colors.next():this.colors.currentStep+=this.colors.step,i.stroke==null&&(i.stroke=i.fill)),a.prototype.validateDataElement.call(this,t),i&&t.bullets.each(function(r,s){s.fill==null&&(s.fill=i.fill),s.stroke==null&&(s.stroke=i.stroke)}),this.updateLegendValue(t)},e.prototype.validateData=function(){a.prototype.validateData.call(this),this.chart&&this.chart.feedLegend()},e.prototype.arrangeLabels=function(t){for(var i=0,r=t.length;i<r;i++){var s=t[i],o=s.label;if(o){o.invalid&&o.validate();var n=o.measuredHeight;o.visible||(n=0),o.pixelY-n/2<-this.maxHeight/2&&(o.y=-this.maxHeight/2+n/2);var l=this.getNextLabel(i+1,t),h=o.pixelY+n/2;if(l){l.invalid&&l.validate();var u=l.measuredHeight;l.visible||(u=0);var p=l.pixelY;p==null&&(p=0),p-u/2<h&&(l.y=h+u/2)}}}},e.prototype.arrangeLabels2=function(t){for(var i=this.maxHeight/2,r=t.length-1;r>=0;r--){var s=t[r],o=s.label;if(o){o.invalid&&o.validate();var n=o.measuredHeight;o.visible||(n=0),o.pixelY+n/2>i&&(o.y=i-n/2,i=o.y-n/2)}}},e.prototype.getNextLabel=function(t,i){if(i.length>=t){var r=i[t];if(r)return r.label?r.visible?r.label:this.getNextLabel(t+1,i):this.getNextLabel(t+1,i)}},Object.defineProperty(e.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(t){this.setPropertyValue("colors",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(t){this.setPropertyValue("patterns",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t,i){E(t.children.iterator(),function(r){var s=i.slice;r.defaultState.properties.fill=s.fill,r.defaultState.properties.stroke=s.stroke,r.defaultState.properties.fillOpacity=s.fillOpacity,r.defaultState.properties.strokeOpacity=s.strokeOpacity,r.fill=s.fill,r.stroke=s.stroke,r.fillOpacity=s.fillOpacity,r.strokeOpacity=s.strokeOpacity,r.fill==null&&(r.__disabled=!0);var o=t.dataItem;o.color=s.fill,o.colorOrig=s.fill,r.addDisposer(s.events.on("propertychanged",function(n){n.property=="fill"&&(r.__disabled=!1,r.isActive||(r.fill=s.fill),r.defaultState.properties.fill=s.fill,o.color=s.fill,o.colorOrig=s.fill),n.property=="stroke"&&(r.isActive||(r.stroke=s.stroke),r.defaultState.properties.stroke=s.stroke),n.property=="strokeOpacity"&&(r.isActive||(r.strokeOpacity=s.strokeOpacity),r.defaultState.properties.strokeOpacity=s.strokeOpacity)},void 0,!1))})},e.prototype.handleSliceScale=function(t){var i=this,r=t.target,s=r.dataItem;s&&s.bullets&&E(s.bullets.iterator(),function(o){var n=o[1];i.positionBullet(n)})},e.prototype.handleSliceMove=function(t){},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.slices.template.copyFrom(t.slices.template),this.labels.template.copyFrom(t.labels.template),this.ticks.template.copyFrom(t.ticks.template),this.colors=t.colors.clone()},Object.defineProperty(e.prototype,"alignLabels",{get:function(){return this.getPropertyValue("alignLabels")},set:function(t){this.setAlignLabels(t)},enumerable:!0,configurable:!0}),e.prototype.setAlignLabels=function(t){this.setPropertyValue("alignLabels",t,!0)},Object.defineProperty(e.prototype,"ignoreZeroValues",{get:function(){return this.getPropertyValue("ignoreZeroValues")},set:function(t){this.setPropertyValue("ignoreZeroValues",t,!0)},enumerable:!0,configurable:!0}),e.prototype.updateLegendValue=function(t){if(t){var i=t.legendDataItem,r=t.legendSettings;i&&r&&r&&(r.labelText&&(i.label.text=r.labelText),r.itemLabelText&&(i.label.text=r.itemLabelText),r.valueText&&(i.valueLabel.text=r.valueText),r.itemValueText&&(i.valueLabel.text=r.itemValueText))}},e})(Ja);w.registeredClasses.PercentSeries=so;w.registeredClasses.PercentSeriesDataItem=Tl;De.push({relevant:Fe.maybeXS,state:function(a,e){if(a instanceof so){var t=a.states.create(e),i=a.labels.template.states.create(e);i.properties.disabled=!0;var r=a.ticks.template.states.create(e);return r.properties.disabled=!0,t}return null}});var rd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._label=new ce,t._slice=new ce,t.className="PieTick",t.element=t.paper.add("polyline"),t._disposers.push(t._label),t._disposers.push(t._slice),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.slice,i=this.label,r=t.dataItem.component;if(t&&t.radius>0&&i&&i.text){var s=t.dx+t.slice.dx+t.pixelX+t.ix*t.radius*t.scale,o=t.dy+t.slice.dy+t.pixelY+t.iy*t.radiusY*t.scale,n=void 0,l=void 0,h=void 0,u=void 0;if(r.alignLabels)n=i.pixelX-this.length,l=i.pixelY,h=i.pixelX,u=l,i.horizontalCenter=="right"&&(n+=2*this.length,h=n-this.length);else{var p=i.pixelRadius(t.radius);n=s+p*t.ix,l=o+p*t.iy,h=n,u=l}this.element.attr({points:[s,o,n,l,h,u]})}},Object.defineProperty(e.prototype,"slice",{get:function(){return this._slice.get()},set:function(t){this._slice.set(t,new Bt([t.events.on("transformed",this.invalidate,this),t.events.on("validated",this.invalidate,this)]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label.get()},set:function(t){this._label.set(t,t.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),e})(Ws);w.registeredClasses.PieTick=rd;var Kh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieSeriesDataItem",t.values.radiusValue={},t.applyTheme(),t}return Object.defineProperty(e.prototype,"radiusValue",{get:function(){return this.values.radiusValue.value},set:function(t){this.setValue("radiusValue",t)},enumerable:!0,configurable:!0}),e.prototype.hide=function(t,i,r,s){return a.prototype.hide.call(this,t,i,0,["value","radiusValue"])},e.prototype.show=function(t,i,r){return a.prototype.show.call(this,t,i,["value","radiusValue"])},e})(Tl);var Dl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieSeries",t.alignLabels=!0,t.layout="none",t.labels.template.radius=N(5),t.addDisposer(t.labels.template.events.on("enabled",t.invalidate,t,!1)),t.applyTheme(),t}return e.prototype.createSlice=function(){return new Hr},e.prototype.createTick=function(){return new rd},e.prototype.createLabel=function(){return new ro},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Pie Slice Series"))},e.prototype.createDataItem=function(){return new Kh},e.prototype.initSlice=function(t){t.isMeasured=!1,t.defaultState.properties.scale=1,t.observe("scale",this.handleSliceScale,this),t.observe(["dx","dy","x","y","shiftRadius"],this.handleSliceMove,this),t.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})";var i=t.states.create("hover");i.properties.scale=1.05;var r=t.defaultState;r.properties.shiftRadius=0,t.togglable=!0,t.events.on("toggled",function(o){o.target.hideTooltip(),o.target.interactions.lastHitPointer&&o.target.interactions.lastHitPointer.touch&&!o.target.isActive&&(o.target.isHover=!1)});var s=t.states.create("active");s.properties.shiftRadius=.1},e.prototype.validate=function(){this._leftItems=[],this._rightItems=[],this._currentStartAngle=this.startAngle,this._arcRect=dr(this.startAngle,this.endAngle),this._maxRadiusPercent=0;for(var t=this.startIndex;t<this.endIndex;t++){var i=this.dataItems.getIndex(t),r=i.values.radiusValue.percent;r>this._maxRadiusPercent&&(this._maxRadiusPercent=r)}a.prototype.validate.call(this),this.alignLabels&&(this.startAngle>this.endAngle?this._rightItems.reverse():this._leftItems.reverse(),this._rightItems.sort(function(s,o){var n=(s.slice.middleAngle+360)%360,l=(o.slice.middleAngle+360)%360;return n>270&&(n-=360),l>270&&(l-=360),n<l?-1:n>l?1:0}),this._leftItems.sort(function(s,o){var n=(s.slice.middleAngle+360)%360,l=(o.slice.middleAngle+360)%360;return n<l?1:n>l?-1:0}),this.arrangeLabels(this._rightItems),this.arrangeLabels2(this._rightItems),this.arrangeLabels(this._leftItems),this.arrangeLabels2(this._leftItems))},e.prototype.validateDataElement=function(t){if(this.pixelRadius>0){this.ignoreZeroValues&&(t.value==0||t.value==null)?t.__disabled=!0:t.__disabled=!1;var i=t.slice;if(i.radius=this.pixelRadius,P(t.radiusValue)&&(i.radius=this.pixelInnerRadius+(this.pixelRadius-this.pixelInnerRadius)*t.values.radiusValue.percent/this._maxRadiusPercent),i.innerRadius instanceof _t||(i.innerRadius=this.pixelInnerRadius),i.startAngle=this._currentStartAngle,i.arc=Math.abs(t.values.value.percent)*(this.endAngle-this.startAngle)/100,!this.labels.template.disabled){var r=t.label,s=t.tick;s.slice=i,s.label=r;var o=(i.middleAngle+360)%360,n=void 0;if(this.alignLabels){var l=r.pixelRadius(i.radius),h=s.length+l;r.dx=0,r.dy=0,r.verticalCenter="middle";var u=this._arcRect;o>270||o<=90?(h+=(u.width+u.x)*this.pixelRadius,r.horizontalCenter="left",this._rightItems.push(t)):(h-=u.x*this.pixelRadius,r.horizontalCenter="right",this._leftItems.push(t),h*=-1);var p=i.radius+s.length+l;n={x:h,y:i.iy*p},r.moveTo(n)}else{var d=i.depth;P(d)||(d=0),r.fixPosition(i.middleAngle,i.radius,i.radiusY,0,-d)}}this._currentStartAngle+=i.arc,a.prototype.validateDataElement.call(this,t)}},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return this._pixelRadius},set:function(t){this._pixelRadius!=t&&(this._pixelRadius=t,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},set:function(t){this._pixelInnerRadius!=t&&(this._pixelInnerRadius=t,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){var t=this.getPropertyValue("startAngle");return P(t)?t:this._startAngleInternal},set:function(t){this.setPropertyValue("startAngle",Ms(t),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){var t=this.getPropertyValue("endAngle");return P(t)?t:this._endAngleInternal},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){a.prototype.positionBullet.call(this,t);var i=t.dataItem,r=i.slice,s=t.locationX;P(s)||(s=.5);var o=t.locationY;P(o)||(o=1);var n=r.startAngle+r.arc*s;t.x=o*r.radius*U(n),t.y=o*r.radiusY*G(n)},e.prototype.handleSliceMove=function(t){if(!this.alignLabels){var i=t.target,r=i.dataItem;if(r){var s=r.label;s&&(s.dx=s.fdx+i.dx+i.pixelX,s.dy=s.fdy+i.dy+i.pixelY)}}},Object.defineProperty(e.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;var t=this.chart;return t?dr(t.startAngle,t.endAngle,this.pixelRadius):dr(this.startAngle,this.endAngle,this.pixelRadius)},enumerable:!0,configurable:!0}),e})(so);w.registeredClasses.PieSeries=Dl;w.registeredClasses.PieSeriesDataItem=Kh;var qh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PercentChartDataItem",t.applyTheme(),t}return e})(Wh);var Zh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PercentChart",t.align="none",t.valign="none",t.chartContainer.minHeight=50,t.chartContainer.minWidth=50,t.applyTheme(),t}return e.prototype.validateData=function(){a.prototype.validateData.call(this),this.feedLegend()},e.prototype.feedLegend=function(){var t=this.legend;if(t){var i=[];E(this.series.iterator(),function(r){r.hiddenInLegend||E(r.dataItems.iterator(),function(s){s.hiddenInLegend||(i.push(s),s.legendSettings||(s.legendSettings=r.legendSettings))})}),t.data=i,t.dataFields.name="category"}},e.prototype.createSeries=function(){return new so},e.prototype.setLegend=function(t){a.prototype.setLegend.call(this,t),t&&(t.labels.template.text="{category}",t.valueLabels.template.text="{value.percent.formatNumber('#.0p')}",t.itemContainers.template.events.on("over",function(i){var r=i.target.dataItem.dataContext;if(r.visible&&!r.isHiding){var s=r.slice;s.dispatchImmediately("over"),s.isHover=!0,s.interactions.isRealHover=!0}}),t.itemContainers.template.events.on("out",function(i){var r=i.target.dataItem.dataContext,s=r.slice;s.dispatchImmediately("out"),s.isHover=!1}))},e})(xl);w.registeredClasses.PercentChart=Zh;w.registeredClasses.PercentChartDataItem=qh;var sd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieChartDataItem",t.applyTheme(),t}return e})(qh);var kl=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="PieChart",t.innerRadius=0,t.radius=N(80),t.align="none",t.valign="none",t.startAngle=-90,t.endAngle=270;var i=t.seriesContainer;return i.isMeasured=!0,i.valign="middle",i.align="center",i.layout="absolute",i.width=void 0,i.height=void 0,t.chartContainer.minHeight=50,t.chartContainer.minWidth=50,t.chartContainer.events.on("maxsizechanged",t.updateRadius,t,!1),t._disposers.push(t.seriesContainer.events.on("positionchanged",function(){t.bulletsContainer.x=t.seriesContainer.x,t.bulletsContainer.y=t.seriesContainer.y})),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Pie chart"))},e.prototype.validateLayout=function(){a.prototype.validateLayout.call(this),this.updateRadius()},e.prototype.handleSeriesAdded=function(t){a.prototype.handleSeriesAdded.call(this,t),this._chartPixelRadius=void 0,this.updateSeriesAngles()},e.prototype.updateSeriesAngles=function(){var t=this;this.series.each(function(i){i._startAngleInternal=t.startAngle,i._endAngleInternal=t.endAngle})},e.prototype.updateRadius=function(){var t=this.chartContainer,i=dr(this.startAngle,this.endAngle,1),r={x:0,y:0,width:0,height:0},s=this.innerRadius;s instanceof _t&&(r=dr(this.startAngle,this.endAngle,s.value)),i=Is([i,r]);var o=Math.min(t.innerWidth/i.width,t.innerHeight/i.height);P(o)||(o=0);var n=Oe(this.radius,o),l=Oe(this.innerRadius,o),h=(n-l)/this.series.length;(n!=this._chartPixelRadius||l!=this._chartPixelInnerRadius)&&(this._chartPixelRadius=n,this._chartPixelInnerRadius=l,E(qr(this.series.iterator()),function(u){var p=u[0],d=u[1],c=l+Oe(d.radius,n-l),f=l+Oe(d.innerRadius,n-l);P(c)||(c=l+h*(p+1)),P(f)||(f=l+h*p),d.pixelRadius=c,d.pixelInnerRadius=f}),this.seriesContainer.definedBBox={x:n*i.x,y:n*i.y,width:n*i.width,height:n*i.height},this.seriesContainer.invalidateLayout())},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),e.prototype.createSeries=function(){return new Dl},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),e})(Zh);w.registeredClasses.PieChart=kl;w.registeredClasses.PieChartDataItem=sd;var kr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Column",t.width=N(80),t.height=N(80),t.events.disableType("transformed"),t.applyOnClones=!0,t.strokeOpacity=1,t.layout="none",t.createAssets(),t.events.on("childadded",t.handleKidAdded,t,!1),t}return e.prototype.handleKidAdded=function(){this.layout=="none"&&(this.layout="absolute")},e.prototype.createAssets=function(){this.column=this.createChild($i),this.column.shouldClone=!1,this.column.isMeasured=!1,this.column.cornerRadius(0,0,0,0),this._disposers.push(this.column)},e.prototype.validate=function(){a.prototype.validate.call(this);var t=this.column;t&&(t.width=Pt(this.pixelWidth,this.maxWidth),t.height=Pt(this.pixelHeight,this.maxHeight),t.invalid&&t.validate())},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.column&&this.column.copyFrom(t.column)},Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.column?{x:0,y:0,width:this.column.measuredWidth,height:this.column.measuredHeight}:{x:0,y:0,width:Pt(this.pixelWidth,this.maxWidth),height:Pt(this.pixelHeight,this.maxHeight)}},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.Column=kr;var mr=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColumnSeriesDataItem",t.locations.dateX=.5,t.locations.dateY=.5,t.locations.categoryX=.5,t.locations.categoryY=.5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"column",{get:function(){return this._column},set:function(t){this.setColumn(t)},enumerable:!0,configurable:!0}),e.prototype.setColumn=function(t){var i=this;if(this._column&&t!=this._column&&ft(this.sprites,this._column),this._column=t,t){var r=t.dataItem;r&&r!=this&&(r.column=void 0),this.addSprite(t),this._disposers.push(new Lt(function(){i.component&&i.component.columns.removeValue(t)}))}},Object.defineProperty(e.prototype,"width",{get:function(){var t=this.properties.width;return this._adapterO&&(t=this._adapterO.apply("width",t)),t},set:function(t){this.properties.width!=t&&(this.properties.width=t,this.component&&this.component.validateDataElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var t=this.properties.height;return this._adapterO&&(t=this._adapterO.apply("height",t)),t},set:function(t){this.properties.height!=t&&(this.properties.height=t,this.component&&this.component.validateDataElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangesColumns",{get:function(){return this._rangesColumns||(this._rangesColumns=new It),this._rangesColumns},enumerable:!0,configurable:!0}),e})(hn);var Ar=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._startLocation=0,t._endLocation=1,t.className="ColumnSeries",t.width=N(100),t.height=N(100),t.strokeOpacity=0,t.fillOpacity=1,t.clustered=!0;var i=t.mainContainer.createChild(Q);return i.shouldClone=!1,i.isMeasured=!1,i.layout="none",t._columnsContainer=i,t.columns.template.pixelPerfect=!1,t.tooltipColorSource=t.columns.template,t.applyTheme(),t}return Object.defineProperty(e.prototype,"columnsContainer",{get:function(){return this._columnsContainer},enumerable:!0,configurable:!0}),e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Column Series"))},e.prototype.createDataItem=function(){return new mr},e.prototype.validate=function(){var t=this;if(this.group.node.removeAttribute("fill"),this.chart&&this.xAxis&&this.yAxis){var i=this.chart.series,r=0,s=0,o=[];E(i.iterator(),function(g){if(g instanceof e&&t.baseAxis==g.baseAxis){var m;t.baseAxis==t.xAxis?m=t.chart.yAxes.indexOf(g.yAxis):m=t.chart.xAxes.indexOf(g.xAxis),o.push({series:g,axis:m})}}),o.sort(function(g,m){return g.axis-m.axis});var n;W(o,function(g){var m=g.series;m instanceof e&&((!m.stacked&&m.clustered||n!=g.axis&&m.clustered)&&r++,m==t&&(s=r-1)),n=g.axis}),this.clustered||(s=0,r=1);var l=this.baseAxis.renderer,h=l.cellStartLocation,u=l.cellEndLocation;this._startLocation=h+s/r*(u-h),this._endLocation=h+(s+1)/r*(u-h);var p=this.xAxis,d=this.yAxis;p instanceof Ce&&d instanceof At&&p.sortBySeries==this&&this.sortCategoryAxis(p,"valueY"),d instanceof Ce&&p instanceof At&&d.sortBySeries==this&&this.sortCategoryAxis(d,"valueX")}a.prototype.validate.call(this);for(var c=0;c<this.startIndex;c++){var f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}for(var c=this.dataItems.length-1;c>this.endIndex;c--){var f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}this._propertiesChanged=!1},e.prototype.sortCategoryAxis=function(t,i){var r=this;this.dataItems.values.sort(function(o,n){return n.values[i].workingValue-o.values[i].workingValue});var s=0;this.dataItems.each(function(o){o._index=s,s++}),t.dataItems.each(function(o){var n=o.component,l=n.categoryToPosition(o.category)-o.deltaPosition,h=n.getSeriesDataItemByCategory(o.category,r);if(h){var u=r.dataItems.indexOf(h);o._index=u;var p=H((u+.5)/r.dataItems.length-l,3);o.deltaAnimation&&!o.deltaAnimation.isDisposed()&&o.deltaAnimation.animationOptions[0].to==p||p!=H(o.deltaPosition,3)&&(o.deltaAnimation&&o.deltaAnimation.stop(),o.deltaAnimation=o.animate({property:"deltaPosition",from:-p,to:0},n.interpolationDuration,n.interpolationEasing),r._disposers.push(o.deltaAnimation))}}),t.dataItems.values.sort(function(o,n){return o.index-n.index})},e.prototype.validateDataElement=function(t){this.chart&&this.xAxis&&this.yAxis&&(this.validateDataElementReal(t),a.prototype.validateDataElement.call(this,t))},e.prototype.getStartLocation=function(t){var i=this._startLocation;return this.baseAxis==this.xAxis?i+=t.locations[this.xOpenField]-.5:i+=t.locations[this.yOpenField]-.5,i},e.prototype.getEndLocation=function(t){var i=this._endLocation;return this.baseAxis==this.xAxis?i+=t.locations[this.xField]-.5:i+=t.locations[this.yField]-.5,i},e.prototype.validateDataElementReal=function(t){var i=this,r,s,o,n,l=this.getStartLocation(t),h=this.getEndLocation(t),u=this.xField,p=this.xOpenField,d=this.yField,c=this.yOpenField,f=this.columns.template,g=f.percentWidth,m=f.percentHeight,y=f.pixelWidth,v=f.pixelHeight,x=f.maxWidth,_=f.maxHeight,$=f.pixelPaddingLeft,T=f.pixelPaddingRight,S=f.pixelPaddingTop,k=f.pixelPaddingBottom,A=!1,L=t.width;C(L)&&(P(L)&&(y=L),L instanceof _t&&(g=L.value*100));var O=t.height;if(C(O)&&(P(O)&&(v=O),O instanceof _t&&(m=O.value*100)),this.xAxis instanceof Ce&&this.yAxis instanceof Ce){if(!t.hasValue(this._xValueFields)||!t.hasValue(this._yValueFields))return;if(l=0,h=1,!Ke(g)){var I=H((h-l)*(1-g/100)/2,5);l+=I,h-=I}if(r=this.xAxis.getX(t,p,l),s=this.xAxis.getX(t,u,h),Ke(g)){var I=(s-r-y)/2;r+=I,s-=I}if(!Ke(x)&&x<Math.abs(s-r)){var I=(s-r-x)/2;r+=I,s-=I}if(l=0,h=1,!Ke(m)){var I=H((1-m/100)/2,5);l+=I,h-=I}if(o=this.yAxis.getY(t,c,l),n=this.yAxis.getY(t,d,h),Ke(m)){var I=(n-o-v)/2;n+=I,o-=I}if(!Ke(_)&&_<Math.abs(n-o)){var I=(n-o-_)/2;n+=I,o-=I}s=this.fixHorizontalCoordinate(s),r=this.fixHorizontalCoordinate(r),o=this.fixVerticalCoordinate(o),n=this.fixVerticalCoordinate(n)}else if(this.baseAxis==this.xAxis){if(!t.hasValue(this._yValueFields))return;if(!Ke(g)){var I=H((h-l)*(1-g/100)/2,5);l+=I,h-=I}if(r=this.xAxis.getX(t,p,l),s=this.xAxis.getX(t,u,h),Ke(g)){var I=(s-r-y)/2;r+=I,s-=I}if(!Ke(x)&&x<Math.abs(s-r)){var I=(s-r-x)/2;r+=I,s-=I}var R=t.locations[c],B=t.locations[d];this.yAxis instanceof At&&this.dataFields[this.yField]!=this.dataFields[this.yOpenField]&&(R=0,B=0),n=this.yAxis.getY(t,c,R),o=this.yAxis.getY(t,d,B);var Z=Math.ceil(this.yAxis.axisLength);(o<0&&n<0||o>Z&&n>Z)&&(A=!0),o=this.fixVerticalCoordinate(o),n=this.fixVerticalCoordinate(n),Math.abs(s-r)-$-T==0&&(A=!0)}else{if(!t.hasValue(this._xValueFields))return;if(!Ke(m)){var I=H((h-l)*(1-m/100)/2,5);l+=I,h-=I}if(o=this.yAxis.getY(t,c,l),n=this.yAxis.getY(t,d,h),Ke(m)){var I=(n-o-v)/2;n-=I,o+=I}if(!Ke(_)&&_<Math.abs(n-o)){var I=(n-o-_)/2;n-=I,o+=I}var j=t.locations[u],it=t.locations[p];this.xAxis instanceof At&&this.dataFields[this.xField]!=this.dataFields[this.xOpenField]&&(j=0,it=0),s=this.xAxis.getX(t,u,j),r=this.xAxis.getX(t,p,it);var Z=Math.ceil(this.xAxis.axisLength);(s<0&&r<0||s>Z&&r>Z)&&(A=!0),s=this.fixHorizontalCoordinate(s),r=this.fixHorizontalCoordinate(r),Math.abs(o-n)-S-k==0&&(A=!0)}var st=Math.abs(s-r),ht=Math.abs(n-o),dt=Math.min(r,s),Xt=Math.min(o,n);if(A)this.disableUnusedColumns(t);else{var tt;t.column?(tt=t.column,this._propertiesChanged&&(_e(this,tt,fe),_e(this.columns.template,tt,fe),W(fe,function(Tt){tt[Tt]=tt[Tt]}))):(tt=this.columns.create(),_e(this,tt,fe),_e(this.columns.template,tt,fe),t.addSprite(tt),t.column=tt,tt.paper=this.paper,this.itemsFocusable()?(C(this.role)||(this.role="menu"),C(tt.role)||(tt.role="menuitem"),tt.focusable=!0):(C(this.role)||(this.role="list"),C(tt.role)||(tt.role="listitem"),tt.focusable=!1),tt.focusable&&(tt.events.on("focus",function(Tt){tt.readerTitle=i.populateString(i.itemReaderText,t)},void 0,!1),tt.events.on("blur",function(Tt){tt.readerTitle=""},void 0,!1)),tt.hoverable&&(tt.events.on("over",function(Tt){tt.readerTitle=i.populateString(i.itemReaderText,t)},void 0,!1),tt.events.on("out",function(Tt){tt.readerTitle=""},void 0,!1)),tt.parent=this.columnsContainer,tt.virtualParent=this),tt.width=st,tt.height=ht,tt.x=dt,tt.y=Xt,tt.realX=r,tt.realY=o,tt.realWidth=s-r,tt.realHeight=n-o,this.setColumnStates(tt),tt.invalid&&tt.validate(),tt.__disabled=!1,E(this.axisRanges.iterator(),function(Tt){var Nt=t.rangesColumns.getKey(Tt.uid);Nt||(Nt=i.columns.create(),_e(Tt.contents,Nt,fe),t.addSprite(Nt),t.rangesColumns.setKey(Tt.uid,Nt),Nt.paper=i.paper),Nt.parent=Tt.contents,Nt.width=st,Nt.height=ht,Nt.x=dt,Nt.y=Xt,i.setColumnStates(Nt),Nt.invalid&&Nt.validate(),Nt.__disabled=!1})}t.itemWidth=st,t.itemHeight=ht},e.prototype.disableUnusedColumns=function(t){t&&(t.column&&(t.column.width=0,t.column.height=0,t.column.__disabled=!0),E(this.axisRanges.iterator(),function(i){var r=t.rangesColumns.getKey(i.uid);r&&(r.width=0,r.height=0,r.__disabled=!0)}))},e.prototype.setColumnStates=function(t){if(this._dropFromOpenState||this._dropFromPreviousState||this._riseFromOpenState||this._riseFromPreviousState){var i=t.dataItem;if(this.xAxis instanceof At||this.yAxis instanceof At){var r,s=void 0,o=void 0;this.baseAxis==this.yAxis?(this.xOpenField&&this.xField&&this.xAxis instanceof At&&(r=i.getValue(this.xOpenField),s=i.getValue(this.xField)),o=i.getValue(this.xAxis.axisFieldName+"X","previousChange")):(this.yOpenField&&this.yField&&this.yAxis instanceof At&&(r=i.getValue(this.yOpenField),s=i.getValue(this.yField)),o=i.getValue(this.yAxis.axisFieldName+"Y","previousChange")),s<r?(i.droppedFromOpen=!0,t.defaultState.copyFrom(this._dropFromOpenState),t.setState(this._dropFromOpenState,0)):(i.droppedFromOpen=!1,t.defaultState.copyFrom(this._riseFromOpenState),t.setState(this._riseFromOpenState,0)),o<0?(i.droppedFromPrevious=!0,t.defaultState.copyFrom(this._dropFromPreviousState),t.setState(this._dropFromPreviousState,0)):(i.droppedFromPrevious=!1,t.defaultState.copyFrom(this._riseFromPreviousState),t.setState(this._riseFromPreviousState,0))}}},Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns||(this._columns=new zt(this.createColumnTemplate()),this._disposers.push(new Ft(this._columns)),this._disposers.push(this._columns.template)),this._columns},enumerable:!0,configurable:!0}),e.prototype.createColumnTemplate=function(){return new kr},Object.defineProperty(e.prototype,"clustered",{get:function(){return this.getPropertyValue("clustered")},set:function(t){this.setPropertyValue("clustered",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropFromOpenState",{get:function(){return this._dropFromOpenState||(this._dropFromOpenState=this.states.create("dropFromOpenState")),this._dropFromOpenState},set:function(t){this._dropFromOpenState=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropFromPreviousState",{get:function(){return this._dropFromPreviousState||(this._dropFromPreviousState=this.states.create("dropFromPreviousState")),this._dropFromPreviousState},set:function(t){this._dropFromPreviousState=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"riseFromOpenState",{get:function(){return this._riseFromOpenState||(this._riseFromOpenState=this.states.create("riseFromOpenState")),this._riseFromOpenState},set:function(t){this._riseFromOpenState=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"riseFromPreviousState",{get:function(){return this._riseFromPreviousState||(this._riseFromPreviousState=this.states.create("riseFromPreviousState")),this._riseFromPreviousState},set:function(t){this._riseFromPreviousState=t},enumerable:!0,configurable:!0}),e.prototype.updateLegendValue=function(t,i){var r=this;if(a.prototype.updateLegendValue.call(this,t,i),this.legendDataItem){var s=this.legendDataItem.marker,o,n;t&&(t.droppedFromOpen?o=this._dropFromOpenState:o=this._riseFromOpenState,t.droppedFromPrevious?n=this._dropFromPreviousState:n=this._riseFromPreviousState),E(s.children.iterator(),function(l){t?(l.setState(n),l.setState(o)):(l.setState(r._riseFromPreviousState),l.setState(r._riseFromOpenState))})}},e.prototype.createLegendMarker=function(t){var i=t.pixelWidth,r=t.pixelHeight;t.removeChildren();var s=t.createChild($i);s.shouldClone=!1,_e(this,s,fe),s.copyFrom(this.columns.template),s.padding(0,0,0,0),s.width=i,s.height=r;var o=t.dataItem;o.color=this.fill,o.colorOrig=this.fill},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.columns.template.copyFrom(t.columns.template)},e.prototype.getBulletLocationX=function(t,i){if(this.baseAxis==this.xAxis){var r=t.locationX;P(r)||(r=.5);var s=this.getEndLocation(t.dataItem),o=this.getStartLocation(t.dataItem);return s-(s-o)*r}else return a.prototype.getBulletLocationX.call(this,t,i)},e.prototype.getBulletLocationY=function(t,i){if(this.baseAxis==this.yAxis){var r=t.locationY;P(r)||(r=.5);var s=this.getEndLocation(t.dataItem),o=this.getStartLocation(t.dataItem);return s-(s-o)*r}else return a.prototype.getBulletLocationY.call(this,t,i)},e.prototype.getAdjustedXLocation=function(t,i,r){return P(r)||(t?r=t.locations[i]:r=.5),this._endLocation-(this._endLocation-this._startLocation)*(1-r)},e.prototype.getAdjustedYLocation=function(t,i,r){return P(r)||(t?r=t.locations[i]:r=.5),this._endLocation-(this._endLocation-this._startLocation)*r},e.prototype.fixVerticalCoordinate=function(t){var i=this.columns.template.pixelPaddingBottom,r=this.columns.template.pixelPaddingTop,s=-r,o=this.yAxis.axisLength+i;return J(t,s,o)},e.prototype.fixHorizontalCoordinate=function(t){var i=this.columns.template.pixelPaddingLeft,r=this.columns.template.pixelPaddingRight,s=-i,o=this.xAxis.axisLength+r;return J(t,s,o)},e.prototype.disposeData=function(){a.prototype.disposeData.call(this),this.columns.clear()},e})(es);w.registeredClasses.ColumnSeries=Ar;w.registeredClasses.ColumnSeriesDataItem=mr;var un=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Candlestick",t.layout="none",t}return e.prototype.createAssets=function(){a.prototype.createAssets.call(this),this.lowLine=this.createChild(Ei),this.lowLine.shouldClone=!1,this.highLine=this.createChild(Ei),this.highLine.shouldClone=!1},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.lowLine&&this.lowLine.copyFrom(t.lowLine),this.highLine&&this.highLine.copyFrom(t.highLine)},e})(kr);w.registeredClasses.Candlestick=un;var Jh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.values.lowValueX={},t.values.lowValueY={},t.values.highValueX={},t.values.highValueY={},t.className="CandlestickSeriesDataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"lowValueX",{get:function(){return this.values.lowValueX.value},set:function(t){this.setValue("lowValueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lowValueY",{get:function(){return this.values.lowValueY.value},set:function(t){this.setValue("lowValueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highValueX",{get:function(){return this.values.highValueX.value},set:function(t){this.setValue("highValueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highValueY",{get:function(){return this.values.highValueY.value},set:function(t){this.setValue("highValueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"closeValueX",{get:function(){return this.values.valueX.value},set:function(t){this.setValue("valueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"closeValueY",{get:function(){return this.values.valueY.value},set:function(t){this.setValue("valueY",t)},enumerable:!0,configurable:!0}),e})(mr);var ad=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="CandlestickSeries",t.groupFields.lowValueX="low",t.groupFields.lowValueY="low",t.groupFields.highValueX="high",t.groupFields.highValueY="high",t.strokeOpacity=1;var i=new ct,r=i.getFor("positive"),s=i.getFor("negative");return t.dropFromOpenState.properties.fill=s,t.dropFromOpenState.properties.stroke=s,t.riseFromOpenState.properties.fill=r,t.riseFromOpenState.properties.stroke=r,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Candlestick Series"))},e.prototype.createDataItem=function(){return new Jh},e.prototype.validateDataElementReal=function(t){a.prototype.validateDataElementReal.call(this,t),this.validateCandlestick(t)},e.prototype.validateCandlestick=function(t){var i=t.column;if(i){var r=i.lowLine,s=i.highLine;if(this.baseAxis==this.xAxis){var o=i.pixelWidth/2;r.x=o,s.x=o;var n=t.getWorkingValue(this.yOpenField),l=t.getWorkingValue(this.yField),h=this.yAxis.getY(t,this.yOpenField),u=this.yAxis.getY(t,this.yField),p=this.yAxis.getY(t,this.yLowField),d=this.yAxis.getY(t,this.yHighField),c=i.pixelY;r.y1=p-c,s.y1=d-c,n<l?(r.y2=h-c,s.y2=u-c):(r.y2=u-c,s.y2=h-c)}if(this.baseAxis==this.yAxis){var f=i.pixelHeight/2;r.y=f,s.y=f;var g=t.getWorkingValue(this.xOpenField),m=t.getWorkingValue(this.xField),y=this.xAxis.getX(t,this.xOpenField),v=this.xAxis.getX(t,this.xField),x=this.xAxis.getX(t,this.xLowField),_=this.xAxis.getX(t,this.xHighField),$=i.pixelX;r.x1=x-$,s.x1=_-$,g<m?(r.x2=y-$,s.x2=v-$):(r.x2=v-$,s.x2=y-$)}E(this.axisRanges.iterator(),function(T){var S=t.rangesColumns.getKey(T.uid);if(S){var k=S.lowLine;k.x=r.x,k.y=r.y,k.x1=r.x1,k.x2=r.x2,k.y1=r.y1,k.y2=r.y2;var A=S.highLine;A.x=s.x,A.y=s.y,A.x1=s.x1,A.x2=s.x2,A.y1=s.y1,A.y2=s.y2}})}},Object.defineProperty(e.prototype,"xLowField",{get:function(){return this._xLowField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yLowField",{get:function(){return this._yLowField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xHighField",{get:function(){return this._xHighField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yHighField",{get:function(){return this._yHighField},enumerable:!0,configurable:!0}),e.prototype.defineFields=function(){a.prototype.defineFields.call(this);var t=this.xAxis,i=this.yAxis;if(t&&i){if(this.baseAxis==t){var r=Ko(i.axisFieldName);this._yLowField="low"+r+"Y",this._yHighField="high"+r+"Y"}if(this.baseAxis==i){var s=Ko(t.axisFieldName);this._xLowField="low"+s+"X",this._xHighField="high"+s+"X"}this.addValueField(t,this._xValueFields,this._xLowField),this.addValueField(t,this._xValueFields,this._xHighField),this.addValueField(i,this._yValueFields,this._yLowField),this.addValueField(i,this._yValueFields,this._yHighField)}},e.prototype.createLegendMarker=function(t){var i=t.pixelWidth,r=t.pixelHeight;t.removeChildren();var s=t.createChild(un);s.shouldClone=!1,s.copyFrom(this.columns.template);var o,n,l=s.lowLine,h=s.highLine;this.baseAxis==this.yAxis?(o=i/3,n=r,l.y=r/2,h.y=r/2,l.x2=i/3,h.x2=i/3,h.x=i/3*2,s.column.x=i/3):(o=i,n=r/3,l.x=i/2,h.x=i/2,l.y2=r/3,h.y2=r/3,h.y=r/3*2,s.column.y=r/3),s.width=o,s.height=n,_e(this,t,fe),_e(this.columns.template,s,fe),s.stroke=this.riseFromOpenState.properties.stroke,s.fill=s.stroke;var u=t.dataItem;u.color=s.fill,u.colorOrig=s.fill},e.prototype.createColumnTemplate=function(){return new un},e})(Ar);w.registeredClasses.CandlestickSeries=ad;w.registeredClasses.CandlestickSeriesDataItem=Jh;var km=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="StepLineSeriesSegment",t}return e.prototype.drawSegment=function(t,i,r,s,o,n){if(t.length>0&&i.length>0)if(o){var l=z(t[0]);if(t.length>0)for(var h=1;h<t.length;h++){var u=t[h];h/2==Math.round(h/2)?l+=z(u):l+=V(u)}this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l=z(t[0])+en(t),l+=V(i[0])+en(i),l+=V(t[0]),l+=pe(),this.fillSprite.path=l)}else{var l=z(t[0])+en(t);this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l+=V(i[0])+en(i),l+=V(t[0]),l+=pe(),this.fillSprite.path=l)}else this.strokeSprite.path="",this.fillSprite.path=""},e})($l);w.registeredClasses.StepLineSeriesSegment=km;var Am=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="StepLineSeriesDataItem",t.applyTheme(),t}return e})(xa);var Eb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="StepLineSeries",t.applyTheme(),t.startLocation=0,t.endLocation=1,t}return e.prototype.createDataItem=function(){return new Am},e.prototype.addPoints=function(t,i,r,s,o){var n,l,h,u;this.baseAxis==this.xAxis&&(n=this.startLocation,l=this.endLocation,h=this.getAdjustedXLocation(i,this.yOpenField),u=this.getAdjustedXLocation(i,this.yField)),this.baseAxis==this.yAxis&&(h=this.startLocation,u=this.endLocation,n=this.getAdjustedXLocation(i,this.xOpenField),l=this.getAdjustedXLocation(i,this.xField));var p=this.xAxis.getX(i,r,n),d=this.yAxis.getY(i,s,h),c=this.xAxis.getX(i,r,l),f=this.yAxis.getY(i,s,u);if(p=J(p,-1e5,1e5),d=J(d,-1e5,1e5),c=J(c,-1e5,1e5),f=J(f,-1e5,1e5),!this.noRisers&&t.length>1){var g=t[t.length-1];this.baseAxis==this.xAxis&&(o?t.push({x:g.x,y:f}):t.push({x:p,y:g.y})),this.baseAxis==this.yAxis&&(o?t.push({x:c,y:g.y}):t.push({x:g.x,y:d}))}var m={x:p,y:d},y={x:c,y:f};o?t.push(y,m):t.push(m,y)},e.prototype.drawSegment=function(t,i,r){var s=!1;this.yAxis==this.baseAxis&&(s=!0),t.drawSegment(i,r,this.tensionX,this.tensionY,this.noRisers,s)},e.prototype.createSegment=function(){return new km},Object.defineProperty(e.prototype,"noRisers",{get:function(){return this.getPropertyValue("noRisers")},set:function(t){this.setPropertyValue("noRisers",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(t){this.setPropertyValue("startLocation",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(t){this.setPropertyValue("endLocation",t,!0)},enumerable:!0,configurable:!0}),e})(wl);w.registeredClasses.StepLineSeries=Eb;w.registeredClasses.StepLineSeriesDataItem=Am;var od=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.point={x:0,y:0},t._stick="none",t.className="Cursor",t.width=N(100),t.height=N(100),t.shouldClone=!1,t.hide(0),t.trackable=!0,t.clickable=!0,t.isMeasured=!1;var i=gt();return t._disposers.push(i.body.events.on("down",t.handleCursorDown,t)),t._disposers.push(i.body.events.on("up",t.handleCursorUp,t)),t._disposers.push(i.body.events.on("track",t.handleCursorMove,t)),t.applyTheme(),t}return e.prototype.handleCursorMove=function(t){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&t.touch)){if((this._generalBehavior!="zoom"&&this._generalBehavior!="pan"||!this.downPoint)&&!gt().isLocalElement(t.pointer,this.paper.svg,this.uid)){(!this.isHidden||!this.isHiding)&&this.hide();return}var i=Ns(t.pointer.point,this);return this._stick=="hard"&&this._stickPoint&&(i=this._stickPoint),this._stick=="soft"&&this._stickPoint&&(this.fitsToBounds(i)||(i=this._stickPoint)),this._adapterO&&this._adapterO.apply("cursorPoint",i),this.triggerMove(i),i}},e.prototype.hideReal=function(t){if(!((this._stick=="hard"||this._stick=="soft")&&this._stickPoint))return a.prototype.hideReal.call(this,t)},e.prototype.triggerMove=function(t,i,r){t.x=H(t.x,1),t.y=H(t.y,1),i&&(this._stick=i),(i=="hard"||i=="soft")&&(this._stickPoint=t),this.triggerMoveReal(t,r)},e.prototype.triggerMoveReal=function(t,i){(this.point.x!=t.x||this.point.y!=t.y||i)&&(this.point=t,this.invalidatePosition(),this.fitsToBounds(t)?this.show(0):this.downPoint||this.hide(0),this.visible&&(this.getPositions(),this.dispatch("cursorpositionchanged")))},e.prototype.triggerDown=function(t){this.triggerDownReal(t)},e.prototype.triggerDownReal=function(t){switch(this._generalBehavior){case"zoom":this.dispatchImmediately("zoomstarted");break;case"select":this.dispatchImmediately("selectstarted");break;case"pan":this.dispatchImmediately("panstarted"),gt().setGlobalStyle(Le.grabbing);break}},e.prototype.triggerUp=function(t){this.triggerUpReal(t)},e.prototype.triggerUpReal=function(t){Ot.requestFrame(),this.updatePoint(this.upPoint);var i=gt();if(Mt(this._upPointOrig,this._downPointOrig)>i.getHitOption(this.interactions,"hitTolerance")){switch(this._generalBehavior){case"zoom":this.dispatch("zoomended");break;case"select":this.dispatch("selectended");break;case"pan":this.dispatch("panended"),i.setGlobalStyle(Le.default);break}this.downPoint=void 0,this.updateSelection()}},e.prototype.updateSelection=function(){},e.prototype.getPositions=function(){this.xPosition=this.point.x/this.innerWidth,this.yPosition=1-this.point.y/this.innerHeight},e.prototype.handleCursorDown=function(t){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&t.touch||!gt().isLocalElement(t.pointer,this.paper.svg,this.uid))){Zo();var i=Ns(t.pointer.point,this);this._stick=="hard"&&this._stickPoint&&(i=this._stickPoint),this._adapterO&&this._adapterO.apply("cursorPoint",i),this.fitsToBounds(i)&&(this._downPointOrig={x:i.x,y:i.y},t.event.cancelable&&this.shouldPreventGestures(t.touch)&&this.fitsToBounds(i)&&t.event.preventDefault(),this.triggerMove(i),this.triggerDown(i))}},e.prototype.shouldPreventGestures=function(t){return!0},e.prototype.updatePoint=function(t){},e.prototype.handleCursorUp=function(t){if(this.interactionsEnabled&&!(!this.downPoint&&!gt().isLocalElement(t.pointer,this.paper.svg,this.uid))){var i=Ns(t.pointer.point,this);this._adapterO&&this._adapterO.apply("cursorPoint",i),!(!this.downPoint||!this.fitsToBounds(this.downPoint))&&(this._stick=="hard"&&this._stickPoint&&(i=this._stickPoint),this._upPointOrig={x:i.x,y:i.y},this.triggerMove(i),this.triggerUp(i))}},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart},set:function(t){this._chart=t,C(this._chart.plotContainer)&&gt().lockElement(this._chart.plotContainer.interactions)},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.Cursor=od;var nd=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._lineX=new ce,t._lineY=new ce,t._xAxis=new ce,t._yAxis=new ce,t._snapToDisposers=[],t.className="XYCursor",t.behavior="zoomX",t.maxPanOut=.1;var i=new ct;t.snapOnPan=!0;var r=t.createChild(rt);r.shouldClone=!1,r.fillOpacity=.2,r.fill=i.getFor("alternativeBackground"),r.isMeasured=!1,r.visible=!1,r.interactionsEnabled=!1,t.selection=r,t._disposers.push(t.selection);var s=t.createChild(rt);s.shouldClone=!1,s.stroke=i.getFor("grid"),s.fill=nt(),s.strokeDasharray="3,3",s.isMeasured=!1,s.strokeOpacity=.4,s.interactionsEnabled=!1,s.y=0,t.lineX=s,t._disposers.push(t.lineX);var o=t.createChild(rt);return o.shouldClone=!1,o.stroke=i.getFor("grid"),o.fill=nt(),o.strokeDasharray="3,3",o.isMeasured=!1,o.strokeOpacity=.4,o.interactionsEnabled=!1,o.x=0,t.lineY=o,t._disposers.push(t.lineY),t.events.on("sizechanged",t.updateSize,t,!1),t._disposers.push(t._lineX),t._disposers.push(t._lineY),t._disposers.push(t._xAxis),t._disposers.push(t._yAxis),t.mask=t,t.hideSeriesTooltipsOnSelection=!0,t.applyTheme(),t}return e.prototype.updateSize=function(){this.lineX&&(this.lineX.path=z({x:0,y:0})+V({x:0,y:this.innerHeight})),this.lineY&&(this.lineY.path=z({x:0,y:0})+V({x:this.innerWidth,y:0}))},e.prototype.updateSelection=function(){if(this._usesSelection){var t=this.downPoint,i=this.behavior;if(t){var r=this.point;this.lineX&&(r.x=this.lineX.pixelX),this.lineY&&(r.y=this.lineY.pixelY);var s=this.selection,o=Math.min(r.x,t.x),n=Math.min(r.y,t.y),l=H(Math.abs(t.x-r.x),this._positionPrecision),h=H(Math.abs(t.y-r.y),this._positionPrecision);switch(i){case"zoomX":n=0,h=this.pixelHeight;break;case"zoomY":o=0,l=this.pixelWidth;break;case"selectX":n=0,h=this.pixelHeight;break;case"selectY":o=0,l=this.pixelWidth;break}s.x=o,s.y=n,s.path=Hp(l,h),s.validatePosition()}else this._generalBehavior!="select"&&this.selection.hide()}},e.prototype.fixPoint=function(t){return t.x=Math.max(0,t.x),t.y=Math.max(0,t.y),t.x=Math.min(this.pixelWidth,t.x),t.y=Math.min(this.pixelHeight,t.y),t},e.prototype.triggerMoveReal=function(t,i){a.prototype.triggerMoveReal.call(this,t,i);var r=this.snapToSeries;if(r&&!this.downPoint)if(r instanceof es)r.isHidden&&this.updateLinePositions(t);else{var s=!0;W(r,function(o){o.isHidden||(s=!1)}),s&&this.updateLinePositions(t)}else this.updateLinePositions(t);this.downPoint&&Mt(this.downPoint,t)>3&&this._generalBehavior=="pan"&&(this.getPanningRanges(),this.dispatch("panning"))},e.prototype.updateLinePositions=function(t){t=this.fixPoint(this.point),this.lineX&&this.lineX.visible&&!this.xAxis&&(this.lineX.x=t.x),this.lineY&&this.lineY.visible&&!this.yAxis&&(this.lineY.y=t.y),this.updateSelection()},e.prototype.triggerDownReal=function(t){if(this.visible&&!this.isHiding)if(this._generalBehavior=="select"&&(this.selection.parent=this.parent),this.fitsToBounds(t)){this.downPoint={x:t.x,y:t.y},this.updatePoint(t),this.point.x=this.downPoint.x,this.point.y=this.downPoint.y;var i=this.selection,r=this.downPoint.x,s=this.downPoint.y;this._usesSelection&&(i.x=r,i.y=s,i.path="",i.show()),a.prototype.triggerDownReal.call(this,t)}else this.downPoint=void 0;else this.downPoint=void 0},e.prototype.updatePoint=function(t){this.lineX&&(t.x=this.lineX.pixelX),this.lineY&&(t.y=this.lineY.pixelY)},e.prototype.triggerUpReal=function(t){if(this.hasMoved())this.downPoint&&(this.upPoint=t,this.updatePoint(this.upPoint),this._generalBehavior!="pan"&&this.getRanges(),this._generalBehavior!="select"&&this.selection.hide(),a.prototype.triggerUpReal.call(this,t));else{if(this._generalBehavior!="select"?this.selection.hide(0):(this.xRange=void 0,this.yRange=void 0,this.dispatchImmediately("selectended")),this._generalBehavior=="pan"){var i=gt();i.setGlobalStyle(Le.default)}this.dispatchImmediately("behaviorcanceled")}this.downPoint=void 0,this.dispatch("cursorpositionchanged")},e.prototype.hasMoved=function(){var t;return this.behavior=="zoomX"||this.behavior=="panX"?t=Dv(this._upPointOrig,this._downPointOrig):this.behavior=="zoomY"||this.behavior=="panY"?t=kv(this._upPointOrig,this._downPointOrig):t=Mt(this._upPointOrig,this._downPointOrig),t>gt().getHitOption(this.interactions,"hitTolerance")},e.prototype.getPanningRanges=function(){var t=H(this.downPoint.x/this.innerWidth,5),i=1-H(this.downPoint.y/this.innerHeight,5),r=H(this.point.x/this.innerWidth,5),s=1-H(this.point.y/this.innerHeight,5),o=t-r,n=i-s;this.xRange={start:o,end:1+o},this.yRange={start:n,end:1+n},this.behavior=="panX"&&(this.yRange.start=0,this.yRange.end=1),this.behavior=="panY"&&(this.xRange.start=0,this.xRange.end=1)},e.prototype.getRanges=function(){this.lineX&&(this.upPoint.x=this.lineX.pixelX),this.lineY&&(this.upPoint.y=this.lineY.pixelY),this.selection;var t=H(this.downPoint.x/this.innerWidth,5),i=H(this.upPoint.x/this.innerWidth,5),r=1-H(this.downPoint.y/this.innerHeight,5),s=1-H(this.upPoint.y/this.innerHeight,5);this.xRange={start:Pt(t,i),end:mt(t,i)},this.yRange={start:Pt(r,s),end:mt(r,s)}},Object.defineProperty(e.prototype,"behavior",{get:function(){return this.getPropertyValue("behavior")},set:function(t){this.setPropertyValue("behavior",t,!0),this._usesSelection=!1,t.indexOf("zoom")!=-1&&(this._generalBehavior="zoom",this._usesSelection=!0),t.indexOf("select")!=-1&&(this._generalBehavior="select",this._usesSelection=!0),t.indexOf("pan")!=-1&&(this._generalBehavior="pan",this._usesSelection=!1)},enumerable:!0,configurable:!0}),e.prototype.shouldPreventGestures=function(t){return(!this.interactions.isTouchProtected||!t)&&this.behavior!="none"},Object.defineProperty(e.prototype,"fullWidthLineX",{get:function(){return this.getPropertyValue("fullWidthLineX")},set:function(t){this.setPropertyValue("fullWidthLineX",t),t||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullWidthLineY",{get:function(){return this.getPropertyValue("fullWidthLineY")},set:function(t){this.setPropertyValue("fullWidthLineY",t),t||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideSeriesTooltipsOnSelection",{get:function(){return this.getPropertyValue("hideSeriesTooltipsOnSelection")},set:function(t){this.setPropertyValue("hideSeriesTooltipsOnSelection",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxTooltipDistance",{get:function(){return this.getPropertyValue("maxTooltipDistance")},set:function(t){this.setPropertyValue("maxTooltipDistance",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxPanOut",{get:function(){return this.getPropertyValue("maxPanOut")},set:function(t){this.setPropertyValue("maxPanOut",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xAxis",{get:function(){return this._xAxis.get()},set:function(t){var i=this;this._xAxis.get()!=t&&this._xAxis.set(t,new Bt([t.tooltip.events.on("positionchanged",this.handleXTooltipPosition,this,!1),t.events.on("rangechangestarted",function(r){i.hide(0),i.preventShow=!0},void 0,!1),t.events.on("rangechangeended",function(r){i.preventShow=!1,i.hide(0),i.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yAxis",{get:function(){return this._yAxis.get()},set:function(t){var i=this;this._yAxis.get()!=t&&this._yAxis.set(t,new Bt([t.tooltip.events.on("positionchanged",this.handleYTooltipPosition,this,!1),t.events.on("rangechangestarted",function(r){i.hide(0),i.__disabled=!0},void 0,!1),t.events.on("rangechangeended",function(r){i.__disabled=!1,i.hide(0),i.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),e.prototype.handleXTooltipPosition=function(t){var i=this.xAxis.tooltip,r=ki({x:i.pixelX,y:i.pixelY},this),s=r.x;if(r.y=1,this.lineX&&(this.lineX.x=s,this.fitsToBounds(r)||this.hide()),this.xAxis&&this.fullWidthLineX){var o=this.xAxis.currentItemStartPoint,n=this.xAxis.currentItemEndPoint;if(o&&n){this.lineX.x=s;var l=n.x-o.x;this.lineX.path=Hp(l,this.innerHeight,-l/2)}}},e.prototype.handleYTooltipPosition=function(t){var i=this.yAxis.tooltip,r=ki({x:i.pixelX,y:i.pixelY},this),s=r.y;if(r.x=1,this.lineY&&(this.lineY.y=s,this.fitsToBounds(r)||this.hide()),this.yAxis&&this.fullWidthLineY){var o=this.yAxis.currentItemStartPoint,n=this.yAxis.currentItemEndPoint;if(o&&n){this.lineY.y=s;var l=n.y-o.y;this.lineY.path=Hp(this.innerWidth,l,0,-l/2)}}},Object.defineProperty(e.prototype,"lineX",{get:function(){return this._lineX.get()},set:function(t){t?(t.setElement(this.paper.add("path")),this._lineX.set(t,t.events.on("positionchanged",this.updateSelection,this,!1)),t.interactionsEnabled=!1,t.parent=this):this._lineX.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineY",{get:function(){return this._lineY.get()},set:function(t){t?(t.setElement(this.paper.add("path")),this._lineY.set(t,t.events.on("positionchanged",this.updateSelection,this,!1)),t.parent=this,t.interactionsEnabled=!1):this._lineY.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},set:function(t){this._selection=t,t&&(t.element=this.paper.add("path"),t.parent=this)},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){var i=this;if(t&&(C(t.xAxis)&&vt(t.xAxis)&&(this.map.hasKey(t.xAxis)?t.xAxis=this.map.getKey(t.xAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+t.xAxis+'" found for `xAxis`'),delete t.xAxis)),C(t.yAxis)&&vt(t.yAxis)&&(this.map.hasKey(t.yAxis)?t.yAxis=this.map.getKey(t.yAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+t.yAxis+'" found for `yAxis`'),delete t.yAxis)),C(t.snapToSeries))){var r=oe(t.snapToSeries)?t.snapToSeries:[t.snapToSeries],s=!1;W(r,function(o,n){vt(o)&&(i.map.hasKey(o)?r[n]=i.map.getKey(o):(i.processingErrors.push('[XYCursor] No series with id "'+o+'" found for `series`'),s=!0))}),s?delete t.snapToSeries:t.snapToSeries=r}a.prototype.processConfig.call(this,t)},Object.defineProperty(e.prototype,"snapToSeries",{get:function(){return this.getPropertyValue("snapToSeries")},set:function(t){var i=this;this.setPropertyValue("snapToSeries",t)&&(t instanceof es&&(t=[t]),this._snapToDisposers&&W(this._snapToDisposers,function(r){r.dispose()}),this._snapToDisposers=[],t&&W(t,function(r){i._snapToDisposers.push(r.events.on("tooltipshownat",function(){i.handleSnap(r)},void 0,!1))}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapOnPan",{get:function(){return this.getPropertyValue("snapOnPan")},set:function(t){this.setPropertyValue("snapOnPan",t)},enumerable:!0,configurable:!0}),e.prototype.handleSnap=function(t){if(!this.downPoint){var i=t.getTooltipX()+t.xAxis.pixelX,r=t.getTooltipY()+t.yAxis.pixelY,s=t.xAxis,o=t.yAxis;s&&s.renderer.opposite&&(r-=this.pixelHeight),this.point={x:i,y:r},this.getPositions();var n=i,l=r;i-=this.pixelWidth,o&&o.renderer.opposite&&(i+=this.pixelWidth);var h=t.tooltip,u=h.animationDuration,p=h.animationEasing;s instanceof At&&!(s instanceof me)&&o instanceof At&&!(o instanceof me)?(t.yAxis.showTooltipAtPosition(this.yPosition),t.xAxis.showTooltipAtPosition(this.xPosition)):(t.baseAxis==t.xAxis&&t.yAxis.showTooltipAtPosition(this.yPosition),t.baseAxis==t.yAxis&&t.xAxis.showTooltipAtPosition(this.xPosition)),this.lineY.x=i,this.lineX.y=r,this.xAxis||this.lineX.animate([{property:"x",to:n}],u,p),this.yAxis||this.lineY.animate([{property:"y",to:l}],u,p)}},e.prototype.dispose=function(){this.hide(0),a.prototype.dispose.call(this)},e})(od);w.registeredClasses.XYCursor=nd;var Al=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="LightenFilter",t.feColorMatrix=t.paper.add("feColorMatrix"),t.feColorMatrix.attr({type:"matrix"}),t.filterPrimitives.push(t.feColorMatrix),t.lightness=0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"lightness",{get:function(){return this.properties.lightness},set:function(t){this.properties.lightness=t;var i=t+1;this.feColorMatrix.attr({values:i+" 0 0 0 0 0 "+i+" 0 0 0 0 0 "+i+" 0 0 0 0 0 1 0"})},enumerable:!0,configurable:!0}),e})(Br);w.registeredClasses.LightenFilter=Al;var Om=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Slice3D",t.layout="none";var i=t.createChild(rt);t.edge=i,i.shouldClone=!1,i.isMeasured=!1,i.toBack(),t.angle=30,t.depth=20;var r=t.createChild(rt);t.sideA=r,r.shouldClone=!1,r.isMeasured=!1;var s=t.createChild(rt);return t.sideB=s,s.shouldClone=!1,s.isMeasured=!1,t.applyTheme(),t}return e.prototype.setFill=function(t){a.prototype.setFill.call(this,t);var i;if(t instanceof Dt)i=t.hex;else if(t instanceof mi||t instanceof $r)i=t.stops.getIndex(0).color.hex;else{var r=new Al;r.lightness=-.25,this.edge.filters.push(r),this.sideA.filters.push(r.clone()),this.sideB.filters.push(r.clone())}if(i){var s=nt(i).lighten(-.25);this.edge.fill=s,this.sideA.fill=s,this.sideB.fill=s,this.edge.stroke=s,this.sideA.stroke=s,this.sideB.stroke=s}},e.prototype.draw=function(){if(this.cornerRadius=0,this.innerCornerRadius=0,a.prototype.draw.call(this),this.arc!==0&&this.radius>0&&this.depth>0){this.sideB.show(0),this.sideA.show(0),this.edge.show(0);for(var t=this.startAngle,i=this.arc,r=this.pixelInnerRadius||0,s=this.radiusY||0,o=this.radius,n=t+i,l=s/o*r,h={x:U(t)*r,y:G(t)*l},u={x:U(t)*o,y:G(t)*s},p={x:U(n)*o,y:G(n)*s},d={x:U(n)*r,y:G(n)*l},c=this.depth,f={x:h.x,y:h.y-c},g={x:u.x,y:u.y-c},m={x:p.x,y:p.y-c},y={x:d.x,y:d.y-c},v="",x=Math.ceil(i/5),_=i/x,$=t,T=g,S=0;S<x;S++)if($+=_,$>0&&$<180){v+=z(T);var k={x:U($)*o,y:G($)*s-c};v+=V({x:T.x,y:T.y+c}),v+=Sr({x:k.x,y:k.y+c},o,s,!0),v+=V(k),v+=Sr(T,o,s),v+="z",T=k}else{v+=z(T);var k={x:U($)*o,y:G($)*s-c};v+=Sr(k,o,s,!0),v+=V({x:k.x,y:k.y+c}),v+=Sr({x:T.x,y:T.y+c},o,s),v+=V(T),v+="z",T=k}T=f,$=t;for(var S=0;S<x;S++)if($+=_,$>0&&$<180){v+=z(T);var k={x:U($)*r,y:G($)*l-c};v+=V({x:T.x,y:T.y+c}),v+=Sr({x:k.x,y:k.y+c},r,l,!0),v+=V(k),v+=Sr(T,r,l),v+="z",T=k}else{v+=z(T);var k={x:U($)*r,y:G($)*l-c};v+=Sr(k,r,l,!0),v+=V({x:k.x,y:k.y+c}),v+=Sr({x:T.x,y:T.y+c},r,l),v+=V(T),v+="z",T=k}this.edge.path=v,this.sideA.path=z(h)+V(u)+V(g)+V(f)+pe(),this.sideB.path=z(p)+V(d)+V(y)+V(m)+pe(),this.startAngle<90?this.sideA.toBack():this.sideA.toFront(),this.startAngle+this.arc>90?this.sideB.toBack():this.sideB.toFront(),this.slice.dy=-c}else this.sideA.hide(0),this.sideB.hide(0),this.edge.hide(0)},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){var t=this.getPropertyValue("angle");return P(t)||(t=0),t},set:function(t){this.setPropertyValue("angle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radiusY",{get:function(){var t=this.getPropertyValue("radiusY");return P(t)||(t=this.radius-this.radius*this.angle/90),t},set:function(t){this.setPropertyValue("radiusY",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.edge.copyFrom(t.edge),this.sideA.copyFrom(t.sideA),this.sideB.copyFrom(t.sideB)},e})(Hr);var Lm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieSeries3DDataItem",t.values.depthValue={},t.applyTheme(),t}return Object.defineProperty(e.prototype,"depthValue",{get:function(){return this.values.depthValue.value},set:function(t){this.setValue("depthValue",t)},enumerable:!0,configurable:!0}),e})(Kh);var ld=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieSeries3D",t.applyTheme(),t}return e.prototype.createDataItem=function(){return new Lm},e.prototype.createSlice=function(){return new Om},e.prototype.validateDataElement=function(t){var i=t.slice,r=this.depth;P(r)||(r=this.chart.depth);var s=t.values.depthValue.percent;P(s)||(s=100),i.depth=s*r/100;var o=this.angle;P(o)||(o=this.chart.angle),i.angle=o,a.prototype.validateDataElement.call(this,t)},e.prototype.validate=function(){a.prototype.validate.call(this);for(var t=this._workingStartIndex;t<this._workingEndIndex;t++){var i=this.dataItems.getIndex(t),r=i.slice,s=r.startAngle;s>=-90&&s<90?r.toFront():s>=90&&r.toBack()}},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t)},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){a.prototype.positionBullet.call(this,t);var i=t.dataItem,r=i.slice;t.y=t.pixelY-r.depth},e})(Dl);w.registeredClasses.PieSeries3D=ld;w.registeredClasses.PieSeries3DDataItem=Lm;var e$=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieChart3DDataItem",t.applyTheme(),t}return e})(sd);var Nb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PieChart3D",t.depth=20,t.angle=10,t.applyTheme(),t}return Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){t=J(t,0,90),this.setPropertyValue("angle",t)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),e.prototype.createSeries=function(){return new ld},e})(kl);w.registeredClasses.PieChart3D=Nb;var Bb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SlicedChartDataItem",t.applyTheme(),t}return e})(qh);var jb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SlicedChart",t.seriesContainer.layout="horizontal",t.padding(15,15,15,15),t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Sliced chart"))},e.prototype.validate=function(){a.prototype.validate.call(this)},e})(Zh);w.registeredClasses.SlicedChart=jb;w.registeredClasses.SlicedChartDataItem=Bb;var ao=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.legendSettings=new Yh,t.className="FlowDiagramNode",t.isMeasured=!1,new ct,t.draggable=!0,t.inert=!0,t.setStateOnChildren=!0,t.events.on("positionchanged",t.invalidateLinks,t,!1),t.events.on("sizechanged",t.invalidateLinks,t,!1),t}return e.prototype.handleHit=function(t){this.isHidden||this.isHiding?this.show():this.hide()},e.prototype.show=function(t){var i=a.prototype.show.call(this,t);return this.outgoingDataItems.each(function(r){(!r.toNode||r.toNode&&!r.toNode.isHidden)&&(r.setWorkingValue("value",r.getValue("value"),t),r.link.show())}),this.incomingDataItems.each(function(r){(!r.fromNode||r.fromNode&&!r.fromNode.isHidden)&&(r.setWorkingValue("value",r.getValue("value"),t),r.link.show())}),i},e.prototype.hide=function(t){var i=a.prototype.hide.call(this,t);return this.outgoingDataItems.each(function(r){r.setWorkingValue("value",0,t),r.link.hide()}),this.incomingDataItems.each(function(r){r.setWorkingValue("value",0,t),r.link.hide()}),i},e.prototype.validate=function(){this.isDisposed()||(a.prototype.validate.call(this),this.invalidateLinks())},e.prototype.invalidateLinks=function(){var t=this;this.outgoingDataItems.each(function(i){var r=i.link;if(r.colorMode=="fromNode"&&(r.fill=r.dataItem.fromNode.color),r.colorMode=="gradient"){r.fill=r.gradient,r.stroke=r.gradient;var s=r.gradient.stops.getIndex(0);s&&(s.color=t.color,r.gradient.validate())}}),this.incomingDataItems.each(function(i){var r=i.link;if(r.colorMode=="toNode"&&(r.fill=r.dataItem.toNode.color),r.colorMode=="gradient"){r.fill=r.gradient,r.stroke=r.gradient;var s=r.gradient.stops.getIndex(1);s&&(s.color=t.color,r.gradient.validate())}})},Object.defineProperty(e.prototype,"incomingDataItems",{get:function(){var t=this;if(!this._incomingDataItems){var i=new wt;i.events.on("inserted",function(){t.chart.sortBy=="name"?t._incomingSorted=ma(t._incomingDataItems.iterator(),function(r,s){return vh(r.fromName,s.fromName)}):t.chart.sortBy=="value"?t._incomingSorted=ma(t._incomingDataItems.iterator(),function(r,s){return fl(cr(r.value,s.value))}):t._incomingSorted=t._incomingDataItems.iterator()},void 0,!1),this._incomingDataItems=i}return this._incomingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outgoingDataItems",{get:function(){var t=this;if(!this._outgoingDataItems){var i=new wt;i.events.on("inserted",function(){t.chart.sortBy=="name"?t._outgoingSorted=ma(t._outgoingDataItems.iterator(),function(r,s){return vh(r.fromName,s.fromName)}):t.chart.sortBy=="value"?t._outgoingSorted=ma(t._outgoingDataItems.iterator(),function(r,s){return fl(cr(r.value,s.value))}):t._outgoingSorted=t._outgoingDataItems.iterator()},void 0,!1),this._outgoingDataItems=i}return this._outgoingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(t){this.setPropertyValue("name",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.getPropertyValue("total")},set:function(t){this.setPropertyValue("total",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalIncoming",{get:function(){return this.getPropertyValue("totalIncoming")},set:function(t){this.setPropertyValue("totalIncoming",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalOutgoing",{get:function(){return this.getPropertyValue("totalOutgoing")},set:function(t){this.setPropertyValue("totalOutgoing",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.getPropertyValue("color")},set:function(t){this.setColorProperty("color",t),this._background&&(this._background.fill=t),this.fill=t},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){var i=t.pixelWidth,r=t.pixelHeight;t.removeChildren();var s=t.createChild($i);s.shouldClone=!1,_e(this,s,fe),s.stroke=this.fill,s.copyFrom(this),s.padding(0,0,0,0),s.width=i,s.height=r;var o=t.dataItem;o.color=s.fill,o.colorOrig=s.fill},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.FlowDiagramNode=ao;var _a=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._distance=0,t.className="Polyline",t.element=t.paper.add("path"),t.shapeRendering="auto",t.fill=nt(),t.strokeOpacity=1,t.applyTheme(),t}return e.prototype.makePath=function(){this._distance=0;var t=this.segments;if(t&&t.length>0){for(var i="",r=0,s=t.length;r<s;r++){var o=t[r];if(o.length>0){i+=z(o[0]);for(var n=1;n<o.length;n++){var l=o[n];i+=V(l),this._distance+=Mt(o[n-1],l)}}}this.path=i}this._realSegments=t},Object.defineProperty(e.prototype,"segments",{get:function(){return this.getPropertyValue("segments")},set:function(t){this.setPropertyValue("segments",t),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t){var i=0;t<0&&(t=Math.abs(t),i=180);var r=this._realSegments;if(r){for(var s=this.distance,o=0,n=void 0,l=0,h=0,u=void 0,p=void 0,d=0;d<r.length;d++){var c=r[d];if(c.length>1){for(var f=1;f<c.length;f++)if(u=c[f-1],p=c[f],l=o/s,n=Mt(u,p),o+=n,h=o/s,l<=t&&h>t){d=r.length;break}}else c.length==1&&(u=c[0],p=c[0],l=0,h=1)}if(u&&p){var g=(t-l)/(h-l),m=No(u,p,g);return{x:m.x,y:m.y,angle:i+Ae(u,p)}}}return{x:0,y:0,angle:0}},Object.defineProperty(e.prototype,"realSegments",{get:function(){return this._realSegments},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Polyline=_a;var oo=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="FlowDiagramLink";var i=new ct;return t.maskBullets=!1,t.colorMode="fromNode",t.layout="none",t.isMeasured=!1,t.startAngle=0,t.endAngle=0,t.strokeOpacity=0,t.verticalCenter="none",t.horizontalCenter="none",t.tooltipText="{fromName}\u2192{toName}:{value.value}",t.tooltipLocation=.5,t.link=t.createChild(rt),t.link.shouldClone=!1,t.link.setElement(t.paper.add("path")),t.link.isMeasured=!1,t.fillOpacity=.2,t.fill=i.getFor("alternativeBackground"),t.applyTheme(),t}return e.prototype.positionBullets=function(){var t=this;E(this.bullets.iterator(),function(i){i.parent=t.bulletsContainer,i.maxWidth=t.maxWidth,i.maxHeight=t.maxHeight,t.positionBullet(i)})},Object.defineProperty(e.prototype,"bulletsContainer",{get:function(){if(!this._bulletsContainer){var t=this.createChild(Q);t.shouldClone=!1,t.layout="none",this._bulletsContainer=t}return this._bulletsContainer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bulletsMask",{get:function(){if(!this._bulletsMask){var t=this.createChild(rt);t.shouldClone=!1,t.setElement(this.paper.add("path")),t.isMeasured=!1,this._bulletsMask=t}return this._bulletsMask},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){var i=t.locationX;P(i)||(i=t.locationY),P(i)||(i=.5);var r=this.middleLine.positionToPoint(i);t.moveTo(r);var s=t.propertyFields.rotation,o;if(t.dataItem){var n=t.dataItem.dataContext;o=n[s]}P(o)||(o=r.angle),t.rotation=o},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorMode",{get:function(){return this.getPropertyValue("colorMode")},set:function(t){if(t=="gradient"){var i=this.fill;this.gradient.stops.clear(),i instanceof Dt&&(this.gradient.addColor(i),this.gradient.addColor(i)),this.fill=this.gradient,this.stroke=this.gradient}this.setPropertyValue("colorMode",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(t){this.setPropertyValue("maskBullets",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(t){this.setPropertyValue("tooltipLocation",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setFill=function(t){a.prototype.setFill.call(this,t);var i=this._gradient;i&&t instanceof Dt&&(i.stops.clear(),i.addColor(t),i.addColor(t))},e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"bullets",{get:function(){var t=this;return this._bullets||(this._bullets=new zt(new Vi),this._disposers.push(new Ft(this._bullets)),this._disposers.push(this._bullets.template),this._bullets.events.on("inserted",function(i){i.newValue.events.on("propertychanged",function(r){(r.property=="locationX"||r.property=="locationY")&&t.positionBullet(r.target)},void 0,!1)},void 0,!1)),this._bullets},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.bullets.copyFrom(t.bullets);var i=this.middleLine;i&&(i instanceof Ei&&t.middleLine instanceof Ei&&i.copyFrom(t.middleLine),i instanceof _a&&t.middleLine instanceof _a&&i.copyFrom(t.middleLine)),this.link.copyFrom(t.link)},e.prototype.getTooltipX=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).x},e.prototype.getTooltipY=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).y},Object.defineProperty(e.prototype,"gradient",{get:function(){return this._gradient||(this._gradient=new mi),this._gradient},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.FlowDiagramLink=oo;var hd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColorModifier",t.applyTheme(),t}return e.prototype.modify=function(t){return t},e})(we);w.registeredClasses.ColorModifier=hd;var Qh=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.lightnesses=[],t.brightnesses=[],t.opacities=[],t.offsets=[],t.className="GradientModifier",t.applyTheme(),t}return Object.defineProperty(e.prototype,"lightnesses",{get:function(){return this._lightnesses},set:function(t){this._lightnesses=t,this._brightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brightnesses",{get:function(){return this._brightnesses},set:function(t){this._brightnesses=t,this._lightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacities",{get:function(){return this._opacities},set:function(t){this._opacities=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return this._offsets},set:function(t){this._offsets=t},enumerable:!0,configurable:!0}),e.prototype.modify=function(t){this.gradient.clear();var i=0;this.opacities&&(i=mt(i,this.opacities.length)),this.lightnesses&&(i=mt(i,this.lightnesses.length)),this.brightnesses&&(i=mt(i,this.brightnesses.length));for(var r=1,s,o,n=0;n<i;n++){var l=t;this.opacities&&P(this.opacities[n])&&(r=this.opacities[n]),this.lightnesses&&P(this.lightnesses[n])&&(s=this.lightnesses[n],o=void 0),this.brightnesses&&P(this.brightnesses[n])&&(o=this.brightnesses[n],s=void 0),P(o)?l=t.brighten(this.brightnesses[n]):P(s)&&(l=t.lighten(this.lightnesses[n]));var h=this.offsets[n];this.gradient.addColor(l,r,h)}return this.gradient},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this._offsets=t.offsets,this._brightnesses=t.brightnesses,this._lightnesses=t.lightnesses,this._opacities=t.opacities},e})(hd);w.registeredClasses.GradientModifier=Qh;var pn=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="LinearGradientModifier",t.gradient=new mi,t.applyTheme(),t}return e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.gradient=t.gradient.clone()},e})(Qh);w.registeredClasses.LinearGradientModifier=pn;var Ol=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="FlowDiagramDataItem",t.values.value={},t.applyTheme(),t}return Object.defineProperty(e.prototype,"fromName",{get:function(){return this.properties.fromName},set:function(t){this.setProperty("fromName",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toName",{get:function(){return this.properties.toName},set:function(t){this.setProperty("toName",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.setProperty("color",Hi(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"link",{get:function(){var t=this;if(!this._link){var i=this.component.links.create();this._link=i,this.addSprite(i),this._disposers.push(new Lt(function(){t.component&&t.component.links.removeValue(i)}))}return this._link},enumerable:!0,configurable:!0}),e})(Hh);var Ll=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.colors=new zs,t.className="FlowDiagram",t.nodePadding=20,t.sortBy="none",t.sequencedInterpolation=!0,t.colors.step=2,t.minNodeSize=.02;var i=t.chartContainer.createChild(Q);i.shouldClone=!1,i.layout="none",i.isMeasured=!1,t.linksContainer=i;var r=t.chartContainer.createChild(Q);return r.shouldClone=!1,r.layout="none",r.isMeasured=!1,t.nodesContainer=r,t.dataItem=t.createDataItem(),t.dataItem.component=t,t.applyTheme(),t}return e.prototype.dispose=function(){a.prototype.dispose.call(this),this.dataItem.dispose()},e.prototype.validateData=function(){var t=this;this._parseDataFrom==0&&this.nodes.clear(),this.sortNodes(),this.colors.reset(),a.prototype.validateData.call(this);var i=0,r=0,s,o;E(this.dataItems.iterator(),function(l){var h=l.fromName;if(h){var u=t.nodes.getKey(h);u||(u=t.nodes.create(h),u.name=h,u.chart=t,u.dataItem=l),l.fromNode=u,l.fromNode.outgoingDataItems.push(l)}var p=l.toName;if(p){var u=t.nodes.getKey(p);u||(u=t.nodes.create(p),u.name=p,u.chart=t,u.dataItem=l),l.toNode=u,l.toNode.incomingDataItems.push(l)}if(!l.fromNode){var d=new pn;d.opacities=[0,1],l.link.strokeModifier=d}if(!l.toNode){var c=new pn;c.opacities=[1,0],l.link.strokeModifier=c}var f=l.value;P(f)&&(i+=f,r++,(s>f||!P(s))&&(s=f),(o<f||!P(o))&&(o=f))});var n="value";this.dataItem.setCalculatedValue(n,o,"high"),this.dataItem.setCalculatedValue(n,s,"low"),this.dataItem.setCalculatedValue(n,i,"sum"),this.dataItem.setCalculatedValue(n,i/r,"average"),this.dataItem.setCalculatedValue(n,r,"count"),E(this.nodes.iterator(),function(l){var h=l[1];h.fill instanceof Dt&&(h.color=h.fill),h.color==null&&(h.color=t.colors.next()),h.dataItem.color!=null&&(h.color=h.dataItem.color),h.dataItem.visible||h.hide(0),t.getNodeValue(h)}),this.sortNodes(),this.feedLegend()},e.prototype.handleDataItemWorkingValueChange=function(t,i){this.invalidate()},e.prototype.sortNodes=function(){this.sortBy=="name"?this._sorted=this.nodes.sortedIterator():this.sortBy=="value"?this._sorted=ma(this.nodes.iterator(),function(t,i){return fl(cr(t[1].total,i[1].total))}):this._sorted=this.nodes.iterator()},e.prototype.getNodeValue=function(t){var i=0,r=0;E(t.incomingDataItems.iterator(),function(s){var o=s.getWorkingValue("value");P(o)&&(i+=o)}),E(t.outgoingDataItems.iterator(),function(s){var o=s.getWorkingValue("value");P(o)&&(r+=o)}),t.total=i+r,t.totalIncoming=i,t.totalOutgoing=r},e.prototype.changeSorting=function(){this.sortNodes()},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Flow diagram"))},e.prototype.createDataItem=function(){return new Ol},Object.defineProperty(e.prototype,"nodePadding",{get:function(){return this.getPropertyValue("nodePadding")},set:function(t){this.setPropertyValue("nodePadding",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBy",{get:function(){return this.getPropertyValue("sortBy")},set:function(t){this.setPropertyValue("sortBy",t),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minNodeSize",{get:function(){return this.getPropertyValue("minNodeSize")},set:function(t){this.setPropertyValue("minNodeSize",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{get:function(){if(!this._nodes){var t=this.createNode();t.events.on("hit",function(i){i.target.handleHit(i)}),this._nodes=new Es(t),this._disposers.push(new Pr(this._nodes))}return this._nodes},enumerable:!0,configurable:!0}),e.prototype.createNode=function(){var t=new ao;return this._disposers.push(t),t},Object.defineProperty(e.prototype,"links",{get:function(){return this._links||(this._links=new zt(this.createLink()),this._disposers.push(new Ft(this._links))),this._links},enumerable:!0,configurable:!0}),e.prototype.createLink=function(){var t=new oo;return this._disposers.push(t),t},e.prototype.feedLegend=function(){var t=this.legend;if(t){var i=[];this.nodes.each(function(r,s){i.push(s)}),t.data=i,t.dataFields.name="name"}},e.prototype.disposeData=function(){a.prototype.disposeData.call(this),this.nodes.clear()},e})(Ys);w.registeredClasses.FlowDiagram=Ll;var tu=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="LabelBullet";var i=t.createChild(Me);return i.shouldClone=!1,i.verticalCenter="middle",i.horizontalCenter="middle",i.truncate=!0,i.hideOversized=!1,i.maxWidth=500,i.maxHeight=500,i.stroke=nt(),i.strokeOpacity=0,i.fill=new ct().getFor("text"),t.events.on("maxsizechanged",t.handleMaxSize,t,!1),t.label=i,t.applyTheme(),t}return e.prototype.handleMaxSize=function(){this.label.maxWidth=this.maxWidth,this.label.maxHeight=this.maxHeight},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.label.copyFrom(t.label)},e})(Vi);w.registeredClasses.LabelBullet=tu;var ud=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.nextInCoord=0,t.nextOutCoord=0,t.className="SankeyNode",t.width=10,t.height=10;var i=t.createChild(tu);i.shouldClone=!1,i.locationX=1,i.locationY=.5,i.label.text="{name}",i.width=150,i.height=150,i.label.horizontalCenter="left",i.label.padding(0,5,0,5),t.nameLabel=i;var r=t.createChild(tu);r.shouldClone=!1,r.label.hideOversized=!1,r.locationX=.5,r.locationY=.5,r.width=150,r.height=150,r.label.horizontalCenter="middle",t.valueLabel=r;var s=t.hiddenState;return s.properties.fill=new ct().getFor("disabledBackground"),s.properties.opacity=.5,s.properties.visible=!0,t.background.hiddenState.copyFrom(s),t}return e.prototype.invalidateLinks=function(){var t=this;a.prototype.invalidateLinks.call(this),this.nextInCoord=0,this.nextOutCoord=0;var i=this.chart;if(i){var r=i.orientation;this._incomingSorted&&E(this._incomingSorted,function(s){var o=s.link,n=s.getWorkingValue("value");if(P(n)){o.parent=t.chart.linksContainer;var l=void 0,h=void 0,u=void 0;if(r=="horizontal"?(l=t.pixelX+t.dx,h=t.nextInCoord+t.pixelY+t.dy,u=0):(h=t.pixelY+t.dy,l=t.nextInCoord+t.pixelX+t.dx,u=90),o.endX=l,o.endY=h,o.startAngle=u,o.endAngle=u,o.gradient.rotation=u,o.linkWidth=n*i.valueHeight,!s.fromNode){r=="horizontal"?(o.maxWidth=200,o.startX=t.pixelX+t.dx-o.maxWidth,o.startY=o.endY):(o.maxHeight=200,o.startX=o.endX,o.startY=t.pixelY+t.dy-o.maxHeight),o.gradient,o.fill=s.toNode.color;var p=o.gradient.stops.getIndex(0);p&&(o.colorMode=="gradient"&&(p.color=t.color),p.opacity=0,o.fill=o.gradient,o.stroke=o.gradient,o.gradient.validate())}t.nextInCoord+=o.linkWidth}}),this._outgoingSorted&&E(this._outgoingSorted,function(s){var o=s.link;o.parent=t.chart.linksContainer;var n=s.getWorkingValue("value");if(P(n)){var l=void 0,h=void 0,u=void 0;if(r=="horizontal"?(u=0,l=t.pixelX+t.pixelWidth+t.dx-1,h=t.nextOutCoord+t.pixelY+t.dy):(u=90,l=t.nextOutCoord+t.pixelX+t.dx,h=t.pixelY+t.pixelHeight+t.dy-1),o.startX=l,o.startY=h,o.startAngle=u,o.endAngle=u,o.gradient.rotation=u,o.linkWidth=n*t.chart.valueHeight,!s.toNode){r=="horizontal"?(o.maxWidth=200,o.endX=t.pixelX+o.maxWidth+t.dx,o.endY=o.startY):(o.maxHeight=200,o.endX=o.startX,o.endY=t.pixelY+o.maxHeight+t.dy),o.opacity=t.opacity;var p=o.gradient.stops.getIndex(1);p&&(o.colorMode=="gradient"&&(p.color=t.color),p.opacity=0,o.fill=o.gradient,o.stroke=o.gradient,o.gradient.validate())}t.nextOutCoord+=o.linkWidth}})}this.positionBullet(this.nameLabel),this.positionBullet(this.valueLabel)},e.prototype.positionBullet=function(t){t&&(t.x=this.measuredWidth*t.locationX,t.y=this.measuredHeight*t.locationY)},Object.defineProperty(e.prototype,"level",{get:function(){return this.getPropertyValue("level")},set:function(t){this.setPropertyValue("level",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.nameLabel.copyFrom(t.nameLabel),this.valueLabel.copyFrom(t.valueLabel)},e})(ao);w.registeredClasses.SankeyNode=ud;var dn=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Polyspline",t.tensionX=.5,t.tensionY=.5,t.applyTheme(),t}return e.prototype.makePath=function(){this._distance=0;var t=this.segments,i=this.tensionX,r=this.tensionY;if(this.allPoints=[],t&&t.length>0){var s="";this._realSegments=[];for(var o=0,n=t.length;o<n;o++){var l=t[o],h=[];if(this._realSegments.push(h),l.length>0){var u=l[0],p=l[l.length-1],d=!1;H(u.x,3)==H(p.x)&&H(u.y)==H(p.y)&&(d=!0),s+=z(l[0]);for(var c=0;c<l.length-1;c++){var f=l[c-1],g=l[c],m=l[c+1],y=l[c+2];c===0?f=l[c]:c==l.length-2&&(y=l[c+1]),y||(y=m),c===0?d?f=l[l.length-2]:f=l[o]:c==l.length-2&&(d?y=l[1]:y=l[c+1]);var v=dp(f,g,m,y,i,r),x=cp(f,g,m,y,i,r);s+=ya(m,v,x);var _=Math.ceil(Av(g,m,v,x,20))*1.2,$=g;if(_>0)for(var T=0;T<=_;T++){var S=dh(g,m,v,x,T/_);if(!(S.x==$.x&&S.y==$.y)){h.push(S);var k=H(Ae($,S),5);this._distance+=Mt($,S),this.allPoints[Math.floor(this._distance)]={x:S.x,y:S.y,angle:k},$=S}}else h.push(f)}}var A=this.allPoints;if(A.length>1){for(var L=0;L<A.length;L++)if(!A[L]){if(L>1)A[L]=A[L-1];else for(var O=1;O<A.length;O++)if(A[O]){A[L]=A[O];break}}}}this.path=s}},e.prototype.getClosestPointIndex=function(t){var i=this.allPoints,r,s=1/0;if(i.length>1)for(var o=1;o<i.length;o++){var n=Mt(t,i[o]);n<s&&(r=o,s=n)}return r},Object.defineProperty(e.prototype,"tensionX",{get:function(){return this.getPropertyValue("tensionX")},set:function(t){this.setPropertyValue("tensionX",t),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tensionY",{get:function(){return this.getPropertyValue("tensionY")},set:function(t){this.setPropertyValue("tensionY",t,!0),this.makePath()},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,i){var r=0,s=this.allPoints,o=s.length;if(P(t)||(t=0),o>1){if(i&&o>3){if(t<0){t<-.01&&(t=-.01);var n=s[0],l=s[1],h=n.x-(n.x-l.x)*o*t,u=n.y-(n.y-l.y)*o*t;return{x:h,y:u,angle:Ae(n,l)}}else if(t>1){t>1.01&&(t=1.01);var n=s[s.length-2],l=s[s.length-3],h=n.x+(n.x-l.x)*o*(t-1),u=n.y+(n.y-l.y)*o*(t-1);return{x:h,y:u,angle:Ae(n,{x:h,y:u})}}else if(t==1){var p=s[s.length-1];return{x:p.x,y:p.y,angle:p.angle}}}else t<0&&(t=Math.abs(t),r=180),t>=1&&(t=.9999999999999);var d=s[Math.floor(t*o)];return{x:d.x,y:d.y,angle:d.angle+r}}else if(o==1){var d=s[0];return{x:d.x,y:d.y,angle:d.angle}}else return{x:0,y:0,angle:0}},e})(_a);w.registeredClasses.Polyspline=dn;var pd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SankeyLink",new ct,t.tension=.8,t.controlPointDistance=.2,t.startAngle=0,t.endAngle=0,t.linkWidth=0,t.startX=0,t.endX=0,t.startY=0,t.endY=0,t.middleLine=t.createChild(dn),t.middleLine.shouldClone=!1,t.middleLine.strokeOpacity=0,t.applyTheme(),t}return e.prototype.makeBackwards=function(){this.states.getKey("backwards")!=null&&this.setState("backwards")},e.prototype.validate=function(){var t,i,r,s;if(a.prototype.validate.call(this),!this.isTemplate){var o=this.startX,n=this.startY,l=this.endX,h=this.endY;if(this.states.getKey("backwards")&&this.setState("default"),this.dataItem){var u=this.dataItem.component;u&&(u.orientation=="horizontal"?l<o&&(t=Na([l,o],2),o=t[0],l=t[1],i=Na([h,n],2),n=i[0],h=i[1],this.makeBackwards()):h<n&&(r=Na([h,n],2),n=r[0],h=r[1],s=Na([l,o],2),o=s[0],l=s[1],this.makeBackwards()))}P(l)||(l=o),P(h)||(h=n);var p=this.startAngle,d=this.endAngle,c=this.linkWidth,f="",g=o,m=n,y=l,v=h,x=o+c*G(p),_=l+c*G(d),$=n+c*U(p),T=h+c*U(d),S=o+c/2*G(p),k=l+c/2*G(d),A=n+c/2*U(p),L=h+c/2*U(d);this.zIndex=this.zIndex||this.dataItem.index;var O=this.tension+(1-this.tension)*G(p),I=this.tension+(1-this.tension)*U(p);if(this.middleLine.tensionX=O,this.middleLine.tensionY=I,P(c)&&P(o)&&P(l)&&P(n)&&P(h)){H(g,3)==H(y,3)&&(y+=.01),H(m,3)==H(v,3)&&(v+=.01),H(x,3)==H(_,3)&&(_+=.01),H($,3)==H(T,3)&&(T+=.01);var R=Math.min(x,_,g,y),B=Math.min($,T,m,v),Z=Math.max(x,_,g,y),j=Math.max($,T,m,v);this._bbox={x:R,y:B,width:Z-R,height:j-B};var it=this.controlPointDistance,st=g+(y-g)*it*U(p),ht=m+(v-m)*it*G(p),dt=y-(y-g)*it*U(d),Xt=v-(v-m)*it*G(d),tt=S+(k-S)*it*U(p),Tt=A+(L-A)*it*G(p),Nt=k-(k-S)*it*U(d),Pe=L-(L-A)*it*G(d),ye=Ae({x:st,y:ht},{x:dt,y:Xt}),ke=(c/U(ye)-c)/cf(ye)*U(p),We=(c/G(ye)-c)*cf(ye)*G(p),ae=-ke/2+x+(_-x)*it*U(p),Zi=-We/2+$+(T-$)*it*G(p),Ji=-ke/2+_-(_-x)*it*U(d),Mo=-We/2+T-(T-$)*it*G(d);L==A&&(L+=.01),this.middleLine.segments=[[{x:S,y:A},{x:tt,y:Tt},{x:Nt,y:Pe},{x:k,y:L}]],st+=ke/2,ht+=We/2,dt+=ke/2,Xt+=We/2,f+=z({x:g,y:m}),f+=new jr(O,I).smooth([{x:g,y:m},{x:st,y:ht},{x:dt,y:Xt},{x:y,y:v}]),f+=V({x:_,y:T}),f+=new jr(O,I).smooth([{x:_,y:T},{x:Ji,y:Mo},{x:ae,y:Zi},{x,y:$}]),f+=pe()}this.link.path=f,this.maskBullets&&(this.bulletsMask.path=f,this.bulletsContainer.mask=this.bulletsMask),this.positionBullets()}},Object.defineProperty(e.prototype,"startX",{get:function(){return this.getPropertyValue("startX")},set:function(t){this.setPropertyValue("startX",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endX",{get:function(){return this.getPropertyValue("endX")},set:function(t){this.setPropertyValue("endX",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startY",{get:function(){return this.getPropertyValue("startY")},set:function(t){this.setPropertyValue("startY",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endY",{get:function(){return this.getPropertyValue("endY")},set:function(t){this.setPropertyValue("endY",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linkWidth",{get:function(){return this.getPropertyValue("linkWidth")},set:function(t){this.setPropertyValue("linkWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(t){this.setPropertyValue("controlPointDistance",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t,!0)},enumerable:!0,configurable:!0}),e})(oo);w.registeredClasses.SankeyLink=pd;var Hb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SankeyDiagramDataItem",t.applyTheme(),t}return e})(Ol);var Xb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="SankeyDiagram",t.orientation="horizontal",t.nodeAlign="middle",t.nodesContainer.width=N(100),t.nodesContainer.height=N(100),t.linksContainer.width=N(100),t.linksContainer.height=N(100),t.applyTheme(),t}return e.prototype.validateData=function(){var t=this;this._valueHeight=void 0,a.prototype.validateData.call(this),this._levelCount=0,this.nodes.each(function(i,r){r.level=void 0}),this.nodes.each(function(i,r){r.level=t.getNodeLevel(r,0),t._levelCount=mt(t._levelCount,r.level)})},e.prototype.getNodeLevel=function(t,i){var r=this,s=[i];return E(t.incomingDataItems.iterator(),function(o){o.fromNode&&(P(o.fromNode.level)?s.push(o.fromNode.level+1):(r._counter=0,r.checkLoop(o.fromNode),r._counter<r.dataItems.length&&s.push(r.getNodeLevel(o.fromNode,i+1))))}),Math.max.apply(Math,pa(s))},e.prototype.checkLoop=function(t){var i=this;this._counter++,!(this._counter>this.dataItems.length)&&E(t.incomingDataItems.iterator(),function(r){i.checkLoop(r.fromNode)})},e.prototype.calculateValueHeight=function(){var t=this;this._levelSum={},this._levelNodesCount={},this.maxSum=0;var i=this.dataItem.values.value.sum;E(this._sorted,function(p){var d=p[1];t.getNodeValue(d)}),this.nodes.each(function(p,d){var c=d.level,f=Math.max(d.totalIncoming,d.totalOutgoing);f/i<t.minNodeSize&&(f=i*t.minNodeSize),P(t._levelSum[c])?t._levelSum[c]+=f:t._levelSum[c]=f,P(t._levelNodesCount[c])?t._levelNodesCount[c]++:t._levelNodesCount[c]=1});var r;this.orientation=="horizontal"?r=this.chartContainer.maxHeight-1:r=this.chartContainer.maxWidth-1;var s,o;at(this._levelSum,function(p,d){var c=d,f=t._levelNodesCount[p],g=(r-(f-1)*t.nodePadding)/c;g==1/0&&(g=0),(o>g||!P(o))&&(o=g,t.maxSum=c,s=Wt(p))}),this._maxSumLevel=s;var n=this._levelNodesCount[this._maxSumLevel],l=(r-(n-1)*this.nodePadding)/this.maxSum;if(l==1/0&&(l=0),!P(this.valueHeight))this.valueHeight=l;else{var h=void 0;try{h=this._heightAnimation.animationOptions[0].to}catch{}if(h!=l){var u=this.interpolationDuration;try{u=this.nodes.template.states.getKey("active").transitionDuration}catch{}this._heightAnimation=new Pi(this,{property:"valueHeight",from:this.valueHeight,to:l},u,this.interpolationEasing).start(),this._disposers.push(this._heightAnimation)}}},e.prototype.validate=function(){var t=this;a.prototype.validate.call(this),this.calculateValueHeight();var i=this.nodesContainer,r={},s=this._levelNodesCount[this._maxSumLevel],o=this.dataItem.values.value.sum,n;this.orientation=="horizontal"?n=this.chartContainer.maxHeight-1:n=this.chartContainer.maxWidth-1,E(this._sorted,function(l){var h=l[1],u=h.level,p=0,d=t._levelNodesCount[u];switch(t.nodeAlign){case"bottom":p=(t.maxSum-t._levelSum[u])*t.valueHeight-(d-s)*t.nodePadding;break;case"middle":p=(t.maxSum-t._levelSum[u])*t.valueHeight/2-(d-s)*t.nodePadding/2;break}if(t.maxSum==0)switch(t.nodeAlign){case"bottom":p=n-d*(t.minNodeSize*n+t.nodePadding);break;case"middle":p=n/2-d/2*(t.minNodeSize*n+t.nodePadding);break}h.parent=i;var c,f,g,m=Math.max(h.totalIncoming,h.totalOutgoing);if(m/o<t.minNodeSize&&(m=o*t.minNodeSize),t.orientation=="horizontal"){c=(t.innerWidth-h.pixelWidth)/t._levelCount,f=c*h.level,g=r[u]||p;var y=m*t.valueHeight;o==0&&y==0&&(y=t.minNodeSize*n),h.height=y,h.minX=f,h.maxX=f,r[u]=g+y+t.nodePadding}else{c=(t.innerHeight-h.pixelHeight)/t._levelCount,f=r[u]||p,g=c*h.level;var v=m*t.valueHeight;o==0&&v==0&&(v=t.minNodeSize*n),h.width=v,h.minY=g,h.maxY=g,r[u]=f+v+t.nodePadding}h.x=f,h.y=g})},e.prototype.showReal=function(t){var i=this;if(!this.preventShow){if(this.interpolationDuration>0){var r=this.nodesContainer,s=0;E(this.links.iterator(),function(o){o.hide(0)}),E(this._sorted,function(o){var n=o[1],l;i.orientation=="horizontal"?(n.dx=-(r.pixelWidth-n.pixelWidth)/Math.max(i._levelCount,1),l="dx"):(n.dy=-(r.pixelHeight-n.pixelHeight)/Math.max(i._levelCount,1),l="dy");var h=0,u=i.interpolationDuration;i.sequencedInterpolation&&(h=i.sequencedInterpolationDelay*s+u*s/Zv(i.nodes.iterator())),n.opacity=0,n.invalidateLinks(),n.animate([{property:"opacity",from:0,to:1},{property:l,to:0}],i.interpolationDuration,i.interpolationEasing).delay(h),E(n.outgoingDataItems.iterator(),function(p){var d=p.link.show(i.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}),E(n.incomingDataItems.iterator(),function(p){if(!p.fromNode){var d=p.link.show(i.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}}),s++})}return a.prototype.showReal.call(this)}},e.prototype.changeSorting=function(){var t=this;this.sortNodes();var i={};E(this._sorted,function(r){var s=r[1],o=s.level,n=(t.maxSum-t._levelSum[o])*t.valueHeight/2,l,h;t.orientation=="horizontal"?(l="y",h=s.pixelHeight):(l="x",h=s.pixelWidth),s.animate({property:l,to:i[o]||n},t.interpolationDuration,t.interpolationEasing),i[o]=(i[o]||n)+h+t.nodePadding,s.invalidateLinks()})},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Sankey diagram"))},e.prototype.createDataItem=function(){return new Hb},Object.defineProperty(e.prototype,"nodeAlign",{get:function(){return this.getPropertyValue("nodeAlign")},set:function(t){this.setPropertyValue("nodeAlign",t),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0);var i=this.nodes.template.nameLabel;t=="vertical"?(this.nodes.template.width=void 0,i.label.horizontalCenter="middle",i.locationX=.5):(this.nodes.template.height=void 0,i.label.horizontalCenter="left",i.locationX=1)},enumerable:!0,configurable:!0}),e.prototype.createNode=function(){var t=new ud;return this._disposers.push(t),t},e.prototype.createLink=function(){var t=new pd;return this._disposers.push(t),t},Object.defineProperty(e.prototype,"valueHeight",{get:function(){return this._valueHeight},set:function(t){t!=this._valueHeight&&(this._valueHeight=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.disposeData=function(){a.prototype.disposeData.call(this),this._sorted=this.nodes.iterator()},e})(Ll);w.registeredClasses.SankeyDiagram=Xb;var dd=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="ChordNode";var i=t.createChild(ro);i.location=.5,i.radius=5,i.text="{name}",i.zIndex=1,i.shouldClone=!1,t.label=i,t.layout="none",t.events.on("positionchanged",t.updateRotation,t,!1),t.isMeasured=!1,t.slice=t.createChild(Hr),t.slice.isMeasured=!1;var r=t.hiddenState;return r.properties.fill=new ct().getFor("disabledBackground"),r.properties.opacity=.5,r.properties.visible=!0,t.setStateOnChildren=!1,t.slice.hiddenState.properties.visible=!0,t.adapter.add("tooltipX",function(s,o){return o.slice.ix*(o.slice.radius-(o.slice.radius-o.slice.pixelInnerRadius)/2)}),t.adapter.add("tooltipY",function(s,o){return o.slice.iy*(o.slice.radius-(o.slice.radius-o.slice.pixelInnerRadius)/2)}),t}return e.prototype.invalidateLinks=function(){var t=this;a.prototype.invalidateLinks.call(this);var i=this.label,r=this.slice,s=this.chart;if(s&&r){var o=this.total,n=r.arc,l=r.startAngle;this.children.each(function(p){if(p instanceof Vi){var d=p.locationX;P(d)||(d=.5);var c=p.locationY;P(c)||(c=1);var f=l+n*d,g=c*r.radius;p.x=g*U(f),p.y=g*G(f)}});var h=l+n*i.location,u=l+(1-o/this.adjustedTotal)*n*.5;Ke(u)&&(u=l),i.fixPosition(h,r.radius),this.nextAngle=u,this._outgoingSorted&&E(this._outgoingSorted,function(p){var d=p.link;d.parent=t.chart.linksContainer;var c=p.getWorkingValue("value");if(P(c)){if(s.nonRibbon){var f=d.percentWidth;P(f)||(f=5),f=f/100,d.startAngle=l+n/2-n/2*f,d.arc=n*f}else d.arc=c*s.valueAngle,d.startAngle=t.nextAngle,t.nextAngle+=d.arc;p.toNode||(d.endAngle=d.startAngle),d.radius=r.pixelInnerRadius}}),this._incomingSorted&&E(this._incomingSorted,function(p){var d=p.link;if(d.radius=r.pixelInnerRadius,s.nonRibbon){var c=d.percentWidth;P(c)||(c=5),c=c/100,d.endAngle=l+n/2-n/2*c,d.arc=n*c}else{d.endAngle=t.nextAngle;var f=p.getWorkingValue("value");P(f)&&(d.arc=f*s.valueAngle,t.nextAngle+=d.arc)}p.fromNode||(d.startAngle=d.endAngle)})}},e.prototype.updateRotation=function(){var t=this.slice,i=this.trueStartAngle+t.arc/2,r=t.radius,s=r*U(i),o=r*G(i),n=Ae({x:s+this.pixelX,y:o+this.pixelY});t.startAngle=this.trueStartAngle+(n-i),this.dx=-this.pixelX,this.dy=-this.pixelY},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.label.copyFrom(t.label),this.slice.copyFrom(t.slice)},e})(ao);w.registeredClasses.ChordNode=dd;var Yb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="QuadraticCurve",t.element=t.paper.add("path"),t.pixelPerfect=!1,t.fill=nt(),t.applyTheme(),t}return e.prototype.draw=function(){if(P(this.x1+this.x2+this.y1+this.y2+this.cpx+this.cpy)){var t={x:this.x1,y:this.y1},i={x:this.x2,y:this.y2},r={x:this.cpx,y:this.cpy},s=z(t)+Xs(i,r);this.path=s}},Object.defineProperty(e.prototype,"cpx",{get:function(){return this.getPropertyValue("cpx")},set:function(t){this.setPropertyValue("cpx",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cpy",{get:function(){return this.getPropertyValue("cpy")},set:function(t){this.setPropertyValue("cpy",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t){var i={x:this.x1,y:this.y1},r={x:this.cpx,y:this.cpy},s={x:this.x2,y:this.y2},o=ff(i,s,r,t),n=ff(i,s,r,t+.001);return{x:o.x,y:o.y,angle:Ae(o,n)}},e})(Ei);var cd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ChordLink",t.middleLine=t.createChild(Yb),t.middleLine.shouldClone=!1,t.middleLine.strokeOpacity=0,t.applyTheme(),t}return e.prototype.validate=function(){if(a.prototype.validate.call(this),!this.isTemplate){var t=this.startAngle,i=this.endAngle,r=this.arc,s=this.radius,o=this.dataItem.fromNode,n=this.dataItem.toNode,l=0,h=0;o&&(l=o.pixelX+o.dx,h=o.pixelY+o.dy);var u=0,p=0;if(n&&(u=n.pixelX+n.dx,p=n.pixelY+n.dy),s>0){var d=s*U(t)+l,c=s*G(t)+h,f=s*U(i)+u,g=s*G(i)+p,m={x:0,y:0},y=z({x:d,y:c});y+=Ne(t,r,s),y+=Xs({x:f,y:g},m),y+=Ne(i,r,s),y+=Xs({x:d,y:c},m),r>0?this.link.path=y:this.link.path="",this.maskBullets&&(this.bulletsMask.path=y,this.bulletsContainer.mask=this.bulletsMask);var v=t+r/2,x=i+r/2,_=this.middleLine;_.x1=s*U(v)+l,_.y1=s*G(v)+h,_.x2=s*U(x)+u,_.y2=s*G(x)+p,_.cpx=0,_.cpy=0,_.stroke=this.fill,this.positionBullets()}}},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPropertyValue("radius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(t){this.setPropertyValue("arc",t,!0)},enumerable:!0,configurable:!0}),e})(oo);w.registeredClasses.ChordLink=cd;var zb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ChordDiagramDataItem",t.applyTheme(),t}return e})(Ol);var Wb=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.valueAngle=0,t.className="ChordDiagram",t.startAngle=-90,t.endAngle=270,t.radius=N(80),t.innerRadius=-15,t.nodePadding=5;var i=t.chartContainer.createChild(Q);return i.align="center",i.valign="middle",i.shouldClone=!1,i.layout="absolute",t.chordContainer=i,t.nodesContainer.parent=i,t.linksContainer.parent=i,t.chartContainer.events.on("maxsizechanged",t.invalidate,t,!1),t.applyTheme(),t}return e.prototype.validate=function(){var t=this,i=this.chartContainer,r=this.endAngle,s=this.startAngle+this.nodePadding/2,o=dr(this.startAngle,this.endAngle,1),n={x:0,y:0,width:0,height:0};o=Is([o,n]);var l=Math.min(i.innerWidth/o.width,i.innerHeight/o.height);P(l)||(l=0);var h=Oe(this.radius,l),u=Oe(this.innerRadius,h,!0),p=this.dataItem.values.value.sum,d=0,c=0;E(this._sorted,function(f){var g=f[1];t.getNodeValue(g),d++;var m=g.total;g.total/p<t.minNodeSize&&(m=p*t.minNodeSize),c+=m}),this.valueAngle=(r-this.startAngle-this.nodePadding*d)/c,E(this._sorted,function(f){var g=f[1],m=g.slice;m.radius=h,m.innerRadius=u;var y=g.total;g.total/p<t.minNodeSize&&(y=p*t.minNodeSize),g.adjustedTotal=y;var v;t.nonRibbon?v=(r-t.startAngle)/d-t.nodePadding:v=t.valueAngle*y,m.arc=v,m.startAngle=s,g.trueStartAngle=s,g.parent=t.nodesContainer,g.validate(),s+=v+t.nodePadding}),this.chordContainer.definedBBox={x:h*o.x,y:h*o.y,width:h*o.width,height:h*o.height},this.chordContainer.invalidateLayout(),a.prototype.validate.call(this)},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Chord diagram"))},e.prototype.createDataItem=function(){return new zb},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nonRibbon",{get:function(){return this.getPropertyValue("nonRibbon")},set:function(t){this.setPropertyValue("nonRibbon",t,!0),this.links.template.middleLine.strokeOpacity=1,this.links.template.link.fillOpacity=0},enumerable:!0,configurable:!0}),e.prototype.createNode=function(){var t=new dd;return this._disposers.push(t),t},e.prototype.createLink=function(){var t=new cd;return this._disposers.push(t),t},e})(Ll);w.registeredClasses.ChordDiagram=Wb;var Fm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="TreeMapSeriesDataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"parentName",{get:function(){var t=this.treeMapDataItem;if(t&&t.parent)return t.parent.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.treeMapDataItem;if(t)return t.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeMapDataItem",{get:function(){return this._dataContext},enumerable:!0,configurable:!0}),e.prototype.hide=function(t,i,r,s){var o=this.treeMapDataItem;return o&&o.hide(t),a.prototype.hide.call(this,t,i,r,s)},e.prototype.show=function(t,i,r){var s=this.treeMapDataItem;return s&&s.show(t,i,r),a.prototype.show.call(this,t,i,r)},e})(mr);var eu=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="TreeMapSeries",t.applyTheme(),t.fillOpacity=1,t.strokeOpacity=1,t.minBulletDistance=0,t.columns.template.tooltipText="{parentName} {name}: {value}",t.columns.template.configField="config";var i=new ct;return t.stroke=i.getFor("background"),t.dataFields.openValueX="x0",t.dataFields.valueX="x1",t.dataFields.openValueY="y0",t.dataFields.valueY="y1",t.sequencedInterpolation=!1,t.showOnInit=!1,t.columns.template.pixelPerfect=!1,t}return e.prototype.processDataItem=function(t,i){i.seriesDataItem=t,a.prototype.processDataItem.call(this,t,i)},e.prototype.createDataItem=function(){return new Fm},e.prototype.show=function(t){if(!this.preventShow){var i=this.defaultState.transitionDuration;return P(t)&&(i=t),this.dataItems.each(function(r){r.show(t)}),a.prototype.showReal.call(this,i)}},e.prototype.hide=function(t){var i=this.defaultState.transitionDuration;P(t)&&(i=t);var r=a.prototype.hideReal.call(this,i);return this.dataItems.each(function(s){s.hide(t)}),r},e.prototype.processValues=function(){},e.prototype.getStartLocation=function(t){return 0},e.prototype.getEndLocation=function(t){return 1},e.prototype.dataChangeUpdate=function(){},e.prototype.processConfig=function(t){t&&(!C(t.dataFields)||!Kt(t.dataFields))&&(t.dataFields={}),a.prototype.processConfig.call(this,t)},e.prototype.createLegendMarker=function(t){var i=t.pixelWidth,r=t.pixelHeight;t.removeChildren();var s=t.createChild($i);s.shouldClone=!1,_e(this,s,fe),s.padding(0,0,0,0),s.width=i,s.height=r;var o=t.dataItem;o.color=s.fill,o.colorOrig=s.fill},e.prototype.disableUnusedColumns=function(t){a.prototype.disableUnusedColumns.call(this,t),t.column&&(t.column.__disabled=!1)},e})(Ar);w.registeredClasses.TreeMapSeries=eu;w.registeredClasses.TreeMapSeriesDataItem=Fm;var Gb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.rows=[],t.className="TreeMapDataItem",t.values.value={workingValue:0},t.values.x0={},t.values.y0={},t.values.x1={},t.values.y1={},t.hasChildren.children=!0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,t.label&&(t.label.dataItem=this),t.valueLabel&&(t.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),e.prototype.getDuration=function(){return 0},Object.defineProperty(e.prototype,"value",{get:function(){var t=0;return!this.children||this.children.length==0?t=this.values.value.workingValue:E(this.children.iterator(),function(i){var r=i.value;P(r)&&(t+=r)}),t},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"percent",{get:function(){return this.parent?this.value/this.parent.value*100:100},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x0",{get:function(){return this.values.x0.value},set:function(t){this.setValue("x0",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x1",{get:function(){return this.values.x1.value},set:function(t){this.setValue("x1",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y0",{get:function(){return this.values.y0.value},set:function(t){this.setValue("y0",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this.values.y1.value},set:function(t){this.setValue("y1",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.properties.name},set:function(t){this.setProperty("name",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.properties.children},set:function(t){this.setProperty("children",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this.parent?this.parent.level+1:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){var t=this.properties.color;return t==null&&this.parent&&(t=this.parent.color),t==null&&this.component&&(t=this.component.colors.getIndex(this.component.colors.step*this.index)),t},set:function(t){this.setProperty("color",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this.color},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"series",{get:function(){return this._series},set:function(t){t!=this._series&&(this._series&&(this.component.series.removeValue(this._series),this._series.dispose()),this._series=t,this._disposers.push(t))},enumerable:!0,configurable:!0}),e.prototype.hide=function(t,i,r,s){this.setWorkingValue("value",0),this.children&&this.children.each(function(n){n.hide(t,i,r,s)});var o=this.seriesDataItem;return o&&o.bullets.each(function(n,l){l.hide(),l.preventShow=!0}),a.prototype.hide.call(this,t,i,r,s)},e.prototype.show=function(t,i,r){this.setWorkingValue("value",this.values.value.value),this.children&&this.children.each(function(o){o.show(t,i,r)});var s=this.seriesDataItem;return s&&s.bullets.each(function(o,n){n.preventShow=!1}),a.prototype.show.call(this,t,i,r)},e})(ln);var Ub=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.layoutAlgorithm=t.squarify,t.zoomable=!0,t.className="TreeMap",t._usesData=!0,t.maxLevels=2,t.currentLevel=0,t.hideParentColumns=!1,t.colors=new zs,t.sorting="descending";var i=t.xAxes.push(new At);i.title.disabled=!0,i.strictMinMax=!0;var r=i.renderer;r.inside=!0,r.labels.template.disabled=!0,r.ticks.template.disabled=!0,r.grid.template.disabled=!0,r.axisFills.template.disabled=!0,r.minGridDistance=100,r.line.disabled=!0,r.baseGrid.disabled=!0;var s=t.yAxes.push(new At);s.title.disabled=!0,s.strictMinMax=!0;var o=s.renderer;o.inside=!0,o.labels.template.disabled=!0,o.ticks.template.disabled=!0,o.grid.template.disabled=!0,o.axisFills.template.disabled=!0,o.minGridDistance=100,o.line.disabled=!0,o.baseGrid.disabled=!0,o.inversed=!0,t.xAxis=i,t.yAxis=s;var n=new eu;return t.seriesTemplates=new Es(n),n.virtualParent=t,t._disposers.push(new Pr(t.seriesTemplates)),t._disposers.push(n),t.zoomOutButton.events.on("hit",function(){t.zoomToChartDataItem(t._homeDataItem)},void 0,!1),t.seriesTemplates.events.on("insertKey",function(l){l.newValue.isTemplate=!0},void 0,!1),t.applyTheme(),t}return Object.defineProperty(e.prototype,"navigationBar",{get:function(){return this._navigationBar},set:function(t){var i=this;this._navigationBar!=t&&(this._navigationBar=t,t.parent=this,t.toBack(),t.links.template.events.on("hit",function(r){var s=r.target.dataItem.dataContext;s.isDisposed()||(i.zoomToChartDataItem(s),i.createTreeSeries(s))},void 0,!0),this._disposers.push(t))},enumerable:!0,configurable:!0}),e.prototype.validateData=function(){this.series.clear(),this._tempSeries=[],a.prototype.validateData.call(this),this._homeDataItem&&this._homeDataItem.dispose();var t=this.dataItems.template.clone();this._homeDataItem=t,E(this.dataItems.iterator(),function(s){s.parent=t}),t.children=this.dataItems,t.x0=0,t.y0=0,t.name=this._homeText;var i=1e3,r=Math.round(i*this.pixelHeight/this.pixelWidth/10)*10||1e3;t.x1=i,t.y1=r,this.xAxis.min=0,this.xAxis.max=i,this.xAxis.getMinMax(),this.yAxis.min=0,this.yAxis.max=r,this.yAxis.getMinMax(),this.layoutItems(t),this.createTreeSeries(t),this.feedLegend()},e.prototype.layoutItems=function(t,i){if(t){var r=t.children;i||(i=this.sorting),i=="ascending"&&r.values.sort(function(l,h){return l.value-h.value}),i=="descending"&&r.values.sort(function(l,h){return h.value-l.value}),this._updateDataItemIndexes(0),this.layoutAlgorithm(t);for(var s=0,o=r.length;s<o;s++){var n=r.getIndex(s);n.children&&this.layoutItems(n)}}},e.prototype.createTreeSeries=function(t){var i=this;this._tempSeries=[];for(var r=[t],s=t.parent;s!=null;)this.initSeries(s),r.push(s),s=s.parent;r.reverse(),this.navigationBar&&(this.navigationBar.data=r),this.createTreeSeriesReal(t),W(this._tempSeries,function(o){i.series.indexOf(o)==-1&&i.series.push(o),o.zIndex=o.level})},e.prototype.createTreeSeriesReal=function(t){if(t.children){var i=t.level;if(i<this.currentLevel+this.maxLevels){this.initSeries(t);for(var r=0;r<t.children.length;r++){var s=t.children.getIndex(r);s.children&&this.createTreeSeriesReal(s)}}}},e.prototype.setData=function(t){this.currentLevel=0,this.currentlyZoomed=void 0,this.xAxis.start=0,this.xAxis.end=1,this.yAxis.start=0,this.yAxis.end=1,a.prototype.setData.call(this,t)},e.prototype.seriesAppeared=function(){return!0},e.prototype.initSeries=function(t){var i=this;if(!t.series){var r=void 0,s=this.seriesTemplates.getKey(t.level.toString());s?r=s.clone():r=this.series.create(),r.dataItem.dataContext=t,r.name=t.name,r.parentDataItem=t,t.series=r;var o=t.level;r.level=o;var n=t.dataContext;n&&(r.config=n.config),this.dataUsers.removeValue(r),r.data=t.children.values,r.fill=t.color,r.columnsContainer.hide(0),r.bulletsContainer.hide(0),r.columns.template.adapter.add("fill",function(l,h){var u=h.dataItem;if(u){var p=u.treeMapDataItem;if(p)return h.fill=p.color,h.adapter.remove("fill"),p.color}}),this.zoomable&&(t.level>this.currentLevel||t.children&&t.children.length>0)&&(r.columns.template.cursorOverStyle=Le.pointer,this.zoomable&&r.columns.template.events.on("hit",function(l){var h=l.target.dataItem;t.level>i.currentLevel?i.zoomToChartDataItem(h.treeMapDataItem.parent):i.zoomToSeriesDataItem(h)},this,void 0))}this._tempSeries.push(t.series)},e.prototype.toggleBullets=function(t){var i=this;E(this.series.iterator(),function(r){i._tempSeries.indexOf(r)==-1?(r.columnsContainer.hide(),r.bulletsContainer.hide(t)):(r.columnsContainer.show(),r.bulletsContainer.show(t),r.dataItems.each(function(s){s.bullets.each(function(o,n){n.show()})}),r.level<i.currentLevel?(i.hideParentColumns&&r.columnsContainer.hide(),r.bulletsContainer.hide(t)):r.level==i.currentLevel&&i.maxLevels>1&&r.dataItems.each(function(s){s.treeMapDataItem.children&&s.bullets.each(function(o,n){n.hide()})}))})},e.prototype.zoomToSeriesDataItem=function(t){this.zoomToChartDataItem(t.treeMapDataItem)},e.prototype.zoomToChartDataItem=function(t){var i=this;t||(t=this._homeDataItem);var r=this.zoomOutButton;if(r&&(t!=this._homeDataItem?r.show():r.hide()),t&&t.children){this.xAxis.zoomToValues(t.x0,t.x1),this.yAxis.zoomToValues(t.y0,t.y1),this.currentLevel=t.level,this.currentlyZoomed=t,this.createTreeSeries(t);var s=this.xAxis.rangeChangeAnimation||this.yAxis.rangeChangeAnimation;s&&!s.isDisposed()&&!s.isFinished()?(this._dataDisposers.push(s),s.events.once("animationended",function(){i.toggleBullets()})):this.toggleBullets()}},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("TreeMap chart"))},e.prototype.createDataItem=function(){return new Gb},Object.defineProperty(e.prototype,"maxLevels",{get:function(){return this.getPropertyValue("maxLevels")},set:function(t){this.setPropertyValue("maxLevels",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentLevel",{get:function(){return this.getPropertyValue("currentLevel")},set:function(t){this.setPropertyValue("currentLevel",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideParentColumns",{get:function(){return this.getPropertyValue("hideParentColumns")},set:function(t){this.setPropertyValue("hideParentColumns",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sorting",{get:function(){return this.getPropertyValue("sorting")},set:function(t){this.setPropertyValue("sorting",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createSeries=function(){return new eu},Object.defineProperty(e.prototype,"homeText",{get:function(){return this._homeText},set:function(t){this._homeText=t,this._homeDataItem&&(this._homeDataItem.name=this._homeText)},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){if(t){if(C(t.layoutAlgorithm)&&vt(t.layoutAlgorithm))switch(t.layoutAlgorithm){case"squarify":t.layoutAlgorithm=this.squarify;break;case"binaryTree":t.layoutAlgorithm=this.binaryTree;break;case"slice":t.layoutAlgorithm=this.slice;break;case"dice":t.layoutAlgorithm=this.dice;break;case"sliceDice":t.layoutAlgorithm=this.sliceDice;break;default:delete t.layoutAlgorithm;break}C(t.navigationBar)&&!C(t.navigationBar.type)&&(t.navigationBar.type="NavigationBar"),a.prototype.processConfig.call(this,t)}},e.prototype.validateLayout=function(){a.prototype.validateLayout.call(this),this.layoutItems(this.currentlyZoomed)},e.prototype.validateDataItems=function(){a.prototype.validateDataItems.call(this),this.layoutItems(this._homeDataItem),E(this.series.iterator(),function(t){t.validateRawData()}),this.zoomToChartDataItem(this._homeDataItem)},e.prototype.binaryTree=function(t){var i=t.children,r,s=i.length,o,n=new Array(s+1);for(n[0]=o=r=0;r<s;++r)n[r+1]=o+=i.getIndex(r).value;s>0&&l(0,s,t.value,t.x0,t.y0,t.x1,t.y1);function l(h,u,p,d,c,f,g){if(h>=u-1){var m=i.getIndex(h);m.x0=d,m.y0=c,m.x1=f,m.y1=g;return}for(var y=n[h],v=p/2+y,x=h+1,_=u-1;x<_;){var $=x+_>>>1;n[$]<v?x=$+1:_=$}v-n[x-1]<n[x]-v&&h+1<x&&--x;var T=n[x]-y,S=p-T;if(p==0){var m=i.getIndex(h);m.x0=d,m.y0=c,m.x1=f,m.y1=g;return}if(f-d>g-c){var k=(d*S+f*T)/p;l(h,x,T,d,c,k,g),l(x,u,S,k,c,f,g)}else{var A=(c*S+g*T)/p;l(h,x,T,d,c,f,A),l(x,u,S,d,A,f,g)}}},e.prototype.slice=function(t){for(var i=t.x0,r=t.x1,s=t.y0,o=t.y1,n=t.children,l,h=-1,u=n.length,p=t.value&&(o-s)/t.value;++h<u;)l=n.getIndex(h),l.x0=i,l.x1=r,l.y0=s,s+=l.value*p,l.y1=s},e.prototype.dice=function(t){for(var i=t.x0,r=t.x1,s=t.y0,o=t.y1,n=t.children,l,h=-1,u=n.length,p=t.value&&(r-i)/t.value;++h<u;)l=n.getIndex(h),l.y0=s,l.y1=o,l.x0=i,i+=l.value*p,l.x1=i},e.prototype.sliceDice=function(t){t.level&1?this.slice(t):this.dice(t)},e.prototype.squarify=function(t){for(var i=(1+Math.sqrt(5))/2,r=t.x0,s=t.x1,o=t.y0,n=t.y1,l=t.children,h,u=0,p=0,d=l.length,c,f,g=t.value,m,y,v,x,_,$,T;u<d;){c=s-r,f=n-o;do m=l.getIndex(p++).value;while(!m&&p<d);for(y=v=m,$=Math.max(f/c,c/f)/(g*i),T=m*m*$,_=Math.max(v/T,T/y);p<d;++p){if(m+=h=l.getIndex(p).value,h<y&&(y=h),h>v&&(v=h),T=m*m*$,x=Math.max(v/T,T/y),x>_){m-=h;break}_=x}var S=this.dataItems.template.clone();S.value=m,S.dice=c<f,S.children=l.slice(u,p),S.x0=r,S.y0=o,S.x1=s,S.y1=n,S.dice?(S.y1=g?o+=f*m/g:n,this.dice(S)):(S.x1=g?r+=c*m/g:s,this.slice(S)),g-=m,u=p}},e.prototype.handleSeriesAdded2=function(){},e.prototype.handleDataItemValueChange=function(t,i){i=="value"&&this.invalidateDataItems()},e.prototype.handleDataItemWorkingValueChange=function(t,i){i=="value"&&this.invalidateDataItems()},e.prototype.getLegendLevel=function(t){if(t&&t.children){if(t.children.length>1)return t;if(t.children.length==1){var i=t.children.getIndex(0);return i.children?this.getLegendLevel(i):t}else return t}},e.prototype.handleLegendSeriesAdded=function(t){},Object.defineProperty(e.prototype,"homeDataItem",{get:function(){return this._homeDataItem},enumerable:!0,configurable:!0}),e.prototype.feedLegend=function(){var t=this.legend;if(t){t.dataFields.name="name";var i=this.getLegendLevel(this._homeDataItem);if(i){var r=[];i.children.each(function(s){r.push(s)}),t.data=r}}},e.prototype.disposeData=function(){a.prototype.disposeData.call(this),this._homeDataItem=void 0,this.series.clear(),this.navigationBar&&this.navigationBar.disposeData(),this.xAxis.disposeData(),this.yAxis.disposeData()},e.prototype.getExporting=function(){var t=this,i=a.prototype.getExporting.call(this);return i.adapter.add("formatDataFields",function(r){return(r.format=="csv"||r.format=="xlsx")&&C(t.dataFields.children)&&delete r.dataFields[t.dataFields.children],r}),i},e})(sr);w.registeredClasses.TreeMap=Ub;var fd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._chart=new ce,t.className="AxisRendererX3D",t._disposers.push(t._chart),t.applyTheme(),t}return e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);if(t.element){var o=this.chart.dx3D||0,n=this.chart.dy3D||0,l=this.getHeight();t.path=z({x:o,y:n})+V({x:o,y:l+n})+V({x:0,y:l})}this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var t=this.getHeight(),i=this.chart.dx3D||0,r=this.chart.dy3D||0;this.baseGrid.path=z({x:i,y:r})+V({x:0,y:0})+V({x:0,y:t})},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){t&&this._chart.set(t,t.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),e.prototype.handle3DChanged=function(t){(t.property=="depth"||t.property=="angle")&&this.invalidate()},e})(Tr);w.registeredClasses.AxisRendererX3D=fd;var Mm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._chart=new ce,t.className="AxisRendererY3D",t._disposers.push(t._chart),t.applyTheme(),t}return e.prototype.updateGridElement=function(t,i,r){i=i+(r-i)*t.location;var s=this.positionToPoint(i);if(t.element){var o=this.chart.dx3D||0,n=this.chart.dy3D||0,l=this.getWidth();t.path=z({x:0,y:0})+V({x:o,y:n})+V({x:l+o,y:n})}this.positionItem(t,s),this.toggleVisibility(t,i,0,1)},e.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var t=this.chart.dx3D||0,i=this.chart.dy3D||0,r=this.getWidth();this.baseGrid.path=z({x:0,y:0})+V({x:r,y:0})+V({x:r+t,y:i})},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){t&&this._chart.set(t,t.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),e.prototype.handle3DChanged=function(t){(t.property=="depth"||t.property=="angle")&&this.invalidate()},e})(Ni);var Rm=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.angle=30,t.depth=30,t.className="Rectangle3D",t.layout="none";var i=t.createChild(rt);i.shouldClone=!1,i.setElement(t.paper.add("path")),i.isMeasured=!1,t.sideBack=i,t._disposers.push(t.sideBack);var r=t.createChild(rt);r.shouldClone=!1,r.setElement(t.paper.add("path")),r.isMeasured=!1,t.sideBottom=r,t._disposers.push(t.sideBottom);var s=t.createChild(rt);s.shouldClone=!1,s.setElement(t.paper.add("path")),s.isMeasured=!1,t.sideLeft=s,t._disposers.push(t.sideLeft);var o=t.createChild(rt);o.shouldClone=!1,o.setElement(t.paper.add("path")),o.isMeasured=!1,t.sideRight=o,t._disposers.push(t.sideRight);var n=t.createChild(rt);n.shouldClone=!1,n.setElement(t.paper.add("path")),n.isMeasured=!1,t.sideTop=n,t._disposers.push(t.sideTop);var l=t.createChild(rt);return l.shouldClone=!1,l.setElement(t.paper.add("path")),l.isMeasured=!1,t.sideFront=l,t._disposers.push(t.sideFront),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.innerWidth,i=this.innerHeight,r=this.depth,s=this.angle,o=G(s),n=U(s),l={x:0,y:0},h={x:t,y:0},u={x:t,y:i},p={x:0,y:i},d={x:r*n,y:-r*o},c={x:r*n+t,y:-r*o},f={x:r*n+t,y:-r*o+i},g={x:r*n,y:-r*o+i};this.sideFront.path=z(l)+V(h)+V(u)+V(p)+pe(),this.sideBack.path=z(d)+V(c)+V(f)+V(g)+pe(),this.sideLeft.path=z(l)+V(d)+V(g)+V(p)+pe(),this.sideRight.path=z(h)+V(c)+V(f)+V(u)+pe(),this.sideBottom.path=z(p)+V(g)+V(f)+V(u)+pe(),this.sideTop.path=z(l)+V(d)+V(c)+V(h)+pe()},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setFill=function(t){a.prototype.setFill.call(this,t),(!Kt(t)||"r"in t)&&(t=Hi(t));var i;if(t instanceof Dt)i=t.hex;else if(t instanceof mi||t instanceof $r)i=t.stops.getIndex(0).color.hex;else{var r=new Al;r.lightness=-.2,this.sideBack.filters.push(r);var s=r.clone();s.lightness=-.4,this.sideLeft.filters.push(s);var o=r.clone();o.lightness=-.2,this.sideRight.filters.push(o);var n=r.clone();n.lightness=-.1,this.sideTop.filters.push(n);var l=r.clone();l.lightness=-.5,this.sideBottom.filters.push(l)}i&&(this.sideBack.fill=nt(i).lighten(-.2),this.sideLeft.fill=nt(i).lighten(-.4),this.sideRight.fill=nt(i).lighten(-.2),this.sideTop.fill=nt(i).lighten(-.1),this.sideBottom.fill=nt(i).lighten(-.5))},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.sideBack.copyFrom(t.sideBack),this.sideLeft.copyFrom(t.sideLeft),this.sideRight.copyFrom(t.sideRight),this.sideTop.copyFrom(t.sideTop),this.sideBottom.copyFrom(t.sideBottom)},e})(Q);var md=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Column3D",t}return e.prototype.createAssets=function(){this.column3D=this.createChild(Rm),this.column3D.shouldClone=!1,this.column3D.strokeOpacity=0,this.column=this.column3D},e.prototype.validate=function(){a.prototype.validate.call(this),this.column3D&&(this.column3D.width=this.pixelWidth,this.column3D.height=this.pixelHeight,this.column3D.invalid&&this.column3D.validate())},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.column3D&&this.column3D.copyFrom(t.column3D)},e.prototype.setFill=function(t){a.prototype.setFill.call(this,t),this.column.fill=t},e})(kr);w.registeredClasses.Column3D=md;var Kb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColumnSeries3DDataItem",t.applyTheme(),t}return e})(mr);var iu=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColumnSeries3D",t.columns.template.column3D.applyOnClones=!0,t.columns.template.hiddenState.properties.visible=!0,t.applyTheme(),t}return Object.defineProperty(e.prototype,"columnsContainer",{get:function(){var t=this.chart;return t&&t.columnsContainer&&t.leftAxesContainer.layout!="vertical"&&t.rightAxesContainer.layout!="vertical"&&t.bottomAxesContainer.layout!="horizontal"&&t.topAxesContainer.layout!="horizontal"?t.columnsContainer:this._columnsContainer},enumerable:!0,configurable:!0}),e.prototype.validateDataElementReal=function(t){a.prototype.validateDataElementReal.call(this,t),t.column&&(t.column.dx=this.dx,t.column.dy=this.dy,t.column.visible=this.visible)},e.prototype.validateDataElements=function(){a.prototype.validateDataElements.call(this),this.chart&&this.chart.invalidateLayout()},e.prototype.createColumnTemplate=function(){return new md},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0);var i=this.columns.template;i.column3D.depth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t);var i=this.columns.template;i.column3D.angle=t},enumerable:!0,configurable:!0}),e})(Ar);w.registeredClasses.ColumnSeries3D=iu;w.registeredClasses.ColumnSeries3DDataItem=Kb;var i$=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="XYChart3DDataItem",t.applyTheme(),t}return e})(ln);var qb=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._axisRendererX=fd,t._axisRendererY=Mm,t.className="XYChart3D",t.depth=30,t.angle=30;var i=t.seriesContainer.createChild(Q);return i.shouldClone=!1,i.isMeasured=!1,i.layout="none",t.columnsContainer=i,t.columnsContainer.mask=t.createChild(rt),t.applyTheme(),t}return e.prototype.updateSeriesMasks=function(){if(a.prototype.updateSeriesMasks.call(this),Bs()){var t=this.columnsContainer,i=t.mask;t.mask=void 0,t.mask=i}},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx3D",{get:function(){return U(this.angle)*this.depth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy3D",{get:function(){return-G(this.angle)*this.depth},enumerable:!0,configurable:!0}),e.prototype.validateLayout=function(){a.prototype.validateLayout.call(this),this.fixColumns()},e.prototype.fixLayout=function(){this.chartContainer.paddingTop=-this.dy3D,this.chartContainer.paddingRight=this.dx3D,this.scrollbarX&&(this.scrollbarX.dy=this.dy3D,this.scrollbarX.dx=this.dx3D),this.scrollbarY&&(this.scrollbarY.dy=this.dy3D,this.scrollbarY.dx=this.dx3D),this.fixColumns(),a.prototype.fixLayout.call(this)},e.prototype.fixColumns=function(){var t=this,i=1,r=0;E(this.series.iterator(),function(o){o instanceof iu&&(!o.clustered&&r>0&&i++,o.depthIndex=i-1,r++)});var s=0;E(this.series.iterator(),function(o){if(o instanceof iu){o.depth=t.depth/i,o.angle=t.angle,o.columnsContainer==t.columnsContainer&&(o.dx=t.depth/i*U(t.angle)*o.depthIndex,o.dy=-t.depth/i*G(t.angle)*o.depthIndex);var n=!1;(o.baseAxis==o.xAxis&&o.xAxis.renderer.inversed||o.baseAxis==o.yAxis&&o.yAxis.renderer.inversed)&&(n=!0);var l=1;o.dataItems.each(function(h){var u=h.column;u&&(n?u.zIndex=1e3*(1e3-l)+s-o.depthIndex*100:u.zIndex=1e3*l+s-o.depthIndex*100),l++}),n?s--:s++}}),this.maskColumns()},e.prototype.processConfig=function(t){if(t&&C(t.series)&&oe(t.series))for(var i=0,r=t.series.length;i<r;i++)t.series[i].type=t.series[i].type||"ColumnSeries3D";a.prototype.processConfig.call(this,t)},e.prototype.maskColumns=function(){var t=this.plotContainer.pixelWidth,i=this.plotContainer.pixelHeight,r=this.dx3D,s=this.dy3D,o=z({x:0,y:0})+V({x:r,y:s})+V({x:t+r,y:s})+V({x:t+r,y:i+s})+V({x:t,y:i})+V({x:t,y:i})+V({x:0,y:i})+pe(),n=this.columnsContainer;n&&n.mask&&(n.mask.path=o)},e})(sr);w.registeredClasses.XYChart3D=qb;var Zb=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="HeatLegend",t.markerContainer=t.createChild(Q),t.markerContainer.shouldClone=!1,t.markerCount=1;var i=new $i;return i.minHeight=20,i.minWidth=20,i.interactionsEnabled=!1,i.fillOpacity=1,i.cornerRadius(0,0,0,0),t.markerContainer.minHeight=20,t.markerContainer.minWidth=20,t.orientation="horizontal",t.markers=new zt(i),t._disposers.push(new Ft(t.markers)),t._disposers.push(t.markers.template),t.applyTheme(),t}return e.prototype.getMinFromRules=function(t){var i=this.series;if(i){var r;return ii(i.heatRules.iterator(),function(s){return s.property==t?(r=s.min,!1):!0}),r}},e.prototype.getMaxFromRules=function(t){var i=this.series;if(i){var r;return E(i.heatRules.iterator(),function(s){return s.property==t?(r=s.max,!1):!0}),r}},e.prototype.validate=function(){a.prototype.validate.call(this),this.valueAxis.renderer.inversed=this.reverseOrder;var t=this.series,i=this.minColor,r=this.maxColor;if(C(i)||(i=Hi(this.getMinFromRules("fill"))),C(r)||(r=Hi(this.getMaxFromRules("fill"))),t){var s=t.fill;!C(i)&&s instanceof Dt&&(i=s),!C(r)&&s instanceof Dt&&(r=s)}C(r)||(r=Hi(this.getMaxFromRules("fill")));var o=Wt(this.getMinFromRules("fillOpacity"));P(o)||(o=1);var n=Wt(this.getMaxFromRules("fillOpacity"));P(n)||(n=1);var l=Wt(this.getMinFromRules("strokeOpacity"));P(l)||(l=1);var h=Wt(this.getMaxFromRules("strokeOpacity"));P(h)||(h=1);for(var u=Hi(this.getMinFromRules("stroke")),p=Hi(this.getMaxFromRules("stroke")),d=0;d<this.markerCount;d++){var c=this.markers.getIndex(d);if(c||(c=this.markers.create(),c.parent=this.markerContainer,c.height=N(100),c.width=N(100)),this.markerCount==1){var f=new mi;if(this.reverseOrder?(f.addColor(r,n),f.addColor(i,o)):(f.addColor(i,o),f.addColor(r,n)),this.orientation=="vertical"&&(f.rotation=-90),c.fill=f,C(u)&&C(p)){var g=new mi;this.reverseOrder?(g.addColor(p,h),g.addColor(u,l)):(g.addColor(u,l),g.addColor(p,h)),this.orientation=="vertical"&&(g.rotation=-90),c.stroke=g}}else{var m=d;this.reverseOrder&&(m=this.markerCount-d-1);var y=new Dt(Bo(i.rgb,r.rgb,m/this.markerCount));c.fill=y;var v=o+(n-o)*m/this.markerCount;if(c.fillOpacity=v,C(u)&&C(p)){var x=new Dt(Bo(u.rgb,p.rgb,m/this.markerCount));c.stroke=x;var _=l+(h-l)*m/this.markerCount;c.strokeOpacity=_}}}var $=this.valueAxis.renderer;this.markerCount>1&&(this.orientation=="horizontal"?$.minGridDistance=this.measuredWidth/this.markerCount:$.minGridDistance=this.measuredHeight/this.markerCount),this.valueAxis.invalidate();for(var d=this.markerCount,T=this.markers.length;d<T;d++)this.markers.getIndex(d).parent=void 0},Object.defineProperty(e.prototype,"minColor",{get:function(){return this.getPropertyValue("minColor")},set:function(t){t instanceof Dt||(t=Hi(t)),this.setColorProperty("minColor",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxColor",{get:function(){return this.getPropertyValue("maxColor")},set:function(t){t instanceof Dt||(t=Hi(t)),this.setColorProperty("maxColor",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerCount",{get:function(){return this.getPropertyValue("markerCount")},set:function(t){this.setPropertyValue("markerCount",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minValue",{get:function(){return this.getPropertyValue("minValue")},set:function(t){this.setPropertyValue("minValue",t),this.valueAxis.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.getPropertyValue("maxValue")},set:function(t){this.setPropertyValue("maxValue",t),this.valueAxis.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0);var i=this.markerContainer,r=this.valueAxis;t=="horizontal"?(C(this.width)||(this.width=200),this.height=void 0,r.width=N(100),r.height=void 0,r.tooltip.pointerOrientation="vertical",this.layout="vertical",i.width=N(100),i.height=void 0,r.renderer instanceof Tr||(r.renderer=new Tr)):(C(this.height)||(this.height=200),this.width=void 0,this.layout="horizontal",i.width=void 0,i.height=N(100),r.height=N(100),r.width=void 0,r.tooltip.pointerOrientation="horizontal",r.renderer instanceof Ni||(r.renderer=new Ni),r.renderer.inside=!0,r.renderer.labels.template.inside=!0,this.markerContainer.reverseOrder=!0);var s=r.renderer;s.grid.template.disabled=!0,s.axisFills.template.disabled=!0,s.baseGrid.disabled=!0,s.labels.template.padding(2,3,2,3),s.minHeight=void 0,s.minWidth=void 0,this.markerContainer.layout=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueAxis",{get:function(){return this._valueAxis||(this.valueAxis=this.createChild(At),this.valueAxis.shouldClone=!1),this._valueAxis},set:function(t){this._valueAxis=t,t.parent=this,t.strictMinMax=!0,this.orientation=this.orientation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"series",{get:function(){return this._series},set:function(t){var i=this;this._series=t;var r="value";try{var s=t.heatRules.getIndex(0).dataField;s&&(r=s)}catch{}this.updateMinMax(t.dataItem.values[r].low,t.dataItem.values[r].high),t.dataItem.events.on("calculatedvaluechanged",function(o){i.updateMinMax(t.dataItem.values[r].low,t.dataItem.values[r].high)},void 0,!1),t.heatRules.events.on("inserted",this.invalidate,this,!1),t.heatRules.events.on("removed",this.invalidate,this,!1)},enumerable:!0,configurable:!0}),e.prototype.updateMinMax=function(t,i){var r=this.valueAxis;P(this.minValue)||(r.min=t,r.invalidate()),P(this.maxValue)||(r.max=i,r.invalidate())},e.prototype.processConfig=function(t){if(t&&C(t.series)&&vt(t.series)&&vt(t.series))if(this.map.hasKey(t.series))t.series=this.map.getKey(t.series);else{var i=t.series,r=this.map.events.on("insertKey",function(s){s.key==i&&(this.series=s.newValue,r.dispose())},this);this._disposers.push(r),delete t.series}a.prototype.processConfig.call(this,t)},e})(Q);w.registeredClasses.HeatLegend=Zb;var ru=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="OHLC",t.layout="none",t}return e.prototype.createAssets=function(){this.openLine=this.createChild(Ei),this.openLine.shouldClone=!1,this.highLowLine=this.createChild(Ei),this.highLowLine.shouldClone=!1,this.closeLine=this.createChild(Ei),this.closeLine.shouldClone=!1},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.openLine&&this.openLine.copyFrom(t.openLine),this.highLowLine&&this.highLowLine.copyFrom(t.highLowLine),this.closeLine&&this.closeLine.copyFrom(t.closeLine)},e})(un);w.registeredClasses.OHLC=ru;var Im=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="OHLCSeriesDataItem",t.applyTheme(),t}return e})(Jh);var Jb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="OHLCSeries",t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("OHLC Series"))},e.prototype.createDataItem=function(){return new Im},e.prototype.validateCandlestick=function(t){var i=t.column;if(i){var r=i.openLine,s=i.highLowLine,o=i.closeLine;if(this.baseAxis==this.xAxis){var n=i.pixelWidth/2;s.x=n,t.getWorkingValue(this.yOpenField),t.getWorkingValue(this.yField);var l=this.yAxis.getY(t,this.yOpenField),h=this.yAxis.getY(t,this.yField),u=this.yAxis.getY(t,this.yLowField),p=this.yAxis.getY(t,this.yHighField),d=i.pixelY;r.y1=l-d,r.y2=l-d,r.x1=0,r.x2=n,o.y1=h-d,o.y2=h-d,o.x1=n,o.x2=2*n,s.y1=p-d,s.y2=u-d}if(this.baseAxis==this.yAxis){var c=i.pixelHeight/2;s.y=c,t.getWorkingValue(this.xOpenField),t.getWorkingValue(this.xField);var f=this.xAxis.getX(t,this.xOpenField),g=this.xAxis.getX(t,this.xField),m=this.xAxis.getX(t,this.xLowField),y=this.xAxis.getX(t,this.xHighField),v=i.pixelX;r.x1=f-v,r.x2=f-v,r.y1=c,r.y2=2*c,o.x1=g-v,o.x2=g-v,o.y1=0,o.y2=c,s.x1=y-v,s.x2=m-v}E(this.axisRanges.iterator(),function(x){var _=t.rangesColumns.getKey(x.uid);if(_){var $=_.openLine;$.x=r.x,$.y=r.y,$.x1=r.x1,$.x2=r.x2,$.y1=r.y1,$.y2=r.y2;var T=_.closeLine;T.x=o.x,T.y=o.y,T.x1=o.x1,T.x2=o.x2,T.y1=o.y1,T.y2=o.y2;var S=_.highLowLine;S.x=s.x,S.y=s.y,S.x1=s.x1,S.x2=s.x2,S.y1=s.y1,S.y2=s.y2}})}},e.prototype.createLegendMarker=function(t){var i=t.pixelWidth,r=t.pixelHeight;t.removeChildren();var s=t.createChild(ru);s.shouldClone=!1,s.copyFrom(this.columns.template);var o,n,l=s.openLine,h=s.closeLine,u=s.highLowLine;this.baseAxis==this.yAxis?(o=i/3,n=r,u.y=r/2,u.x2=i,l.x=i/3*2,l.y2=r/2,h.x=i/3,h.y2=r,h.y1=r/2):(o=i,n=r/3,u.x=i/2,u.y2=r,l.y=r/3*2,l.x2=i/2,h.y=r/3,h.x2=i,h.x1=i/2),s.width=o,s.height=n,_e(this,t,fe),_e(this.columns.template,s,fe),s.stroke=this.riseFromOpenState.properties.stroke;var p=t.dataItem;p.color=s.stroke,p.colorOrig=s.stroke},e.prototype.createColumnTemplate=function(){return new ru},e})(ad);w.registeredClasses.OHLCSeries=Jb;w.registeredClasses.OHLCSeriesDataItem=Im;var gd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarColumn",t}return e.prototype.createAssets=function(){this.radarColumn=this.createChild(Hr),this.radarColumn.shouldClone=!1,this.radarColumn.strokeOpacity=void 0,this.column=this.radarColumn},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.radarColumn&&this.radarColumn.copyFrom(t.radarColumn)},e.prototype.getTooltipX=function(){var t=this.getPropertyValue("tooltipX");return P(t)?t:this.radarColumn.getTooltipX()},e.prototype.getTooltipY=function(){var t=this.getPropertyValue("tooltipX");return P(t)?t:this.radarColumn.getTooltipY()},e})(kr);w.registeredClasses.RadarColumn=gd;var Qb=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColumnSeriesDataItem",t.applyTheme(),t}return e})(mr);var tx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarColumnSeries",t.applyTheme(),t}return e.prototype.createColumnTemplate=function(){return new gd},e.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},e.prototype.disableUnusedColumns=function(t){t&&(t.column&&(t.column.__disabled=!0),E(this.axisRanges.iterator(),function(i){var r=t.rangesColumns.getKey(i.uid);r&&(r.__disabled=!0)}))},e.prototype.validateDataElementReal=function(t){var i=this,r=this.chart.startAngle,s=this.chart.endAngle,o=this.yField,n=this.yOpenField,l=this.xField,h=this.xOpenField,u,p,d,c,f=this.getStartLocation(t),g=this.getEndLocation(t),m=(s-r)/(this.dataItems.length*(this.end-this.start)),y=t.column;y||(y=this.columns.create(),t.column=y,_e(this,y,fe),_e(this.columns.template,y,fe),t.addSprite(y),y.paper=this.paper,this.setColumnStates(y));var v=y.width,x=100;v instanceof _t&&(x=v.percent);var _=H((g-f)*(1-x/100)/2,5);if(f+=_,g-=_,this.xAxis instanceof Ce&&this.yAxis instanceof Ce)d=Mt({x:this.yAxis.getX(t,o,0,"valueY"),y:this.yAxis.getY(t,o,0,"valueY")}),c=Mt({x:this.yAxis.getX(t,n,1,"valueY"),y:this.yAxis.getY(t,n,1,"valueY")}),u=this.xAxis.getAngle(t,h,0,"valueX"),p=this.xAxis.getAngle(t,l,1,"valueX"),r=r+f*m,s=s-(1-g)*m;else if(this.baseAxis==this.xAxis)d=Mt({x:this.yAxis.getX(t,o,t.locations[o],"valueY"),y:this.yAxis.getY(t,o,t.locations[o],"valueY")}),c=Mt({x:this.yAxis.getX(t,n,t.locations[n],"valueY"),y:this.yAxis.getY(t,n,t.locations[n],"valueY")}),u=this.xAxis.getAngle(t,h,f,"valueX"),p=this.xAxis.getAngle(t,l,g,"valueX"),r=r+f*m,s=s-(1-g)*m;else{if(d=Mt({x:this.yAxis.getX(t,o,f,"valueY"),y:this.yAxis.getY(t,o,f,"valueY")}),c=Mt({x:this.yAxis.getX(t,n,g,"valueY"),y:this.yAxis.getY(t,n,g,"valueY")}),P(v)){var $=Math.abs(d-c);if($>v){var T=($-v)/2;d+=T,c-=T}}u=this.xAxis.getAngle(t,l,t.locations[l],"valueX"),p=this.xAxis.getAngle(t,h,t.locations[h],"valueX")}if(p<u){var S=p;p=u,u=S}u=J(u,r,s),p=J(p,r,s);var k=y.radarColumn;k.startAngle=u;var A=p-u;A>0?(k.arc=A,k.radius=d,k.innerRadius=c,y.__disabled=!1,y.parent=this.columnsContainer,E(this.axisRanges.iterator(),function(L){var O=t.rangesColumns.getKey(L.uid);O||(O=i.columns.create(),qv(i.columns.template,O,fe),_e(L.contents,O,fe),O.dataItem&&ft(O.dataItem.sprites,O),t.addSprite(O),O.paper=i.paper,i.setColumnStates(O),t.rangesColumns.setKey(L.uid,O));var I=O.radarColumn;I.startAngle=u,I.arc=A,I.radius=d,I.innerRadius=c,I.invalid&&(I.paper=i.paper,I.validate()),O.__disabled=!1,O.parent=L.contents})):this.disableUnusedColumns(t)},e.prototype.getPoint=function(t,i,r,s,o,n,l){n||(n="valueX"),l||(l="valueY");var h=this.yAxis.getX(t,r,o,l),u=this.yAxis.getY(t,r,o,l),p=Mt({x:h,y:u});p==0&&(p=1e-5);var d=this.xAxis.getAngle(t,i,s,n);return{x:p*U(d),y:p*G(d)}},e.prototype.getMaskPath=function(){var t=this.yAxis.renderer;return ts(t.startAngle,t.endAngle-t.startAngle,t.pixelRadius,t.pixelInnerRadius)},e.prototype.positionBulletReal=function(t,i,r){var s=this.xAxis,o=this.yAxis;(i<s.start||i>s.end||r<o.start||r>o.end)&&(t.visible=!1),t.moveTo(this.xAxis.renderer.positionToPoint(i,r))},e.prototype.setXAxis=function(t){a.prototype.setXAxis.call(this,t),this.updateRendererRefs()},e.prototype.setYAxis=function(t){a.prototype.setYAxis.call(this,t),this.updateRendererRefs()},e.prototype.updateRendererRefs=function(){var t=this.xAxis.renderer,i=this.yAxis.renderer;t.axisRendererY=i},e})(Ar);w.registeredClasses.RadarColumnSeries=tx;w.registeredClasses.RadarColumnSeriesDataItem=Qb;var su=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.slice=t.createChild(rt),t.slice.shouldClone=!1,t.slice.setElement(t.paper.add("path")),t.slice.isMeasured=!1,t.orientation="vertical",t.bottomWidth=N(100),t.topWidth=N(100),t.isMeasured=!1,t.width=10,t.height=10,t.expandDistance=0,t.className="FunnelSlice",t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.pixelPaddingTop,i=this.pixelPaddingBottom,r=this.pixelPaddingRight,s=this.pixelPaddingLeft,o=this.pixelWidth-r-s,n=this.pixelHeight-t-i,l=this.expandDistance,h="";if(this.orientation=="vertical"){var u=te(this.topWidth,o),p=te(this.bottomWidth,o),d={x:(o-u)/2+s,y:t},c={x:(o+u)/2+s,y:t},f={x:(o+p)/2+s,y:t+n},g={x:(o-p)/2+s,y:t+n},m={x:c.x+(f.x-c.x)/2+l*n,y:c.y+.5*n},y={x:d.x+(g.x-d.x)/2-l*n,y:d.y+.5*n},v=V(f),x=V(d);l!=0&&(v=Xs(f,m),x=Xs(d,y)),h=z(d)+V(c)+v+V(g)+x,this.tickPoint={x:c.x+(f.x-c.x)/2,y:c.y+(f.y-c.y)/2}}else{var u=te(this.topWidth,n),p=te(this.bottomWidth,n),_={x:s,y:(n-u)/2+t},$={x:s,y:(n+u)/2+t},T={x:s+o,y:(n-p)/2+t},S={x:s+o,y:(n+p)/2+t},m={y:_.y+(T.y-_.y)/2-l*o,x:_.x+.5*o},y={y:$.y+(S.y-$.y)/2+l*o,x:$.x+.5*o},v=V(T),x=V($);l!=0&&(v=Xs(T,m),x=Xs($,y)),h=z($)+V(_)+v+V(S)+x,this.tickPoint={y:$.y+(S.y-$.y)/2,x:$.x+(S.x-$.x)/2}}this.slice.path=h,this.invalidateLayout()},e.prototype.getPoint=function(t,i){var r=this.pixelPaddingTop,s=this.pixelPaddingBottom,o=this.pixelPaddingRight,n=this.pixelPaddingLeft,l=this.pixelWidth-o-n,h=this.pixelHeight-r-s;if(this.orientation=="vertical"){var u=te(this.topWidth,l),p=te(this.bottomWidth,l),d={x:(l-u)/2+n,y:r},c={x:(l+u)/2+n,y:r},f={x:(l+p)/2+n,y:r+h},g={x:(l-p)/2+n,y:r+h},m=d.x+(g.x-d.x)*i,y=c.x+(f.x-c.x)*i;return{x:m+(y-m)*t,y:c.y+(f.y-c.y)*i}}else{var u=te(this.topWidth,h),p=te(this.bottomWidth,h),v={x:n,y:(h-u)/2+r},x={x:n,y:(h+u)/2+r},_={x:n+l,y:(h-p)/2+r},$={x:n+l,y:(h+p)/2+r},T=v.y+(_.y-v.y)*t,S=x.y+($.y-x.y)*t;return{y:T+(S-T)*i,x:v.x+(_.x-v.x)*t}}},Object.defineProperty(e.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(t){this.setPercentProperty("bottomWidth",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(t){this.setPercentProperty("topWidth",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expandDistance",{get:function(){return this.getPropertyValue("expandDistance")},set:function(t){this.setPropertyValue("expandDistance",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.slice&&this.slice.copyFrom(t.slice)},e})(Q);w.registeredClasses.FunnelSlice=su;var Vm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._label=new ce,t._slice=new ce,t.className="FunnelTick",t.element=t.paper.add("path"),t._disposers.push(t._label),t._disposers.push(t._slice),t.setPropertyValue("locationX",0),t.setPropertyValue("locationY",0),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.slice,i=t.getPoint(this.locationX,this.locationY);if(i){var r=this.label,s=t.dataItem.component,o=void 0,n=void 0,l=void 0;if(s.orientation=="vertical"){var h=r.pixelX,u=r.pixelY;s.labelsOpposite||(h+=r.maxRight),o=ni(i,t,this.parent),l=ni({x:h,y:u},r.parent,this.parent),n={x:r.parent.pixelX-this.length,y:l.y},s.labelsOpposite||(n.x=r.parent.measuredWidth+this.length)}else{var h=r.pixelX,u=r.pixelY;s.labelsOpposite||(u+=r.maxBottom),o=ni(i,t,this.parent),l=ni({x:h,y:u},r.parent,this.parent),n={x:l.x,y:r.parent.pixelY-this.length},s.labelsOpposite||(n.y=r.parent.measuredHeight+this.length)}this.path=z(o)+V(n)+V(l)}},Object.defineProperty(e.prototype,"slice",{get:function(){return this._slice.get()},set:function(t){this._slice.set(t,new Bt([t.events.on("transformed",this.invalidate,this,!1),t.events.on("validated",this.invalidate,this,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label.get()},set:function(t){this._label.set(t,t.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(t){this.setPropertyValue("locationX",t,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(t){this.setPropertyValue("locationY",t,!1,!0)},enumerable:!0,configurable:!0}),e})(Ws);w.registeredClasses.FunnelTick=Vm;var au=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="FunnelSeriesDataItem",t.events.on("visibilitychanged",function(){t.component&&t.component.invalidateDataItems()},t,!1),t.applyTheme(),t}return Object.defineProperty(e.prototype,"sliceLink",{get:function(){var t=this;if(!this._sliceLink){var i=this.component.sliceLinks.create();this._sliceLink=i,this._disposers.push(i),i.parent=this.component.slicesContainer,this._disposers.push(new Lt(function(){t.component&&t.component.sliceLinks.removeValue(i)})),this.addSprite(i),i.visible=this.visible}return this._sliceLink},enumerable:!0,configurable:!0}),e})(Tl);var yd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t._nextY=0,t.className="FunnelSeries",t.orientation="vertical",t.width=N(100),t.height=N(100),t.slicesContainer.width=N(100),t.slicesContainer.height=N(100),t._disposers.push(t.slicesContainer.events.on("maxsizechanged",t.invalidateDataItems,t,!1)),t.labelsOpposite=!0,t.labelsContainer.layout="absolute",t.bottomRatio=0,t.applyTheme(),t}return e.prototype.createSlice=function(){return new su},e.prototype.createTick=function(){return new Vm},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Funnel Series"))},e.prototype.createDataItem=function(){return new au},e.prototype.initSlice=function(t){t.isMeasured=!1,t.defaultState.properties.scale=1,t.observe("scale",this.handleSliceScale,this),t.observe(["dx","dy","x","y"],this.handleSliceMove,this),t.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})";var i=t.states.create("hover");i.properties.expandDistance=.2},e.prototype.initLabel=function(t){a.prototype.initLabel.call(this,t),t.verticalCenter="middle",t.horizontalCenter="middle",t.isMeasured=!0,t.padding(5,5,5,5)},e.prototype.validate=function(){a.prototype.validate.call(this),this._nextY=0},e.prototype.validateDataElements=function(){var t=this,i=this.slicesContainer,r=this.labelsContainer,s=this.labels.template;this.alignLabels?(s.interactionsEnabled=!0,i.isMeasured=!0,r.isMeasured=!0):(s.interactionsEnabled=!1,i.isMeasured=!1,r.isMeasured=!1);var o=0,n=0;this.dataItems.each(function(l){C(l.value)&&(n++,l.value>0?o+=Math.abs(l.getWorkingValue("value")/l.value):t.ignoreZeroValues||!l.visible||l.__disabled||l.isHiding?n--:o+=1)}),this._total=1/n*o,this._count=n,a.prototype.validateDataElements.call(this),this.arrangeLabels()},e.prototype.getNextValue=function(t){var i=t.index,r=t.getWorkingValue("value");if(i<this.dataItems.length-1){var s=this.dataItems.getIndex(i+1);if(r=s.getWorkingValue("value"),!s.visible||s.isHiding||s.__disabled||s.value==0&&this.ignoreZeroValues)return this.getNextValue(s)}return r},e.prototype.formDataElement=function(){},e.prototype.validateDataElement=function(t){var i=this,r=t.slice;r.orientation=this.orientation;var s=t.sliceLink;s.orientation=this.orientation;var o=t.tick,n=t.label;o.slice=r,o.label=n,C(t.value)?(this.decorateSlice(t),W(t.sprites,function(l){t.value==0&&i.ignoreZeroValues?l.__disabled=!0:l.__disabled=!1})):W(t.sprites,function(l){l.__disabled=!0}),t.index==this.dataItems.length-1&&(s.disabled=!0),a.prototype.validateDataElement.call(this,t),s.fill=r.fill},e.prototype.decorateSlice=function(t){var i=t.slice,r=t.sliceLink,s=t.label,o=t.tick,n=this.slicesContainer.innerWidth,l=this.slicesContainer.innerHeight,h=this.getNextValue(t),u=Math.abs(t.getWorkingValue("value")),p=this.bottomRatio,d=1;if(t.value!=0?d=u/Math.abs(t.value):(t.__disabled||t.isHiding||!t.visible)&&(d=1e-6),this.ignoreZeroValues&&t.value==0){t.__disabled=!0;return}else t.__disabled=!1;if(this._nextY==1/0&&(this._nextY=0),this.orientation=="vertical"){var c=r.pixelHeight*d;l=l+c,i.topWidth=u/this.dataItem.values.value.high*n,i.bottomWidth=(u-(u-h)*p)/this.dataItem.values.value.high*n,r.topWidth=i.bottomWidth,r.bottomWidth=(u-(u-h))/this.dataItem.values.value.high*n,i.y=this._nextY,i.height=Math.min(1e5,mt(0,l/this._count*d/this._total-c)),i.x=n/2,this.alignLabels?s.x=void 0:s.x=i.x,s.y=i.pixelY+i.pixelHeight*o.locationY,this._nextY+=i.pixelHeight+c,r.y=this._nextY-c,r.x=i.x}else{var f=r.pixelWidth*d;n=n+f,i.topWidth=u/this.dataItem.values.value.high*l,i.bottomWidth=(u-(u-h)*p)/this.dataItem.values.value.high*l,r.topWidth=i.bottomWidth,r.bottomWidth=(u-(u-h))/this.dataItem.values.value.high*l,i.x=this._nextY,i.width=Math.min(1e5,n/this._count*d*1/this._total-f),i.y=l/2,this.alignLabels?s.y=this.labelsContainer.measuredHeight:s.y=i.y,s.x=i.pixelX+i.pixelWidth*o.locationX,this._nextY+=i.pixelWidth+f,r.x=this._nextY-f,r.y=i.y}},e.prototype.getLastLabel=function(t){if(t>0){var i=this.labels.getIndex(t);return i.__disabled||!i.visible?this.getLastLabel(t-1):i}},e.prototype.arrangeLabels=function(){if(this.alignLabels){var t=this.labels.length;if(t>1){var i=this.getLastLabel(t-1);if(i){var r=i.pixelY,s=i.pixelX;if(t>1){for(var o=t-2;o>=0;o--){var n=this.labels.getIndex(o);n.visible&&!n.__disabled&&(n.invalid&&n.validate(),this.orientation=="vertical"?n.pixelY+n.measuredHeight>r&&(n.y=Math.min(1e6,r-n.measuredHeight)):n.pixelX+n.measuredWidth>s&&(n.x=Math.min(1e6,s-n.measuredWidth)),r=n.pixelY,s=n.pixelX)}r=0,s=0;for(var o=0;o<t;o++){var n=this.labels.getIndex(o);n.visible&&!n.__disabled&&(n.invalid&&n.validate(),this.orientation=="vertical"?n.pixelY<r&&(n.y=Math.min(1e6,r)):n.pixelX<s&&(n.x=Math.min(1e6,s)),r+=n.measuredHeight,s+=n.measuredWidth)}}}}}},e.prototype.positionBullet=function(t){a.prototype.positionBullet.call(this,t);var i=t.dataItem,r=i.slice,s=t.locationX;P(s)||(s=.5);var o=t.locationY;P(o)||(o=1),t.x=r.pixelX+r.measuredWidth*s,t.y=r.pixelY+r.measuredHeight*o},Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t)&&(this.labelsOpposite=this.labelsOpposite,this.invalidate(),t=="vertical"?(this.ticks.template.locationX=1,this.ticks.template.locationY=.5,this.labels.template.rotation=0,this.layout="horizontal"):(this.ticks.template.locationX=.5,this.ticks.template.locationY=1,this.labels.template.rotation=-90,this.layout="vertical"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomRatio",{get:function(){return this.getPropertyValue("bottomRatio")},set:function(t){this.setPropertyValue("bottomRatio",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sliceLinks",{get:function(){if(!this._sliceLinks){var t=new su;t.applyOnClones=!0,t.fillOpacity=.5,t.expandDistance=-.3,t.hiddenState.properties.opacity=0,this._disposers.push(t),this._sliceLinks=new zt(t),this._disposers.push(new Ft(this._sliceLinks))}return this._sliceLinks},enumerable:!0,configurable:!0}),e.prototype.show=function(t){var i=this,r=this.startIndex,s=this.endIndex,o=this.defaultState.transitionDuration;P(t)&&(o=t),$t.animationsEnabled||(o=0);var n=0;E(qr(this.dataItems.iterator()),function(h){var u=h[0],p=h[1];i.sequencedInterpolation&&(n=i.sequencedInterpolationDelay*u+o*(u-r)/(s-r)),p.show(o,n,["value"])});var l=a.prototype.show.call(this,t);return l},e.prototype.hide=function(t){var i=this,r=["value"],s=0,o=this.startIndex,n=this.endIndex,l=0,h=this.hiddenState.transitionDuration;P(t)&&(h=t),$t.animationsEnabled||(h=0),E(qr(this.dataItems.iterator()),function(p){var d=p[0],c=p[1];i.sequencedInterpolation&&(l=i.sequencedInterpolationDelay*d+h*(d-o)/(n-o)),c.hide(h,l,s,r)});var u=a.prototype.hide.call(this,t);return u&&!u.isFinished()&&u.delay(l),u},e.prototype.setAlignLabels=function(t){a.prototype.setAlignLabels.call(this,t),this.ticks.template.disabled=!t;var i=this.labelsContainer;i&&(t?(i.height=void 0,i.width=void 0,i.margin(10,10,10,10)):(i.width=N(100),i.height=N(100))),this.labelsOpposite=this.labelsOpposite},Object.defineProperty(e.prototype,"labelsOpposite",{get:function(){return this.getPropertyValue("labelsOpposite")},set:function(t){this.setPropertyValue("labelsOpposite",t);var i=this.labels.template,r="none",s="none";this.alignLabels?t?(this.labelsContainer.toFront(),this.orientation=="vertical"?(this.ticks.template.locationX=1,i.horizontalCenter="left",r="right"):(this.ticks.template.locationY=1,i.horizontalCenter="right",s="bottom")):(this.labelsContainer.toBack(),this.orientation=="vertical"?(this.ticks.template.locationX=0,r="left"):(s="top",this.ticks.template.locationY=0)):this.orientation=="vertical"?r="center":s="middle",i.align=r,i.valign=s,this.validateLayout(),this.ticks.each(function(o){o.invalidate()}),this.invalidateDataItems()},enumerable:!0,configurable:!0}),e})(so);w.registeredClasses.FunnelSeries=yd;w.registeredClasses.FunnelSeriesDataItem=au;var ou=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PyramidSeriesDataItem",t.applyTheme(),t}return e})(au);var vd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PyramidSeries",t.topWidth=N(0),t.bottomWidth=N(100),t.pyramidHeight=N(100),t.valueIs="area",t.sliceLinks.template.width=0,t.sliceLinks.template.height=0,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},e.prototype.createDataItem=function(){return new ou},e.prototype.validate=function(){a.prototype.validate.call(this),this._nextWidth=void 0},e.prototype.getNextValue=function(t){var i=t.index,r=t.getWorkingValue("value");if(i<this.dataItems.length-1){var s=this.dataItems.getIndex(i+1);r=s.getWorkingValue("value")}return r==0&&(r=1e-6),r},e.prototype.validateDataElements=function(){var t=this,i=this.slicesContainer.innerWidth,r=this.slicesContainer.innerHeight;if(this.dataItems.each(function(n){if(n.value>0){var l=n.getWorkingValue("value")/n.value,h=n.sliceLink;t.orientation=="vertical"?r-=h.pixelHeight*l:i-=h.pixelWidth*l}}),this._pyramidHeight=te(this.pyramidHeight,r),this._pyramidWidth=te(this.pyramidHeight,i),this.orientation=="vertical"){var s=(r-this._pyramidHeight)/2;this.slicesContainer.y=s,this.labelsContainer.y=s,this.ticksContainer.y=s}else{var o=(i-this._pyramidWidth)/2;this.slicesContainer.x=o,this.labelsContainer.x=o,this.ticksContainer.x=o}a.prototype.validateDataElements.call(this)},e.prototype.decorateSlice=function(t){var i=this.dataItem.values.value.absoluteSum;if(i!=0){var r=t.slice,s=t.sliceLink,o=t.label,n=t.tick;this.getNextValue(t);var l=Math.abs(t.getWorkingValue("value")),h=this._pyramidWidth,u=this._pyramidHeight,p=this.slicesContainer.innerWidth,d=this.slicesContainer.innerHeight,c=s.pixelWidth,f=s.pixelHeight;if((t.value==0||t.value==null)&&this.ignoreZeroValues?t.__disabled=!0:t.__disabled=!1,this.orientation=="vertical"){var g=te(this.topWidth,p);P(this._nextWidth)||(this._nextWidth=g);var m=te(this.bottomWidth,p),y=this._nextWidth,v=Math.atan2(u,g-m),x=Math.tan(Math.PI/2-v);x==0&&(x=1e-8);var _=void 0,$=void 0;if(this.valueIs=="area"){var T=(g+m)/2*u,S=T*l/i,k=Math.abs(y*y-2*S*x);_=(y-Math.sqrt(k))/x,_>0?$=(2*S-_*y)/_:$=y}else _=u*l/i,$=y-_*x;r.height=_,r.width=p,r.bottomWidth=$,r.topWidth=y,s.topWidth=r.bottomWidth,s.bottomWidth=r.bottomWidth,r.y=this._nextY,this.alignLabels?o.x=0:o.x=p/2,o.y=r.pixelY+r.pixelHeight*n.locationY+r.dy,this._nextY+=r.pixelHeight+f*l/Math.max(Math.abs(t.value),1e-8),s.y=this._nextY-f,s.x=p/2}else{var g=te(this.topWidth,d);P(this._nextWidth)||(this._nextWidth=g);var m=te(this.bottomWidth,d),y=this._nextWidth,v=Math.atan2(h,g-m),x=Math.tan(Math.PI/2-v);x==0&&(x=1e-8);var A=void 0,$=void 0;if(this.valueIs=="area"){var T=(g+m)/2*h,S=T*l/i;A=(y-Math.sqrt(y*y-2*S*x))/x,$=(2*S-A*y)/A}else A=h*l/i,$=y-A*x;r.width=A,r.height=d,r.bottomWidth=$,r.topWidth=y,s.topWidth=r.bottomWidth,s.bottomWidth=r.bottomWidth,r.x=this._nextY,this.alignLabels?o.y=this.labelsContainer.measuredHeight:o.y=d/2,o.x=r.pixelX+r.pixelWidth*n.locationX+r.dx,this._nextY+=r.pixelWidth+c*l/Math.max(Math.abs(t.value),1e-8),s.x=this._nextY-c,s.y=d/2}this._nextWidth=r.bottomWidth}},Object.defineProperty(e.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(t){this.setPercentProperty("topWidth",t,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pyramidHeight",{get:function(){return this.getPropertyValue("pyramidHeight")},set:function(t){this.setPercentProperty("pyramidHeight",t,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(t){this.setPercentProperty("bottomWidth",t,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueIs",{get:function(){return this.getPropertyValue("valueIs")},set:function(t){this.setPropertyValue("valueIs",t)&&this.invalidate()},enumerable:!0,configurable:!0}),e})(yd);w.registeredClasses.PyramidSeries=vd;w.registeredClasses.PyramidSeriesDataItem=ou;var Em=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PictorialStackedSeriesDataItem",t.applyTheme(),t}return e})(ou);var ex=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="PictorialStackedSeries",t.topWidth=N(100),t.bottomWidth=N(100),t.valueIs="height",t.applyTheme(),t.startLocation=0,t.endLocation=1,t.align="center",t.valign="middle",t._maskSprite=t.slicesContainer.createChild(rt),t._maskSprite.visible=!1,t._maskSprite.zIndex=100,t._maskSprite.shouldClone=!1,t}return e.prototype.validateDataElements=function(){var t=this.slicesContainer.maxWidth,i=this.slicesContainer.maxHeight,r=this._maskSprite,s=r.measuredWidth/r.scale,o=r.measuredHeight/r.scale,n=Pt(i/o,t/s);n==1/0&&(n=1),n=mt(.001,n);var l=this.startLocation,h=this.endLocation,u=Pt(t,s*n),p=Pt(i,o*n);r.scale=n,this.orientation=="vertical"?(this.topWidth=u+4,this.bottomWidth=u+4,this.pyramidHeight=p*(h-l),r.x=t/2,r.y=p/2):(this.topWidth=p+4,this.bottomWidth=p+4,this.pyramidHeight=u*(h-l),r.valign="middle",r.x=u/2,r.y=i/2),r.verticalCenter="middle",r.horizontalCenter="middle",a.prototype.validateDataElements.call(this);var d,c;this.orientation=="vertical"?(this.valign=="bottom"&&(d=i-p),this.valign=="middle"&&(d=(i-p)/2),this.valign=="top"&&(d=0),this.align=="left"&&(c=-(t-u)/2),this.align=="center"&&(c=0),this.align=="right"&&(c=(t-u)/2),this.slices.template.dy=l*p,this.alignLabels&&(this.slicesContainer.dx=c)):(this.valign=="bottom"&&(d=(i-p)/2),this.valign=="middle"&&(d=0),this.valign=="top"&&(d=-(i-p)/2),this.align=="left"&&(c=0),this.align=="center"&&(c=(t-u)/2),this.align=="right"&&(c=t-u),this.slices.template.dx=l*u,this.alignLabels&&(this.slicesContainer.dy=d)),this.slicesContainer.x=c,this.labelsContainer.x=c,this.ticksContainer.x=c,this.slicesContainer.y=d,this.labelsContainer.y=d,this.ticksContainer.y=d,u>0&&p>0&&(this.slicesContainer.mask=r)},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},e.prototype.createDataItem=function(){return new Em},Object.defineProperty(e.prototype,"maskSprite",{get:function(){return this._maskSprite},enumerable:!0,configurable:!0}),e.prototype.initSlice=function(t){a.prototype.initSlice.call(this,t);var i=t.states.getKey("hover");i&&(i.properties.expandDistance=0)},Object.defineProperty(e.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(t){this.setPropertyValue("startLocation",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(t){this.setPropertyValue("endLocation",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),e})(vd);w.registeredClasses.PictorialStackedSeries=ex;w.registeredClasses.PictorialStackedSeriesDataItem=Em;var nu=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Ellipse",t.element=t.paper.add("ellipse"),t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this),this.element.attr({rx:this.radius}),this.element.attr({ry:this.radiusY})},Object.defineProperty(e.prototype,"radiusY",{get:function(){return this.innerHeight/2},set:function(t){this.height=t*2,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.innerWidth/2},set:function(t){this.width=t*2,this.invalidate()},enumerable:!0,configurable:!0}),e})(Dr);w.registeredClasses.Ellipse=nu;var Nm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Cone",t.angle=30,t.radius=N(100),t.topRadius=N(100),t.top=t.createChild(nu),t.top.shouldClone=!1,t.bottom=t.createChild(nu),t.bottom.shouldClone=!1,t.body=t.createChild(rt),t.body.shouldClone=!1,t.body.setElement(t.paper.add("path")),t.layout="none",t.bodyFillModifier=new pn,t.bodyFillModifier.lightnesses=[0,-.25,0],t.body.fillModifier=t.bodyFillModifier,t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this),_e(this,this.top,fe),_e(this,this.bottom,fe),_e(this,this.body,fe);var t=this.innerWidth,i=this.innerHeight,r=this.bottom,s=this.top,o=this.angle,n,l,h;this.orientation=="horizontal"?(n=i/2,r.y=i/2,r.x=0,s.y=i/2,s.x=t,l=(90-o)/90,h=0,this.bodyFillModifier.gradient.rotation=90):(l=0,h=(90-o)/90,n=t/2,r.y=i,r.x=t/2,s.x=t/2,this.bodyFillModifier.gradient.rotation=0);var u=this.radius.value*n,p=this.topRadius.value*n;r.radius=u-u*l,r.radiusY=u-u*h,s.radius=p-p*l,s.radiusY=p-p*h;var d;this.orientation=="horizontal"?d=z({x:0,y:i/2-r.radiusY})+Ne(-90,-180,r.radius,r.radiusY)+V({x:t,y:i/2+s.radiusY})+Ne(90,180,s.radius,s.radiusY)+pe():d=z({x:t/2-s.radius,y:0})+Ne(180,-180,s.radius,s.radiusY)+V({x:t/2+r.radius,y:i})+Ne(0,180,r.radius,r.radiusY)+pe(),this.body.path=d},Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPropertyValue("radius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topRadius",{get:function(){return this.getPropertyValue("topRadius")},set:function(t){this.setPropertyValue("topRadius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0)},enumerable:!0,configurable:!0}),e})(Q);var bd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ConeColumn",t}return e.prototype.createAssets=function(){this.coneColumn=this.createChild(Nm),this.coneColumn.shouldClone=!1,this.column=this.coneColumn},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.coneColumn&&this.coneColumn.copyFrom(t.coneColumn)},e})(kr);w.registeredClasses.ConeColumn=bd;var ix=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ConeSeriesDataItem",t.applyTheme(),t}return e})(mr);var rx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ConeSeries",t.applyTheme(),t}return e.prototype.createColumnTemplate=function(){return new bd},e.prototype.getMaskPath=function(){var t=0,i=0,r=this.columns.getIndex(0);if(r)return this.baseAxis==this.xAxis?i=r.coneColumn.innerWidth/2+1:t=r.coneColumn.innerHeight/2+1,Nr({x:-t,y:0,width:this.xAxis.axisLength+t,height:this.yAxis.axisLength+i})},e.prototype.validateDataElementReal=function(t){a.prototype.validateDataElementReal.call(this,t);var i=t.column;if(i){var r=t.column.coneColumn;r.fill=t.column.fill,this.baseAxis==this.yAxis?r.orientation="horizontal":r.orientation="vertical"}},e})(Ar);w.registeredClasses.ConeSeries=rx;w.registeredClasses.ConeSeriesDataItem=ix;var xd=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="CurvedColumn",t}return e.prototype.createAssets=function(){this.curvedColumn=this.createChild(rt),this.curvedColumn.shouldClone=!1,this.setPropertyValue("tension",.7),this.width=N(120),this.height=N(120),this.column=this.curvedColumn},e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.realWidth,i=this.realHeight,r=this.realX-this.pixelX,s=this.realY-this.pixelY,o;this.width;var n=1,l=1;this.orientation=="vertical"?(n=this.tension,o=[{x:0,y:i+s},{x:t/2,y:s},{x:t,y:i+s}]):(l=this.tension,i=Math.abs(i),o=[{x:r,y:i},{x:r+t,y:i/2},{x:r,y:0}]);var h=z(o[0])+new jr(n,l).smooth(o);this.column.path=h},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.curvedColumn&&this.curvedColumn.copyFrom(t.curvedColumn)},Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0)},enumerable:!0,configurable:!0}),e})(kr);w.registeredClasses.CurvedColumn=xd;var sx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="CurvedColumnSeriesDataItem",t.applyTheme(),t}return e})(mr);var ax=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="CurvedColumnSeries",t.applyTheme(),t}return e.prototype.createColumnTemplate=function(){return new xd},e.prototype.validateDataElementReal=function(t){a.prototype.validateDataElementReal.call(this,t);var i=t.column;if(i=t.column,i){var r=t.column.curvedColumn;r.fill=t.column.fill,this.baseAxis==this.yAxis?i.orientation="horizontal":i.orientation="vertical"}},e})(Ar);w.registeredClasses.CurvedColumnSeries=ax;w.registeredClasses.CurvedColumnSeriesDataItem=sx;var ox=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="CircleBullet";var i=t.createChild(Dr);return i.shouldClone=!1,i.radius=5,i.isMeasured=!1,t.circle=i,t.applyTheme(),t}return e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.circle.copyFrom(t.circle)},e})(Vi);w.registeredClasses.CircleBullet=ox;var nx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ErrorBullet",t.errorLine=t.createChild(rt),t.errorLine.shouldClone=!1,t.width=20,t.height=20,t.strokeOpacity=1,t.isDynamic=!0,t}return e.prototype.validatePosition=function(){a.prototype.validatePosition.call(this);var t=this.pixelWidth/2,i=this.pixelHeight/2;this.errorLine.path=z({x:-t,y:-i})+V({x:t,y:-i})+z({x:0,y:-i})+V({x:0,y:i})+z({x:-t,y:i})+V({x:t,y:i})},e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.errorLine.copyFrom(t.errorLine)},e})(Vi);w.registeredClasses.ErrorBullet=nx;var lu=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="TextLink",t.selectable=!0;var i=new ct;t.fill=i.getFor("primaryButton").brighten(.3);var r=t.states.create("hover");r.properties.fill=i.getFor("primaryButtonHover").brighten(.3);var s=t.states.create("down");return s.properties.fill=i.getFor("primaryButtonDown").brighten(.3),t.cursorOverStyle=Le.pointer,t.applyTheme(),t}return e})(Me);w.registeredClasses.TextLink=lu;var Fl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Triangle",t.element=t.paper.add("path"),t.direction="top",t.applyTheme(),t}return e.prototype.draw=function(){a.prototype.draw.call(this);var t=this.pixelWidth,i=this.pixelHeight,r;switch(this.direction){case"right":r=z({x:0,y:0})+V({x:t,y:i/2})+V({x:0,y:i})+pe();break;case"left":r=z({x:t,y:0})+V({x:0,y:i/2})+V({x:t,y:i})+pe();break;case"bottom":r=z({x:0,y:0})+V({x:t,y:0})+V({x:t/2,y:i})+pe();break;case"top":r=z({x:t/2,y:0})+V({x:t,y:i})+V({x:0,y:i})+pe();break}this.path=r},Object.defineProperty(e.prototype,"direction",{get:function(){return this.getPropertyValue("direction")},set:function(t){this.setPropertyValue("direction",t,!0)},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Triangle=Fl;var lx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="NavigationBarDataItem",t.applyTheme(),t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.properties.name},set:function(t){this.setProperty("name",t)},enumerable:!0,configurable:!0}),e})(wr);var hx=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="NavigationBar";var i=new ct,r=new lu;r.valign="middle",r.paddingTop=8,r.paddingBottom=8,t.paddingBottom=2,t.links=new zt(r),t._disposers.push(new Ft(t.links)),t._disposers.push(r),t._linksIterator=new Yo(t.links,function(){return t.links.create()}),t._linksIterator.createNewItems=!0;var s=new Fl;s.direction="right",s.width=8,s.height=12,s.fill=i.getFor("alternativeBackground"),s.fillOpacity=.5,s.valign="middle",s.marginLeft=10,s.marginRight=10,t.separators=new zt(s),t._disposers.push(new Ft(t.separators)),t._disposers.push(s);var o=new lu;return t.activeLink=o,o.copyFrom(r),o.valign="middle",o.fontWeight="bold",t.width=N(100),t.layout="grid",t.dataFields.name="name",t.applyTheme(),t}return e.prototype.validateDataElements=function(){this.removeChildren(),this._linksIterator.reset(),a.prototype.validateDataElements.call(this)},e.prototype.validateDataElement=function(t){a.prototype.validateDataElement.call(this,t);var i;if(t.index<this.dataItems.length-1){i=this._linksIterator.getLast(),i.parent=this;var r=this.separators.create();r.parent=this,r.valign="middle"}else i=this.activeLink,i.events.copyFrom(this.links.template.events),i.hide(0),i.show(),i.parent=this;i.dataItem=t,i.text=t.name,i.validate()},e})(Cr);w.registeredClasses.NavigationBar=hx;w.registeredClasses.NavigationBarDataItem=lx;var ux=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadarCursor",t.radius=N(100),t.innerRadius=N(0),t.applyTheme(),t.mask=void 0,t}return e.prototype.fitsToBounds=function(t){var i=Mt(t);return i<this.truePixelRadius+1&&i>this.pixelInnerRadius-1},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),e.prototype.triggerMoveReal=function(t,i){(!this.xAxis||this.xAxis&&(!this.xAxis.cursorTooltipEnabled||this.xAxis.tooltip.disabled))&&this.updateLineX(this.point),(!this.yAxis||this.yAxis&&(!this.yAxis.cursorTooltipEnabled||this.yAxis.tooltip.disabled))&&this.updateLineY(this.point),this.updateSelection(),a.prototype.triggerMoveReal.call(this,t,i)},e.prototype.updateLineX=function(t){var i=this.pixelRadius,r=this.startAngle,s=this.endAngle,o=this.pixelInnerRadius;if(i>0&&P(r)&&P(s)&&P(o)){var n=Vr(Ae(t),r,s),l=void 0;if(this.lineX&&this.lineX.visible){if(this.lineX.moveTo({x:0,y:0}),this.xAxis&&this.fullWidthLineX){var h=this.xAxis.currentItemStartPoint,u=this.xAxis.currentItemEndPoint;if(h&&u){var p=Vr(Ae(h),r,s),d=Vr(Ae(u),r,s),c=d-p;r<s?c<0&&(c+=360):c>0&&(c-=360),n-=c/2,l=z({x:o*U(n),y:o*G(n)})+V({x:i*U(n),y:i*G(n)})+Ne(n,c,i)+V({x:o*U(n+c),y:o*G(n+c)})+Ne(n+c,-c,o)}}l||(l=z({x:o*U(n),y:o*G(n)})+V({x:i*U(n),y:i*G(n)})),this.lineX.path=l}}},e.prototype.updateLineY=function(t){if(this.lineY&&this.lineY.visible){var i=this.startAngle,r=this.endAngle,s=this.truePixelRadius,o=J(Mt(t),0,this.truePixelRadius);if(P(o)&&P(i)){this.lineY.moveTo({x:0,y:0});var n=void 0,l=r-i;if(this.yAxis&&this.fullWidthLineY){var h=this.yAxis.currentItemStartPoint,u=this.yAxis.currentItemEndPoint;if(h&&u){var p=J(Mt(h),0,s);o=J(Mt(u),0,s),n=z({x:o*U(i),y:o*G(i)})+Ne(i,l,o),n+=z({x:p*U(r),y:p*G(r)})+Ne(r,-l,p)}}n||(n=z({x:o*U(i),y:o*G(i)})+Ne(i,r-i,o)),this.lineY.path=n}}},e.prototype.updateSelection=function(){if(this._usesSelection){var t=this.downPoint;if(t){var i=this.point,r=this.pixelRadius,s=this.truePixelRadius,o=this.pixelInnerRadius,n=Math.min(this.startAngle,this.endAngle),l=Math.max(this.startAngle,this.endAngle),h=Vr(Ae(t),n,l),u=Vr(Ae(i),n,l),p=Mt(t);if(p<s){var d=J(Mt(i),0,s);this._prevAngle=u;var c=z({x:0,y:0}),f=G(h),g=U(h),m=G(u),y=U(u),v=this.behavior;v=="zoomX"||v=="selectX"?c+=V({x:r*g,y:r*f})+Ne(h,u-h,r)+V({x:o*y,y:o*m})+Ne(u,h-u,o):v=="zoomY"||v=="selectY"?c=z({x:d*U(n),y:d*G(n)})+Ne(n,l-n,d)+V({x:p*U(l),y:p*G(l)})+Ne(l,n-l,p)+pe():v=="zoomXY"&&(c=z({x:d*U(h),y:d*G(h)})+Ne(h,u-h,d)+V({x:p*U(u),y:p*G(u)})+Ne(u,h-u,p)+pe()),this.selection.path=c}this.selection.moveTo({x:0,y:0})}}},e.prototype.getPositions=function(){var t=this.chart;if(t){var i=this.pixelInnerRadius,r=this.truePixelRadius-i,s=this.startAngle,o=this.endAngle,n=Vr(Ae(this.point),s,o),l=(n-s)/(o-s);this.xPosition=l,this.yPosition=J((Mt(this.point)-i)/r,0,1)}},e.prototype.updatePoint=function(t){},e.prototype.handleXTooltipPosition=function(t){if(this.xAxis.cursorTooltipEnabled){var i=this.xAxis.tooltip;this.updateLineX(ki({x:i.pixelX,y:i.pixelY},this))}},e.prototype.handleYTooltipPosition=function(t){if(this.yAxis.cursorTooltipEnabled){var i=this.yAxis.tooltip;this.updateLineY(ki({x:i.pixelX,y:i.pixelY},this))}},e.prototype.updateLinePositions=function(t){},e.prototype.getRanges=function(){var t=this.downPoint;if(t){var i=this.upPoint,r=this.chart;if(r){var s=this.pixelRadius,o=this.startAngle,n=this.endAngle,l=Vr(Ae(t),this.startAngle,this.endAngle),h=Vr(Ae(i),this.startAngle,this.endAngle),u=J(Mt(t),0,s),p=J(Mt(i),0,s),d=0,c=1,f=0,g=1,m=this.behavior;if(m=="zoomX"||m=="selectX"||m=="zoomXY"||m=="selectXY"){var y=n-o;d=H((l-o)/y,5),c=H((h-o)/y,5)}(m=="zoomY"||m=="selectY"||m=="zoomXY"||m=="selectXY")&&(f=H(u/s,5),g=H(p/s,5)),this.xRange={start:Math.min(d,c),end:Math.max(d,c)},this.yRange={start:Math.min(f,g),end:Math.max(f,g)},this.behavior=="selectX"||this.behavior=="selectY"||this.behavior=="selectXY"||this.selection.hide()}}},e.prototype.updateSize=function(){},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return Oe(this.radius,this.truePixelRadius)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"truePixelRadius",{get:function(){return te(N(100),Pt(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){var t=this.innerRadius;return t instanceof _t&&(t=N(100*t.value*this.chart.innerRadiusModifyer)),Oe(t,this.truePixelRadius)||0},enumerable:!0,configurable:!0}),e.prototype.fixPoint=function(t){return t},e})(nd);w.registeredClasses.RadarCursor=ux;var Ml=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.properties.gap=0,t._line=t.paper.add("path"),t.addElement(t._line),t}return e.prototype.draw=function(){if(a.prototype.draw.call(this),Math.round(this.rotation/90)!=this.rotation/90&&(this.properties.shapeRendering="auto"),this._line){var t=this.width,i=this.height,r="";if(!this.gap)Math.round(this.rotation/90)!=this.rotation/90?(r=z({x:-t,y:i/2})+V({x:t*2,y:i/2}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):r=z({x:0,y:0})+V({x:t,y:0});else for(var s=this.gap+this.strokeWidth,o=this.height/s,n=-o/2;n<o*1.5;n++)Math.round(this.rotation/90)!=this.rotation/90?(r+=z({x:-t,y:(n+.5)*s})+V({x:t*2,y:(n+.5)*s}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):r+=z({x:-t,y:n*s})+V({x:t*2,y:n*s});this._line.attr({d:r})}},Object.defineProperty(e.prototype,"gap",{get:function(){return this.properties.gap},set:function(t){this.properties.gap=t,this.draw()},enumerable:!0,configurable:!0}),e})(Ps);w.registeredClasses.LinePattern=Ml;var Rl=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.rectHeight=1,t.rectWidth=1,t._rect=t.paper.add("rect"),t.addElement(t._rect),t}return e.prototype.draw=function(){a.prototype.draw.call(this),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2,this._rect&&this._rect.attr({width:this.rectWidth,height:this.rectHeight,x:(this.width-this.rectWidth)/2,y:(this.height-this.rectHeight)/2})},Object.defineProperty(e.prototype,"rectWidth",{get:function(){return this.properties.rectWidth},set:function(t){this.properties.rectWidth=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectHeight",{get:function(){return this.properties.rectHeight},set:function(t){this.properties.rectHeight=t,this.draw()},enumerable:!0,configurable:!0}),e})(Ps);w.registeredClasses.RectPattern=Rl;var Bm=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="FocusFilter",t.feFlood=t.paper.add("feFlood"),t.feFlood.attr({"flood-color":new ct().getFor("primaryButtonHover"),result:"base"}),t.filterPrimitives.push(t.feFlood),t.feMorphology=t.paper.add("feMorphology"),t.feMorphology.attr({result:"bigger",in:"SourceGraphic",operator:"dilate",radius:"2"}),t.filterPrimitives.push(t.feMorphology),t.feColorMatrix=t.paper.add("feColorMatrix"),t.feColorMatrix.attr({result:"mask",in:"bigger",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"}),t.filterPrimitives.push(t.feColorMatrix),t.feComposite=t.paper.add("feComposite"),t.feComposite.attr({result:"drop",in:"base",in2:"mask",operator:"in"}),t.filterPrimitives.push(t.feComposite),t.feBlend=t.paper.add("feBlend"),t.feBlend.attr({in:"SourceGraphic",in2:"drop",mode:"normal"}),t.filterPrimitives.push(t.feBlend),t.width=130,t.height=130,t.applyTheme(),t}return Object.defineProperty(e.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(t){this.properties.stroke=t,this.feFlood.attr({"flood-color":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(t){this.properties.strokeWidth=t,this.feMorphology.attr({radius:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(t){this.properties.opacity=t,this.feColorMatrix.attr({values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "+t+" 0"})},enumerable:!0,configurable:!0}),e.prototype.setSprite=function(t){this._sprite&&this._sprite!=t&&this._sprite.group.removeStyle("outline"),t.group.addStyle({outline:"none"}),a.prototype.setSprite.call(this,t)},e})(Br);var _d=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="Preloader",t.width=N(100),t.height=N(100);var i=new ct,r=t.createChild(Q);r.shouldClone=!1;var s=r.createChild(Hr);s.shouldClone=!1,s.radius=53,s.arc=360,s.fill=i.getFor("fill"),s.fillOpacity=.8,s.innerRadius=42,s.isMeasured=!1,t.backgroundSlice=s;var o=r.createChild(Hr);o.shouldClone=!1,o.radius=50,o.innerRadius=45,o.fill=i.getFor("alternativeBackground"),o.fillOpacity=.2,o.isMeasured=!1,t.progressSlice=o;var n=r.createChild(Me);n.shouldClone=!1,n.horizontalCenter="middle",n.verticalCenter="middle",n.isMeasured=!1,n.fill=i.getFor("text"),n.align="center",n.valign="middle",n.textAlign="middle",n.fillOpacity=.4,t.label=n,t.background.opacity=1,t.background.fill=i.getFor("background"),t.contentAlign="center",t.contentValign="middle",t.delay=300;var l=t.states.create("hidden");return l.properties.opacity=0,t.visible=!1,t.hide(0),t.__disabled=!0,t._disposers.push(t.backgroundSlice),t._disposers.push(t.progressSlice),t._disposers.push(t.label),t._disposers.push(r),t}return Object.defineProperty(e.prototype,"progress",{get:function(){return this.getPropertyValue("progress")},set:function(t){var i=this;this.__disabled=!1,this.validateLayout(),this.setPropertyValue("progress",t),this.progressSlice.arc=360*t,this.label&&(this.label.text=Math.round(t*100)+"%"),t>=1?(this._started&&(this._started=void 0),w.events.once("enterframe",function(){var r=i.hide();r&&!r.isFinished()?r.events.once("animationended",function(){i.__disabled=!0}):i.__disabled=!0}),this.interactionsEnabled=!1,this.setPropertyValue("progress",0)):t>0&&(this.delay?this._started?this._started+this.delay<=new Date().getTime()&&(this.__disabled=!1,this.show(),this.interactionsEnabled=!0):this._started=new Date().getTime():(this.__disabled=!1,this.show(),this.interactionsEnabled=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return this.getPropertyValue("delay")},set:function(t){this.setPropertyValue("delay",t)},enumerable:!0,configurable:!0}),e})(Q);w.registeredClasses.Preloader=_d;var px=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="AmChartsLogo",t.valign="bottom";var i=.3;t.opacity=.3,t.defaultState.properties.opacity=.4,t.url="https://www.amcharts.com/",t.urlTarget="_blank",t.showSystemTooltip=!0,t.readerTitle="Chart created using amCharts library",t.width=220*i,t.height=70*i,t.background.opacity=0;var r=nt("#474758");new ct().getFor("background").alternative.hex=="#ffffff"&&(r=nt("#ffffff"));var s=new mi;s.addColor(r),s.addColor(r,1,.75),s.addColor(nt("#3cabff"),1,.755),s.rotation=-10;var o=s,n=t.createChild(dn);n.shouldClone=!1,n.isMeasured=!1,n.segments=[[{x:50*i,y:50*i},{x:90*i,y:50*i},{x:120*i,y:20*i},{x:135*i,y:35*i},{x:150*i,y:20*i},{x:180*i,y:50*i},{x:200*i,y:50*i}]],n.strokeWidth=6*i,n.tensionX=.8,n.tensionY=1,n.stroke=nt("#3cabff");var l=t.createChild(dn);l.shouldClone=!1,l.isMeasured=!1,l.segments=[[{x:20*i,y:50*i},{x:50*i,y:50*i},{x:90*i,y:12*i},{x:133*i,y:50*i},{x:170*i,y:50*i},{x:200*i,y:50*i}]],l.strokeWidth=6*i,l.tensionX=.75,l.tensionY=1,l.stroke=o,t._disposers.push(l);var h=new nn;t.filters.push(h);var u=new nn;u.saturation=1;var p=t.states.create("hover");return p.properties.opacity=1,p.filters.push(u),t.applyTheme(),t}return e})(Q);function r$(a,e){var t=Sh(a),i=!1;if(t||(t=document.createElement("div"),t.style.width="200px",t.style.height="200px",t.style.top="0",t.style.left="0",t.style.visibility="hidden",t.style.position="absolute",document.body.appendChild(t),i=!0),t){t.innerHTML="";var r=new Eh(t),s=new jp(r.SVGContainer,"svg-"+(Bp.length-1)),o=new Q;o.htmlContainer=t,o.svgContainer=r,o.width=N(100),o.height=N(100),o.background.fillOpacity=0,o.paper=s,s.append(o.group),i&&Gf(function(){o.moveHtmlContainer(a)}),o.relativeWidth=1,o.relativeHeight=1,r.container=o;var n=o.createChild(e);n.topParent=o;var l=n.uid;w.invalidSprites[l]=[],w.invalidDatas[l]=[],w.invalidPositions[l]=[],w.invalidLayouts[l]=[],o.baseId=l,n.isBaseSprite=!0,n.focusFilter=new Bm,w.baseSprites.push(n),w.baseSpritesByUid[l]=n,n.maskRectangle={x:0,y:0,width:Math.max(r.width||0,0),height:Math.max(r.height||0,0)},o.events.on("maxsizechanged",function(x){(x.previousWidth==0||x.previousHeight==0)&&o.deepInvalidate(),n.maskRectangle&&(n.maskRectangle={x:0,y:0,width:Math.max(r.width||0,0),height:Math.max(r.height||0,0)})});var h=null,u=function(){n.isDisposed()?h=null:Ap(n.dom)==null?($t.autoDispose?(o.htmlContainer=void 0,r.htmlElement=void 0,n.dispose()):yl("Chart was not disposed",n.uid),h=null):h=window.setTimeout(u,1e3)};u(),n.addDisposer(new Lt(function(){h!==null&&clearTimeout(h),ft(w.baseSprites,n),w.baseSpritesByUid[n.uid]=void 0})),n.addDisposer(o);var p=o.createChild(Q);p.topParent=o,p.width=N(100),p.height=N(100),p.isMeasured=!1,o.tooltipContainer=p,n.tooltip=new qa,n.tooltip.hide(0),n.tooltip.setBounds({x:0,y:0,width:p.maxWidth,height:p.maxHeight}),p.events.on("maxsizechanged",function(){ee(n.tooltip).setBounds({x:0,y:0,width:p.maxWidth,height:p.maxHeight})},void 0,!1);var d=new _d;if(d.events.on("inited",function(){d.__disabled=!0},void 0,!1),o.preloader=d,n instanceof Q&&!n.hasLicense()){var c=p.createChild(px);p.events.on("maxsizechanged",function(x){p.maxWidth<=100||p.maxHeight<=50?c.hide():(c.isHidden||c.isHiding)&&c.show()},void 0,!1),n.logo=c,c.align="left",c.valign="bottom"}if(n.numberFormatter,o.isStandaloneInstance=!0,$t.onlyShowOnViewport)if(Op(t,$t.viewportTarget))$t.queue&&jm(n);else{n.__disabled=!0,n.tooltipContainer.__disabled=!0;var f=[$e(window,"DOMContentLoaded",function(){cn(n)}),$e(window,"load",function(){cn(n)}),$e(window,"resize",function(){cn(n)}),$e(window,"scroll",function(){cn(n)})];if($t.viewportTarget)for(var g=oe($t.viewportTarget)?$t.viewportTarget:$t.viewportTarget?[$t.viewportTarget]:[],m=0;m<g.length;m++){var y=g[m];f.push($e(y,"resize",function(){cn(n)})),f.push($e(y,"scroll",function(){cn(n)}))}var v=new Bt(f);n.addDisposer(v),n.vpDisposer=v}else $t.queue&&jm(n);return n}else throw Ot.log("html container not found"),new Error("html container not found")}function jm(a){w.queue.indexOf(a)==-1&&(a.__disabled=!0,a.tooltipContainer.__disabled=!0,a.events.disableType("appeared"),w.queue.length==0&&(w.events.once("exitframe",function(){dx(a)}),Ot.requestFrame()),a.addDisposer(new Lt(function(){Pd(a)})),w.queue.push(a))}function Pd(a){var e=w.queue.indexOf(a);if(e>=0){w.queue.splice(w.queue.indexOf(a),1);var t=w.queue[e];t&&dx(t)}}function cn(a){a.__disabled&&Op(a.htmlContainer,$t.viewportTarget)&&(a.vpDisposer&&a.vpDisposer.dispose(),jm(a))}function dx(a){a&&a.tooltipContainer&&(a.__disabled=!1,a.tooltipContainer.__disabled=!1,a.events.enableType("appeared"),a.dispatch("removedfromqueue"),a.showOnInit&&a.events.on("appeared",function(){Pd(a)}),a.vpDisposer&&a.vpDisposer.dispose(),a instanceof Q&&a.invalidateLabels(),a.tooltipContainer&&a.tooltipContainer.invalidateLayout(),a instanceof Cr?(a.invalidateData(),a.reinit(),a.events.once("datavalidated",function(){a.showOnInit?a.appear():Pd(a)})):(a.reinit(),a.events.once("inited",function(){Pd(a)}),a.showOnInit&&a.appear()))}function s$(a,e){var t;vt(e)&&(C(w.registeredClasses[e])?e=w.registeredClasses[e]:(e=w.registeredClasses.Container,t=new Error("Class ["+e+"] is not loaded.")));var i=r$(a,e);return t&&i.raiseCriticalError(t),i}function a$(a){w.themes.indexOf(a)===-1&&w.themes.push(a)}function o$(a){ft(w.themes,a)}var cx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Image",t.element=t.paper.add("image"),t.applyTheme(),t.width=50,t.height=50,t}return e.prototype.draw=function(){if(a.prototype.draw.call(this),this.href){var t=this.innerWidth,i=this.innerHeight;P(this.widthRatio)&&(t=i*this.widthRatio,this.width=t),P(this.heightRatio)&&(i=t*this.heightRatio,this.height=i),this.element.attr({width:t,height:i}),this.element.attrNS(hl,"xlink:href",this.href)}},Object.defineProperty(e.prototype,"href",{get:function(){return this.getPropertyValue("href")},set:function(t){this.setPropertyValue("href",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widthRatio",{get:function(){return this.getPropertyValue("widthRatio")},set:function(t){this.setPropertyValue("widthRatio",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heightRatio",{get:function(){return this.getPropertyValue("heightRatio")},set:function(t){this.setPropertyValue("heightRatio",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bbox",{get:function(){return{x:0,y:0,width:this.pixelWidth,height:this.pixelHeight}},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Image=cx;var fx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Polyarc",t.controlPointDistance=.5,t.controlPointPosition=.5,t.applyTheme(),t}return e.prototype.makePath=function(){this._distance=0;var t=this.segments;if(t&&t.length>0){var i="";this._realSegments=[];for(var r=0,s=t.length;r<s;r++){var o=t[r],n=[];if(this._realSegments.push(n),o.length>0){i+=z(o[0]);for(var l=1;l<o.length;l++){var h=o[l-1],u=o[l],p=Mt(u,h),d=p*this.controlPointDistance,c=this.controlPointPosition,f=-Ae(h,u),g=h.x+(u.x-h.x)*c*.5-d*G(f),m=h.y+(u.y-h.y)*c*.5-d*U(f),y={x:g,y:m},v=h.x+(u.x-h.x)*c*1.5-d*G(f),x=h.y+(u.y-h.y)*c*1.5-d*U(f),_={x:v,y:x};i+=ya(u,y,_);var $=Math.ceil(p),T=h;if($>0)for(var S=0;S<=$;S++){var k=dh(h,u,y,_,S/$);n.push(k),this._distance+=Mt(T,k),T=k}else n.push(h)}}}this.path=i}},Object.defineProperty(e.prototype,"controlPointPosition",{get:function(){return this.getPropertyValue("controlPointPosition")},set:function(t){this.setPropertyValue("controlPointPosition",t),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(t){this.setPropertyValue("controlPointDistance",t),this.makePath()},enumerable:!0,configurable:!0}),e})(_a);w.registeredClasses.Polyarc=fx;var Hm=(function(a){D(e,a);function e(t){var i=a.call(this)||this;return i._bboxes=[],i.morphDuration=800,i.morphEasing=Jr,i.morphToSingle=!0,i.scaleRatio=1,i.className="Morpher",i.morphable=t,i.applyTheme(),i}return e.prototype.morphToPolygon=function(t,i,r){var s=this.morphable.currentPoints;if(s&&t){this.sortPoints(s),this.sortPoints(t),this._morphFromPointsReal=[],this._morphToPointsReal=[],C(i)||(i=this.morphDuration),C(r)||(r=this.morphEasing),this._morphFromPointsReal=this.normalizePoints(t,s),this._morphToPointsReal=this.normalizePoints(s,t),this.morphable.currentPoints=this._morphFromPointsReal;var o=new Pi(this,{property:"morphProgress",from:0,to:1},i,r);return this._disposers.push(o),o.start(),o}},e.prototype.normalizePoints=function(t,i){for(var r=0,s=t.length;r<s;r++){var o=t[r][0],n=t[r][1],l=ee(Un(o)),h=l.x+l.width,u=l.y+l.height;if(i[r]||(i[r]=[]),o&&!i[r][0]&&(i[r][0]=[{x:h,y:u},{x:h,y:u}]),i[r][0]){i[r][0]=this.addPoints(i[r][0],o.length);for(var p=1/0,d=0,c=0;c<i[r][0].length;c++){var f=Mt(i[r][0][c],o[0]);f<p&&(d=c,p=f)}var g=i[r][0].slice(0,d),m=i[r][0].slice(d);i[r][0]=m.concat(g)}n&&(i[r][1]||(i[r][1]=[{x:h,y:u},{x:h,y:u}]),i[r][1]=this.addPoints(i[r][1],n.length))}return i},e.prototype.sortPoints=function(t){t.sort(function(n,l){var h=ee(Un(n[0])),u=ee(Un(l[0]));return h.width*h.height>u.width*u.height?-1:1});for(var i=[],r=0,s=t.length;r<s;r++){var o=t[r][0];o&&i.push(ee(Un(o)))}return Is(i)},e.prototype.morphToCircle=function(t,i,r){var s=this.morphable.points,o=this.sortPoints(s);this._morphFromPointsReal=[],this._morphToPointsReal=[],C(i)||(i=this.morphDuration),C(r)||(r=this.morphEasing);for(var n=0,l=s.length;n<l;n++){var h=s[n][0],u=s[n][1];if(this._morphFromPointsReal[n]=[],this._morphToPointsReal[n]=[],h){var p=h,d=h,c=ee(Un(d));this.morphToSingle&&(c=ee(o));var f=c.x+c.width/2,g=c.y+c.height/2,m=t;P(m)||(m=Math.min(c.width/2,c.height/2)),p=[];var y=Ae({x:f,y:g},h[0]),v=100;h.length>v&&(v=h.length),d=this.addPoints(h,v),v=d.length;for(var x=360/(v-1),_=0;_<v;_++){var $=x*_+y,T={x:f+m*U($),y:g+m*G($)};p[_]=T}if(u&&u.length>0)for(var S=0,k=u.length;S<k;S++)p.push({x:f,y:g});this._morphFromPointsReal[n][0]=d,this._morphToPointsReal[n][0]=p}}this.morphable.currentPoints=this._morphFromPointsReal;var A=new Pi(this,{property:"morphProgress",from:0,to:1},i,r);return this._disposers.push(A),A.start(),A},e.prototype.addPoints=function(t,i){for(var r=Math.round(i/t.length),s=[],o=0,n=t.length;o<n;o++){var l=t[o],h=void 0;o==t.length-1?h=t[0]:h=t[o+1],s.push(l);for(var u=1;u<r;u++){var p=u/r,d={x:l.x+(h.x-l.x)*p,y:l.y+(h.y-l.y)*p};s.push(d)}s.length+t.length-o==i&&(r=0)}if(s.length<i&&t.length>0)for(var c=t[t.length-1],u=s.length;u<i;u++)s.push({x:c.x,y:c.y});return s},e.prototype.morphToRectangle=function(t,i,r,s){var o=this.morphable.points;this.sortPoints(o),this._morphFromPointsReal=[],this._morphToPointsReal=[],C(r)||(r=this.morphDuration),C(s)||(s=this.morphEasing);for(var n=0,l=o.length;n<l;n++){var h=o[n][0],u=o[n][1];if(this._morphFromPointsReal[n]=[],this._morphToPointsReal[n]=[],h){var p=h,d=h,c=this._bboxes[n];this.morphToSingle;var f=c.x,g=c.y,m=t,y=i;if(P(m)||(m=c.width),P(y)||(y=c.height),p=[{x:f,y:g},{x:f+m,y:g},{x:f+m,y:g+y},{x:f,y:g+y}],p=this.addPoints(p,h.length),h.length<4)for(var v=h.length;v<4;v++)p.push({x:h[v].x,y:h[v].y});if(u&&u.length>0)for(var x=c.x+c.width/2,_=c.y+c.height/2,$=0,T=u.length;$<T;$++)p.push({x,y:_});this._morphFromPointsReal[n][0]=d,this._morphToPointsReal[n][0]=p}}this.morphable.currentPoints=this._morphFromPointsReal;var S=new Pi(this,{property:"morphProgress",from:0,to:1},r,s);return this._disposers.push(S),S.start(),S},Object.defineProperty(e.prototype,"morphProgress",{get:function(){return this._morphProgress},set:function(t){this._morphProgress=t;var i=[];if(t!=null){var r=this._morphFromPointsReal,s=this._morphToPointsReal;if(r!=null&&s!=null)for(var o=0,n=r.length;o<n;o++){var l=[];i.push(l);var h=r[o][0],u=r[o][1],p=s[o][0],d=s[o][1];if(h&&h.length>0&&p&&p.length>0){for(var c=[],f=0,g=h.length;f<g;f++){var m=h[f],y=p[f],v={x:m.x+(y.x*this.scaleRatio-m.x)*t,y:m.y+(y.y*this.scaleRatio-m.y)*t};c.push(v)}l[0]=c}if(u&&u.length>0&&d&&d.length>0){for(var x=[],_=0,$=u.length;_<$;_++){var m=u[_],y=d[_],v={x:m.x+(y.x*this.scaleRatio-m.x)*t,y:m.y+(y.y*this.scaleRatio-m.y)*t};x.push(v)}l[1]=x}}}this.morphable.currentPoints=i},enumerable:!0,configurable:!0}),e.prototype.morphBack=function(t,i){this._morphToPointsReal=this._morphFromPointsReal,this._morphFromPointsReal=this.morphable.currentPoints,C(t)||(t=this.morphDuration),C(i)||(i=this.morphEasing);var r=new Pi(this,{property:"morphProgress",from:0,to:1},t,i);return this._disposers.push(r),r.start(),r},Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Qr(this._animations))),this._animations},enumerable:!0,configurable:!0}),e})(we);var mx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Polygon",t.element=t.paper.add("path"),t.shapeRendering="auto",t._currentPoints=[],t.applyTheme(),t}return Object.defineProperty(e.prototype,"points",{get:function(){var t=this.getPropertyValue("points"),i=this.path;if(i&&(!t||t.length==0)){for(var r=i.slice(1,i.length-1),s=r.split("ZM"),o=0;o<s.length;o++){var n=s[o];if(n.length>0){var l=n.split("M"),h=l[0],u=l[1];if(h&&h.length>0){var p=h.split("L");if(p.length>0){var d=[],c=[d];t.push(c);for(var f=0;f<p.length;f++){var g=p[f].split(",");d.push({x:+g[0],y:+g[1]})}if(u&&u.length>0){var m=u.split("L");if(m.length>0){var y=[];c.push(y);for(var f=m.length-1;f>=0;f--){var g=m[f].split(",");y.push({x:+g[0],y:+g[1]})}}}}}}}this.setPropertyValue("points",t),this._currentPoints=t}return t},set:function(t){this.setPropertyValue("points",t,!0),this._currentPoints=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentPoints",{get:function(){return(!this._currentPoints||this._currentPoints.length==0)&&this.path&&(this._currentPoints=this.points),this._currentPoints},set:function(t){this._currentPoints!=t&&(this._currentPoints=t,this.draw())},enumerable:!0,configurable:!0}),e.prototype.draw=function(){var t="",i=this._currentPoints,r,s,o,n;if(i.length>0){for(var l=0,h=i.length;l<h;l++){var u=i[l][0],p=i[l][1];if(u&&u.length>0){var d=u[0];t+=z(d);for(var c=0;c<u.length;c++)d=u[c],t+=V(d),(!P(s)||s<d.x)&&(s=d.x),(!P(r)||r>d.x)&&(r=d.x),(!P(o)||o>d.y)&&(o=d.y),(!P(n)||n<d.y)&&(n=d.y)}if(p&&p.length>0){var d=p[0];t+=z(d);for(var f=0,g=p.length;f<g;f++)d=p[f],t+=V(d)}}t&&(t+=pe()),this.bbox.x=r,this.bbox.y=o,this.bbox.width=s-r,this.bbox.height=n-o,a.prototype.setPath.call(this,t)}},e.prototype.setPath=function(t){return a.prototype.setPath.call(this,t)?(this.points=[],this._bbox=this.group.getBBox(),!0):!1},e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"centerPoint",{get:function(){return{x:this.bbox.x+this.bbox.width/2,y:this.bbox.y+this.bbox.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"morpher",{get:function(){return this._morpher||(this._morpher=new Hm(this),this._disposers.push(this._morpher)),this._morpher},enumerable:!0,configurable:!0}),e})(rt);w.registeredClasses.Polygon=mx;var gx=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="CloseButton",t.padding(8,8,8,8),t.showSystemTooltip=!0,t.width=30,t.height=30;var i=new ct;t.cursorOverStyle=Le.pointer;var r=t.background;r.cornerRadius(20,20,20,20);var s=i.getFor("background");r.fill=s,r.stroke=i.getFor("primaryButton"),r.strokeOpacity=1,r.strokeWidth=1;var o=i.getFor("primaryButtonActive"),n=r.states.getKey("hover");n.properties.strokeWidth=3,n.properties.fill=s;var l=r.states.getKey("down");l.properties.stroke=o,l.properties.fill=s;var h=new rt;return h.element=t.paper.add("path"),h.stroke=r.stroke,t.icon=h,t.applyTheme(),t}return e.prototype.validate=function(){a.prototype.validate.call(this);var t=this.pixelWidth/3,i=this.pixelHeight/3,r=z({x:-t/2,y:-i/2});r+=V({x:t/2,y:i/2}),r+=z({x:t/2,y:-i/2}),r+=V({x:-t/2,y:i/2}),this.icon.path=r,this.invalidateLayout()},e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Close"))},e})(rr);w.registeredClasses.CloseButton=gx;var yx=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="SwitchButton",t.tooltipY=0,t.layout="horizontal",t.contentAlign="center",t.contentValign="middle",t.padding(8,16,8,16),t.setStateOnChildren=!0,t.states.create("active");var i=new ct,r=new Me;r.fillOpacity=.3;var s=r.states.create("active");s.properties.fillOpacity=1,r.isActive=!0,t.leftLabel=r;var o=new rr,n=new Dr;o.contentValign="none",o.padding(0,0,0,0),n.radius=10,o.icon=n,o.icon.valign="middle",o.label=void 0;var l=N(100);o.background.cornerRadius(l,l,l,l),o.width=n.radius*3.5,o.height=n.radius*2.1,o.marginLeft=8,o.marginRight=8,o.togglable=!0,n.dx=-n.radius*.7,n.fill=i.getFor("primaryButton");var h=n.states.create("hover");h.properties.fill=i.getFor("primaryButtonHover");var u=n.states.create("active");u.properties.fill=i.getFor("primaryButtonActive"),u.properties.dx=n.radius*.7,t.switchButton=o,t.events.on("toggled",function(){t.leftLabel.isActive=!t.isActive,t.rightLabel.isActive=t.isActive});var p=new Me;p.fillOpacity=.3;var d=p.states.create("active");return d.properties.fillOpacity=1,t.rightLabel=p,t.role="button",t.focusable=!0,p.valign="middle",r.valign="middle",o.valign="middle",t.applyTheme(),t}return Object.defineProperty(e.prototype,"leftLabel",{get:function(){return this._leftLabel},set:function(t){this._leftLabel&&this.removeDispose(this._leftLabel),this._leftLabel=t,t&&(t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this._disposers.push(this._leftLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightLabel",{get:function(){return this._rightLabel},set:function(t){this._rightLabel&&this.removeDispose(this._rightLabel),this._rightLabel=t,t&&(t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this._disposers.push(this._rightLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"switch",{get:function(){return this._switchButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"switchButton",{get:function(){return this._switchButton},set:function(t){this._switchButton&&this.removeDispose(this._switchButton),this._switchButton=t,t&&(t.parent=this,t.shouldClone=!1,this._disposers.push(this._switchButton))},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),t.leftLabel&&this.leftLabel.copyFrom(t.leftLabel),t.rightLabel&&this.rightLabel.copyFrom(t.rightLabel),t.switchButton&&this.switchButton.copyFrom(t.switchButton)},e})(Q);w.registeredClasses.SwitchButton=yx;var vx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="Slider",t.thumb.opacity=0,t.thumb.interactionsEnabled=!1,t.endGrip.opacity=0,t.endGrip.interactionsEnabled=!1,t.startGrip.events.on("drag",function(){t.endGrip.x=t.startGrip.x,t.endGrip.y=t.startGrip.y}),t.applyTheme(),t}return Object.defineProperty(e.prototype,"__end",{get:function(){return this._start},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._start},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},set:function(t){this._isBusy||(this.__start=t)},enumerable:!0,configurable:!0}),e})(Za);w.registeredClasses.Slider=vx;var bx=(function(a){D(e,a);function e(){var t=a.call(this)||this;t.className="PlayButton",t.padding(12,12,12,12),t.showSystemTooltip=!0;var i=new ct,r=t.background;r.cornerRadius(25,25,25,25),r.fill=i.getFor("primaryButton"),r.stroke=i.getFor("primaryButtonStroke"),r.strokeOpacity=0,r.states.getKey("hover").properties.fill=i.getFor("primaryButtonHover"),r.states.getKey("down").properties.fill=i.getFor("primaryButtonActive");var s=new Fl;s.direction="right",s.width=9,s.height=11,s.marginLeft=1,s.marginRight=1,s.horizontalCenter="middle",s.verticalCenter="middle",s.stroke=i.getFor("primaryButtonText"),s.fill=s.stroke,t.icon=s;var o=new $i;o.width=11,o.height=11,o.horizontalCenter="middle",o.verticalCenter="middle",o.cornerRadius(0,0,0,0),o.stroke=i.getFor("primaryButtonText"),o.fill=s.stroke,t.togglable=!0;var n=t.states.create("active");return n.transitionDuration=0,n.properties.icon=o,t.defaultState.transitionDuration=0,t.applyTheme(),t}return e.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),C(this.readerTitle)||(this.readerTitle=this.language.translate("Play"))},e})(rr);w.registeredClasses.PlayButton=bx;var xx=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="RadialGradientModifier",t.gradient=new $r,t.applyTheme(),t}return e.prototype.copyFrom=function(t){a.prototype.copyFrom.call(this,t),this.gradient=t.gradient.clone()},e})(Qh);w.registeredClasses.RadialGradientModifier=xx;var $d=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.properties.radius=2,t._circle=t.paper.add("circle"),t.addElement(t._circle),t.shapeRendering="auto",t}return e.prototype.draw=function(){a.prototype.draw.call(this),this._circle&&this._circle.attr({r:this.radius,cx:this.width/2,cy:this.height/2})},Object.defineProperty(e.prototype,"radius",{get:function(){return this.properties.radius},set:function(t){this.properties.radius=t,this.draw()},enumerable:!0,configurable:!0}),e})(Ps);w.registeredClasses.CirclePattern=$d;var _x=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="ColorizeFilter",t.feColorMatrix=t.paper.add("feColorMatrix"),t.feColorMatrix.attr({type:"matrix"}),t.filterPrimitives.push(t.feColorMatrix),t.intensity=1,t.applyTheme(),t}return e.prototype.applyFilter=function(){var t=this.intensity,i=1-t,r,s,o,n=this.color;n&&n.rgb?(r=n.rgb.r/255*t,s=n.rgb.g/255*t,o=n.rgb.b/255*t):(r=0,s=0,o=0),this.feColorMatrix.attr({values:i+" 0 0 0 "+r+" 0 "+i+" 0 0 "+s+" 0 0 "+i+" 0 "+o+" 0 0 0 1 0"})},Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.properties.color=t,this.applyFilter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intensity",{get:function(){return this.properties.intensity},set:function(t){this.properties.intensity=t,this.applyFilter()},enumerable:!0,configurable:!0}),e})(Br);w.registeredClasses.ColorizeFilter=_x;var Px=(function(a){D(e,a);function e(){var t=a.call(this)||this;return t.className="BlurFilter",t.feGaussianBlur=t.paper.add("feGaussianBlur"),t.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),t.filterPrimitives.push(t.feGaussianBlur),t.width=200,t.height=200,t.blur=1.5,t.applyTheme(),t}return Object.defineProperty(e.prototype,"blur",{get:function(){return this.properties.blur},set:function(t){this.properties.blur=t,this.feGaussianBlur.attr({stdDeviation:t/this.scale})},enumerable:!0,configurable:!0}),e})(Br);w.registeredClasses.BlurFilter=Px;var $x=(function(a){D(e,a);function e(){var t=a.call(this)||this;t._list=[],t._currentStep=0,t._startIndex=0,t._currentPass=0,t.baseColor=new Dt({r:103,g:183,b:220}),t.className="PatternSet";var i=new ct;return t.list=[t.getLinePattern(1e3,45,1,6),t.getRectPattern(10,0,4),t.getLinePattern(1e3,-45,1,6),t.getCirclePattern(11,2,!0),t.getLinePattern(6,90,1),t.getRectPattern(12,45,6,!0),t.getLinePattern(6,0,1),t.getRectPattern(7,0,4),t.getLinePattern(1e3,45,2,3,"4,2"),t.getCirclePattern(9,3,!1),t.getLinePattern(1e3,-45,2,3,"4,2"),t.getRectPattern(10,45,Math.sqrt(50)),t.getLinePattern(1e3,-45,2,1),t.getRectPattern(10,0,9),t.getLinePattern(1e3,45,2,1),t.getLinePattern(1e3,0,3,1),t.getRectPattern(10,45,10),t.getLinePattern(1e3,90,3,1)],t.baseColor=i.getFor("stroke"),t.applyTheme(),t}return e.prototype.getLinePattern=function(t,i,r,s,o){var n=new Ml;return n.width=t,n.height=t,n.stroke=this.baseColor,n.gap=s,n.strokeDasharray=o,n.strokeWidth=r,n.rotation=i,n},e.prototype.getRectPattern=function(t,i,r,s){var o=new Rl;return o.width=t,o.height=t,o.rectWidth=r,o.rectHeight=r,s?(o.stroke=this.baseColor,o.strokeWidth=1,o.fillOpacity=0):(o.fill=this.baseColor,o.strokeWidth=0),i!=0&&(o.shapeRendering="auto"),o.rotation=i,o},e.prototype.getCirclePattern=function(t,i,r){var s=new $d;return s.width=t,s.height=t,s.shapeRendering="auto",s.radius=i,r?(s.stroke=this.baseColor,s.strokeWidth=1,s.fillOpacity=0):(s.fill=this.baseColor,s.strokeWidth=0),s},Object.defineProperty(e.prototype,"list",{get:function(){return this._list},set:function(t){this._list=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.next=function(){var t=this.getIndex(this.currentStep);return this._currentStep++,t},e.prototype.getIndex=function(t){for(var i;this.list.length<=t;)this.generatePatterns();return i=this.list[t],i.clone()},e.prototype.generatePatterns=function(){var t=this.list.length/(this._currentPass+1);this._currentPass++;for(var i=0;i<t;i++)this.list.push(this.list[i].clone())},e.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(e.prototype,"currentStep",{get:function(){return this._currentStep},set:function(t){this._currentStep=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startIndex",{get:function(){return this._startIndex},set:function(t){this._startIndex=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(t){a.prototype.processConfig.call(this,t)},e})(we);w.registeredClasses.PatternSet=$x;var n$=(function(){function a(){this._disposed=!1,this._disposers=[]}return a.prototype.init=function(){},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var e=this._disposers;for(this._disposers=null;e.length!==0;){var t=e.shift();t.dispose()}}},a})();var St=class a{constructor(e){this._value=e}get value(){return this._value/100}get percent(){return this._value}toString(){return""+this._value+"%"}interpolate(e,t){return e+this.value*(t-e)}static normalize(e,t,i){return e instanceof a?e:t===i?new a(0):new a(Math.min(Math.max((e-t)*(1/(i-t)),0),1)*100)}};function Jt(a){return new St(a)}var gi=Jt(0),X=Jt(100),pt=Jt(50);function Xm(a){return a instanceof St}var Ym=class{constructor(){this.version="5.17.2",this.licenses=[],this.entitiesById={},this.rootElements=[],this.autoDispose=!1}},Xr=new Ym;function l$(a){Xr.licenses.push(a)}function Yi(a){return Number(a)!==a}function h$(a){return{}.toString.call(a)}function zi(a){if(a!=null&&!M(a)){let e=Number(a);if(Yi(e)&&Us(a)&&a!=""&&a.match(/[0-9]+/)){let t=a.replace(/[^0-9.\-]+/g,"");return a===t?e:zi(t)}return e}return a}function Cx(a){if(wd(a))return new Date(a);if(M(a))return new Date(a);{let e=Number(a);return M(e)?new Date(e):new Date(a)}}function Sx(a){if(Yi(a))return"NaN";if(a===1/0)return"Infinity";if(a===-1/0)return"-Infinity";if(a===0&&1/a===-1/0)return"-0";let e=a<0;a=Math.abs(a);let t=/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+a),i=t[1],r=t[2]||"",s;if(t[3]===void 0)s=r===""?i:i+"."+r;else{let o=+t[3];if(a<1){let n=o-1;s="0."+wx("0",n)+i+r}else{let n=o-r.length;n===0?s=i+r:n<0?s=i+r.slice(0,n)+"."+r.slice(n):s=i+r+wx("0",n)}}return e?"-"+s:s}function wx(a,e){return new Array(e+1).join(a)}function wd(a){return h$(a)==="[object Date]"}function Us(a){return typeof a=="string"}function M(a){return typeof a=="number"&&Number(a)==a}function is(a){return typeof a=="object"&&a!==null}function Cd(a){return Array.isArray(a)}var rs="__\xA7\xA7\xA7__",no="__\xA7\xA7\xA7\xA7__";function Ks(a,e){let t=a.length;for(let i=0;i<t;++i)if(a[i]===e)return i;return-1}function Tx(a,e){let t=a.length;for(let i=0;i<t;++i)if(e(a[i]))return!0;return!1}function hu(a,e){let t=a.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=e(a[r],r);return i}function F(a,e){let t=a.length;for(let i=0;i<t;++i)e(a[i],i)}function lo(a,e){let t=a.length;for(;t>0;)--t,e(a[t],t)}function uu(a,e){let t=a.length;for(let i=0;i<t&&e(a[i],i);++i);}function li(a,e){let t=!1,i=0;for(;;){if(i=a.indexOf(e,i),i===-1)return t;t=!0,a.splice(i,1)}}function si(a,e){let t=a.indexOf(e);return t!==-1?(a.splice(t,1),!0):!1}function pu(a,e,t){let i=Ks(a,e);i!==-1&&Sd(a,i),t==null?a.push(e):cu(a,t,e)}function ho(a,e){a.indexOf(e)===-1&&a.push(e)}function du(a){let e=a.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=a[i];return t}function cu(a,e,t){a.splice(e,0,t)}function Sd(a,e){a.splice(e,1)}function zm(a,e){let t=a.length;for(let i=0;i<t;++i)if(e(a[i],i))return i;return-1}function u$(a,e){let t=a.length;for(;t>0;)if(--t,e(a[t],t))return t;return-1}function Td(a,e){let t=zm(a,e);if(t!==-1)return a[t]}function Dx(a,e){let t=u$(a,e);if(t!==-1)return a[t]}function fu(a,e){let t=0,i=a.length,r=!1;for(;t<i;){let s=t+i>>1,o=e(a[s]);if(o<0)t=s+1;else if(o===0){for(r=!0,t=s+1;t<i&&e(a[t])===0;t++);t--;break}else i=s}return{found:r,index:t}}function Dd(a,e){let t=0,i=a.length,r=!1;for(;t<i;){let s=t+i>>1,o=e(a[s]);o<0?t=s+1:(o===0&&(r=!0),i=s)}return{found:r,index:t}}function fn(a,e){let t=a.length;for(;t>0;)--t,e(a[t])||a.splice(t,1)}var uo=class{constructor(){this._disposed=!1}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},Be=class{constructor(e){this._disposed=!1,this._dispose=e}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},kd=class extends uo{constructor(){super(...arguments),this._disposers=[]}_dispose(){F(this._disposers,e=>{e.dispose()})}},qe=class extends uo{constructor(e){super(),this._disposers=e}_dispose(){F(this._disposers,e=>{e.dispose()})}get disposers(){return this._disposers}};var Il=class extends Be{constructor(){super(...arguments),this._counter=0}increment(){return++this._counter,new Be(()=>{--this._counter,this._counter===0&&this.dispose()})}};var Yr=class{constructor(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}isDisposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;let e=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{F(e,t=>{t.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}}hasListeners(){return this._listeners.length!==0}hasListenersByType(e){return Tx(this._listeners,t=>(t.type===null||t.type===e)&&!t.killed)}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(e){delete this._disabled[e]}disableType(e,t=1/0){this._disabled[e]=t}_removeListener(e){if(this._iterating===0){let t=this._listeners.indexOf(e);if(t===-1)throw new Error("Invalid state: could not remove listener");this._listeners.splice(t,1)}else this._killed.push(e)}_removeExistingListener(e,t,i,r){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(s=>{s.once===e&&s.type===t&&(i===void 0||s.callback===i)&&s.context===r&&s.disposer.dispose()})}isEnabled(e){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(e)&&this._disabled[e]===void 0}removeType(e){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(t=>{t.type===e&&t.disposer.dispose()})}has(e,t,i){return zm(this._listeners,s=>s.once!==!0&&s.type===e&&(t===void 0||s.callback===t)&&s.context===i)!==-1}_shouldDispatch(e){if(this._disposed)throw new Error("EventDispatcher is disposed");let t=this._disabled[e];return M(t)?(t<=1?delete this._disabled[e]:--this._disabled[e],!1):this._enabled}_eachListener(e){++this._iterating;try{F(this._listeners,e)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(F(this._killed,t=>{this._removeListener(t)}),this._killed.length=0)}}dispatch(e,t){this._shouldDispatch(e)&&this._eachListener(i=>{!i.killed&&(i.type===null||i.type===e)&&(i._debounceDelay?(i._debounceTimeout&&window.clearTimeout(i._debounceTimeout),i._debounceTimeout=window.setTimeout(()=>{i._debounceTimeout=void 0,i.killed||i.dispatch(e,t)},i._debounceDelay)):i.dispatch(e,t))})}_on(e,t,i,r,s,o,n){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(e,t,i,r);let l={type:t,callback:i,context:r,shouldClone:s,dispatch:o,killed:!1,once:e,disposer:new Be(()=>{l.killed=!0,l._debounceTimeout&&window.clearTimeout(l._debounceTimeout),this._removeListener(l)}),_debounceDelay:n};return this._listeners.push(l),l}onAll(e,t,i=!0){return this._on(!1,null,e,t,i,(r,s)=>e.call(t,s)).disposer}on(e,t,i,r=!0){return this._on(!1,e,t,i,r,(s,o)=>t.call(i,o)).disposer}onDebounced(e,t,i,r,s=!0){return this._on(!1,e,t,r,s,(o,n)=>t.call(r,n),i).disposer}once(e,t,i,r=!0){let s=this._on(!0,e,t,i,r,(o,n)=>{s.disposer.dispose(),t.call(i,n)});return s.disposer}off(e,t,i){this._removeExistingListener(!1,e,t,i)}copyFrom(e){if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");let t=[];return F(e._listeners,i=>{!i.killed&&i.shouldClone&&(i.type===null?t.push(this.onAll(i.callback,i.context)):i.once?t.push(this.once(i.type,i.callback,i.context)):t.push(this.on(i.type,i.callback,i.context)))}),new qe(t)}};function wi(a){return Object.keys(a)}function zr(a){return Object.entries(a)}function Wm(a,e){return wi(a).sort(e)}function ss(a){return Object.assign({},a)}function Vt(a,e){wi(a).forEach(t=>{e(t,a[t])})}function kx(a,e){for(let t in a)if(p$(a,t)&&!e(t,a[t]))break}function Pa(a,e,t){F(Wm(a,t),i=>{e(i,a[i])})}function p$(a,e){return{}.hasOwnProperty.call(a,e)}function Gm(a){Vt(a,(e,t)=>{is(t)&&typeof t.dispose=="function"&&(t.enableDispose=!0,t.dispose())})}var Um=class{constructor(e,t,i){this._name=e,this._template=t,this._settings=i}_dispose(){Gm(this._settings)}get(e,t){let i=this._settings[e];return i!==void 0?i:t}set(e,t){this._settings[e]=t,this._template._stateChanged(this._name)}remove(e){delete this._settings[e],this._template._stateChanged(this._name)}setAll(e){wi(e).forEach(t=>{this._settings[t]=e[t]}),this._template._stateChanged(this._name)}_apply(e,t){Vt(this._settings,(i,r)=>{!t[i]&&!e._userSettings[i]&&(t[i]=!0,e.setRaw(i,r))})}},Km=class{constructor(e){this._states={},this._template=e}_dispose(){Vt(this._states,(e,t)=>{t._dispose()})}lookup(e){return this._states[e]}create(e,t){let i=this._states[e];if(i)return i.setAll(t),i;{let r=new Um(e,this._template,t);return this._states[e]=r,this._template._stateChanged(e),r}}remove(e){delete this._states[e],this._template._stateChanged(e)}_apply(e,t){Vt(this._states,(i,r)=>{let s=t.states[i];s==null&&(s=t.states[i]={});let o=e.states.create(i,{});r._apply(o,s)})}},qm=class{constructor(){this._callbacks={}}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),new Be(()=>{si(i,t),i.length===0&&delete this._callbacks[e]})}remove(e){this._callbacks[e]!==void 0&&delete this._callbacks[e]}_apply(e){let t=[];return Vt(this._callbacks,(i,r)=>{F(r,s=>{t.push(e.adapters.add(i,s))})}),new qe(t)}},jt=class a{constructor(e,t){if(this._disposed=!1,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._entities=[],this.states=new Km(this),this.adapters=new qm,this.events=new Yr,!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=e}static new(e){return new a(e,!0)}_dispose(){Gm(this._settings),Gm(this._privateSettings)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}_checkDisposed(){if(this._disposed)throw new Error("Template is disposed")}get entities(){return this._entities}get(e,t){this._checkDisposed();let i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._checkDisposed(),this._settings[e]=t}set(e,t){this._checkDisposed(),this._settings[e]!==t&&(this.setRaw(e,t),this._entities.forEach(i=>{i._setTemplateProperty(this,e,t)}))}remove(e){this._checkDisposed(),e in this._settings&&(delete this._settings[e],this._entities.forEach(t=>{t._removeTemplateProperty(e)}))}removeAll(){this._checkDisposed(),Vt(this._settings,(e,t)=>{this.remove(e)})}getPrivate(e,t){this._checkDisposed();let i=this._privateSettings[e];return i!==void 0?i:t}setPrivateRaw(e,t){return this._checkDisposed(),this._privateSettings[e]=t,t}setPrivate(e,t){return this._checkDisposed(),this._privateSettings[e]!==t&&(this.setPrivateRaw(e,t),this._entities.forEach(i=>{i._setTemplatePrivateProperty(this,e,t)})),t}removePrivate(e){this._checkDisposed(),e in this._privateSettings&&(delete this._privateSettings[e],this._entities.forEach(t=>{t._removeTemplatePrivateProperty(e)}))}setAll(e){this._checkDisposed(),Vt(e,(t,i)=>{this.set(t,i)})}on(e,t){this._checkDisposed();let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new Be(()=>{si(i,t),i.length===0&&delete this._settingEvents[e]})}onPrivate(e,t){this._checkDisposed();let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new Be(()=>{si(i,t),i.length===0&&delete this._privateSettingEvents[e]})}_apply(e,t){this._checkDisposed();let i=[];return Vt(this._settingEvents,(r,s)=>{F(s,o=>{i.push(e.on(r,o))})}),Vt(this._privateSettingEvents,(r,s)=>{F(s,o=>{i.push(e.onPrivate(r,o))})}),this.states._apply(e,t),i.push(this.adapters._apply(e)),i.push(e.events.copyFrom(this.events)),new qe(i)}_setObjectTemplate(e){this._checkDisposed(),this._entities.push(e)}_removeObjectTemplate(e){li(this._entities,e)}_stateChanged(e){this._checkDisposed(),this._entities.forEach(t=>{t._applyStateByKey(e)})}};function Lx(a){a.parentNode&&a.parentNode.removeChild(a)}function je(a,e,t,i){return a.addEventListener(e,t,i||!1),new Be(()=>{a.removeEventListener(e,t,i||!1)})}function Od(a){return je(window,"resize",e=>{a()})}function as(a){switch(a){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function Ld(a){return a.pointerId||0}function Fx(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let a=document.createElement("button");a.style.position="fixed",a.style.top="0px",a.style.left="-10000px",document.body.appendChild(a),a.focus(),a.blur(),document.body.removeChild(a)}}function Mx(a){a&&a.focus()}function Fd(a){if(as("pointerevents"))return a;if(as("touchevents"))switch(a){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(as("mouseevents"))switch(a){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return a}function gu(a){if(typeof Touch<"u"&&a instanceof Touch)return!0;if(typeof PointerEvent<"u"&&a instanceof PointerEvent&&a.pointerType!=null)switch(a.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(a instanceof MouseEvent)}else if(a.type!=null&&a.type.match(/^mouse/))return!1;return!0}function yu(a,e,t){a.style[e]=t}function Rx(a,e){return a.style[e]}function Jm(a){if(a.composedPath){let e=a.composedPath();return e.length===0?null:e[0]}else return a.target}function d$(a,e){let t=e;for(;;){if(a===t)return!0;if(t.parentNode===null){if(t.host==null)return!1;t=t.host}else t=t.parentNode}}function Vl(a,e){return a.target&&d$(e.root.dom,a.target)}function co(a,e){e?a.style.pointerEvents="auto":a.style.pointerEvents="none"}function gn(a){if(a.key!==void 0)return a.key;switch(a.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+a.keyCode}function Qm(a){let e=a;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var Zm;function c$(a,e=""){if(a===null){if(Zm==null){let t=document.createElement("style");t.type="text/css",e!=""&&t.setAttribute("nonce",e),document.head.appendChild(t),Zm=t.sheet}return Zm}else{let t=document.createElement("style");return t.type="text/css",e!=""&&t.setAttribute("nonce",e),a.appendChild(t),t.sheet}}function Ax(a,e){let t=a.cssRules.length;return a.insertRule(e+"{}",t),a.cssRules[t]}var mu=class extends uo{constructor(e,t,i,r=""){super(),this._root=c$(e,r);try{this._rule=Ax(this._root,t)}catch{this._rule=Ax(this._root,":not(*)")}Vt(i,(s,o)=>{this.setStyle(s,o)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=Ks(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,t){let i=this._rule.style;i.setProperty("-webkit-"+e,t,""),i.setProperty("-moz-"+e,t,""),i.setProperty("-ms-"+e,t,""),i.setProperty("-o-"+e,t,""),i.setProperty(e,t,"")}setStyle(e,t){e==="transition"?this._setVendorPrefixName(e,t):this._rule.style.setProperty(e,t,"")}};function f$(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function Ix(){return f$()?1:void 0}function Ht(a,e){return M(a)?a:a!=null&&M(a.value)&&M(e)?e*a.value:0}function Md(a){let e=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function Ze(a,e=0,t="0"){return typeof a!="string"&&(a=a.toString()),e>a.length?Array(e-a.length+1).join(t)+a:a}function m$(a){return a.replace(/^[\s]*/,"")}function g$(a){return a.replace(/[\s]*$/,"")}function po(a){return m$(g$(a))}function Vx(a,e,t=!1,i="..."){if(a.length>e){let r=e-1;for(;r>=0&&a.charAt(r).match(/\w/);)r--;return r>=0&&t==!1?a.substring(0,r+1)+"...":a.substring(0,e)+i}else return a}function Ex(a){if(typeof a>"u")return"string";a=a.toLowerCase().replace(/^\[[^\]]*\]/,""),a=a.replace(/\[[^\]]+\]/,""),a=a.trim();let e=a.match(/\/(date|number|duration)$/);return e?e[1]:a==="number"?"number":a==="date"?"date":a==="duration"?"duration":a.match(/[#0]/)?"number":a.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function El(a){return a.replace(/\/(date|number|duration)$/i,"")}function tg(a){return a&&a.replace(/<[^>]*>/g,"")}function eg(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Nx(a){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,t=/([^اأدذرزو]*[اأدذرزو])/gi,i=a.split(/(\s+)/),r=[];return i.forEach(s=>{if(s.match(/^\s+$/))(s=" ")&&(s=" "),r.push(s);else if(e.test(s)){let o=s.split(t).filter(n=>n!=="");r=r.concat(o)}else r=r.concat([...s])}),r}function ig(a,e=!1){let t=new Date(a.getFullYear(),0,0),i=a.getTime()-t.getTime()+(t.getTimezoneOffset()-a.getTimezoneOffset())*60*1e3,r=1e3*60*60*24;return Math.floor(i/r)}function mn(a,e=!1){let t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7)}function Bx(a,e=!1){let t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;return t.setUTCDate(t.getUTCDate()+4-i),new Date(Date.UTC(t.getUTCFullYear(),0,1)).getFullYear()}function jx(a,e=!1){let t=mn(new Date(a.getFullYear(),a.getMonth(),1),e),i=mn(a,e);return i==1&&(i=53),i-t+1}function Hx(a,e,t=1,i=!1){let r=new Date(e,0,4,0,0,0,0);return i&&r.setUTCFullYear(e),a*7+t-((r.getDay()||7)+3)}function vu(a,e){return a>12?a-=12:a===0&&(a=12),e!=null?a+(e-1):a}function bu(a,e=!1,t=!1,i=!1,r){if(i)return e?"Coordinated Universal Time":"UTC";if(r){let n=a.toLocaleString("en-US",{timeZone:r}),l=a.toLocaleString("en-US",{timeZone:r,timeZoneName:e?"long":"short"});return po(l.substr(n.length))}let s=a.toLocaleString("UTC"),o=a.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(s.length);return t===!1&&(o=o.replace(/ (standard|daylight|summer|winter) /i," ")),po(o)}function Xx(a,e){let t=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),i=new Date(t.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(t.toLocaleString("en-US",{timeZone:a})).getTime()-i.getTime())/6e4*-1}function rg(a){return a.charAt(0).toUpperCase()+a.slice(1)}function sg(a){let e,t,i,r=a.h,s=a.s,o=a.l;if(s==0)e=t=i=o;else{let n=function(p,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?p+(d-p)*6*c:c<.5?d:c<.6666666666666666?p+(d-p)*(.6666666666666666-c)*6:p},l=o<.5?o*(1+s):o+s-o*s,h=2*o-l;e=n(h,l,r+1/3),t=n(h,l,r),i=n(h,l,r-1/3)}return{r:Math.round(e*255),g:Math.round(t*255),b:Math.round(i*255)}}function ag(a){let e=a.r/255,t=a.g/255,i=a.b/255,r=Math.max(e,t,i),s=Math.min(e,t,i),o=0,n=0,l=(r+s)/2;if(r===s)o=n=0;else{let h=r-s;switch(n=l>.5?h/(2-r-s):h/(r+s),r){case e:o=(t-i)/h+(t<i?6:0);break;case t:o=(i-e)/h+2;break;case i:o=(e-t)/h+4;break}o/=6}return{h:o,s:n,l}}function Yx(a,e){return a&&{r:Math.max(0,Math.min(255,a.r+Ad(a.r,e))),g:Math.max(0,Math.min(255,a.g+Ad(a.g,e))),b:Math.max(0,Math.min(255,a.b+Ad(a.b,e))),a:a.a}}function Ad(a,e){let t=e>0?255-a:a;return Math.round(t*e)}function zx(a,e){if(a){let t=Math.min(Math.max(a.r,a.g,a.b),230),i=Ad(t,e);return{r:Math.max(0,Math.min(255,Math.round(a.r+i))),g:Math.max(0,Math.min(255,Math.round(a.g+i))),b:Math.max(0,Math.min(255,Math.round(a.b+i))),a:a.a}}else return a}function Ox(a){return(a.r*299+a.g*587+a.b*114)/1e3>=128}function Wx(a,e){if(a===void 0||e==1)return a;let t=ag(a);return t.s=e,sg(t)}function Gx(a,e={r:255,g:255,b:255},t={r:255,g:255,b:255}){let i=e,r=t;return Ox(t)&&(i=t,r=e),Ox(a)?r:i}function xt(a,e){return a||(a=[]),[...a,...e].filter((t,i,r)=>r.indexOf(t)===i)}function Rd(a,e){return!(!e||a.left!=e.left||a.right!=e.right||a.top!=e.top||a.bottom!=e.bottom)}function Ux(a){return a[0]==="#"&&(a=a.substr(1)),a.length==3&&(a=a[0].repeat(2)+a[1].repeat(2)+a[2].repeat(2)),parseInt(a,16)}function y$(a){a=a.replace(/[ ]/g,"");let e=a.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=a.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let t="";for(let i=1;i<=3;i++){let r=parseInt(e[i]).toString(16);r.length==1&&(r="0"+r),t+=r}return Ux(t)}function Wi(a){return yt.fromAny(a)}var yt=class a{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+Ze(this.r.toString(16),2)+Ze(this.g.toString(16),2)+Ze(this.b.toString(16),2)}toHSL(e=1){return ag({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,t,i){let r=sg({h:e,s:t,l:i});return this.fromRGB(r.r,r.g,r.b)}toString(){return this.toCSSHex()}static fromHex(e){return new a(e)}static fromRGB(e,t,i){return new a((i|0)+(t<<8)+(e<<16))}static fromString(e){return new a(Ux(e))}static fromCSS(e){return new a(y$(e))}static fromAny(e){if(Us(e)){if(e[0]=="#")return a.fromString(e);if(e.substr(0,3)=="rgb")return a.fromCSS(e)}else{if(M(e))return a.fromHex(e);if(e instanceof a)return a.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,t,i){let r=Gx({r:e.r,g:e.g,b:e.b},t?{r:t.r,g:t.g,b:t.b}:void 0,i?{r:i.r,g:i.g,b:i.b}:void 0);return this.fromRGB(r.r,r.g,r.b)}static interpolate(e,t,i,r="rgb"){if(r=="hsl"){let s=t.toHSL(),o=i.toHSL();return a.fromHSL($a(e,s.h,o.h),$a(e,s.s,o.s),$a(e,s.l,o.l))}else return a.fromRGB($a(e,t.r,i.r),$a(e,t.g,i.g),$a(e,t.b,i.b))}static lighten(e,t){let i=Yx({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}static brighten(e,t){let i=zx({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}static saturate(e,t){let i=Wx({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}};function og(a){return ut(this,void 0,void 0,function*(){if(a!==void 0){let e=[];Vt(a,(t,i)=>{e.push(i.waitForStop())}),yield Promise.all(e)}})}function $a(a,e,t){return e+a*(t-e)}function v$(a,e,t){return a>=1?t:e}function ng(a,e,t){return new St($a(a,e.percent,t.percent))}function b$(a,e,t){return yt.interpolate(a,e,t)}function Kx(a,e){return typeof a=="number"&&typeof e=="number"?$a:a instanceof St&&e instanceof St?ng:a instanceof yt&&e instanceof yt?b$:v$}var wa;(function(a){a[a.Stopped=0]="Stopped",a[a.Playing=1]="Playing",a[a.Paused=2]="Paused"})(wa||(wa={}));var hg=Math.PI,JK=hg/2,Ge=hg/180,Or=180/hg;function Je(a,e,t){if(!M(e)||e<=0){let i=Math.round(a);return t&&i-a==.5&&i--,i}else{let i=Math.pow(10,e);return Math.round(a*i)/i}}function ug(a,e){if(!M(e)||e<=0)return Math.ceil(a);{let t=Math.pow(10,e);return Math.ceil(a*t)/t}}function Se(a,e,t){return Math.min(Math.max(a,e),t)}function de(a){return Math.sin(Ge*a)}function ge(a){return Math.cos(Ge*a)}function ar(a){return a=a%360,a<0&&(a+=360),a}function fo(a,e,t,i,r){let s=Number.MAX_VALUE,o=Number.MAX_VALUE,n=-Number.MAX_VALUE,l=-Number.MAX_VALUE,h=[];h.push(lg(r,t)),h.push(lg(r,i));let u=Math.min(Math.floor(t/90)*90,Math.floor(i/90)*90),p=Math.max(Math.ceil(t/90)*90,Math.ceil(i/90)*90);for(let d=u;d<=p;d+=90)d>=t&&d<=i&&h.push(lg(r,d));for(let d=0;d<h.length;d++){let c=h[d];c.x<s&&(s=c.x),c.y<o&&(o=c.y),c.x>n&&(n=c.x),c.y>l&&(l=c.y)}return{left:a+s,top:e+o,right:a+n,bottom:e+l}}function lg(a,e){return{x:a*ge(e),y:a*de(e)}}function Id(a){let e=a.length;if(e>0){let t=a[0],i=t.left,r=t.top,s=t.right,o=t.bottom;if(e>1)for(let n=1;n<e;n++)t=a[n],i=Math.min(t.left,i),s=Math.max(t.right,s),r=Math.min(t.top,r),o=Math.max(t.bottom,o);return{left:i,right:s,top:r,bottom:o}}return{left:0,right:0,top:0,bottom:0}}function pg(a,e,t){if(e>t){let o=e;e=t,t=o}a=ar(a);let i=(e-ar(e))/360;a<e&&(a+=360*(i+1));let r=e+(t-e)/2+180,s=e+(t-e)/2-180;return a>t&&(a-360>e?a-=360:a<r?a=t:a=e),a<e&&(a>s?a=e:a=t),a}function qx(a,e){return a.x>=e.left&&a.y>=e.top&&a.x<=e.right&&a.y<=e.bottom}function dg(a){return a}function ws(a){return a*a*a}function Ca(a){return function(e){return 1-a(1-e)}}var Zx=4/11,QK=6/11,t6=8/11,e6=3/4,i6=9/11,r6=10/11,s6=15/16,a6=21/22,o6=63/64,n6=1/Zx/Zx;var x$=2*Math.PI,_$=1,P$=.3/x$,l6=Math.asin(1/_$)*P$;var cg=class{constructor(e,t){this._userSettings={},this._entity=e,this._settings=t,Vt(t,i=>{this._userSettings[i]=!0})}get(e,t){let i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._settings[e]=t}set(e,t){this._userSettings[e]=!0,this.setRaw(e,t)}remove(e){delete this._userSettings[e],delete this._settings[e]}setAll(e){zr(e).forEach(([t,i])=>{this.set(t,i)})}_eachSetting(e){Vt(this._settings,e)}apply(){let e={};e.stateAnimationEasing=!0,e.stateAnimationDuration=!0;let t=this._entity.states.lookup("default");this._eachSetting((i,r)=>{e[i]||(e[i]=!0,this!==t&&(i in t._settings||(t._settings[i]=this._entity.get(i))),this._entity.set(i,r))})}applyAnimate(e){e==null&&(e=this._settings.stateAnimationDuration),e==null&&(e=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let t=this._settings.stateAnimationEasing;t==null&&(t=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",ws)));let i=this._entity.states.lookup("default"),r={};r.stateAnimationEasing=!0,r.stateAnimationDuration=!0;let s={};return this._eachSetting((o,n)=>{if(!r[o]){r[o]=!0,this!=i&&(o in i._settings||(i._settings[o]=this._entity.get(o)));let l=this._entity.animate({key:o,to:n,duration:e,easing:t});l&&(s[o]=l)}}),s}},Ed=class{constructor(e){this._states={},this._entity=e}lookup(e){return this._states[e]}create(e,t){let i=this._states[e];if(i)return i.setAll(t),i;{let r=new cg(this._entity,t);return this._states[e]=r,r}}remove(e){delete this._states[e]}apply(e){let t=this._states[e];t&&t.apply(),this._entity._applyState(e)}applyAnimate(e,t){let i,r=this._states[e];return r&&(i=r.applyAnimate(t)),this._entity._applyStateAnimated(e,t),i}};function Lr(a,e){return a===e?0:a<e?-1:1}function Nd(a,e,t){let i=a.length,r=e.length,s=Math.min(i,r);for(let o=0;o<s;++o){let n=t(a[o],e[o]);if(n!==0)return n}return Lr(i,r)}function fg(a,e){return a===e?0:a<e?-1:1}var mg=class{constructor(e){this._callbacks={},this._disabled={},this._entity=e}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),this._entity._markDirtyKey(e),new Be(()=>{si(i,t)&&this._entity._markDirtyKey(e)})}remove(e){let t=this._callbacks[e];t!==void 0&&(delete this._callbacks[e],t.length!==0&&this._entity._markDirtyKey(e))}enable(e){this._disabled[e]&&(delete this._disabled[e],this._entity._markDirtyKey(e))}disable(e){this._disabled[e]||(this._disabled[e]=!0,this._entity._markDirtyKey(e))}fold(e,t){if(!this._disabled[e]){let i=this._callbacks[e];if(i!==void 0)for(let r=0,s=i.length;r<s;++r)t=i[r](t,this._entity,e)}return t}},Nl=class{constructor(e,t,i,r,s,o,n){this._time=0,this._stopped=!1,this._playing=!0,this.events=new Yr,this._animation=e,this._from=t,this._to=i,this._duration=r,this._easing=s,this._loops=o,this._interpolate=Kx(t,i),this._oldTime=n}get to(){return this._to}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){!this._stopped&&!this._playing&&(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise((e,t)=>{if(this._stopped)e();else{let i=()=>{r.dispose(),e()},r=this.events.on("stopped",i)}})}_checkEnded(){return this._loops>1?(--this._loops,!1):!0}_run(e){this._oldTime!==null&&(this._time+=e-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=e}_reset(e){this._oldTime=e,this._time=0}_value(e){return e>=1?this._to:e<=0?this._from:this._interpolate(this._easing(e),this._from,this._to)}},$$=0,_u=class{constructor(e){this.uid=++$$,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._prevSettings={},this._prevPrivateSettings={},this._animatingSettings={},this._animatingPrivateSettings={},this._disposed=!1,this._userProperties={},this.enableDispose=!0,this._settings=e}_checkDirty(){wi(this._settings).forEach(e=>{this._userProperties[e]=!0,this._markDirtyKey(e)})}resetUserSettings(){this._userProperties={}}_runAnimation(e){let t=wa.Stopped;if(!this.isDisposed()){let i=!1,r=!1;Vt(this._animatingSettings,(s,o)=>{if(o.stopped)this._stopAnimation(s);else if(o.playing){o._run(e);let n=o.percentage;n>=1?o._checkEnded()?this.set(s,o._value(1)):(i=!0,o._reset(e),this._set(s,o._value(1))):(i=!0,this._set(s,o._value(n)))}else r=!0}),Vt(this._animatingPrivateSettings,(s,o)=>{if(o.stopped)this._stopAnimationPrivate(s);else if(o.playing){o._run(e);let n=o.percentage;n>=1?o._checkEnded()?this.setPrivate(s,o._value(1)):(i=!0,o._reset(e),this._setPrivate(s,o._value(1))):(i=!0,this._setPrivate(s,o._value(n)))}else r=!0}),i?t=wa.Playing:r&&(t=wa.Paused)}return t}_markDirtyKey(e){this.markDirty()}_markDirtyPrivateKey(e){this.markDirty()}on(e,t){let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new Be(()=>{si(i,t),i.length===0&&delete this._settingEvents[e]})}off(e,t){let i=this._settingEvents[e];i!==void 0&&t!==void 0?si(i,t):delete this._settingEvents[e]}onPrivate(e,t){let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new Be(()=>{si(i,t),i.length===0&&delete this._privateSettingEvents[e]})}offPrivate(e,t){let i=this._privateSettingEvents[e];i!==void 0&&t!==void 0?si(i,t):delete this._privateSettingEvents[e]}getRaw(e,t){let i=this._settings[e];return i!==void 0?i:t}has(e){return e in this._settings}get(e,t){return this.getRaw(e,t)}_sendKeyEvent(e,t){let i=this._settingEvents[e];i!==void 0&&F(i,r=>{r(t,this,e)})}_sendPrivateKeyEvent(e,t){let i=this._privateSettingEvents[e];i!==void 0&&F(i,r=>{r(t,this,e)})}_setRaw(e,t,i){this._prevSettings[e]=t,this._sendKeyEvent(e,i)}setRaw(e,t){let i=this._settings[e];this._settings[e]=t,i!==t&&this._setRaw(e,i,t)}_set(e,t){let i=this._settings[e];this._settings[e]=t,i!==t&&(this._setRaw(e,i,t),this._markDirtyKey(e))}_stopAnimation(e){let t=this._animatingSettings[e];t&&(delete this._animatingSettings[e],t.stop())}set(e,t){return this._set(e,t),this._stopAnimation(e),t}remove(e){e in this._settings&&(this._prevSettings[e]=this._settings[e],delete this._settings[e],this._sendKeyEvent(e,void 0),this._markDirtyKey(e)),this._stopAnimation(e)}removeAll(){F(wi(this._settings),e=>{this.remove(e)})}getPrivate(e,t){let i=this._privateSettings[e];return i!==void 0?i:t}_setPrivateRaw(e,t,i){this._prevPrivateSettings[e]=t,this._sendPrivateKeyEvent(e,i)}setPrivateRaw(e,t){let i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&this._setPrivateRaw(e,i,t)}_setPrivate(e,t){let i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&(this._setPrivateRaw(e,i,t),this._markDirtyPrivateKey(e))}_stopAnimationPrivate(e){let t=this._animatingPrivateSettings[e];t&&(t.stop(),delete this._animatingPrivateSettings[e])}setPrivate(e,t){return this._setPrivate(e,t),this._stopAnimationPrivate(e),t}removePrivate(e){e in this._privateSettings&&(this._prevPrivateSettings[e]=this._privateSettings[e],delete this._privateSettings[e],this._markDirtyPrivateKey(e)),this._stopAnimationPrivate(e)}setAll(e){Vt(e,(t,i)=>{this.set(t,i)})}animate(e){let t=e.key,i=e.to,r=e.duration||0,s=e.loops||1,o=e.from===void 0?this.get(t):e.from,n=e.easing===void 0?dg:e.easing;if(r===0)this.set(t,i);else if(o===void 0||o===i)this.set(t,i);else{this.set(t,o);let h=this._animatingSettings[t]=new Nl(this,o,i,r,n,s,this._animationTime());return this._startAnimation(),h}let l=new Nl(this,o,i,r,n,s,null);return l.stop(),l}animatePrivate(e){let t=e.key,i=e.to,r=e.duration||0,s=e.loops||1,o=e.from===void 0?this.getPrivate(t):e.from,n=e.easing===void 0?dg:e.easing;if(r===0)this.setPrivate(t,i);else if(o===void 0||o===i)this.setPrivate(t,i);else{this.setPrivate(t,o);let h=this._animatingPrivateSettings[t]=new Nl(this,o,i,r,n,s,this._animationTime());return this._startAnimation(),h}let l=new Nl(this,o,i,r,n,s,null);return l.stop(),l}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}},le=class extends _u{constructor(e,t,i,r=[]){if(super(t),this.states=new Ed(this),this.adapters=new mg(this),this.events=this._createEvents(),this._userPrivateProperties={},this._dirty={},this._dirtyPrivate={},this._templates=[],this._defaultThemes=[],this._templateDisposers=[],this._disposers=[],this._runSetup=!0,this._disposerProperties={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=e,this._internalTemplates=r,t.id&&this._registerId(t.id)}static new(e,t,i){let r=new this(e,t,!0);return r._template=i,r._afterNew(),r}static _new(e,t,i=[]){let r=new this(e,t,!0,i);return r._afterNew(),r}_afterNew(){this._checkDirty();let e=!1,t=this._template;t&&(e=!0,t._setObjectTemplate(this)),F(this._internalTemplates,i=>{e=!0,i._setObjectTemplate(this)}),e&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();let e=this._template;e&&e._setObjectTemplate(this),F(this._internalTemplates,t=>{t._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new Yr}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(e,t){let i=this.get(e);if(i)return i;{let r=t();return this.set(e,r),r}}_setDefault(e,t){this.has(e)||super.set(e,t)}_setRawDefault(e,t){this.has(e)||super.setRaw(e,t)}_clearDirty(){wi(this._dirty).forEach(e=>{this._dirty[e]=!1}),wi(this._dirtyPrivate).forEach(e=>{this._dirtyPrivate[e]=!1})}isDirty(e){return!!this._dirty[e]}isPrivateDirty(e){return!!this._dirtyPrivate[e]}_markDirtyKey(e){this._dirty[e]=!0,super._markDirtyKey(e)}_markDirtyPrivateKey(e){this._dirtyPrivate[e]=!0,super._markDirtyKey(e)}isType(e){return this.classNames.indexOf(e)!==-1}_pushPropertyDisposer(e,t){let i=this._disposerProperties[e];return i===void 0&&(i=this._disposerProperties[e]=[]),i.push(t),t}_disposeProperty(e){let t=this._disposerProperties[e];t!==void 0&&(F(t,i=>{i.dispose()}),delete this._disposerProperties[e])}set template(e){let t=this._template;t!==e&&(this._template=e,t&&t._removeObjectTemplate(this),e&&e._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(e){}_applyStateAnimated(e,t){}get(e,t){let i=this.adapters.fold(e,this._settings[e]);return i!==void 0?i:t}isUserSetting(e){return this._userProperties[e]||!1}set(e,t){return this._userProperties[e]=!0,super.set(e,t)}setRaw(e,t){this._userProperties[e]=!0,super.setRaw(e,t)}_setSoft(e,t){return this._userProperties[e]?t:super.set(e,t)}remove(e){delete this._userProperties[e],this._removeTemplateProperty(e)}setPrivate(e,t){return this._userPrivateProperties[e]=!0,super.setPrivate(e,t)}setPrivateRaw(e,t){this._userPrivateProperties[e]=!0,super.setPrivateRaw(e,t)}removePrivate(e){delete this._userPrivateProperties[e],this._removeTemplatePrivateProperty(e)}_setTemplateProperty(e,t,i){if(!this._userProperties[t]){let r=this._findTemplateByKey(t);e===r&&super.set(t,i)}}_setTemplatePrivateProperty(e,t,i){if(!this._userPrivateProperties[t]){let r=this._findTemplateByPrivateKey(t);e===r&&super.setPrivate(t,i)}}_removeTemplateProperty(e){if(!this._userProperties[e]){let t=this._findTemplateByKey(e);t?super.set(e,t._settings[e]):super.remove(e)}}_removeTemplatePrivateProperty(e){if(!this._userPrivateProperties[e]){let t=this._findTemplateByPrivateKey(e);t?super.setPrivate(e,t._privateSettings[e]):super.removePrivate(e)}}_walkParents(e){e(this._root._rootContainer),e(this)}_applyStateByKey(e){let t=this.states.create(e,{}),i={};this._eachTemplate(r=>{let s=r.states.lookup(e);s&&s._apply(t,i)}),Vt(t._settings,r=>{!i[r]&&!t._userSettings[r]&&t.remove(r)})}_applyTemplate(e,t){this._templateDisposers.push(e._apply(this,t)),Vt(e._settings,(i,r)=>{!t.settings[i]&&!this._userProperties[i]&&(t.settings[i]=!0,super.set(i,r))}),Vt(e._privateSettings,(i,r)=>{!t.privateSettings[i]&&!this._userPrivateProperties[i]&&(t.privateSettings[i]=!0,super.setPrivate(i,r))}),this._runSetup&&e.setup&&(this._runSetup=!1,e.setup(this))}_findStaticTemplate(e){if(this._template&&e(this._template))return this._template}_eachTemplate(e){this._findStaticTemplate(t=>(e(t),!1)),lo(this._internalTemplates,e),F(this._templates,e)}_applyTemplates(e=!0){e&&this._disposeTemplates();let t={settings:{},privateSettings:{},states:{}};this._eachTemplate(i=>{this._applyTemplate(i,t)}),e&&(Vt(this._settings,i=>{!this._userProperties[i]&&!t.settings[i]&&super.remove(i)}),Vt(this._privateSettings,i=>{!this._userPrivateProperties[i]&&!t.privateSettings[i]&&super.removePrivate(i)}))}_findTemplate(e){let t=this._findStaticTemplate(e);if(t===void 0){let i=Dx(this._internalTemplates,e);return i===void 0?Td(this._templates,e):i}else return t}_findTemplateByKey(e){return this._findTemplate(t=>e in t._settings)}_findTemplateByPrivateKey(e){return this._findTemplate(t=>e in t._privateSettings)}_disposeTemplates(){F(this._templateDisposers,e=>{e.dispose()}),this._templateDisposers.length=0}_removeTemplates(){F(this._templates,e=>{e._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(e=!1){if(this.get("ignoreThemes"))return!1;let t=!1,i=[],r=[],s=new Set,o=this.get("themeTagsSelf");return o&&F(o,n=>{s.add(n)}),this._walkParents(n=>{n===this._root._rootContainer&&(t=!0),n._defaultThemes.length>0&&i.push(n._defaultThemes);let l=n.get("themes");l&&r.push(l);let h=n.get("themeTags");h&&F(h,u=>{s.add(u)})}),r=i.concat(r),this._removeTemplates(),(t||e)&&lo(this.classNames,n=>{let l=[];F(r,h=>{F(h,u=>{let p=u._lookupRules(n);p&&lo(p,d=>{if(d.tags.every(f=>s.has(f))){let f=Dd(l,g=>{let m=Lr(d.tags.length,g.tags.length);return m===0?Nd(d.tags,g.tags,Lr):m});l.splice(f.index,0,d)}})})}),F(l,h=>{this._templates.push(h.template),h.template._setObjectTemplate(this)})}),this._applyTemplates(),(t||e)&&(this._runSetup=!1),t||e}_changed(){}_beforeChanged(){if(this.isDirty("id")){let e=this.get("id");e&&this._registerId(e);let t=this._prevSettings.id;t&&(delete this._root.entitiesById[t],delete Xr.entitiesById[t])}}_registerId(e){if(this._root.entitiesById[e]&&this._root.entitiesById[e]!==this)throw new Error('An entity with id "'+e+'" already exists.');this._root.entitiesById[e]=this,Xr.entitiesById[e]=this}_afterChanged(){}addDisposer(e){return this._disposers.push(e),e}_dispose(){super._dispose();let e=this._template;e&&e._removeObjectTemplate(this),F(this._internalTemplates,i=>{i._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEach(i=>{i.dispose()}),Vt(this._disposerProperties,(i,r)=>{F(r,s=>{s.dispose()})});let t=this.get("id");t&&(delete this._root.entitiesById[t],delete Xr.entitiesById[t])}setTimeout(e,t){let i=setTimeout(()=>{this.removeDispose(r),e()},t),r=new Be(()=>{clearTimeout(i)});return this._disposers.push(r),r}removeDispose(e){if(!this.isDisposed()){let t=Ks(this._disposers,e);t>-1&&this._disposers.splice(t,1)}e.dispose()}hasTag(e){return Ks(this.get("themeTags",[]),e)!==-1}addTag(e){if(!this.hasTag(e)){let t=this.get("themeTags",[]);t.push(e),this.set("themeTags",t)}}removeTag(e){if(this.hasTag(e)){let t=this.get("themeTags",[]);li(t,e),this.set("themeTags",t)}}_t(e,t,...i){return this._root.language.translate(e,t,...i)}get root(){return this._root}};le.className="Entity";le.classNames=["Entity"];var Fr=class extends le{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._backgroundDisplay=this._root._renderer.makeGraphics(),this._clear=!1}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fillOpacity"))&&(this._clear=!0),this._checkDirtyFill()}_checkDirtyFill(){(this.isDirty("color")||this.isDirty("fill"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("repetition",""),t=this.get("width",100),i=this.get("height",100),r=this.get("fill"),s=this.get("fillOpacity",1),o=this._backgroundDisplay,n=this._display;n.clear(),o.clear(),r&&s>0&&(o.beginFill(r,s),o.drawRect(0,0,t,i),o.endFill()),n.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(n,o,e,t,i)}this._clear=!1}};Fr.className="Pattern";Fr.classNames=le.classNames.concat([Fr.className]);var mo=class extends Fr{_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();let e=this.get("canvas");e&&(this.set("width",e.width),this.set("height",e.height))}_draw(){super._draw();let e=this.get("colorOpacity");e!==void 0&&(this._display.alpha=Math.max(0,e));let t=this._image;if(t){let r=this.get("width",100),s=this.get("height",100),o=this.get("fit","image"),n=0,l=0;o=="pattern"?(n=r,l=s,this.markDirty()):(n=t.width,l=t.height,o=="image"&&(this.set("width",n),this.set("height",l)));let h=this.get("centered",!0),u=0,p=0;h&&(u=r/2-n/2,p=s/2-l/2),this._display.image(t,n,l,u,p)}let i=this.get("canvas");i&&this._display.image(i,i.width,i.height,0,0)}_load(){let e=this.get("src");if(e){let t=new Image;t.src=e,t.decode().then(()=>{this._image=t,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(i=>{})}}};mo.className="PicturePattern";mo.classNames=Fr.classNames.concat([mo.className]);var Bd=class a extends Yr{constructor(e){super(),this._rendererDisposers={},this._dispatchParents=!0,this._sprite=e}_makePointerEvent(e,t){return{type:e,originalEvent:t.event,point:t.point,simulated:t.simulated,native:t.native,target:this._sprite}}_onRenderer(e,t){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[e];if(i===void 0){let r=this._sprite._display.on(e,s=>{t.call(this,s)});i=this._rendererDisposers[e]=new Il(()=>{delete this._rendererDisposers[e],r.dispose()})}return i.increment()}_on(e,t,i,r,s,o,n){let l=super._on(e,t,i,r,s,o,n),h=a.RENDERER_EVENTS[t];return h!==void 0&&(l.disposer=new qe([l.disposer,this._onRenderer(t,h)])),l}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(e,t){let i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(e,t),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(e,t)}finally{this._dispatchParents=i}}};Bd.RENDERER_EVENTS={click:function(a){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",a))&&this.dispatch("click",this._makePointerEvent("click",a))},rightclick:function(a){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",a))},middleclick:function(a){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",a))},dblclick:function(a){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",a))},pointerover:function(a){let e=this._sprite,t=!0;if(e.getPrivate("trustBounds")){e._getBounds();let i=e.globalBounds();if(e.isType("Graphics")){let r=e.get("strokeWidth",1)/2;r>=1&&(i.left-=r,i.right+=r,i.top-=r,i.bottom+=r)}qx(a.point,i)||(t=!1,e._root._renderer.removeHovering(e._display))}t&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",a))},pointerout:function(a){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",a))},pointerdown:function(a){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",a))},pointerup:function(a){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",a))},globalpointerup:function(a){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",a))},globalpointermove:function(a){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",a))},wheel:function(a){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:a.event,point:a.point})}};var yi=class extends le{constructor(){super(...arguments),this._adjustedLocalBounds={left:0,right:0,top:0,bottom:0},this._localBounds={left:0,right:0,top:0,bottom:0},this._sizeDirty=!1,this._isDragging=!1,this._isHidden=!1,this._isShowing=!1,this._isHiding=!1,this._isDown=!1,this._downPoints={}}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(e){this._markDirtyKey(e)}_markDirtyKey(e){super._markDirtyKey(e),(e=="x"||e=="y"||e=="dx"||e=="dy")&&(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(e){super._markDirtyPrivateKey(e),(e=="x"||e=="y")&&this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new Bd(this)}_processTemplateField(){let e,t=this.get("templateField");if(t){let i=this.dataItem;if(i){let r=i.dataContext;r&&(e=r[t],!(e instanceof jt)&&e&&(e=jt.new(e)))}}this._templateField!==e&&(this._removeTemplateField(),this._templateField=e,e&&e._setObjectTemplate(this),this._applyTemplates())}_setDataItem(e){let t=this._dataItem;this._dataItem=e,this._processTemplateField();let i="dataitemchanged";e!=t&&this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:t,newDataItem:e})}set dataItem(e){this._setDataItem(e)}get dataItem(){if(this._dataItem)return this._dataItem;{let e=this._parent;for(;e;){if(e._dataItem)return e._dataItem;e=e._parent}}}_addPercentageSizeChildren(){let e=this.parent;e&&(this.get("width")instanceof St||this.get("height")instanceof St?ho(e._percentageSizeChildren,this):si(e._percentageSizeChildren,this))}_addPercentagePositionChildren(){let e=this.parent;e&&(this.get("x")instanceof St||this.get("y")instanceof St?ho(e._percentagePositionChildren,this):si(e._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){let e=this._localBounds;if(e){let t=this.get("centerX");t!=null&&(this._display.pivot.x=e.left+Ht(t,e.right-e.left));let i=this.get("centerY");i!=null&&(this._display.pivot.y=e.top+Ht(i,e.bottom-e.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){let e=this._prevSettings.tooltip;e&&e.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){let e=this._tooltipMoveDp;e&&(e.dispose(),this._tooltipMoveDp=void 0);let t=this._tooltipPointerDp;t&&(t.dispose(),this._tooltipPointerDp=void 0),this.get("tooltipPosition")=="pointer"&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})),this._tooltipPointerDp=new qe([this.events.on("pointerover",()=>{this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})}),this.events.on("pointerout",()=>{let i=this._tooltipMoveDp;i&&(i.dispose(),this._tooltipMoveDp=void 0)})]))}}_handleStates(){this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this.set("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this.set("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!0)),this.markDirtyAccessibility())}_changed(){super._changed();let e=this._display,t=this.events;if(this.isDirty("draggable")){let r=this.get("draggable");r?(this.set("interactive",!0),this._dragDp=new qe([t.on("pointerdown",s=>{this.dragStart(s)}),t.on("globalpointermove",s=>{this.dragMove(s)}),t.on("globalpointerup",s=>{this.dragStop(s)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),e.cancelTouch=!!r}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){let r=this.get("tooltipText"),s=this.get("tooltipHTML"),o=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(r||s)&&(o=="click"?(this._tooltipDp=new qe([t.on("click",()=>{this.setTimeout(()=>{let n=this.getTooltip();n&&!n.isHidden()&&n.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),je(document,"click",n=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):o=="always"||(this._tooltipDp=new qe([t.on("pointerover",()=>{this.showTooltip()}),t.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let r=this.get("toggleKey");r&&r!="none"?this._toggleDp=t.on("click",()=>{this._isDragging||this.set(r,!this.get(r))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(e.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),e.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),e.scale=this.get("scale",0)),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(e.visible=!1,this.hideTooltip()):e.visible=!0,this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();let r=this.parent;r&&(this.isDirty("width")&&this.get("width")instanceof St||this.isDirty("height")&&this.get("height")instanceof St)&&(r.markDirty(),r._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight")||this.isDirty("marginLeft")||this.isDirty("marginTop")||this.isDirty("marginRight")||this.isDirty("marginBottom"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){let r=this.get("wheelable");r&&this.set("interactive",!0),e.wheelable=!!r}(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(e.filter=this.get("filter"));let i=this.get("filter","");if(this.isDirty("blur")){let r=this.get("blur",0);r!=0&&(i+=" blur("+r+"px)")}if(this.isDirty("saturate")){let r=this.get("saturate",1);r!=1&&(i+=" saturate("+r+")")}if(this.isDirty("brightness")){let r=this.get("brightness",1);r!=1&&(i+=" brightness("+r+")")}if(this.isDirty("contrast")){let r=this.get("contrast",1);r!=1&&(i+=" contrast("+r+")")}if(this.isDirty("sepia")){let r=this.get("sepia",0);r!=0&&(i+=" sepia("+r+")")}if(this.isDirty("hue")){let r=this.get("hue",0);r!=0&&(i+=" hue-rotate("+r+"deg)")}if(this.isDirty("invert")){let r=this.get("invert",0);r!=0&&(i+=" invert("+r+")")}if(i&&(e.filter=i),this.isDirty("cursorOverStyle")&&(e.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new qe([t.on("focus",()=>{this.showTooltip()}),t.on("blur",()=>{this.hideTooltip()})]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility(),this._disposers.push(t.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(t.once("boundschanged",()=>{this.markDirtyAccessibility()}))),this.isPrivateDirty("focusable")&&this.markDirtyAccessibility(),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControls"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(e.exportable=this.get("exportable")),this.isDirty("interactive")){let r=this.events;this.get("interactive")&&!r.isDisposed()?this._hoverDp=new qe([r.on("click",s=>{gu(s.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout(()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:s.target,originalEvent:s.originalEvent,point:s.point,simulated:s.simulated})},10))}),r.on("globalpointerup",s=>{gu(s.originalEvent)&&this.getPrivate("touchHovering")&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip(),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:s.target,originalEvent:s.originalEvent,point:s.point,simulated:s.simulated})),this._isDown&&this._handleUp(s)}),r.on("pointerover",()=>{this._handleOver()}),r.on("pointerout",()=>{this._handleOut()}),r.on("pointerdown",s=>{this._handleDown(s)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),this.get("showTooltipOn")=="always"&&this._display.visible&&this.showTooltip()}dragStart(e){this._dragEvent=e,this.events.stopParentDispatch()}dragStop(e){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;let t="dragstop";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(e){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;let t=Ld(e.originalEvent);delete this._downPoints[t],wi(this._downPoints).length==0&&(this._isDown=!1)}}_hasMoved(e){let t=Ld(e.originalEvent),i=this._downPoints[t];if(i){let r=Math.abs(i.x-e.point.x),s=Math.abs(i.y-e.point.y);return r>5||s>5}return!1}_hasDown(){return wi(this._downPoints).length>0}_handleDown(e){let t=this.parent;if(t&&!this.get("draggable")&&t._handleDown(e),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:e.point.x,y:e.point.y},this._isDown=!0;let i=Ld(e.originalEvent);this._downPoints[i]={x:e.point.x,y:e.point.y}}}dragMove(e){let t=this._dragEvent;if(t){if(t.simulated&&!e.simulated)return!0;let i=0,r=this.parent,s=1;for(;r!=null;)i+=r.get("rotation",0),r=r.parent,r&&(s*=r.get("scale",1));let o=(e.point.x-t.point.x)/s,n=(e.point.y-t.point.y)/s,l=this.events;if(t.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};let h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}if(this._isDragging){let h=this._dragPoint;this.set("x",h.x+o*ge(i)+n*de(i)),this.set("y",h.y+n*ge(i)-o*de(i));let u="dragged";l.isEnabled(u)&&l.dispatch(u,{type:u,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}else if(Math.hypot(o,n)>5){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};let h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let e=this.parent,t=0;for(;;)if(e)++t,e=e.parent;else return t}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){let e=this._display;if(this.get("isMeasured")){this._root._addDirtyBounds(this),e.isMeasured=!0,e.invalidateBounds();let t=this.parent;t&&this.get("position")!="absolute"&&(t.get("width")==null||t.get("height")==null||t.get("layout"))&&t.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){let e=this._adjustedLocalBounds,t;if(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(t={left:0,right:0,top:0,bottom:0},this._localBounds=t,this._adjustedLocalBounds=t):(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),t=this._adjustedLocalBounds),!e||e.left!==t.left||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom){let i="boundschanged";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip()}}_fixMinBounds(e){let t=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));M(t)&&e.right-e.left<t&&(e.right=e.left+t),M(i)&&e.bottom-e.top<i&&(e.bottom=e.top+i);let r=this.getPrivate("width"),s=this.getPrivate("height");M(r)&&(r>0?e.right=e.left+r:e.left=e.right+r),M(s)&&(s>0?e.bottom=e.top+s:e.top=e.bottom+s)}_removeParent(e){e&&(e.children.removeValue(this),si(e._percentageSizeChildren,this),si(e._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(e){if(!this.isDisposed()){let t=this.getTooltip(),i=this.get("tooltipText"),r=this.get("tooltipHTML");if((i||r)&&t){let s=this.get("tooltipPosition"),o=this.getPrivate("tooltipTarget",this);if((s=="fixed"||!e)&&(this._display._setMatrix(),e=this.toGlobal(o._getTooltipPoint())),s=="pointer"){let h=this.getPrivate("lastTooltipCoords");if(h&&h.x==e.x&&h.y==e.y)return;this.setPrivate("lastTooltipCoords",e)}t.set("pointTo",e),t.set("tooltipTarget",o),t.get("x")||t.set("x",e.x),t.get("y")||t.set("y",e.y),i&&t.label.set("text",i),r&&t.label.set("html",r);let n=this.dataItem;if(n&&t.label._setDataItem(n),this.get("showTooltipOn")=="always"&&(e.x<0||e.x>this._root.width()||e.y<0||e.y>this._root.height())){this.hideTooltip();return}t.label.text.markDirtyText();let l=t.show();return this.setPrivateRaw("showingTooltip",!0),l}}}hideTooltip(){let e=this.getTooltip();if(e&&(this.removePrivate("lastTooltipCoords"),e.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==e)){let t=e.get("keepTargetHover")&&e.get("stateAnimationDuration",0)==0?400:void 0,i=e.hide(t);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){let e=this._localBounds;if(e){let t=0,i=0;return this.get("isMeasured")?(t=e.left+Ht(this.get("tooltipX",0),e.right-e.left),i=e.top+Ht(this.get("tooltipY",0),e.bottom-e.top)):(t=Ht(this.get("tooltipX",0),this.width()),i=Ht(this.get("tooltipY",0),this.height())),{x:t,y:i}}return{x:0,y:0}}getTooltip(){let e=this.get("tooltip");if(e)return e;{let t=this.parent;if(t)return t.getTooltip()}}_updatePosition(){let e=this.parent,t=this.get("dx",0),i=this.get("dy",0),r=this.get("x"),s=this.getPrivate("x"),o=0,n=0,l=this.get("position");r instanceof St&&(e?r=e.innerWidth()*r.value+e.get("paddingLeft",0):r=0),M(r)?o=r+t:s!=null?o=s:e&&l=="relative"&&(o=e.get("paddingLeft",0)+t);let h=this.get("y"),u=this.getPrivate("y");h instanceof St&&(e?h=e.innerHeight()*h.value+e.get("paddingTop",0):h=0),M(h)?n=h+i:u!=null?n=u:e&&l=="relative"&&(n=e.get("paddingTop",0)+i);let p=this._display;if(p.x!=o||p.y!=n){p.invalidateBounds(),p.x=o,p.y=n;let d="positionchanged";this.events.isEnabled(d)&&this.events.dispatch(d,{type:d,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let e=this.get("x"),t=this.getPrivate("x"),i=this.parent;return i?e instanceof St?Ht(e,i.innerWidth())+i.get("paddingLeft",0):M(e)?e:t??i.get("paddingLeft",this._display.x):this._display.x}y(){let e=this.getPrivate("y");if(e!=null)return e;let t=this.get("y"),i=this.parent;return i?t instanceof St?Ht(t,i.innerHeight())+i.get("paddingTop",0):M(t)?t:e??i.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);let e=this.get("tooltip");e&&e.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){let e=this._adjustedLocalBounds,t=this.x(),i=this.y();return{left:e.left+t,right:e.right+t,top:e.top+i,bottom:e.bottom+i}}globalBounds(){let e=this.localBounds(),t=this.toGlobal({x:e.left,y:e.top}),i=this.toGlobal({x:e.right,y:e.top}),r=this.toGlobal({x:e.right,y:e.bottom}),s=this.toGlobal({x:e.left,y:e.bottom});return{left:Math.min(t.x,i.x,r.x,s.x),top:Math.min(t.y,i.y,r.y,s.y),right:Math.max(t.x,i.x,r.x,s.x),bottom:Math.max(t.y,i.y,r.y,s.y)}}_onShow(e){}_onHide(e){}appear(e,t){return ut(this,void 0,void 0,function*(){return yield this.hide(0),t?new Promise((i,r)=>{this.setTimeout(()=>{i(this.show(e))},t)}):this.show(e)})}show(e){return ut(this,void 0,void 0,function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this.set("visible",!0),this._onShow(e);let t=this.states.applyAnimate("default",e);yield og(t),this._isShowing=!1}})}hide(e){return ut(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let t=this.states.lookup("hidden");t||(t=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(e);let i=this.states.applyAnimate("hidden",e);yield og(i),this._isHiding=!1}})}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!!(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){let e=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*e:e}compositeScale(){let e=this.get("scale",1);return this._parent?this._parent.compositeScale()*e:e}compositeRotation(){let e=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+e:e}width(){let e=this.get("width"),t=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),r=this.getPrivate("width"),s=0;if(M(r))s=r;else if(e==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(e instanceof St){let o=this.parent;o?s=o.innerWidth()*e.value:s=this._root.width()*e.value}else M(e)&&(s=e);return M(i)&&(s=Math.max(i,s)),M(t)&&(s=Math.min(t,s)),s}maxWidth(){let e=this.get("maxWidth",this.getPrivate("maxWidth"));if(M(e))return e;{let i=this.get("width");if(M(i))return i}let t=this.parent;return t?t.innerWidth():this._root.width()}maxHeight(){let e=this.get("maxHeight",this.getPrivate("maxHeight"));if(M(e))return e;{let i=this.get("height");if(M(i))return i}let t=this.parent;return t?t.innerHeight():this._root.height()}height(){let e=this.get("height"),t=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),r=this.getPrivate("height"),s=0;if(M(r))s=r;else if(e==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(e instanceof St){let o=this.parent;o?s=o.innerHeight()*e.value:s=this._root.height()*e.value}else M(e)&&(s=e);return M(i)&&(s=Math.max(i,s)),M(t)&&(s=Math.min(t,s)),s}_findStaticTemplate(e){return this._templateField&&e(this._templateField)?this._templateField:super._findStaticTemplate(e)}_walkParents(e){(this._parent||this._virtualParent)&&this._walkParent(e)}_walkParent(e){this._parent?this._parent._walkParent(e):this._virtualParent&&this._virtualParent._walkParent(e),e(this)}set virtualParent(e){this._virtualParent!==e&&(this._virtualParent=e,this._applyThemes())}get parent(){return this._parent}_setParent(e,t=!1){let i=this._parent;e!==i&&(this.markDirtyBounds(),e.markDirty(),this._parent=e,t&&(this._removeParent(i),e&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(e){return this._display.toGlobal(e)}toLocal(e){return this._display.toLocal(e)}_getDownPoint(){let e=this._getDownPointId();if(e)return this._downPoints[e]}_getDownPointId(){if(this._downPoints)return Wm(this._downPoints,(e,t)=>e>t?1:e<t?-1:0)[0]}toFront(){let e=this.parent;e&&e.children.moveValue(this,e.children.length-1)}toBack(){let e=this.parent;e&&e.children.moveValue(this,0)}};yi.className="Sprite";yi.classNames=le.classNames.concat([yi.className]);var Bl;(function(a){a.ADD="lighter",a.COLOR="color",a.COLOR_BURN="color-burn",a.COLOR_DODGE="color-dodge",a.DARKEN="darken",a.DIFFERENCE="difference",a.DST_OVER="destination-over",a.EXCLUSION="exclusion",a.HARD_LIGHT="hard-light",a.HUE="hue",a.LIGHTEN="lighten",a.LUMINOSITY="luminosity",a.MULTIPLY="multiply",a.NORMAL="source-over",a.OVERLAY="overlay",a.SATURATION="saturation",a.SCREEN="screen",a.SOFT_LIGHT="soft-light",a.SRC_ATOP="source-atop",a.XOR="xor"})(Bl||(Bl={}));var Pu=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset","shadowBlur","shadowColor","shadowOpacity","shadowOffsetX","shadowOffsetY","blur","sepia","invert","brightness","hue","contrast","saturate"],kt=class extends yi{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._clear=!1}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("lineCap")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){let e=this.get("fillGradient");if(e){this._display.isMeasured=!0;let t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){let e=this.get("strokeGradient");if(e){this._display.isMeasured=!0;let t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let e=this.get("strokeDasharray");M(e)&&(e<.5?e=[0]:e=[e]),this._display.setLineDash(e);let t=this.get("strokeDashoffset");t&&this._display.setLineDashOffset(t);let i=this.get("blendMode",Bl.NORMAL);this._display.blendMode=i;let r=this.get("draw");r&&typeof r=="function"&&r(this._display,this);let s=this.get("svgPath");s!=null&&this._display.svgPath(s)}}_afterChanged(){if(super._afterChanged(),this._clear){let e=this.get("fill"),t=this.get("fillGradient"),i=this.get("fillPattern"),r=this.get("fillOpacity"),s=this.get("stroke"),o=this.get("strokeGradient"),n=this.get("strokePattern"),l=this.get("shadowColor"),h=this.get("shadowBlur"),u=this.get("shadowOffsetX"),p=this.get("shadowOffsetY"),d=this.get("shadowOpacity");if(l&&(h||u||p)&&this._display.shadow(l,h,u,p,d),e&&!t&&(this._display.beginFill(e,r),this._display.endFill()),t){if(e){let f=t.get("stops",[]);f.length&&F(f,g=>{(!g.color||g.colorInherited)&&e&&(g.color=e,g.colorInherited=!0),(g.opacity==null||g.opacityInherited)&&(g.opacity=r,g.opacityInherited=!0)})}let c=t.getFill(this);c&&(this._display.beginFill(c,r),this._display.endFill())}if(i){let c=i.pattern;c&&(this._display.beginFill(c,r),this._display.endFill(),i instanceof mo&&i.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(s||o||n){let c=this.get("strokeOpacity"),f=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(f=f/this.get("scale",1)),this.get("crisp")&&(f/=this._root._renderer.resolution);let g=this.get("lineJoin"),m=this.get("lineCap");if(s&&!o&&(this._display.lineStyle(f,s,c,g,m),this._display.endStroke()),o){let y=o.get("stops",[]);y.length&&F(y,x=>{(!x.color||x.colorInherited)&&s&&(x.color=s,x.colorInherited=!0),(x.opacity==null||x.opacityInherited)&&(x.opacity=c,x.opacityInherited=!0)});let v=o.getFill(this);v&&(this._display.lineStyle(f,v,c,g,m),this._display.endStroke())}if(n){let y=n.pattern;y&&(this._display.lineStyle(f,y,c,g,m),this._display.endStroke(),n instanceof mo&&n.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}};kt.className="Graphics";kt.classNames=yi.classNames.concat([kt.className]);var He=class extends kt{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_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 e=this.width(),t=this.height(),i=0,r=0,s=e/Math.abs(e),o=t/Math.abs(t);if(this.get("containStroke",!1)){let n=this.get("strokeWidth",0);e-=n*s,t-=n*o,i+=n/2*s,r+=n/2*o}this._display.drawRect(i,r,e,t)}_updateSize(){this.markDirty(),this._clear=!0}};He.className="Rectangle";He.classNames=kt.classNames.concat([He.className]);function $u(a,e){if(!(a>=0&&a<e))throw new Error("Index out of bounds: "+a)}var Wr=class{constructor(e=[]){this.events=new Yr,this._values=e}get values(){return this._values}contains(e){return this._values.indexOf(e)!==-1}removeValue(e){let t=0,i=this._values.length;for(;t<i;)this._values[t]===e?(this.removeIndex(t),--i):++t}indexOf(e){return Ks(this._values,e)}get length(){return this._values.length}hasIndex(e){return e>=0&&e<this._values.length}getIndex(e){return this._values[e]}_onPush(e){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:e})}_onInsertIndex(e,t){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:e,newValue:t})}_onSetIndex(e,t,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:e,oldValue:t,newValue:i})}_onSwap(e,t){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:e,b:t})}_onRemoveIndex(e,t){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:e,oldValue:t})}_onMoveIndex(e,t,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:e,newIndex:t,value:i})}_onClear(e){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:e})}setIndex(e,t){$u(e,this._values.length);let i=this._values[e];return i!==t&&(this._values[e]=t,this._onSetIndex(e,i,t)),i}insertIndex(e,t){return $u(e,this._values.length+1),cu(this._values,e,t),this._onInsertIndex(e,t),t}swap(e,t){let i=this._values.length;if($u(e,i),$u(t,i),e!==t){let r=this._values[e],s=this._values[t];this._values[e]=s,this._values[t]=r,this._onSwap(r,s)}}removeIndex(e){$u(e,this._values.length);let t=this._values[e];return Sd(this._values,e),this._onRemoveIndex(e,t),t}moveValue(e,t){let i=this.indexOf(e);if(i!==-1)if(Sd(this._values,i),t==null){let r=this._values.length;this._values.push(e),this._onMoveIndex(i,r,e)}else cu(this._values,t,e),this._onMoveIndex(i,t,e);else t==null?(this._values.push(e),this._onPush(e)):(cu(this._values,t,e),this._onInsertIndex(t,e));return e}push(e){return this._values.push(e),this._onPush(e),e}unshift(e){return this.insertIndex(0,e),e}pushAll(e){F(e,t=>{this.push(t)})}copyFrom(e){this.pushAll(e._values)}pop(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(e){let t=this._values;this._values=[],this._onClear(t),F(e,i=>{this._values.push(i),this._onPush(i)})}clear(){this.setAll([])}*[Symbol.iterator](){let e=this._values.length;for(let t=0;t<e;++t)yield this._values[t]}each(e){F(this._values,e)}eachReverse(e){lo(this._values,e)}},go=class extends Wr{constructor(){super(...arguments),this.autoDispose=!0,this._disposed=!1}swap(e,t){let i=this.autoDispose;this.autoDispose=!1,super.swap(e,t),this.autoDispose=i}_onSetIndex(e,t,i){this.autoDispose&&t.dispose(),super._onSetIndex(e,t,i)}_onRemoveIndex(e,t){this.autoDispose&&t.dispose(),super._onRemoveIndex(e,t)}_onClear(e){this.autoDispose&&F(e,t=>{t.dispose()}),super._onClear(e)}_dispose(){this.autoDispose&&F(this._values,e=>{e.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},be=class extends go{constructor(e,t){super(),this.template=e,this.make=t}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}};var jd=class extends Wr{constructor(e){super(),this._disposed=!1,this._container=e,this._events=this.events.onAll(t=>{if(t.type==="clear")F(t.oldValues,i=>{this._onRemoved(i)});else if(t.type==="push")this._onInserted(t.newValue);else if(t.type==="setIndex")this._onRemoved(t.oldValue),this._onInserted(t.newValue,t.index);else if(t.type==="insertIndex")this._onInserted(t.newValue,t.index);else if(t.type==="removeIndex")this._onRemoved(t.oldValue);else if(t.type==="moveIndex")this._onRemoved(t.value),this._onInserted(t.value,t.newIndex);else throw new Error("Unknown IListEvent type")})}_onInserted(e,t){e._setParent(this._container,!0);let i=this._container._childrenDisplay;t===void 0?i.addChild(e._display):i.addChildAt(e._display,t)}_onRemoved(e){this._container._childrenDisplay.removeChild(e._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),F(this.values,e=>{e.dispose()}))}};function os(a,e){a.get("reverseChildren",!1)?a.children.eachReverse(e):a.children.each(e)}var Mr=class extends le{};Mr.className="Layout";Mr.classNames=le.classNames.concat([Mr.className]);var qs=class extends Mr{updateContainer(e){let t=e.get("paddingLeft",0),i=e.innerWidth(),r=0;os(e,o=>{if(o.isVisible()&&o.get("position")=="relative"){let n=o.get("width");if(n instanceof St){r+=n.value;let l=i*n.value,h=o.get("minWidth",o.getPrivate("minWidth",-1/0));h>l&&(i-=h,r-=n.value);let u=o.get("maxWidth",o.getPrivate("maxWidth",1/0));l>u&&(i-=u,r-=n.value)}else M(n)||(n=o.width()),i-=n+o.get("marginLeft",0)+o.get("marginRight",0)}}),(i<=0||i==1/0)&&(i=.1),os(e,o=>{if(o.isVisible()&&o.get("position")=="relative"){let n=o.get("width");if(n instanceof St){let l=i*n.value/r-o.get("marginLeft",0)-o.get("marginRight",0),h=o.get("minWidth",o.getPrivate("minWidth",-1/0)),u=o.get("maxWidth",o.getPrivate("maxWidth",1/0));l=Math.min(Math.max(h,l),u),o.setPrivate("width",l)}else o._prevSettings.width instanceof St&&o.setPrivate("width",void 0)}});let s=t;os(e,o=>{if(o.get("position")=="relative")if(o.isVisible()){let n=o.adjustedLocalBounds(),l=o.get("marginLeft",0),h=o.get("marginRight",0),u=o.get("maxWidth"),p=n.left,d=n.right;u&&d-p>u&&(d=p+u);let c=s+l-p;o.setPrivate("x",c),s=c+d+h}else o.setPrivate("x",void 0)})}};qs.className="HorizontalLayout";qs.classNames=Mr.classNames.concat([qs.className]);var Zs=class extends Mr{updateContainer(e){let t=e.get("paddingTop",0),i=e.innerHeight(),r=0;os(e,o=>{if(o.isVisible()&&o.get("position")=="relative"){let n=o.get("height");if(n instanceof St){r+=n.value;let l=i*n.value,h=o.get("minHeight",o.getPrivate("minHeight",-1/0));h>l&&(i-=h,r-=n.value);let u=o.get("maxHeight",o.getPrivate("maxHeight",1/0));l>u&&(i-=u,r-=n.value)}else M(n)||(n=o.height()),i-=n+o.get("marginTop",0)+o.get("marginBottom",0)}}),(i<=0||i==1/0)&&(i=.1),os(e,o=>{if(o.isVisible()&&o.get("position")=="relative"){let n=o.get("height");if(n instanceof St){let l=i*n.value/r-o.get("marginTop",0)-o.get("marginBottom",0),h=o.get("minHeight",o.getPrivate("minHeight",-1/0)),u=o.get("maxHeight",o.getPrivate("maxHeight",1/0));l=Math.min(Math.max(h,l),u),o.setPrivate("height",l)}else o._prevSettings.height instanceof St&&o.setPrivate("height",void 0)}});let s=t;os(e,o=>{if(o.get("position")=="relative")if(o.isVisible()){let n=o.adjustedLocalBounds(),l=o.get("marginTop",0),h=n.top,u=n.bottom,p=o.get("maxHeight");p&&u-h>p&&(u=h+p);let d=o.get("marginBottom",0),c=s+l-h;o.setPrivate("y",c),s=c+u+d}else o.setPrivate("y",void 0)})}};Zs.className="VerticalLayout";Zs.classNames=Mr.classNames.concat([Zs.className]);var ns=class extends Mr{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(e){let t=e.get("paddingLeft",0),i=e.get("paddingRight",0),r=e.get("paddingTop",0),s=e.maxWidth()-t-i,o=s,n=1;os(e,f=>{if(f.get("visible")&&f.getPrivate("visible")&&!f.get("forceHidden")&&f.get("position")!="absolute"){let g=f.width();g<o&&(o=g),g>n&&(n=g)}}),o=Se(o,1,s),n=Se(n,1,s);let l=1;this.get("fixedWidthGrid")?l=s/n:l=s/o,l=Math.max(1,Math.floor(l)),l=Math.min(this.get("maxColumns",Number.MAX_VALUE),l);let h=this.getColumnWidths(e,l,n,s),u=r,p=0,d=0;l=h.length;let c=t;os(e,f=>{if(f.get("position")=="relative"&&f.isVisible()){let g=f.get("marginTop",0),m=f.get("marginBottom",0),y=f.adjustedLocalBounds(),v=f.get("marginLeft",0),x=f.get("marginRight",0),_=c+v-y.left,$=u+g-y.top;f.setPrivate("x",_),f.setPrivate("y",$),c+=h[p]+x,d=Math.max(d,f.height()+g+m),p++,p>=l&&(p=0,c=t,u+=d,d=0)}})}getColumnWidths(e,t,i,r){let s=0,o=[],n=0;return os(e,l=>{let h=l.adjustedLocalBounds();l.get("position")!="absolute"&&l.isVisible()&&(this.get("fixedWidthGrid")?o[n]=i:o[n]=Math.max(o[n]|0,h.right-h.left+l.get("marginLeft",0)+l.get("marginRight",0)),n<e.children.length-1&&(n++,n==t&&(n=0)))}),F(o,l=>{s+=l}),s>r?t>2?(t-=1,this.getColumnWidths(e,t,i,r)):[r]:o}};ns.className="GridLayout";ns.classNames=Mr.classNames.concat([ns.className]);var Bi=class{static escape(e){return e.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(e){return e.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(e){return e.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(e,t=!1,i=!1){let r=[];e=this.escape(e);let s=t?e.split("'"):[e];for(let o=0;o<s.length;o++){let n=s[o];if(n!=="")if(o%2===0){n=n.replace(/\]\[/g,"]"+rs+"["),n=n.replace(/\[\]/g,"[ ]");let l=n.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let u=this.cleanUp(this.unescape(l[h]));u!==rs&&u!==""&&(h%2===0?r.push({type:"value",text:u}):r.push({type:i?"value":"format",text:"["+u+"]"}))}}else{let l=n.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let u=this.cleanUp(this.unescape(l[h]));u!==""&&(h%2===0?r.push({type:"text",text:u}):this.isImage(u)?r.push({type:"image",text:"["+u+"]"}):r.push({type:"format",text:"["+u+"]"}))}}}return r}static isImage(e){return!!e.match(/img[ ]?:/)}static getTextStyle(e){let t={};if(e==""||e=="[ ]")return{};let i=e.match(/('[^']*')|("[^"]*")/gi);if(i)for(let s=0;s<i.length;s++)e=e.replace(i[s],i[s].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let r=e.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!r)return{};for(let s=0;s<r.length;s++)if(r[s].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))t.fontWeight=r[s];else if(r[s].match(/^(underline|line-through)$/i))t.textDecoration=r[s];else if(r[s]!="/")if(!r[s].match(/:/))t.fill=yt.fromString(r[s]);else{let o=r[s].replace("+"," ").split(/:[ ]*/);t[o[0]]=o[1]}return t}};Bi.prefix="__amcharts__";function Js(a,e){if(e!=null){e=""+e,e=Bi.escape(e);let t=e.match(/\{([^}]+)\}/g),i;if(t)for(i=0;i<t.length;i++){let r=t[i].replace(/\{([^}]+)\}/,"$1"),s=gg(a,r,"");s==null&&(s=""),e=e.split(t[i]).join(s)}e=Bi.unescape(e)}else e="";return e}function gg(a,e,t){let i,r=a.dataItem,s=[],o=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g,n;for(;n=o.exec(e),n!==null;)if(n[3]){s.push({prop:n[3]});let l=a.getDateFormatter().get("dateFields",[]),h=a.getNumberFormatter().get("numericFields",[]),u=a.getDurationFormatter().get("durationFields",[]);l.indexOf(n[3])!==-1?s.push({method:"formatDate",params:[]}):h.indexOf(n[3])!==-1?s.push({method:"formatNumber",params:[]}):u.indexOf(n[3])!==-1&&s.push({method:"formatDuration",params:[]})}else{let l=[];if(po(n[2])!=""){let h=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,u;for(;u=h.exec(n[2]),u!==null;)l.push(u[1]||u[2]||u[3])}s.push({method:n[1],params:l})}if(r){i=yn(a,s,r._settings),(i==null||is(i))&&(i=yn(a,s,r));let l=r.dataContext;i==null&&l&&(i=yn(a,s,l),i==null&&(i=yn(a,[{prop:e}],l)),i==null&&l.dataContext&&(i=yn(a,s,l.dataContext))),i==null&&r.component&&r.component.dataItem!==r&&(i=gg(r.component,e,t))}return i==null&&(i=yn(a,s,a)),i==null&&a.parent&&(i=gg(a.parent,e,t)),i}function w$(a,e){let t=a.getPrivate("customData");if(is(t))return t[e]}function yn(a,e,t,i){let r=t,s=!1;for(let o=0,n=e.length;o<n;o++){let l=e[o];if(l.prop){if(r instanceof yi){let h=r.get(l.prop);h==null&&(h=r.getPrivate(l.prop)),h==null&&(h=w$(r,l.prop)),h==null&&(h=r[l.prop]),r=h}else if(r.get){let h=r.get(l.prop);h==null&&(h=r[l.prop]),r=h}else r=r[l.prop];if(r==null)return}else switch(l.method){case"formatNumber":let h=zi(r);h!=null&&(r=a.getNumberFormatter().format(h,i||l.params[0]||void 0),s=!0);break;case"formatDate":let u=Cx(r);if(!wd(u)||Yi(u.getTime()))return;u!=null&&(r=a.getDateFormatter().format(u,i||l.params[0]||void 0),s=!0);break;case"formatDuration":let p=zi(r);p!=null&&(r=a.getDurationFormatter().format(p,i||l.params[0]||void 0,l.params[1]||void 0),s=!0);break;case"urlEncode":case"encodeURIComponent":r=encodeURIComponent(r);break;default:r[l.method]&&r[l.method].apply(t,l.params);break}}if(!s){let o=[{method:"",params:i}];if(i==null)M(r)?(o[0].method="formatNumber",o[0].params=""):wd(r)&&(o[0].method="formatDate",o[0].params="");else{let n=Ex(i);n==="number"?o[0].method="formatNumber":n==="date"?o[0].method="formatDate":n==="duration"&&(o[0].method="formatDuration")}o[0].method&&(r=yn(a,o,r))}return r}var ot=class a extends yi{constructor(){super(...arguments),this._display=this._root._renderer.makeContainer(),this._childrenDisplay=this._root._renderer.makeContainer(),this.children=new jd(this),this._percentageSizeChildren=[],this._percentagePositionChildren=[],this._prevWidth=0,this._prevHeight=0,this._contentWidth=0,this._contentHeight=0,this._childrenPrep=!1,this._childrenUpdt=!1}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){lo(this.allChildren(),e=>{e.dispose()}),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_beforeChanged(){this._childrenPrep||this._prepareChildren(),this._childrenUpdt||this._updateChildren(),super._beforeChanged()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each(e=>{e.removePrivate("x"),e.removePrivate("y")})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each(e=>{e.markDirtyPosition()}),this.isDirty("maskContent")){let e=this._childrenDisplay,t=this._contentMask;this.get("maskContent")?t||(t=He.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=t,e.addChildAt(t._display,0),e.mask=t._display):t&&(e.removeChild(t._display),e.mask=null,t.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),F(this._percentageSizeChildren,e=>{e._updateSize()}),F(this._percentagePositionChildren,e=>{e.markDirtyPosition(),e._updateSize()}),this.updateBackground()}updateBackground(){let e=this.get("background"),t=this._localBounds;if(t&&!this.isHidden()){let i=t.left,r=t.top,s=t.right-i,o=t.bottom-r,n=this.get("maxWidth"),l=this.get("maxHeight");l&&o>l&&(o=l),n&&s>n&&(s=n);let h=this.width(),u=this.height();e&&(e.setAll({width:s,height:o,x:i,y:r}),this._display.interactive&&(e._display.interactive=!0));let p=this._contentMask;p&&p.setAll({width:h+1,height:u+1});let d=this.get("verticalScrollbar");if(d){d.set("height",u),d.set("x",h-d.width()-d.get("marginRight",0)),d.set("end",d.get("start",0)+u/this._contentHeight);let c=d.get("background");c&&c.setAll({width:d.width(),height:u});let f=!0;this._contentHeight<=u&&(f=!1),d.setPrivate("visible",f)}}}_applyThemes(e=!1){return super._applyThemes(e)?(this.eachChildren(t=>{t._applyThemes(e)}),!0):!1}_applyState(e){super._applyState(e),this.get("setStateOnChildren")&&this.eachChildren(t=>{t.states.apply(e)})}_applyStateAnimated(e,t){super._applyStateAnimated(e,t),this.get("setStateOnChildren")&&this.eachChildren(i=>{i.states.applyAnimate(e,t)})}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){if(this.get("html")){let e=this._localBounds;e&&(this._contentWidth=e.right-e.left,this._contentHeight=e.bottom-e.top)}else{let e=this.get("width"),t=this.get("height"),i=this.getPrivate("width"),r=this.getPrivate("height"),s={left:0,top:0,right:this.width(),bottom:this.height()},o=this.get("layout"),n=!1,l=!1;if((o instanceof qs||o instanceof ns)&&(n=!0),o instanceof Zs&&(l=!0),!((e!=null||i!=null)&&(t!=null||r!=null)&&!this.get("verticalScrollbar"))){let h=Number.MAX_VALUE,u=h,p=-h,d=h,c=-h,f=this.get("paddingLeft",0),g=this.get("paddingTop",0),m=this.get("paddingRight",0),y=this.get("paddingBottom",0);this.children.each(_=>{if(_.get("position")!="absolute"&&_.get("isMeasured")){let $=_.adjustedLocalBounds(),T=_.x(),S=_.y(),k=T+$.left,A=T+$.right,L=S+$.top,O=S+$.bottom;n&&(k-=_.get("marginLeft",0),A+=_.get("marginRight",0)),l&&(L-=_.get("marginTop",0),O+=_.get("marginBottom",0)),k<u&&(u=k),A>p&&(p=A),L<d&&(d=L),O>c&&(c=O)}}),u==h&&(u=0),p==-h&&(p=0),d==h&&(d=0),c==-h&&(c=0),s.left=u-f,s.top=d-g,s.right=p+m,s.bottom=c+y;let v=this.get("minWidth");M(v)&&v>0&&s.right-s.left<v&&(s.right>=v?s.left=s.right-v:s.right=s.left+v);let x=this.get("minHeight");M(x)&&x>0&&s.bottom-s.top<x&&(s.bottom>=x?s.top=s.bottom-x:s.bottom=s.top+x)}this._contentWidth=s.right-s.left,this._contentHeight=s.bottom-s.top,M(e)&&(s.left=0,s.right=e),M(i)&&(s.left=0,s.right=i),M(t)&&(s.top=0,s.bottom=t),M(r)&&(s.top=0,s.bottom=r),this._localBounds=s}}_updateBounds(){let e=this.get("layout");e&&e.updateContainer(this),super._updateBounds(),this.updateBackground()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._childrenPrep=!0;let e=this.innerWidth(),t=this.innerHeight();if(e!=this._prevWidth||t!=this._prevHeight){let i=this.get("layout"),r=!1,s=!1;i&&((i instanceof qs||i instanceof ns)&&(r=!0),i instanceof Zs&&(s=!0)),F(this._percentageSizeChildren,o=>{if(!r){let n=o.get("width");n instanceof St&&o.setPrivate("width",n.value*e)}if(!s){let n=o.get("height");n instanceof St&&o.setPrivate("height",n.value*t)}}),F(this._percentagePositionChildren,o=>{o.markDirtyPosition(),o.markDirtyBounds()}),this._prevWidth=e,this._prevHeight=t,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){let e=this.get("html","");e&&e!==""?this._root._setHTMLContent(this,Js(this,e)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(e){let t=this.get("verticalScrollbar");if(t){let i=e.y(),r=this.innerHeight(),s=e.height(),o=this._contentHeight,n=1-(r-s/2)/o;if(i+s*.7+this._childrenDisplay.y>r||i-s*.3+this._childrenDisplay.y<0){let l=Math.max(0,Math.min(n,(i-s/2)/o));t.animate({key:"start",to:l,duration:t.get("animationDuration",0),easing:t.get("animationEasing")})}}}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){let e=this.get("verticalScrollbar");if(e){e._setParent(this),e.startGrip.setPrivate("visible",!1),e.endGrip.setPrivate("visible",!1),this.set("maskContent",!0),this.set("paddingRight",e.width()+e.get("marginRight",0)+e.get("marginLeft",0));let t=this.get("background");t||(t=this.set("background",He.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",i=>{let r=i.originalEvent;if(Vl(r,this))r.preventDefault();else return;let s=r.deltaY/5e3,o=e.get("start",0),n=e.get("end",1);o+s<=0&&(s=-o),n+s>=1&&(s=1-n),o+s>=0&&n+s<=1&&(e.set("start",o+s),e.set("end",n+s))}),this._disposers.push(this._vsbd0),this._vsbd1=e.events.on("rangechanged",()=>{let i=this._contentHeight,r=this._childrenDisplay,s=this._contentMask;r.y=-e.get("start",0)*i,r.markDirtyLayer(),s&&(s._display.y=-r.y,r.mask=s._display)}),this._disposers.push(this._vsbd1),this._display.addChild(e._display)}else{let t=this._prevSettings.verticalScrollbar;if(t){this._display.removeChild(t._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose();let i=this._childrenDisplay;i.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0)}}}if(this.isDirty("background")){let e=this._prevSettings.background;e&&this._display.removeChild(e._display);let t=this.get("background");t instanceof yi&&(t.set("isMeasured",!1),t._setParent(this),this._display.addChildAt(t._display,0))}if(this.isDirty("mask")){let e=this.get("mask"),t=this._prevSettings.mask;if(t&&(this._display.removeChild(t._display),t!=e&&t.dispose()),e){let i=e.parent;i&&i.children.removeValue(e),e._setParent(this),this._display.addChildAt(e._display,0),this._childrenDisplay.mask=e._display}}}_processTemplateField(){super._processTemplateField(),this.children.each(e=>{e._processTemplateField()})}walkChildren(e){this.children.each((t,i)=>{t instanceof a&&t.walkChildren(e),e(t,i)})}eachChildren(e){let t=this.get("background");t&&e(t);let i=this.get("verticalScrollbar");i&&e(i);let r=this.get("mask");r&&e(r),this.children.values.forEach(s=>{e(s)})}allChildren(){let e=[];return this.eachChildren(t=>{e.push(t)}),e}_setDataItem(e){let t=e!==this._dataItem;super._setDataItem(e);let i=this.get("html","");i&&i!==""&&t&&this._root._setHTMLContent(this,Js(this,i))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}};ot.className="Container";ot.classNames=yi.classNames.concat([ot.className]);var ls=class extends yi{constructor(){super(...arguments),this.textStyle=this._root._renderer.makeTextStyle(),this._display=this._root._renderer.makeText("",this.textStyle),this._textStyles=["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}_updateBounds(){if(this.get("text")){super._updateBounds();let e=this.get("fillGradient");e&&(this._display.style.fill=e.getFill(this))}else{let e={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=e}}_changed(){super._changed(),this._display.clear();let e=this.textStyle;if(this.isDirty("opacity")){let t=this.get("opacity",1);this._display.alpha=t}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),this.get("role")=="tooltip"&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")&&this.getPrivate("tooltipElement")&&this._disposers.push(new Be(()=>{this._root._removeTooltipElement(this)})),this.isDirty("width")&&(e.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(e.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(e.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(e.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(e.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(e.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){let t=this.get("fill"),i=this.get("fillGradient"),r=this.get("fillOpacity");if(i){if(t){let s=i.get("stops",[]);s.length&&F(s,o=>{(!o.color||o.colorInherited)&&t&&(o.color=t,o.colorInherited=!0),(o.opacity==null||o.opacityInherited)&&(o.opacity=r,o.opacityInherited=!0)})}e.fill=i.getFill(this)}else t&&(e.fill=t)}if(this.isDirty("fillOpacity")){let t=this.get("fillOpacity",1);t&&(e.fillOpacity=t)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(e.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(e.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),F(this._textStyles,t=>{this._dirty[t]&&(e[t]=this.get(t),this.markDirtyBounds())}),e.fontSize=this.get("fontSize"),e.fontFamily=this.get("fontFamily"),this._display.style=e,this.isDirty("role")&&this.get("role")=="tooltip"&&this._root.updateTooltip(this)}_getText(){let e=this.get("text","");return this.get("maxChars")&&(e=Vx(e,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?Js(this,e):e}_getAccessibleText(){let e=this.get("ariaLabel");return e!==void 0?this.get("populateText")?Js(this,e):e:this._getText()}markDirtyText(){this._display.text=this._getText(),this.get("role")=="tooltip"&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(e){super._setDataItem(e),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}};ls.className="Text";ls.classNames=yi.classNames.concat([ls.className]);var Qt=class extends ot{constructor(){super(...arguments),this._textKeys=["text","fill","fillGradient","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting","maxChars","ariaLabel"]}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),F(this._textKeys,e=>{let t=this.get(e);t!=null&&this._text.set(e,t)}),this.get("html","")!==""&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(ls.new(this._root,{}))}_updateChildren(){super._updateChildren();let e=this._text;if(F(this._textKeys,i=>{this._text.set(i,this.get(i))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation"))&&this._setMaxDimentions(),this.get("html","")!==""?e.set("text",""):(e.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor(),this.isDirty("textAlign")||this.isDirty("width")){let i=this.get("textAlign"),r;this.get("width")!=null?i=="right"?r=X:i=="center"?r=pt:r=0:i=="left"||i=="start"?r=this.get("paddingLeft",0):(i=="right"||i=="end")&&(r=-this.get("paddingRight",0)),e.set("x",r)}let t=this.get("background");t&&t.setPrivate("visible",e._display.textVisible)}_maybeUpdateHTMLColor(){let e=this.getPrivate("htmlElement");e&&this.get("fill")&&(e.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){let e=this.get("rotation"),t=e==90||e==270||e==-90,i=this._text,r=this.get("maxWidth",this.getPrivate("maxWidth",1/0));M(r)?i.set(t?"maxHeight":"maxWidth",r-this.get("paddingTop",0)-this.get("paddingBottom",0)):i.set(t?"maxHeight":"maxWidth",void 0);let s=this.get("maxHeight",this.getPrivate("maxHeight",1/0));M(s)?i.set(t?"maxWidth":"maxHeight",s-this.get("paddingLeft",0)-this.get("paddingRight",0)):i.set(t?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{i.markDirtyBounds()})}_setDataItem(e){super._setDataItem(e),this._markDirtyKey("text"),this._markDirtyKey("html");let t=this._text;t.get("populateText")&&t.markDirtyText();let i=this.get("html");i&&i!==""&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}};Qt.className="Label";Qt.classNames=ot.classNames.concat([Qt.className]);var Sa=class extends kt{_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 e=this.width(),t=this.height();if(e>0&&t>0){let i=this.get("cornerRadius",8);i=Se(i,0,Math.min(e/2,t/2));let r=this.get("pointerX",0),s=this.get("pointerY",0),o=this.get("pointerBaseWidth",15)/2,n=0,l=0,h=e,u=0,p=e,d=t,c=0,f=t,g=(r-n)*(d-l)-(s-l)*(p-n),m=(r-c)*(u-f)-(s-f)*(h-c),y=this._display;if(y.moveTo(i,0),g>0&&m>0){let v=Math.round(Se(r,i+o,e-o-i));s=Se(s,-1/0,0),y.lineTo(v-o,0),y.lineTo(r,s),y.lineTo(v+o,0)}if(y.lineTo(e-i,0),y.arcTo(e,0,e,i,i),g>0&&m<0){let v=Math.round(Se(s,i+o,t-o-i));r=Se(r,e,1/0),y.lineTo(e,i),y.lineTo(e,Math.max(v-o,i)),y.lineTo(r,s),y.lineTo(e,v+o)}if(y.lineTo(e,t-i),y.arcTo(e,t,e-i,t,i),g<0&&m<0){let v=Math.round(Se(r,i+o,e-o-i));s=Se(s,t,1/0),y.lineTo(e-i,t),y.lineTo(v+o,t),y.lineTo(r,s),y.lineTo(v-o,t)}if(y.lineTo(i,t),y.arcTo(0,t,0,t-i,i),g<0&&m>0){let v=Math.round(Se(s,i+o,t-i-o));r=Se(r,-1/0,0),y.lineTo(0,t-i),y.lineTo(0,v+o),y.lineTo(r,s),y.lineTo(0,Math.max(v-o,i))}y.lineTo(0,i),y.arcTo(0,0,i,0,i),y.closePath()}}}};Sa.className="PointedRectangle";Sa.classNames=kt.classNames.concat([Sa.className]);var Ci=class extends ot{constructor(e,t,i,r=[]){super(e,t,i,r),this._fx=0,this._fy=0,this._w=0,this._h=0,this._htmlContentHovered=!1}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultFn("background",()=>Sa.new(this._root,{})).set("themeTags",["tooltip","background"]),this._label=this.children.push(Qt.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(je(t,"pointerover",i=>{this._htmlContentHovered=!0})),this._disposers.push(je(t,"pointerout",i=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){this.get("readerAnnounce")&&this.isVisibleDeep()&&this._root.readerAlert(this.label.getAccessibleText())}get label(){return this._label}_dispose(){super._dispose(),li(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 t=this.get("background");this._keepHoverDp=new qe([t.events.on("pointerover",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),r.hover())}),t.events.on("pointerout",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),this._htmlContentHovered||r.unhover())})]),this.label.onPrivate("htmlElement",i=>{this._keepHoverDp&&i&&this._keepHoverDp.disposers.push(je(i,"pointerleave",r=>{let s=this.root._renderer.getEvent(r);t.events.dispatch("pointerout",{type:"pointerout",originalEvent:s.event,point:s.point,simulated:!1,target:t})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let e=this.get("tooltipTarget"),t=this.get("background"),i,r;if(e&&t){if(i=e.get("fill"),r=e.get("stroke"),i==null&&(i=r),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),i!=null&&t.set("fill",i),this._fillDp=e.on("fill",s=>{s!=null&&(t.set("fill",s),this._updateTextColor(s))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let s=e.get("fillGradient");s!=null&&t.set("fillGradient",s),this._fillGrDp=e.on("fillGradient",o=>{o!=null&&t.set("fillGradient",o)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&t.set("stroke",i),this._strokeDp=e.on("fill",s=>{s!=null&&t.set("stroke",s)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label.set("fill",i),this._labelDp=e.on("fill",s=>{s!=null&&this.label.set("fill",s)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(e){this.get("autoTextColor")&&(e==null&&(e=this.get("background").get("fill")),e==null&&(e=this._root.interfaceColors.get("background")),e instanceof yt&&this.label.set("fill",yt.alternative(e,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(e){super._setDataItem(e),this.label._setDataItem(e)}_updateBackground(){super.updateBackground();let e=this._root.container;if(e){let t=.5,i=.5,r=this.get("centerX");r instanceof St&&(t=r.value);let s=this.get("centerY");s instanceof St&&(i=s.value);let o=e.width(),n=e.height(),l=this.parent,h=0,u=0;if(l){h=l.x(),u=l.y();let O=l.get("layerMargin");O&&(h+=O.left||0,u+=O.top||0,o+=(O.left||0)+(O.right||0),n+=(O.top||0)+(O.bottom||0))}let p=this.get("bounds",{left:-h,top:-u,right:o-h,bottom:n-u});this._updateBounds();let d=this.width(),c=this.height();d===0&&(d=this._w),c===0&&(c=this._h);let f=this.get("pointTo",{x:o/2,y:n/2}),g=f.x,m=f.y,y=this.get("pointerOrientation"),v=this.get("background"),x=0,_=0,$=0;v instanceof Sa&&(x=v.get("pointerLength",0),_=v.get("strokeWidth",0)/2,$=_,v.set("width",d),v.set("height",c));let T=0,S=0,k=p.right-p.left,A=p.bottom-p.top;y=="horizontal"||y=="left"||y=="right"?(_=0,y=="horizontal"?g>p.left+k/2?(g-=d*(1-t)+x,$*=-1):g+=d*t+x:y=="left"?g+=d*(1-t)+x:(g-=d*t+x,$*=-1)):($=0,y=="vertical"?m>p.top+c/2+x?m-=c*(1-i)+x:(m+=c*i+x,_*=-1):y=="down"?m-=c*(1-i)+x:(m+=c*i+x,_*=-1)),g=Se(g,p.left+d*t,p.left+k-d*(1-t))+$,m=Se(m,p.top+c*i,p.top+A-c*(1-i))-_,T=f.x-g+d*t+$,S=f.y-m+c*i-_,this._fx=g,this._fy=m;let L=this.get("animationDuration",0);if(L>0&&this.get("visible")&&this.get("opacity")>.1){let O=this.get("animationEasing");this.animate({key:"x",to:g,duration:L,easing:O}),this.animate({key:"y",to:m,duration:L,easing:O})}else this.set("x",g),this.set("y",m);v instanceof Sa&&(v.set("pointerX",T),v.set("pointerY",S)),d>0&&(this._w=d),c>0&&(this._h=c)}}};Ci.className="Tooltip";Ci.classNames=ot.classNames.concat([Ci.className]);var vn=class extends le{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);let e="_big_number_suffix_",t="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(e+"3")},{number:1e6,suffix:this._t(e+"6")},{number:1e9,suffix:this._t(e+"9")},{number:1e12,suffix:this._t(e+"12")},{number:1e15,suffix:this._t(e+"15")},{number:1e18,suffix:this._t(e+"18")},{number:1e21,suffix:this._t(e+"21")},{number:1e24,suffix:this._t(e+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(t+"24")},{number:1e-21,suffix:this._t(t+"21")},{number:1e-18,suffix:this._t(t+"18")},{number:1e-15,suffix:this._t(t+"15")},{number:1e-12,suffix:this._t(t+"12")},{number:1e-9,suffix:this._t(t+"9")},{number:1e-6,suffix:this._t(t+"6")},{number:.001,suffix:this._t(t+"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(e,t,i){(t==null||Us(t)&&t.toLowerCase()==="number")&&(t=this.get("numberFormat",""));let r,s=Number(e);if(is(t))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),t).format(s):new Intl.NumberFormat(void 0,t).format(s)}catch{return"Invalid"}else{t=El(t);let o=this.parseFormat(t,this._root.language),n;s>this.get("negativeBase")?n=o.positive:s<this.get("negativeBase")?n=o.negative:n=o.zero,i!=null&&!n.mod&&(n=ss(n),n.decimals.active=s==0?0:i),r=n.template.split(rs).join(this.applyFormat(s,n))}return this.get("forceLTR")===!0&&(r="\u200E"+r),r}parseFormat(e,t){let i=t.translateEmpty("_thousandSeparator"),r=t.translateEmpty("_decimalSeparator"),s={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1}};e=e.replace("||",no);let o=e.split("|");return s.positive.source=o[0],typeof o[2]>"u"?s.zero=s.positive:s.zero.source=o[2],typeof o[1]>"u"?s.negative=s.positive:s.negative.source=o[1],Vt(s,(n,l)=>{if(l.parsed)return;let h=l.source;h.toLowerCase()==="number"&&(h=this.get("numberFormat","#,###.#####"));let u=Bi.chunk(h,!0);for(let p=0;p<u.length;p++){let d=u[p];if(d.text=d.text.replace(no,"|"),d.type==="value"){let c=d.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(c)if(c===null||c[0]==="")l.template+=d.text;else{let f=c[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);f&&(l.mod=f[0].toLowerCase(),l.modSpacing=!!c[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let g=c[0].split(".");if(g[0]!==""){l.thousands.active=(g[0].match(/0/g)||[]).length,l.thousands.passive=(g[0].match(/\#/g)||[]).length+l.thousands.active;let m=g[0].split(",");m.length===1||(l.thousands.interval=(m.pop()||"").length,l.thousands.interval===0&&(l.thousands.interval=-1))}typeof g[1]>"u"||(l.decimals.active=(g[1].match(/0/g)||[]).length,l.decimals.passive=(g[1].match(/\#/g)||[]).length+l.decimals.active),l.template+=d.text.split(c[0]).join(rs)}}else l.template+=d.text}l.parsed=!0}),s}applyFormat(e,t){let i=e<0;e=Math.abs(e);let r="",s="",o=t.mod?t.mod.split(""):[];if(o.indexOf("b")!==-1){let p=this.applyPrefix(e,this.get("bytePrefixes"),o.indexOf("!")!==-1);e=p[0],r=p[1],s=p[2],t.modSpacing&&(s=" "+s)}else if(o.indexOf("a")!==-1){let p=this.applyPrefix(e,e<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),o.indexOf("!")!==-1);e=p[0],r=p[1],s=p[2],t.modSpacing&&(s=" "+s)}else if(o.indexOf("p")!==-1){let p=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(p)),r=this._root.language.translate("_percentPrefix"),s=this._root.language.translate("_percentSuffix"),r==""&&s==""&&(s="%")}else if(o.indexOf("%")!==-1){let p=Math.min(e.toString().length+2,21);e*=100,e=parseFloat(e.toPrecision(p)),s="%"}else if(o.indexOf("\u2030")!==-1){let p=Math.min(e.toString().length+3,21);e*=1e3,e=parseFloat(e.toPrecision(p)),s="\u2030"}if(o.indexOf("e")!==-1){let p;t.decimals.passive>=0?p=e.toExponential(t.decimals.passive).split("e"):p=e.toExponential().split("e"),e=Number(p[0]),s="e"+p[1],t.modSpacing&&(s=" "+s)}else if(t.decimals.passive===0)e=Math.round(e);else if(t.decimals.passive>0){let p=Md(e);if(p>0){let d=Math.pow(10,t.decimals.passive);e=Math.round(parseFloat((e*d).toFixed(p)))/d}}let n="",l=Sx(e).split("."),h=l[0];if(h.length<t.thousands.active&&(h=Array(t.thousands.active-h.length+1).join("0")+h),t.thousands.interval>0){let p=[],d=h.split("").reverse().join("");for(let c=0,f=h.length;c<=f;c+=t.thousands.interval){let g=d.substr(c,t.thousands.interval).split("").reverse().join("");g!==""&&p.unshift(g)}h=p.join(t.thousands.separator)}n+=h,l.length===1&&l.push("");let u=l[1];return u.length<t.decimals.active&&(u+=Array(t.decimals.active-u.length+1).join("0")),u!==""&&(n+=t.decimals.separator+u),n===""&&(n="0"),e!==0&&i&&o.indexOf("s")===-1&&(n="-"+n),r&&(n=r+n),s&&(n+=s),n}applyPrefix(e,t,i=!1){let r=e,s="",o="",n=!1,l=1;for(let h=0,u=t.length;h<u;h++)t[h].number<=e&&(t[h].number===0?r=0:(r=e/t[h].number,l=t[h].number),s=t[h].prefix,o=t[h].suffix,n=!0);return!n&&i&&t.length&&e!=0&&(r=e/t[0].number,s=t[0].prefix,o=t[0].suffix,n=!0),n&&(r=parseFloat(r.toPrecision(Math.min(l.toString().length+Math.floor(r).toString().replace(/[^0-9]*/g,"").length,21)))),[r,s,o]}escape(e){return e.replace("||",no)}unescape(e){return e.replace(no,"|")}};function Qx(a,e){let t=0,i=0,r=1,s=0,o=0,n=0,l=0,h=0;return a.formatToParts(e).forEach(u=>{switch(u.type){case"year":t=+u.value;break;case"month":i=+u.value-1;break;case"day":r=+u.value;break;case"hour":s=+u.value;break;case"minute":o=+u.value;break;case"second":n=+u.value;break;case"fractionalSecond":l=+u.value;break;case"weekday":switch(u.value){case"Sun":h=0;break;case"Mon":h=1;break;case"Tue":h=2;break;case"Wed":h=3;break;case"Thu":h=4;break;case"Fri":h=5;break;case"Sat":h=6;break}}}),s===24&&(s=0),{year:t,month:i,day:r,hour:s,minute:o,second:n,millisecond:l,weekday:h}}function Jx(a,e){let{year:t,month:i,day:r,hour:s,minute:o,second:n,millisecond:l}=Qx(a,e);return Date.UTC(t,i,r,s,o,n,l)}var wu=class{constructor(e,t){if(!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,this._utc=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){let t=this.offsetUTC(e),i=e.getTimezoneOffset(),r=new Date(e);r.setUTCMinutes(r.getUTCMinutes()-(t-i));let s=r.getTimezoneOffset();return i!=s&&r.setUTCMinutes(r.getUTCMinutes()+s-i),r}offsetUTC(e){let t=Jx(this._utc,e),i=Jx(this._dtf,e);return(t-i)/6e4}parseDate(e){return Qx(this._dtf,e)}};var yg=class{constructor(){this._targets=[],this._observer=new ResizeObserver(e=>{F(e,t=>{F(this._targets,i=>{i.target===t.target&&i.callback()})})})}addTarget(e,t){this._observer.observe(e,{box:"border-box"}),this._targets.push({target:e,callback:t})}removeTarget(e){this._observer.unobserve(e),fn(this._targets,t=>t.target!==e)}},Xd=class a{constructor(){this._timer=null,this._targets=[]}addTarget(e,t){if(this._timer===null){let r=null,s=()=>{let o=Date.now();(r===null||o>r+a.delay)&&(r=o,F(this._targets,n=>{let l=n.target.getBoundingClientRect();(l.width!==n.size.width||l.height!==n.size.height)&&(n.size=l,n.callback())})),this._targets.length===0?this._timer=null:this._timer=requestAnimationFrame(s)};this._timer=requestAnimationFrame(s)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:e,callback:t,size:i})}removeTarget(e){fn(this._targets,t=>t.target!==e),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}};Xd.delay=200;var Hd=null;function C$(){return Hd===null&&(typeof ResizeObserver<"u"?Hd=new yg:Hd=new Xd),Hd}var Yd=class{constructor(e,t){this._disposed=!1,this._sensor=C$(),this._element=e,this._listener=Od(t),this._sensor.addTarget(e,t)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}};var bn=class extends le{};bn.className="InterfaceColors";bn.classNames=le.classNames.concat([bn.className]);var xn=class extends le{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i=!1){(typeof t>"u"||t==="")&&(t=this.get("dateFormat","yyyy-MM-dd"));let r,s=e;if(is(t))try{let h=this.get("intlLocales");return h?new Intl.DateTimeFormat(h,t).format(s):new Intl.DateTimeFormat(void 0,t).format(s)}catch{return"Invalid"}let o=this.parseFormat(t),n=this._root.timezone,l=s;return n&&!this._root.utc&&!i&&(s=n.convertLocal(s)),M(s.getTime())?(r=this.applyFormat(s,o,i,l),this.get("capitalize")&&(r=r.replace(/^.{1}/,r.substr(0,1).toUpperCase())),r):"Invalid date"}applyFormat(e,t,i=!1,r){let s=t.template,o,n,l,h,u,p,d,c,f=e.getTime();this._root.utc&&!i?(o=e.getUTCFullYear(),n=e.getUTCMonth(),l=e.getUTCDay(),h=e.getUTCDate(),u=e.getUTCHours(),p=e.getUTCMinutes(),d=e.getUTCSeconds(),c=e.getUTCMilliseconds()):(o=e.getFullYear(),n=e.getMonth(),l=e.getDay(),h=e.getDate(),u=e.getHours(),p=e.getMinutes(),d=e.getSeconds(),c=e.getMilliseconds());for(let g=0,m=t.parts.length;g<m;g++){let y="";switch(t.parts[g]){case"G":y=this._t(o<0?"_era_bc":"_era_ad");break;case"yyyy":y=Math.abs(o).toString(),o<0&&(y+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":y=Math.abs(o).toString().substr(-t.parts[g].length),o<0&&(y+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let v=Bx(e,this._root.utc);t.parts[g]=="YYYY"?y=Math.abs(v).toString():y=Math.abs(v).toString().substr(-t.parts[g].length),v<0&&(y+=this._t("_era_bc"));break;case"u":break;case"q":y=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":y=this._t(this._getMonth(n)).substr(0,1);break;case"MMMM":y=this._t(this._getMonth(n));break;case"MMM":y=this._t(this._getShortMonth(n));break;case"MM":y=Ze(n+1,2,"0");break;case"M":y=(n+1).toString();break;case"ww":y=Ze(mn(e,this._root.utc),2,"0");break;case"w":y=mn(e,this._root.utc).toString();break;case"W":y=jx(e,this._root.utc).toString();break;case"dd":y=Ze(h,2,"0");break;case"d":y=h.toString();break;case"DD":case"DDD":y=Ze(ig(e,this._root.utc).toString(),t.parts[g].length,"0");break;case"D":y=ig(e,this._root.utc).toString();break;case"F":break;case"g":break;case"t":y=this._root.language.translateFunc("_dateOrd").call(this,h);break;case"E":y=(l||7).toString();break;case"EE":y=Ze((l||7).toString(),2,"0");break;case"EEE":case"eee":y=this._t(this._getShortWeekday(l));break;case"EEEE":case"eeee":y=this._t(this._getWeekday(l));break;case"EEEEE":case"eeeee":y=this._t(this._getShortWeekday(l)).substr(0,1);break;case"e":case"ee":y=(l-(this._root.locale.firstDayOfWeek||1)+1).toString(),t.parts[g]=="ee"&&(y=Ze(y,2,"0"));break;case"a":u>=12?y=this._t("PM"):y=this._t("AM");break;case"aa":u>=12?y=this._t("P.M."):y=this._t("A.M.");break;case"aaa":u>=12?y=this._t("P"):y=this._t("A");break;case"h":y=vu(u).toString();break;case"hh":y=Ze(vu(u),2,"0");break;case"H":y=u.toString();break;case"HH":y=Ze(u,2,"0");break;case"K":y=vu(u,0).toString();break;case"KK":y=Ze(vu(u,0),2,"0");break;case"k":y=(u+1).toString();break;case"kk":y=Ze(u+1,2,"0");break;case"m":y=p.toString();break;case"mm":y=Ze(p,2,"0");break;case"s":y=d.toString();break;case"ss":y=Ze(d,2,"0");break;case"S":case"SS":case"SSS":y=Math.round(c/1e3*Math.pow(10,t.parts[g].length)).toString();break;case"x":y=f.toString();break;case"n":case"nn":case"nnn":y=Ze(c,t.parts[g].length,"0");break;case"z":y=bu(r||e,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":y=bu(r||e,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":y=bu(r||e,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":y=bu(r||e,!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;x instanceof wu&&(x=x.name);let _=x?Xx(x,r||e):e.getTimezoneOffset(),$=Math.abs(_)/60,T=Math.floor($),S=$*60-T*60;this._root.utc&&(T=0,S=0),t.parts[g]=="Z"?(y="GMT",y+=_>0?"-":"+",y+=Ze(T,2)+":"+Ze(S,2)):(y=_>0?"-":"+",y+=Ze(T,2)+Ze(S,2));break;case"i":y=e.toISOString();break;case"I":y=e.toUTCString();break}s=s.replace(rs,y)}return s}parseFormat(e){let t={template:"",parts:[]},i=Bi.chunk(e,!0);for(let r=0;r<i.length;r++){let s=i[r];if(s.type==="value"){if(s.text.match(/^date$/i)){let n=this.get("dateFormat","yyyy-MM-dd");Us(n)||(n="yyyy-MM-dd"),s.text=n}let o=s.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(o)for(let n=0;n<o.length;n++)t.parts.push(o[n]),s.text=s.text.replace(o[n],rs)}t.template+=s.text}return t}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(e){return this._months()[e]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(e){return this._shortMonths()[e]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(e){return this._weekdays()[e]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(e){return this._shortWeekdays()[e]}parse(e,t,i){if(typeof i>"u"&&(i=this._root.utc),e instanceof Date)return e;if(M(e))return new Date(e);if(t=="x")return new Date(parseInt(e));Us(e)||(e=e.toString());let r,s="";t=El(t),t=t.substr(0,e.length);let o=this.parseFormat(t),n={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},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},h=0,u=0;for(let c=0;c<o.parts.length;c++){switch(u=c+h+1,o.parts[c]){case"yyyy":case"YYYY":s+="([0-9]{4})",n.year=u;break;case"yyy":case"YYY":s+="([0-9]{3})",n.year3=u;break;case"yy":case"YY":s+="([0-9]{2})",n.year2=u;break;case"y":case"Y":s+="([0-9]{1})",n.year1=u;break;case"MMMM":s+="("+this.getStringList(this._months()).join("|")+")",n.monthLong=u;break;case"MMM":s+="("+this.getStringList(this._shortMonths()).join("|")+")",n.monthShort=u;break;case"MM":case"M":s+="([0-9]{2}|[0-9]{1})",n.month=u;break;case"ww":case"w":s+="([0-9]{2}|[0-9]{1})",n.week=u;break;case"dd":case"d":s+="([0-9]{2}|[0-9]{1})",n.day=u;break;case"DDD":case"DD":case"D":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.yearDay=u;break;case"dddd":s+="("+this.getStringList(this._weekdays()).join("|")+")",n.weekdayLong=u;break;case"ddd":s+="("+this.getStringList(this._shortWeekdays()).join("|")+")",n.weekdayShort=u;break;case"aaa":case"aa":case"a":s+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",n.am=u;break;case"hh":case"h":s+="([0-9]{2}|[0-9]{1})",n.hour12Base1=u;break;case"HH":case"H":s+="([0-9]{2}|[0-9]{1})",n.hourBase0=u;break;case"KK":case"K":s+="([0-9]{2}|[0-9]{1})",n.hour12Base0=u;break;case"kk":case"k":s+="([0-9]{2}|[0-9]{1})",n.hourBase1=u;break;case"mm":case"m":s+="([0-9]{2}|[0-9]{1})",n.minute=u;break;case"ss":case"s":s+="([0-9]{2}|[0-9]{1})",n.second=u;break;case"SSS":case"SS":case"S":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u,n.millisecondDigits=o.parts[c].length;break;case"nnn":case"nn":case"n":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u;break;case"x":s+="([0-9]{1,})",n.timestamp=u;break;case"Z":s+="GMT([-+]+[0-9]{2}:[0-9]{2})",n.zone=u;break;case"ZZ":s+="([\\-+]+[0-9]{2}[0-9]{2})",n.zone=u;break;case"i":s+="([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}|$)",n.iso=u,h+=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":h--;break}s+="[^0-9]*"}let p=new RegExp(s),d=e.match(p);if(d){if(n.year>-1&&(l.year=parseInt(d[n.year])),n.year3>-1){let c=parseInt(d[n.year3]);c+=1e3,l.year=c}if(n.year2>-1){let c=parseInt(d[n.year2]);c>50?c+=1e3:c+=2e3,l.year=c}if(n.year1>-1){let c=parseInt(d[n.year1]);c=Math.floor(new Date().getFullYear()/10)*10+c,l.year=c}if(n.monthLong>-1&&(l.month=this.resolveMonth(d[n.monthLong])),n.monthShort>-1&&(l.month=this.resolveShortMonth(d[n.monthShort])),n.month>-1&&(l.month=parseInt(d[n.month])-1),n.week>-1&&n.day===-1&&(l.month=0,l.day=Hx(parseInt(d[n.week]),l.year,1,i)),n.day>-1&&(l.day=parseInt(d[n.day])),n.yearDay>-1&&(l.month=0,l.day=parseInt(d[n.yearDay])),n.hourBase0>-1&&(l.hour=parseInt(d[n.hourBase0])),n.hourBase1>-1&&(l.hour=parseInt(d[n.hourBase1])-1),n.hour12Base0>-1){let c=parseInt(d[n.hour12Base0]);c==11&&(c=0),n.am>-1&&!this.isAm(d[n.am])&&(c+=12),l.hour=c}if(n.hour12Base1>-1){let c=parseInt(d[n.hour12Base1]);c==12&&(c=0),n.am>-1&&!this.isAm(d[n.am])&&(c+=12),l.hour=c}if(n.minute>-1&&(l.minute=parseInt(d[n.minute])),n.second>-1&&(l.second=parseInt(d[n.second])),n.millisecond>-1){let c=parseInt(d[n.millisecond]);n.millisecondDigits==2?c*=10:n.millisecondDigits==1&&(c*=100),l.millisecond=c}if(n.timestamp>-1){l.timestamp=parseInt(d[n.timestamp]);let c=new Date(l.timestamp);l.year=c.getUTCFullYear(),l.month=c.getUTCMonth(),l.day=c.getUTCDate(),l.hour=c.getUTCHours(),l.minute=c.getUTCMinutes(),l.second=c.getUTCSeconds(),l.millisecond=c.getUTCMilliseconds()}n.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[n.zone])),n.iso>-1&&(l.year=zi(d[n.iso+0]),l.month=zi(d[n.iso+1])-1,l.day=zi(d[n.iso+2]),l.hour=zi(d[n.iso+3]),l.minute=zi(d[n.iso+4]),l.second=zi(d[n.iso+5]),l.millisecond=zi(d[n.iso+6]),d[n.iso+7]=="Z"||d[n.iso+7]=="z"?l.utc=!0:d[n.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[n.iso+7]))),l.utc?r=new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):r=new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else r=new Date(e);return r}resolveTimezoneOffset(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let r=t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),s=r[1],o=r[2],n=r[3],l=parseInt(o)*60+parseInt(n);s=="+"&&(l*=-1);let h=(e||new Date).getTimezoneOffset();return l-h}return 0}resolveMonth(e){let t=this._months().indexOf(e);return t>-1||!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._months()).indexOf(e),t>-1)?t:0}resolveShortMonth(e){let t=this._shortMonths().indexOf(e);return t>-1||(t=this._months().indexOf(e),t>-1)||this._root.language&&!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._shortMonths()).indexOf(e),t>-1)?t:0}isAm(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1}getStringList(e){let t=[];for(let i=0;i<e.length;i++)this._root.language?t.push(eg(this._t(e[i]))):t.push(eg(e[i]));return t}};var zd=class extends le{constructor(){super(...arguments),this._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}}_setDefaults(){let e="_duration_millisecond",t="_duration_second",i="_duration_minute",r="_duration_hour",s="_duration_day",o="_duration_week",n="_duration_month",l="_duration_year",h="_second",u="_minute",p="_hour",d="_day",c="_week",f="_week",g="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(e),second:this._t(e+h),minute:this._t(e+u),hour:this._t(e+p),day:this._t(e+d),week:this._t(e+c),month:this._t(e+f),year:this._t(e+g)},second:{second:this._t(t),minute:this._t(t+u),hour:this._t(t+p),day:this._t(t+d),week:this._t(t+c),month:this._t(t+f),year:this._t(t+g)},minute:{minute:this._t(i),hour:this._t(i+p),day:this._t(i+d),week:this._t(i+c),month:this._t(i+f),year:this._t(i+g)},hour:{hour:this._t(r),day:this._t(r+d),week:this._t(r+c),month:this._t(r+f),year:this._t(r+g)},day:{day:this._t(s),week:this._t(s+c),month:this._t(s+f),year:this._t(s+g)},week:{week:this._t(o),month:this._t(o+f),year:this._t(o+g)},month:{month:this._t(n),year:this._t(n+g)},year:{year:this._t(l)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){let r=i||this.get("baseUnit");(typeof t>"u"||t==="")&&(this.get("durationFormat")!=null?t=this.get("durationFormat"):t=this.getFormat(zi(e),void 0,r)),t=El(t);let s=this.parseFormat(t,r),o=Number(e),n;o>this.get("negativeBase")?n=s.positive:o<this.get("negativeBase")?n=s.negative:n=s.zero;let l=this.applyFormat(o,n);return n.color!==""&&(l="["+n.color+"]"+l+"[/]"),l}parseFormat(e,t){let i=t||this.get("baseUnit"),r={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}};e=e.replace("||",no);let s=e.split("|");return r.positive.source=s[0],typeof s[2]>"u"?r.zero=r.positive:r.zero.source=s[2],typeof s[1]>"u"?r.negative=r.positive:r.negative.source=s[1],Vt(r,(o,n)=>{if(n.parsed)return;let l=n.source,h=[];h=n.source.match(/^\[([^\]]*)\]/),h&&h.length&&h[0]!==""&&(l=n.source.substr(h[0].length),n.color=h[1]);let u=Bi.chunk(l,!0);for(let p=0;p<u.length;p++){let d=u[p];if(d.text=d.text.replace(no,"|"),d.type==="value"){d.text.match(/[yYMdDwhHKkmsSn]+a/)&&(n.absolute=!0,d.text=d.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let c=d.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(c)for(let f=0;f<c.length;f++)c[f]==null&&(c[f]=this._unitAliases[c[f]]),n.parts.push(c[f]),d.text=d.text.replace(c[f],rs)}n.template+=d.text}n.parsed=!0}),r}applyFormat(e,t){let i=!t.absolute&&e<this.get("negativeBase");e=Math.abs(e);let r=this.toTimeStamp(e,t.baseUnit),s=t.template,o={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let n=0,l=t.parts.length;n<l;n++){let h=t.parts[n],u=this._toTimeUnit(h.substr(0,1)),p,d=this._getUnitValue(u);n<l-1?p=Math.floor(r/d):p=Math.round(r/d),o[u]+=p,r-=p*d}Vt(o,(n,l)=>{n=="millisecond"&&l==1e3?(o.second++,o.millisecond=0):n=="second"&&l==60?(o.minute++,o.second=0):n=="minute"&&l==60?(o.hour++,o.minute=0):n=="hour"&&l==24?(o.day++,o.hour=0):n=="day"&&l==7&&t.parts.indexOf("w")!==-1?(o.week++,o.day=0):n=="day"&&l==30?(o.month++,o.day=0):n=="month"&&l==12&&(o.year++,o.month=0)});for(let n=0,l=t.parts.length;n<l;n++){let h=t.parts[n],u=this._toTimeUnit(h.substr(0,1)),p=h.length;s=s.replace(rs,Ze(o[u],p,"0"))}return i&&(s="-"+s),s}toTimeStamp(e,t){return e*this._getUnitValue(t)}_toTimeUnit(e){switch(e){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(e,t,i){if(this.get("durationFormat")!=null)return this.get("durationFormat");if(i||(i=this.get("baseUnit")),t!=null&&e!=t){e=Math.abs(e),t=Math.abs(t);let r=this.getValueUnit(Math.max(e,t),i);return this.get("durationFormats")[i][r]}else{let r=this.getValueUnit(e,i);return this.get("durationFormats")[i][r]}}getValueUnit(e,t){t||(t=this.get("baseUnit"));let i,r=this.getMilliseconds(e,t);return kx(this._getUnitValues(),(s,o)=>{if(s==t||i){if(r/o<=1)return i||(i=s),!1;i=s}return!0}),i}getMilliseconds(e,t){return t||(t=this.get("baseUnit")),e*this._getUnitValue(t)}_getUnitValue(e){return this._getUnitValues()[e]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}};var Wd={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(a){let e="th";if(a<11||a>13)switch(a%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"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:""};var Gd=class extends le{_setDefaults(){this.setPrivate("defaultLocale",Wd),super._setDefaults()}translate(e,t,...i){t||(t=this._root.locale||this.getPrivate("defaultLocale"));let r=e,s=t[e];if(s===null)r="";else if(s!=null)s&&(r=s);else if(t!==this.getPrivate("defaultLocale"))return this.translate(e,this.getPrivate("defaultLocale"),...i);if(i.length)for(let o=i.length,n=0;n<o;++n)r=r.split("%"+(n+1)).join(i[n]);return r}translateAny(e,t,...i){return this.translate(e,t,...i)}setTranslationAny(e,t,i){let r=i||this._root.locale;r[e]=t}setTranslationsAny(e,t){Vt(e,(i,r)=>{this.setTranslationAny(i,r,t)})}translateEmpty(e,t,...i){let r=this.translate(e,t,...i);return r==e?"":r}translateFunc(e,t){return this._root.locale[e]?this._root.locale[e]:t!==this.getPrivate("defaultLocale")?this.translateFunc(e,this.getPrivate("defaultLocale")):()=>""}translateAll(e,t){return this.isDefault()?e:hu(e,i=>this.translate(i,t))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}};var Rr=class{constructor(e,t){if(this._rules={},this._root=e,!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(e){let t=new this(e,!0);return t.setupDefaultRules(),t}setupDefaultRules(){}_lookupRules(e){return this._rules[e]}ruleRaw(e,t=[]){let i=this._rules[e];i||(i=this._rules[e]=[]),t.sort(Lr);let{index:r,found:s}=fu(i,o=>{let n=Lr(o.tags.length,t.length);return n===0?Nd(o.tags,t,Lr):n});if(s)return i[r].template;{let o=jt.new({});return i.splice(r,0,{tags:t,template:o}),o}}rule(e,t=[]){return this.ruleRaw(e,t)}};function lt(a,e,t,i){a.set(e,t.get(i)),t.on(i,r=>{a.set(e,r)})}var Ud=class extends Rr{setupDefaultRules(){super.setupDefaultRules();let e=this._root.language,t=this._root.interfaceColors,i=this._root.horizontalLayout,r=this._root.verticalLayout,s=this.rule.bind(this);s("InterfaceColors").setAll({stroke:yt.fromHex(15066597),fill:yt.fromHex(15987699),primaryButton:yt.fromHex(6788316),primaryButtonHover:yt.fromHex(6779356),primaryButtonDown:yt.fromHex(6872182),primaryButtonActive:yt.fromHex(6872182),primaryButtonDisabled:yt.fromHex(14342874),primaryButtonTextDisabled:yt.fromHex(16777215),primaryButtonText:yt.fromHex(16777215),primaryButtonStroke:yt.fromHex(16777215),secondaryButton:yt.fromHex(14277081),secondaryButtonHover:yt.fromHex(10724259),secondaryButtonDown:yt.fromHex(9276813),secondaryButtonActive:yt.fromHex(15132390),secondaryButtonText:yt.fromHex(0),secondaryButtonStroke:yt.fromHex(16777215),grid:yt.fromHex(0),background:yt.fromHex(16777215),alternativeBackground:yt.fromHex(0),text:yt.fromHex(0),alternativeText:yt.fromHex(16777215),disabled:yt.fromHex(11382189),positive:yt.fromHex(5288704),negative:yt.fromHex(11730944)});{let o=s("ColorSet");o.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[yt.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),o.setPrivate("currentStep",0),o.setPrivate("currentPass",0)}s("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:Ca(ws)}),s("Component").setAll({interpolationDuration:0,interpolationEasing:Ca(ws)}),s("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:pt,tooltipY:pt,tooltipPosition:"fixed",isMeasured:!0}),s("Sprite").states.create("default",{visible:!0,opacity:1}),s("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),s("Graphics").setAll({strokeWidth:1}),s("Chart").setAll({width:X,height:X,interactiveChildren:!1}),s("ZoomableContainer").setAll({width:X,height:X,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:Ca(ws),animationDuration:600,maxPanOut:.4}),s("Sprite",["horizontal","center"]).setAll({centerX:pt,x:pt}),s("Sprite",["vertical","center"]).setAll({centerY:pt,y:pt}),s("Container",["horizontal","layout"]).setAll({layout:i}),s("Container",["vertical","layout"]).setAll({layout:r}),s("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),s("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),s("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),s("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),s("GrainPattern").setAll({width:200,height:200,colors:[yt.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{let o=s("PatternSet");o.setAll({step:1}),lt(o,"color",t,"stroke")}s("LinearGradient").setAll({rotation:90}),s("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:ns.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),s("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:i,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:e.translate("Press ENTER to toggle"),role:"checkbox"});{let o=s("Rectangle",["legend","item","background"]);o.setAll({fillOpacity:0}),lt(o,"fill",t,"background")}s("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:pt,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),s("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:X,height:X,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{let o=s("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});lt(o,"fill",t,"disabled"),lt(o,"stroke",t,"disabled")}s("Label",["legend","label"]).setAll({centerY:pt,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});{let o=s("Label",["legend","label"]).states.create("disabled",{});lt(o,"fill",t,"disabled")}s("Label",["legend","value","label"]).setAll({centerY:pt,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:X,populateText:!0});{let o=s("Label",["legend","value","label"]).states.create("disabled",{});lt(o,"fill",t,"disabled")}s("HeatLegend").setAll({stepCount:1}),s("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),s("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:X,width:15}),s("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:X,height:15}),s("HeatLegend",["vertical"]).setAll({height:X}),s("HeatLegend",["horizontal"]).setAll({width:X}),s("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),s("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{let o=s("Label");o.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),lt(o,"fill",t,"text")}s("RadialLabel").setAll({textType:"regular",centerY:pt,centerX:pt,inside:!1,radius:0,baseRadius:X,orientation:"auto",textAlign:"center"}),s("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),s("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:yt.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:yt.fromHex(0)}),s("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),s("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),s("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),s("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{let o=s("Tick");o.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),lt(o,"stroke",t,"grid")}s("Bullet").setAll({locationX:.5,locationY:.5}),s("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:pt,centerY:pt,animationEasing:Ca(ws),exportable:!1}),s("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{let o=s("PointedRectangle",["tooltip","system","background"]);o.setAll({strokeOpacity:.3}),lt(o,"fill",t,"background"),lt(o,"stroke",t,"grid")}s("Label",["tooltip","system"]).setAll({fontSize:12,fill:t.get("background")}),s("Polygon").setAll({animationEasing:Ca(ws)}),s("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{let o=s("OrthogonalLine",["link","line"]);o.setAll({isMeasured:!1,crisp:!0});let n=o.states.create("active",{strokeWidth:2});lt(n,"stroke",t,"negative")}s("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{let o=s("OrthogonalLine");o.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),lt(o,"stroke",t,"grid")}{let o=s("Triangle",["link"]);o.setAll({width:14,height:10,centerY:0}),lt(o,"fill",t,"grid"),lt(o,"stroke",t,"grid"),o.states.create("default",{stateAnimationDuration:0});let n=o.states.create("active",{stateAnimationDuration:0,stroke:Wi(16777215),strokeWidth:2});n.set("draw",l=>{l.arc(0,0,11,0,Math.PI*2),l.moveTo(-4,-4),l.lineTo(4,4),l.moveTo(4,-4),l.lineTo(-4,4)}),lt(n,"fill",t,"negative")}s("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:yt.fromHex(16777215)});{let o=s("Label",["tooltip"]);o.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),lt(o,"fill",t,"alternativeText")}s("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:i,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),s("Button").states.create("hover",{}),s("Button").states.create("down",{stateAnimationDuration:0}),s("Button").states.create("active",{}),s("Button").states.create("disabled",{forceInactive:!0});{let o=s("RoundedRectangle",["button","background"]);lt(o,"fill",t,"primaryButton"),lt(o,"stroke",t,"primaryButtonStroke")}{let o=s("RoundedRectangle",["button","background"]).states.create("hover",{});lt(o,"fill",t,"primaryButtonHover")}{let o=s("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0});lt(o,"fill",t,"primaryButtonDown")}{let o=s("RoundedRectangle",["button","background"]).states.create("active",{});lt(o,"fill",t,"primaryButtonActive")}{let o=s("RoundedRectangle",["button","background"]).states.create("disabled",{});lt(o,"fill",t,"primaryButtonDisabled")}{let o=s("Graphics",["button","icon"]).states.create("disabled",{});lt(o,"fill",t,"primaryButtonTextDisabled")}{let o=s("Label",["button"]).states.create("disabled",{});lt(o,"fill",t,"primaryButtonTextDisabled")}{let o=s("Graphics",["button","icon"]);o.setAll({forceInactive:!0}),lt(o,"stroke",t,"primaryButtonText")}{let o=s("Label",["button"]);lt(o,"fill",t,"primaryButtonText")}s("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:Qt.new(this._root,{text:e.translate("Confirm"),forceHidden:!0})});{let o=s("RoundedRectangle",["button","background","confirm"]).states.create("active",{});lt(o,"fill",t,"negative")}s("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),s("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),s("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{let o=s("Graphics",["icon","confirm","button"]);o.setAll({stateAnimationDuration:0}),o.states.create("default",{stateAnimationDuration:0}),lt(o,"stroke",t,"primaryButtonText")}{let o=s("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2});lt(o,"stroke",t,"primaryButtonText")}{let o=s("Graphics",["icon","confirm","button","secondary"]).states.create("active",{});lt(o,"stroke",t,"primaryButtonText")}{let o=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1});lt(o,"fill",t,"negative")}{let o=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1});lt(o,"fill",t,"negative")}s("Button",["button","confirm"]).states.create("hoverActive",{}),s("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:X,role:"button",ariaLabel:e.translate("Zoom Out"),layer:30});{let o=s("RoundedRectangle",["background","button","zoom"]);o.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),lt(o,"fill",t,"primaryButton")}{let o=s("RoundedRectangle",["background","button","zoom"]).states.create("hover",{});lt(o,"fill",t,"primaryButtonHover")}{let o=s("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0});lt(o,"fill",t,"primaryButtonDown")}{let o=s("Graphics",["icon","button","zoom"]);o.setAll({crisp:!0,strokeOpacity:.7,draw:n=>{n.moveTo(0,0),n.lineTo(12,0)}}),lt(o,"stroke",t,"primaryButtonText")}s("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:pt,centerY:pt,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:e.translate("Use up and down arrows to move selection")});{let o=s("RoundedRectangle",["background","resize","button"]);o.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),lt(o,"fill",t,"secondaryButton"),lt(o,"stroke",t,"secondaryButtonStroke")}{let o=s("RoundedRectangle",["background","resize","button"]).states.create("hover",{});lt(o,"fill",t,"secondaryButtonHover")}{let o=s("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0});lt(o,"fill",t,"secondaryButtonDown")}{let o=s("Graphics",["resize","button","icon"]);o.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:n=>{n.moveTo(0,.5),n.lineTo(0,12.5),n.moveTo(4,.5),n.lineTo(4,12.5)}}),lt(o,"stroke",t,"secondaryButtonText")}s("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),s("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),s("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:e.translate("Play"),toggleKey:"active"});{let o=s("RoundedRectangle",["play","background"]);o.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),lt(o,"fill",t,"primaryButton")}{let o=s("Graphics",["play","icon"]);o.setAll({stateAnimationDuration:0,dx:1,draw:n=>{n.moveTo(0,-5),n.lineTo(8,0),n.lineTo(0,5),n.lineTo(0,-5)}}),lt(o,"fill",t,"primaryButtonText")}s("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),s("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:o=>{o.moveTo(-4,-5),o.lineTo(-1,-5),o.lineTo(-1,5),o.lineTo(-4,5),o.lineTo(-4,-5),o.moveTo(4,-5),o.lineTo(1,-5),o.lineTo(1,5),o.lineTo(4,5),o.lineTo(4,-5)}}),s("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:e.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{let o=s("RoundedRectangle",["switch","background"]);o.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),lt(o,"fill",t,"primaryButton")}{let o=s("Circle",["switch","icon"]);o.setAll({radius:8,centerY:0,centerX:0,dx:0}),lt(o,"fill",t,"primaryButtonText")}s("Graphics",["switch","icon"]).states.create("active",{dx:16}),s("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:Ca(ws)}),s("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:X}),s("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:X}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{let o=s("RoundedRectangle",["scrollbar","main","background"]);o.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),lt(o,"fill",t,"fill")}{let o=s("RoundedRectangle",["scrollbar","thumb"]);o.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),lt(o,"fill",t,"secondaryButton")}{let o=s("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{});lt(o,"fill",t,"secondaryButtonHover")}{let o=s("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0});lt(o,"fill",t,"secondaryButtonDown")}s("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:pt,width:X,centerX:pt,ariaLabel:e.translate("Use up and down arrows to move selection")}),s("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:pt,centerY:pt,height:X,ariaLabel:e.translate("Use left and right arrows to move selection")});{let o=s("PointedRectangle",["axis","tooltip","background"]);o.setAll({cornerRadius:0}),lt(o,"fill",t,"alternativeBackground")}s("Label",["axis","tooltip"]).setAll({role:void 0}),s("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),s("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),s("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),s("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),s("Star").setAll({spikes:5,innerRadius:5,radius:10}),s("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),s("Tooltip",["indicator"]).setAll({forceHidden:!0}),s("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),s("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),s("SpriteResizer").setAll({rotationStep:10,isMeasured:!1}),s("Container",["resizer","grip"]).states.create("hover",{});{let o=s("RoundedRectangle",["resizer","grip"]);o.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),lt(o,"fill",t,"background"),lt(o,"stroke",t,"alternativeBackground")}{let o=s("RoundedRectangle",["resizer","grip","outline"]);o.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),o.states.create("hover",{fillOpacity:.3}),lt(o,"fill",t,"alternativeBackground")}s("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),s("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{let o=s("Rectangle",["resizer","rectangle"]);o.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),lt(o,"stroke",t,"alternativeBackground")}s("Graphics",["button","plus","icon"]).setAll({x:pt,y:pt,draw:o=>{o.moveTo(-4,0),o.lineTo(4,0),o.moveTo(0,-4),o.lineTo(0,4)}}),s("Graphics",["button","minus","icon"]).setAll({x:pt,y:pt,draw:o=>{o.moveTo(-4,0),o.lineTo(4,0)}}),s("Graphics",["button","home","icon"]).setAll({x:pt,y:pt,svgPath:"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1"}),s("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2}),s("ZoomTools").setAll({x:X,centerX:X,y:X,centerY:X,paddingRight:10,paddingBottom:10}),s("ProgressPie").setAll({radius:X,width:50,height:50,centerX:Jt(-50),centerY:Jt(-50),innerRadius:Jt(85),numberFormat:"#."});{let o=s("Label",["progresspie"]);o.setAll({centerX:pt,centerY:pt,fontSize:"0.75em"}),lt(o,"fill",t,"primaryButton")}{let o=s("Circle",["progresspie"]);o.setAll({fillOpacity:.5}),lt(o,"fill",t,"background")}{let o=s("Slice",["progresspie"]);o.setAll({startAngle:-90}),lt(o,"fill",t,"primaryButton")}{let o=s("Slice",["progresspie","background"]);o.setAll({fillOpacity:.2,arc:360}),lt(o,"fill",t,"primaryButton")}s("EditableLabel",["numericstepper"]).setAll({y:pt,centerY:pt,multiLine:!1,marginRight:2});{let o=s("Container",["numericstepper","buttons"]);o.setAll({layout:this._root.verticalLayout,centerY:pt,y:pt,marginRight:10,opacity:0}),o.states.create("active",{opacity:1}),o.states.create("default",{opacity:0})}{let o=s("Triangle",["numericstepper"]);o.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),lt(o,"fill",t,"secondaryButton")}s("Triangle",["downbutton"]).setAll({rotation:180})}};var jl=class{constructor(e=1,t=0,i=0,r=1,s=0,o=0){this.a=e,this.b=t,this.c=i,this.d=r,this.tx=s,this.ty=o}setTransform(e,t,i,r,s,o=1){this.a=Math.cos(s)*o,this.b=Math.sin(s)*o,this.c=-Math.sin(s)*o,this.d=Math.cos(s)*o,this.tx=e-(i*this.a+r*this.c),this.ty=t-(i*this.b+r*this.d)}apply(e){return{x:this.a*e.x+this.c*e.y+this.tx,y:this.b*e.x+this.d*e.y+this.ty}}applyInverse(e){let t=1/(this.a*this.d+this.c*-this.b);return{x:this.d*t*e.x+-this.c*t*e.y+(this.ty*this.c-this.tx*this.d)*t,y:this.a*t*e.y+-this.b*t*e.x+(-this.ty*this.a+this.tx*this.b)*t}}append(e){let t=this.a,i=this.b,r=this.c,s=this.d;this.a=e.a*t+e.b*r,this.b=e.a*i+e.b*s,this.c=e.c*t+e.d*r,this.d=e.c*i+e.d*s,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*i+e.ty*s+this.ty}prepend(e){let t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){let i=this.a,r=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty}copyFrom(e){this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty}};var S$=(function(){function a(e,t){var i=[],r=!0,s=!1,o=void 0;try{for(var n=e[Symbol.iterator](),l;!(r=(l=n.next()).done)&&(i.push(l.value),!(t&&i.length===t));r=!0);}catch(h){s=!0,o=h}finally{try{!r&&n.return&&n.return()}finally{if(s)throw o}}return i}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return a(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),Cu=Math.PI*2,vg=function(e,t,i,r,s,o,n){var l=e.x,h=e.y;l*=t,h*=i;var u=r*l-s*h,p=s*l+r*h;return{x:u+o,y:p+n}},T$=function(e,t){var i=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),r=Math.cos(e),s=Math.sin(e),o=Math.cos(e+t),n=Math.sin(e+t);return[{x:r-s*i,y:s+r*i},{x:o+n*i,y:n-o*i},{x:o,y:n}]},t_=function(e,t,i,r){var s=e*r-t*i<0?-1:1,o=e*i+t*r;return o>1&&(o=1),o<-1&&(o=-1),s*Math.acos(o)},D$=function(e,t,i,r,s,o,n,l,h,u,p,d){var c=Math.pow(s,2),f=Math.pow(o,2),g=Math.pow(p,2),m=Math.pow(d,2),y=c*f-c*m-f*g;y<0&&(y=0),y/=c*m+f*g,y=Math.sqrt(y)*(n===l?-1:1);var v=y*s/o*d,x=y*-o/s*p,_=u*v-h*x+(e+i)/2,$=h*v+u*x+(t+r)/2,T=(p-v)/s,S=(d-x)/o,k=(-p-v)/s,A=(-d-x)/o,L=t_(1,0,T,S),O=t_(T,S,k,A);return l===0&&O>0&&(O-=Cu),l===1&&O<0&&(O+=Cu),[_,$,L,O]},k$=function(e){var t=e.px,i=e.py,r=e.cx,s=e.cy,o=e.rx,n=e.ry,l=e.xAxisRotation,h=l===void 0?0:l,u=e.largeArcFlag,p=u===void 0?0:u,d=e.sweepFlag,c=d===void 0?0:d,f=[];if(o===0||n===0)return[];var g=Math.sin(h*Cu/360),m=Math.cos(h*Cu/360),y=m*(t-r)/2+g*(i-s)/2,v=-g*(t-r)/2+m*(i-s)/2;if(y===0&&v===0)return[];o=Math.abs(o),n=Math.abs(n);var x=Math.pow(y,2)/Math.pow(o,2)+Math.pow(v,2)/Math.pow(n,2);x>1&&(o*=Math.sqrt(x),n*=Math.sqrt(x));var _=D$(t,i,r,s,o,n,p,c,g,m,y,v),$=S$(_,4),T=$[0],S=$[1],k=$[2],A=$[3],L=Math.abs(A)/(Cu/4);Math.abs(1-L)<1e-7&&(L=1);var O=Math.max(Math.ceil(L),1);A/=O;for(var I=0;I<O;I++)f.push(T$(k,A)),k+=A;return f.map(function(R){var B=vg(R[0],o,n,m,g,T,S),Z=B.x,j=B.y,it=vg(R[1],o,n,m,g,T,S),st=it.x,ht=it.y,dt=vg(R[2],o,n,m,g,T,S),Xt=dt.x,tt=dt.y;return{x1:Z,y1:j,x2:st,y2:ht,x:Xt,y:tt}})},e_=k$;function A$(a,e,t){if(e!==t)throw new Error("Required "+t+" arguments for "+a+" but got "+e)}function Su(a,e,t){if(e<t)throw new Error("Required at least "+t+" arguments for "+a+" but got "+e)}function Gr(a,e,t){if(Su(a,e,t),e%t!==0)throw new Error("Arguments for "+a+" must be in pairs of "+t)}function O$(a){for(let e=0;e<a.length;e+=7){let t=e+3,i=a[t];if(i.length>1){let r=/^([01])([01])(.*)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a.splice(t,0,r[2]),++t,r[3].length>0?a[t]=r[3]:a.splice(t,1))}if(++t,i=a[t],i.length>1){let r=/^([01])(.+)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a[t]=r[2])}}}function i_(a){if(a===0||a===1)return a;throw new Error("Flag must be 0 or 1")}function L$(a){let e=[0,0,0];for(let t=0;t<24;t++)e[t%3]<<=1,e[t%3]|=a&1,a>>=1;return(e[0]|0)+(e[1]<<8)+(e[2]<<16)}function Kd(a,e){for(;!(a.interactive&&!e(a));)if(a._parent)a=a._parent;else break}function F$(a,e,t){return je(a,Fd(e),i=>{let r=Jm(i),s=i.touches;s?(s.length==0&&(s=i.changedTouches),t(du(s),r)):t([i],r)})}function r_(a){let e=document.createElement("canvas");e.width=1,e.height=1;let t=e.getContext("2d",{willReadFrequently:!0});t.drawImage(a,0,0,1,1);try{return t.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+a.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function Tu(a){a.width=0,a.height=0,a.style.width="0px",a.style.height="0px"}function s_(a){return Math.floor(a)+.5}var bg=class{constructor(){this._x=0,this._y=0}get x(){return this._x}get y(){return this._y}set x(e){this._x=e}set y(e){this._y=e}},Hl=class extends uo{constructor(e){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 bg,this._localMatrix=new jl,this._matrix=new jl,this._uMatrix=new jl,this._renderer=e}subStatus(e){return{inactive:this.inactive==null?e.inactive:this.inactive,layer:this._layer||e.layer}}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let e=this;for(;;){if(e._layer)return e._layer;if(e._parent)e=e._parent;else return this._renderer.defaultLayer}}setLayer(e,t){e==null?this._layer=void 0:(this._layer=this._renderer.getLayer(e,!0),this._layer.visible=!0,this._layer.margin=t,t&&co(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),this._renderer.resizeGhost())}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(e){}_getColorId(){return this._colorId===void 0&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(e){return!e.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(e){return this._isInteractive(e)}contains(e){for(;;){if(e===this)return!0;if(e._parent)e=e._parent;else return!1}}toGlobal(e){return this._matrix.apply(e)}toLocal(e){return this._matrix.applyInverse(e)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){return this._localBounds||(this._localBounds={left:1e7,top:1e7,right:-1e7,bottom:-1e7},this._addBounds(this._localBounds)),this._localBounds}getAdjustedBounds(e){this._setMatrix();let t=this.getLocalMatrix(),i=t.apply({x:e.left,y:e.top}),r=t.apply({x:e.right,y:e.top}),s=t.apply({x:e.right,y:e.bottom}),o=t.apply({x:e.left,y:e.bottom});return{left:Math.min(i.x,r.x,s.x,o.x),top:Math.min(i.y,r.y,s.y,o.y),right:Math.max(i.x,r.x,s.x,o.x),bottom:Math.max(i.y,r.y,s.y,o.y)}}on(e,t,i){return this.interactive?this._renderer._addEvent(this,e,t,i):new Be(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(e,t){let i=this._matrix,r=i.tx*t,s=i.ty*t;this.crisp&&(r=s_(r),s=s_(s)),e.setTransform(i.a*t,i.b*t,i.c*t,i.d*t,r,s)}_transformMargin(e,t,i){let r=this._matrix;e.setTransform(r.a*t,r.b*t,r.c*t,r.d*t,(r.tx+i.left)*t,(r.ty+i.top)*t)}_transformLayer(e,t,i){i.margin?this._transformMargin(e,i.scale||t,i.margin):this._transform(e,i.scale||t)}render(e,t=0){if(this.visible&&(this.exportable!==!1||!this._renderer._omitTainted)){this._setMatrix();let i=this.subStatus(e),r=this._renderer.resolution,s=this._renderer.layers,o=this._renderer._ghostLayer,n=o.context,l=this.mask;l&&l._setMatrix(),F(s,h=>{if(h){let u=h.context;u.save(),l&&(l._transformLayer(u,r,h),l._runPath(u),u.clip()),u.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(u,r,h),this.filter&&(u.filter=this.filter)}}),n.save(),l&&this._isInteractiveMask(i)&&(l._transformMargin(n,r,o.margin),l._runPath(n),n.clip()),this._transformMargin(n,r,o.margin),i.layer.order>0&&!t&&pu(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,t),n.restore(),F(s,h=>{h&&h.context.restore()})}}_render(e,t=0){this.exportable===!1&&(e.layer.tainted=!0)}_ghostOnly(e=0){return e>0}_drawGhost(e,t=0){let i=this._isInteractive(e),r=e.layer.order||0;return!!(i&&(r==0&&!this._ghostOnly(t)||r==t))}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(e=>e.value===this)}shouldCancelTouch(){let e=this._renderer;return e.tapToActivate&&!e._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}},xg=class extends Hl{constructor(){super(...arguments),this.interactiveChildren=!0,this._children=[]}_isInteractiveMask(e){return this.interactiveChildren||super._isInteractiveMask(e)}addChild(e){e._parent=this,this._children.push(e),e._layer&&this.registerChildLayer(e._layer)}addChildAt(e,t){e._parent=this,this._children.splice(t,0,e),e._layer&&this.registerChildLayer(e._layer)}removeChild(e){e._parent=void 0,si(this._children,e)}_render(e,t){super._render(e);let i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,F(this._children,r=>{r.compoundAlpha=this.compoundAlpha*this.alpha,r.render(e,t)}),this.interactive&&this.interactiveChildren&&--i._forceInteractive}registerChildLayer(e){this._childLayers||(this._childLayers=[]),ho(this._childLayers,e),this._parent&&this._parent.registerChildLayer(e)}markDirtyLayer(e=!1){super.markDirtyLayer(),e&&this._childLayers&&F(this._childLayers,t=>t.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&F(this._childLayers,e=>{e.dirty=!0})}};function vi(a,e){a.left=Math.min(a.left,e.x),a.top=Math.min(a.top,e.y),a.right=Math.max(a.right,e.x),a.bottom=Math.max(a.bottom,e.y)}var bi=class{colorize(e,t){}colorizeGhost(e,t){this.colorize(e,t)}path(e){}pathGhost(e){this.path(e)}addBounds(e){}},_g=class extends bi{colorize(e,t){e.beginPath()}},Du=class extends bi{constructor(e){super(),this.color=e}colorize(e,t){t!==void 0?e.fillStyle=t:e.fillStyle=this.color}},Pg=class extends bi{constructor(e){super(),this.clearShadow=e}colorize(e,t){e.fill(),this.clearShadow&&(e.shadowColor="",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},$g=class extends bi{colorize(e,t){e.stroke()}},ku=class extends bi{constructor(e,t,i,r){super(),this.width=e,this.color=t,this.lineJoin=i,this.lineCap=r}colorize(e,t){t!==void 0?e.strokeStyle=t:e.strokeStyle=this.color,e.lineWidth=this.width,this.lineJoin&&(e.lineJoin=this.lineJoin),this.lineCap&&(e.lineCap=this.lineCap)}},wg=class extends bi{constructor(e){super(),this.dash=e}colorize(e,t){e.setLineDash(this.dash)}},Cg=class extends bi{constructor(e){super(),this.dashOffset=e}colorize(e,t){e.lineDashOffset=this.dashOffset}},Sg=class extends bi{constructor(e,t,i,r){super(),this.x=e,this.y=t,this.width=i,this.height=r}path(e){e.rect(this.x,this.y,this.width,this.height)}addBounds(e){let t=this.x,i=this.y,r=t+this.width,s=i+this.height;vi(e,{x:t,y:i}),vi(e,{x:r,y:i}),vi(e,{x:t,y:s}),vi(e,{x:r,y:s})}},Tg=class extends bi{constructor(e,t,i){super(),this.x=e,this.y=t,this.radius=i}path(e){e.moveTo(this.x+this.radius,this.y),e.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(e){vi(e,{x:this.x-this.radius,y:this.y-this.radius}),vi(e,{x:this.x+this.radius,y:this.y+this.radius})}},Dg=class extends bi{constructor(e,t,i,r){super(),this.x=e,this.y=t,this.radiusX=i,this.radiusY=r}path(e){e.ellipse(0,0,this.radiusX,this.radiusY,0,0,Math.PI*2)}addBounds(e){vi(e,{x:this.x-this.radiusX,y:this.y-this.radiusY}),vi(e,{x:this.x+this.radiusX,y:this.y+this.radiusY})}},kg=class extends bi{constructor(e,t,i,r,s,o){super(),this.cx=e,this.cy=t,this.radius=i,this.startAngle=r,this.endAngle=s,this.anticlockwise=o}path(e){this.radius>0&&e.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(e){let t=fo(this.cx,this.cy,this.startAngle*Or,this.endAngle*Or,this.radius);vi(e,{x:t.left,y:t.top}),vi(e,{x:t.right,y:t.bottom})}},Ag=class extends bi{constructor(e,t,i,r,s){super(),this.x1=e,this.y1=t,this.x2=i,this.y2=r,this.radius=s}path(e){this.radius>0&&e.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(e){}},Og=class extends bi{constructor(e,t){super(),this.x=e,this.y=t}path(e){e.lineTo(this.x,this.y)}addBounds(e){vi(e,{x:this.x,y:this.y})}},Lg=class extends bi{constructor(e,t){super(),this.x=e,this.y=t}path(e){e.moveTo(this.x,this.y)}addBounds(e){vi(e,{x:this.x,y:this.y})}},Fg=class extends bi{path(e){e.closePath()}},Mg=class extends bi{constructor(e,t,i,r,s,o){super(),this.cpX=e,this.cpY=t,this.cpX2=i,this.cpY2=r,this.toX=s,this.toY=o}path(e){e.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(e){vi(e,{x:this.cpX,y:this.cpY}),vi(e,{x:this.cpX2,y:this.cpY2}),vi(e,{x:this.toX,y:this.toY})}},Rg=class extends bi{constructor(e,t,i,r){super(),this.cpX=e,this.cpY=t,this.toX=i,this.toY=r}path(e){e.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(e){vi(e,{x:this.cpX,y:this.cpY}),vi(e,{x:this.toX,y:this.toY})}},Ig=class extends bi{constructor(e,t,i,r,s){super(),this.color=e,this.blur=t,this.offsetX=i,this.offsetY=r,this.opacity=s}colorize(e,t){this.opacity&&(e.fillStyle=this.color),e.shadowColor=this.color,e.shadowBlur=this.blur,e.shadowOffsetX=this.offsetX,e.shadowOffsetY=this.offsetY}colorizeGhost(e,t){}},Vg=class extends bi{constructor(e,t,i,r,s){super(),this.image=e,this.width=t,this.height=i,this.x=r,this.y=s}path(e){e.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(e){vi(e,{x:this.x,y:this.y}),vi(e,{x:this.width,y:this.height})}},Eg=class extends Hl{constructor(){super(...arguments),this._operations=[],this.blendMode=Bl.NORMAL,this._hasShadows=!1}clear(){super.clear(),this._operations.length=0}_pushOp(e){this._operations.push(e)}beginFill(e,t=1){this._fillAlpha=t,e?e instanceof yt?this._pushOp(new Du(e.toCSS(t))):(this.isMeasured=!0,this._pushOp(new Du(e))):this._pushOp(new Du("rgba(0, 0, 0, "+t+")"))}endFill(){this._pushOp(new Pg(this._hasShadows))}endStroke(){this._pushOp(new $g)}beginPath(){this._pushOp(new _g)}lineStyle(e=0,t,i=1,r,s){this._strokeAlpha=i,t?t instanceof yt?this._pushOp(new ku(e,t.toCSS(i),r,s)):this._pushOp(new ku(e,t,r,s)):this._pushOp(new ku(e,"rgba(0, 0, 0, "+i+")",r,s))}setLineDash(e){this._pushOp(new wg(e||[]))}setLineDashOffset(e=0){this._pushOp(new Cg(e))}drawRect(e,t,i,r){this._pushOp(new Sg(e,t,i,r))}drawCircle(e,t,i){this._pushOp(new Tg(e,t,i))}drawEllipse(e,t,i,r){this._pushOp(new Dg(e,t,i,r))}arc(e,t,i,r,s,o=!1){this._pushOp(new kg(e,t,i,r,s,o))}arcTo(e,t,i,r,s){this._pushOp(new Ag(e,t,i,r,s))}lineTo(e,t){this._pushOp(new Og(e,t))}moveTo(e,t){this._pushOp(new Lg(e,t))}bezierCurveTo(e,t,i,r,s,o){this._pushOp(new Mg(e,t,i,r,s,o))}quadraticCurveTo(e,t,i,r){this._pushOp(new Rg(e,t,i,r))}closePath(){this._pushOp(new Fg)}shadow(e,t=0,i=0,r=0,s){this._hasShadows=!0,this._pushOp(new Ig(s?e.toCSS(s):e.toCSS(this._fillAlpha||this._strokeAlpha),t,i,r))}image(e,t,i,r,s){this._pushOp(new Vg(e,t,i,r,s))}svgPath(e){let t=0,i=0,r=null,s=null,o=null,n=null,l=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,h=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,u=this._operations.length;try{let p;for(;(p=l.exec(e))!==null;){let d=p[1],c=p[2],f=[];for(;(p=h.exec(c))!==null;)f.push(p[1]);switch(d!=="S"&&d!=="s"&&d!=="C"&&d!=="c"&&(r=null,s=null),d!=="Q"&&d!=="q"&&d!=="T"&&d!=="t"&&(o=null,n=null),d){case"M":Gr(d,f.length,2),t=+f[0],i=+f[1],this.moveTo(t,i);for(let m=2;m<f.length;m+=2)t=+f[m],i=+f[m+1],this.lineTo(t,i);break;case"m":Gr(d,f.length,2),t+=+f[0],i+=+f[1],this.moveTo(t,i);for(let m=2;m<f.length;m+=2)t+=+f[m],i+=+f[m+1],this.lineTo(t,i);break;case"L":Gr(d,f.length,2);for(let m=0;m<f.length;m+=2)t=+f[m],i=+f[m+1],this.lineTo(t,i);break;case"l":Gr(d,f.length,2);for(let m=0;m<f.length;m+=2)t+=+f[m],i+=+f[m+1],this.lineTo(t,i);break;case"H":Su(d,f.length,1);for(let m=0;m<f.length;++m)t=+f[m],this.lineTo(t,i);break;case"h":Su(d,f.length,1);for(let m=0;m<f.length;++m)t+=+f[m],this.lineTo(t,i);break;case"V":Su(d,f.length,1);for(let m=0;m<f.length;++m)i=+f[m],this.lineTo(t,i);break;case"v":Su(d,f.length,1);for(let m=0;m<f.length;++m)i+=+f[m],this.lineTo(t,i);break;case"C":Gr(d,f.length,6);for(let m=0;m<f.length;m+=6){let y=+f[m],v=+f[m+1];r=+f[m+2],s=+f[m+3],t=+f[m+4],i=+f[m+5],this.bezierCurveTo(y,v,r,s,t,i)}break;case"c":Gr(d,f.length,6);for(let m=0;m<f.length;m+=6){let y=+f[m]+t,v=+f[m+1]+i;r=+f[m+2]+t,s=+f[m+3]+i,t+=+f[m+4],i+=+f[m+5],this.bezierCurveTo(y,v,r,s,t,i)}break;case"S":Gr(d,f.length,4),(r===null||s===null)&&(r=t,s=i);for(let m=0;m<f.length;m+=4){let y=2*t-r,v=2*i-s;r=+f[m],s=+f[m+1],t=+f[m+2],i=+f[m+3],this.bezierCurveTo(y,v,r,s,t,i)}break;case"s":Gr(d,f.length,4),(r===null||s===null)&&(r=t,s=i);for(let m=0;m<f.length;m+=4){let y=2*t-r,v=2*i-s;r=+f[m]+t,s=+f[m+1]+i,t+=+f[m+2],i+=+f[m+3],this.bezierCurveTo(y,v,r,s,t,i)}break;case"Q":Gr(d,f.length,4);for(let m=0;m<f.length;m+=4)o=+f[m],n=+f[m+1],t=+f[m+2],i=+f[m+3],this.quadraticCurveTo(o,n,t,i);break;case"q":Gr(d,f.length,4);for(let m=0;m<f.length;m+=4)o=+f[m]+t,n=+f[m+1]+i,t+=+f[m+2],i+=+f[m+3],this.quadraticCurveTo(o,n,t,i);break;case"T":Gr(d,f.length,2),(o===null||n===null)&&(o=t,n=i);for(let m=0;m<f.length;m+=2)o=2*t-o,n=2*i-n,t=+f[m],i=+f[m+1],this.quadraticCurveTo(o,n,t,i);break;case"t":Gr(d,f.length,2),(o===null||n===null)&&(o=t,n=i);for(let m=0;m<f.length;m+=2)o=2*t-o,n=2*i-n,t+=+f[m],i+=+f[m+1],this.quadraticCurveTo(o,n,t,i);break;case"A":case"a":let g=d==="a";O$(f),Gr(d,f.length,7);for(let m=0;m<f.length;m+=7){let y=+f[m+5],v=+f[m+6];g&&(y+=t,v+=i);let x=e_({px:t,py:i,rx:+f[m],ry:+f[m+1],xAxisRotation:+f[m+2],largeArcFlag:i_(+f[m+3]),sweepFlag:i_(+f[m+4]),cx:y,cy:v});F(x,_=>{this.bezierCurveTo(_.x1,_.y1,_.x2,_.y2,_.x,_.y),t=_.x,i=_.y})}break;case"Z":case"z":A$(d,f.length,0),this.closePath();break}}}catch(p){this._operations.length=u,console.warn(`Error when parsing svgPath:
24
+ `+p.message+`
25
+ `+e)}}_runPath(e){e.beginPath(),F(this._operations,t=>{t.path(e)})}_render(e,t=0){super._render(e);let i=e.layer.dirty,r=this._isInteractive(e),s=this._ghostOnly(t),o=this._drawGhost(e,t);if(i||r||s){let n=e.layer.context,l=this._renderer._ghostLayer.context;i&&!s&&(n.globalCompositeOperation=this.blendMode,n.beginPath());let h;o&&(l.beginPath(),h=this._getColorId()),F(this._operations,u=>{i&&!s&&(u.path(n),u.colorize(n,void 0)),o&&(u.pathGhost(l),u.colorizeGhost(l,h))})}}renderDetached(e){if(this.visible){this._setMatrix(),e.save();let t=this.mask;t&&(t._setMatrix(),t._transform(e,1),t._runPath(e),e.clip()),e.globalAlpha=this.compoundAlpha*this.alpha,this._transform(e,1),this.filter&&(e.filter=this.filter),e.globalCompositeOperation=this.blendMode,e.beginPath(),F(this._operations,i=>{i.path(e),i.colorize(e,void 0)}),e.restore()}}_addBounds(e){this.visible&&this.isMeasured&&F(this._operations,t=>{t.addBounds(e)})}},qd=class extends Hl{constructor(e,t,i){super(e),this.resolution=1,this.textVisible=!0,this._originalScale=1,this.text=t,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(e){this.style.textAlign&&(e.textAlign=this.style.textAlign),this.style.direction&&(e.direction=this.style.direction),this.style.textBaseline&&(e.textBaseline=this.style.textBaseline)}_prerender(e,t=!1,i=!1){super._render(e);let r=e.layer.context,s=this._renderer._ghostLayer.context,o=this.style,n=this._getFontStyle(void 0,i);r.font=n,this._isInteractive(e)&&!t&&(s.font=n),o.fill&&(o.fill instanceof yt?r.fillStyle=o.fill.toCSS(o.fillOpacity!=null?o.fillOpacity:1):r.fillStyle=o.fill),o.shadowColor&&(e.layer.context.shadowColor=o.shadowColor.toCSS(o.shadowOpacity||1)),o.shadowBlur&&(e.layer.context.shadowBlur=o.shadowBlur),o.shadowOffsetX&&(e.layer.context.shadowOffsetX=o.shadowOffsetX),o.shadowOffsetY&&(e.layer.context.shadowOffsetY=o.shadowOffsetY),this._shared(r),this._isInteractive(e)&&!t&&(s.fillStyle=this._getColorId(),this._shared(s))}_getFontStyle(e,t=!1){let i=this.style,r=[];return e&&e.fontVariant?r.push(e.fontVariant):i.fontVariant&&r.push(i.fontVariant),t||(e&&e.fontWeight?r.push(e.fontWeight):i.fontWeight&&r.push(i.fontWeight)),e&&e.fontStyle?r.push(e.fontStyle):i.fontStyle&&r.push(i.fontStyle),e&&e.fontSize?(M(e.fontSize)&&(e.fontSize=e.fontSize+"px"),r.push(e.fontSize)):i.fontSize&&(M(i.fontSize)&&(i.fontSize=i.fontSize+"px"),r.push(i.fontSize)),e&&e.fontFamily?r.push(e.fontFamily):i.fontFamily?r.push(i.fontFamily):r.length&&r.push("Arial"),r.join(" ")}_render(e,t=0){if(this._textInfo||this._measure(e),this.textVisible){let i=this._isInteractive(e),r=e.layer.context,s=e.layer.dirty,o=this._renderer._ghostLayer.context,n=this._ghostOnly(t),l=this._drawGhost(e,t);r.save(),o.save(),this._prerender(e),F(this._textInfo,(h,u)=>{F(h.textChunks,(p,d)=>{if(p.style&&(r.save(),o.save(),n||(r.font=p.style),this._isInteractive(e)&&(o.font=p.style)),p.fill&&(r.save(),n||(r.fillStyle=p.fill.toCSS())),s&&!n&&r.fillText(p.text,p.offsetX,h.offsetY+p.offsetY),p.textDecoration=="underline"||p.textDecoration=="line-through"){let c=1,f=1,g=p.height,m=this.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(m)>-1){let x=this._measureText(p.text,r);p.width=x.actualBoundingBoxLeft+x.actualBoundingBoxRight}let y=p.offsetX;switch(this.style.textAlign){case"right":case"end":y-=p.width;break;case"center":y-=p.width/2;break}if(p.style)switch(Bi.getTextStyle(p.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":c=2;break}g&&(f=g/20);let v;p.textDecoration=="line-through"?v=c+h.offsetY+p.offsetY-p.height/2:v=c+f*1.5+h.offsetY+p.offsetY,n||(r.save(),r.beginPath(),p.fill?r.strokeStyle=p.fill.toCSS():this.style.fill&&this.style.fill instanceof yt&&(r.strokeStyle=this.style.fill.toCSS()),r.lineWidth=c*f,r.moveTo(y,v),r.lineTo(y+p.width,v),r.stroke(),r.restore())}i&&this.interactive&&l&&o.fillText(p.text,p.offsetX,h.offsetY+p.offsetY),p.fill&&r.restore(),p.style&&(r.restore(),o.restore())})}),r.restore(),o.restore()}}_addBounds(e){if(this.visible&&this.isMeasured){let t=this._measure({inactive:this.inactive,layer:this.getLayer()});vi(e,{x:t.left,y:t.top}),vi(e,{x:t.right,y:t.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(e){let t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl";this._textInfo=[];let s=this.style.oversizedBehavior,o=this.style.maxWidth,n=M(o)&&s=="truncate",l=M(o)&&(s=="wrap"||s=="wrap-no-break");t.save(),i.save(),this._prerender(e,!0,this._ignoreFontWeight());let h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",u=this.text.toString().replace(/\r/g,"").split(/\n/),p=!0,d=0,c=0,f=0,g;F(u,(y,v)=>{let x;for(y==""?x=[{type:"value",text:""}]:x=Bi.chunk(y,!1,this.style.ignoreFormatting);x.length>0;){let _={offsetY:f,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},$=this._measureText(h,t),T=$.actualBoundingBoxAscent+$.actualBoundingBoxDescent;_.height=T,_.ascent=$.actualBoundingBoxAscent;let S,k=this.style.textDecoration,A,L,O=!1,I=!0,R=[],B;uu(x,(Z,j)=>{if(Z.type=="format")if(Z.text=="[/]")p||(t.restore(),i.restore(),p=!0),A=void 0,g=void 0,L=void 0,k=this.style.textDecoration,B=void 0,S=Z.text;else{p||(t.restore(),i.restore());let it=Bi.getTextStyle(Z.text),st=this._getFontStyle(it);t.save(),i.save(),t.font=st,g=st,S=Z.text,it.textDecoration&&(k=it.textDecoration),it.fill&&(A=it.fill),it.width&&(L=zi(it.width)),it.verticalAlign&&(B=it.verticalAlign),p=!1;let ht=this._measureText(h,t),dt=ht.actualBoundingBoxAscent+ht.actualBoundingBoxDescent;dt>_.height&&(_.height=dt),ht.actualBoundingBoxAscent>_.ascent&&(_.ascent=ht.actualBoundingBoxAscent)}else if(Z.type=="value"&&!O){let it=this._measureText(Z.text,t),st=it.actualBoundingBoxLeft+it.actualBoundingBoxRight;if(n){this.truncated=void 0;let tt=I||this.style.breakWords||!1,Tt=this.style.ellipsis||"",Nt=this._measureText(Tt,t),Pe=Nt.actualBoundingBoxLeft+Nt.actualBoundingBoxRight;if(_.width+st>o){let ye=o-_.width-Pe;Z.text=this._truncateText(t,Z.text,ye,tt),Z.text+=Tt,O=!0,this.truncated=!0}}else if(l&&_.width+st>o){let tt=o-_.width,Tt=this._truncateText(t,Z.text,tt,!1,I&&this.style.oversizedBehavior!="wrap-no-break");if(Tt=="")return this.textVisible=!0,!1;R=x.slice(j+1),po(Tt)!=po(Z.text)&&(R.unshift({type:"value",text:Z.text.substr(Tt.length)}),S&&R.unshift({type:"format",text:S})),Z.text=po(Tt),x=[],O=!0}let ht=1,dt=1;if(g&&L&&L>st){let tt=st/L;switch(this.style.textAlign){case"right":case"end":ht=tt;break;case"center":ht=tt,dt=tt;break;default:dt=tt}st=L}let Xt=it.actualBoundingBoxAscent+it.actualBoundingBoxDescent;Xt>_.height&&(_.height=Xt),it.actualBoundingBoxAscent>_.ascent&&(_.ascent=it.actualBoundingBoxAscent),_.width+=st,_.left+=it.actualBoundingBoxLeft/ht,_.right+=it.actualBoundingBoxRight/dt,_.textChunks.push({style:g,fill:A,text:Z.text,width:st,height:Xt,left:it.actualBoundingBoxLeft,right:it.actualBoundingBoxRight,ascent:it.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:k,verticalAlign:B}),I=!1}return!0}),this.style.lineHeight instanceof St?(_.height*=this.style.lineHeight.value,_.ascent*=this.style.lineHeight.value):(_.height*=this.style.lineHeight||1.2,_.ascent*=this.style.lineHeight||1.2),d<_.left&&(d=_.left),c<_.right&&(c=_.right),this._textInfo.push(_),f+=_.height,x=R||[]}}),p||(t.restore(),i.restore()),F(this._textInfo,(y,v)=>{let x=0;F(y.textChunks,_=>{if(_.offsetX=x+_.left-y.left,_.offsetY+=y.height-y.height*(this.style.baselineRatio||.19),x+=_.width*(r?-1:1),_.verticalAlign)switch(_.verticalAlign){case"super":_.offsetY-=y.height/2-_.height/2;break;case"sub":_.offsetY+=_.height/2;break}})});let m={left:r?-c:-d,top:0,right:r?d:c,bottom:f};if(s!=="none"){let y=this._fitRatio(m);if(y<1)if(s=="fit")M(this.style.minScale)&&y<this.style.minScale?(this.textVisible=!1,m.left=0,m.top=0,m.right=0,m.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=y,this.textVisible=!0);else if(s=="hide")this.textVisible=!1,m.left=0,m.top=0,m.right=0,m.bottom=0;else{switch(this.style.textAlign){case"right":case"end":m.left=r?o:-o,m.right=0;break;case"center":m.left=-o/2,m.right=o/2;break;default:m.left=0,m.right=r?-o:o}this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}return t.restore(),i.restore(),m}_fitRatio(e){let t=this.style.maxWidth,i=this.style.maxHeight;if(!M(t)&&!M(i))return 1;let r=e.right-e.left,s=e.bottom-e.top;return Math.min(t/r||1,i/s||1)}_truncateText(e,t,i,r=!1,s=!0){let o;do{if(r)t=t.slice(0,-1);else{let l=t.replace(/[^,;:!?\\\/\s​]+[,;:!?\\\/\s​]*$/g,"");if((l==""||l===t)&&s)r=!0;else{if(l=="")return t;t=l}}let n=this._measureText(t,e);o=n.actualBoundingBoxLeft+n.actualBoundingBoxRight}while(o>i&&t!="");return t}_measureText(e,t){let i=t.measureText(e),r={};if(i.actualBoundingBoxAscent==null){let o=document.createElement("div");o.innerText=e,o.style.visibility="hidden",o.style.position="absolute",o.style.top="-1000000px;",o.style.fontFamily=this.style.fontFamily||"",o.style.fontSize=this.style.fontSize+"",document.body.appendChild(o);let n=o.getBoundingClientRect();document.body.removeChild(o);let l=n.height,h=i.width;r={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:h,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:h}}else r={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};let s=i.width;switch(this.style.textAlign){case"right":case"end":r.actualBoundingBoxLeft=s,r.actualBoundingBoxRight=0;break;case"center":r.actualBoundingBoxLeft=s/2,r.actualBoundingBoxRight=s/2;break;default:r.actualBoundingBoxLeft=0,r.actualBoundingBoxRight=s}return r}},Ng=class{constructor(){this.lineHeight=Jt(120),this.baselineRatio=.19,this.oversizedBehavior="none",this.breakWords=!1,this.ellipsis="\u2026",this.ignoreFormatting=!1}},Bg=class extends qd{constructor(){super(...arguments),this.textType="circular",this.inside=!1,this.orientation="auto",this.kerning=0,this._textReversed=!1}_render(e,t=0){this.textType==="circular"?this._renderCircular(e,t):super._render(e,t)}_renderCircular(e,t=0){if(this.textVisible){this._prerender(e);let i=this._isInteractive(e),r=e.layer.context,s=e.layer.dirty,o=this._renderer._ghostLayer.context;r.save(),i&&o.save(),this._textInfo||this._measure(e);let n=this.radius||0,l=this.startAngle||0,h=0,u=this.orientation,p=u=="auto"?"auto":u=="inward",d=this.inside,c=this.style.textAlign||"left",f=this.kerning||0,g=c=="left"?1:-1,m=!this._textReversed,y=this._ghostOnly(t),v=this._drawGhost(e,t);if(p=="auto"){let x=0,_=0;F(this._textInfo,($,T)=>{let S=l+$.width/(n-$.height)/2*-g;S>x&&(x=S)}),c=="left"?_=(x+h/2)*Or:c=="right"?_=(x-h/2)*Or:_=l*Or,_=ar(_),p=_>=270||_<=90}p==!0&&m&&(this._textInfo.reverse(),this._textReversed=!0),F(this._textInfo,(x,_)=>{let $=x.height;d||(n+=$),(g==-1&&p||g==1&&!p)&&m&&x.textChunks.reverse();let T=l;h=0,c=="center"&&(T+=x.width/(n-$)/2*-g,h=T-l),T+=Math.PI*(p?0:1),r.save(),i&&o.save(),y||r.rotate(T),i&&o.rotate(T);let S=0;F(x.textChunks,(k,A)=>{let L=k.text,O=k.width;S=O/2/(n-$)*g,y||r.rotate(S),i&&o.rotate(S),k.style&&(r.save(),o.save(),y||(r.font=k.style),i&&(o.font=k.style)),k.fill&&(r.save(),y||(r.fillStyle=k.fill.toCSS())),y||(r.textBaseline="middle",r.textAlign="center"),i&&(o.textBaseline="middle",o.textAlign="center"),s&&!y&&r.fillText(L,0,(p?1:-1)*(0-n+$/2)),i&&v&&o.fillText(L,0,(p?1:-1)*(0-n+$/2)),k.fill&&r.restore(),k.style&&(r.restore(),o.restore()),S=(O/2+f)/(n-$)*g,y||r.rotate(S),i&&o.rotate(S)}),r.restore(),i&&o.restore(),d&&(n-=$)}),r.restore(),i&&o.restore()}}_measure(e){return this.textType==="circular"?this._measureCircular(e):super._measure(e)}_measureCircular(e){let t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl",s=this.style.oversizedBehavior,o=this.style.maxWidth,n=M(o)&&s=="truncate",l=this.style.ellipsis||"",h;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,t.save(),i.save(),this._prerender(e,!0);let u=this.text.toString().replace(/\r/g,"").split(/\n/),p=!0,d=0,c=0;return F(u,(f,g)=>{let m=Bi.chunk(f,!1,this.style.ignoreFormatting),y={offsetY:c,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},v,x,_;F(m,($,T)=>{if($.type=="format"){if($.text=="[/]")p||(t.restore(),i.restore(),p=!0),x=void 0,v=void 0,_=void 0;else{let S=Bi.getTextStyle($.text),k=this._getFontStyle(S);t.save(),i.save(),t.font=k,v=k,S.fill&&(x=S.fill),S.width&&(_=zi(S.width)),p=!1}n&&(h=this._measureText(l,t))}else if($.type=="value"){let S=$.text.match(/./ug)||[];r&&(S=Nx($.text),S.reverse());for(let k=0;k<S.length;k++){let A=S[k],L=this._measureText(A,t),O=L.width;v&&_&&_>O&&(O=_);let I=L.actualBoundingBoxAscent+L.actualBoundingBoxDescent;if(I>y.height&&(y.height=I),L.actualBoundingBoxAscent>y.ascent&&(y.ascent=L.actualBoundingBoxAscent),d+=O,n){h||(h=this._measureText(l,t));let R=h.actualBoundingBoxLeft+h.actualBoundingBoxRight;if(d+R>o){y.textChunks.length==1?this.textVisible=!1:(y.width+=R,y.left+=h.actualBoundingBoxLeft,y.right+=h.actualBoundingBoxRight,y.textChunks.push({style:v,fill:x,text:l,width:R,height:I+h.actualBoundingBoxDescent,left:h.actualBoundingBoxLeft,right:h.actualBoundingBoxRight,ascent:h.actualBoundingBoxAscent,offsetX:0,offsetY:I,textDecoration:void 0}));break}}y.width+=O,y.left+=L.actualBoundingBoxLeft,y.right+=L.actualBoundingBoxRight,y.textChunks.push({style:v,fill:x,text:A,width:O,height:I+L.actualBoundingBoxDescent,left:L.actualBoundingBoxLeft,right:L.actualBoundingBoxRight,ascent:L.actualBoundingBoxAscent,offsetX:0,offsetY:I,textDecoration:void 0})}}}),this.style.lineHeight instanceof St?y.height*=this.style.lineHeight.value:y.height*=this.style.lineHeight||1.2,this._textInfo.push(y),c+=y.height}),p||(t.restore(),i.restore()),s=="hide"&&d>o&&(this.textVisible=!1),F(this._textInfo,f=>{F(f.textChunks,g=>{g.offsetY+=Math.round((f.height-g.height+(f.ascent-g.ascent))/2)})}),t.restore(),i.restore(),{left:0,top:0,right:0,bottom:0}}},jg=class extends Hl{constructor(e,t){super(e),this.image=t}_dispose(){super._dispose(),this._imageMask&&Tu(this._imageMask)}getLocalBounds(){if(!this._localBounds){let e=0,t=0;this.width&&(e=this.width),this.height&&(t=this.height),this._localBounds={left:0,top:0,right:e,bottom:t},this._addBounds(this._localBounds)}return this._localBounds}_render(e,t=0){if(super._render(e),this.image){if(this.tainted===void 0&&(this.tainted=r_(this.image),e.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;let i=this._ghostOnly(t),r=this._drawGhost(e,t);if(e.layer.dirty&&!i){this.shadowColor&&(e.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(e.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(e.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(e.layer.context.shadowOffsetY=this.shadowOffsetY);let s=this.width||this.image.naturalWidth,o=this.height||this.image.naturalHeight;e.layer.context.drawImage(this.image,0,0,s,o)}if(this.interactive&&this._isInteractive(e)&&r){let s=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(s,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(e){if(this._imageMask===void 0){let t=this.width||e.naturalWidth,i=this.height||e.naturalHeight,r=document.createElement("canvas");r.width=t,r.height=i;let s=r.getContext("2d");s.imageSmoothingEnabled=!1,s.fillStyle=this._getColorId(),s.fillRect(0,0,t,i),r_(e)||(s.globalCompositeOperation="destination-in",s.drawImage(e,0,0,t,i)),this._imageMask=r}return this._imageMask}},Hg=class{constructor(e,t,i,r){this.event=e,this.originalPoint=t,this.point=i,this.bbox=r,this.simulated=!1,this.native=!0,as("touchevents")&&e instanceof Touch?this.id=e.identifier:this.id=null}},Zd=class extends kd{constructor(e){if(super(),this.view=document.createElement("div"),this._layerDom=document.createElement("div"),this.layers=[],this._dirtyLayers=[],this.defaultLayer=this.getLayer(0),this._ghostLayer=new Xg,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.interactionsEnabled=!0,this._listeners={},this._events={},this._colorId=0,this._colorMap={},this._forceInteractive=0,this._omitTainted=!1,this._hovering=new Set,this._dragging=[],this._mousedown=[],this.tapToActivate=!1,this.tapToActivateTimeout=3e3,this._touchActive=!1,e==null?this.resolution=window.devicePixelRatio:this.resolution=e,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new Be(()=>{Vt(this._events,(t,i)=>{i.disposer.dispose()}),F(this.layers,t=>{Tu(t.view),t.exportableView&&Tu(t.exportableView)}),Tu(this._ghostLayer.view),Tu(this._patternCanvas)})),this._disposers.push(Od(()=>{e==null&&(this.resolution=window.devicePixelRatio)})),as("touchevents")){let t=i=>{this._dragging.length!==0&&uu(this._dragging,r=>r.value.shouldCancelTouch()?(i.preventDefault(),!1):!0),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(je(window,"touchstart",t,{passive:!1})),this._disposers.push(je(this.view,"touchstart",t,{passive:!1})),this._disposers.push(je(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(je(window,"click",i=>{this._touchActive=!1},{passive:!0})),this._disposers.push(je(this.view,"click",i=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}as("wheelevents")&&this._disposers.push(je(this.view,"wheel",t=>{let i=!1;this._hovering.forEach(r=>{if(r.wheelable)return i=!0,!1}),i&&t.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(e){e?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(e,t,i,r){return this.defaultLayer.context.createLinearGradient(e,t,i,r)}createRadialGradient(e,t,i,r,s,o){return this.defaultLayer.context.createRadialGradient(e,t,i,r,s,o)}createPattern(e,t,i,r,s){return this._patternCanvas.width=r,this._patternCanvas.height=s,this._patternContext.clearRect(0,0,r,s),t.renderDetached(this._patternContext),e.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new xg(this)}makeGraphics(){return new Eg(this)}makeText(e,t){return new qd(this,e,t)}makeTextStyle(){return new Ng}makeRadialText(e,t){return new Bg(this,e,t)}makePicture(e){return new jg(this,e)}resizeLayer(e){e.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(e,t,i,r){this._realWidth=e,this._realHeight=t,this._calculatedWidth=i,this._calculatedHeight=r,F(this.layers,s=>{s&&(s.dirty=!0,this.resizeLayer(s))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=r+"px"}createDetachedLayer(e=!1){let t=document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:e}),r=new Yg(t,i);return t.style.position="absolute",t.style.top="0px",t.style.left="0px",r}getLayerByOrder(e){let t=this.layers,i=t.length;for(let r=0;r<i;r++){let s=t[r];if(s.order==e)return s}}getLayer(e,t=!0){let i=this.getLayerByOrder(e);if(i)return i;let r=this.createDetachedLayer(e==99);r.order=e,r.visible=t,r.view.className="am5-layer-"+e,r.visible&&this.resizeLayer(r);let s=this.layers;s.push(r),s.sort((h,u)=>h.order>u.order?1:h.order<u.order?-1:0);let o=s.length,n=Ks(s,r),l;for(let h=n+1;h<o;h++)if(s[h].visible){l=s[h];break}return r.visible&&(l===void 0?this._layerDom.appendChild(r.view):this._layerDom.insertBefore(r.view,l.view)),r}render(e){this._dirtyLayers.length=0,this._deferredGhostLayers=[],F(this.layers,i=>{i&&i.dirty&&i.visible&&(this._dirtyLayers.push(i),i.clear())}),this._ghostLayer.clear(),e.render({inactive:null,layer:this.defaultLayer});let t=this._deferredGhostLayers;if(t.length&&(t.sort((i,r)=>i-r),F(t,i=>{e.render({inactive:null,layer:this.defaultLayer},i)})),this._ghostLayer.context.restore(),F(this.layers,i=>{if(i){let r=i.context;r.beginPath(),r.moveTo(0,0),r.stroke()}}),F(this._dirtyLayers,i=>{i.context.restore(),i.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){let{events:i,target:r,native:s}=this._lastPointerMoveEvent;F(i,o=>{this._dispatchGlobalMousemove(o,r,s)})}}paintId(e){let t=L$(++this._colorId),i=yt.fromHex(t).toCSS();return this._colorMap[i]=e,i}_removeObject(e){e._colorId!==void 0&&delete this._colorMap[e._colorId]}_adjustBoundingBox(e){let t=this._ghostLayer.margin;return new DOMRect(-t.left,-t.top,e.width+t.left+t.right,e.height+t.top+t.bottom)}getEvent(e,t=!0){let i=this.view.getBoundingClientRect(),r=e.clientX||0,s=e.clientY||0,o=this._calculatedWidth/this._realWidth,n=this._calculatedHeight/this._realHeight,l={x:r-i.left,y:s-i.top},h={x:(r-(t?i.left:0))*o,y:(s-(t?i.top:0))*n};return new Hg(e,l,h,this._adjustBoundingBox(i))}_getHitTarget(e,t,i){if(t.width===0||t.height===0||e.x<t.left||e.x>t.right||e.y<t.top||e.y>t.bottom||!i||!this._layerDom.contains(i))return;let r=this._ghostLayer.getImageData(e,t);if(r.data[0]===0&&r.data[1]===0&&r.data[2]===0)return!1;let s=yt.fromRGB(r.data[0],r.data[1],r.data[2]).toCSS();return this._colorMap[s]}getObjectAtPoint(e){let t=this._ghostLayer.getImageArray(e);if(t[0]===0&&t[1]===0&&t[2]===0)return;let i=yt.fromRGB(t[0],t[1],t[2]).toCSS();return this._colorMap[i]}_withEvents(e,t){let i=this._events[e];if(i!==void 0){i.dispatching=!0;try{t(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,fn(i.callbacks,r=>!r.disposed),i.callbacks.length===0&&(i.disposer.dispose(),delete this._events[e]))}}}_dispatchEventAll(e,t){this.interactionsEnabled&&this._withEvents(e,i=>{F(i.callbacks,r=>{r.disposed||r.callback.call(r.context,t)})})}_dispatchEvent(e,t,i){if(!this.interactionsEnabled)return!1;let r=!1;return this._withEvents(e,s=>{F(s.callbacks,o=>{!o.disposed&&o.object===t&&(o.callback.call(o.context,i),r=!0)})}),r}_dispatchMousedown(e,t){let i=e.button;if(i!=0&&i!=2&&i!=1&&i!==void 0)return;let r=this.getEvent(e),s=this._getHitTarget(r.originalPoint,r.bbox,t);if(s){let o=r.id,n=!1;Kd(s,l=>{let h={id:o,value:l};return this._mousedown.push(h),!n&&this._dispatchEvent("pointerdown",l,r)&&(n=!0,this._dragging.some(p=>p.value===l&&p.id===o)||this._dragging.push(h)),!0})}}_dispatchGlobalMousemove(e,t,i){let r=this.getEvent(e),s=this._getHitTarget(r.originalPoint,r.bbox,t);r.native=i,s?(this._hovering.forEach(o=>{o.contains(s)||(this._hovering.delete(o),o.cursorOverStyle&&yu(document.body,"cursor",o._replacedCursorStyle),this._dispatchEvent("pointerout",o,r))}),r.native&&Kd(s,o=>(this._hovering.has(o)||(this._hovering.add(o),o.cursorOverStyle&&(o._replacedCursorStyle=Rx(document.body,"cursor"),yu(document.body,"cursor",o.cursorOverStyle)),this._dispatchEvent("pointerover",o,r)),!0))):(this._hovering.forEach(o=>{o.cursorOverStyle&&yu(document.body,"cursor",o._replacedCursorStyle),this._dispatchEvent("pointerout",o,r)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",r)}removeHovering(e){this._hovering.delete(e),e.cursorOverStyle&&yu(document.body,"cursor",e._replacedCursorStyle)}_dispatchGlobalMouseup(e,t){let i=this.getEvent(e);i.native=t,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(e){if(this._dragging.length!==0){let t=this.getEvent(e),i=t.id;this._dragging.forEach(r=>{r.id===i&&this._dispatchEvent("pointermove",r.value,t)})}}_dispatchDragEnd(e,t){let i=e.button,r;if(i==0||i===void 0)r="click";else if(i==2)r="rightclick";else if(i==1)r="middleclick";else return;let s=this.getEvent(e),o=s.id;if(this._mousedown.length!==0){let n=this._getHitTarget(s.originalPoint,s.bbox,t);n&&this._mousedown.forEach(l=>{l.id===o&&l.value.contains(n)&&this._dispatchEvent(r,l.value,s)}),this._mousedown.length=0}this._dragging.length!==0&&(this._dragging.forEach(n=>{n.id===o&&this._dispatchEvent("pointerup",n.value,s)}),this._dragging.length=0)}_dispatchDoubleClick(e,t){let i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&Kd(r,s=>!this._dispatchEvent("dblclick",s,i))}_dispatchWheel(e,t){let i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&Kd(r,s=>!this._dispatchEvent("wheel",s,i))}_makeSharedEvent(e,t){if(this._listeners[e]===void 0){let i=t();this._listeners[e]=new Il(()=>{delete this._listeners[e],i.dispose()})}return this._listeners[e].increment()}_onPointerEvent(e,t){let i=!1,r=null;function s(){r=null,i=!1}return new qe([new Be(()=>{r!==null&&clearTimeout(r),s()}),je(this.view,Fd(e),o=>{i=!0,r!==null&&clearTimeout(r),r=window.setTimeout(s,0)}),F$(window,e,(o,n)=>{r!==null&&(clearTimeout(r),r=null),t(o,n,i),i=!1})])}_initEvent(e){switch(e){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{let t=(i,r,s)=>{this._lastPointerMoveEvent={events:i,target:r,native:s},F(i,o=>{this._dispatchGlobalMousemove(o,r,s)})};return new qe([this._onPointerEvent("pointerdown",t),this._onPointerEvent("pointermove",t)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{let t=this._onPointerEvent("pointerup",(r,s,o)=>{F(r,n=>{this._dispatchGlobalMouseup(n,o)}),this._lastPointerMoveEvent={events:r,target:s,native:o}}),i=this._onPointerEvent("pointercancel",(r,s,o)=>{F(r,n=>{this._dispatchGlobalMouseup(n,o)}),this._lastPointerMoveEvent={events:r,target:s,native:o}});return new Be(()=>{t.dispose(),i.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{let t=this._onPointerEvent("pointerdown",(o,n)=>{F(o,l=>{this._dispatchMousedown(l,n)})}),i=this._onPointerEvent("pointermove",o=>{F(o,n=>{this._dispatchDragMove(n)})}),r=this._onPointerEvent("pointerup",(o,n)=>{F(o,l=>{this._dispatchDragEnd(l,n)})}),s=this._onPointerEvent("pointercancel",(o,n)=>{F(o,l=>{this._dispatchDragEnd(l,n)})});return new Be(()=>{t.dispose(),i.dispose(),r.dispose(),s.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(t,i)=>{F(t,r=>{this._dispatchDoubleClick(r,i)})}));case"wheel":return this._makeSharedEvent("wheel",()=>je(this.view,Fd("wheel"),t=>{this._dispatchWheel(t,Jm(t))},{passive:!1}))}}_addEvent(e,t,i,r){let s=this._events[t];s===void 0&&(s=this._events[t]={disposer:this._initEvent(t),callbacks:[],dispatching:!1,cleanup:!1});let o={object:e,context:r,callback:i,disposed:!1};return s.callbacks.push(o),new Be(()=>{o.disposed=!0,s.dispatching?s.cleanup=!0:(si(s.callbacks,o),s.callbacks.length===0&&(s.disposer.dispose(),delete this._events[t]))})}getCanvas(e,t){this.render(e),t||(t={});let i=this.resolution,r=Math.floor(this._calculatedWidth*this.resolution),s=Math.floor(this._calculatedHeight*this.resolution);if(t.minWidth&&t.minWidth>r){let c=t.minWidth/r;c>i&&(i=c*this.resolution)}if(t.minHeight&&t.minHeight>s){let c=t.minHeight/s;c>i&&(i=c*this.resolution)}if(t.maxWidth&&t.maxWidth<r){let c=t.maxWidth/r;c<i&&(i=c*this.resolution)}if(t.maxHeight&&t.maxHeight>s){let c=t.maxHeight/s;c<i&&(i=c*this.resolution)}t.maintainPixelRatio&&(i/=this.resolution);let o=[],n=!1,l=document.createElement("canvas");i!=this.resolution&&(n=!0,r=r*i/this.resolution,s=s*i/this.resolution),l.width=r,l.height=s,l.style.position="fixed",l.style.top="-10000px",this.view.appendChild(l),o.push(l);let h=l.getContext("2d"),u=0,p=0,d=!1;return F(this.layers,c=>{if(c&&c.visible&&(c.tainted||n)){d=!0,c.exportableView=c.view,c.exportableContext=c.context,c.view=document.createElement("canvas"),c.view.style.position="fixed",c.view.style.top="-10000px",this.view.appendChild(c.view),o.push(c.view);let f=0,g=0;c.margin&&(f+=c.margin.left||0+c.margin.right||0,g+=c.margin.top||0+c.margin.bottom||0),c.view.width=r+f,c.view.height=s+g,c.context=c.view.getContext("2d"),c.dirty=!0,c.scale=i}}),d&&(this._omitTainted=!0,this.render(e),this._omitTainted=!1),F(this.layers,c=>{if(c&&c.visible){let f=0,g=0;c.margin&&(f=-(c.margin.left||0)*this.resolution,g=-(c.margin.top||0)*this.resolution),h.drawImage(c.view,f,g),c.exportableView&&(c.view=c.exportableView,c.exportableView=void 0),c.exportableContext&&(c.context=c.exportableContext,c.exportableContext=void 0),u<c.view.clientWidth&&(u=c.view.clientWidth),p<c.view.clientHeight&&(p=c.view.clientHeight),c.scale=void 0}}),l.style.width=u+"px",l.style.height=p+"px",F(o,c=>{c.style.position="",c.style.top="",this.view.removeChild(c)}),l}},Xg=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(e,t,i,r,s){this._resolution=s,e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=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(e*s),this._height=Math.floor(t*s),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}getImageData(e,t){return this.context.getImageData(Math.round((e.x-t.left)/t.width*this._width),Math.round((e.y-t.top)/t.height*this._height),1,1)}getImageArray(e){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);let t=this.imageArray,i=Math.round(e.x*this._resolution),s=(Math.round(e.y*this._resolution)*this._width+i)*4;return[t[s],t[s+1],t[s+2],t[s+3]]}setMargin(e){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,F(e,t=>{t.margin&&(this.margin.left=Math.max(this.margin.left,t.margin.left),this.margin.right=Math.max(this.margin.right,t.margin.right),this.margin.top=Math.max(this.margin.top,t.margin.top),this.margin.bottom=Math.max(this.margin.bottom,t.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}},Yg=class{constructor(e,t){this.tainted=!0,this.order=0,this.visible=!0,this.dirty=!0,this._width=0,this._height=0,this.view=e,this.context=t}resize(e,t,i,r,s){this.width!=null&&(e=this.width,i=this.width),this.height!=null&&(t=this.height,r=this.height),this.margin?(e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=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(e*s),this._height=Math.floor(t*s),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}};function a_(a,e){a==null?requestAnimationFrame(e):setTimeout(()=>{requestAnimationFrame(e)},1e3/a)}var Au=class a{constructor(e,t={},i){if(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 Yr,this.animationTime=null,this._animations=[],this.language=Gd.new(this,{}),this.locale=Wd,this.utc=!1,this.numberFormatter=vn.new(this,{}),this.dateFormatter=xn.new(this,{}),this.durationFormatter=zd.new(this,{}),this.tabindex=0,this._tabindexes=[],this._a11yD=!1,this._focusElementDirty=!1,this._skipNextGroupJump=!0,this.verticalLayout=Zs.new(this,{}),this.horizontalLayout=qs.new(this,{}),this.gridLayout=ns.new(this,{}),this._paused=!1,this.autoResize=!0,this._fontHash=[],this._isDisposed=!1,this._disposers=[],this._tooltips=[],this._htmlEnabledContainers=[],this.entitiesById={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=t,t.accessible==!1&&(this._a11yD=!0),t.useSafeResolution==null&&(t.useSafeResolution=!0);let r;t.useSafeResolution&&(r=Ix()),this._renderer=new Zd(r);let s;if(e instanceof HTMLElement?s=e:s=document.getElementById(e),F(Xr.rootElements,l=>{if(l.dom===s)if(Xr.autoDispose)l.dispose();else throw new Error("You cannot have multiple Roots on the same DOM node")}),this.interfaceColors=bn.new(this,{}),s===null)throw new Error("Could not find HTML element with id `"+e+"`");this.dom=s;let o=document.createElement("div");o.style.position="relative",o.style.width="100%",o.style.height="100%",s.appendChild(o);let n=t.tooltipContainerBounds;n&&(this._tooltipContainerSettings=n),this._inner=o,this._updateComputedStyles(),Xr.rootElements.push(this)}static new(e,t){let i=new a(e,t,!0);return i._init(),i}moveDOM(e){let t;if(e instanceof HTMLElement?t=e:t=document.getElementById(e),t){for(;this.dom.childNodes.length>0;)t.appendChild(this.dom.childNodes[0]);this.dom=t,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){let e=this.dom.offsetWidth,t=this.dom.offsetHeight;e<=150||t<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){let e=this.tooltipContainer.children.push(ot.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:Jt(100),centerY:X,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:X,cursorOverStyle:"pointer",background:He.new(this,{fill:Wi(4671320),fillOpacity:0,tooltipY:5})}));e.set("tooltip",this.systemTooltip),e.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),e.states.create("hover",{});let t=e.children.push(kt.new(this,{stroke:Wi(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}));t.states.create("hover",{stroke:Wi(3976191)});let i=e.children.push(kt.new(this,{stroke:Wi(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})),r=Ca(ws),s=1500;e.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:s,easing:r}),i.animate({key:"dx",to:0,duration:s,easing:r}),t.animate({key:"dx",to:0,duration:s,easing:r}),t.animate({key:"strokeOpacity",to:1,duration:s,easing:r})},3e3),i.states.create("hover",{stroke:Wi(4671320)}),this._logo=e,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(e){return this._settings.calculateSize?this._settings.calculateSize(e):{width:e.width,height:e.height}}_init(){let e=this._settings;e.accessible!==!1&&(e.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),e.ariaLabel&&this._inner.setAttribute("aria-label",e.ariaLabel),e.role&&this._inner.setAttribute("role",e.role));let t=this._renderer,i=this._getRealSize(),r=this._getCalculatedSize(i),s=Math.floor(r.width),o=Math.floor(r.height),n=Math.floor(i.width),l=Math.floor(i.height),h=ot.new(this,{visible:!0,width:s,height:o});this._rootContainer=h,this._rootContainer._defaultThemes.push(Ud.new(this));let u=h.children.push(ot.new(this,{visible:!0,width:X,height:X}));this.container=u,t.resize(n,l,s,o),this._inner.appendChild(t.view),this._initResizeSensor();let p=document.createElement("div");if(this._htmlElementContainer=p,p.className="am5-html-container",p.style.position="absolute",p.style.pointerEvents="none",this._tooltipContainerSettings||(p.style.overflow="hidden"),this._inner.appendChild(p),this._a11yD!==!0){let d=document.createElement("div");d.className="am5-reader-container",d.setAttribute("role","alert"),d.style.position="absolute",d.style.width="1px",d.style.height="1px",d.style.overflow="hidden",d.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=d,this._inner.appendChild(this._readerAlertElement);let c=document.createElement("div");c.className="am5-focus-container",c.style.position="absolute",c.style.pointerEvents="none",c.style.top="0px",c.style.left="0px",c.style.overflow="hidden",c.style.width=s+"px",c.style.height=o+"px",c.setAttribute("role","graphics-document"),co(c,!1),this._focusElementContainer=c,this._inner.appendChild(this._focusElementContainer);let f=document.createElement("div");this._tooltipElementContainer=f,f.className="am5-tooltip-container",this._inner.appendChild(f),as("keyboardevents")&&(this._disposers.push(je(window,"keydown",g=>{let m=gn(g);m=="Shift"?this._isShift=!0:m=="Tab"&&(this._isShift=g.shiftKey)})),this._disposers.push(je(window,"keyup",g=>{gn(g)=="Shift"&&(this._isShift=!1)})),this._disposers.push(je(c,"click",()=>{let g=this._focusedSprite;if(g){let m=g.get("clickAnnounceText","");m!==""&&this.readerAlert(m);let y=t.getEvent(new MouseEvent("click"));g.events.dispatch("click",{type:"click",originalEvent:y.event,point:y.point,simulated:!0,target:g})}})),this._disposers.push(je(c,"keydown",g=>{let m=this._focusedSprite;if(m){g.key=="Escape"&&(Fx(),this._focusedSprite=void 0);let y=0,v=0,x=gn(g);switch(x){case"Enter":case" ":let _=m.get("clickAnnounceText","");if(_!==""&&this.readerAlert(_),x==" "&&m.get("role")!="checkbox")return;g.preventDefault();let $=t.getEvent(new MouseEvent("mouse"));m.events.dispatch("click",{type:"click",originalEvent:$.event,point:$.point,simulated:!0,target:m});return;case"ArrowLeft":y=-6;break;case"ArrowRight":y=6;break;case"ArrowUp":v=-6;break;case"ArrowDown":v=6;break;default:return}if(y!=0||v!=0){if(g.preventDefault(),!m.isDragging()){this._keyboardDragPoint={x:0,y:0};let T=t.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));T.point={x:0,y:0},m.events.isEnabled("pointerdown")&&m.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:T.event,point:T.point,simulated:!0,target:m})}let _=this._keyboardDragPoint;_.x+=y,_.y+=v;let $=t.getEvent(new MouseEvent("mousemove",{clientX:_.x,clientY:_.y}),!1);m.events.isEnabled("globalpointermove")&&m.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:$.event,point:$.point,simulated:!0,target:m})}}})),this._disposers.push(je(c,"keyup",g=>{if(this._focusedSprite){let m=this._focusedSprite,y=gn(g);switch(y){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(m.isDragging()){let x=this._keyboardDragPoint,_=t.getEvent(new MouseEvent("mouseup",{clientX:x.x,clientY:x.y}));m.events.isEnabled("globalpointerup")&&m.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:_.event,point:_.point,simulated:!0,target:m}),this._keyboardDragPoint=void 0;return}else if(m.get("focusableGroup")){let x=m.get("focusableGroup"),_=this._tabindexes.filter(S=>!!(S.get("focusableGroup")==x&&S.getPrivate("focusable")!==!1&&S.isVisibleDeep())),$=_.indexOf(m),T=_.length-1;$+=y=="ArrowRight"||y=="ArrowDown"?1:-1,$<0?$=T:$>T&&($=0),Mx(_[$].getPrivate("focusElement").dom)}break;case"Tab":let v=m.get("focusableGroup");if(v&&this._isShift){this._skipNextGroupJump||(this._focusNext(m.getPrivate("focusElement").dom,-1,v),this._skipNextGroupJump=!0);return}break}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){let e=Ci.new(this,{themeTags:["system"]});this._systemTooltip=e}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new Yd(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){let e=this._getRealSize(),t=this._getCalculatedSize(e),i=Math.floor(t.width),r=Math.floor(t.height);if(i>0&&r>0){let s=Math.floor(e.width),o=Math.floor(e.height),n=this._htmlElementContainer;if(n.style.width=i+"px",n.style.height=r+"px",this._a11yD!==!0){let h=this._focusElementContainer;h.style.width=i+"px",h.style.height=r+"px"}this._renderer.resize(s,o,i,r);let l=this._rootContainer;l.setPrivate("width",i),l.setPrivate("height",r),this._render(),this._handleLogo()}}_render(){if(this.skipRenderFrame){this.skipRenderFrame=!1;return}this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(e){F(this._tickers,t=>{t(e)})}_runAnimations(e){let t=0;return fn(this._animations,i=>{let r=i._runAnimation(e);return r===wa.Stopped?!1:(r===wa.Playing&&++t,!0)}),this._isDirtyAnimation=!1,t===0}_runDirties(){let e={};for(;this._isDirtyParents;)this._isDirtyParents=!1,zr(this._dirtyParents).forEach(([o,n])=>{delete this._dirtyParents[o],n.isDisposed()||(e[n.uid]=n,n._prepareChildren())});zr(e).forEach(([o,n])=>{n._updateChildren()});let t=[];zr(this._dirty).forEach(([o,n])=>{n.isDisposed()?delete this._dirty[o]:(t.push(n),n._beforeChanged())}),t.forEach(o=>{o._changed(),delete this._dirty[o.uid],o._clearDirty()}),this._isDirty=!1;let i={},r=[];zr(this._dirtyBounds).forEach(([o,n])=>{delete this._dirtyBounds[o],n.isDisposed()||(i[n.uid]=n.depth(),r.push(n))}),this._positionHTMLElements(),r.sort((o,n)=>Lr(i[n.uid],i[o.uid])),r.forEach(o=>{o._updateBounds()});let s=this._dirtyPositions;zr(s).forEach(([o,n])=>{delete s[o],n.isDisposed()||n._updatePosition()}),t.forEach(o=>{o._afterChanged()}),zr(e).forEach(([o,n])=>{n._childrenPrep=!1,n._childrenUpdt=!1})}_renderFrame(e){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:e}),this._checkComputedStyles(),this._runTickers(e);let t=this._runAnimations(e);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:e}),this._tickers.length===0&&t&&!this._isDirtyAnimation&&!this._isDirty}else return!0}_runTicker(e,t){this.isDisposed()||(this.animationTime=e,this._renderFrame(e)?(this._ticker=null,this.animationTime=null):this._paused||(t?this._ticker:a_(this.fps,this._ticker)))}_runTickerNow(e=1e4){if(!this.isDisposed()){let t=performance.now()+e;for(;;){let i=performance.now();if(i>=t){this.animationTime=null;break}if(this.animationTime=i,this._renderFrame(i)){this.animationTime=null;break}}}}_startTicker(){this._ticker===null&&(this.animationTime=null,this._ticker=e=>{this._runTicker(e)},a_(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(e){this._updateTick=e,e&&this._startTicker()}_addDirtyEntity(e){this._isDirty=!0,this._dirty[e.uid]===void 0&&(this._dirty[e.uid]=e),this._startTicker()}_addDirtyParent(e){this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[e.uid]===void 0&&(this._dirtyParents[e.uid]=e),this._startTicker()}_addDirtyBounds(e){this._isDirty=!0,this._dirtyBounds[e.uid]===void 0&&(this._dirtyBounds[e.uid]=e),this._startTicker()}_addDirtyPosition(e){this._isDirty=!0,this._dirtyPositions[e.uid]===void 0&&(this._dirtyPositions[e.uid]=e),this._startTicker()}_addAnimation(e){this._isDirtyAnimation=!0,this._animations.indexOf(e)===-1&&this._animations.push(e),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(e){return this._tickers.push(e),this._startTicker(),new Be(()=>{si(this._tickers,e)})}markDirtyGlobal(e){e||(e=this.container),e.walkChildren(t=>{t instanceof ot&&this.markDirtyGlobal(t),t.markDirty(),t.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(),F(this._disposers,e=>{e.dispose()}),this._inner&&Lx(this._inner),li(Xr.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(e){if(this._a11yD!==!0){let t=this._readerAlertElement;e=tg(e),t.innerHTML==e&&(t.innerHTML=""),t.innerHTML=e}}setThemes(e){this._rootContainer.set("themes",e);let t=this.tooltipContainer;t&&t._applyThemes();let i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){let e=this._tooltipContainerSettings,t=this._rootContainer.children.push(ot.new(this,{position:"absolute",isMeasured:!1,width:X,height:X,layer:e?35:30,layerMargin:e||void 0}));this.tooltipContainer=t;let i=Ci.new(this,{});this.container.set("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(e){this._a11yD!=!0&&(e.get("focusable")?ho(this._tabindexes,e):li(this._tabindexes,e),this._invalidateTabindexes())}_unregisterTabindexOrder(e){this._a11yD!=!0&&(li(this._tabindexes,e),this._invalidateTabindexes())}_invalidateTabindexes(){if(this._a11yD==!0)return;this._tabindexes.sort((t,i)=>{let r=t.get("tabindexOrder",0),s=i.get("tabindexOrder",0);return r==s?0:r>s?1:-1});let e=[];F(this._tabindexes,(t,i)=>{t.getPrivate("focusElement")?this._moveFocusElement(i,t):this._makeFocusElement(i,t);let r=t.get("focusableGroup");r&&t.getPrivate("focusable")!==!1&&(e.indexOf(r)!==-1?t.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):e.push(r))})}_updateCurrentFocus(){this._a11yD!=!0&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(e,t){if(this._a11yD==!0||(t||(t=e.getPrivate("focusElement").dom),!t))return;let i=e.get("role");i?t.setAttribute("role",i):t.removeAttribute("role");let r=e.get("ariaLabel");if(r){let g=Js(e,r);t.setAttribute("aria-label",g)}else t.removeAttribute("aria-label");let s=e.get("ariaLive");s?t.setAttribute("aria-live",s):t.removeAttribute("aria-live");let o=e.get("ariaChecked");o!=null&&i&&["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-checked",o?"true":"false"):t.removeAttribute("aria-checked");let n=e.get("ariaCurrent");n!=null?t.setAttribute("aria-current",n):t.removeAttribute("aria-current");let l=e.get("ariaSelected");l!=null&&i&&["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-selected",l?"true":"false"):t.removeAttribute("aria-selected"),e.get("ariaHidden")?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden");let h=e.get("ariaOrientation");h?t.setAttribute("aria-orientation",h):t.removeAttribute("aria-orientation");let u=e.get("ariaValueNow");u?t.setAttribute("aria-valuenow",u):t.removeAttribute("aria-valuenow");let p=e.get("ariaValueMin");p?t.setAttribute("aria-valuemin",p):t.removeAttribute("aria-valuemin");let d=e.get("ariaValueMax");d?t.setAttribute("aria-valuemax",d):t.removeAttribute("aria-valuemax");let c=e.get("ariaValueText");c?t.setAttribute("aria-valuetext",c):t.removeAttribute("aria-valuetext");let f=e.get("ariaControls");f?t.setAttribute("aria-controls",f):t.removeAttribute("aria-controls"),e.get("visible")&&e.get("opacity")!==0&&e.get("role")!="tooltip"&&!e.isHidden()&&e.getPrivate("focusable")!==!1&&(e.height()||e.width())?(t.getAttribute("tabindex")!="-1"&&t.setAttribute("tabindex",""+this.tabindex),t.removeAttribute("aria-hidden")):(t.removeAttribute("tabindex"),t.setAttribute("aria-hidden","true"))}_makeFocusElement(e,t){if(t.getPrivate("focusElement")||this._a11yD==!0)return;let i=document.createElement("div");t.get("role")!="tooltip"&&(i.tabIndex=this.tabindex),i.style.position="absolute",co(i,!1);let r=[];t.setPrivate("focusElement",{dom:i,disposers:r}),this._decorateFocusElement(t),r.push(je(i,"focus",s=>{this._handleFocus(s)})),r.push(je(i,"blur",s=>{this._handleBlur(s)})),this._moveFocusElement(e,t)}_removeFocusElement(e){if(this._a11yD==!0)return;li(this._tabindexes,e);let t=e.getPrivate("focusElement");t&&(this._focusElementContainer.removeChild(t.dom),F(t.disposers,r=>{r.dispose()}))}_hideFocusElement(e){if(this._a11yD==!0)return;let t=e.getPrivate("focusElement");t.dom.style.display="none"}_moveFocusElement(e,t){if(this._a11yD==!0)return;let i=this._focusElementContainer,r=t.getPrivate("focusElement").dom;if(r===this._focusElementContainer.children[e])return;let s=this._focusElementContainer.children[e+1];s?i.insertBefore(r,s):i.append(r)}_positionFocusElement(e){if(this._a11yD==!0||e==null)return;this._focusElementContainer.scrollTop=0;let t=e.globalBounds(),i=t.right==t.left?e.width():t.right-t.left,r=t.top==t.bottom?e.height():t.bottom-t.top,s=this._settings.focusPadding!==void 0?this._settings.focusPadding:2,o=t.left-s,n=t.top-s;i<0&&(o+=i,i=Math.abs(i)),r<0&&(n+=r,r=Math.abs(r));let l=e.getPrivate("focusElement").dom;l.style.top=n+"px",l.style.left=o+"px",l.style.width=i+s*2+"px",l.style.height=r+s*2+"px"}_getSpriteByFocusElement(e){let t;return uu(this._tabindexes,(i,r)=>i.getPrivate("focusElement").dom===e?(t=i,!1):!0),t}_handleFocus(e){if(this._a11yD==!0)return;let t=this._getSpriteByFocusElement(e.target);if(t){if(!t.isVisibleDeep()){this._focusNext(e.target,this._isShift?-1:1);return}this._positionFocusElement(t),this._focusedSprite=t,t.events.isEnabled("focus")&&t.events.dispatch("focus",{type:"focus",originalEvent:e,target:t}),t.getPrivate("focusElement").dom.tabIndex==-1&&(this._skipNextGroupJump=!1)}}_focusNext(e,t,i){if(this._a11yD==!0)return;let r=Array.from(document.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(","))),s=r.indexOf(e)+t;s<0?s=r.length-1:s>=r.length&&(s=0);let o=r[s];if(i&&t==-1){let n=this._getSpriteByFocusElement(o);if(n&&n.get("focusableGroup")==i){this._focusNext(o,t);return}}o.focus()}_handleBlur(e){if(this._a11yD==!0)return;let t=this._focusedSprite;t&&!t.isDisposed()&&t.events.isEnabled("blur")&&t.events.dispatch("blur",{type:"blur",originalEvent:e,target:t}),this._focusedSprite=void 0}updateTooltip(e){if(this._a11yD==!0)return;let t=tg(e._getText()),i=e.getPrivate("tooltipElement");e.get("role")=="tooltip"&&t!=""?(i||(i=this._makeTooltipElement(e)),i.innerHTML!=t&&(i.innerHTML=t),i.setAttribute("aria-hidden",e.isVisibleDeep()?"false":"true")):i&&(i.remove(),e.removePrivate("tooltipElement"))}_makeTooltipElement(e){let t=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)",co(i,!1),this._decorateFocusElement(e,i),t.append(i),e.setPrivate("tooltipElement",i),i}_removeTooltipElement(e){if(this._a11yD==!0)return;let t=e.getPrivate("tooltipElement");if(t){let i=t.parentElement;i&&i.removeChild(t)}}_invalidateAccessibility(e){if(this._a11yD==!0)return;this._focusElementDirty=!0;let t=e.getPrivate("focusElement");e.get("focusable")?t&&(this._decorateFocusElement(e),this._positionFocusElement(e)):t&&this._removeFocusElement(e)}focused(e){return this._focusedSprite===e}documentPointToRoot(e){let t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,s=i.height/t.height;return{x:(e.x-t.left)*r,y:(e.y-t.top)*s}}rootPointToDocument(e){let t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,s=i.height/t.height;return{x:e.x/r+t.left,y:e.y/s+t.top}}addDisposer(e){return this._disposers.push(e),e}_updateComputedStyles(){let e=window.getComputedStyle(this.dom),t=this._fontHash,i=wi(e).flatMap(r=>{var s;return typeof r=="string"&&r.startsWith("font")?[(s=e[r])===null||s===void 0?void 0:s.toString()]:[]});if(t.length!==i.length)return this._fontHash=i,!0;for(let r=0;r<t.length;r++)if(t[r]!==i[r])return this._fontHash=i,!0;return!1}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(e){e instanceof ot?e.children.each(t=>{this._invalidateLabelBounds(t)}):e instanceof ls&&e.markDirtyBounds()}_hasLicense(){for(let e=0;e<Xr.licenses.length;e++)if(Xr.licenses[e].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(e){this._renderer.debugGhostView=e}set tapToActivate(e){this._renderer.tapToActivate=e}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(e){this._renderer.tapToActivateTimeout=e}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(e){let t=this._htmlElementContainer,i=document.createElement("div");e.setPrivate("htmlElement",i);let r=!1,s;e._walkParents(n=>{if(n.get("verticalScrollbar"))return r=!0,s=n,!1});let o;return r&&(o=document.createElement("div"),e.setPrivate("htmlElementWrapper",o),e.setPrivate("wrapperContainer",s),o.style.position="absolute",o.style.overflow="hidden",o.style.boxSizing="border-box",o.style.top="0px",o.style.left="0px",o.style.width="100%",o.style.height="100%",s.events.on("boundschanged",()=>{this._positionHTMLElement(e)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",co(i,e.get("interactive",!1)),e.events.isEnabled("click")&&(co(i,!0),this._disposers.push(je(i,"click",n=>{let l=this._renderer.getEvent(n);e.events.dispatch("click",{type:"click",originalEvent:l.event,point:l.point,simulated:!1,target:e})}))),this._positionHTMLElement(e),r?(o.append(i),t.append(o)):t.append(i),ho(this._htmlEnabledContainers,e),i}_positionHTMLElements(){F(this._htmlEnabledContainers,e=>{this._positionHTMLElement(e)})}_positionHTMLElement(e){let t=e.getPrivate("htmlElementWrapper");if(t){let r=e.getPrivate("wrapperContainer");if(r){let s=r.globalBounds();t.style.clipPath="rect("+s.top+"px "+s.right+"px "+s.bottom+"px "+s.left+"px)"}}let i=e.getPrivate("htmlElement");if(i){F(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],x=>{let _=e.get(x);_?i.style[x]=_+"px":i.style[x]=""}),F(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],x=>{let _=e.get(x);_?x=="fontSize"&&!Us(_)?i.style[x]=_+"px":i.style[x]=_+"":i.style[x]=""});let o=e.compositeScale()||1,n=e.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";let l=e.compositeOpacity();setTimeout(()=>{i.style.opacity=l+""},10);let h=e.isVisibleDeep();h&&(i.style.display="block");let u={x:e.x()+e.get("dx",0),y:e.y()+e.get("dy",0)};e.parent&&(u=e.parent.toGlobal(u)),i.style.top=u.y+"px",i.style.left=u.x+"px";let p=e.get("width"),d=e.get("height"),c=0,f=0;if(p&&(c=e.width()),d&&(f=e.height()),!p||!d){i.style.position="fixed",i.style.width="",i.style.height="";let x=i.getBoundingClientRect();i.style.position="absolute",p||(c=x.width),d||(f=x.height);let _=c/o,$=f/o,T=e.get("centerX",0),S=e.get("centerY",0),k=0,A=0,L=0,O=0;T instanceof St?(k=-T.value*_,A=(1-T.value)*_):(k=-T,A=_-T),S instanceof St?(L=-S.value*$,O=(1-S.value)*$):(L=-S,O=$-S),e._localBounds={left:k,right:A,top:L,bottom:O};let I=e._adjustedLocalBounds,R=e._display.getAdjustedBounds(e._localBounds);e._adjustedLocalBounds=R,(I.left!==R.left||I.right!==R.right||I.top!==R.top||I.bottom!==R.bottom)&&e.markDirtyBounds()}c>0&&(i.style.minWidth=c+"px"),f>0&&(i.style.minHeight=f+"px"),(!h||l==0)&&(i.style.display="none");let g=e.get("centerX",0),m=Xm(g)?g.percent+"%":g+"px",y=e.get("centerY",0),v=Xm(y)?y.percent+"%":y+"px";(g||y)&&(i.style.transform="translate(-"+m+", -"+v+")"+i.style.transform),o!=1&&(i.style.transform+="scale("+o+")"),n!=0&&(i.style.transform+=" rotate("+n+"deg)"),i.style.transform!=""&&(i.style.transformOrigin=m+" "+v)}}_setHTMLContent(e,t){let i=e.getPrivate("htmlElement");i||(i=this._makeHTMLElement(e),this.autoResize||this.resize()),i.innerHTML!=t&&(i.innerHTML=t)}_removeHTMLContent(e){let t=e.getPrivate("htmlElementWrapper"),i=e.getPrivate("htmlElement");t?(this._htmlElementContainer.removeChild(t),e.removePrivate("htmlElement"),e.removePrivate("htmlElementWrapper"),e.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),e.removePrivate("htmlElement"),e.removePrivate("wrapperContainer")),li(this._htmlEnabledContainers,e)}};var Cs=class extends le{_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){let e=this.get("sprite");e&&(e.setAll({position:"absolute",role:"figure"}),this._disposers.push(e))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}};Cs.className="Bullet";Cs.classNames=le.classNames.concat([Cs.className]);var Jd=class extends Wr{incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,i){this.processor&&this.processor.processRow(i),super._onSetIndex(e,t,i)}};var Li=class extends _u{constructor(e,t,i){super(i),this.dataContext=t,this.component=e,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}},hs=class extends ot{constructor(){super(...arguments),this._data=new Jd,this._dataItems=[],this._mainDataItems=this._dataItems,this.valueFields=[],this.fields=["id"],this._valuesDirty=!1,this._dataChanged=!1,this._dataGrouped=!1,this.inited=!1}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll(e=>{let t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,e.type==="clear")F(t,i=>{i.dispose()}),t.length=0,this._onDataClear();else if(e.type==="push"){let i=new Li(this,e.newValue,this._makeDataItem(e.newValue));t.push(i),this.processDataItem(i)}else if(e.type==="setIndex"){let i=t[e.index],r=this._makeDataItem(e.newValue);i.bullets&&i.bullets.length==0&&(i.bullets=void 0),zr(r).forEach(([s,o])=>{i.get(s)!=o&&i.animate({key:s,to:o,duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),i.dataContext=e.newValue}else if(e.type==="insertIndex"){let i=new Li(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,i),this.processDataItem(i)}else if(e.type==="removeIndex")t[e.index].dispose(),t.splice(e.index,1);else if(e.type==="moveIndex"){let i=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,i)}else throw new Error("Unknown IStreamEvent type");this._afterDataChange()}))}_postUpdateData(){}updateData(e){let t=0;F(e,(i,r)=>{let s=this.dataItems[r];if(!s)this.data.push(i);else{let o=s.dataContext;o&&zr(i).forEach(([l,h])=>{o[l]=h});let n=this._makeDataItem(o);zr(n).forEach(([l,h])=>{var u;if(s.get(l)!=h){s.set(l,h);let p=(u=this._valueFieldsF[l])===null||u===void 0?void 0:u.workingKey;p&&s.set(p,h)}})}t=r});for(let i=this.dataItems.length-1;i>t;i--){let r=this.dataItems[i];li(this.dataItems,r),r.dispose()}this._postUpdateData()}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},F(this.valueFields,e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},F(this.fields,e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")}))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){let t={};return this._valueFields&&F(this._valueFields,i=>{let r=this.get(this._valueFieldsF[i].fieldKey);t[i]=e[r],t[this._valueFieldsF[i].workingKey]=t[i]}),this._fields&&F(this._fields,i=>{let r=this.get(this._fieldsF[i]);t[i]=e[r]}),t}makeDataItem(e,t){let i=new Li(this,t,e);return this.processDataItem(i),i}pushDataItem(e,t){let i=this.makeDataItem(e,t);return this._mainDataItems.push(i),i}disposeDataItem(e){}showDataItem(e,t){return ut(this,void 0,void 0,function*(){e.set("visible",!0)})}hideDataItem(e,t){return ut(this,void 0,void 0,function*(){e.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){let e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}if(this._valuesDirty){let e="valueschanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(e){return Td(this.dataItems,t=>t.get("id")==e)}};hs.className="Component";hs.classNames=ot.classNames.concat([hs.className]);var _n={};_y(_n,{add:()=>I$,checkChange:()=>ec,chooseInterval:()=>Lu,copy:()=>R$,getDateIntervalDuration:()=>Ou,getDuration:()=>Fi,getIntervalDuration:()=>Ur,getNextUnit:()=>tc,getTime:()=>M$,getUnitValue:()=>V$,now:()=>o_,roun:()=>ai,round:()=>Ta,sleep:()=>zg,timeUnitDurations:()=>Qd});function zg(a){return new Promise((e,t)=>{setTimeout(e,a)})}var Qd={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:365.242/12*864e5,year:31536e6};function tc(a){switch(a){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function Fi(a,e){return e==null&&(e=1),Qd[a]*e}function Ur(a){return a?Qd[a.timeUnit]*a.count:0}function Ou(a,e,t,i,r){let s=a.timeUnit,o=a.count;if(s=="hour"||s=="minute"||s=="second"||s=="millisecond")return Qd[a.timeUnit]*a.count;{let n=Ta(new Date(e.getTime()),s,o,t,i,void 0,r).getTime(),l=n+o*Fi(s)*1.05;return l=Ta(new Date(l),s,1,t,i,void 0,r).getTime(),l-n}}function o_(){return new Date}function M$(){return o_().getTime()}function R$(a){return new Date(a.getTime())}function ec(a,e,t,i,r){if(e-a>Fi(t,1.2))return!0;let s=new Date(a),o=new Date(e);r&&(s=r.convertLocal(s),o=r.convertLocal(o));let n=0,l=0;!i&&t!="millisecond"&&(n=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-n),l=o.getTimezoneOffset(),o.setUTCMinutes(o.getUTCMinutes()-l));let h=!1;switch(t){case"year":s.getUTCFullYear()!=o.getUTCFullYear()&&(h=!0);break;case"month":(s.getUTCFullYear()!=o.getUTCFullYear()||s.getUTCMonth()!=o.getUTCMonth())&&(h=!0);break;case"day":(s.getUTCMonth()!=o.getUTCMonth()||s.getUTCDate()!=o.getUTCDate())&&(h=!0);break;case"hour":s.getUTCHours()!=o.getUTCHours()&&(h=!0);break;case"minute":s.getUTCMinutes()!=o.getUTCMinutes()&&(h=!0);break;case"second":s.getUTCSeconds()!=o.getUTCSeconds()&&(h=!0);break;case"millisecond":s.getTime()!=o.getTime()&&(h=!0);break}if(h)return h;let u=tc(t);return u?ec(a,e,u,i,r):!1}function I$(a,e,t,i,r){let s=0;switch(!i&&e!="millisecond"&&(s=a.getTimezoneOffset(),r&&(s-=r.offsetUTC(a)),a.setUTCMinutes(a.getUTCMinutes()-s)),e){case"day":let o=a.getUTCDate();a.setUTCDate(o+t);break;case"second":let n=a.getUTCSeconds();a.setUTCSeconds(n+t);break;case"millisecond":let l=a.getUTCMilliseconds();a.setUTCMilliseconds(l+t);break;case"hour":let h=a.getUTCHours();a.setUTCHours(h+t);break;case"minute":let u=a.getUTCMinutes();a.setUTCMinutes(u+t);break;case"year":let p=a.getUTCFullYear();a.setUTCFullYear(p+t);break;case"month":let d=a.getUTCDate(),c=new Date(a.getUTCFullYear(),a.getUTCMonth(),0).getUTCDate(),f=a.getUTCMonth();d>c?a.setUTCMonth(f+t,c):a.setUTCMonth(f+t);break;case"week":let g=a.getUTCDate();a.setUTCDate(g+t*7);break}if(!i&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+s),e=="day"||e=="week"||e=="month"||e=="year")){let o=a.getTimezoneOffset();if(r&&(o+=r.offsetUTC(a)),o!=s){let n=o-s;a.setUTCMinutes(a.getUTCMinutes()+n),a.getTimezoneOffset()!=o&&a.setUTCMinutes(a.getUTCMinutes()-n)}}return a}function ai(a,e,t,i,r){let s;return r!=null&&(s=new Date(r)),Ta(new Date(a),e,t,i.locale.firstDayOfWeek,i.utc,s,i.timezone).getTime()}function Ta(a,e,t,i,r,s,o){if(!o||r){let n=0;switch(!r&&e!="millisecond"&&(n=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-n)),e){case"day":let l=a.getUTCDate();if(t>1){if(s){s=Ta(s,"day",1);let y=a.getTime()-s.getTime(),v=Math.floor(y/Fi("day")/t),x=Fi("day",v*t);a.setTime(s.getTime()+x-n*Fi("minute"))}}else a.setUTCDate(l);a.setUTCHours(0,0,0,0);break;case"second":let h=a.getUTCSeconds();t>1&&(h=Math.floor(h/t)*t),a.setUTCSeconds(h,0);break;case"millisecond":if(t==1)return a;let u=a.getUTCMilliseconds();u=Math.floor(u/t)*t,a.setUTCMilliseconds(u);break;case"hour":let p=a.getUTCHours();t>1&&(p=Math.floor(p/t)*t),a.setUTCHours(p,0,0,0);break;case"minute":let d=a.getUTCMinutes();t>1&&(d=Math.floor(d/t)*t),a.setUTCMinutes(d,0,0);break;case"month":let c=a.getUTCMonth();t>1&&(t==2||t==3||t==4||t==6)&&(c=Math.floor(c/t)*t),a.setUTCMonth(c,1),a.setUTCHours(0,0,0,0);break;case"year":let f=a.getUTCFullYear();t>1&&(f=Math.floor(f/t)*t),a.setUTCFullYear(f,0,1),a.setUTCHours(0,0,0,0);break;case"week":if(t>1&&s){s=Ta(s,"week",1);let y=a.getTime()-s.getTime(),v=Math.floor(y/Fi("week")/t),x=Fi("week",v*t);a.setTime(s.getTime()+x-n*Fi("minute"))}let g=a.getUTCDate(),m=a.getUTCDay();M(i)||(i=1),m>=i?g=g-m+i:g=g-(7+m)+i,a.setUTCDate(g),a.setUTCHours(0,0,0,0);break}if(!r&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+n),e=="day"||e=="week"||e=="month"||e=="year")){let l=a.getTimezoneOffset();if(l!=n){let h=l-n;a.setUTCMinutes(a.getUTCMinutes()+h)}}return a}else{if(isNaN(a.getTime()))return a;let n=a.getTime(),l=o.offsetUTC(a),h=a.getTimezoneOffset(),u=o.parseDate(a),p=u.year,d=u.month,c=u.day,f=u.hour,g=u.minute,m=u.second,y=u.millisecond,v=u.weekday,x=l-h;switch(e){case"day":if(t>1&&s){s=Ta(s,"day",1,i,r,void 0,o);let A=a.getTime()-s.getTime(),L=Math.floor(A/Fi("day")/t),O=Fi("day",L*t);a.setTime(s.getTime()+O),u=o.parseDate(a),p=u.year,d=u.month,c=u.day}f=0,g=x,m=0,y=0;break;case"second":g+=x,t>1&&(m=Math.floor(m/t)*t),y=0;break;case"millisecond":g+=x,t>1&&(y=Math.floor(y/t)*t);break;case"hour":t>1&&(f=Math.floor(f/t)*t),g=x,m=0,y=0;break;case"minute":t>1&&(g=Math.floor(g/t)*t),g+=x,m=0,y=0;break;case"month":t>1&&(d=Math.floor(d/t)*t),c=1,f=0,g=x,m=0,y=0;break;case"year":t>1&&(p=Math.floor(p/t)*t),d=0,c=1,f=0,g=x,m=0,y=0;break;case"week":M(i)||(i=1),v>=i?c=c-v+i:c=c-(7+v)+i,f=0,g=x,m=0,y=0;break}a=new Date(p,d,c,f,g,m,y);let _=a.getTime(),$=36e5;e=="hour"&&($=36e5*t),_+$<=n&&(e=="hour"||e=="minute"||e=="second"||e=="millisecond")&&(a=new Date(_+$));let T=a.getTimezoneOffset(),k=o.offsetUTC(a)-T;return k!=x&&a.setTime(a.getTime()+(k-x)*6e4),a}}function Lu(a,e,t,i){let r=i[a],s=Ur(r),o=i.length-1;if(a>=o)return Object.assign({},i[o]);let n=Math.ceil(e/s);return e<s&&a>0?Object.assign({},i[a-1]):n<=t?Object.assign({},i[a]):a+1<i.length?Lu(a+1,e,t,i):Object.assign({},i[a])}function V$(a,e){switch(e){case"day":return a.getDate();case"second":return a.getSeconds();case"millisecond":return a.getMilliseconds();case"hour":return a.getHours();case"minute":return a.getMinutes();case"month":return a.getMonth();case"year":return a.getFullYear();case"week":return mn(a)}}var hi=class extends hs{constructor(){super(...arguments),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1,this._dataProcessed=!1,this._baseSeriesDirty=!1,this.bullets=new Wr,this.bulletsContainer=ot.new(this._root,{width:X,height:X,position:"absolute"})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",e),e))}_handleBullets(e){F(e,t=>{let i=t.bullets;i&&(F(i,r=>{r.dispose()}),t.bullets=void 0)}),this.markDirtyValues()}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each(t=>{this._makeBullet(e,t)}))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,i){let r=t(this._root,this,e);return r&&(r._index=i,this._makeBulletReal(e,r)),r}_makeBulletReal(e,t){let i=t.get("sprite");i&&(i._setDataItem(e),i.setRaw("position","absolute"),this.bulletsContainer.children.push(i)),t.series=this,e.bullets.push(t)}addBullet(e,t){e.bullets||(e.bullets=[]),t&&this._makeBulletReal(e,t)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();let e=this.dataItems,t=e.length,i=this.startIndex(),r=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){let o=this.getPrivate("baseValueSeries");o&&this._disposers.push(o.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,t),this._aggregatesCalculated=!0,i!=0&&(this._psi=void 0))),(this._psi!=i||this._pei!=r||this.isPrivateDirty("adjustedStartIndex"))&&!this._selectionAggregatesCalculated&&(i===0&&r===t&&this._aggregatesCalculated||this._calculateAggregates(i,r),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let o=this.get("tooltip");o&&(o.hide(0),o.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let o,n=this.get("legendDataItem");if(n&&(o=n.get("markerRectangle"),o&&this.isVisible())){if(this.isDirty("stroke")){let l=this.get("stroke");o.set("stroke",l)}if(this.isDirty("fill")){let l=this.get("fill");o.set("fill",l)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let o=this.startIndex(),n=this.endIndex();n<t&&n++;for(let l=o;l<n;l++){let h=e[l];h.bullets||this._makeBullets(h)}}}_handleRemoved(){}_adjustStartIndex(e){return e}_calculateAggregates(e,t){let i=this._valueFields;if(!i)throw new Error("No value fields are set for the series.");let r=this.get("excludeFromAggregate");r&&(i=i.filter(m=>r.indexOf(m)==-1));let s={},o={},n={},l={},h={},u={},p={},d={},c={};for(let m=0,y=i.length;m<y;m++){let v=i[m];s[v]=0,o[v]=0,n[v]=0}let f=this.dataItems,g=f.length;for(let m=0,y=i.length;m<y;m++){let v=i[m],x=v+"Change",_=v+"ChangePercent",$=v+"ChangePrevious",T=v+"ChangePreviousPercent",S=v+"ChangeSelection",k=v+"ChangeSelectionPercent",A="valueY";(v==="valueX"||v.endsWith("ValueX"))&&(A="valueX");let L=this.getPrivate("baseValueSeries"),O=this.getPrivate("adjustedStartIndex",e),I=(R,B,Z)=>{if(e===0){let st=u[A],ht=B-st;R.setRaw(x,ht),R.setRaw(_,ht/st*100)}let j=B-c[A],it=B-u[A];R.setRaw($,j),R.setRaw(T,j/c[A]*100),R.setRaw(S,it),R.setRaw(k,it/u[A]*100),c[Z]=B};for(let R=O;R<t;R++){let B=f[R];if(B){let Z=B.get(v);if(Z!=null){l[v]==null&&(l[v]=Z),h[v]==null&&(h[v]=Z),u[v]==null&&(u[v]=Z,c[v]=Z,L&&(u[A]=L._getBase(A)));break}}}for(let R=O;R<t;R++){let B=f[R];if(B){let Z=B._settings[v];Z!=null&&(n[v]++,s[v]+=Z,o[v]+=Math.abs(Z),l[v]>Z&&(l[v]=Z),h[v]<Z&&(h[v]=Z),p[v]=Z,I(B,Z,v))}}if(d[v]=s[v]/n[v],t<g){let R=f[t];if(R){let B=R.get(v);B!=null&&I(R,B,v)}}if(t+1<g){let R=f[t+1];if(R){let B=R.get(v);B!=null&&I(R,B,v)}}e>0&&e--,delete c[v];for(let R=e;R<O;R++){let B=f[R];if(B){let Z=B.get(v);c[v]==null&&(c[v]=Z),Z!=null&&I(B,Z,v)}}}for(let m=0,y=i.length;m<y;m++){let v=i[m];this.setPrivate(v+"AverageSelection",d[v]),this.setPrivate(v+"CountSelection",n[v]),this.setPrivate(v+"SumSelection",s[v]),this.setPrivate(v+"AbsoluteSumSelection",o[v]),this.setPrivate(v+"LowSelection",l[v]),this.setPrivate(v+"HighSelection",h[v]),this.setPrivate(v+"OpenSelection",u[v]),this.setPrivate(v+"CloseSelection",p[v])}if(e===0&&t===g)for(let m=0,y=i.length;m<y;m++){let v=i[m];this.setPrivate(v+"Average",d[v]),this.setPrivate(v+"Count",n[v]),this.setPrivate(v+"Sum",s[v]),this.setPrivate(v+"AbsoluteSum",o[v]),this.setPrivate(v+"Low",l[v]),this.setPrivate(v+"High",h[v]),this.setPrivate(v+"Open",u[v]),this.setPrivate(v+"Close",p[v])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));let e=this.get("heatRules");if(this._valuesDirty&&e&&e.length>0&&F(e,t=>{let i=t.minValue||this.getPrivate(t.dataField+"Low")||0,r=t.maxValue||this.getPrivate(t.dataField+"High")||0;F(t.target._entities,s=>{let o=s.dataItem.get(t.dataField);if(!M(o)){t.neutral&&s.set(t.key,t.neutral);let n=s.states;if(n){let l=n.lookup("default");l&&t.neutral&&l.set(t.key,t.neutral)}if(!t.customFunction)return}if(t.customFunction)t.customFunction.call(this,s,i,r,o);else{let n;t.logarithmic?n=(Math.log(o)*Math.LOG10E-Math.log(i)*Math.LOG10E)/(Math.log(r)*Math.LOG10E-Math.log(i)*Math.LOG10E):n=(o-i)/(r-i),M(o)&&(!M(n)||Math.abs(n)==1/0)&&(n=.5);let l;M(t.min)?l=t.min+(t.max-t.min)*n:t.min instanceof yt?l=yt.interpolate(n,t.min,t.max):t.min instanceof St&&(l=ng(n,t.min,t.max)),s.set(t.key,l);let h=s.states;if(h){let u=h.lookup("default");u&&u.set(t.key,l)}}})}),this.get("visible")){let t=this.dataItems,i=t.length,r=this.startIndex(),s=this.endIndex();s<i&&s++,r>0&&r--;for(let o=0;o<r;o++)this._hideBullets(t[o]);for(let o=r;o<s;o++)this._positionBullets(t[o]);for(let o=s;o<i;o++)this._hideBullets(t[o])}}_positionBullets(e){e.bullets&&F(e.bullets,t=>{this._positionBullet(t);let i=t.get("sprite");t.get("dynamic")&&(i&&(i._markDirtyKey("fill"),i.markDirtySize()),i instanceof ot&&i.walkChildren(r=>{r._markDirtyKey("fill"),r.markDirtySize(),r instanceof Qt&&r.text.markDirtyText()})),i instanceof Qt&&i.get("populateText")&&i.text.markDirtyText()})}_hideBullets(e){e.bullets&&F(e.bullets,t=>{let i=t.get("sprite");i&&i.setPrivate("visible",!1)})}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){let e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){let t=e.bullets;t&&(F(t,i=>{i.dispose()}),e.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,e,t)],s=e.bullets;s&&F(s,o=>{let n=o.get("sprite");n&&r.push(n.show(t))}),yield Promise.all(r)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,e,t)],s=e.bullets;s&&F(s,o=>{let n=o.get("sprite");n&&r.push(n.hide(t))}),yield Promise.all(r)})}_sequencedShowHide(e,t){return ut(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(M(t)||(t=this.get("interpolationDuration",0)),t>0){let i=this.startIndex(),r=this.endIndex();yield Promise.all(hu(this.dataItems,(s,o)=>ut(this,void 0,void 0,function*(){let n=t||0;(o<i-10||o>r+10)&&(n=0);let l=this.get("sequencedDelay",0)+n/(r-i);yield zg(l*(o-i)),e?yield this.showDataItem(s,n):yield this.hideDataItem(s,n)})))}else yield Promise.all(hu(this.dataItems,i=>e?this.showDataItem(i,0):this.hideDataItem(i,0)))})}updateLegendValue(e){if(e){let t=e.get("legendDataItem");if(t){let i=t.get("valueLabel");if(i){let s=i.text,o="";i._setDataItem(e),o=this.get("legendValueText",s.get("text","")),i.set("text",o),s.markDirtyText()}let r=t.get("label");if(r){let s=r.text,o="";r._setDataItem(e),o=this.get("legendLabelText",s.get("text","")),r.set("text",o),s.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();let e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){let t=this.dataItems[this.startIndex()];return t?t.get(e):0}};hi.className="Series";hi.classNames=hs.classNames.concat([hi.className]);var Xe=class extends He{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),i=e/Math.abs(e),r=t/Math.abs(t),s=0,o=0,n=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=i*n,t-=r*n,s+=i*n/2,o+=r*n/2);let l=e,h=t;if(M(l)&&M(h)){let u=Math.min(l,h)/2,p=Ht(this.get("cornerRadiusTL",8),u),d=Ht(this.get("cornerRadiusTR",8),u),c=Ht(this.get("cornerRadiusBR",8),u),f=Ht(this.get("cornerRadiusBL",8),u),g=Math.min(Math.abs(l/2),Math.abs(h/2));p=Se(p,0,g),d=Se(d,0,g),c=Se(c,0,g),f=Se(f,0,g);let m=this._display;m.moveTo(s+p*i,o),m.lineTo(s+l-d*i,o),d>0&&m.arcTo(s+l,o,s+l,o+d*r,d),m.lineTo(s+l,o+h-c*r),c>0&&m.arcTo(s+l,o+h,s+l-c*i,o+h,c),m.lineTo(s+f*i,o+h),f>0&&m.arcTo(s,o+h,s,o+h-f*r,f),m.lineTo(s,o+p*r),p>0&&m.arcTo(s,o,s+p*i,o,p),m.closePath()}}};Xe.className="RoundedRectangle";Xe.classNames=He.classNames.concat([Xe.className]);var Da=class extends hi{constructor(){super(...arguments),this.itemContainers=this.addDisposer(new be(jt.new({}),()=>ot._new(this._root,{themeTags:xt(this.itemContainers.template.get("themeTags",[]),["legend","item"]),themeTagsSelf:xt(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"]),background:Xe.new(this._root,{themeTags:xt(this.itemContainers.template.get("themeTags",[]),["legend","item","background"]),themeTagsSelf:xt(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"])})},[this.itemContainers.template]))),this.markers=this.addDisposer(new be(jt.new({}),()=>ot._new(this._root,{themeTags:xt(this.markers.template.get("themeTags",[]),["legend","marker"])},[this.markers.template]))),this.labels=this.addDisposer(new be(jt.new({}),()=>Qt._new(this._root,{themeTags:xt(this.labels.template.get("themeTags",[]),["legend","label"])},[this.labels.template]))),this.valueLabels=this.addDisposer(new be(jt.new({}),()=>Qt._new(this._root,{themeTags:xt(this.valueLabels.template.get("themeTags",[]),["legend","label","value"])},[this.valueLabels.template]))),this.markerRectangles=this.addDisposer(new be(jt.new({}),()=>Xe._new(this._root,{themeTags:xt(this.markerRectangles.template.get("themeTags",[]),["legend","marker","rectangle"])},[this.markerRectangles.template])))}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["legend"]),this.fields.push("name","stroke","fill"),super._afterNew()}makeItemContainer(e){let t=this.children.push(this.itemContainers.make());return t._setDataItem(e),this.itemContainers.push(t),t.states.create("disabled",{}),t}makeMarker(){let e=this.markers.make();return this.markers.push(e),e.states.create("disabled",{}),e}makeLabel(){let e=this.labels.make();return e.states.create("disabled",{}),e}makeValueLabel(){let e=this.valueLabels.make();return e.states.create("disabled",{}),e}makeMarkerRectangle(){let e=this.markerRectangles.make();return e.states.create("disabled",{}),e}processDataItem(e){super.processDataItem(e);let t=this.makeItemContainer(e),i=this.get("nameField"),r=this.get("fillField"),s=this.get("strokeField");if(t){let o=this.get("clickTarget","itemContainer"),n=e.dataContext;n&&n.set&&n.set("legendDataItem",e),t._setDataItem(e),e.set("itemContainer",t);let l=this.makeMarker();if(l){t.children.push(l),l._setDataItem(e),e.set("marker",l);let p=this.get("useDefaultMarker"),d=l.children.push(this.makeMarkerRectangle()),c=e.get("fill"),f=e.get("stroke");e.set("markerRectangle",d),n&&n.get&&(c=n.get(r,c),f=n.get(s,f)),f||(f=c),p?n.on&&(n.on(r,()=>{d.set("fill",n.get(r))}),n.on(s,()=>{d.set("stroke",n.get(s))})):n&&n.createLegendMarker&&n.createLegendMarker(),d.setAll({fill:c,stroke:f});let g=n.component;g&&g.updateLegendMarker&&g.updateLegendMarker(n)}let h=this.makeLabel();if(h){t.children.push(h),h._setDataItem(e),e.set("label",h),h.text.on("text",()=>{t.setRaw("ariaLabel",h.text._getText()+(this.get("clickTarget")!=="none"?"; "+this._t("Press ENTER to toggle"):"")),t.markDirtyAccessibility()}),n&&n.get&&e.set("name",n.get(i));let p=e.get("name");p&&h.set("text",p)}let u=this.makeValueLabel();if(u&&(t.children.push(u),u._setDataItem(e),e.set("valueLabel",u)),n&&n.show&&(n.on("visible",p=>{t.set("disabled",!p)}),n.get("visible")||t.set("disabled",!0),o!="none")){let p=t;o=="marker"&&(p=l),this._addClickEvents(p,n,e)}this.children.values.sort((p,d)=>{let c=p.dataItem.dataContext,f=d.dataItem.dataContext;if(c&&f){let g=this.data.indexOf(c),m=this.data.indexOf(f);if(g>m)return 1;if(g<m)return-1}return 0}),n&&n.updateLegendValue&&n.updateLegendValue()}}_addClickEvents(e,t,i){e.set("cursorOverStyle","pointer"),e.events.on("pointerover",()=>{let r=t.component;r&&r.hoverDataItem&&r.hoverDataItem(t)}),e.events.on("pointerout",()=>{let r=t.component;r&&r.hoverDataItem&&r.unhoverDataItem(t)}),e.events.on("click",()=>{let r=i.get("label").text._getText();t.show&&t.isHidden&&(t.isHidden()||t.get("visible")===!1)?(t.show(),e.set("disabled",!1),this._root.readerAlert(this._t("%1 shown",this._root.locale,r))):t.hide&&(t.hide(),e.set("disabled",!0),this._root.readerAlert(this._t("%1 hidden",this._root.locale,r)))})}disposeDataItem(e){super.disposeDataItem(e);let t=e.dataContext;t&&t.get&&t.get("legendDataItem")==e&&t.set("legendDataItem",void 0);let i=e.get("itemContainer");i&&(this.itemContainers.removeValue(i),i.dispose());let r=e.get("marker");r&&(this.markers.removeValue(r),r.dispose());let s=e.get("markerRectangle");s&&(this.markerRectangles.removeValue(s),s.dispose());let o=e.get("label");o&&(this.labels.removeValue(o),o.dispose());let n=e.get("valueLabel");n&&(this.valueLabels.removeValue(n),n.dispose())}};Da.className="Legend";Da.classNames=hi.classNames.concat([Da.className]);var ka=class extends ot{_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",Xe.new(this._root,{themeTags:xt(this._settings.themeTags,["background"])})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};ka.className="Button";ka.classNames=ot.classNames.concat([ka.className]);var yo=class extends ot{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=xt(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=Xe.new(this._root,{themeTags:xt(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(ka.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:kt.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(Xe.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,i=this.thumb,r=this.get("background");r&&this._disposers.push(r.events.on("click",s=>{this.setPrivateRaw("isBusy",!0);let o=this._display.toLocal(s.point),n=this.width(),l=this.height(),h=this.get("orientation"),u;h=="vertical"?u=(o.y-i.height()/2)/l:u=(o.x-i.width()/2)/n;let p,d;h=="vertical"?(p=u*l,d="y"):(p=u*n,d="x");let c=this.get("animationDuration",0);c>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:p,duration:c,easing:this.get("animationEasing")}))):(this.thumb.set(d,p),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(i.events.on("dblclick",s=>{if(!Vl(s.originalEvent,this))return;let o=this.get("animationDuration",0),n=this.get("animationEasing");this.animate({key:"start",to:0,duration:o,easing:n}),this.animate({key:"end",to:1,duration:o,easing:n})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(i.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(i.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(i.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e.set("x",0),t.set("x",0),this._disposers.push(i.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()-i.height()),0))),this._disposers.push(i.adapters.add("x",s=>this.width()/2)),this._disposers.push(e.adapters.add("x",s=>this.width()/2)),this._disposers.push(t.adapters.add("x",s=>this.width()/2)),this._disposers.push(e.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()),0))),this._disposers.push(t.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()),0)))):(e.set("y",0),t.set("y",0),this._disposers.push(i.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()-i.width()),0))),this._disposers.push(i.adapters.add("y",s=>this.height()/2)),this._disposers.push(e.adapters.add("y",s=>this.height()/2)),this._disposers.push(t.adapters.add("y",s=>this.height()/2)),this._disposers.push(e.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()),0))),this._disposers.push(t.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,i=this.get("orientation"),r=this.height(),s=this.width();i=="vertical"?(e.set("y",r*this.get("start",0)),t.set("y",r*this.get("end",1))):(e.set("x",s*this.get("start",0)),t.set("x",s*this.get("end",1)));let o=this.getPrivate("positionTextFunction"),n=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),h,u;o?(h=o.call(this,this.get("start",0)),u=o.call(this,this.get("end",0))):(h=n+"%",u=l+"%"),e.set("ariaLabel",this._t("From %1",void 0,h)),e.set("ariaValueNow",""+n),e.set("ariaValueText",n+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100"),t.set("ariaLabel",this._t("To %1",void 0,u)),t.set("ariaValueNow",""+l),t.set("ariaValueText",l+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,i=this.endGrip,r=this.height(),s=this.width(),o=t.x(),n=i.x(),l=t.y(),h=i.y(),u=0,p=1;this.get("orientation")=="vertical"?M(l)&&M(h)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("height",h-l),e.set("y",l)),u=l/r,p=h/r):M(o)&&M(n)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("width",n-o),e.set("x",o)),u=o/s,p=n/s),this.getPrivate("isBusy")&&(this.get("start")!=u||this.get("end")!=p)&&(this.set("start",u),this.set("end",p));let d=this.getPrivate("positionTextFunction"),c=Math.round(this.get("start",0)*100),f=Math.round(this.get("end",0)*100),g,m;d?(g=d.call(this,this.get("start",0)),m=d.call(this,this.get("end",0))):(g=c+"%",m=f+"%"),e.set("ariaLabel",this._t("From %1 to %2",void 0,g,m)),e.set("ariaValueNow",""+c),e.set("ariaValueText",c+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,i=this.endGrip;if(this.get("orientation")=="vertical"){let r=e.height();t.set("y",e.y()),i.set("y",e.y()+r)}else{let r=e.width();t.set("x",e.x()),i.set("x",e.x()+r)}}};yo.className="Scrollbar";yo.classNames=ot.classNames.concat([yo.className]);function n_(a){this._context=a}n_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2;default:this._context.lineTo(a,e);break}}};function Fu(a){return new n_(a)}var ic=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}}this._x0=e,this._y0=t}};function E$(a){return new ic(a,!0)}function N$(a){return new ic(a,!1)}function l_(a,e,t){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-e),a._y2+a._k*(a._y1-t),a._x2,a._y2)}function h_(a,e){this._context=a,this._k=(1-e)/6}h_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:l_(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2,this._x1=a,this._y1=e;break;case 2:this._point=3;default:l_(this,a,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var B$=(function a(e){function t(i){return new h_(i,e)}return t.tension=function(i){return a(+i)},t})(0);function Wg(){}function u_(a){this._context=a}u_.prototype={areaStart:Wg,areaEnd:Wg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(a,e){a=+a,e=+e,this._point?this._context.lineTo(a,e):(this._point=1,this._context.moveTo(a,e))}};function j$(a){return new u_(a)}function Re(a){return function(){return a}}var Gg=Math.abs,Gi=Math.atan2,vo=Math.cos,p_=Math.max,rc=Math.min,Ss=Math.sin,Pn=Math.sqrt,gr=1e-12,Xl=Math.PI,Mu=Xl/2,d_=2*Xl;function c_(a){return a>1?0:a<-1?Xl:Math.acos(a)}function Ug(a){return a>=1?Mu:a<=-1?-Mu:Math.asin(a)}var Kg=Math.PI,qg=2*Kg,$n=1e-6,H$=qg-$n;function f_(a){this._+=a[0];for(let e=1,t=a.length;e<t;++e)this._+=arguments[e]+a[e]}function X$(a){let e=Math.floor(a);if(!(e>=0))throw new Error(`invalid digits: ${a}`);if(e>15)return f_;let t=10**e;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*t)/t+i[r]}}var wn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?f_:X$(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,i,r){this._append`Q${+e},${+t},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,t,i,r,s,o){this._append`C${+e},${+t},${+i},${+r},${this._x1=+s},${this._y1=+o}`}arcTo(e,t,i,r,s){if(e=+e,t=+t,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-e,h=r-t,u=o-e,p=n-t,d=u*u+p*p;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>$n)if(!(Math.abs(p*l-h*u)>$n)||!s)this._append`L${this._x1=e},${this._y1=t}`;else{let c=i-o,f=r-n,g=l*l+h*h,m=c*c+f*f,y=Math.sqrt(g),v=Math.sqrt(d),x=s*Math.tan((Kg-Math.acos((g+d-m)/(2*y*v)))/2),_=x/v,$=x/y;Math.abs(_-1)>$n&&this._append`L${e+_*u},${t+_*p}`,this._append`A${s},${s},0,0,${+(p*c>u*f)},${this._x1=e+$*l},${this._y1=t+$*h}`}}arc(e,t,i,r,s,o){if(e=+e,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(r),l=i*Math.sin(r),h=e+n,u=t+l,p=1^o,d=o?r-s:s-r;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>$n||Math.abs(this._y1-u)>$n)&&this._append`L${h},${u}`,i&&(d<0&&(d=d%qg+qg),d>H$?this._append`A${i},${i},0,1,${p},${e-n},${t-l}A${i},${i},0,1,${p},${this._x1=h},${this._y1=u}`:d>$n&&this._append`A${i},${i},0,${+(d>=Kg)},${p},${this._x1=e+i*Math.cos(s)},${this._y1=t+i*Math.sin(s)}`)}rect(e,t,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function m_(){return new wn}m_.prototype=wn.prototype;function Yl(a){let e=3;return a.digits=function(t){if(!arguments.length)return e;if(t==null)e=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);e=i}return a},()=>new wn(e)}function Y$(a){return a.innerRadius}function z$(a){return a.outerRadius}function W$(a){return a.startAngle}function G$(a){return a.endAngle}function U$(a){return a&&a.padAngle}function K$(a,e,t,i,r,s,o,n){var l=t-a,h=i-e,u=o-r,p=n-s,d=p*l-u*h;if(!(d*d<gr))return d=(u*(e-s)-p*(a-r))/d,[a+d*l,e+d*h]}function sc(a,e,t,i,r,s,o){var n=a-t,l=e-i,h=(o?s:-s)/Pn(n*n+l*l),u=h*l,p=-h*n,d=a+u,c=e+p,f=t+u,g=i+p,m=(d+f)/2,y=(c+g)/2,v=f-d,x=g-c,_=v*v+x*x,$=r-s,T=d*g-f*c,S=(x<0?-1:1)*Pn(p_(0,$*$*_-T*T)),k=(T*x-v*S)/_,A=(-T*v-x*S)/_,L=(T*x+v*S)/_,O=(-T*v+x*S)/_,I=k-m,R=A-y,B=L-m,Z=O-y;return I*I+R*R>B*B+Z*Z&&(k=L,A=O),{cx:k,cy:A,x01:-u,y01:-p,x11:k*(r/$-1),y11:A*(r/$-1)}}function Ts(){var a=Y$,e=z$,t=Re(0),i=null,r=W$,s=G$,o=U$,n=null,l=Yl(h);function h(){var u,p,d=+a.apply(this,arguments),c=+e.apply(this,arguments),f=r.apply(this,arguments)-Mu,g=s.apply(this,arguments)-Mu,m=Gg(g-f),y=g>f;if(n||(n=u=l()),c<d&&(p=c,c=d,d=p),!(c>gr))n.moveTo(0,0);else if(m>d_-gr)n.moveTo(c*vo(f),c*Ss(f)),n.arc(0,0,c,f,g,!y),d>gr&&(n.moveTo(d*vo(g),d*Ss(g)),n.arc(0,0,d,g,f,y));else{var v=f,x=g,_=f,$=g,T=m,S=m,k=o.apply(this,arguments)/2,A=k>gr&&(i?+i.apply(this,arguments):Pn(d*d+c*c)),L=rc(Gg(c-d)/2,+t.apply(this,arguments)),O=L,I=L,R,B;if(A>gr){var Z=Ug(A/d*Ss(k)),j=Ug(A/c*Ss(k));(T-=Z*2)>gr?(Z*=y?1:-1,_+=Z,$-=Z):(T=0,_=$=(f+g)/2),(S-=j*2)>gr?(j*=y?1:-1,v+=j,x-=j):(S=0,v=x=(f+g)/2)}var it=c*vo(v),st=c*Ss(v),ht=d*vo($),dt=d*Ss($);if(L>gr){var Xt=c*vo(x),tt=c*Ss(x),Tt=d*vo(_),Nt=d*Ss(_),Pe;if(m<Xl)if(Pe=K$(it,st,Tt,Nt,Xt,tt,ht,dt)){var ye=it-Pe[0],ke=st-Pe[1],We=Xt-Pe[0],ae=tt-Pe[1],Zi=1/Ss(c_((ye*We+ke*ae)/(Pn(ye*ye+ke*ke)*Pn(We*We+ae*ae)))/2),Ji=Pn(Pe[0]*Pe[0]+Pe[1]*Pe[1]);O=rc(L,(d-Ji)/(Zi-1)),I=rc(L,(c-Ji)/(Zi+1))}else O=I=0}S>gr?I>gr?(R=sc(Tt,Nt,it,st,c,I,y),B=sc(Xt,tt,ht,dt,c,I,y),n.moveTo(R.cx+R.x01,R.cy+R.y01),I<L?n.arc(R.cx,R.cy,I,Gi(R.y01,R.x01),Gi(B.y01,B.x01),!y):(n.arc(R.cx,R.cy,I,Gi(R.y01,R.x01),Gi(R.y11,R.x11),!y),n.arc(0,0,c,Gi(R.cy+R.y11,R.cx+R.x11),Gi(B.cy+B.y11,B.cx+B.x11),!y),n.arc(B.cx,B.cy,I,Gi(B.y11,B.x11),Gi(B.y01,B.x01),!y))):(n.moveTo(it,st),n.arc(0,0,c,v,x,!y)):n.moveTo(it,st),!(d>gr)||!(T>gr)?n.lineTo(ht,dt):O>gr?(R=sc(ht,dt,Xt,tt,d,-O,y),B=sc(it,st,Tt,Nt,d,-O,y),n.lineTo(R.cx+R.x01,R.cy+R.y01),O<L?n.arc(R.cx,R.cy,O,Gi(R.y01,R.x01),Gi(B.y01,B.x01),!y):(n.arc(R.cx,R.cy,O,Gi(R.y01,R.x01),Gi(R.y11,R.x11),!y),n.arc(0,0,d,Gi(R.cy+R.y11,R.cx+R.x11),Gi(B.cy+B.y11,B.cx+B.x11),y),n.arc(B.cx,B.cy,O,Gi(B.y11,B.x11),Gi(B.y01,B.x01),!y))):n.arc(0,0,d,$,_,y)}if(n.closePath(),u)return n=null,u+""||null}return h.centroid=function(){var u=(+a.apply(this,arguments)+ +e.apply(this,arguments))/2,p=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-Xl/2;return[vo(p)*u,Ss(p)*u]},h.innerRadius=function(u){return arguments.length?(a=typeof u=="function"?u:Re(+u),h):a},h.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Re(+u),h):e},h.cornerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Re(+u),h):t},h.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:Re(+u),h):i},h.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:Re(+u),h):r},h.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Re(+u),h):s},h.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Re(+u),h):o},h.context=function(u){return arguments.length?(n=u??null,h):n},h}var Fq=Array.prototype.slice;function ac(a){return typeof a=="object"&&"length"in a?a:Array.from(a)}function oc(a){return a[0]}function nc(a){return a[1]}function Ru(a,e){var t=Re(!0),i=null,r=Fu,s=null,o=Yl(n);a=typeof a=="function"?a:a===void 0?oc:Re(a),e=typeof e=="function"?e:e===void 0?nc:Re(e);function n(l){var h,u=(l=ac(l)).length,p,d=!1,c;for(i==null&&(s=r(c=o())),h=0;h<=u;++h)!(h<u&&t(p=l[h],h,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+a(p,h,l),+e(p,h,l));if(c)return s=null,c+""||null}return n.x=function(l){return arguments.length?(a=typeof l=="function"?l:Re(+l),n):a},n.y=function(l){return arguments.length?(e=typeof l=="function"?l:Re(+l),n):e},n.defined=function(l){return arguments.length?(t=typeof l=="function"?l:Re(!!l),n):t},n.curve=function(l){return arguments.length?(r=l,i!=null&&(s=r(i)),n):r},n.context=function(l){return arguments.length?(l==null?i=s=null:s=r(i=l),n):i},n}function Zg(a,e,t){var i=null,r=Re(!0),s=null,o=Fu,n=null,l=Yl(h);a=typeof a=="function"?a:a===void 0?oc:Re(+a),e=typeof e=="function"?e:e===void 0?Re(0):Re(+e),t=typeof t=="function"?t:t===void 0?nc:Re(+t);function h(p){var d,c,f,g=(p=ac(p)).length,m,y=!1,v,x=new Array(g),_=new Array(g);for(s==null&&(n=o(v=l())),d=0;d<=g;++d){if(!(d<g&&r(m=p[d],d,p))===y)if(y=!y)c=d,n.areaStart(),n.lineStart();else{for(n.lineEnd(),n.lineStart(),f=d-1;f>=c;--f)n.point(x[f],_[f]);n.lineEnd(),n.areaEnd()}y&&(x[d]=+a(m,d,p),_[d]=+e(m,d,p),n.point(i?+i(m,d,p):x[d],t?+t(m,d,p):_[d]))}if(v)return n=null,v+""||null}function u(){return Ru().defined(r).curve(o).context(s)}return h.x=function(p){return arguments.length?(a=typeof p=="function"?p:Re(+p),i=null,h):a},h.x0=function(p){return arguments.length?(a=typeof p=="function"?p:Re(+p),h):a},h.x1=function(p){return arguments.length?(i=p==null?null:typeof p=="function"?p:Re(+p),h):i},h.y=function(p){return arguments.length?(e=typeof p=="function"?p:Re(+p),t=null,h):e},h.y0=function(p){return arguments.length?(e=typeof p=="function"?p:Re(+p),h):e},h.y1=function(p){return arguments.length?(t=p==null?null:typeof p=="function"?p:Re(+p),h):t},h.lineX0=h.lineY0=function(){return u().x(a).y(e)},h.lineY1=function(){return u().x(a).y(t)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(p){return arguments.length?(r=typeof p=="function"?p:Re(!!p),h):r},h.curve=function(p){return arguments.length?(o=p,s!=null&&(n=o(s)),h):o},h.context=function(p){return arguments.length?(p==null?s=n=null:n=o(s=p),h):s},h}function g_(a,e){this._context=a,this._t=e}g_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(a,e);else{var t=this._x*(1-this._t)+a*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,e)}break}}this._x=a,this._y=e}};function Jg(a){return new g_(a,1)}var bo=class extends ot{constructor(){super(...arguments),this.chartContainer=this.children.push(ot.new(this._root,{width:X,height:X,interactiveChildren:!1})),this.bulletsContainer=ot.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:X,height:X})}};bo.className="Chart";bo.classNames=ot.classNames.concat([bo.className]);var or=class extends bo{constructor(){super(...arguments),this.seriesContainer=ot.new(this._root,{width:X,height:X,isMeasured:!1}),this.series=new go}_afterNew(){super._afterNew(),this._disposers.push(this.series);let e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(t=>{if(t.type==="clear"){F(t.oldValues,s=>{this._removeSeries(s)});let i=this.get("colors");i&&i.reset();let r=this.get("patterns");r&&r.reset()}else if(t.type==="push")e.moveValue(t.newValue),this._processSeries(t.newValue);else if(t.type==="setIndex")e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="insertIndex")e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="removeIndex")this._removeSeries(t.oldValue);else if(t.type==="moveIndex")e.moveValue(t.value,t.newIndex),this._processSeries(t.value);else if(t.type==="swap"){let i=t.a,r=t.b,s=this.series.indexOf(i),o=this.series.indexOf(r);e.moveValue(i,o),e.moveValue(r,s),this.series.each(n=>{this._processSeries(n),n.markDirtyValues()})}else throw new Error("Unknown IListEvent type")}))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e._handleRemoved(),e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}};or.className="SerialChart";or.classNames=bo.classNames.concat([or.className]);var xo=class extends le{_afterNew(){super._afterNewApplyThemes()}getFill(e){return{addColorStop:(t,i)=>{}}}_changed(){super._changed()}getBounds(e){let t=this.get("target");if(t){let i=t.globalBounds(),r=e.toLocal({x:i.left,y:i.top}),s=e.toLocal({x:i.right,y:i.top}),o=e.toLocal({x:i.right,y:i.bottom}),n=e.toLocal({x:i.left,y:i.bottom});return{left:Math.min(r.x,s.x,o.x,n.x),top:Math.min(r.y,s.y,o.y,n.y),right:Math.max(r.x,s.x,o.x,n.x),bottom:Math.max(r.y,s.y,o.y,n.y)}}return e._display.getLocalBounds()}};xo.className="Gradient";xo.classNames=le.classNames.concat([xo.className]);var Qs=class extends xo{getFill(e){let t=this.get("rotation",0),i=this.getBounds(e),r=i.left||0,s=i.right||0,o=i.top||0,n=i.bottom||0,l=ge(t),h=de(t),u=l*(s-r),p=h*(n-o);u==0&&(u=1),p==0&&(p=1);let d=Math.max(u,p),c=this._root._renderer.createLinearGradient(r,o,r+d*l,o+d*h),f=this.get("stops");if(f){let g=0;F(f,m=>{let y=m.offset;M(y)||(y=g/(f.length-1));let v=m.opacity;M(v)||(v=1);let x=m.color;if(x){let _=m.lighten;_&&(x=yt.lighten(x,_));let $=m.brighten;$&&(x=yt.brighten(x,$)),c.addColorStop(y,"rgba("+x.r+","+x.g+","+x.b+","+v+")")}g++})}return c}};Qs.className="LinearGradient";Qs.classNames=xo.classNames.concat([Qs.className]);var Ds=class extends ot{constructor(){super(...arguments),this.labelContainer=this.children.push(ot.new(this._root,{})),this.markerContainer=this.children.push(ot.new(this._root,{})),this.startLabel=this.labelContainer.children.push(Qt.new(this._root,{themeTags:["start"]})),this.endLabel=this.labelContainer.children.push(Qt.new(this._root,{themeTags:["end"]})),this.markers=this.addDisposer(new be(jt.new({}),()=>Xe._new(this._root,{themeTags:xt(this.markers.template.get("themeTags",[]),[this.get("orientation"),"heatlegend","marker"])},[this.markers.template])))}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["heatlegend",this._settings.orientation]),super._afterNew(),this.set("tooltip",Ci.new(this._root,{themeTags:["heatlegend"]}))}makeMarker(){let e=this.markers.make();return e.states.create("disabled",{}),e}showValue(e,t,i){let r=this.getTooltip();if(r&&M(e)){let s=this.get("startValue",0),o=this.get("endValue",1),n=(e-s)/(o-s);(n==1/0||n==-1/0||isNaN(n))&&(n=.5);let l=this.get("startColor"),h=this.get("endColor");t||(t=this.getNumberFormatter().format(e)),i||(i=yt.interpolate(n,l,h)),r.label.set("text",t);let u;this.get("orientation")=="vertical"?u=this.markerContainer.toGlobal({x:0,y:this.innerHeight()*(1-n)}):u=this.markerContainer.toGlobal({x:this.innerWidth()*n,y:0});let p=r.get("background");p&&p.set("fill",i),r.set("pointTo",u),r.show()}}_prepareChildren(){super._prepareChildren();let e=this.labelContainer,t=this.get("orientation"),i=this.startLabel,r=this.endLabel,s=this.getTooltip();if(this.isDirty("orientation")&&(t=="vertical"?(this.markerContainer.setAll({layout:this._root.verticalLayout,height:X}),this.set("layout",this._root.horizontalLayout),i.setAll({y:X,x:void 0,centerY:X,centerX:X}),r.setAll({y:0,x:void 0,centerY:0,centerX:X}),e.setAll({height:X,width:void 0}),s&&s.set("pointerOrientation","horizontal")):(this.markerContainer.setAll({layout:this._root.horizontalLayout,width:X}),this.set("layout",this._root.verticalLayout),i.setAll({x:0,y:void 0,centerX:0,centerY:0}),r.setAll({x:X,y:void 0,centerX:X,centerY:0}),e.setAll({width:X,height:void 0}),s&&s.set("pointerOrientation","vertical"))),this.isDirty("stepCount")){let o=this.get("stepCount",1),n=this.get("startColor"),l=this.get("endColor"),h=this.get("startOpacity",1),u=this.get("endOpacity",1);if(this.markerContainer.children.clear(),o>1)for(let p=0;p<o;p++){let d=this.makeMarker();t=="vertical"?this.markerContainer.children.moveValue(d,0):this.markerContainer.children.push(d),n&&l&&d.setAll({fill:yt.interpolate(p/o,n,l),fillOpacity:Jt(p/o*100).interpolate(h,u)})}else if(o==1){let p=this.makeMarker();this.markerContainer.children.push(p);let d=Qs.new(this._root,{stops:[{color:n,opacity:h},{color:l,opacity:u}]});if(t=="vertical"){d.set("rotation",90);let c=d.get("stops");c&&c.reverse()}else d.set("rotation",0);n&&l&&p.set("fillGradient",d)}}(this.isDirty("startText")||this.isDirty("startValue"))&&i.set("text",this.get("startText",this.getNumberFormatter().format(this.get("startValue",0)))),(this.isDirty("endText")||this.isDirty("endValue"))&&r.set("text",this.get("endText",this.getNumberFormatter().format(this.get("endValue",1))))}};Ds.className="HeatLegend";Ds.classNames=ot.classNames.concat([Ds.className]);function Qg(a,e){for(let t=0,i=e.length;t<i;t++){let r=e[t];if(r.length>0){let s=r[0];if(s.length>0){let o=s[0];a.moveTo(o.x,o.y);for(let n=0,l=r.length;n<l;n++)q$(a,r[n])}}}}function q$(a,e){for(let t=0,i=e.length;t<i;t++){let r=e[t];a.lineTo(r.x,r.y)}}var _o=class extends kt{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("points"),t=this.get("segments");if(e&&e.length>0){let i=e[0];this._display.moveTo(i.x,i.y),Qg(this._display,[[e]])}else if(t)Qg(this._display,t);else if(!this.get("draw")){let i=this.width(),r=this.height();this._display.moveTo(0,0),this._display.lineTo(i,r)}}}};_o.className="Line";_o.classNames=kt.classNames.concat([_o.className]);var Cn=class extends ls{constructor(){super(...arguments),this._display=this._root._renderer.makeRadialText("",this.textStyle)}_afterNew(){super._afterNew()}_beforeChanged(){super._beforeChanged(),this._display.clear(),this.isDirty("textType")&&(this._display.textType=this.get("textType"),this.markDirtyBounds()),this.isDirty("radius")&&(this._display.radius=this.get("radius"),this.markDirtyBounds()),this.isDirty("startAngle")&&(this._display.startAngle=(this.get("startAngle",0)+90)*Ge,this.markDirtyBounds()),this.isDirty("inside")&&(this._display.inside=this.get("inside"),this.markDirtyBounds()),this.isDirty("orientation")&&(this._display.orientation=this.get("orientation"),this.markDirtyBounds()),this.isDirty("kerning")&&(this._display.kerning=this.get("kerning"),this.markDirtyBounds())}};Cn.className="RadialText";Cn.classNames=ls.classNames.concat([Cn.className]);var ta=class extends Qt{constructor(){super(...arguments),this._flipped=!1}_afterNew(){this._textKeys.push("textType","kerning"),super._afterNew()}_makeText(){this._text=this.children.push(Cn.new(this._root,{}))}baseRadius(){let e=this.getPrivate("radius",0),t=this.getPrivate("innerRadius",0),i=this.get("baseRadius",0);return t+Ht(i,e-t)}radius(){let e=this.get("inside",!1);return this.baseRadius()+this.get("radius",0)*(e?-1:1)}_updateChildren(){if(super._updateChildren(),this.isDirty("baseRadius")||this.isPrivateDirty("radius")||this.isPrivateDirty("innerRadius")||this.isDirty("labelAngle")||this.isDirty("radius")||this.isDirty("inside")||this.isDirty("orientation")||this.isDirty("textType")){let e=this.get("textType","adjusted"),t=this.get("inside",!1),i=this.get("orientation"),r=ar(this.get("labelAngle",0));this._text.set("startAngle",this.get("labelAngle",0)),this._text.set("inside",t);let s=de(r),o=ge(r),n=this.baseRadius(),l=this.radius();if(this._display.angle=0,e=="circular")this.setAll({paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}),this.setRaw("x",void 0),this.setRaw("y",void 0),this._text.set("orientation",i),this._text.set("radius",l);else{n==0&&(r=0,l=0);let h=l*o,u=l*s;e=="radial"?(this.setRaw("x",h),this.setRaw("y",u),r<90||r>270||i!="auto"?(this._display.angle=r,this._flipped=!1):(this._display.angle=r+180,this._flipped=!0),this._dirty.rotation=!1):e=="adjusted"?(this.setRaw("centerX",pt),this.setRaw("centerY",pt),this.setRaw("x",h),this.setRaw("y",u)):e=="regular"&&(this.setRaw("x",h),this.setRaw("y",u))}this.markDirtyPosition(),this.markDirtyBounds()}}_updatePosition(){let e=this.get("textType","regular"),t=this.get("inside",!1),i=0,r=0,s=this.get("labelAngle",0),o=this.localBounds(),n=o.right-o.left,l=o.bottom-o.top;if(e=="radial"){if(this._flipped){let h=this.get("centerX");h instanceof St&&(n=n*(1-h.value*2)),i=n*ge(s),r=n*de(s)}}else!t&&e=="adjusted"&&(i=n/2*ge(s),r=l/2*de(s));this.setRaw("dx",i),this.setRaw("dy",r),super._updatePosition()}get text(){return this._text}};ta.className="RadialLabel";ta.classNames=Qt.classNames.concat([ta.className]);var nr=class extends kt{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=Ts()}_getTooltipPoint(){let e=this.get("tooltipX"),t=this.get("tooltipY"),i=0,r=0;M(e)&&(i=e),M(t)&&(r=t);let s=this.get("radius",0),o=this.get("innerRadius",0),n=this.get("dRadius",0),l=this.get("dInnerRadius",0);return s+=n,o+=l,o<0&&(o=s+o),e instanceof St&&(i=this.ix*(o+(s-o)*e.value)),t instanceof St&&(r=this.iy*(o+(s-o)*t.value)),this.get("arc")>=360&&o==0&&(i=0,r=0),{x:i,y:r}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("startAngle",0),t=this.get("arc",0),i=this._generator;t<0&&(e=e+t,t=t*-1),t>.1&&i.cornerRadius(this.get("cornerRadius",0)),i.context(this._display);let r=this.get("radius",0),s=this.get("innerRadius",0),o=this.get("dRadius",0),n=this.get("dInnerRadius",0);r+=o,s+=n,s<0&&(s=r+s),i({innerRadius:s,outerRadius:r,startAngle:(e+90)*Ge,endAngle:(e+t+90)*Ge});let l=e+t/2;this.ix=ge(l),this.iy=de(l);let h=this.get("shiftRadius",0);this.setRaw("dx",this.ix*h),this.setRaw("dy",this.iy*h),this.markDirtyPosition()}}};nr.className="Slice";nr.classNames=kt.classNames.concat([nr.className]);var ea=class extends _o{};ea.className="Tick";ea.classNames=_o.classNames.concat([ea.className]);var Aa=class extends Fr{_beforeChanged(){super._beforeChanged(),this.isDirty("gap")&&(this._clear=!0)}_draw(){super._draw();let e=this.get("width",100),t=this.get("height",100),i=this.get("gap",0),r=this.get("strokeWidth",1);if(!i)this._display.moveTo(0,0),this._display.lineTo(e,0);else{let n=i+r,l=t/n,h=this.get("angle",0)*Math.PI/180;if(h===0)for(let u=-l;u<l*2;u++){let p=Math.round(u*n-n/2)+.5;this._display.moveTo(-e,p),this._display.lineTo(e*2,p)}else{let u=Math.cos(h),p=Math.sin(h),d=Math.sqrt(e*e+t*t)*2,c=n/Math.max(Math.abs(u),Math.abs(p)),f=Math.ceil(d/c)*2;for(let g=-f;g<f;g++){let m=g*n,y=m*p-d*u,v=m*u+d*p,x=m*p+d*u,_=m*u-d*p;this._display.moveTo(y,v),this._display.lineTo(x,_)}}}this._display.lineStyle(r,this.get("color"),this.get("colorOpacity"));let s=this.get("strokeDasharray");M(s)&&(s<.5?s=[0]:s=[s]),this._display.setLineDash(s);let o=this.get("strokeDashoffset");o&&this._display.setLineDashOffset(o),this._display.endStroke()}};Aa.className="LinePattern";Aa.classNames=Fr.classNames.concat([Aa.className]);var Po=class extends Fr{_beforeChanged(){super._beforeChanged(),this.isDirty("gap")&&(this._clear=!0)}_draw(){super._draw();let e=this.get("checkered",!1),t=this.get("centered",!0),i=this.get("gap",0),r=this.get("rotation",0),s=this.get("width",100),o=this.get("height",100),n=this.get("maxWidth",5),l=this.get("maxHeight",5),h=this._display,u=n+i,p=l+i,d=Math.round(s/u),c=Math.round(o/p);u=s/d,p=o/c,r!=0&&(h.x=u/2*ge(r),h.y=-p/2*de(r));for(let m=r==0?0:-c*2;m<c*2;m++)for(let y=r==0?0:-d*2;y<d*2;y++)if(!e||(m&1)!=1&&(y&1)!=1||(m&1)==1&&(y&1)==1){let v=y*u,x=m*p;t&&(v+=(u-n)/2,x+=(p-l)/2),h.drawRect(v,x,n,l)}e?(s=s/2-i*2,o=o/2-i*2):(s-=i,o-=i);let f=this.get("color"),g=this.get("colorOpacity");(f||g)&&(h.beginFill(f,g),h.endFill())}};Po.className="RectanglePattern";Po.classNames=Fr.classNames.concat([Po.className]);var ia=class extends le{_afterNew(){super._afterNewApplyThemes(),this._dirty.colors=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);let e=this.getPrivate("currentPass"),t=this.get("colors",[this.get("baseColor",yt.fromHex(16711680))]);this.getPrivate("numColors")||this.setPrivate("numColors",t.length);let i=this.getPrivate("numColors"),r=0,s=this.get("passOptions"),o=this.get("reuse");for(let n=r;n<i;n++)if(o)t.push(t[n]);else{let l=t[n].toHSL(),h=l.h+(s.hue||0)*e;for(;h>1;)h-=1;let u=l.s+(s.saturation||0)*e;u>1&&(u=1),u<0&&(u=0);let p=l.l+(s.lightness||0)*e;for(;p>1;)p-=1;t.push(yt.fromHSL(h,u,p))}}getIndex(e){let t=this.get("colors",[]),i=this.get("saturation");return e>=t.length?(this.generateColors(),this.getIndex(e)):i!=null?yt.saturate(t[e],i):t[e]}next(){let e=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",e+this.get("step",1)),this.getIndex(e)}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0)}};ia.className="ColorSet";ia.classNames=le.classNames.concat([ia.className]);var lc=class extends Rr{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:ia.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:yt.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:ia.new(this._root,{saturation:0})});{let l=i("Graphics",["scrollbar","overlay"]);l.setAll({fillOpacity:.5}),lt(l,"fill",e,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:X,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:X}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:X}),i("AxisLabel",["y"]).setAll({centerX:X}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:X}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{let l=i("Grid",["cursor","x"]);l.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use left and right arrows to move selection")}),lt(l,"stroke",e,"alternativeBackground")}{let l=i("Grid",["cursor","y"]);l.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:t.translate("Use up and down arrows to move selection")}),lt(l,"stroke",e,"alternativeBackground")}{let l=i("Graphics",["cursor","selection"]);l.setAll({fillOpacity:.15}),lt(l,"fill",e,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:pt,centerY:pt,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{let l=i("AxisRenderer");l.setAll({crisp:!0,strokeOpacity:0}),lt(l,"stroke",e,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:X}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:X});{let l=i("Rectangle",["axis","thumb","zoomgrip"]);l.setAll({fillOpacity:0}),lt(l,"fill",e,"alternativeBackground"),l.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{let l=i("Grid");l.setAll({location:0,strokeOpacity:.15,crisp:!0}),lt(l,"stroke",e,"grid")}{let l=i("Grid",["minor"]);l.setAll({location:0,strokeOpacity:.07,crisp:!0}),lt(l,"stroke",e,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{let l=i("Graphics",["axis","fill"]);l.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),lt(l,"fill",e,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{let l=i("AxisTick");l.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),lt(l,"stroke",e,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(l,h)=>{let u=l.get("axisFill");u&&(!M(h)||h%2==0?u.setPrivate("visible",!0):u.setPrivate("visible",!1))}});let r=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],s={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_hour"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month"),year:t.translate("_date_year")},o={millisecond:t.translate("_date_millisecond"),second:t.translate("_date_second"),minute:t.translate("_date_minute"),hour:t.translate("_date_day"),day:t.translate("_date_day"),week:t.translate("_date_day"),month:t.translate("_date_month")+" "+t.translate("_date_year"),year:t.translate("_date_year")},n={millisecond:t.translate("_date_millisecond_full"),second:t.translate("_date_second_full"),minute:t.translate("_date_minute_full"),hour:t.translate("_date_hour_full"),day:t.translate("_date_day_full"),week:t.translate("_date_week_full"),month:t.translate("_date_month_full"),year:t.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:du(r),dateFormats:ss(s),periodChangeDateFormats:ss(o)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:du(r),dateFormats:ss(s),periodChangeDateFormats:ss(o),tooltipDateFormats:n,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:l=>{let h=l.get("axisFill");if(h){let u=l.component,p=l.get("value"),d=l.get("endValue"),c=u.intervalDuration(),f=u.getPrivate("baseInterval"),g=u.getPrivate("gridInterval",f),m=u.getPrivate("min",0);if(m=Ta(new Date(m),g.timeUnit,g.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),p!=null&&d!=null){let y=Math.round(Math.round((p-m)/c))/2;y==Math.round(y)?h.setPrivate("visible",!0):h.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:l=>{let h=l.get("axisFill");if(h){let u=l.get("index"),p=!1;(!M(u)||u%2==0)&&(p=!0),h.setPrivate("visible",p)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:l=>{let h=l.get("axisFill");if(h){let u=l.component,p=l.get("value"),d=u.getPrivate("step");M(p)&&M(d)&&(Je(p/d/2,5)==Math.round(p/d/2)?h.setPrivate("visible",!1):h.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:Jt(70),height:Jt(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(l,h)=>{let u=h.parent;if(u){let p=u.height(),d=u.width();l.moveTo(0,p/2),l.lineTo(d,p/2)}}});{let l=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});lt(l,"stroke",e,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(l,h)=>{let u=h.parent;if(u){let p=u.height(),d=u.width();l.moveTo(0,0),l.lineTo(d,0),l.lineTo(d,p),l.lineTo(0,p),l.lineTo(0,0)}}});{let l=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});lt(l,"stroke",e,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:Jt(50),height:Jt(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:Jt(80),height:Jt(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{let l=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});lt(l,"fill",e,"positive"),lt(l,"stroke",e,"positive")}{let l=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});lt(l,"fill",e,"negative"),lt(l,"stroke",e,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{let l=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});lt(l,"fill",e,"positive"),lt(l,"stroke",e,"positive")}{let l=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});lt(l,"fill",e,"negative"),lt(l,"stroke",e,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{let l=i("Graphics",["rangegrip","button","icon"]);l.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:h=>{h.moveTo(0,.5),h.lineTo(0,12.5),h.moveTo(2,.5),h.lineTo(2,12.5),h.moveTo(4,.5),h.lineTo(4,12.5)}}),lt(l,"stroke",e,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:pt}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:pt}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:X}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:X})}};var Si=class extends or{constructor(){super(...arguments),this.xAxes=new go,this.yAxes=new go,this.topAxesContainer=this.chartContainer.children.push(ot.new(this._root,{width:X,layout:this._root.verticalLayout})),this.yAxesAndPlotContainer=this.chartContainer.children.push(ot.new(this._root,{width:X,height:X,layout:this._root.horizontalLayout})),this.bottomAxesContainer=this.chartContainer.children.push(ot.new(this._root,{width:X,layout:this._root.verticalLayout})),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(ot.new(this._root,{height:X,layout:this._root.horizontalLayout})),this.plotsContainer=this.yAxesAndPlotContainer.children.push(ot.new(this._root,{width:X,height:X,maskContent:!1})),this.plotContainer=this.plotsContainer.children.push(ot.new(this._root,{width:X,height:X})),this.topPlotContainer=this.plotsContainer.children.push(ot.new(this._root,{width:X,height:X})),this.gridContainer=this.plotContainer.children.push(ot.new(this._root,{width:X,height:X,isMeasured:!1})),this.topGridContainer=ot.new(this._root,{width:X,height:X,isMeasured:!1}),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(ot.new(this._root,{height:X,layout:this._root.horizontalLayout})),this.axisHeadersContainer=this.plotContainer.children.push(ot.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(ka.new(this._root,{themeTags:["zoom"],icon:kt.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(lc.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);let e=this._root,t=this._root.verticalLayout,i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",t);let r=this.plotContainer;r.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),r.children.push(this.topGridContainer),r.children.push(this.bulletsContainer),r.set("interactive",!0),r.set("interactiveChildren",!1),r.set("background",He.new(e,{themeTags:["plotbackground","xy","background"]})),this._disposers.push(r.events.on("pointerdown",s=>{this._handlePlotDown(s)})),this._disposers.push(r.events.on("globalpointerup",s=>{this._handlePlotUp(s)})),this._disposers.push(r.events.on("globalpointermove",s=>{this._handlePlotMove(s)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(e){e._unstack(),e._posXDp&&e._posXDp.dispose(),e._posYDp&&e._posYDp.dispose(),e.set("baseAxis",void 0);let t=e.get("xAxis");t&&(li(t.series,e),t.markDirtyExtremes());let i=e.get("yAxis");i&&(li(i.series,e),i.markDirtyExtremes());let r=this.get("cursor");if(r){let s=r.get("snapToSeries");s&&li(s,e)}super._removeSeries(e)}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}handleWheel(e){let t=this.get("wheelX"),i=this.get("wheelY"),r=this.plotContainer,s=e.originalEvent,o=!1;if(Vl(s,this))o=!0;else return;let n=r.toLocal(e.point),l=this.get("wheelStep",.2),h=s.deltaY/100,u=s.deltaX/100,p=this.get("wheelZoomPositionX"),d=this.get("wheelZoomPositionY");(t==="zoomX"||t==="zoomXY")&&u!=0&&this.xAxes.each(c=>{if(c.get("zoomX")){let f=c.get("start"),g=c.get("end"),m=c.fixPosition(n.x/r.width());p!=null&&(m=p);let y=c.get("maxDeviation",0),v=Math.min(1+y,Math.max(-y,f-l*(g-f)*u*m)),x=Math.max(-y,Math.min(1+y,g+l*(g-f)*u*(1-m)));v==f&&x==g&&(o=!1),1/(x-v)<c.getPrivate("maxZoomFactor",1/0)/c.get("minZoomCount",1)?this._handleWheelAnimation(c.zoom(v,x)):o=!1}}),(i==="zoomX"||i==="zoomXY")&&h!=0&&this.xAxes.each(c=>{if(c.get("zoomX")){let f=c.get("start"),g=c.get("end"),m=c.fixPosition(n.x/r.width());p!=null&&(m=p);let y=c.get("maxDeviation",0),v=Math.min(1+y,Math.max(-y,f-l*(g-f)*h*m)),x=Math.max(-y,Math.min(1+y,g+l*(g-f)*h*(1-m)));v==f&&x==g&&(o=!1),1/(x-v)<c.getPrivate("maxZoomFactor",1/0)/c.get("minZoomCount",1)?this._handleWheelAnimation(c.zoom(v,x)):o=!1}}),(t==="zoomY"||t==="zoomXY")&&u!=0&&this.yAxes.each(c=>{if(c.get("zoomY")){let f=c.get("start"),g=c.get("end"),m=c.fixPosition(n.y/r.height());d!=null&&(m=d);let y=c.get("maxDeviation",0),v=Math.min(1+y,Math.max(-y,f-l*(g-f)*u*m)),x=Math.max(-y,Math.min(1+y,g+l*(g-f)*u*(1-m)));v==f&&x==g&&(o=!1),1/(x-v)<c.getPrivate("maxZoomFactor",1/0)/c.get("minZoomCount",1)?this._handleWheelAnimation(c.zoom(v,x)):o=!1}}),(i==="zoomY"||i==="zoomXY")&&h!=0&&this.yAxes.each(c=>{if(c.get("zoomY")){let f=c.get("start"),g=c.get("end"),m=c.fixPosition(n.y/r.height());d!=null&&(m=d);let y=c.get("maxDeviation",0),v=Math.min(1+y,Math.max(-y,f-l*(g-f)*h*m)),x=Math.max(-y,Math.min(1+y,g+l*(g-f)*h*(1-m)));v==f&&x==g&&(o=!1),1/(x-v)<c.getPrivate("maxZoomFactor",1/0)/c.get("minZoomCount",1)?this._handleWheelAnimation(c.zoom(v,x)):o=!1}}),(t==="panX"||t==="panXY")&&u!=0&&this.xAxes.each(c=>{if(c.get("panX")){let f=c.get("start"),g=c.get("end"),m=this._getWheelSign(c)*l*(g-f)*u,y=f+m,v=g+m,x=this._fixWheel(y,v);y=x[0],v=x[1],y==f&&v==g&&(o=!1),this._handleWheelAnimation(c.zoom(y,v))}}),(i==="panX"||i==="panXY")&&h!=0&&this.xAxes.each(c=>{if(c.get("panX")){let f=c.get("start"),g=c.get("end"),m=this._getWheelSign(c)*l*(g-f)*h,y=f+m,v=g+m,x=this._fixWheel(y,v);y=x[0],v=x[1],y==f&&v==g&&(o=!1),this._handleWheelAnimation(c.zoom(y,v))}}),(t==="panY"||t==="panXY")&&u!=0&&this.yAxes.each(c=>{if(c.get("panY")){let f=c.get("start"),g=c.get("end"),m=this._getWheelSign(c)*l*(g-f)*u,y=f+m,v=g+m,x=this._fixWheel(y,v);y=x[0],v=x[1],y==f&&v==g&&(o=!1),this._handleWheelAnimation(c.zoom(y,v))}}),(i==="panY"||i==="panXY")&&h!=0&&this.yAxes.each(c=>{if(c.get("panY")){let f=c.get("start"),g=c.get("end"),m=this._getWheelSign(c)*l*(g-f)*h,y=f-m,v=g-m,x=this._fixWheel(y,v);y=x[0],v=x[1],y==f&&v==g&&(o=!1),this._handleWheelAnimation(c.zoom(y,v))}}),o&&s.preventDefault()}_handleSetWheel(){let e=this.get("wheelX"),t=this.get("wheelY"),i=this.plotContainer;e!=="none"||t!=="none"?(this._wheelDp=i.events.on("wheel",r=>{let s=r.originalEvent;(e!=="none"&&Math.abs(s.deltaX)!=0||t!=="none"&&Math.abs(s.deltaY)!=0)&&this.handleWheel(r)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(e){let t=1;return e.get("renderer").get("inversed")&&(t=-1),t}_fixWheel(e,t){let i=t-e;return e<0&&(e=0,t=e+i),t>1&&(t=1,e=t-i),[e,t]}_handlePlotDown(e){let t=e.originalEvent;if(t.button==2)return;let i=this.plotContainer,r=i.toLocal(e.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&t.pointerId&&wi(i._downPoints).length>0){let o=this.xAxes.getIndex(0),n=this.yAxes.getIndex(0);o&&(this._downStartX=o.get("start",0),this._downEndX=o.get("end",1)),n&&(this._downStartY=n.get("start",0),this._downEndY=n.get("end",1))}if((this.get("panX")||this.get("panY"))&&r.x>=0&&r.y>=0&&r.x<=i.width()&&r.y<=this.height()){this._downPoint={x:t.clientX,y:t.clientY};let s=this.get("panX"),o=this.get("panY");s&&this.xAxes.each(l=>{l._panStart=l.get("start"),l._panEnd=l.get("end")}),o&&this.yAxes.each(l=>{l._panStart=l.get("start"),l._panEnd=l.get("end")});let n="panstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}}_handleWheelAnimation(e){e?e.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){let e="wheelended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}_handlePlotUp(e){let t=this._downPoint;if(t&&(this.get("panX")||this.get("panY"))){if(e.originalEvent.clientX==t.x&&e.originalEvent.clientY==t.y){let r="pancancelled";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this,originalEvent:e.originalEvent})}let i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:e.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(e){let t=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){let s=e.originalEvent.pointerId;if(s&&(this._movePoints[s]=e.point,wi(t._downPoints).length>1)){this._handlePinch();return}}let i=this._downPoint;if(i){i=t.toLocal(this._root.documentPointToRoot(i));let r=t.toLocal(e.point),s=this.get("panX"),o=this.get("panY");if(s){let n=this.get("scrollbarX");n&&n.events.disableType("rangechanged"),this.xAxes.each(l=>{if(l.get("panX")){l._isPanning=!0;let h=l._panStart,u=l._panEnd,d=(u-h)*(i.x-r.x)/t.width();l.get("renderer").get("inversed")&&(d*=-1);let c=h+d,f=u+d;f-c<1+l.get("maxDeviation",1)*2&&(l.set("start",c),l.set("end",f))}}),n&&n.events.enableType("rangechanged")}if(o){let n=this.get("scrollbarY");n&&n.events.disableType("rangechanged"),this.yAxes.each(l=>{if(l.get("panY")){l._isPanning=!0;let h=l._panStart,u=l._panEnd,d=(u-h)*(i.y-r.y)/t.height();l.get("renderer").get("inversed")&&(d*=-1);let c=h-d,f=u-d;f-c<1+l.get("maxDeviation",1)*2&&(l.set("start",c),l.set("end",f))}}),n&&n.events.enableType("rangechanged")}}}_handlePinch(){let e=this.plotContainer,t=0,i=[],r=[];if(Vt(e._downPoints,(s,o)=>{i[t]=o;let n=this._movePoints[s];n&&(r[t]=n),t++}),i.length>1&&r.length>1){let s=e.width(),o=e.height(),n=i[0],l=i[1],h=r[0],u=r[1];if(n&&l&&h&&u){if(h=e.toLocal(h),u=e.toLocal(u),n=e.toLocal(n),l=e.toLocal(l),this.get("pinchZoomX")){let p=this._downStartX,d=this._downEndX;if(p!=null&&d!=null){n.x>l.x&&([n,l]=[l,n],[h,u]=[u,h]);let c=p+n.x/s*(d-p),f=p+l.x/s*(d-p),g=p+h.x/s*(d-p),m=p+u.x/s*(d-p),y=Math.max(.001,f-c),v=Math.max(.001,m-g),x=y/v,_=p*x+c-g*x,$=d*x+f-m*x;this.xAxes.each(T=>{let S=T.fixPosition(_),k=T.fixPosition($);T.zoom(S,k,0)})}}if(this.get("pinchZoomY")){let p=this._downStartY,d=this._downEndY;if(p!=null&&d!=null){n.y<l.y&&([n,l]=[l,n],[h,u]=[u,h]);let c=p+(1-n.y/o)*(d-p),f=p+(1-l.y/o)*(d-p),g=p+(1-h.y/o)*(d-p),m=p+(1-u.y/o)*(d-p),y=Math.max(.001,f-c),v=Math.max(.001,m-g),x=y/v,_=p*x+c-g*x,$=d*x+f-m*x;this.yAxes.each(T=>{let S=T.fixPosition(_),k=T.fixPosition($);T.zoom(S,k,0)})}}}}}_handleCursorPosition(){let e=this.get("cursor");if(e){let t=e.getPrivate("point"),i=e.get("snapToSeries");if(e._downPoint&&(i=void 0),i&&t){let r=e.get("snapToSeriesBy"),s=[];F(i,l=>{if(!l.isHidden()&&!l.isHiding())if(r!="x!"&&r!="y!"){let h=l.startIndex(),u=l.endIndex();for(let p=h;p<u;p++){let d=l.dataItems[p];d&&!d.isHidden()&&s.push(d)}}else{let h=l.get("tooltipDataItem");h&&s.push(h)}});let o=1/0,n;if(F(s,l=>{let h=l.get("point");if(h){let u=0;r=="x"||r=="x!"?u=Math.abs(t.x-h.x):r=="y"||r=="y!"?u=Math.abs(t.y-h.y):u=Math.hypot(t.x-h.x,t.y-h.y),u<o&&(o=u,n=l)}}),F(i,l=>{let h=l.get("tooltip");h&&h._setDataItem(void 0)}),n){let l=n.component;l.showDataItemTooltip(n),l.setRaw("tooltipDataItem",n);let h=n.get("point");h&&e.handleMove(l.toGlobal({x:h.x-l.x(),y:h.y-l.y()}),!0)}}}}_updateCursor(){let e=this.get("cursor");e&&e.updateCursor()}_addCursor(e){this.plotContainer.children.push(e)}_prepareChildren(){if(super._prepareChildren(),this.series.each(e=>{this._colorize(e)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){let e=this._prevSettings.cursor,t=this.get("cursor");t!==e&&(this._disposeProperty("cursor"),e&&e.dispose(),t&&(t._setChart(this),this._addCursor(t),this._pushPropertyDisposer("cursor",t.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=t)}if(this.isDirty("scrollbarX")){let e=this._prevSettings.scrollbarX,t=this.get("scrollbarX");t!==e&&(this._disposeProperty("scrollbarX"),e&&e.dispose(),t&&(t.parent||this.topAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarX",t.events.on("rangechanged",i=>{this._handleScrollbar(this.xAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarX",t.events.on("released",()=>{this.xAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let r=this.xAxes.getIndex(0);return r&&r.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=t)}if(this.isDirty("scrollbarY")){let e=this._prevSettings.scrollbarY,t=this.get("scrollbarY");t!==e&&(this._disposeProperty("scrollbarY"),e&&e.dispose(),t&&(t.parent||this.rightAxesContainer.children.push(t),this._pushPropertyDisposer("scrollbarY",t.events.on("rangechanged",i=>{this._handleScrollbar(this.yAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarY",t.events.on("released",()=>{this.yAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),t.setPrivate("positionTextFunction",i=>{let r=this.yAxes.getIndex(0);return r&&r.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=t)}this._handleZoomOut()}_processSeries(e){super._processSeries(e);let t=e.get("xAxis"),i=e.get("yAxis");pu(t.series,e),pu(i.series,e),e._posXDp=e.addDisposer(t.events.on("positionchanged",()=>{e._fixPosition()})),e._posXDp=e.addDisposer(i.events.on("positionchanged",()=>{e._fixPosition()})),e.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?e.set("baseAxis",i):e.set("baseAxis",t)),e.get("stacked")&&(e._markDirtyKey("stacked"),F(e.dataItems,r=>{r.set("stackToItemY",void 0),r.set("stackToItemX",void 0)})),e._markDirtyAxes(),i.markDirtyExtremes(),t.markDirtyExtremes(),t._seriesAdded=!0,i._seriesAdded=!0,this._colorize(e)}_colorize(e){let t=this.get("colors");if(t&&e.get("fill")==null){let r=t.next();e._setSoft("stroke",r),e._setSoft("fill",r)}let i=this.get("patterns");if(i&&e.get("fillPattern")==null){let r=i.next();e._setSoft("fillPattern",r)}}_handleCursorSelectEnd(){let e=this.get("cursor"),t=e.get("behavior"),i=e.getPrivate("downPositionX",0),r=e.getPrivate("downPositionY",0),s=Math.min(1,Math.max(0,e.getPrivate("positionX",.5))),o=Math.min(1,Math.max(0,e.getPrivate("positionY",.5)));this.xAxes.each(n=>{if(t==="zoomX"||t==="zoomXY"){let l=n.toAxisPosition(i),h=n.toAxisPosition(s);n.zoom(l,h)}n.setPrivate("updateScrollbar",!0)}),this.yAxes.each(n=>{if(t==="zoomY"||t==="zoomXY"){let l=n.toAxisPosition(r),h=n.toAxisPosition(o);n.zoom(l,h)}n.setPrivate("updateScrollbar",!0)})}_handleScrollbar(e,t,i,r){e.each(s=>{let o=s.fixPosition(t),n=s.fixPosition(i),l=s.zoom(o,n,void 0,r),h="updateScrollbar";s.setPrivateRaw(h,!1),l?l.events.on("stopped",()=>{s.setPrivateRaw(h,!0)}):s.setPrivateRaw(h,!0)})}_processAxis(e,t){return e.events.onAll(i=>{if(i.type==="clear")F(i.oldValues,r=>{this._removeAxis(r)});else if(i.type==="push")t.children.push(i.newValue),i.newValue.processChart(this);else if(i.type==="setIndex")t.children.setIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="insertIndex")t.children.insertIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="removeIndex")this._removeAxis(i.oldValue);else if(i.type==="moveIndex")t.children.moveValue(i.value,i.newIndex),i.value.processChart(this);else throw new Error("Unknown IListEvent type")})}_removeAxis(e){if(!e.isDisposed()){let t=e.parent;t&&t.children.removeValue(e);let i=e.gridContainer,r=i.parent;r&&r.children.removeValue(i);let s=e.topGridContainer,o=s.parent;o&&o.children.removeValue(s)}}_updateChartLayout(){let e=this.leftAxesContainer.width(),t=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",e),i.set("paddingRight",t);let r=this.topAxesContainer;r.set("paddingLeft",e),r.set("paddingRight",t)}processAxis(e){var t=this.get("cursor");t&&(this.addDisposer(e.on("start",()=>{this._updateCursor()})),this.addDisposer(e.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(e,t){let i=e.fixPosition(e.get("start",0)),r=e.fixPosition(e.get("end",1));if(i>r&&([i,r]=[r,i]),this.xAxes.indexOf(e)!=-1){if(t||e.getPrivate("updateScrollbar")){let s=this.get("scrollbarX");s&&(!s.getPrivate("isBusy")||t)&&(s.setRaw("start",i),s.setRaw("end",r),s.updateGrips())}}else if(this.yAxes.indexOf(e)!=-1&&(t||e.getPrivate("updateScrollbar"))){let s=this.get("scrollbarY");s&&(!s.getPrivate("isBusy")||t)&&(s.setRaw("start",i),s.setRaw("end",r),s.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let e=this.zoomOutButton;if(e&&e.parent){let t=!1;this.xAxes.each(i=>{i.get("zoomOut",!0)&&(Je(i.get("start",0),5)!=0||Je(i.get("end",1),5)!=1)&&(t=!0)}),this.yAxes.each(i=>{i.get("zoomOut",!0)&&(Je(i.get("start",0),5)!=0||Je(i.get("end",1),5)!=1)&&(t=!0)}),t?e.isHidden()&&e.show():e.hide()}}inPlot(e){let t=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),r=t.toGlobal(e);if(e.x>=-.5&&e.y>=-.5&&e.x<=t.width()+.5&&e.y<=t.height()+.5)return!0;if(i)for(let s=i.length-1;s>=0;s--){let o=i[s];if(o!=this){let n=o.plotContainer,l=this._root.rootPointToDocument(r),h=o._root.documentPointToRoot(l),u=n.toLocal(h);if(u.x>=-.1&&u.y>=-.1&&u.x<=n.width()+.1&&u.y<=n.height()+.1)return!0}}return!1}arrangeTooltips(){let e=this.plotContainer,t=e.width(),i=e.height(),r=this.height(),s=this._root.tooltipContainer.get("layerMargin");s&&s.bottom>r&&(r=s.bottom);let o=e._display.toGlobal({x:0,y:0}),n=e._display.toGlobal({x:t,y:i}),l=[],h=0,u=1/0,p=this._movePoint,d=this.get("maxTooltipDistance"),c=this.get("maxTooltipDistanceBy","xy"),f,g;M(d)&&this.series.each(y=>{if(!y.isHidden()){let v=y.get("tooltip");if(v){let x=v.get("pointTo");if(x){let _=Math.hypot(p.x-x.x,p.y-x.y);c=="x"?_=Math.abs(p.x-x.x):c=="y"&&(_=Math.abs(p.y-x.y)),_<u&&(u=_,f=y,g=x)}}}});let m=[];if(this.series.each(y=>{let v=y.get("tooltip");if(v&&!v.get("forceHidden")){let x=!1,_=v.get("pointTo");if(_){if(d>=0){let $=v.get("pointTo");if($&&g&&y!=f){let T=Math.hypot(g.x-$.x,g.y-$.y);c=="x"?T=Math.abs(g.x-$.x):c=="y"&&(T=Math.abs(g.y-$.y)),T>d&&(x=!0)}}else d==-1&&y!=f&&(x=!0);!this.inPlot(this._tooltipToLocal(_))||!v.dataItem?x=!0:x||(h+=_.y),x||y.isHidden()||y.isHiding()?v.hide(0):(v.show(),l.push(v),m.push(y))}}}),this.setPrivate("tooltipSeries",m),this.get("arrangeTooltips")){let y=0,v=0,x=this._root.tooltipContainer,_=l.length;if(h/_>i/2+o.y){l.sort((S,k)=>fg(k.get("pointTo").y,S.get("pointTo").y));let T=n.y;if(F(l,S=>{let k=S.height();v++,y+=k;let A=S.get("centerY");A instanceof St&&(k*=A.value),k+=S.get("marginBottom",0),S.set("bounds",{left:o.x,top:o.y,right:n.x,bottom:T}),S.setPrivate("customData",{left:o.x,top:o.y,right:n.x,bottom:T}),T=Math.min(T-k,S._fy-k),S.parent==x&&x.children.moveValue(S,0)}),T<0){l.reverse();let S=T;F(l,k=>{v++;let A=k.get("bounds");if(A){let L=A.top-T,O=A.bottom-T;L<S&&(L=S,O=L+k.height()),k.set("bounds",{left:A.left,top:L,right:A.right,bottom:O}),S=A.bottom-T+k.get("marginBottom",0)}})}}else{l.reverse(),l.sort((S,k)=>fg(S.get("pointTo").y,k.get("pointTo").y));let T=0;if(F(l,S=>{v++;let k=S.height();y+=k;let A=S.get("centerY");A instanceof St&&(k*=A.value),k+=S.get("marginBottom",0),S.set("bounds",{left:o.x,top:T,right:n.x,bottom:Math.max(o.y+r,T+k)}),S.parent==x&&x.children.moveValue(S,0),T=Math.max(T+k,S._fy+k)}),T>r){l.reverse();let S=r;F(l,k=>{v++;let A=k.get("bounds");if(A){let L=A.top-(r-T),O=A.bottom-(r-T);O>S&&(O=S,L=O-k.height()),k.set("bounds",{left:A.left,top:L,right:A.right,bottom:O}),S=O-k.height()-k.get("marginBottom",0)}})}}y==0&&v>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(e){return this.plotContainer.toLocal(e)}zoomOut(){this.xAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))}),this.yAxes.each(e=>{e.get("zoomOut",!0)&&(e.setPrivate("updateScrollbar",!0),e.zoom(0,1))})}_dispose(){super._dispose();let e=this.get("cursor");e&&e.dispose()}};Si.className="XYChart";Si.classNames=or.classNames.concat([Si.className]);var ra=class extends kt{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}};ra.className="Grid";ra.classNames=kt.classNames.concat([ra.className]);var ks=class extends ot{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(ra.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(ra.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(kt.new(this._root,{themeTags:["selection","cursor"],layer:30})),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:X,height:X,isMeasured:!0,position:"absolute"}),this.states.create("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),as("keyboardevents")&&this._disposers.push(je(document,"keydown",e=>{this._handleLineMove(gn(e),e.ctrlKey)}))}_setUpTouch(){let e=this.chart;e&&(e.plotContainer._display.cancelTouch=this.get("behavior")!="none")}_handleXLine(){let e=this.lineX.x(),t=!0;(e<0||e>this.width())&&(t=!1),this.lineX.setPrivate("visible",t)}_handleYLine(){let e=this.lineY.y(),t=!0;(e<0||e>this.height())&&(t=!1),this.lineY.setPrivate("visible",t)}_handleLineMove(e,t){let i="",r=this.chart,s;if(r&&r.xAxes.length){this._root.focused(this.lineX)?(i="positionX",s=r.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(s=r.yAxes.getIndex(0),i="positionY");let o=1;if(t&&(o=5),s){let n=s.get("renderer").get("inversed",!1),l;e=="ArrowRight"||e=="ArrowDown"?l=1:e=="ArrowLeft"||e=="ArrowUp"?l=-1:e=="Tab"&&(l=0),l!=null&&(n&&(l*=-1),this.set(i,s.nextPosition(l*o)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;let e=this.get("xAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipX=!0,this._disposers.push(t.on("pointTo",()=>{this._updateXLine(t)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;let e=this.get("yAxis");if(e){let t=e.get("tooltip");t&&(this._tooltipY=!0,this._disposers.push(t.on("pointTo",()=>{this._updateYLine(t)})))}}}_handleSyncWith(){let e=this.chart;if(e){let t=this.get("syncWith"),i=[];t&&F(t,r=>{let s=r.chart;s&&i.push(s)}),e._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){let e=this.get("positionX"),t=this.get("positionY");e==null&&t==null?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(e){let t=Je(this._display.toLocal(e.get("pointTo",{x:0,y:0})).x,3);this._toX!=t&&(this.lineX.animate({key:"x",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toX=t)}_updateYLine(e){let t=Je(this._display.toLocal(e.get("pointTo",{x:0,y:0})).y,3);this._toY!=t&&(this.lineY.animate({key:"y",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")}),this._toY=t)}_drawLines(){this.lineX.set("draw",e=>{e.moveTo(0,0),e.lineTo(0,this.height())}),this.lineY.set("draw",e=>{e.moveTo(0,0),e.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(e){this.chart=e,this._handleSyncWith();let t=e.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),as("touchevents")&&(this._disposers.push(t.events.on("click",r=>{gu(r.originalEvent)&&this._handleMove(r)})),this._setUpTouch()),this._disposers.push(t.events.on("pointerdown",r=>{this._handleCursorDown(r)})),this._disposers.push(t.events.on("globalpointerup",r=>{this._handleCursorUp(r),!r.native&&!this.isHidden()&&this._handleMove(r)})),this._disposers.push(t.events.on("globalpointermove",r=>{!this.get("syncWith")&&wi(t._downPoints).length==0&&!r.native&&this.isHidden()||(this._handleMove(r),Math.hypot(this._lastPoint2.x-r.point.x,this._lastPoint2.y-r.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=r.point))}));let i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(e){let t=this.chart;return t?t.inPlot(e):!1}_handleCursorDown(e){if(e.originalEvent.button==2)return;let t=e.point,i=this._display.toLocal(t),r=this.chart;if(this.selection.set("draw",()=>{}),r&&this._inPlot(i)){if(this._downPoint=i,this.get("behavior")!="none"){this.selection.show();let n="selectstarted";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:e.originalEvent})}let s=this._getPosition(i).x,o=this._getPosition(i).y;this.setPrivate("downPositionX",s),this.setPrivate("downPositionY",o)}}_handleCursorUp(e){if(this._downPoint){let t=this.get("behavior","none");if(t!="none"){t.charAt(0)==="z"&&this.selection.hide();let i=e.point,r=this._display.toLocal(i),s=this._downPoint,o=this.get("moveThreshold",1);if(r&&s){let n=!1;if((t==="zoomX"||t==="zoomXY"||t==="selectX"||t==="selectXY")&&Math.abs(r.x-s.x)>o&&(n=!0),(t==="zoomY"||t==="zoomXY"||t==="selectY"||t==="selectXY")&&Math.abs(r.y-s.y)>o&&(n=!0),n){let l="selectended";this.events.isEnabled(l)&&this.events.dispatch(l,{type:l,target:this,originalEvent:e.originalEvent})}else{let l="selectcancelled";this.events.isEnabled(l)&&this.events.dispatch(l,{type:l,target:this,originalEvent:e.originalEvent})}}}}this._downPoint=void 0}_handleMove(e){if(this.getPrivate("visible")){let t=this.chart;if(t&&wi(t.plotContainer._downPoints).length>1){this.set("forceHidden",!0);return}else this.set("forceHidden",!1);let i=e.point,r=this._lastPoint;if(Math.round(r.x)===Math.round(i.x)&&Math.round(r.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,e.originalEvent)}}_getPosition(e){return{x:e.x/this.width(),y:e.y/this.height()}}handleMove(e,t,i){e||(e=this._movePoint);let r=this.get("alwaysShow");if(!e){this.hide(0);return}this._movePoint=e;let s=this._display.toLocal(e),o=this.chart;if(o&&(this._inPlot(s)||this._downPoint)){o._movePoint=e,this.isHidden()&&(this.show(),this.get("behavior","").charAt(0)=="z"&&this.selection.set("draw",()=>{}));let n=s.x,l=s.y,h=this._getPosition(s);this.setPrivate("point",s);let u=this.get("snapToSeries");this._downPoint&&(u=void 0);let p=this.get("positionX"),d=h.x;M(p)&&(d=p);let c=this.get("positionY"),f=h.y;M(c)&&(f=c),this.setPrivate("positionX",d),this.setPrivate("positionY",f);let g=this._getPoint(d,f);if(n=g.x,l=g.y,o.xAxes.each(m=>{m._handleCursorPosition(d,u),r&&m.handleCursorShow()}),o.yAxes.each(m=>{m._handleCursorPosition(f,u),r&&m.handleCursorShow()}),!t){o._handleCursorPosition();let m="cursormoved";this.events.isEnabled(m)&&this.events.dispatch(m,{type:m,target:this,point:e,originalEvent:i})}this._updateLines(n,l),o.arrangeTooltips()}else if(!this._downPoint&&!r){this.hide(0);let n="cursorhidden";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})}this._downPoint&&this.get("behavior")!="none"&&this._updateSelection(s)}_getPoint(e,t){return{x:this.width()*e,y:this.height()*t}}_updateLines(e,t){this._tooltipX||this.lineX.set("x",e),this._tooltipY||this.lineY.set("y",t),this._drawLines()}_updateSelection(e){let t=this.selection,i=this.get("behavior"),r=this.width(),s=this.height();e.x<0&&(e.x=0),e.x>r&&(e.x=r),e.y<0&&(e.y=0),e.y>s&&(e.y=s),t.set("draw",o=>{let n=this._downPoint;n&&(i==="zoomXY"||i==="selectXY"?(o.moveTo(n.x,n.y),o.lineTo(n.x,e.y),o.lineTo(e.x,e.y),o.lineTo(e.x,n.y),o.lineTo(n.x,n.y)):i==="zoomX"||i==="selectX"?(o.moveTo(n.x,0),o.lineTo(n.x,s),o.lineTo(e.x,s),o.lineTo(e.x,0),o.lineTo(n.x,0)):(i==="zoomY"||i==="selectY")&&(o.moveTo(0,n.y),o.lineTo(r,n.y),o.lineTo(r,e.y),o.lineTo(0,e.y),o.lineTo(0,n.y)))})}_onHide(){if(this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorHide()}),e.yAxes.each(t=>{t.handleCursorHide()}),e.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let e=this.chart;e&&(e.xAxes.each(t=>{t.handleCursorShow()}),e.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}};ks.className="XYCursor";ks.classNames=ot.classNames.concat([ks.className]);function ty(a,e){return a==null?e:e==null?a:e<a?e:a}function ey(a,e){return a==null?e:e==null||a>e?a:e}var yr=class extends hi{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(ot.new(this._root,{})),this.axisRanges=new Wr,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new Li(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");let e=this.get("xAxis");e&&(this._xRenderer=e.get("renderer"));let t=this.get("yAxis");t&&(this._yRenderer=t.get("renderer")),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(i=>{if(i.type==="clear")F(i.oldValues,r=>{this._removeAxisRange(r)});else if(i.type==="push")this._processAxisRange(i.newValue);else if(i.type==="setIndex")this._processAxisRange(i.newValue);else if(i.type==="insertIndex")this._processAxisRange(i.newValue);else if(i.type==="removeIndex")this._removeAxisRange(i.oldValue);else if(i.type==="moveIndex")this._processAxisRange(i.value);else throw new Error("Unknown IStreamEvent type")})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(e){let t=ot.new(this._root,{});e.container=t,this.children.push(t),e.series=this;let i=e.axisDataItem;i.setRaw("isRange",!0);let r=i.component;if(r){r._processAxisRange(i,["range","series"]);let s=i.get("bullet");if(s){let n=s.get("sprite");n&&n.setPrivate("visible",!1)}let o=i.get("axisFill");o&&t.set("mask",o),r._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),Vt(this._dataSets,(e,t)=>{F(t,i=>{i.dispose()}),t.length=0})}_removeAxisRange(e){let t=e.axisDataItem,i=t.component;t.dispose(),li(i._seriesAxisRanges,t);let r=e.container;r&&r.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&F(this.valueXFields,e=>{if(this.get(e+"Field")){this._valueXFields.push(e);let i=this.get(e+"Show");this.__valueXShowFields.push(i),i.indexOf("Working")!=-1?this._valueXShowFields.push(i.split("Working")[0]):this._valueXShowFields.push(i)}}),this.valueYFields&&F(this.valueYFields,e=>{if(this.get(e+"Field")){this._valueYFields.push(e);let i=this.get(e+"Show");this.__valueYShowFields.push(i),i.indexOf("Working")!=-1?this._valueYShowFields.push(i.split("Working")[0]):this._valueYShowFields.push(i)}})}_dispose(){super._dispose(),this._bullets={};let e=this.chart;e&&e.series.removeValue(this),si(this.get("xAxis").series,this),si(this.get("yAxis").series,this)}_min(e,t){let i=ty(this.getPrivate(e),t);this.setPrivate(e,i)}_max(e,t){let i=ey(this.getPrivate(e),t);this.setPrivate(e,i)}_shouldMakeBullet(e){let t=this.get("xAxis"),i=this.get("yAxis"),r=this.get("baseAxis");if(!t.inited||!i.inited)return!1;let s=this.get("minBulletDistance",0);if(s>0){let o=this.startIndex(),l=this.endIndex()-o;if(t==r){if(this._xRenderer.axisLength()/l<s/5)return!1}else if(i==r&&this._yRenderer.axisLength()/l<s/5)return!1}return e.get(this._xField)!=null&&e.get(this._yField)!=null}_makeFieldNames(){let e=this.get("xAxis"),t=this.get("yAxis"),i=e.getPrivate("name"),r=rg(i),s=t.getPrivate("name"),o=rg(s),n=e.get("renderer").getPrivate("letter"),l=t.get("renderer").getPrivate("letter"),h="open",u="low",p="high",d="Show";e.className==="ValueAxis"?(this._xField=this.get(i+n+d),this._xOpenField=this.get(h+r+n+d),this._xLowField=this.get(u+r+n+d),this._xHighField=this.get(p+r+n+d)):(this._xField=i+n,this._xOpenField=h+r+n,this._xLowField=u+r+n,this._xHighField=p+r+n),t.className==="ValueAxis"?(this._yField=this.get(s+l+d),this._yOpenField=this.get(h+o+l+d),this._yLowField=this.get(u+o+l+d),this._yHighField=this.get(p+o+l+d)):(this._yField=s+l,this._yOpenField=h+o+l,this._yLowField=u+o+l,this._yHighField=p+o+l)}_fixVC(){let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),r=this.states.lookup("hidden"),s=this.get("sequencedInterpolation");if(r){let o=0;s&&(o=.999999999999),e===i?r.set("vcy",o):(t===i||r.set("vcy",o),r.set("vcx",o))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){let e=this.get("xAxis"),t=this.get("yAxis");this.set("x",e.x()-Ht(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0)),this.set("y",t.y()-Ht(t.get("centerY",0),t.height())-t.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),this._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.get("baseAxis"),r=this.get("tooltipPositionX"),s;switch(r){case"open":s=this._xOpenField;break;case"low":s=this._xLowField;break;case"high":s=this._xHighField;break;default:s=this._xField}this._tooltipFieldX=s;let o=this.get("tooltipPositionY"),n;switch(o){case"open":n=this._yOpenField;break;case"low":n=this._yLowField;break;case"high":n=this._yHighField;break;default:n=this._yField}this._tooltipFieldY=n,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();let l=this.get("stacked");if(this.isDirty("stacked")&&(l?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed){this._dataProcessed=!0,l&&this._stack();let h,u,p,d;F(this.dataItems,c=>{F(this._valueXShowFields,f=>{let g=c.get(f);g!=null&&(l&&(g+=this.getStackedXValue(c,f)),h=ty(h,g),u=ey(u,g))}),F(this._valueYShowFields,f=>{let g=c.get(f);g!=null&&(l&&(g+=this.getStackedYValue(c,f)),p=ty(p,g),d=ey(d,g))}),e.processSeriesDataItem(c,this._valueXFields),t.processSeriesDataItem(c,this._valueYFields)}),this._min("minX",h),this._max("maxX",u),this._min("minY",p),this._max("maxY",d),e._seriesValuesDirty=!0,t._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&e.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&t.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)}if((this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(e._groupSeriesData(this),t._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty||this.isDirty("minBulletDistance")){let h=this.startIndex(),u=this.endIndex(),p=this.get("minBulletDistance",0);if(p>0&&i&&(i.get("renderer").axisLength()/(u-h)>p?this._showBullets=!0:this._showBullets=!1),(this._psi!=h||this._pei!=u||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;let d=this.get("vcx",1),c=this.get("vcy",1),f=this.get("stacked",!1),g=this.getPrivate("outOfSelection");if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),g)t.markDirtySelectionExtremes();else for(let m=h;m<u;m++)this.processYSelectionDataItem(this.dataItems[m],c,f);if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),g)t.markDirtySelectionExtremes();else for(let m=h;m<u;m++)this.processXSelectionDataItem(this.dataItems[m],d,f);if((i===e||!i)&&(this.get("valueYShow")!=="valueYWorking"||this.get("useSelectionExtremes"))){let m=this.getPrivate("selectionMinY");m!=null&&(this.setPrivateRaw("minY",m),t.markDirtyExtremes());let y=this.getPrivate("selectionMaxY");y!=null&&(this.setPrivateRaw("maxY",y),t.markDirtyExtremes())}if((i===t||!i)&&(this.get("valueXShow")!=="valueXWorking"||this.get("useSelectionExtremes"))){let m=this.getPrivate("selectionMinX");m!=null&&(this.setPrivateRaw("minX",m),t.markDirtyExtremes());let y=this.getPrivate("selectionMaxX");y!=null&&(this.setPrivateRaw("maxX",y),e.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&e.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&t.markDirtySelectionExtremes()}}}_postUpdateData(){let e=this.get("xAxis"),t=this.get("yAxis");e._seriesValuesDirty=!0,t._seriesValuesDirty=!0,F(this.dataItems,i=>{i.open=void 0,i.close=void 0,e.processSeriesDataItem(i,this._valueXFields),t.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let e=this._mainContainerMask;e==null&&(e=this.children.push(kt.new(this._root,{})),this._mainContainerMask=e,e.set("draw",(t,i)=>{let r=this.parent;if(r){let s=this._root.container.width(),o=this._root.container.height();t.moveTo(-s,-o),t.lineTo(-s,o*2),t.lineTo(s*2,o*2),t.lineTo(s*2,-o),t.lineTo(-s,-o),this.axisRanges.each(n=>{let l=n.axisDataItem.get("axisFill");if(r&&l){let h=l.get("draw");h&&h(t,i)}})}this.mainContainer._display.mask=e._display})),e.markDirty(),e._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){let e=this.chart;if(e){let t=e.series.indexOf(this);if(this._couldStackTo=[],t>0){let i;for(let r=t-1;r>=0&&(i=e.series.getIndex(r),!(i.get("xAxis")===this.get("xAxis")&&i.get("yAxis")===this.get("yAxis")&&i.className===this.className&&(this._couldStackTo.push(i),!i.get("stacked"))));r--);}this._stackDataItems()}}_unstack(){Vt(this._reallyStackedTo,(e,t)=>{delete t._stackedSeries[this.uid]}),this._reallyStackedTo={},F(this.dataItems,e=>{e.setRaw("stackToItemY",void 0),e.setRaw("stackToItemX",void 0)})}_handleRemoved(){let e=this.get("xAxis");e&&e._handleSeriesRemoved();let t=this.get("yAxis");t&&t._handleSeriesRemoved()}_stackDataItems(){let e=this.get("baseAxis"),t=this.get("xAxis"),i=this.get("yAxis"),r,s;e===t?(r="valueY",s="stackToItemY"):e===i&&(r="valueX",s="stackToItemX");let o=this._couldStackTo.length,n=0,l=this.get("stackToNegative");this._reallyStackedTo={},F(this.dataItems,h=>{for(let u=0;u<o;u++){let p=this._couldStackTo[u],d=p.dataItems[n],c=h.get(r);if(d){let f=d.get(r);if(l)if(M(c)){if(M(f)){if(u==o-1&&h.setRaw(s,void 0),c>=0&&f>=0){h.setRaw(s,d),this._reallyStackedTo[p.uid]=p,p._stackedSeries[this.uid]=this;break}if(c<0&&f<0){h.setRaw(s,d),this._reallyStackedTo[p.uid]=p,p._stackedSeries[this.uid]=this;break}}}else break;else if(M(c)&&M(f)){h.setRaw(s,d),this._reallyStackedTo[p.uid]=p,p._stackedSeries[this.uid]=this;break}}}n++})}processXSelectionDataItem(e,t,i){F(this.__valueXShowFields,r=>{let s=e.get(r);s!=null&&(i&&(s+=this.getStackedXValueWorking(e,r)),this._min("selectionMinX",s),this._max("selectionMaxX",s*t))})}processYSelectionDataItem(e,t,i){F(this.__valueYShowFields,r=>{let s=e.get(r);s!=null&&(i&&(s+=this.getStackedYValueWorking(e,r)),this._min("selectionMinY",s),this._max("selectionMaxY",s*t))})}getStackedYValueWorking(e,t){let i=e.get("stackToItemY");if(i){let r=i.component;return i.get(t,0)*r.get("vcy",1)+this.getStackedYValueWorking(i,t)}return 0}getStackedXValueWorking(e,t){let i=e.get("stackToItemX");if(i){let r=i.component;return i.get(t,0)*r.get("vcx",1)+this.getStackedXValueWorking(i,t)}return 0}getStackedYValue(e,t){let i=e.get("stackToItemY");return i?i.get(t,0)+this.getStackedYValue(i,t):0}getStackedXValue(e,t){let i=e.get("stackToItemX");return i?i.get(t,0)+this.getStackedXValue(i,t):0}createLegendMarker(e){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem,r=e.get("locationX",i.get("locationX",.5)),s=e.get("locationY",i.get("locationY",.5)),o=this.get("xAxis"),n=this.get("yAxis"),l=this.get("exactLocationX",!1),h=this.get("exactLocationY",!1),u=o.getDataItemPositionX(i,this._xField,r,this.get("vcx",1),l),p=n.getDataItemPositionY(i,this._yField,s,this.get("vcy",1),h),d=this.getPoint(u,p),c=i.get("left",d.x),f=i.get("right",d.x),g=i.get("top",d.y),m=i.get("bottom",d.y),y=0,v=0,x=f-c,_=m-g;if(this._shouldShowBullet(u,p)){t.setPrivate("visible",!e.getPrivate("hidden"));let $=e.get("field"),T=this.get("baseAxis"),S=this.get("xAxis"),k=this.get("yAxis");if($!=null){let L;T==S?($=="value"?L=this._yField:$=="open"?L=this._yOpenField:$=="high"?L=this._yHighField:$=="low"&&(L=this._yLowField),L&&(p=k.getDataItemPositionY(i,L,0,this.get("vcy",1),h),d=this._yRenderer.positionToPoint(p),v=d.y,y=c+x*r)):($=="value"?L=this._xField:$=="open"?L=this._xOpenField:$=="high"?L=this._xHighField:$=="low"&&(L=this._xLowField),L&&(u=S.getDataItemPositionX(i,L,0,this.get("vcx",1),l),d=this._xRenderer.positionToPoint(u),y=d.x,v=m-_*s))}else y=c+x*r,v=m-_*s;let A=e.get("stacked");if(A){let L=this.chart;if(T==S){let O=this._bullets[u+"_"+p];if(O){let I=O.bounds(),R=t.localBounds(),B=v;v=I.top,A=="down"?v=I.bottom-R.top:A=="auto"?L&&(B<L.plotContainer.height()/2?v=I.bottom-R.top:v+=R.bottom):v+=R.bottom}this._bullets[u+"_"+p]=t}else{let O=this._bullets[u+"_"+p];if(O){let I=O.bounds(),R=t.localBounds(),B=y;y=I.right,A=="down"?y=I.left-R.right:A=="auto"?L&&(B<L.plotContainer.width()/2?y=I.left-R.right:y-=R.left):y-=R.left}this._bullets[u+"_"+p]=t}}t.isType("Label")&&(t.setPrivate("maxWidth",Math.abs(x)),t.setPrivate("maxHeight",Math.abs(_))),t.setAll({x:y,y:v})}else t.setPrivate("visible",!1)}}_shouldShowBullet(e,t){return this._showBullets}setDataSet(e){if(this._dataSets[e]){this._handleDataSetChange(),this._dataItems=this._dataSets[e],this._markDataSetDirty(),this._dataSetId=e;let t="datasetchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,id:e})}}resetGrouping(){Vt(this._dataSets,(e,t)=>{t!=this._mainDataItems&&F(t,i=>{i.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){F(this._dataItems,e=>{let t=e.bullets;t&&F(t,i=>{if(i){let r=i.get("sprite");r&&r.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return ut(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.show.call(this,e).then(()=>{this._isShowing=!1;let r=this.get("xAxis"),s=this.get("yAxis"),o=this.get("baseAxis");s!==o&&s.markDirtySelectionExtremes(),r!==o&&r.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return ut(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(t.hide.call(this,e).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,e,t)];M(t)||(t=this.get("stateAnimationDuration",0));let s=this.get("stateAnimationEasing");F(this._valueFields,o=>{r.push(e.animate({key:o+"Working",to:e.get(o),duration:t,easing:s}).waitForStop())}),yield Promise.all(r)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,e,t)],s=this.states.lookup("hidden");s||(s=this.states.create("hidden",{})),M(t)||(t=s.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let o=s.get("stateAnimationEasing",this.get("stateAnimationEasing")),n=this.get("xAxis"),l=this.get("yAxis"),h=this.get("baseAxis"),u=this.get("stacked");if((h===n||!h)&&F(this._valueYFields,p=>{let d=l.getPrivate("min"),c=l.baseValue();M(d)&&d>c&&(c=d),u&&(c=0),e.get(p)!=null&&r.push(e.animate({key:p+"Working",to:c,duration:t,easing:o}).waitForStop())}),h===l||!h){let p=n.getPrivate("min"),d=n.baseValue();M(p)&&p>d&&(d=p),u&&(d=0),F(this._valueXFields,c=>{e.get(c)!=null&&r.push(e.animate({key:c+"Working",to:d,duration:t,easing:o}).waitForStop())})}yield Promise.all(r)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){let e=this._stackedSeries;e&&Vt(e,(t,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(e){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(e),this.updateLegendValue(e));let t=this.get("tooltip"),i=this.get("exactLocationX",!1),r=this.get("exactLocationY",!1);if(t)if(!this.isHidden()&&this.get("visible")){if(t._setDataItem(e),e){let s=this.get("locationX",0),o=this.get("locationY",1),n=e.get("locationX",s),l=e.get("locationY",o),h=this.get("xAxis"),u=this.get("yAxis"),p=this.get("vcx",1),d=this.get("vcy",1),c=h.getDataItemPositionX(e,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*n,p,i),f=u.getDataItemPositionY(e,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*l,d,r),g=this.getPoint(c,f),m=!0;if(F(this._valueFields,y=>{e.get(y)==null&&(m=!1)}),m){let y=this.chart;y&&y.inPlot(g)?(t.label.text.markDirtyText(),t.set("tooltipTarget",this._getTooltipTarget(e)),t.set("pointTo",this._display.toGlobal({x:g.x,y:g.y}))):t._setDataItem(void 0)}else t._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){let e=this.get("tooltip");return e&&e.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet"){let t=e.bullets;if(t&&t.length>0){let r=t[0].get("sprite");if(r)return r}}return this}updateLegendValue(e){let t=this.get("legendDataItem");if(t){let i=t.get("label");if(i){let s="";e?(i._setDataItem(e),s=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),s=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",s)}let r=t.get("valueLabel");if(r){let s="";e?(r._setDataItem(e),s=this.get("legendValueText",r.get("text",""))):(r._setDataItem(this._emptyDataItem),s=this.get("legendRangeValueText",r.get("text",""))),r.set("text",s)}}}_getItemReaderLabel(){let e="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(e+=".formatDate()"),e+="}",e}getPoint(e,t){let i=this._xRenderer.positionToCoordinate(e),r=this._yRenderer.positionToCoordinate(t),s=999999999;return r<-s?r=-s:r>s&&(r=s),i<-s?i=-s:i>s&&(i=s),{x:i,y:r}}_shouldInclude(e){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(e){return this.axisRanges.push({axisDataItem:e})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(e){let t=this.get("xAxis");if(this.get("baseAxis")==t&&t.isType("DateAxis")){let r=t.baseDuration(),s=t.getPrivate("selectionMin",t.getPrivate("min",0)),o=r*this.get("locationX",.5),n=-1/0;for(;n<s;){let l=this.dataItems[e];if(l){let h=l.open;if(h?n=h.valueX:n=l.get("valueX",0),n+=o,n<s)e++;else break}else break}}return e}};yr.className="XYSeries";yr.classNames=hi.classNames.concat([yr.className]);var As=class extends hs{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(ot.new(this._root,{})),this.gridContainer=ot.new(this._root,{width:X,height:X}),this.topGridContainer=ot.new(this._root,{width:X,height:X}),this.bulletsContainer=this.children.push(ot.new(this._root,{isMeasured:!1,width:X,height:X,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new Wr,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(ot.new(this._root,{themeTags:["axis","header"],position:"absolute",background:He.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisRanges.events.onAll(t=>{if(t.type==="clear")F(t.oldValues,i=>{i.dispose()});else if(t.type==="push")this._processAxisRange(t.newValue,["range"]);else if(t.type==="setIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="insertIndex")this._processAxisRange(t.newValue,["range"]);else if(t.type==="removeIndex")this.disposeDataItem(t.oldValue);else if(t.type==="moveIndex")this._processAxisRange(t.value,["range"]);else throw new Error("Unknown IStreamEvent type")}));let e=this.get("renderer");e&&(e.axis=this,e.processAxis()),this.children.push(e),this._createGhostLabel()}_createGhostLabel(){let t=this.get("renderer").makeLabel(new Li(this,void 0,{}),[]);t.adapters.disable("text"),t.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),t.events.disable(),this.ghostLabel=t}_updateFinals(e,t){}zoom(e,t,i,r){if(this.get("zoomable",!0))if(this._updateFinals(e,t),this.get("start")!==e||this.get("end")!=t){let s=this._sAnimation,o=this._eAnimation;e>t&&([e,t]=[t,e]);let n=this.get("maxDeviation",.5)*Math.min(1,t-e);e<-n&&(e=-n),t>1+n&&(t=1+n);let l=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),h=l;M(i)||(i=this.get("interpolationDuration",0)),r||(r="end"),t===1&&e!==0&&(e<this.get("start",0)?r="start":r="end"),e===0&&t!==1&&(t>this.get("end",1)?r="end":r="start");let u=this.get("minZoomCount",0),p=this.dataItems;p&&p.length<u&&(u=p.length);let d=this.get("maxZoomCount",1/0);M(u)&&(l=h/u);let c=1;if(M(d)&&(c=h/d),e>t&&([e,t]=[t,e]),r==="start"?(d>0&&1/(t-e)<c&&(t=e+1/c),1/(t-e)>l&&(t=e+1/l),t>1&&t-e<1/l&&(e=t-1/l)):(d>0&&1/(t-e)<c&&(e=t-1/c),1/(t-e)>l&&(e=t-1/l),e<0&&t-e<1/l&&(t=e+1/l)),1/(t-e)>l&&(t=e+1/l),1/(t-e)>l&&(e=t-1/l),d!=null&&u!=null&&e==this.get("start")&&t==this.get("end")){let f=this.chart;f&&f._handleAxisSelection(this,!0)}if((s&&s.playing&&s.to==e||this.get("start")==e)&&(o&&o.playing&&o.to==t||this.get("end")==t))return;if(i>0){let f=this.get("interpolationEasing"),g,m;if(this.get("start")!=e&&(g=this.animate({key:"start",to:e,duration:i,easing:f})),this.get("end")!=t&&(m=this.animate({key:"end",to:t,duration:i,easing:f})),this._sAnimation=g,this._eAnimation=m,g)return g;if(m)return m}else this.set("start",e),this.set("end",t),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(e,t){e.setRaw("isRange",!0),this._createAssets(e,t),this._rangesDirty=!0,this._prepareDataItem(e);let i=e.get("above"),r=this.topGridContainer,s=e.get("grid");i&&s&&r.children.moveValue(s);let o=e.get("axisFill");i&&o&&r.children.moveValue(o)}_prepareDataItem(e,t){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(e=>{this._prepareDataItem(e)}),F(this._seriesAxisRanges,e=>{this._prepareDataItem(e)})}_prepareChildren(){super._prepareChildren();let e=this.ghostLabel;if(e&&(this.get("fixAxisSize")?e.set("visible",!0):e.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){let i=this.chart;i&&i._updateCursor();let r=this.get("start",0),s=this.get("end",1),o=this.get("maxDeviation",.5)*Math.min(1,s-r);if(r<-o){let n=r+o;r=-o,this.setRaw("start",r),this.isDirty("end")&&this.setRaw("end",s-n)}if(s>1+o){let n=s-1-o;s=1+o,this.setRaw("end",s),this.isDirty("start")&&this.setRaw("start",r-n)}}let t=this.get("renderer");if(t._start=this.get("start"),t._end=this.get("end"),t._inversed=t.get("inversed",!1),t._axisLength=t.axisLength()/(t._end-t._start),t._updateLC(),this.isDirty("tooltip")){let i=this.get("tooltip");if(i){let r=t.get("themeTags");i.addTag("axis"),i.addTag(this.className.toLowerCase()),i._applyThemes(),r&&(i.set("themeTags",xt(i.get("themeTags"),r)),i.label._applyThemes())}}}_updateTooltipBounds(){let e=this.get("tooltip");e&&this.get("renderer").updateTooltipBounds(e)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(e){this.chart=e;let t=this.get("renderer");t.chart=e,e.gridContainer.children.push(this.gridContainer),e.topGridContainer.children.push(this.topGridContainer),e.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{e._handleAxisSelection(this)}),this.on("end",()=>{e._handleAxisSelection(this)}),e.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),e.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),e.processAxis(this)}hideDataItem(e){return this._toggleFHDataItem(e,!0),super.hideDataItem(e)}showDataItem(e){return this._toggleFHDataItem(e,!1),super.showDataItem(e)}_toggleFHDataItem(e,t){let i="forceHidden",r=e.get("label");r&&r.set(i,t);let s=e.get("grid");s&&s.set(i,t);let o=e.get("tick");o&&o.set(i,t);let n=e.get("axisFill");n&&n.set(i,t);let l=e.get("bullet");if(l){let h=l.get("sprite");h&&h.set(i,t)}}_toggleDataItem(e,t){let i=e.get("label"),r="visible";i&&i.setPrivate(r,t);let s=e.get("grid");s&&s.setPrivate(r,t);let o=e.get("tick");o&&o.setPrivate(r,t);let n=e.get("axisFill");n&&n.setPrivate(r,t);let l=e.get("bullet");if(l){let h=l.get("sprite");h&&h.setPrivate(r,t)}}_createAssets(e,t,i){var r,s,o;let n=this.get("renderer"),l="minor",h=e.get("label");if(!h)n.makeLabel(e,t);else{let d=h.get("themeTags"),c=!1;i?d?.indexOf(l)==-1&&(c=!0):d?.indexOf(l)!=-1&&(c=!0),c&&((r=h.parent)===null||r===void 0||r.children.removeValue(h),n.makeLabel(e,t),h.dispose(),n.labels.removeValue(h))}let u=e.get("grid");if(!u)n.makeGrid(e,t);else{let d=u.get("themeTags"),c=!1;i?d?.indexOf(l)==-1&&(c=!0):d?.indexOf(l)!=-1&&(c=!0),c&&((s=u.parent)===null||s===void 0||s.children.removeValue(u),n.makeGrid(e,t),u.dispose(),n.grid.removeValue(u))}let p=e.get("tick");if(!p)n.makeTick(e,t);else{let d=!1,c=p.get("themeTags");i?c?.indexOf(l)==-1&&(d=!0):c?.indexOf(l)!=-1&&(d=!0),d&&((o=p.parent)===null||o===void 0||o.children.removeValue(p),n.makeTick(e,t),p.dispose(),n.ticks.removeValue(p))}(!i&&!e.get("axisFill")||i&&!e.get("axisFill")&&this.get("minorAxisFillsEnabled"))&&n.makeAxisFill(e,t),this._processBullet(e)}_processBullet(e){let t=e.get("bullet"),i=this.get("bullet");if(!t&&i&&!e.get("isRange")&&(t=i(this._root,this,e)),t){t.axis=this;let r=t.get("sprite");r&&(r._setDataItem(e),e.setRaw("bullet",t),r.parent||this.bulletsContainer.children.push(r))}}_afterChanged(){super._afterChanged();let e=this.chart;e&&(e._updateChartLayout(),e.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(e){super.disposeDataItem(e);let t=this.get("renderer"),i=e.get("label");i&&(t.labels.removeValue(i),i.dispose());let r=e.get("tick");r&&(t.ticks.removeValue(r),r.dispose());let s=e.get("grid");s&&(t.grid.removeValue(s),s.dispose());let o=e.get("axisFill");o&&(t.axisFills.removeValue(o),o.dispose());let n=e.get("bullet");n&&n.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());let e=this.ghostLabel;if(e){if(!e.isHidden()){let r=e.localBounds(),s=Math.ceil(r.right-r.left),o=e.get("text");F(this.dataItems,n=>{let l=n.get("label");if(l&&!l.isHidden()){let h=l.localBounds();Math.ceil(h.right-h.left)>s&&(o=l.text._getText())}}),e.set("text",o)}let t=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(e,t+(i-t)*.5)}}_handleCursorPosition(e,t){e=this.get("renderer").toAxisPosition(e),this._cursorPosition=e,this._snapToSeries=t,this.updateTooltip()}updateTooltip(){let e=this._snapToSeries,t=this._cursorPosition,i=this.get("tooltip"),r=this.get("renderer");M(t)&&(F(this.series,s=>{if(s.get("baseAxis")===this){let o=this.getSeriesItem(s,t,this.get("tooltipLocation"));e&&e.indexOf(s)!=-1?(s.updateLegendMarker(o),s.updateLegendValue(o),s._settings.tooltipDataItem=o):(s.showDataItemTooltip(o),s.setRaw("tooltipDataItem",o))}}),this.get("snapTooltip")&&(t=this.roundAxisPosition(t,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",t),i&&(r.updateTooltipBounds(i),Yi(t)?i.hide(0):(this._updateTooltipText(i,t),r.positionTooltip(i,t),t<this.get("start",0)||t>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(e,t){e.label.set("text",this.getTooltipText(t))}roundAxisPosition(e,t){return e}_handleSeriesRemoved(){}handleCursorShow(){let e=this.get("tooltip");e&&e.show()}handleCursorHide(){let e=this.get("tooltip");e&&e.hide()}processSeriesDataItem(e,t){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(e){let t=this.get("renderer");return t.toAxisPosition(e/t.axisLength())}toAxisPosition(e){return this.get("renderer").toAxisPosition(e)}toGlobalPosition(e){return this.get("renderer").toGlobalPosition(e)}fixPosition(e){return this.get("renderer").fixPosition(e)}shouldGap(e,t,i,r){return!1}createAxisRange(e){return this.axisRanges.push(e)}_groupSeriesData(e){}getCellWidthPosition(){return .05}};As.className="Axis";As.classNames=hs.classNames.concat([As.className]);var lr=class extends As{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var e;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let r=this.get("syncWithAxis");r&&(this._syncDp=new qe([r.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),r.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let t=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(t=!0,(e=this.ghostLabel)===null||e===void 0||e.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||t||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){let i=this.chart,r=!1;if(i){let s=this.get("renderer").getPrivate("letter");s=="Y"?i.xAxes.each(o=>{o.className!="ValueAxis"&&(r=!0)}):s=="X"&&i.yAxes.each(o=>{o.className!="ValueAxis"&&(r=!0)})}r&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,(this.getPrivate("selectionMinFinal")!=this.getPrivate("selectionMin")||this.getPrivate("selectionMaxFinal")!=this.getPrivate("selectionMax"))&&(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(e){let t=this.get("numberFormat"),i=this.getNumberFormatter(),r="";return t?r=i.format(e,t):r=i.format(e,void 0,this.getPrivate("stepDecimalPlaces")),r}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(M(e)&&M(t)){let i=this.get("logarithmic"),r=this.getPrivate("step"),s=this.getPrivate("selectionMin"),o=this.getPrivate("selectionMax")+r,n=s-r,l=1,h=e;if(i){if(n=this._minLogAdjusted,n<s)for(;n<s;)n+=r;if(h=n,h<=0){let $=this._minRealLog;M($)||($=1),h=Math.pow(10,Math.log($)*Math.LOG10E),r<1&&(M(this._minRealLog)?h=this._minRealLog:h=Math.pow(10,-50))}l=Math.log(o-r)*Math.LOG10E-Math.log(h)*Math.LOG10E,l>2&&(n=Math.pow(10,Math.log(h)*Math.LOG10E-50))}let u=this.get("renderer"),p=u.get("minorLabelsEnabled"),d=u.get("minorGridEnabled",p),c=Math.pow(10,Math.floor(Math.log(Math.abs(r))*Math.LOG10E)),f=Math.round(r/c),g=2;Je(f/5,10)%1==0&&(g=5),Je(f/10,10)%1==0&&(g=10);let m=r/g,y=0,v=0,x=-1/0,_=this.get("renderer").gridCount();for(;n<o;){let $;this.dataItems.length<y+1?($=new Li(this,void 0,{}),this._dataItems.push($),this.processDataItem($)):$=this.dataItems[y],this._createAssets($,[]),this._toggleDataItem($,!0),$.setRaw("value",n);let T=$.get("label");T&&T.set("text",this._formatText(n)),this._prepareDataItem($);let S=n;if(!i)S+=r;else if(l>2){let A=Math.max(1,_),L=Math.max(1,Math.ceil(l/A)),O=Math.log(h)*Math.LOG10E+(y+1)*L-50;S=Math.pow(10,O)}else S+=r;if(d){let A=n+m;for(i&&(l>2&&(m=this._adjustMinMax(n,S,10).step),A=n+m);A<S-r*1e-11;){let L;this.minorDataItems.length<v+1?(L=new Li(this,void 0,{}),this.minorDataItems.push(L),this.processDataItem(L)):L=this.minorDataItems[v],this._createAssets(L,["minor"],!0),this._toggleDataItem(L,!0),L.setRaw("value",A);let O=L.get("label");O&&(p?O.set("text",this._formatText(A)):O.setPrivate("visible",!1)),this._prepareDataItem(L),A+=m,v++}}if(n=S,x==n)break;let k=Math.pow(10,Math.floor(Math.log(Math.abs(r))*Math.LOG10E));if(k<1&&!i){let A=Math.round(Math.abs(Math.log(Math.abs(k))*Math.LOG10E))+2;n=Je(n,A)}y++,i&&l<=2&&n-r<r&&(n=r),x=n}for(let $=y;$<this.dataItems.length;$++)this._toggleDataItem(this.dataItems[$],!1);for(let $=v;$<this.minorDataItems.length;$++)this._toggleDataItem(this.minorDataItems[$],!1);F(this.series,$=>{$.inited&&$._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(e,t){let i=this.get("renderer"),r=e.get("value"),s=e.get("endValue"),o=this.valueToPosition(r),n=o,l=this.valueToPosition(r+this.getPrivate("step"));M(s)&&(n=this.valueToPosition(s),l=n),e.get("isRange")&&s==null&&(l=o);let h=n,u=e.get("labelEndValue");u!=null&&(h=this.valueToPosition(u)),i.updateLabel(e.get("label"),o,h,t);let p=e.get("grid");if(i.updateGrid(p,o,n),p&&(r==this.get("baseValue",0)?(p.addTag("base"),p._applyThemes()):p.hasTag("base")&&(p.removeTag("base"),p._applyThemes())),i.updateTick(e.get("tick"),o,h,t),i.updateFill(e.get("axisFill"),o,l),this._processBullet(e),i.updateBullet(e.get("bullet"),o,n),!e.get("isRange")){let d=this.get("fillRule");d&&d(e)}}_handleRangeChange(){let e=this.positionToValue(this.get("start",0)),t=this.positionToValue(this.get("end",1)),i=this.get("renderer").gridCount(),r=this._adjustMinMax(e,t,i,!0),s=Md(r.step);this.setPrivateRaw("stepDecimalPlaces",s),e=Je(e,s),t=Je(t,s),r=this._adjustMinMax(e,t,i,!0);let o=r.step;e=r.min,t=r.max,(this.getPrivate("selectionMin")!==e||this.getPrivate("selectionMax")!==t||this.getPrivate("step")!==o)&&(this.setPrivateRaw("selectionMin",e),this.setPrivateRaw("selectionMax",t),this.setPrivateRaw("step",o))}positionToValue(e){let t=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(e*(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)+Math.log(t)*Math.LOG10E)/Math.LOG10E):e*(i-t)+t}valueToPosition(e){let t=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(e<=0){let r=this.get("treatZeroAs");M(r)&&(e=r)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}valueToFinalPosition(e){let t=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(e<=0){let r=this.get("treatZeroAs");M(r)&&(e=r)}return(Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E)}else return(e-t)/(i-t)}getX(e,t,i){e=i+(e-i)*t;let r=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(r)}getY(e,t,i){e=i+(e-i)*t;let r=this.valueToPosition(e);return this._settings.renderer.positionToCoordinate(r)}getDataItemCoordinateX(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,r))}getDataItemPositionX(e,t,i,r){let s=e.get(t);if(e.get("stackToItemX")){let n=e.component;s=s*r+n.getStackedXValueWorking(e,t)}else s=this._baseValue+(s-this._baseValue)*r;return this.valueToPosition(s)}getDataItemCoordinateY(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,r))}getDataItemPositionY(e,t,i,r){let s=e.get(t);if(e.get("stackToItemY")){let n=e.component;s=s*r+n.getStackedYValueWorking(e,t)}else s=this._baseValue+(s-this._baseValue)*r;return this.valueToPosition(s)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){let e=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),t=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0)),i=this.get("baseValue",0);return i<e&&(i=e),i>t&&(i=t),i}cellEndValue(e){return e}fixSmallStep(e){return 1+e===1?(e*=2,this.fixSmallStep(e)):e}_fixMin(e){return e}_fixMax(e){return e}_calculateTotals(){if(this.get("calculateTotals")){let e=this.series[0];if(e){let t=e.startIndex();if(e.dataItems.length>0){t>0&&t--;let i=e.endIndex();i<e.dataItems.length&&i++;let r,s;e.get("yAxis")==this?(r="valueY",s="vcy"):e.get("xAxis")==this&&(r="valueX",s="vcx");let o=r+"Working";if(r){let n=this.series.length,l=[],h=[];for(let f=0;f<n;f++){let g=this.series[f];g.get("excludeFromTotal")||(l.push(g),h.push(g.get(s)))}let u=l.length,p=r+"Total",d=r+"Sum",c=r+"TotalPercent";for(let f=t;f<i;f++){let g=0,m=0;for(let y=0;y<u;y++){let v=l[y].dataItems[f];if(v){let x=v.get(o)*h[y];Yi(x)||(g+=x,m+=Math.abs(x))}}for(let y=0;y<u;y++){let v=l[y].dataItems[f];if(v){let x=v.get(o)*h[y];Yi(x)||(v.set(p,m),v.set(d,g),v.set(c,m==0?0:x/m*100))}}}}}}}}_getSelectionMinMax(){let e=this.getPrivate("minFinal"),t=this.getPrivate("maxFinal"),i=this.get("min"),r=this.get("max"),s=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(s=.1),this.get("extraMax")==null&&(o=.2));let n=this.get("renderer").gridCount(),l=this.get("strictMinMaxSelection"),h=this.get("strictMinMax");if(M(e)&&M(t)){let u=t,p=e;if(F(this.series,_=>{if(!_.get("ignoreMinMax")){let $,T,S=_.getPrivate("outOfSelection");if(_.get("xAxis")===this){if(!S){let k=_.getPrivate("minX"),A=_.getPrivate("maxX");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(k=void 0,A=void 0),$=_.getPrivate("selectionMinX",k),T=_.getPrivate("selectionMaxX",A)}}else if(_.get("yAxis")===this&&!S){let k=_.getPrivate("minY"),A=_.getPrivate("maxY");(_.startIndex()!=0||_.endIndex()!=_.dataItems.length)&&(k=void 0,A=void 0),$=_.getPrivate("selectionMinY",k),T=_.getPrivate("selectionMaxY",A)}!_.isHidden()&&!_.isShowing()&&(M($)&&(u=Math.min(u,$)),M(T)&&(p=Math.max(p,T)))}}),this.axisRanges.each(_=>{if(_.get("affectsMinMax")){let $=_.get("value");$!=null&&(u=Math.min(u,$),p=Math.max(p,$)),$=_.get("endValue"),$!=null&&(u=Math.min(u,$),p=Math.max(p,$))}}),u>p&&([u,p]=[p,u]),M(i)?h?u=i:u=e:h&&M(this._minReal)&&(u=this._minReal),M(r)?h?p=r:p=t:h&&M(this._maxReal)&&(p=this._maxReal),u===p){let _=u;if(u-=this._deltaMinMax,p+=this._deltaMinMax,u<e){let T=_-e;T==0&&(T=this._deltaMinMax),u=_-T,p=_+T,h=!0}let $=this._adjustMinMax(u,p,n,h);u=$.min,p=$.max}let d=u,c=p,f=p-u;u-=f*s,p+=f*o;let g=this._adjustMinMax(u,p,n);u=g.min,p=g.max,u=Se(u,e,t),p=Se(p,e,t),g=this._adjustMinMax(u,p,n,!0),h||(u=g.min,p=g.max);let m=this.get("syncWithAxis");if(m&&(g=this._syncAxes(u,p,g.step,m.getPrivate("selectionMinFinal",m.getPrivate("minFinal",0)),m.getPrivate("selectionMaxFinal",m.getPrivate("maxFinal",1)),m.getPrivate("selectionStepFinal",m.getPrivate("step",1))),u=g.min,p=g.max),h&&!m&&(M(i)&&(u=Math.max(u,i)),M(r)&&(p=Math.min(p,r))),l&&!m&&(u=d-(c-d)*s,p=c+(c-d)*o),h&&!m){M(i)?u=i:u=d,M(r)?p=r:p=c,p-u<=1e-8&&(u-=this._deltaMinMax,p+=this._deltaMinMax);let _=p-u;u-=_*s,p+=_*o}this.get("logarithmic")&&(u<=0&&(u=d*(1-Math.min(s,.99))),u<e&&(u=e),p>t&&(p=t));let y=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),v=Je(this.valueToFinalPosition(u),y),x=Je(this.valueToFinalPosition(p),y);this.setPrivateRaw("selectionMinFinal",u),this.setPrivateRaw("selectionMaxFinal",p),this.setPrivateRaw("selectionStepFinal",g.step),this.zoom(v,x)}}_getMinMax(){let e=this.get("min"),t=this.get("max"),i=1/0,r=-1/0,s=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(this.get("extraMin")==null&&(s=.1),this.get("extraMax")==null&&(o=.2)));let n=1/0;if(F(this.series,x=>{if(!x.get("ignoreMinMax")){let _,$;if(x.get("xAxis")===this?(_=x.getPrivate("minX"),$=x.getPrivate("maxX")):x.get("yAxis")===this&&(_=x.getPrivate("minY"),$=x.getPrivate("maxY")),M(_)&&M($)){i=Math.min(i,_),r=Math.max(r,$);let T=$-_;T<=0&&(T=Math.abs($/100)),T<n&&(n=T)}}}),this.axisRanges.each(x=>{if(x.get("affectsMinMax")){let _=x.get("value");_!=null&&(i=Math.min(i,_),r=Math.max(r,_)),_=x.get("endValue"),_!=null&&(i=Math.min(i,_),r=Math.max(r,_))}}),this.get("logarithmic")){let x=this.get("treatZeroAs");M(x)&&i<=0&&(i=x),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(i===0&&r===0&&(r=.9,i=-.9),M(e)&&(i=e),M(t)&&(r=t),i===1/0||r===-1/0){this.setPrivate("minFinal",void 0),this.setPrivate("maxFinal",void 0);return}i>r&&([i,r]=[r,i]);let l=i,h=r,u=this.adapters.fold("min",i),p=this.adapters.fold("max",r);this._minRealLog=i,M(u)&&(i=u),M(p)&&(r=p),i=this._fixMin(i),r=this._fixMax(r),r-i<=1/Math.pow(10,15)&&(r-i!==0?this._deltaMinMax=(r-i)/2:this._getDelta(r),i-=this._deltaMinMax,r+=this._deltaMinMax),i-=(r-i)*s,r+=(r-i)*o,this.get("logarithmic")&&(i<0&&l>=0&&(i=0),r>0&&h<=0&&(r=0)),this._minReal=i,this._maxReal=r;let d=this.get("strictMinMax"),c=this.get("strictMinMaxSelection",!1);c&&(d=c);let f=d;M(t)&&(f=!0);let g=this.get("renderer").gridCount(),m=this._adjustMinMax(i,r,g,f);if(i=m.min,r=m.max,m=this._adjustMinMax(i,r,g,!0),i=m.min,r=m.max,d){M(e)?i=e:i=this._minReal,M(t)?r=t:r=this._maxReal,r-i<=1e-8&&(i-=this._deltaMinMax,r+=this._deltaMinMax);let x=r-i;i-=x*s,r+=x*o}u=this.adapters.fold("min",i),p=this.adapters.fold("max",r),M(u)&&(i=u),M(p)&&(r=p),n==1/0&&(n=r-i);let y=Math.round(Math.abs(Math.log(Math.abs(r-i))*Math.LOG10E))+5;i=Je(i,y),r=Je(r,y);let v=this.get("syncWithAxis");if(v&&(m=this._syncAxes(i,r,m.step,v.getPrivate("minFinal",v.getPrivate("min",0)),v.getPrivate("maxFinal",v.getPrivate("max",1)),v.getPrivate("step",1)),i=m.min,r=m.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((r-i)/n*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,r=this._maxReal,i<=0&&(i=l*(1-Math.min(s,.99)))),M(i)&&M(r)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==r)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",r),this._saveMinMax(i,r);let x=this.get("interpolationDuration",0),_=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:x,easing:_}),this.animatePrivate({key:"max",to:r,duration:x,easing:_})}}_fixZoomFactor(){}_getDelta(e){let t=Math.log(Math.abs(e))*Math.LOG10E,i=Math.pow(10,Math.floor(t));i=i/10,this._deltaMinMax=i}_saveMinMax(e,t){}_adjustMinMax(e,t,i,r){i<=1&&(i=1),i=Math.round(i);let s=e,o=t,n=t-e;n===0&&(n=Math.abs(t));let l=Math.log(Math.abs(n))*Math.LOG10E,h=Math.pow(10,Math.floor(l));h=h/10;let u=h;r&&(u=0),r?(e=Math.floor(e/h)*h,t=Math.ceil(t/h)*h):(e=Math.ceil(e/h)*h-u,t=Math.floor(t/h)*h+u),e<0&&s>=0&&(e=0),t>0&&o<=0&&(t=0),l=Math.log(Math.abs(n))*Math.LOG10E,h=Math.pow(10,Math.floor(l)),h=h/100;let p=Math.ceil(n/i/h)*h,d=Math.pow(10,Math.floor(Math.log(Math.abs(p))*Math.LOG10E)),c=Math.ceil(p/d);c>5?c=10:c<=5&&c>2&&(c=5),p=Math.ceil(p/(d*c))*d*c;let f=this.get("maxPrecision");if(M(f)){let v=ug(p,f);f<Number.MAX_VALUE&&p!==v&&(p=v,p==0&&(p=1))}let g=0;d<1&&(g=Math.round(Math.abs(Math.log(Math.abs(d))*Math.LOG10E))+1,p=Je(p,g));let m=Math.floor(e/p);e=Je(p*m,g);let y;return r?y=Math.floor(t/p):y=Math.ceil(t/p),y===m&&y++,t=Je(p*y,g),t<o&&(t=t+p),e>s&&(e=e-p),p=this.fixSmallStep(p),{min:e,max:t,step:p}}getTooltipText(e,t){let i=this.get("tooltipNumberFormat",this.get("numberFormat")),r=this.getNumberFormatter(),s=this.get("extraTooltipPrecision",0),o=this.getPrivate("stepDecimalPlaces",0)+s,n=Je(this.positionToValue(e),o);return i?r.format(n,i):r.format(n,void 0,o)}getSeriesItem(e,t){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=this.positionToValue(t),s,o;if(F(e.dataItems,(n,l)=>{let h=Math.abs(n.get(i)-r);(s===void 0||h<o)&&(s=l,o=h)}),s!=null)return e.dataItems[s]}zoomToValues(e,t,i){let r=this.getPrivate("minFinal",this.getPrivate("min",0)),s=this.getPrivate("maxFinal",this.getPrivate("max",1));this.getPrivate("min")!=null&&this.getPrivate("max")!=null&&this.zoom((e-r)/(s-r),(t-r)/(s-r),i)}_syncAxes(e,t,i,r,s,o){if(this.get("syncWithAxis")){let l=Math.round((s-r)/o);if(l>0)if(this.get("syncZeros")&&r<=0&&s>=0){let h=Math.round((0-r)/o),u=l-h,p=0;h>0&&e<0&&(p=Math.abs(e)/h),u>0&&t>0&&(p=Math.max(p,t/u)),p==0&&(p=(t-e)/l),i=this._niceStep(p),e=-i*h,t=i*u}else{let h=(t-e)/l;i=this._niceStep(h);let u=Math.floor(e/i)*i,p=u+i*l;p<t&&(u=Math.ceil(t/i)*i-i*l,p=u+i*l),e>=0&&u<0&&(u=0,p=i*l),t<=0&&p>0&&(p=0,u=-(i*l)),e=u,t=p}}return{min:e,max:t,step:i}}_niceStep(e){let t=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E)),i=e/t;i<=1?i=1:i<=2?i=2:i<=5?i=5:i=10;let r=i*t,s=this.get("maxPrecision");if(M(s)){let o=ug(r,s);s<Number.MAX_VALUE&&r!==o&&(r=o,r==0&&(r=1))}return r}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return M(e)&&M(t)?this.getPrivate("step",1)/(e-t):.05}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.positionToValue(this.getPrivate("tooltipPosition",0));return t+=this.getPrivate("step",1)*e,t=Se(t,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(t))}};lr.className="ValueAxis";lr.classNames=As.classNames.concat([lr.className]);var sa=class a extends As{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();let e=this.dataItems.length;e>0&&this.setPrivateRaw("maxZoomFactor",e),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),e)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",e),1))}_prepareChildren(){super._prepareChildren();let e=this.dataItems.length,t=0;this._valuesDirty&&(this._itemMap={},F(this.dataItems,o=>{o.setRaw("index",t),this._itemMap[o.get("category")]=o,t++}),this.setPrivateRaw("maxZoomFactor",e));let i=this.get("start",0),r=this.get("end",1),s=this._getIndices(i,r);this.setPrivateRaw("startIndex",s.startIndex),this.setPrivateRaw("endIndex",s.endIndex),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}adjustZoom(){let e=this.dataItems.length;if(e>1){let t=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),r=0,s=this.getPrivate("startIndex",0),o=this.getPrivate("endIndex",0),n=this._sAnimation,l=this._eAnimation,h=this.get("start",0),u=!1;n&&!n.stopped&&(h=Number(n.to),u=!0);let p=this.get("end",1);if(l&&!l.stopped&&(p=Number(l.to),u=!0),u){let d=this._getIndices(h,p);s=d.startIndex,o=d.endIndex}for(let d=s;d<o;d++){let c=this.dataItems[d];r+=c.get("finalCellSize",1)}if(r<=i){let d=0;for(let c=s;c<e;c++){let f=this.dataItems[c];if(d+=f.get("finalCellSize",1),o=c+1,d>=i)break}if(d<i)for(let c=s-1;c>=0;c--){let f=this.dataItems[c];if(d+=f.get("finalCellSize",1),s=c,d>=i)break}this.zoomToIndexes(s,o)}else if(r>=t){let d=r;for(let c=o-1;c>=s;c--){let f=this.dataItems[c];if(d-=f.get("finalCellSize",1),d<=t){o=c+1;break}}this.zoomToIndexes(s,o)}}}_handleRangeChange(){F(this.series,e=>{let t=this.dataItems[this.startIndex()].get("category"),i=this.dataItems[this.endIndex()-1].get("category"),r=e.get("baseAxis"),s=e.get("xAxis"),o=e.get("yAxis");if(s instanceof a&&o instanceof a)e._markDirtyAxes();else if(r===this){let n,l,h=o;if(s===r?(e.get("categoryXField")&&(n="categoryX"),e.get("openCategoryXField")&&(l="openCategoryX")):o===r&&(e.get("categoryYField")&&(n="categoryY"),e.get("openCategoryYField")&&(l="openCategoryY"),h=s),h instanceof lr&&(n||l)){let d=function(m,y,v,x,_,$){let T,S=y.categoryToIndex(_);for(;!T&&S>=0&&S<y.dataItems.length;){let k=y.dataItems[S].get("category");if($=="previous")for(let A=m.dataItems.length-1;A>=0;A--){let L=m.dataItems[A];if(v&&L.get(v)===k){T=L;break}if(x&&L.get(x)===k){T=L;break}}else for(let A=0,L=m.dataItems.length;A<L;A++){let O=m.dataItems[A];if(v&&O.get(v)===k){T=O;break}if(x&&O.get(x)===k){T=O;break}}T||(S+=$==="previous"?-1:1)}return T},u,p;u=d(e,this,n,l,t,"next"),p=d(e,this,n,l,i,"previous");let c=0,f=e.dataItems.length;u&&(c=e.dataItems.indexOf(u)),p&&(f=e.dataItems.indexOf(p)+1),e.setPrivate("startIndex",c),e.setPrivate("endIndex",f);let g=!1;for(let m=c;m<f;m++){let y=e.dataItems[m];if(F(e.__valueXShowFields,v=>{y.get(v)!=null&&(g=!0)}),F(e.__valueYShowFields,v=>{y.get(v)!=null&&(g=!0)}),g)break}e.setPrivate("outOfSelection",!g)}e._markDirtyAxes()}})}_prepareAxisItems(){var e;let t=this.get("renderer"),i=this.dataItems.length,r=this.startIndex();r>0&&r--;let s=this.endIndex();s<i&&s++;let o=t.get("minorLabelsEnabled"),n=t.get("minorGridEnabled",o),l=t.axisLength()/Math.max(t.get("minGridDistance"),1),h=Math.max(1,Math.min(i,Math.ceil((s-r)/l)));r=Math.floor(r/h)*h,this._frequency=h;for(let p=0;p<i;p++)this._toggleDataItem(this.dataItems[p],!1);let u=this.dataItems[r].get("index",0);for(let p=r;p<s;p=p+h){let d=this.dataItems[p];this._createAssets(d,[]),this._toggleDataItem(d,!0);let c=h;n&&(c=1),this._prepareDataItem(d,u,c),u++}if(t.get("minorGridEnabled"))for(let p=r;p<s;p++){let d=this.dataItems[p];p%h!=0&&(this._createAssets(d,["minor"],!0),this._toggleDataItem(d,!0),this._prepareDataItem(d,0,1),o||(e=d.get("label"))===null||e===void 0||e.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(e,t,i){let r=this.get("renderer"),s=e.get("categoryLocation",0),o=e.get("endCategoryLocation",1),n=e.get("index");M(n)||(n=this.categoryToIndex(e.get("category")));let l=this.indexToPosition(n,s),h=e.get("endCategory"),u;h?(u=this.categoryToIndex(h),M(u)||(u=n)):u=n;let p=this.indexToPosition(u,o),d,c;if(e.get("isRange")){if(d=u,!M(n)){this._toggleDataItem(e,!1);return}}else d=n+this._frequency-1;c=this.indexToPosition(d,o),r.updateLabel(e.get("label"),l,p,i),r.updateGrid(e.get("grid"),l,p),r.updateTick(e.get("tick"),l,p,i),r.updateFill(e.get("axisFill"),l,c),this._processBullet(e),r.updateBullet(e.get("bullet"),l,p);let f=this.get("fillRule");f&&f(e,t)}startIndex(){let e=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),e-1)}endIndex(){let e=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",e),e))}baseValue(){}basePosition(){return 0}getX(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getY(e){let t=this._itemMap[e];return t?this._settings.renderer.positionToCoordinate(this.indexToPosition(t.get("index",0))):NaN}getDataItemPositionX(e,t,i,r){let s=e.get(t),o=this._itemMap[s];return o?this.indexToPosition(o.get("index",0),i):NaN}getDataItemCoordinateX(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,r))}getDataItemPositionY(e,t,i,r){let s=e.get(t),o=this._itemMap[s];return o?this.indexToPosition(o.get("index",0),i):NaN}getDataItemCoordinateY(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,r))}indexToPosition(e,t,i){let r=this.dataItems.length,s=0;if(r==0||(e>=r&&(e=r-1,t=1),M(t)||(t=.5),!M(e)))return 0;let o=this.get("startLocation",0),n=this.get("endLocation",1);if(!this.get("cellSizeField"))r-=o,r-=1-n,s=(e+t-o)/r;else{let l=i?"finalCellSize":"cellSize",h=this.dataItems,u=0;F(this.dataItems,c=>{u+=c.get(l,1)}),u-=o*h[0].get(l,1),u-=(1-n)*h[h.length-1].get(l,1);let p=0;for(let c=0;c<e;c++)p+=h[c].get(l,1);let d=h[e].get(l,1);s=(p+t*d-o*h[0].get(l,1))/u}if(!i){let l=this.dataItems[e];l&&(s+=l.get("deltaPosition",0))}return s}categoryToPosition(e){let t=this._itemMap[e];return t?this.indexToPosition(t.get("index")):NaN}categoryToIndex(e){let t=this._itemMap[e];return t?t.get("index"):NaN}dataItemToPosition(e){return this.indexToPosition(e.get("index"))}roundAxisPosition(e,t){return e+=(.5-t)/this.dataItems.length,this.indexToPosition(this.axisPositionToIndex(e),t)}axisPositionToIndex(e){let t=this.dataItems.length;if(t===0)return 0;if(this.get("cellSizeField")){let i=0,r=[];F(this.dataItems,h=>{let u=h.get("cellSize",1);r.push(u),i+=u});let s=this.get("startLocation",0),o=this.get("endLocation",1);i-=s,i-=1-o;let n=e*i+s,l=0;for(let h=0;h<t;h++){let u=r[h];if(n<l+u)return h;l+=u}return t-1}else return Se(Math.floor(e*t),0,t-1)}getTooltipText(e,t){let i=this.dataItems[this.axisPositionToIndex(e)];if(i){let r=i.get("label");if(r)return Js(r,this.get("tooltipText",""))}}_updateTooltipText(e,t){e._setDataItem(this.dataItems[this.axisPositionToIndex(t)]),e.label.text.markDirtyText()}getSeriesItem(e,t){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),r=this.axisPositionToIndex(t),s=e.dataItems[r],o=this.dataItems[r],n=o.get("category");if(s&&o&&s.get(i)===n)return s;for(let l=0,h=e.dataItems.length;l<h;l++){let u=e.dataItems[l];if(u.get(i)===n)return u}}}_getIndices(e,t){let i=this.dataItems.length,r=0,s=i,o="cellSize";if(this.get("cellSizeField")){let n=0,l=this.dataItems;if(l.length==0)return{startIndex:0,endIndex:0};F(l,u=>{n+=u.get(o,1)}),n-=this.get("startLocation",0)*l[0].get(o,1),n-=(1-this.get("endLocation",1))*l[l.length-1].get(o,1);let h=0;for(let u=0;u<i;u++)if(h+=this.dataItems[u].get(o,1),Math.round(h)>Math.round(e*n)){r=u;break}for(let u=r+1;u<i;u++)if(h+=this.dataItems[u].get(o,1),Math.round(h)>=Math.round(t*n)){s=u+1;break}r=Math.max(r,0),s=Math.min(s,i)}else r=Math.max(Math.round(this.get("start",0)*i),0),s=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:r,endIndex:s}}zoomToIndexes(e,t,i){let r=this.dataItems.length;this.get("cellSizeField")?(e=Math.min(Math.max(e,0),r),t=Math.max(Math.min(t,r),1),this.setPrivateRaw("startIndex",e),this.setPrivateRaw("endIndex",t),this.zoom(this.indexToPosition(e,0,!0),this.indexToPosition(t,0,!0),i)):this.zoom(e/r,t/r,i)}zoomToCategories(e,t,i){this.zoomToIndexes(this.categoryToIndex(e),this.categoryToIndex(t)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}nextPosition(e){e==null&&(e=1),this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let t=this.getPrivate("tooltipPosition",0),i=Se(this.axisPositionToIndex(t)+e,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}};sa.className="CategoryAxis";sa.classNames=As.classNames.concat([sa.className]);var Oa=class extends lr{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(e){this.setPrivateRaw("baseInterval",e),this._baseDuration=Ur(e)}_fixZoomFactor(){let e=this.get("maxZoomFactor");e!=null&&e!=1/0?this.setPrivateRaw("maxZoomFactor",e):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(M(e)&&M(t)){this._fixZoomFactor();let i=this.getPrivate("groupInterval");if(i?this._setBaseInterval(i):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let r=this.get("groupInterval");r&&(this.setRaw("groupIntervals",[r]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))F(this.series,r=>{this._groupSeriesData(r)}),this._handleRangeChange();else{let r=this.get("baseInterval"),s=r.timeUnit+r.count;F(this.series,o=>{o.setDataSet(s),o.resetGrouping()}),this._setBaseInterval(r),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(e){if(this.get("groupData")&&!e.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let t=[],i=this.baseMainDuration(),r=this.get("groupIntervals");F(r,c=>{Ur(c)>i&&t.push(c)}),e._dataSets={};let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o,n=e.get("baseAxis");e.get("xAxis")===n?o=e._valueYFields:e.get("yAxis")===n&&(o=e._valueXFields);let l=e._mainDataItems,h=this.get("baseInterval"),u=h.timeUnit+h.count;e._dataSets[u]=l;let p=e.get("groupDataCallback"),d=e.get("groupDataWithOriginals",!1);p&&(d=!0),F(t,c=>{let f=-1/0,g=c.timeUnit+c.count;e._dataSets[g]=[];let m,y={},v={},x={},_={};F(o,A=>{y[A]=0,v[A]=0,x[A]=e.get(A+"Grouped"),_[A]=A+"Working"});let $=Fi(c.timeUnit),T=l[0],S;T&&(S=l[0].get(s));let k;F(l,A=>{let L=A.get(s),O=ai(L,c.timeUnit,c.count,this._root,S),I;if(f<O-$/24)I=ss(A.dataContext),m=new Li(e,I,e._makeDataItem(I)),m.setRaw(s,O),e._dataSets[g].push(m),F(o,R=>{let B=A.get(R);M(B)?(m.setRaw(R,B),m.setRaw(_[R],B),v[R]=1,y[R]=B):(y[R]=0,v[R]=0)}),d&&m.set("originals",[A]),p&&k&&p(k,c),k=m;else{let R=!1;if(F(o,B=>{let Z=x[B],j=A.get(B);if(j!=null){R=!0;let it=m.get(B);switch(Z){case"close":m.setRaw(B,j);break;case"sum":m.setRaw(B,it+j);break;case"open":break;case"low":j<it&&m.setRaw(B,j);break;case"high":j>it&&m.setRaw(B,j);break;case"average":v[B]++,y[B]+=j;let st=y[B]/v[B];m.setRaw(B,st);break;case"extreme":Math.abs(j)>Math.abs(it)&&m.setRaw(B,j);break}m.setRaw(_[B],m.get(B))}}),R){let B=ss(A.dataContext);B[s]=O,m.dataContext=B}d&&m.get("originals").push(A)}f=O}),p&&k&&p(k,c)}),e._dataSetId&&e.setDataSet(e._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(e){let t=this.get("baseInterval"),i=Lu(0,e,this.get("groupCount",1/0),this.get("groupIntervals"));return Ur(i)<Ur(t)&&(i=Object.assign({},t)),i}getIntervalMax(e){return this._intervalMax[e.timeUnit+e.count]}getIntervalMin(e){return this._intervalMin[e.timeUnit+e.count]}_handleRangeChange(){super._handleRangeChange();let e=Math.round(this.getPrivate("selectionMin")),t=Math.round(this.getPrivate("selectionMax"));if(M(e)&&M(t)){if(this.get("endLocation")==0&&(t+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),r=this.getPrivate("groupInterval"),s=t-e+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(r){let o=Ur(r);s=Math.ceil(s/o)*o}if(i||(i=this.getGroupInterval(s)),i&&(!r||r.timeUnit!==i.timeUnit||r.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let o=i.timeUnit+i.count;F(this.series,n=>{n.get("baseAxis")===this&&n.setDataSet(o)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{let n="groupintervalchanged";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this})})})}}F(this.series,i=>{if(i.get("baseAxis")===this){let r=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=Dd(i.dataItems,m=>Lr(m.get(r),e)).index;o>0&&(o-=1),t+=this._baseDuration*(1-this.get("endLocation",1));let l=fu(i.dataItems,m=>Lr(m.get(r),t)).index,h=l;h>1&&h--;let u=i.dataItems[o],p=i.dataItems[h],d,c;u&&(c=u.get(r)),p&&(d=p.get(r));let f=!1;d!=null&&c!=null&&(d<e||c>t)&&(f=!0),i.setPrivate("outOfSelection",f),i.setPrivate("startIndex",o);let g=i._adjustStartIndex(o);i.getPrivate("adjustedStartIndex")!==g&&(i.setPrivate("adjustedStartIndex",g),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",l)}})}}_adjustMinMax(e,t,i,r){return{min:e,max:t,step:(t-e)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(e,t){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let r=i.timeUnit+i.count;this._intervalMin[r]=e,this._intervalMax[r]=t}_getM(e){return e=="day"||e=="month"||e=="year"?1.05:1.01}_getMinorInterval(e){var t;let i,r=e.count,s=e.timeUnit;return r>1&&(r==10||r==15?r=5:r==12?r=2:r==6?r=1:r==30?r=10:r<10&&(r=1),i={timeUnit:s,count:r}),s=="week"&&(((t=this.getPrivate("baseInterval"))===null||t===void 0?void 0:t.timeUnit)!="week"?i={timeUnit:"day",count:1}:i={timeUnit:"week",count:1}),s=="year"&&r==1&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<4*366*24*60*60*1e3&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){let e=this.getPrivate("min"),t=this.getPrivate("max");if(M(e)&&M(t)){let i=this._root,r=Math.round(this.getPrivate("selectionMin")),s=Math.round(this.getPrivate("selectionMax")),o=this.get("renderer"),n=this.getPrivate("baseInterval"),l=r,h=0,u=this.get("gridIntervals"),p=Lu(0,s-r,o.gridCount(),u);Ur(p)<this._baseDuration&&(p=Object.assign({},n));let d=Ur(p);this._intervalDuration=d;let c=tc(p.timeUnit),f=i.utc,g=i.timezone;l=ai(r-d,p.timeUnit,p.count,i,e);let m=l-d,y,v=this.get("dateFormats");this.setPrivateRaw("gridInterval",p);let x=o.get("minorLabelsEnabled"),_=o.get("minorGridEnabled",x),$,T=0;_&&($=this._getMinorInterval(p),T=Ur($));let S=0;for(;l<s+d;){let k;this.dataItems.length<h+1?(k=new Li(this,void 0,{}),this._dataItems.push(k),this.processDataItem(k)):k=this.dataItems[h],this._createAssets(k,[]),this._toggleDataItem(k,!0),k.setRaw("value",l),k.setRaw("labelEndValue",void 0);let A=l+Fi(p.timeUnit,p.count*this._getM(p.timeUnit));A=ai(A,p.timeUnit,1,i),k.setRaw("endValue",A);let L=new Date(l);y=v[p.timeUnit],c&&this.get("markUnitChange")&&M(m)&&p.timeUnit!="year"&&ec(l,m,c,f,g)&&(y=this.get("periodChangeDateFormats")[p.timeUnit]);let O=k.get("label");O&&O.set("text",i.dateFormatter.format(L,y));let I=p.count;if(p.timeUnit=="week"?O?.set("location",this.get("weekLabelLocation",0)):O?.set("location",o.labels.template.get("location")),_){I=1;let R=p.timeUnit;R=="week"&&this.get("skipFirstMinor")&&(R="day");let B=l+Fi(R,this._getM(R));B=ai(B,R,1,i),k.setRaw("labelEndValue",B)}if(this._prepareDataItem(k,I),m=l,l=A,$){let R=$.timeUnit,B=$.count,Z=this._getM(R);this.get("skipFirstMinor")||(m-=T*Z);let j=ai(m+T*Z,R,B,i,m),it,st=this.get("minorDateFormats",this.get("dateFormats"));for(;j<l-.01*T;){let ht;this.minorDataItems.length<S+1?(ht=new Li(this,void 0,{}),this.minorDataItems.push(ht),this.processDataItem(ht)):ht=this.minorDataItems[S],this._createAssets(ht,["minor"],!0),this._toggleDataItem(ht,!0),ht.setRaw("value",j);let dt=j+Fi(R,B*Z);dt=ai(dt,R,1,i),ht.setRaw("endValue",dt);let Xt=new Date(j);y=st[R];let tt=ht.get("label");if(tt&&(x?tt.set("text",i.dateFormatter.format(Xt,y)):tt.setPrivate("visible",!1)),this._prepareDataItem(ht,1),j==it)break;if(!ht.get("isRange")){let Tt=this.get("fillRule");Tt&&Tt(ht)}it=j,j=dt,S++}}if(l==m)break;h++}for(let k=h;k<this.dataItems.length;k++)this._toggleDataItem(this.dataItems[k],!1);for(let k=S;k<this.minorDataItems.length;k++)this._toggleDataItem(this.minorDataItems[k],!1);F(this.series,k=>{k.inited&&k._markDirtyAxes()})}this._updateGhost()}_updateFinals(e,t){this.setPrivateRaw("selectionMinFinal",this.positionToValue(e)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(t))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,r=ai(e,i,t.count,this._root),s=r+Fi(i,t.count*this._getM(i));return s=ai(s,i,1,this._root),r+(s-r)*this.get("startLocation",0)}_fixMax(e){let t=this.getPrivate("baseInterval"),i=t.timeUnit,r=ai(e,i,t.count,this._root),s=r+Fi(i,t.count*this._getM(i));return s=ai(s,i,1,this._root),r+(s-r)*this.get("endLocation",1)}_updateDates(e,t){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return Ur(this.get("baseInterval"))}processSeriesDataItem(e,t){let i=this.getPrivate("baseInterval");e.open||(e.open={}),e.close||(e.close={}),F(t,r=>{let s=e.get(r);if(M(s)){let o=e.open[r],n=e.close[r];if(!(s>=o&&s<=n)){let l=i.timeUnit,h=i.count;o=ai(s,l,h,this._root),n=o+Fi(l,h*this._getM(l)),n=ai(n,l,1,this._root),e.open[r]=o,e.close[r]=n}this._updateDates(o,e.component)}})}_handleSizeDirty(){}getDataItemPositionX(e,t,i,r,s){let o,n,l;return s?l=e.get(t):(e.open&&e.close?(o=e.open[t],n=e.close[t]):(o=e.get(t),n=o),l=o+(n-o)*i,l=this._baseValue+(l-this._baseValue)*r),this.valueToPosition(l)}getDataItemCoordinateX(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(e,t,i,r))}getDataItemPositionY(e,t,i,r,s){let o,n,l;return s?l=e.get(t):(e.open&&e.close?(o=e.open[t],n=e.close[t]):(o=e.get(t),n=o),l=o+(n-o)*i,l=this._baseValue+(l-this._baseValue)*r),this.valueToPosition(l)}getDataItemCoordinateY(e,t,i,r){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(e,t,i,r))}roundAxisPosition(e,t){let i=this.positionToValue(e);i=i-(t-.5)*this._baseDuration;let r=this.getPrivate("baseInterval");if(!Yi(i)){let s=this._root.locale.firstDayOfWeek,o=r.timeUnit,n=this._root.utc,l=this._root.timezone,h=r.count;i=ai(i,o,h,this._root,this.getPrivate("min",0));let u=Ou(r,new Date(i),s,n,l);return l&&(i=ai(i+this._baseDuration*.05,o,h,this._root,this.getPrivate("min",0)),u=Ou(r,new Date(i+u*t),s,n,l)),this.valueToPosition(i+u*t)}return NaN}getTooltipText(e,t){if(this.getPrivate("min")!=null){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],r=this.positionToValue(e);if(M(r)){let s=new Date(r),o=this.getPrivate("baseInterval"),n=Ou(o,s,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return t!==!1&&(s=new Date(r+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*n)),this._root.dateFormatter.format(s,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(e,t,i,r){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(t);i==null&&(i=.5),o=o-(i-.5)*this._baseDuration;let n=fu(e.dataItems,l=>{let h=0;return l.open&&(h=l.open[s]),Lr(h,o)});if(r||e.get("snapTooltip")){let l=e.dataItems[n.index-1],h=e.dataItems[n.index];if(l&&h&&l.open&&h.close){let u=l.open[s],p=h.close[s];if(Math.abs(o-u)>Math.abs(o-p))return h}if(l)return l;if(h)return h}else{let l=e.dataItems[n.index-1];if(l&&l.open&&l.close){let h=l.open[s],u=l.close[s];if(o>=h&&o<=u)return l}}}shouldGap(e,t,i,r){let s=e.get(r);return t.get(r)-s>this._baseDuration*i}zoomToDates(e,t,i){this.zoomToValues(e.getTime(),t.getTime(),i)}zoomToValues(e,t,i){let r=this.getPrivate("minFinal",this.getPrivate("min",0)),s=this.getPrivate("maxFinal",this.getPrivate("max",0));if(this.getPrivate("min")!=null&&this.getPrivate("max")!=null)if(this.get("groupData")){let o=this.getGroupInterval(t-e),n=this.get("baseInterval"),l=this.getIntervalMin(n),h=this.getIntervalMax(n)-1;h=ai(h,o.timeUnit,o.count,this.root),h+=this._getM(o.timeUnit)*Ur(o),h=ai(h,o.timeUnit,o.count,this.root);let u=ai(l,o.timeUnit,o.count,this.root),p=ai(h,o.timeUnit,o.count,this.root),d=(e-u)/(p-u),c=(t-u)/(p-u);this.zoom(d,c,i)}else this.zoom((e-r)/(s-r),(t-r)/(s-r),i)}positionToDate(e){return new Date(this.positionToValue(e))}dateToPosition(e){return this.valueToPosition(e.getTime())}getCellWidthPosition(){let e=this.getPrivate("selectionMax",this.getPrivate("max")),t=this.getPrivate("selectionMin",this.getPrivate("min"));return M(e)&&M(t)?this._intervalDuration/(e-t):.05}nextPosition(e){e==null&&(e=1);let t=this.get("tooltipLocation",.5)*this._baseDuration;this.get("renderer").getPrivate("letter")=="Y"&&(e*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0)),r=this.getPrivate("baseInterval"),s=this._nextTime(i,e,r),o=this.getPrivate("selectionMin",0),n=this.getPrivate("selectionMax",0),l=ai(o,r.timeUnit,r.count,this._root),h=ai(n,r.timeUnit,r.count,this._root);return s+=t,s=Se(s,l+t,h-t),this.toGlobalPosition(this.valueToPosition(s))}_nextTime(e,t,i){return ai(e+t*this._baseDuration,i.timeUnit,i.count,this._root)}};Oa.className="DateAxis";Oa.classNames=lr.classNames.concat([Oa.className]);var zl=class extends le{_beforeChanged(){super._beforeChanged();let e=this.get("sprite");if(this.isDirty("sprite")&&e&&(e.setAll({position:"absolute",role:"figure"}),this._disposers.push(e)),this.isDirty("location")){let t=e.dataItem;this.axis&&e&&t&&this.axis._prepareDataItem(t)}}_dispose(){let e=this.axis;e&&Vt(e._bullets,(t,i)=>{i.uid==this.uid&&delete e._bullets[t]}),super._dispose()}};zl.className="AxisBullet";zl.classNames=le.classNames.concat([zl.className]);var Sn=class extends ea{constructor(){super(...arguments),this._tickPoints=[]}};Sn.className="AxisTick";Sn.classNames=ea.classNames.concat([Sn.className]);var Tn=class extends Qt{constructor(){super(...arguments),this._tickPoints=[]}};Tn.className="AxisLabel";Tn.classNames=Qt.classNames.concat([Tn.className]);var Ui=class extends kt{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new be(jt.new({}),()=>Sn._new(this._root,{themeTags:xt(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new be(jt.new({}),()=>ra._new(this._root,{themeTags:xt(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new be(jt.new({}),()=>kt._new(this._root,{themeTags:xt(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new be(jt.new({}),()=>Tn._new(this._root,{themeTags:xt(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(e,t){let i=this.ticks.make();return i._setDataItem(e),e.setRaw("tick",i),i.set("themeTags",xt(i.get("themeTags"),t)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(e,t){let i=this.grid.make();return i._setDataItem(e),e.setRaw("grid",i),i.set("themeTags",xt(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(e,t){let i=this.axisFills.make();return i._setDataItem(e),i.set("themeTags",xt(i.get("themeTags"),t)),this.axis.gridContainer.children.push(i),e.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(e,t){let i=this.labels.make();return i.set("themeTags",xt(i.get("themeTags"),t)),e.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(e),e.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);let e=this.thumb;e&&(this._disposers.push(e.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){let e=this.thumb;if(e){let t=this.axis.labelsContainer,i=this.get("pan");i=="zoom"?t.children.push(e):i=="none"&&t.children.removeValue(e)}}}_handleThumbDown(e){this._thumbDownPoint=this.toLocal(e.point);let t=this.axis;this._downStart=t.get("start"),this._downEnd=t.get("end")}_handleThumbUp(e){this._thumbDownPoint=void 0}_handleThumbMove(e){let t=this._thumbDownPoint;if(t){let i=this.toLocal(e.point),r=this._downStart,s=this._downEnd,o=this._getPan(i,t)*Math.min(1,s-r)/2*this.get("panSensitivity",1);this.axis.zoom(r-o,s+o,0)}}_getPan(e,t){return 0}positionToCoordinate(e){return this._inversed?(this._end-e)*this._axisLength:(e-this._start)*this._axisLength}updateTooltipBounds(e){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e=e*(i-t),this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t),e}fixPosition(e){return this.get("inversed")?1-e:e}_updateLC(){}toggleVisibility(e,t,i,r){let s=this.axis,o=s.get("start",0),n=s.get("end",1),l=o+(n-o)*(i-1e-4),h=o+(n-o)*(r+1e-4);t<l||t>h?e.setPrivate("visible",!1):e.setPrivate("visible",!0)}_positionTooltip(e,t){let i=this.chart;i&&(e.set("pointTo",this._display.toGlobal(t)),i.inPlot(t)||e.hide())}processAxis(){}};Ui.className="AxisRenderer";Ui.classNames=kt.classNames.concat([Ui.className]);var $o=class extends Ui{constructor(){super(...arguments),this.thumb=He.new(this._root,{width:X,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");let e=this.grid.template;e.set("height",X),e.set("width",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)})}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));let r="opposite",s="inside";if(this.isDirty(r)||this.isDirty(s)){let o=this.chart,n=t.children;if(this.get(s)?t.addTag(s):t.removeTag(s),o){if(this.get(r)){let l=o.topAxesContainer.children;l.indexOf(t)==-1&&l.insertIndex(0,t),t.addTag(r),n.moveValue(this)}else{let l=o.bottomAxesContainer.children;l.indexOf(t)==-1&&l.moveValue(t),t.removeTag(r),n.moveValue(this,0)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(l=>{l._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}this.thumb.setPrivate("height",t.labelsContainer.height())}_getPan(e,t){return(t.x-e.x)/this.width()}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=i-e:e=t+e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=i-e:e=e-t,e=e/(i-t)*this._lc,e+=this._ls,e}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerWidth();this._lc=this.axisLength()/i,this._ls=(e.x()-t.get("paddingLeft",0))/i}}_updatePositions(){let e=this.axis,t=e.x()-Ht(e.get("centerX",0),e.width())-e.parent.get("paddingLeft",0);e.gridContainer.set("x",t),e.topGridContainer.set("x",t),e.bulletsContainer.set("y",this.y());let i=e.chart;if(i){let r=i.plotContainer,s=e.axisHeader,o=e.get("marginLeft",0),n=e.x()-o,l=e.parent;l&&(n-=l.get("paddingLeft",0)),s.children.length>0?(o=e.axisHeader.width(),e.set("marginLeft",o+1)):s.set("width",o),s.setAll({x:n,y:-1,height:r.height()+2})}}processAxis(){super.processAxis();let e=this.axis;e.get("width")==null&&e.set("width",X);let t=this._root.verticalLayout;e.set("layout",t),e.labelsContainer.set("width",X),e.axisHeader.setAll({layout:t})}axisLength(){return this.axis.width()}positionToPoint(e){return{x:this.positionToCoordinate(e),y:0}}updateTick(e,t,i,r){if(e){M(t)||(t=0);let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),M(i)&&i!=t&&(t=t+(i-t)*s),e.set("x",this.positionToCoordinate(t));let o=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("y",X),n||(o*=-1)):(e.set("y",0),n&&(o*=-1)),e.set("draw",l=>{l.moveTo(0,0),l.lineTo(0,o)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateLabel(e,t,i,r){if(e){let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),M(t)||(t=0);let o=e.get("inside",this.get("inside",!1));this.get("opposite")?o?(e.set("position","absolute"),e.set("y",0)):(e.set("position","relative"),e.set("y",X)):o?(e.set("y",0),e.set("position","absolute")):(e.set("y",void 0),e.set("position","relative")),M(i)&&i!=t&&(t=t+(i-t)*s),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){M(t)||(t=0);let r=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*r),e.set("x",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateBullet(e,t,i){if(e){let r=e.get("sprite");if(r){M(t)||(t=0);let s=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*s);let o=this.axis.roundAxisPosition(t,s),n=this.axis._bullets[o],l=-1;if(this.get("opposite")&&(l=1),e.get("stacked"))if(n){let h=n.get("sprite");h&&r.set("y",h.y()+h.height()*l)}else r.set("y",0);this.axis._bullets[o]=e,r.set("x",this.positionToCoordinate(t)),this.toggleVisibility(r,t,0,1)}}}updateFill(e,t,i){if(e){M(t)||(t=0),M(i)||(i=1);let r=this.positionToCoordinate(t),s=this.positionToCoordinate(i);this.fillDrawMethod(e,r,s)}}fillDrawMethod(e,t,i){e.set("draw",r=>{let s=this.axis.gridContainer.height(),o=this.width();i<t&&([i,t]=[t,i]),!(t>o||i<0)&&(r.moveTo(t,0),r.lineTo(i,0),r.lineTo(i,s),r.lineTo(t,s),r.lineTo(t,0))})}positionTooltip(e,t){this._positionTooltip(e,{x:this.positionToCoordinate(t),y:0})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,r=this._display.toGlobal({x:0,y:0}),s=r.x,o=0,n=this.axisLength(),l=i,h="up";this.get("opposite")?t?(h="up",o=r.y,l=i):(h="down",o=r.y-i,l=i):t?(h="down",o=r.y-i,l=i):(h="up",o=r.y,l=i);let u={left:s,right:s+n,top:o,bottom:o+l},p=e.get("bounds");Rd(u,p)||(e.set("bounds",u),e.set("pointerOrientation",h))}};$o.className="AxisRendererX";$o.classNames=Ui.classNames.concat([$o.className]);var Wl=class extends Ui{constructor(){super(...arguments),this.thumb=He.new(this._root,{height:X,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");let e=this.grid.template;e.set("width",X),e.set("height",0),e.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(i.width(),0)}),this.set("draw",(t,i)=>{t.moveTo(0,0),t.lineTo(0,i.height())})}_getPan(e,t){return(e.y-t.y)/this.height()}_changed(){var e;super._changed();let t=this.axis,i=t.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));let r=this.thumb,s="opposite",o="inside",n=this.chart;if(this.isDirty(s)||this.isDirty(o)){let h=t.children;if(this.get(o)?t.addTag(o):t.removeTag(o),n){if(this.get(s)){let u=n.rightAxesContainer.children;u.indexOf(t)==-1&&u.moveValue(t,0),t.addTag(s),h.moveValue(this,0)}else{let u=n.leftAxesContainer.children;u.indexOf(t)==-1&&u.moveValue(t),t.removeTag(s),h.moveValue(this)}(e=t.ghostLabel)===null||e===void 0||e._applyThemes(),this.labels.each(u=>{u._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}let l=t.labelsContainer.width();n&&(this.get(s)?r.set("centerX",0):r.set("centerX",l)),r.setPrivate("width",l)}processAxis(){super.processAxis();let e=this.axis;e.get("height")==null&&e.set("height",X);let t=this._root.horizontalLayout;e.set("layout",t),e.labelsContainer.set("height",X),e.axisHeader.set("layout",t)}_updatePositions(){let e=this.axis,t=e.y()-Ht(e.get("centerY",0),e.height());e.gridContainer.set("y",t),e.topGridContainer.set("y",t),e.bulletsContainer.set("x",this.x());let i=e.chart;if(i){let r=i.plotContainer,s=e.axisHeader,o=e.get("marginTop",0);s.children.length>0?(o=e.axisHeader.height(),e.set("marginTop",o+1)):s.set("height",o),s.setAll({y:e.y()-o,x:-1,width:r.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(e){return{x:0,y:this.positionToCoordinate(e)}}updateLabel(e,t,i,r){if(e){M(t)||(t=0);let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s);let o=this.get("opposite"),n=e.get("inside",this.get("inside",!1));o?(e.set("x",0),n?e.set("position","absolute"):e.set("position","relative")):n?(e.set("x",0),e.set("position","absolute")):(e.set("x",void 0),e.set("position","relative")),M(i)&&i!=t&&(t=t+(i-t)*s),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateGrid(e,t,i){if(e){M(t)||(t=0);let r=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*r),e.set("y",this.positionToCoordinate(t)),this.toggleVisibility(e,t,0,1)}}updateTick(e,t,i,r){if(e){M(t)||(t=0);let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),M(i)&&i!=t&&(t=t+(i-t)*s),e.set("y",this.positionToCoordinate(t));let o=e.get("length",0),n=e.get("inside",this.get("inside",!1));this.get("opposite")?(e.set("x",0),n&&(o*=-1)):n||(o*=-1),e.set("draw",l=>{l.moveTo(0,0),l.lineTo(o,0)}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateBullet(e,t,i){if(e){let r=e.get("sprite");if(r){M(t)||(t=0);let s=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*s);let o=this.axis.roundAxisPosition(t,s),n=this.axis._bullets[o],l=1;if(this.get("opposite")&&(l=-1),e.get("stacked"))if(n){let h=n.get("sprite");h&&r.set("x",h.x()+h.width()*l)}else r.set("x",0);this.axis._bullets[o]=e,r.set("y",this.positionToCoordinate(t)),this.toggleVisibility(r,t,0,1)}}}updateFill(e,t,i){if(e){M(t)||(t=0),M(i)||(i=1);let r=this.positionToCoordinate(t),s=this.positionToCoordinate(i);this.fillDrawMethod(e,r,s)}}fillDrawMethod(e,t,i){e.set("draw",r=>{let s=this.axis.gridContainer.width(),o=this.height();i<t&&([i,t]=[t,i]),!(t>o||i<0)&&(r.moveTo(0,t),r.lineTo(s,t),r.lineTo(s,i),r.lineTo(0,i),r.lineTo(0,t))})}positionToCoordinate(e){return this._inversed?(e-this._start)*this._axisLength:(this._end-e)*this._axisLength}positionTooltip(e,t){this._positionTooltip(e,{x:0,y:this.positionToCoordinate(t)})}updateTooltipBounds(e){let t=this.get("inside"),i=1e5,r=this._display.toGlobal({x:0,y:0}),s=r.y,o=0,n=this.axisLength(),l=i,h="right";this.get("opposite")?t?(h="right",o=r.x-i,l=i):(h="left",o=r.x,l=i):t?(h="left",o=r.x,l=i):(h="right",o=r.x-i,l=i);let u={left:o,right:o+l,top:s,bottom:s+n},p=e.get("bounds");Rd(u,p)||(e.set("bounds",u),e.set("pointerOrientation",h))}_updateLC(){let e=this.axis,t=e.parent;if(t){let i=t.innerHeight();this._lc=this.axisLength()/i,this._ls=e.y()/i}}toAxisPosition(e){let t=this._start||0,i=this._end||1;return e-=this._ls,e=e*(i-t)/this._lc,this.get("inversed")?e=t+e:e=i-e,e}toGlobalPosition(e){let t=this._start||0,i=this._end||1;return this.get("inversed")?e=e-t:e=i-e,e=e/(i-t)*this._lc,e+=this._ls,e}fixPosition(e){return this.get("inversed")?e:1-e}};Wl.className="AxisRendererY";Wl.classNames=Ui.classNames.concat([Wl.className]);var wo=class a extends yr{constructor(){super(...arguments),this._ph=0,this._pw=0,this._columnsUpdated=!1}_makeGraphics(e,t){return this.makeColumn(t,e)}_makeFieldNames(){super._makeFieldNames();let e=this.get("xAxis"),t=this.get("yAxis"),i="CategoryAxis",r="ValueAxis";e.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),e.isType(r)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),t.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),t.isType(r)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();let e=this.get("xAxis"),t=this.get("yAxis"),i=this.dataItems.length,r=Math.max(0,this.startIndex()-2),s=Math.min(this.endIndex()+2,i-1);if(e.inited&&t.inited)for(let o=r;o<=s;o++){let n=this.dataItems[o];this._createGraphics(n)}}_updateChildren(){let e=this.chart;e&&(this._ph=e.plotContainer.height(),this._pw=e.plotContainer.width());let t=this.get("xAxis"),i=this.get("yAxis"),r=this.get("baseAxis"),s=this.columns.template;this.isDirty("fill")&&s.get("fill")==null&&s.set("fill",this.get("fill")),this.isDirty("fillPattern")&&s.get("fillPattern")==null&&s.set("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&s.get("stroke")==null&&s.set("stroke",this.get("stroke"));let o=0,n=0,l=0;r&&F(r.series,g=>{if(g instanceof a){let m=g.get("stacked");m&&l==0&&n++,!m&&g.get("clustered")&&n++}g===this&&(o=n-1),l++}),this.get("clustered")||(o=0,n=1),n===0&&(n=1,o=0);let h="cellStartLocation",u="cellEndLocation",p=this._xRenderer.get(h,0),d=this._xRenderer.get(u,1),c=this._yRenderer.get(h,0),f=this._yRenderer.get(u,1);if(this._aLocationX0=p+o/n*(d-p),this._aLocationX1=p+(o+1)/n*(d-p),this._aLocationY0=c+o/n*(f-c),this._aLocationY1=c+(o+1)/n*(f-c),t.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){let g=this.dataItems.length,m=Math.max(0,this.startIndex()-2),y=Math.min(this.endIndex()+2,g-1);for(let _=0;_<m;_++)this._toggleColumn(this.dataItems[_],!1);let v=this.dataItems[m];for(let _=m;_<=y;_++){let $=this.dataItems[_];if($.get("valueX")!=null&&$.get("valueY")!=null){if(v=$,_>0&&m>0)for(let T=_-1;T>=0;T--){let S=this.dataItems[T];if(S.get("valueX")!=null&&S.get("valueY")!=null){v=S;break}}break}else this._toggleColumn($,!1)}this._beforeColumnsDraw();let x=0;i.isType("CategoryAxis")&&t.isType("CategoryAxis")?x=2:t===r?x=0:i===r&&(x=1);for(let _=m;_<=y;_++){let $=this.dataItems[_];this._updateGraphics($,v,x),$.get("valueX")!=null&&$.get("valueY")!=null&&(v=$)}this._afterColumnsDraw();for(let _=y+1;_<g;_++)this._toggleColumn(this.dataItems[_],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_createGraphics(e){let t=e.get("graphics");if(!t){t=this._makeGraphics(this.columns,e),e.set("graphics",t),t._setDataItem(e);let i=e.get("legendDataItem");if(i){let s=i.get("markerRectangle");if(s){let o=s.states.lookup("default");F(Pu,n=>{let l=t.get(n,this.get(n));s.set(n,l),o.set(n,l)})}}let r=e.get("rangeGraphics");r&&F(r,s=>{s.dispose()}),r=[],e.setRaw("rangeGraphics",r),this.axisRanges.each(s=>{let o=s.container,n=this._makeGraphics(s.columns,e);r&&r.push(n),n.setPrivate("list",s.columns),o.children.push(n)})}}createAxisRange(e){return F(this.dataItems,t=>{let i=t.get("graphics");i&&(i.dispose(),t.set("graphics",void 0))}),super.createAxisRange(e)}_updateGraphics(e,t,i){let r=e.get("graphics"),s=this._xField,o=this._yField,n=e.get(s),l=e.get(o),h=this.get("exactLocationX",!1);if(n!=null&&l!=null){let u=this._xOpenField,p=this._yOpenField,d=this.get("locationX",e.get("locationX",.5)),c=this.get("locationY",e.get("locationY",.5)),f=this.get("openLocationX",e.get("openLocationX",d)),g=this.get("openLocationY",e.get("openLocationY",c)),m=r.get("width"),y=r.get("height"),v=this.get("stacked"),x=this.get("xAxis"),_=this.get("yAxis"),$=x.get("start"),T=x.get("end"),S=_.get("start"),k=_.get("end"),A,L,O,I,R=this.get("vcy",1),B=this.get("vcx",1),Z=!1,j=!1;if(i==0){let st=this._aLocationX0+f-.5,ht=this._aLocationX1+d-.5;if(m instanceof St){let dt=(ht-st)*(1-m.value)/2;st+=dt,ht-=dt}if(A=x.getDataItemPositionX(e,u,st,B,h),L=x.getDataItemPositionX(e,s,ht,B,h),O=_.getDataItemPositionY(e,o,c,R),this._yOpenField!==this._yField)I=_.getDataItemPositionY(e,p,g,R);else if(v){let dt=e.get("stackToItemY");dt?I=_.getDataItemPositionY(dt,o,g,dt.component.get("vcy")):I=_.basePosition()}else I=_.basePosition();e.setRaw("point",{x:A+(L-A)/2,y:O}),j=!0}else if(i==1){let st=this._aLocationY0+g-.5,ht=this._aLocationY1+c-.5;if(y instanceof St){let dt=(ht-st)*(1-y.value)/2;st+=dt,ht-=dt}if(O=_.getDataItemPositionY(e,p,st,R),I=_.getDataItemPositionY(e,o,ht,R),L=x.getDataItemPositionX(e,s,d,B,h),this._xOpenField!==this._xField)A=x.getDataItemPositionX(e,u,f,B,h);else if(v){let dt=e.get("stackToItemX");dt?A=x.getDataItemPositionX(dt,s,f,dt.component.get("vcx"),h):A=x.basePosition()}else A=x.basePosition();Z=!0,e.setRaw("point",{x:L,y:O+(I-O)/2})}else if(i==2){let st=this._aLocationX0+f-.5,ht=this._aLocationX1+d-.5;if(m instanceof St){let dt=(ht-st)*(1-m.value)/2;st+=dt,ht-=dt}if(A=x.getDataItemPositionX(e,u,st,B),L=x.getDataItemPositionX(e,s,ht,B),st=this._aLocationY0+g-.5,ht=this._aLocationY1+c-.5,y instanceof St){let dt=(ht-st)*(1-y.value)/2;st+=dt,ht-=dt}O=_.getDataItemPositionY(e,p,st,R),I=_.getDataItemPositionY(e,o,ht,R),e.setRaw("point",{x:A+(L-A)/2,y:O+(I-O)/2})}this._applyGraphicsStates(e,t),this._updateSeriesGraphics(e,r,A,L,O,I,Z,j),A<$&&L<$||A>T&&L>T||O<S&&I<=S||O>=k&&I>k||Yi(A)||Yi(O)?this._toggleColumn(e,!1):this._toggleColumn(e,!0);let it=e.get("rangeGraphics");it&&F(it,st=>{this._updateSeriesGraphics(e,st,A,L,O,I,Z,j)})}else this._toggleColumn(e,!1)}_updateSeriesGraphics(e,t,i,r,s,o,n,l){let h=t.get("width"),u=t.get("height"),p=t.get("maxWidth"),d=t.get("maxHeight"),c=this.getPoint(i,s),f=this.getPoint(r,o),g=e.get("point");if(g){let m=this.getPoint(g.x,g.y);g.x=m.x+this._x,g.y=m.y+this._y}if(i=c.x,r=f.x,s=c.y,o=f.y,M(h)){let m=(r-i-h)/2;i+=m,r-=m}if(M(p)&&p<Math.abs(r-i)){let m=(r-i-p)/2;i+=m,r-=m}if(M(u)){let m=(o-s-u)/2;s+=m,o-=m}if(M(d)&&d<Math.abs(o-s)){let m=(o-s-d)/2;s+=m,o-=m}this.get("adjustBulletPosition")&&(n&&(r=Math.min(Math.max(0,r),this._pw),i=Math.min(Math.max(0,i),this._pw)),l&&(s=Math.min(Math.max(0,s),this._ph),o=Math.min(Math.max(0,o),this._ph))),e.setRaw("left",i),e.setRaw("right",r),e.setRaw("top",s),e.setRaw("bottom",o),t.setPrivate("width",r-i),t.setPrivate("height",o-s),t.set("x",i),t.set("y",o-(o-s))}_handleDataSetChange(){super._handleDataSetChange(),F(this._dataItems,e=>{this._toggleColumn(e,!1)})}_applyGraphicsStates(e,t){let i=e.get("graphics"),r=i.states.lookup("dropFromOpen"),s=i.states.lookup("riseFromOpen"),o=i.states.lookup("dropFromPrevious"),n=i.states.lookup("riseFromPrevious");if(r||o||s||n){let l=this.get("xAxis"),h=this.get("yAxis"),u=this.get("baseAxis"),p,d,c;u===l&&h.isType("ValueAxis")?(p=e.get(this._yOpenField),d=e.get(this._yField),c=t.get(this._yField)):u===h&&l.isType("ValueAxis")&&(p=e.get(this._xOpenField),d=e.get(this._xField),c=t.get(this._xField)),M(p)&&M(d)&&(d<p?r&&r.apply():s&&s.apply(),M(c)&&(d<c?o&&o.apply():n&&n.apply()))}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("graphics");t&&(this.columns.removeValue(t),t.dispose());let i=e.get("rangeGraphics");i&&F(i,r=>{let s=r.getPrivate("list");s&&s.removeValue(r),r.dispose()})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,e,t)],s=e.get("graphics");s&&r.push(s.hide(t));let o=e.get("rangeGraphics");o&&F(o,n=>{r.push(n.hide(t))}),yield Promise.all(r)})}_toggleColumn(e,t){let i=e.get("graphics");i&&i.setPrivate("visible",t);let r=e.get("rangeGraphics");r&&F(r,o=>{o.setPrivate("visible",t)});let s=e.bullets;s&&F(s,o=>{o.setPrivate("hidden",!t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,e,t)],s=e.get("graphics");s&&r.push(s.show(t));let o=e.get("rangeGraphics");o&&F(o,n=>{r.push(n.show(t))}),yield Promise.all(r)})}updateLegendMarker(e){let t=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!e){let i=this.dataItems[this.endIndex()-1];i&&(e=i)}if(t){let i=this.columns.template;if(e){let s=e.get("graphics");s&&(i=s)}let r=t.get("markerRectangle");if(r&&!t.get("itemContainer").get("disabled")){let s=r.states.lookup("default");F(Pu,o=>{let n=i.get(o,this.get(o));r.set(o,n),s.set(o,n)})}}}_getTooltipTarget(e){if(this.get("seriesTooltipTarget")=="bullet")return super._getTooltipTarget(e);let t=e.get("graphics");return t||this}};wo.className="BaseColumnSeries";wo.classNames=yr.classNames.concat([wo.className]);var Ie=class extends wo{constructor(){super(...arguments),this.allColumns=this.children.push(kt.new(this._root,{})),this.allColumnsData=[],this.columns=this.addDisposer(new be(jt.new({}),()=>Xe._new(this._root,{position:"absolute",themeTags:xt(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_processAxisRange(e){super._processAxisRange(e),e.columns=new be(jt.new({}),()=>Xe._new(this._root,{position:"absolute",themeTags:xt(e.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,e.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),F(this.allColumnsData,t=>{let i=t.width,r=t.height,s=t.x,o=t.y,n=t.stroke,l=t.fill,h=t.strokeWidth,u=t.strokeOpacity,p=t.fillOpacity;e.beginFill(l,p),e.beginPath(),e.lineStyle(h,n,u),e.drawRect(s,o,i,r),e.endStroke(),e.endFill()})})}_updateChildren(){this.isDirty("turboMode")&&(this.markDirtyValues(),this.get("turboMode")||this.allColumns.set("draw",void 0)),super._updateChildren()}_updateSeriesGraphics(e,t,i,r,s,o,n,l){if(this.get("turboMode")){t.virtualParent=this.chart,t.parent&&(this.mainContainer.children.removeValue(t),t._parent=void 0);let h=t.get("stroke"),u=t.get("fillOpacity",1),p=t.get("strokeOpacity",1),d=t.get("strokeWidth",1),c=t.get("fill"),f=this.getPoint(i,s),g=this.getPoint(r,o),m=e.get("point");if(m){let y=this.getPoint(m.x,m.y);m.x=y.x+this._x,m.y=y.y+this._y}i=f.x,r=g.x,s=f.y,o=g.y,e.setRaw("left",i),e.setRaw("right",r),e.setRaw("top",s),e.setRaw("bottom",o),this.allColumnsData.push({width:r-i,height:o-s,x:i,y:s,stroke:h,fill:c,strokeWidth:d,strokeOpacity:p,fillOpacity:u})}else t.parent||this.mainContainer.children.push(t),super._updateSeriesGraphics(e,t,i,r,s,o,n,l)}};Ie.className="ColumnSeries";Ie.classNames=wo.classNames.concat([Ie.className]);var Co=class extends Xe{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();let e=this._display;e.moveTo(this.get("lowX0",0),this.get("lowY0",0)),e.lineTo(this.get("lowX1",0),this.get("lowY1",0)),e.moveTo(this.get("highX0",0),this.get("highY0",0)),e.lineTo(this.get("highX1",0),this.get("highY1",0))}};Co.className="Candlestick";Co.classNames=Xe.classNames.concat([Co.className]);var aa=class extends Ie{constructor(){super(...arguments),this.columns=this.addDisposer(new be(jt.new({themeTags:["autocolor"]}),()=>Co._new(this._root,{themeTags:xt(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))}makeColumn(e,t){let i=t.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(e),t.push(i),i}_updateGraphics(e,t,i){super._updateGraphics(e,t,i);let r=this.getRaw("xAxis"),s=this.getRaw("yAxis"),o=this.get("vcy",1),n=this.get("vcx",1),l,h,u,p,d,c,f,g,m=this.get("locationX",e.get("locationX",.5)),y=this.get("locationY",e.get("locationY",.5)),v=this.get("openLocationX",e.get("openLocationX",m)),x=this.get("openLocationY",e.get("openLocationY",y)),_;if(i==0){let $=s.getDataItemPositionY(e,this._yOpenField,1,o),T=s.getDataItemPositionY(e,this._yField,1,o);p=s.getDataItemPositionY(e,this._yLowField,1,o),g=s.getDataItemPositionY(e,this._yHighField,1,o),f=Math.max($,T),u=Math.min($,T);let S=this._aLocationX0+v-.5,k=this._aLocationX1+m-.5;l=r.getDataItemPositionX(e,this._xField,S+(k-S)/2,n),h=l,d=l,c=l,_="vertical"}else{let $=r.getDataItemPositionX(e,this._xOpenField,1,n),T=r.getDataItemPositionX(e,this._xField,1,n);h=r.getDataItemPositionX(e,this._xLowField,1,n),c=r.getDataItemPositionX(e,this._xHighField,1,n),d=Math.max($,T),l=Math.min($,T);let S=this._aLocationY0+x-.5,k=this._aLocationY1+y-.5;u=s.getDataItemPositionY(e,this._yField,S+(k-S)/2,o),p=u,f=u,g=u,_="horizontal"}this._updateCandleGraphics(e,l,h,u,p,d,c,f,g,_)}_updateCandleGraphics(e,t,i,r,s,o,n,l,h,u){let p=e.get("graphics");if(p){let d=this.getPoint(t,r),c=this.getPoint(i,s),f=this.getPoint(o,l),g=this.getPoint(n,h);if(this.get("turboMode")){let m=this.allColumnsData[this.allColumnsData.length-1];m.lowX0=d.x,m.lowY0=d.y,m.lowX1=c.x,m.lowY1=c.y,m.highX0=f.x,m.highY0=f.y,m.highX1=g.x,m.highY1=g.y}else{let m=p.x(),y=p.y();p.set("lowX0",d.x-m),p.set("lowY0",d.y-y),p.set("lowX1",c.x-m),p.set("lowY1",c.y-y),p.set("highX0",f.x-m),p.set("highY0",f.y-y),p.set("highX1",g.x-m),p.set("highY1",g.y-y),p.set("orientation",u);let v=e.get("rangeGraphics");v&&F(v,x=>{x.set("lowX0",d.x-m),x.set("lowY0",d.y-y),x.set("lowX1",c.x-m),x.set("lowY1",c.y-y),x.set("highX0",f.x-m),x.set("highY0",f.y-y),x.set("highX1",g.x-m),x.set("highY1",g.y-y),x.set("orientation",u)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",e=>{e.clear(),F(this.allColumnsData,t=>{let i=t.width,r=t.height,s=t.x,o=t.y,n=t.stroke,l=t.fill,h=t.strokeWidth,u=t.strokeOpacity,p=t.fillOpacity,d=t.lowX0,c=t.lowY0,f=t.lowX1,g=t.lowY1,m=t.highX0,y=t.highY0,v=t.highX1,x=t.highY1;e.beginFill(l,p),e.beginPath(),e.lineStyle(h,n,u),e.drawRect(s,o,i,r),e.moveTo(d,c),e.lineTo(f,g),e.moveTo(m,y),e.lineTo(v,x),e.endStroke(),e.endFill()})})}_processAxisRange(e){super._processAxisRange(e),e.columns=new be(jt.new({}),()=>Co._new(this._root,{themeTags:xt(e.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,e.columns.template]))}};aa.className="CandlestickSeries";aa.classNames=Ie.classNames.concat([aa.className]);var Te=class extends yr{constructor(){super(...arguments),this._strokeGenerator=Ru(),this._fillGenerator=Zg(),this.strokes=this.addDisposer(new be(jt.new({}),()=>kt._new(this._root,{themeTags:xt(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new be(jt.new({}),()=>kt._new(this._root,{themeTags:xt(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(e){return e[3]}),this._fillGenerator.x0(function(e){return e[2]}),this._fillGenerator.y1(function(e){return e[1]}),this._fillGenerator.x1(function(e){return e[0]}),super._afterNew()}makeStroke(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}makeFill(e){let t=this.mainContainer.children.push(e.make());return e.push(t),t}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let e=this.get("xAxis"),t=this.get("yAxis");if(this.isDirty("stroke")){let i=this.get("stroke");this.strokes.template.set("stroke",i);let r=this._legendStroke;r&&r.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){let i=this.get("fill");this.fills.template.set("fill",i);let r=this._legendFill;r&&r.states.lookup("default").set("fill",i)}if(this.isDirty("fillPattern")){let i=this.get("fillPattern");this.fills.template.set("fillPattern",i);let r=this._legendFill;r&&r.states.lookup("default").set("fillPattern",i)}if(this.isDirty("curveFactory")){let i=this.get("curveFactory");i&&(this._strokeGenerator.curve(i),this._fillGenerator.curve(i))}if(e.inited&&t.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){let i=this.dataItems;this.fills.each(p=>{p.setPrivate("visible",!1)}),this.strokes.each(p=>{p.setPrivate("visible",!1)}),this.axisRanges.each(p=>{let d=p.fills;d&&d.each(f=>{f.setPrivate("visible",!1)});let c=p.strokes;c&&c.each(f=>{f.setPrivate("visible",!1)})});let r=this.startIndex(),s=this.strokes.template.get("templateField"),o=this.fills.template.get("templateField"),n=!0,l=!0;s&&(n=!1),o&&(l=!1);for(let p=r-1;p>=0;p--){let d=i[p],c=!0,f=d.dataContext;s&&f[s]&&(n=!0),o&&f[o]&&(l=!0);for(let g=0,m=this._valueFields.length;g<m;g++)if(!M(d.get(this._valueFields[g]))){c=!1;break}if(c&&n&&l){r=p;break}}let h=i.length,u=this.endIndex();if(u<h){u++;for(let p=u;p<h;p++){let d=i[p],c=!0;for(let f=0,g=this._valueFields.length;f<g;f++)if(!M(d.get(this._valueFields[f]))){c=!1;break}if(c){u=p+1;break}}}if(r>0&&r--,this._endIndex=u,this._clearGraphics(),this._sindex=0,this._dindex=r,h==1)this._startSegment(0);else for(;this._dindex<u-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(e=>{e.fills.clear(),e.strokes.clear()})}_startSegment(e){let t=this.dataItems,i=this._endIndex,r=i,s=this.get("autoGapCount"),o=this.get("connect"),n=this.makeFill(this.fills),l=this._fillTemplate,h=this.fills.template;l&&l!=h&&(n.template=l),n.setPrivate("visible",!0);let u=this.makeStroke(this.strokes),p=this._strokeTemplate;p&&p!=this.strokes.template&&(u.template=p),u.setPrivate("visible",!0);let d=this.get("xAxis"),c=this.get("yAxis"),f=this.get("baseAxis"),g=this.get("vcx",1),m=this.get("vcy",1),y=this._xField,v=this._yField,x=this._xOpenField,_=this._yOpenField,$=this.get("openValueXField"),T=this.get("openValueYField");$||(x=this._xField),T||(_=this._yField);let S=this.get("stacked"),k=d.basePosition(),A=c.basePosition(),L;f===c?L=this._yField:L=this._xField;let O=[],I=[];O.push(I);let R=this.strokes.template.get("templateField"),B=this.fills.template.get("templateField"),Z=this.get("locationX",.5),j=this.get("locationY",.5),it=this.get("openLocationX",Z),st=this.get("openLocationY",j),ht=this.get("minDistance",0),dt,Xt=this.fills.template.get("visible");this.axisRanges.length>0&&(Xt=!0);let tt=!1;(S||$||T)&&(tt=!0);let Tt={points:I,segments:O,stacked:S,getOpen:tt,basePosX:k,basePosY:A,fillVisible:Xt,xField:y,yField:v,xOpenField:x,yOpenField:_,vcx:g,vcy:m,baseAxis:f,xAxis:d,yAxis:c,locationX:Z,locationY:j,openLocationX:it,openLocationY:st,minDistance:ht},Nt=this._strokeTemplate,Pe=this._fillTemplate;for(dt=e;dt<r;dt++){this._dindex=dt;let ye=t[dt],ke=ye.get(y),We=ye.get(v);if(ke==null||We==null?o||(I=[],O.push(I),Tt.points=I):this._getPoints(ye,Tt),R){let ae=ye.dataContext[R];if(ae)if(ae instanceof jt||(ae=jt.new(ae)),this._strokeTemplate=ae,dt>e){r=dt;break}else Nt=ae,u.template=ae}if(B){let ae=ye.dataContext[B];if(ae)if(ae instanceof jt||(ae=jt.new(ae)),this._fillTemplate=ae,dt>e){r=dt;break}else Pe=ae,n.template=ae}if(!o){let ae=t[dt+1];ae&&f.shouldGap(ye,ae,s,L)&&(I=[],O.push(I),Tt.points=I)}}n.setRaw("userData",[e,dt]),u.setRaw("userData",[e,dt]),dt===i&&this._endLine(I,O[0][0]),u&&this._drawStroke(u,O),n&&this._drawFill(n,O),this.axisRanges.each(ye=>{let ke=ye.container,We=ye.fills,ae=this.makeFill(We);ke&&ke.children.push(ae),ae.setPrivate("visible",!0),this._drawFill(ae,O);let Zi=ye.strokes,Ji=this.makeStroke(Zi);ke&&ke.children.push(Ji),Nt&&Nt!=this.strokes.template&&(Ji.template=Nt),Pe&&Pe!=this.fills.template&&(ae.template=Pe),Ji.setPrivate("visible",!0),this._drawStroke(Ji,O),ae.setRaw("userData",[e,dt]),Ji.setRaw("userData",[e,dt])})}_getPoints(e,t){let i=t.points,r=e.get("locationX",t.locationX),s=e.get("locationY",t.locationY),o=this.get("exactLocationX",!1),n=this.get("exactLocationY",!1),l=t.xAxis.getDataItemPositionX(e,t.xField,r,t.vcx,o),h=t.yAxis.getDataItemPositionY(e,t.yField,s,t.vcy,n);if(this._shouldInclude(l)){let u=this.getPoint(l,h),p=[u.x,u.y];if(u.x+=this._x,u.y+=this._y,e.set("point",u),t.fillVisible){let d=l,c=h;if(t.baseAxis===t.xAxis?c=t.basePosY:t.baseAxis===t.yAxis&&(d=t.basePosX),t.getOpen){let g=e.get(t.xOpenField),m=e.get(t.yOpenField);if(g!=null&&m!=null){let y=e.get("openLocationX",t.openLocationX),v=e.get("openLocationY",t.openLocationY);if(t.stacked){let x=e.get("stackToItemX"),_=e.get("stackToItemY");x?(d=t.xAxis.getDataItemPositionX(x,t.xField,y,x.component.get("vcx"),o),Yi(d)&&(d=t.basePosX)):t.yAxis===t.baseAxis?d=t.basePosX:d=t.xAxis.getDataItemPositionX(e,t.xOpenField,y,t.vcx,o),_?(c=t.yAxis.getDataItemPositionY(_,t.yField,v,_.component.get("vcy"),n),Yi(c)&&(c=t.basePosY)):t.xAxis===t.baseAxis?c=t.basePosY:c=t.yAxis.getDataItemPositionY(e,t.yOpenField,v,t.vcy,n)}else d=t.xAxis.getDataItemPositionX(e,t.xOpenField,y,t.vcx,o),c=t.yAxis.getDataItemPositionY(e,t.yOpenField,v,t.vcy,n)}}let f=this.getPoint(d,c);p[2]=f.x,p[3]=f.y}if(t.minDistance>0){let d=p[0],c=p[1],f=p[2],g=p[3],m=this._previousPoint,y=m[0],v=m[1],x=m[2],_=m[3];(Math.hypot(d-y,c-v)>t.minDistance||f&&g&&Math.hypot(f-x,g-_)>t.minDistance)&&(i.push(p),this._previousPoint=p)}else i.push(p)}}_endLine(e,t){}_drawStroke(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{F(t,r=>{this._strokeGenerator.context(i),this._strokeGenerator(r)})})}_drawFill(e,t){e.get("visible")&&!e.get("forceHidden")&&e.set("draw",i=>{F(t,r=>{this._fillGenerator.context(i),this._fillGenerator(r)})})}_processAxisRange(e){super._processAxisRange(e),e.fills=new be(jt.new({}),()=>kt._new(this._root,{themeTags:xt(e.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,e.fills.template])),e.strokes=new be(jt.new({}),()=>kt._new(this._root,{themeTags:xt(e.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,e.strokes.template]))}createLegendMarker(e){let t=this.get("legendDataItem");if(t){let i=t.get("marker"),r=t.get("markerRectangle");r&&r.setPrivate("visible",!1),i.set("background",He.new(i._root,{fillOpacity:0,fill:Wi(0)}));let s=i.children.push(kt._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=s;let o=i.children.push(kt._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=o;let n=this._root.interfaceColors.get("disabled");if(s.states.create("disabled",{fill:n,stroke:n}),o.states.create("disabled",{fill:n,stroke:n}),this.bullets.length>0){let l=this.bullets.getIndex(0);if(l){let h=l(i._root,this,new Li(this,{legend:!0},{}));if(h){let u=h.get("sprite");u instanceof kt&&u.states.create("disabled",{fill:n,stroke:n}),u&&(u.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),i.children.push(u),u.setAll({x:i.width()/2,y:i.height()/2}),i.events.on("boundschanged",()=>{u.setAll({x:i.width()/2,y:i.height()/2})}))}}}}}};Te.className="LineSeries";Te.classNames=yr.classNames.concat([Te.className]);var oa=class extends Te{_afterNew(){this._setDefault("curveFactory",Jg),super._afterNew()}_getPoints(e,t){let i=t.points,r=this.get("stepWidth",X).value/2,s=e.get("locationX",t.locationX),o=e.get("locationY",t.locationY),n=s,l=o;t.baseAxis===t.xAxis?(s-=r,n+=r):t.baseAxis===t.yAxis&&(o-=r,l+=r);let h=t.xAxis.getDataItemPositionX(e,t.xField,s,t.vcx),u=t.yAxis.getDataItemPositionY(e,t.yField,o,t.vcy),p=t.xAxis.getDataItemPositionX(e,t.xField,n,t.vcx),d=t.yAxis.getDataItemPositionY(e,t.yField,l,t.vcy);if(this._shouldInclude(h)){let c=this.getPoint(h,u),f=[c.x,c.y],g=this.getPoint(p,d),m=[g.x,g.y];if(t.fillVisible){let y=h,v=u,x=p,_=d;if(t.baseAxis===t.xAxis?(v=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(y=t.basePosX,x=t.basePosX),t.getOpen){let S=e.get(t.xOpenField),k=e.get(t.yOpenField);if(S!=null&&k!=null)if(s=e.get("openLocationX",t.openLocationX),o=e.get("openLocationY",t.openLocationY),n=s,l=o,t.baseAxis===t.xAxis?(s-=r,n+=r):t.baseAxis===t.yAxis&&(o-=r,l+=r),t.stacked){let A=e.get("stackToItemX"),L=e.get("stackToItemY");A?(y=t.xAxis.getDataItemPositionX(A,t.xField,s,A.component.get("vcx")),x=t.xAxis.getDataItemPositionX(A,t.xField,n,A.component.get("vcx"))):t.yAxis===t.baseAxis?(y=t.basePosX,x=t.basePosX):t.baseAxis===t.yAxis&&(y=t.xAxis.getDataItemPositionX(e,t.xOpenField,s,t.vcx),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx)),L?(v=t.yAxis.getDataItemPositionY(L,t.yField,o,L.component.get("vcy")),_=t.yAxis.getDataItemPositionY(L,t.yField,l,L.component.get("vcy"))):t.xAxis===t.baseAxis?(v=t.basePosY,_=t.basePosY):t.baseAxis===t.yAxis&&(v=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,l,t.vcy))}else y=t.xAxis.getDataItemPositionX(e,t.xOpenField,s,t.vcx),v=t.yAxis.getDataItemPositionY(e,t.yOpenField,o,t.vcy),x=t.xAxis.getDataItemPositionX(e,t.xOpenField,n,t.vcx),_=t.yAxis.getDataItemPositionY(e,t.yOpenField,l,t.vcy)}let $=this.getPoint(y,v),T=this.getPoint(x,_);f[2]=$.x,f[3]=$.y,m[2]=T.x,m[3]=T.y}i.push(f),i.push(m),e.set("point",{x:f[0]+(m[0]-f[0])/2,y:f[1]+(m[1]-f[1])/2})}this.get("noRisers")&&(t.points=[],t.segments.push(i))}};oa.className="StepLineSeries";oa.classNames=Te.classNames.concat([oa.className]);var La=class extends ta{constructor(){super(...arguments),this._tickPoints=[]}};La.className="AxisLabelRadial";La.classNames=ta.classNames.concat([La.className]);var hc=class extends Rr{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:ia.new(this._root,{}),width:X,height:X}),t("PieChart").setAll({radius:Jt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:pt}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:pt,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:pt,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:pt}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:pt,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:pt,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:pt}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:pt,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:pt,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let i=t("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}),lt(i,"fill",e,"alternativeBackground")}}};var So=class extends or{_afterNew(){this._defaultThemes.push(hc.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};So.className="PercentChart";So.classNames=or.classNames.concat([So.className]);var Os=class extends So{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:pt,y:pt})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),i=e.innerHeight(),r=this.get("startAngle",0),s=this.get("endAngle",0),o=this.get("innerRadius"),n=fo(0,0,r,s,1),l=t/(n.right-n.left),h=i/(n.bottom-n.top),u={left:0,right:0,top:0,bottom:0};if(o instanceof St){let c=o.value,f=Math.min(l,h);c=Math.max(f*c,f-Math.min(i,t))/f,u=fo(0,0,r,s,c),this.setPrivateRaw("irModifyer",c/o.value)}n=Id([n,u]);let p=this._maxRadius;this._maxRadius=Math.min(l,h);let d=Ht(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-d*(n.bottom+n.top)/2,dx:-d*(n.right+n.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||p!=this._maxRadius)&&this.series.each(c=>{c._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(c=>{c._markDirtyKey("innerRadius")})}radius(e){let t=Ht(this.get("radius",0),this._maxRadius),i=Ht(this.get("innerRadius",0),t);if(e){let r=this.series.indexOf(e),s=this.series.length,o=e.get("radius");return o!=null?i+Ht(o,t-i):i+(t-i)/s*(r+1)}return t}innerRadius(e){let t=this.radius(),i=Ht(this.get("innerRadius",0),t);if(i<0&&(i=t+i),e){let r=this.series.indexOf(e),s=this.series.length,o=e.get("innerRadius");return o!=null?i+Ht(o,t-i):i+(t-i)/s*r}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};Os.className="PieChart";Os.classNames=So.classNames.concat([Os.className]);var To=class extends hi{constructor(){super(...arguments),this.slicesContainer=this.children.push(ot.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(ot.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(ot.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,i=0,r=1/0,s=0;F(this._dataItems,o=>{let n=o.get("valueWorking",0);e+=n,t+=Math.abs(n)}),F(this._dataItems,o=>{let n=o.get("valueWorking",0);n>i&&(i=n),n<r&&(r=n),s++;let l=n/t;t==0&&(l=0),o.setRaw("valuePercentTotal",l*100)}),this.setPrivateRaw("valueLow",r),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/s),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return ut(this,void 0,void 0,function*(){let i=[];i.push(t.show.call(this,e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return ut(this,void 0,void 0,function*(){let i=[];i.push(t.hide.call(this,e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&F(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&F(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),F(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,e,t)];M(t)||(t=this.get("stateAnimationDuration",0));let s=this.get("stateAnimationEasing"),o=e.get("value"),n=e.animate({key:"valueWorking",to:o,duration:t,easing:s});n&&r.push(n.waitForStop());let l=e.get("tick");l&&r.push(l.show(t));let h=e.get("label");h&&r.push(h.show(t));let u=e.get("slice");u&&r.push(u.show(t)),u.get("active")&&u.states.applyAnimate("active"),yield Promise.all(r)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return ut(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,e,t)],s=this.states.create("hidden",{});M(t)||(t=s.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let o=s.get("stateAnimationEasing",this.get("stateAnimationEasing")),n=e.animate({key:"valueWorking",to:0,duration:t,easing:o});n&&r.push(n.waitForStop());let l=e.get("tick");l&&r.push(l.hide(t));let h=e.get("label");h&&r.push(h.hide(t));let u=e.get("slice");u.hideTooltip(),u&&r.push(u.hide(t)),yield Promise.all(r)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let i=e.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let r=e.get("slice");r&&(this.slices.removeValue(r),r.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let i=e.get("legendDataItem");if(i){let r=i.get("markerRectangle");F(Pu,s=>{t.get(s)!=null&&r.set(s,t.get(s))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((i,r)=>i.y>r.y?1:i.y<r.y?-1:0),F(e,i=>{let r=i.label.adjustedLocalBounds(),s=r.top;i.y+s<t&&(i.y=t-s),i.label.set("y",i.y),t=i.y+r.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((i,r)=>i.y<r.y?1:i.y>r.y?-1:0),F(e,i=>{let r=i.label.adjustedLocalBounds(),s=r.bottom;i.y+s>t&&(i.y=t-s),i.label.set("y",i.y),t=i.y+r.top})}}_arrangeRight(e){if(e){let t=0;e.sort((i,r)=>i.y>r.y?1:i.y<r.y?-1:0),F(e,i=>{let r=i.label.adjustedLocalBounds(),s=r.left;i.y+s<t&&(i.y=t-s),i.label.set("x",i.y),t=i.y+r.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((i,r)=>i.y<r.y?1:i.y>r.y?-1:0),F(e,i=>{let r=i.label.adjustedLocalBounds(),s=r.right;i.y+s>t&&(i.y=t-s),i.label.set("x",i.y),t=i.y+r.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};To.className="PercentSeries";To.classNames=hi.classNames.concat([To.className]);var Ki=class extends To{_makeSlices(){return new be(jt.new({}),()=>nr._new(this._root,{themeTags:xt(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new be(jt.new({}),()=>ta._new(this._root,{themeTags:xt(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new be(jt.new({}),()=>ea._new(this._root,{themeTags:xt(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let i=this.makeLabel(e);i.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t.set("textType","aligned");else{let i=t.get("textType");(i==null||i=="aligned")&&t.set("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),r=this.get("endAngle",e.get("endAngle",270))-t,s=t,o=e.radius(this);this.setPrivateRaw("radius",o);let n=e.innerRadius(this)*e.getPrivate("irModifyer",1);n<0&&(n=o+n),F(this._dataItems,l=>{this.updateLegendValue(l);let h=r*l.get("valuePercentTotal")/100,u=l.get("slice");if(u){u.set("radius",o),u.set("innerRadius",n),u.set("startAngle",s),u.set("arc",h);let c=l.get("fill");u._setDefault("fill",c),u._setDefault("stroke",c);let f=l.get("fillPattern");u._setDefault("fillPattern",f)}let p=ar(s+h/2),d=l.get("label");if(d&&(d.setPrivate("radius",o),d.setPrivate("innerRadius",n),d.set("labelAngle",p),d.get("textType")=="aligned")){let c=o+d.get("radius",0),f=o*de(p);p>90&&p<=270?(!d.isHidden()&&!d.isHiding()&&this._lLabels.push({label:d,y:f}),c*=-1,c-=this.labelsContainer.get("paddingLeft",0),d.set("centerX",X),d.setPrivateRaw("left",!0)):(!d.isHidden()&&!d.isHiding()&&this._rLabels.push({label:d,y:f}),c+=this.labelsContainer.get("paddingRight",0),d.set("centerX",0),d.setPrivateRaw("left",!1)),d.set("x",c),d.set("y",o*de(p))}s+=h,this._updateTick(l)})}}}_updateTick(e){let t=e.get("tick"),i=e.get("label"),r=e.get("slice"),s=t.get("location",1);if(t&&i&&r){let o=(r.get("shiftRadius",0)+r.get("radius",0))*r.get("scale",1)*s,n=i.get("labelAngle",0),l=ge(n),h=de(n),u=this.labelsContainer,p=u.get("paddingLeft",0),d=u.get("paddingRight",0),c=0,f=0;c=i.x(),f=i.y();let g=[];if(c!=0||f!=0){if(i.get("textType")=="circular"){let y=i.radius()-i.get("paddingBottom",0),v=i.get("labelAngle",0);c=y*ge(v),f=y*de(v)}let m=-d;i.getPrivate("left")&&(m=p),g=[{x:r.x()+o*l,y:r.y()+o*h},{x:c+m,y:f},{x:c,y:f}]}t.set("points",g)}}_positionBullet(e){let t=e.get("sprite");if(t){let r=t.dataItem.get("slice");if(r){let s=r.get("innerRadius",0),o=r.get("radius",0),n=r.get("startAngle",0),l=r.get("arc",0),h=e.get("locationX",.5),u=e.get("locationY",.5),p=n+l*h,d=s+(o-s)*u;t.setAll({x:ge(p)*d,y:de(p)*d})}}}};Ki.className="PieSeries";Ki.classNames=To.classNames.concat([Ki.className]);var Do=class extends Ui{constructor(){super(...arguments),this.labels=this.addDisposer(new be(jt.new({}),()=>La._new(this._root,{themeTags:xt(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template]))),this.axisFills=this.addDisposer(new be(jt.new({}),()=>nr._new(this._root,{themeTags:xt(this.axisFills.template.get("themeTags",["fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this._fillGenerator=Ts()}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["renderer","circular"]),super._afterNew(),this.setPrivateRaw("letter","X"),this.setRaw("position","absolute")}_changed(){super._changed(),(this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle"))&&this.updateLayout()}processAxis(){super.processAxis(),this.axis.labelsContainer.set("isMeasured",!1)}updateLayout(){let e=this.chart;if(e){let t=e.getPrivate("radius",0),i=Ht(this.get("radius",X),t);i<0&&(i=t+i),this.setPrivate("radius",i);let r=Ht(this.get("innerRadius",e.getPrivate("innerRadius",0)),t)*e.getPrivate("irModifyer",1);r<0&&(r=i+r),this.setPrivate("innerRadius",r);let s=this.get("startAngle",e.get("startAngle",-90)),o=this.get("endAngle",e.get("endAngle",270));this.setPrivate("startAngle",s),this.setPrivate("endAngle",o),this.set("draw",n=>{let l=this.positionToPoint(0);n.moveTo(l.x,l.y),s>o&&([s,o]=[o,s]),n.arc(0,0,i,s*Ge,o*Ge)}),this.axis.markDirtySize()}}updateGrid(e,t,i){if(e){t==null&&(t=0);let r=e.get("location",.5);i!=null&&i!=t&&(t=t+(i-t)*r);let s=this.getPrivate("radius",0),o=this.getPrivate("innerRadius",0),n=this.positionToAngle(t);this.toggleVisibility(e,t,0,1),s!=null&&e.set("draw",l=>{l.moveTo(o*ge(n),o*de(n)),l.lineTo(s*ge(n),s*de(n))})}}positionToAngle(e){let t=this.axis,i=this.getPrivate("startAngle",0),r=this.getPrivate("endAngle",360),s=t.get("start",0),o=t.get("end",1),n=(r-i)/(o-s),l;return this.get("inversed")?l=i+(o-e)*n:l=i+(e-s)*n,l}_handleOpposite(){}positionToPoint(e){let t=this.getPrivate("radius",0),i=this.positionToAngle(e);return{x:t*ge(i),y:t*de(i)}}updateLabel(e,t,i,r){if(e){t==null&&(t=0);let s=.5;r!=null&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),i!=null&&i!=t&&(t=t+(i-t)*s);let o=this.getPrivate("radius",0),n=this.getPrivate("innerRadius",0),l=this.positionToAngle(t);e.setPrivate("radius",o),e.setPrivate("innerRadius",n),e.set("labelAngle",l),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}fillDrawMethod(e,t,i){e.set("draw",r=>{t==null&&(t=this.getPrivate("startAngle",0)),i==null&&(i=this.getPrivate("endAngle",0));let s=this.getPrivate("innerRadius",0),o=this.getPrivate("radius",0);this._fillGenerator.context(r),this._fillGenerator({innerRadius:s,outerRadius:o,startAngle:(t+90)*Ge,endAngle:(i+90)*Ge})})}updateTick(e,t,i,r){if(e){t==null&&(t=0);let s=.5;r!=null&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),i!=null&&i!=t&&(t=t+(i-t)*s);let o=e.get("length",0);e.get("inside")&&(o*=-1);let l=this.getPrivate("radius",0),h=this.positionToAngle(t);this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1)),l!=null&&e.set("draw",u=>{u.moveTo(l*ge(h),l*de(h)),l+=o,u.lineTo(l*ge(h),l*de(h))})}}updateBullet(e,t,i){if(e){let r=e.get("sprite");if(r){t==null&&(t=0);let s=e.get("location",.5);i!=null&&i!=t&&(t=t+(i-t)*s);let o=this.getPrivate("radius",0),n=this.positionToAngle(t);this.toggleVisibility(r,t,0,1),r.setAll({rotation:n,x:o*ge(n),y:o*de(n)})}}}updateFill(e,t,i){if(e){t==null&&(t=0),i==null&&(i=1);let r=this.fitAngle(this.positionToAngle(t)),s=this.fitAngle(this.positionToAngle(i));e.setAll({startAngle:r,arc:s-r}),e._setSoft("innerRadius",this.getPrivate("innerRadius")),e._setSoft("radius",this.getPrivate("radius"))}}fitAngle(e){let t=this.getPrivate("startAngle",0),i=this.getPrivate("endAngle",0),r=Math.min(t,i),s=Math.max(t,i);return e<r&&(e=r),e>s&&(e=s),e}axisLength(){return Math.abs(this.getPrivate("radius",0)*Math.PI*2*(this.getPrivate("endAngle",360)-this.getPrivate("startAngle",0))/360)}positionTooltip(e,t){let i=this.getPrivate("radius",0),r=this.positionToAngle(t);this._positionTooltip(e,{x:i*ge(r),y:i*de(r)})}updateTooltipBounds(e){}};Do.className="AxisRendererCircular";Do.classNames=Ui.classNames.concat([Do.className]);var Gl=class extends Ui{constructor(){super(...arguments),this._fillGenerator=Ts(),this.labels=this.addDisposer(new be(jt.new({}),()=>La._new(this._root,{themeTags:xt(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["renderer","radial"]),super._afterNew(),this.setPrivate("letter","Y"),this.setRaw("position","absolute")}_changed(){super._changed(),(this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle"))&&this.updateLayout()}processAxis(){super.processAxis()}updateLayout(){let e=this.chart;if(e){let t=e.getPrivate("radius",0),i=Ht(this.get("radius",X),t),r=Ht(this.get("innerRadius",e.getPrivate("innerRadius",0)),t)*e.getPrivate("irModifyer",1);r<0&&(r=i+r),this.setPrivate("radius",i),this.setPrivate("innerRadius",r);let s=this.get("startAngle",e.get("startAngle",-90)),o=this.get("endAngle",e.get("endAngle",270));this.setPrivate("startAngle",s),this.setPrivate("endAngle",o);let n=this.get("axisAngle",0);this.set("draw",l=>{l.moveTo(r*ge(n),r*de(n)),l.lineTo(i*ge(n),i*de(n))}),this.axis.markDirtySize()}}updateGrid(e,t,i){if(e){M(t)||(t=0);let r=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*r);let s=this.positionToCoordinate(t)+this.getPrivate("innerRadius",0);this.toggleVisibility(e,t,0,1),M(s)&&e.set("draw",o=>{let n=this.getPrivate("startAngle",0)*Ge,l=this.getPrivate("endAngle",0)*Ge;o.arc(0,0,Math.max(0,s),Math.min(n,l),Math.max(n,l))})}}_handleOpposite(){}positionToPoint(e){let t=this.getPrivate("innerRadius",0),i=this.positionToCoordinate(e)+t,r=this.get("axisAngle",0);return{x:i*ge(r),y:i*de(r)}}updateLabel(e,t,i,r){if(e){M(t)||(t=0);let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),M(i)&&i!=t&&(t=t+(i-t)*s);let o=this.positionToPoint(t),n=Math.hypot(o.x,o.y);e.setPrivate("radius",n),e.setPrivate("innerRadius",n),e.set("labelAngle",this.get("axisAngle")),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}fillDrawMethod(e,t,i){e.set("draw",r=>{t=Math.max(0,t),i=Math.max(0,i),this._fillGenerator.context(r);let s=(this.getPrivate("startAngle",0)+90)*Ge,o=(this.getPrivate("endAngle",0)+90)*Ge;o<s&&([s,o]=[o,s]),this._fillGenerator({innerRadius:t,outerRadius:i,startAngle:s,endAngle:o})})}updateTick(e,t,i,r){if(e){M(t)||(t=0);let s=.5;M(r)&&r>1?s=e.get("multiLocation",s):s=e.get("location",s),M(i)&&i!=t&&(t=t+(i-t)*s);let o=this.positionToPoint(t);e.set("x",o.x),e.set("y",o.y);let n=e.get("length",0);e.get("inside")&&(n*=-1);let h=this.get("axisAngle",0)+90;e.set("draw",u=>{u.moveTo(0,0),u.lineTo(n*ge(h),n*de(h))}),this.toggleVisibility(e,t,e.get("minPosition",0),e.get("maxPosition",1))}}updateBullet(e,t,i){if(e){let r=e.get("sprite");if(r){M(t)||(t=0);let s=e.get("location",.5);M(i)&&i!=t&&(t=t+(i-t)*s);let o=this.positionToPoint(t);r.setAll({x:o.x,y:o.y}),this.toggleVisibility(r,t,0,1)}}}updateFill(e,t,i){if(e){M(t)||(t=0),M(i)||(i=1);let r=this.getPrivate("innerRadius",0),s=this.positionToCoordinate(t)+r,o=this.positionToCoordinate(i)+r;this.fillDrawMethod(e,s,o)}}axisLength(){return this.getPrivate("radius",0)-this.getPrivate("innerRadius",0)}updateTooltipBounds(e){}positionToCoordinate(e){return this._inversed?(e=Math.min(this._end,e),(this._end-e)*this._axisLength):(e=Math.max(this._start,e),(e-this._start)*this._axisLength)}positionTooltip(e,t){let i=this.getPrivate("innerRadius",0)+this.positionToCoordinate(t),r=this.get("axisAngle",0);this._positionTooltip(e,{x:i*ge(r),y:i*de(r)})}};Gl.className="AxisRendererRadial";Gl.classNames=Ui.classNames.concat([Gl.className]);var Ul=class extends ot{constructor(){super(...arguments),this.hand=this.children.push(kt.new(this._root,{themeTags:["hand"]})),this.pin=this.children.push(kt.new(this._root,{themeTags:["pin"]}))}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["clock"]),super._afterNew(),this.set("width",Jt(1)),this.adapters.add("x",()=>0),this.adapters.add("y",()=>0),this.pin.set("draw",(e,t)=>{let i=t.parent;if(i){let r=i.dataItem;if(r){let s=r.component;if(s){let o=s.chart;if(o){let n=o.getPrivate("radius",0),l=Ht(i.get("pinRadius",0),n);l<0&&(l=n+l),e.moveTo(l,0),e.arc(0,0,l,0,360)}}}}}),this.hand.set("draw",(e,t)=>{let i=t.parent;if(i){let r=i.parent;r&&r.set("width",Jt(1));let s=i.dataItem;if(s){let o=s.component;if(o){let n=o.chart;if(n){let l=i.get("bottomWidth",10)/2,h=i.get("topWidth",0)/2,u=n.getPrivate("radius",0),p=Ht(i.get("radius",0),u);p<0&&(p=u+p);let d=i.get("innerRadius",0);d instanceof St?d=Ht(d,u):d<0&&d<0&&(d=p+d),e.moveTo(d,-l),e.lineTo(p,-h),e.lineTo(p,h),e.lineTo(d,l),e.lineTo(d,-l)}}}}})}_prepareChildren(){super._prepareChildren(),this.hand._markDirtyKey("fill"),this.pin._markDirtyKey("fill")}};Ul.className="ClockHand";Ul.classNames=ot.classNames.concat([Ul.className]);var uc=class extends Rr{setupDefaultRules(){super.setupDefaultRules();let e=this.rule.bind(this),t=this._root.interfaceColors;e("RadarChart").setAll({radius:Jt(80),innerRadius:0,startAngle:-90,endAngle:270}),e("RadarColumnSeries").setAll({clustered:!0}),e("Slice",["radar","column","series"]).setAll({width:Jt(80),height:Jt(80)}),e("RadarLineSeries").setAll({connectEnds:!0}),e("SmoothedRadarLineSeries").setAll({tension:.5}),e("AxisRendererRadial").setAll({minGridDistance:40,axisAngle:-90,inversed:!1,cellStartLocation:0,cellEndLocation:1}),e("AxisRendererCircular").setAll({minGridDistance:100,inversed:!1,cellStartLocation:0,cellEndLocation:1}),e("RadialLabel",["circular"]).setAll({textType:"circular",paddingTop:1,paddingRight:0,paddingBottom:1,paddingLeft:0,centerX:0,centerY:0,radius:8}),e("AxisLabelRadial",["category"]).setAll({text:"{category}",populateText:!0}),e("RadialLabel",["radial"]).setAll({textType:"regular",centerX:0,textAlign:"right"}),e("RadarChart",["gauge"]).setAll({startAngle:180,endAngle:360,innerRadius:Jt(90)}),e("ClockHand").setAll({topWidth:1,bottomWidth:10,radius:Jt(90),pinRadius:10});{let i=e("Graphics",["clock","hand"]);i.setAll({fillOpacity:1}),lt(i,"fill",t,"alternativeBackground")}{let i=e("Graphics",["clock","pin"]);i.setAll({fillOpacity:1}),lt(i,"fill",t,"alternativeBackground")}}};var Kl=class extends Si{constructor(){super(...arguments),this.radarContainer=this.plotContainer.children.push(ot.new(this._root,{x:pt,y:pt})),this._arcGenerator=Ts(),this._maxRadius=1}_afterNew(){this._defaultThemes.push(uc.new(this._root)),super._afterNew();let e=this.radarContainer,t=this.gridContainer,i=this.topGridContainer,r=this.seriesContainer,s=this.bulletsContainer;e.children.pushAll([t,r,i,s]),r.set("mask",kt.new(this._root,{})),t.set("mask",kt.new(this._root,{})),this._disposers.push(this.plotContainer.events.on("boundschanged",()=>{this._updateRadius()}))}_maskGrid(){}_prepareChildren(){if(super._prepareChildren(),this._sizeDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")){let e=this.chartContainer,t=e.innerWidth(),i=e.innerHeight(),r=this.get("startAngle",0),s=this.get("endAngle",0),o=this.get("innerRadius"),n=fo(0,0,r,s,1),l=t/(n.right-n.left),h=i/(n.bottom-n.top),u={left:0,right:0,top:0,bottom:0};if(o instanceof St){let d=o.value,c=Math.min(l,h);d=Math.max(c*d,c-Math.min(i,t))/c,u=fo(0,0,r,s,d),this.setPrivateRaw("irModifyer",d/o.value)}n=Id([n,u]),this._maxRadius=Math.max(0,Math.min(l,h));let p=Ht(this.get("radius",0),this._maxRadius);this.radarContainer.setAll({dy:-p*(n.bottom+n.top)/2,dx:-p*(n.right+n.left)/2}),this._updateRadius()}}_addCursor(e){this.radarContainer.children.push(e)}_updateRadius(){let e=Ht(this.get("radius",Jt(80)),this._maxRadius);this.setPrivateRaw("radius",e);let t=Ht(this.get("innerRadius",0),e);t<0&&(t=e+t),this.setPrivateRaw("innerRadius",t),this.xAxes.each(r=>{r.get("renderer").updateLayout()}),this.yAxes.each(r=>{r.get("renderer").updateLayout()}),this._updateMask(this.seriesContainer,t,e),this._updateMask(this.gridContainer,t,e),this.series.each(r=>{r.get("maskBullets")?this._updateMask(r.bulletsContainer,t,e):r.bulletsContainer.remove("mask")});let i=this.get("cursor");i&&i.updateLayout()}_updateMask(e,t,i){let r=e.get("mask");r&&r.set("draw",s=>{this._arcGenerator.context(s),this._arcGenerator({innerRadius:t,outerRadius:i+.5,startAngle:(this.get("startAngle",0)+90)*Ge,endAngle:(this.get("endAngle",0)+90)*Ge})})}processAxis(e){this.radarContainer.children.push(e)}_processSeries(e){super._processSeries(e),this._updateRadius()}inPlot(e,t,i){let r=Math.hypot(e.x,e.y),s=ar(Math.atan2(e.y,e.x)*Or),o=ar(this.get("startAngle",0)),n=ar(this.get("endAngle",0)),l=!1;return o<n&&o<s&&s<n&&(l=!0),o>n&&(s>o&&(l=!0),s<n&&(l=!0)),o==n&&(l=!0),l?(t==null&&(t=this.getPrivate("radius",0)),i==null&&(i=this.getPrivate("innerRadius",0)),i>t&&([i,t]=[t,i]),r<=t+.5&&r>=i-.5):!1}_tooltipToLocal(e){return this.radarContainer._display.toLocal(e)}_handlePinch(){}};Kl.className="RadarChart";Kl.classNames=Si.classNames.concat([Kl.className]);var Fa=class extends ks{constructor(){super(...arguments),this._fillGenerator=Ts()}_afterNew(){this._settings.themeTags=xt(this._settings.themeTags,["radar","cursor"]),super._afterNew()}_handleXLine(){}_handleYLine(){}_getPosition(e){let t=Math.hypot(e.x,e.y),i=ar(Math.atan2(e.y,e.x)*Or),r=this.getPrivate("innerRadius"),s=ar(this.getPrivate("startAngle")),o=ar(this.getPrivate("endAngle"));(o<s||o==s)&&(i<s&&(i+=360),o=o+360);let n=(i-s)/(o-s);return n<0&&(n=1+n),n<.003&&(n=0),n>.997&&(n=1),{x:n,y:(t-r)/(this.getPrivate("radius")-r)}}_getPoint(e,t){let i=this.getPrivate("innerRadius"),r=this.getPrivate("startAngle"),s=this.getPrivate("endAngle"),o=this.getPrivate("radius"),n=r+e*(s-r),l=i+(o-i)*t;return{x:l*ge(n),y:l*de(n)}}updateLayout(){let e=this.chart;if(e){let t=e.getPrivate("radius",0);this.setPrivate("radius",Ht(this.get("radius",X),t));let i=Ht(this.get("innerRadius",e.getPrivate("innerRadius",0)),t);i<0&&(i=t+i),this.setPrivate("innerRadius",i);let r=this.get("startAngle",e.get("startAngle",-90)),s=this.get("endAngle",e.get("endAngle",270));this.setPrivate("startAngle",r),this.setPrivate("endAngle",s)}}_updateLines(e,t){this._tooltipX||this._drawXLine(e,t),this._tooltipY||this._drawYLine(e,t)}_drawXLine(e,t){let i=this.getPrivate("innerRadius"),r=this.getPrivate("radius"),s=Math.atan2(t,e);this.lineX.set("draw",o=>{o.moveTo(i*Math.cos(s),i*Math.sin(s)),o.lineTo(r*Math.cos(s),r*Math.sin(s))})}_drawYLine(e,t){let i=Math.hypot(e,t);this.lineY.set("draw",r=>{r.arc(0,0,i,this.getPrivate("startAngle",0)*Ge,this.getPrivate("endAngle",0)*Ge)})}_updateXLine(e){let t=e.get("pointTo");t&&(t=this._display.toLocal(t),this._drawXLine(t.x,t.y))}_updateYLine(e){let t=e.get("pointTo");t&&(t=this._display.toLocal(t),this._drawYLine(t.x,t.y))}_inPlot(e){let t=this.chart;return t?t.inPlot(e,this.getPrivate("radius"),this.getPrivate("innerRadius")):!1}_updateSelection(e){this.selection.set("draw",t=>{let i=this.get("behavior"),r=this._downPoint,s=this.getPrivate("startAngle"),o=this.getPrivate("endAngle"),n=this.getPrivate("radius"),l=this.getPrivate("innerRadius");n<l&&([n,l]=[l,n]);let h=s,u=o,p=n,d=l;r&&(i=="zoomXY"||i=="selectXY"?(h=Math.atan2(r.y,r.x)*Or,u=Math.atan2(e.y,e.x)*Or,d=Math.hypot(r.x,r.y),p=Math.hypot(e.x,e.y)):i=="zoomX"||i=="selectX"?(h=Math.atan2(r.y,r.x)*Or,u=Math.atan2(e.y,e.x)*Or):(i=="zoomY"||i=="selectY")&&(d=Math.hypot(r.x,r.y),p=Math.hypot(e.x,e.y))),d=Se(d,l,n),p=Se(p,l,n),h=pg(h,s,o),u=pg(u,s,o),h==u&&(u=h+360),h*=Ge,u*=Ge,this._fillGenerator.context(t),this._fillGenerator({innerRadius:d,outerRadius:p,startAngle:h+Math.PI/2,endAngle:u+Math.PI/2})})}};Fa.className="RadarCursor";Fa.classNames=ks.classNames.concat([Fa.className]);var ql=class extends Te{_afterNew(){super._afterNew(),this.set("maskContent",!1),this.bulletsContainer.set("maskContent",!1),this.bulletsContainer.set("mask",kt.new(this._root,{}))}_handleMaskBullets(){}getPoint(e,t){let i=this.get("yAxis"),r=this.get("xAxis"),s=i.get("renderer"),o=s.positionToCoordinate(t)+s.getPrivate("innerRadius",0),l=r.get("renderer").positionToAngle(e);return{x:o*ge(l),y:o*de(l)}}_endLine(e,t){this.get("connectEnds")&&t&&e.push(t)}_shouldInclude(e){let t=this.get("xAxis");return!(e<t.get("start")||e>t.get("end"))}_shouldShowBullet(e,t){let i=this.get("xAxis");return e<i.get("start")||e>i.get("end")?!1:this._showBullets}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem,r=e.get("locationX",i.get("locationX",.5)),s=e.get("locationY",i.get("locationY",.5)),o=this.get("xAxis"),n=this.get("yAxis"),l=o.getDataItemPositionX(i,this._xField,r,this.get("vcx",1)),h=n.getDataItemPositionY(i,this._yField,s,this.get("vcy",1)),u=this.getPoint(l,h);this._shouldShowBullet(l,h)?(t.setPrivate("visible",!0),t.set("x",u.x),t.set("y",u.y)):t.setPrivate("visible",!1)}}};ql.className="RadarLineSeries";ql.classNames=Te.classNames.concat([ql.className]);var iy;function J$(){return ut(this,void 0,void 0,function*(){let a=yield Promise.all([import("./YAVQSNZ6.js"),import("./BQOMKKBK.js")]),e=a[0].default,t=a[1].default,i=window;return i.pdfMake=i.pdfMake||{},i.pdfMake.vfs=t,e.vfs=t,e})}var ko=class extends le{_afterNew(){super._afterNew(),this._setRawDefault("filePrefix","chart"),this._setRawDefault("charset","utf-8"),this._setRawDefault("numericFields",[]),this._setRawDefault("dateFields",[]),this._setRawDefault("durationFields",[]),this._setRawDefault("extraImages",[]),this._setRawDefault("pngOptions",{quality:1,maintainPixelRatio:!1}),this._setRawDefault("jpgOptions",{quality:.8,maintainPixelRatio:!1}),this._setRawDefault("printOptions",{quality:1,maintainPixelRatio:!1,delay:500,printMethod:"iframe",imageFormat:"png"}),this._setRawDefault("jsonOptions",{indent:2,renameFields:!0}),this._setRawDefault("csvOptions",{separator:",",addColumnNames:!0,emptyAs:"",addBOM:!0}),this._setRawDefault("htmlOptions",{emptyAs:"-",addColumnNames:!0}),this._setRawDefault("xlsxOptions",{emptyAs:"",addColumnNames:!0}),this._setRawDefault("pdfOptions",{fontSize:14,imageFormat:"png",align:"left",addURL:!0}),this._setRawDefault("pdfdataOptions",{emptyAs:"",addColumnNames:!0}),this._root.addDisposer(this)}_beforeChanged(){if(super._beforeChanged(),this.isDirty("menu")){let e=this.get("menu");e&&(e.set("exporting",this),this._disposers.push(e))}}_getFormatOptions(e,t){let i=ss(this.get(e+"Options",{}));return t&&Vt(t,(r,s)=>{i[r]=s}),i}download(e,t){return ut(this,void 0,void 0,function*(){let i=e=="pdfdata"?"pdf":e,r=this.get("filePrefix","chart")+"."+i,s=this._getFormatOptions(e,t);this.events.dispatch("downloadstarted",{type:"downloadstarted",format:e,options:s,fileName:r,target:this});let o=yield this.export(e,s);this.streamFile(o,r,s&&s.addBOM)})}print(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("print",e);this.events.dispatch("printstarted",{type:"printstarted",format:"print",options:t,target:this});let i=yield this.export(t.imageFormat||"png",t);this.initiatePrint(i,t,this.get("title"))})}export(e,t){return ut(this,void 0,void 0,function*(){let i=this._getFormatOptions(e,t);this.events.dispatch("exportstarted",{type:"exportstarted",format:e,options:i,target:this});let r="";switch(e){case"png":case"jpg":this._root._runTickerNow(),r=this.exportImage(e,i);break;case"json":r=this.exportJSON(i);break;case"csv":r=this.exportCSV(i);break;case"html":r=this.exportHTML(i);break;case"xlsx":r=this.exportXLSX(i);break;case"pdf":this._root._runTickerNow(),r=this.exportPDF(i);break;case"pdfdata":r=this.exportPDFData(i);break}return this.events.dispatch("exportfinished",{type:"exportfinished",format:e,options:i,target:this}),r})}exportImage(e,t){return ut(this,void 0,void 0,function*(){let i=this._getFormatOptions(e,t),r=yield this.getCanvas(i),s=r.toDataURL(this.getContentType(e),i.quality||1);return this.disposeCanvas(r),s})}exportCanvas(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("canvas",e),i=yield this.getCanvas(t),r=i.toDataURL(this.getContentType("canvas"),t.quality||1);return this.disposeCanvas(i),r})}getCanvas(e){return ut(this,void 0,void 0,function*(){let t=this._root._renderer.getCanvas(this._root._rootContainer._display,e),i=this.get("extraImages",[]),r=0,s=0,o=t.width,n=t.height,l=0,h=0,u=[];F(i,x=>{let _;x instanceof Au?_={source:x,position:"bottom"}:_=x,_.position=_.position||"bottom",_.marginTop=_.marginTop||0,_.marginRight=_.marginRight||0,_.marginBottom=_.marginBottom||0,_.marginLeft=_.marginLeft||0;let $=_.source._renderer.getCanvas(_.source._rootContainer._display,e),T=$.width+_.marginLeft+_.marginRight,S=$.height+_.marginTop+_.marginBottom;_.position=="top"?(o=_.crop?n:Math.max(o,T),s+=S):_.position=="right"?(n=_.crop?n:Math.max(n,S),l+=T):_.position=="left"?(n=_.crop?n:Math.max(n,S),r+=T):_.position==="bottom"&&(o=_.crop?n:Math.max(o,T),h+=S),u.push({canvas:$,position:_.position,left:_.marginLeft,top:_.marginTop,width:T,height:S})});let p=this.getDisposableCanvas();p.width=r+o+l,p.height=s+n+h;let d=p.getContext("2d"),c=this.get("backgroundColor",this.findBackgroundColor(this._root.dom)),f=this.get("backgroundOpacity",1);c&&(d.fillStyle=c.toCSS(f),d.fillRect(0,0,p.width,p.height));let g=r,m=s,y=g+o,v=m+n;return F(u,x=>{x.position=="top"?(m-=x.height,d.drawImage(x.canvas,r+x.left,m+x.top)):x.position=="right"?(d.drawImage(x.canvas,y+x.left,s+x.top),y+=x.width):x.position=="left"?(g-=x.width,d.drawImage(x.canvas,g+x.left,s+x.top)):x.position==="bottom"&&(d.drawImage(x.canvas,r+x.left,v+x.top),v+=x.height)}),d.drawImage(t,r,s),p})}exportJSON(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("json")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getJSON(e))})}getJSON(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("json",e);return JSON.stringify(this.getData("json",e,t.renameFields),(i,r)=>(is(r)&&Vt(r,(s,o)=>{r[s]=this.convertToSpecialFormat(s,o,t)}),r),t.indent)})}exportCSV(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("csv")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getCSV(e))})}getCSV(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("csv",e),i="",r="",s=this.getData("csv",t),o=this.getDataFields(s);if(t.pivot){let n=this.get("dataFieldsOrder",[]);Pa(o,(l,h)=>{let u=[];t.addColumnNames&&u.push(h);for(let p=s.length,d=0;d<p;d++){let c=s[d][l];u.push(this.convertToSpecialFormat(l,c,t,!0))}i+=r+this.getCSVRow(u,t,void 0,!0),r=`
26
+ `},(l,h)=>{let u=n.indexOf(l),p=n.indexOf(h);return u>p?-1:u<p?1:0})}else{for(let n=s.length,l=0;l<n;l++){let h=this.getCSVRow(s[l],t,o);t.reverse?i=h+r+i:i+=r+h,r=`
27
+ `}t.addColumnNames&&(i=this.getCSVRow(o,t,void 0,!0)+r+i)}return i})}getCSVRow(e,t,i,r=!1){let s=t.separator||",",o=[];i||(i={},Vt(e,(l,h)=>{i[l]=h}));let n=this.get("dataFieldsOrder",[]);return Pa(i,(l,h)=>{let u=this.convertEmptyValue(l,e[l],t),p=r?u:this.convertToSpecialFormat(l,u,t);p=""+p,p=p.replace(/"/g,'""'),(t.forceQuotes||p.search(new RegExp(`"|
28
+ |`+s,"g"))>=0)&&(p='"'+p+'"'),o.push(p)},(l,h)=>{let u=n.indexOf(l),p=n.indexOf(h);return u>p?1:u<p?-1:0}),o.join(s)}exportHTML(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("html")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getHTML(e))})}getHTML(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("html",e),i="<table>";t.tableClass&&(i='<table class="'+t.tableClass+'">');let r=this.getData("html",t),s=this.getDataFields(r);if(t.pivot){let o=this.get("dataFieldsOrder",[]);i+=`
29
+ <tbody>`,Pa(s,(n,l)=>{let h=[];t.addColumnNames&&h.push(l);for(let u=r.length,p=0;p<u;p++){let d=r[p][n];h.push(this.convertToSpecialFormat(n,d,t,!0))}i+=`
30
+ `+this.getHTMLRow(h,t,void 0,!0)},(n,l)=>{let h=o.indexOf(n),u=o.indexOf(l);return h>u?-1:h<u?1:0}),i+=`
31
+ </tbody>`}else{t.addColumnNames&&(i+=`
32
+ <thead>
33
+ `+this.getHTMLRow(s,t,void 0,!0,!0)+`
34
+ </thead>`),i+=`
35
+ <tbody>`;for(let o=r.length,n=0;n<o;n++)i+=`
36
+ `+this.getHTMLRow(r[n],t,s);i+=`
37
+ </tbody>`}return i+=`
38
+ </table>`,i})}getHTMLRow(e,t,i,r=!1,s=!1){let o=" <tr>";t.rowClass&&(o=' <tr class="'+t.rowClass+'">'),i||(i=e);let n=this.get("dataFieldsOrder",[]),l=s?"th":"td",h=!0;return Pa(i,(u,p)=>{let d=this.convertEmptyValue(u,e[u],t),c=r?d:this.convertToSpecialFormat(u,d,t);c=""+c,c=c.replace(/[\u00A0-\u9999<>\&]/gim,function(g){return"&#"+g.charCodeAt(0)+";"});let f=l;t.pivot&&h&&(f="th"),t.cellClass?o+=`
39
+ <`+f+' class="'+t.cellClass+'">'+c+"</"+f+">":o+=`
40
+ <`+f+">"+c+"</"+f+">",h=!1},(u,p)=>{let d=n.indexOf(u),c=n.indexOf(p);return d>c?1:d<c?-1:0}),o+=`
41
+ </tr>`,o}exportXLSX(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("xlsx")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getXLSX(e))})}getXLSX(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("xlsx",e),i=yield this.getXLSXLib(),r={bookType:"xlsx",bookSST:!1,type:"base64"},s=this._normalizeExcelSheetName(this.get("title",this._t("Data"))),o={SheetNames:[s],Sheets:{}},n=[],l=this.getData("html",t),h=this.getDataFields(l);if(t.pivot){let u=this.get("dataFieldsOrder",[]);Pa(h,(p,d)=>{let c=[];t.addColumnNames&&c.push(d);for(let f=l.length,g=0;g<f;g++){let m=l[g][p];c.push(this.convertToSpecialFormat(p,m,t,!0))}n.push(this.getXLSXRow(c,t,void 0,!0))},(p,d)=>{let c=u.indexOf(p),f=u.indexOf(d);return c>f?1:c<f?-1:0})}else{t.addColumnNames&&n.push(this.getXLSXRow(h,t,void 0,!0));for(let u=l.length,p=0;p<u;p++)n.push(this.getXLSXRow(l[p],t,h))}return o.Sheets[s]=i.utils.aoa_to_sheet(n),this.events.dispatch("workbookready",{type:"workbookready",format:"xlsx",options:t,workbook:o,workbookOptions:r,xlsx:i,target:this}),i.write(o,r)})}_normalizeExcelSheetName(e){return e=e.replace(/([:\\\/?*\[\]]+)/g," "),e.length>30?e.substr(0,30)+"...":e}getXLSXRow(e,t,i,r=!1){let s=[];i||(i=e);let o=this.get("dataFieldsOrder",[]);return Pa(i,(n,l)=>{let h=this.convertEmptyValue(n,e[n],t),u=r?h:this.convertToSpecialFormat(n,h,t,!0);s.push(u)},(n,l)=>{let h=o.indexOf(n),u=o.indexOf(l);return h>u?1:h<u?-1:0}),s}_xlsx(){return ut(this,void 0,void 0,function*(){return yield import("./KBDOBMB5.js")})}getXLSXLib(){return this._xlsx()}exportPDF(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(e,!0))})}exportPDFData(e){return ut(this,void 0,void 0,function*(){return"data:"+this.getContentType("pdf")+";"+this.get("charset","utf-8")+","+encodeURIComponent(yield this.getPDF(e,!1,!0))})}getPDF(e,t=!0,i=!1){return ut(this,void 0,void 0,function*(){let r=this._getFormatOptions("pdf",e),s=this._getFormatOptions("pdfdata",e),o=r.pageOrientation||"portrait",n,l={width:0,height:0};if(t){let y=r.imageFormat||"png",v=this._getFormatOptions(y,r),x=yield this.getCanvas(v);l.width=x.clientWidth,l.height=x.clientHeight,n=x.toDataURL(this.getContentType(y),r.quality||1),this.disposeCanvas(x)}let h=yield this.getPdfmake(),u=[30,30,30,30],p={pageSize:r.pageSize||"A4",pageOrientation:o,pageMargins:r.pageMargins||u,defaultStyle:{font:r.font?r.font.name:void 0},content:[]},d=this.get("title"),c=0;if(d&&(p.content.push({text:d,fontSize:r.fontSize||14,bold:!0,margin:[0,0,0,15]}),c+=50),r.addURL&&(p.content.push({text:this._t("Saved from")+": "+document.location.href,fontSize:r.fontSize,margin:[0,0,0,15]}),c+=50),t&&n){let y=this.getPageSizeFit(p.pageSize,p.pageMargins,c,o);l.width>y[0]||l.height>y[1]?p.content.push({image:n,alignment:r.align||"left",fit:y}):p.content.push({image:n,alignment:r.align||"left"})}(i||r.includeData)&&this.hasData()&&p.content.push({table:yield this.getPDFData(s),fontSize:r.fontSize||14});let f=null,g=null;function m(y){let v={};v.normal=y.normal.path,g[y.normal.path]=y.normal.bytes,y.bold?(v.bold=y.bold.path,g[y.bold.path]=y.bold.bytes):v.bold=y.normal.path,y.italics?(v.italics=y.italics.path,g[y.italics.path]=y.italics.bytes):v.italics=y.normal.path,y.bolditalics?(v.bolditalics=y.bolditalics.path,g[y.bolditalics.path]=y.bolditalics.bytes):v.bolditalics=y.normal.path,f[y.name]=v}return r.font&&(f={},g={},m(r.font),r.extraFonts&&F(r.extraFonts,m)),this.events.dispatch("pdfdocready",{type:"pdfdocready",format:"pdf",options:r,doc:p,target:this}),new Promise((y,v)=>{h.createPdf(p,null,f,g).getBase64(x=>{y(x)})})})}getPDFData(e){return ut(this,void 0,void 0,function*(){let t=this._getFormatOptions("pdfdata",e),i={body:[]},r=this.getData("html",t),s=this.getDataFields(r);if(t.pivot){let o=this.get("dataFieldsOrder",[]);Pa(s,(n,l)=>{let h=[];t.addColumnNames&&h.push(l);for(let u=r.length,p=0;p<u;p++){let d=r[p][n];h.push(this.convertToSpecialFormat(n,d,t,!0))}i.body.push(this.getPDFDataRow(h,t,void 0,!0))},(n,l)=>{let h=o.indexOf(n),u=o.indexOf(l);return h>u?1:h<u?-1:0})}else{t.addColumnNames&&(i.body.push(this.getPDFDataRow(s,t,void 0,!0)),i.headerRows=1);for(let o=r.length,n=0;n<o;n++)i.body.push(this.getPDFDataRow(r[n],t,s))}return i})}getPDFDataRow(e,t,i,r=!1){let s=[];i||(i=e);let o=this.get("dataFieldsOrder",[]);return Pa(i,(n,l)=>{let h=this.convertEmptyValue(n,e[n],t),u=r?h:this.convertToSpecialFormat(n,h,t);u=""+u,s.push(u)},(n,l)=>{let h=o.indexOf(n),u=o.indexOf(l);return h>u?1:h<u?-1:0}),s}getPdfmake(){return iy===void 0&&(iy=J$()),iy}getPageSizeFit(e,t,i=0,r="portrait"){let s=[0,0,0,0];M(t)?s=[t,t,t,t]:t.length==2?s=[t[0],t[1],t[0],t[1]]:t.length==4&&(s=t);let n={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}[e];return r=="landscape"&&n.reverse(),n[0]-=s[0]+s[2],n[1]-=s[1]+s[3]+i,n}hasData(){let e=this.get("dataSource");return!!(Cd(e)&&e.length)}getData(e,t,i=!1){let r=this._getFormatOptions(e,t),s=this.get("dataSource",[]),o=s,n=this.get("dataFields");n&&Cd(s)&&(o=[],F(s,h=>{if(is(h)){let u={};Vt(n,(p,d)=>{n[p]!=null&&(u[i?d:p]=this.convertToSpecialFormat(p,h[p],r))}),o.push(u)}}));let l={type:"dataprocessed",format:e,options:r,data:o,target:this};return this.events.dispatch("dataprocessed",l),l.data}getDataFields(e){let t=this.get("dataFields");return t||(t={},Cd(e)&&e.length&&F(e,i=>{Vt(i,(r,s)=>{t[r]==null&&(t[r]=r)})})),t}convertEmptyValue(e,t,i){return t??i.emptyAs}convertToSpecialFormat(e,t,i,r){if(typeof t=="number")if(this.isDateField(e))t=new Date(t);else{if(this.isNumericField(e)&&this.get("numberFormat"))return this._root.numberFormatter.format(t,this.get("numberFormat"));if(this.isDurationField(e))return this._root.durationFormatter.format(t,this.get("durationFormat"),this.get("durationUnit"))}return t instanceof Date&&(i.useTimestamps?t=t.getTime():i.useLocale?r||(t=t.toLocaleString()):t=this._root.dateFormatter.format(t,this.get("dateFormat"))),t}isDateField(e){return this.get("dateFields").indexOf(e)!==-1}isNumericField(e){return this.get("numericFields").indexOf(e)!==-1}isDurationField(e){return this.get("durationFields").indexOf(e)!==-1}getContentType(e){let t="";switch(e){case"png":t="image/"+e;break;case"jpg":t="image/jpeg";break;case"csv":t="text/csv";break;case"json":t="application/json";break;case"html":t="text/html";break;case"pdf":case"pdfdata":t="application/pdf";break;case"xlsx":t="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;default:t="application/octet-stream"}return t}getDisposableCanvas(){let e=document.createElement("canvas");return e.style.position="fixed",e.style.top="-10000px",this._root.dom.appendChild(e),e}disposeCanvas(e){this._root.dom.removeChild(e)}findBackgroundColor(e){let t=1,i=getComputedStyle(e,"background-color").getPropertyValue("background-color");if((i.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||i=="transparent")&&(t=0),t==0){let r=e.parentElement;return r?this.findBackgroundColor(r):yt.fromHex(16777215)}else return yt.fromCSS(i)}streamFile(e,t,i=!1){if(this.blobDownloadSupport()){let r=document.createElement("a");r.download=t,document.body.appendChild(r);let s=e.split(";"),o=s.shift().replace(/data:/,"");if(e=decodeURIComponent(s.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(o)==-1)try{e=atob(e)}catch{return!1}else{i&&(e="\uFEFF"+e);let u=new Blob([e],{type:o}),p=window.URL.createObjectURL(u);return r.href=p,r.download=t,r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(p)},100),!0}let n=new Array(e.length);for(let u=0;u<e.length;++u){let p=e.charCodeAt(u);n[u]=p}i&&(n=[239,187,191].concat(n));let l=new Blob([new Uint8Array(n)],{type:o}),h=window.URL.createObjectURL(l);r.href=h,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),setTimeout(()=>{window.URL.revokeObjectURL(h)},100)}else if(this.linkDownloadSupport()){let r=document.createElement("a");r.download=t,r.href=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}else window.location.href=e;return!0}downloadSupport(){return this.linkDownloadSupport()}linkDownloadSupport(){return typeof document.createElement("a").download<"u"}blobDownloadSupport(){return window.Blob!=null}initiatePrint(e,t,i){let r=this._getFormatOptions("print",t);r.printMethod=="css"?this._printViaCSS(e,r,i):this._printViaIframe(e,r,i)}_printViaCSS(e,t,i){let s=this._getFormatOptions("print",t).delay||500,o=document.documentElement.scrollTop||document.body.scrollTop,n=new mu(Qm(this._root.dom),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"},this._root.nonce),l=new mu(Qm(this._root.dom),"body",{padding:"0",margin:"0"},this._root.nonce),h;i&&document&&document.title&&(h=document.title,document.title=i);let u=new Image;u.src=e,u.style.maxWidth="100%",u.style.display="block",u.style.position="relative",u.style.visibility="visible",u.style.opacity="1",u.style.clipPath="none",document.body.appendChild(u),this.setTimeout(()=>{window.print()},50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(u),n.dispose(),l.dispose(),h&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=o},s||500)}_printViaIframe(e,t,i){let s=this._getFormatOptions("print",t).delay||500,o=document.createElement("iframe");o.style.visibility="hidden",document.body.appendChild(o),o.contentWindow.document.open(),o.contentWindow.document.close();let n=new Image;n.src=e,n.style.maxWidth="100%",n.style.height="auto",i&&(o.contentWindow.document.title=i),o.contentWindow.document.body.appendChild(n),o.load=function(){o.contentWindow.document.body.appendChild(n)},this.setTimeout(()=>{try{o.contentWindow.document.execCommand("print",!1,null)||o.contentWindow.print()}catch{o.contentWindow.print()}},s||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&s<1e3?s=1e3:s<100&&(s=100),this.setTimeout(()=>{document.body.removeChild(o)},s+50||100)}supportedFormats(){let e=[],t=this.hasData(),i=this.downloadSupport();return F(["png","jpg","canvas","pdf","xlsx","csv","json","html","pdfdata","print"],r=>{this._getFormatOptions(r).disabled!==!0&&(["xlsx","csv","json","html","pdfdata"].indexOf(r)==-1||t&&i)&&e.push(r)}),e}supportedExportTypes(){let e=["image","print"];return this.downloadSupport()&&this.hasData()&&e.push("data"),e}};ko.className="Exporting";ko.classNames=le.classNames.concat([ko.className]);var pc=class extends Rr{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}};var y_=pc;var Ls=class a extends Rr{constructor(e,t){super(e,t),this.responsiveRules=[],this._dp=new qe([this._root._rootContainer.onPrivate("width",i=>{this._isUsed()&&this._maybeApplyRules()}),this._root._rootContainer.onPrivate("height",i=>{this._isUsed()&&this._maybeApplyRules()})])}static widthXXS(e,t){return e<=a.XXS}static widthXS(e,t){return e<=a.XS}static widthS(e,t){return e<=a.S}static widthM(e,t){return e<=a.M}static widthL(e,t){return e<=a.L}static widthXL(e,t){return e<=a.XL}static widthXXL(e,t){return e<=a.XXL}static heightXXS(e,t){return t<=a.XXS}static heightXS(e,t){return t<=a.XS}static heightS(e,t){return t<=a.S}static heightM(e,t){return t<=a.M}static heightL(e,t){return t<=a.L}static heightXL(e,t){return t<=a.XL}static heightXXL(e,t){return t<=a.XXL}static isXXS(e,t){return e<=a.XXS&&t<=a.XXS}static isXS(e,t){return e<=a.XS&&t<=a.XS}static isS(e,t){return e<=a.S&&t<=a.S}static isM(e,t){return e<=a.M&&t<=a.M}static isL(e,t){return e<=a.L&&t<=a.L}static isXL(e,t){return e<=a.XL&&t<=a.XL}static isXXL(e,t){return e<=a.XXL&&t<=a.XXL}static maybeXXS(e,t){return e<=a.XXS||t<=a.XXS}static maybeXS(e,t){return e<=a.XS||t<=a.XS}static maybeS(e,t){return e<=a.S||t<=a.S}static maybeM(e,t){return e<=a.M||t<=a.M}static maybeL(e,t){return e<=a.L||t<=a.L}static maybeXL(e,t){return e<=a.XL||t<=a.XL}static maybeXXL(e,t){return e<=a.XXL||t<=a.XXL}static newEmpty(e){return new this(e,!0)}addRule(e){return e.name&&!e.template&&(e.template=this.rule(e.name,e.tags)),this.responsiveRules.push(e),this._maybeApplyRule(e),e}removeRule(e){li(this.responsiveRules,e)}dispose(){this._dp&&this._dp.dispose()}_isUsed(){return this._root._rootContainer.get("themes").indexOf(this)!==-1}_maybeApplyRules(){F(this.responsiveRules,e=>{this._maybeUnapplyRule(e)}),F(this.responsiveRules,e=>{this._maybeApplyRule(e)})}_maybeApplyRule(e){if(e.applied)return;let t=this._root._rootContainer.getPrivate("width"),i=this._root._rootContainer.getPrivate("height");e.relevant.call(e,t,i)&&(e.applied=!0,e.template&&e.settings&&e.template.setAll(e.settings),e.applying&&e.applying.call(e))}_maybeUnapplyRule(e){if(!e.applied)return;let t=this._root._rootContainer.getPrivate("width"),i=this._root._rootContainer.getPrivate("height");e.relevant.call(e,t,i)||(e.applied=!1,e.template&&e.template.removeAll(),e.removing&&e.removing.call(e))}setupDefaultRules(){super.setupDefaultRules();let e=t=>this.addRule(t);e({name:"Chart",relevant:a.widthXXS,settings:{paddingLeft:0,paddingRight:0}}),e({name:"Chart",relevant:a.heightXXS,settings:{paddingTop:0,paddingBottom:0}}),e({name:"Bullet",relevant:a.isXS,settings:{forceHidden:!0}}),e({name:"Legend",relevant:a.isXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["vertical"],relevant:a.widthXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["horizontal"],relevant:a.heightXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","start"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","end"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"Button",tags:["resize"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"AxisRendererX",relevant:a.heightXS,settings:{inside:!0}}),e({name:"AxisRendererY",relevant:a.widthXS,settings:{inside:!0}}),e({name:"AxisRendererXLabel",relevant:a.heightXS,settings:{minPosition:.1,maxPosition:.9}}),e({name:"AxisLabel",tags:["y"],relevant:a.widthXS,settings:{centerY:X,maxPosition:.9}}),e({name:"AxisLabel",tags:["x"],relevant:a.heightXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["x","minor"],relevant:a.widthXXL,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y"],relevant:a.widthXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y","minor"],relevant:a.heightXXL,settings:{forceHidden:!0}}),e({name:"AxisTick",tags:["x"],relevant:a.heightXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"AxisTick",tags:["y"],relevant:a.widthXXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"Grid",relevant:a.maybeXXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["radial"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:a.maybeS,settings:{inside:!0}}),e({name:"AxisTick",relevant:a.maybeS,settings:{inside:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"AxisTick",tags:["circular"],relevant:a.maybeXS,settings:{inside:!0}}),e({name:"PieChart",relevant:a.maybeXS,settings:{radius:Jt(99)}}),e({name:"PieChart",relevant:a.widthM,settings:{radius:Jt(99)}}),e({name:"RadialLabel",tags:["pie"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["pie"],relevant:a.widthM,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:a.maybeXS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:a.widthM,settings:{forceHidden:!0}}),e({name:"FunnelSeries",relevant:a.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["funnel","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["funnel","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"PyramidSeries",relevant:a.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pyramid","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pyramid","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"PictorialStackedSeries",relevant:a.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pictorial","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","vertical"],relevant:a.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pictorial","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","horizontal"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","horizontal"],relevant:a.widthS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","vertical"],relevant:a.heightS,settings:{forceHidden:!0}}),e({name:"Chord",relevant:a.maybeXS,settings:{radius:Jt(99)}}),e({name:"Label",tags:["hierarchy","node"],relevant:a.maybeXS,settings:{forceHidden:!0}})}};Ls.XXS=100;Ls.XS=200;Ls.S=300;Ls.M=400;Ls.L=600;Ls.XL=800;Ls.XXL=1e3;var v_=Ls;var gc=new Map;function prt(a){a!==void 0&&gc.delete(a)}function kn(a,e){let t=gc.get(a)??{};gc.set(a,{...t,...e})}function An(a,e){return gc.get(a)?.[e]}function drt(a,e){return An(a,e)}function crt(a,e){kn(a,e)}function frt(a,e){return An(a,e)}function mrt(a,e){kn(a,e)}function grt(a,e){return An(a,e)}function yrt(a,e){kn(a,e)}function vrt(a,e){return An(a,e)}function brt(a,e){kn(a,e)}function xrt(a,e){return An(a,e)}function _rt(a,e){kn(a,e)}function Q$(a,e){return An(a,e)}function Prt(a,e){kn(a,e)}function $rt(a,e){return An(a,e)}function wrt(a,e){kn(a,e)}function sy(a,e){e===!1&&!a.isHiding?(a.visible=!1,a.hide()):a.isShowing||(a.visible=!0,a.show())}function Crt(a,e){for(let t=0;t<e.length;t+=1){let i=e[t][0],r=e[t][1],s=a.length;i>=0&&i<s&&r>=0&&r<s&&a.swap(e[t][0],e[t][1])}}function tw(a,e){let t;if(a!==void 0&&"rgb"in a&&a.rgb!==void 0){let i=a.rgb;if(i!==void 0){let{r,g:s,b:o}=i;t=[r,s,o,255]}}return t}function yc(a){let e=a??[0,0,0,255];return new Dt({a:e[3]/255,b:e[2],g:e[1],r:e[0]})}function Srt(a){return a.bullets.values.find(e=>Q$(e.uid,"isBulletMarker"))}function Trt(a){return a!=null&&!a.isDisposed()}function Drt(a){return(a.isShowing||a.visible)&&!a.isHidden&&!a.isHiding&&!a.disabled&&!a.__disabled}function krt(a,e){return a.pixelX<0||a.pixelX>e?.plotContainer?.measuredWidth||a.pixelY<0||a.pixelY>e?.plotContainer?.measuredHeight}function ew(a){let e;return a.baseSprite instanceof sr||a.baseSprite instanceof kl?e=a.baseSprite:(a instanceof to||a instanceof Cl)&&(e=a.axis.chart),e}function iw(a){return tw(a.background.fill)}var hr={...Et};function rw(a){let{fill:e,rotation:t,isLinePattern:i,chartBackgroundColor:r}=a,s;return i!==!1?(s=new Ml,s.width=hr.patternLineProperties.width??Number.NaN,s.height=hr.patternLineProperties.height??Number.NaN,s.strokeWidth=hr.patternLineProperties.strokeWidth??Number.NaN,s.stroke=e,s.rotation=t??Number.NaN):(s=new Rl,s.rectWidth=hr.patternRectProperties.rectWidth??Number.NaN,s.rectHeight=hr.patternRectProperties.rectHeight??Number.NaN,s.width=hr.patternRectProperties.width??Number.NaN,s.height=hr.patternRectProperties.height??Number.NaN,s.fillOpacity=hr.patternRectProperties.fillOpacity??Number.NaN,s.strokeWidth=hr.patternRectProperties.strokeWidth??Number.NaN,s.fill=yc(r),s.stroke=e,s.rotation=t??Number.NaN),s}function Art(a){let e=Number.NaN;if(typeof a=="number")e=a;else if(a.includes("%")){let t=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(t)&&(e=N(t))}return e}function sw(a){let{fill:e,style:t,chartBackgroundColor:i}=a,r,s,o=!0;switch(t){case Ri.Horizontal:{s=0;break}case Ri.Vertical:{s=90;break}case Ri.ForwardDiagonal:{s=45;break}case Ri.BackwardDiagonal:{s=135;break}case Ri.Cross:{s=0,o=!1;break}case Ri.DiagonalCross:{s=135,o=!1;break}case Ri.Solid:}return s!==void 0&&(r=rw({fill:e,rotation:s,isLinePattern:o,chartBackgroundColor:i})),r}function Ao(a,e){let t;e!==void 0&&(t=yc(e));let i=t??new Dt({r:0,g:0,b:0,a:0});if(a!=null){let[r,s,o,n]=a;i=new Dt({r,g:s,b:o,a:n/255})}return i}function I_(a,e=0){return(a??e)%360}function aw(a,e){return e!==!0||a?.includes("Dot")===!0?"round":"square"}function ow(a,e){let t="none";switch(a??e){case"justify":case"center":t="center";break;case"left":t="left";break;case"right":t="right";break}return t}function nw(a,e){let t="middle";switch(a??e){case"right":t="left";break;case"left":t="right";break}return t}function lw(a,e){let t="none";switch(a??e){case"baseline":case"middle":t="middle";break;case"top":t="top";break;case"bottom":t="bottom";break}return t}function hw(a,e){let t="middle";switch(a??e){case"top":t="bottom";break;case"bottom":t="top";break;default:t="middle";break}return t}function uw(a,e){let t=a??xi.Solid,i=e??hr.lineWidth,r={[xi.Solid]:"none",[xi.Dot]:[1,i],[xi.DashDotDot]:[4*i,i,1,i,1,i],[xi.Dash]:[4*i,3*i],[xi.DashDot]:[4*i,3*i,1,3*i],[xi.Null]:"none"};return(r[t]??r[xi.Null]).toString()}function V_(a,e){let t={stroke:Ao(),strokeWidth:hr.lineWidth,strokeDasharray:"",strokeLinecap:e!==!0?"round":"square",strokeOpacity:Vn};return a!=null&&(t.stroke=Ao(a.color),t.strokeOpacity=1,a.width!==void 0&&(t.strokeWidth=a.width),a.style!==void 0&&a.style!==xi.Null&&(t.strokeDasharray=uw(a.style,t.strokeWidth),t.strokeLinecap=aw(a.style,e))),t}function E_(a,e){let t=a,[i,r,s,o]=a?.color??e??hr.color,n=[i,r,s,o];return t==null?t={type:ui.SLS,color:n}:t.color===void 0&&(t.color=n),V_(t,!1)}function pw(a,e){let{color:t,outline:i,style:r}=a,s=Ao(t);return{pattern:sw({fill:s,style:r,chartBackgroundColor:e}),fill:s,outline:E_(i,t)}}function dw(a){let{color:e,outline:t,xoffset:i,yoffset:r,style:s,size:o,angle:n}=a,l=s!==void 0?Yc(s,o):"",h=I_(n);return{path:l,fill:Ao(e),outline:E_(t,e),xOffset:i??0,yOffset:r??0,angle:h}}function hy(a){let{symbol:e,defaultToColorFromRamp:t,colorRampIndex:i,isChartFillSymbol:r=!1,chartBackgroundColor:s}=a,o;if(t===!0){let n=r?Bc:Vn;if(e.color=e.color??Ra({colorIndex:i,opacity:n}),Xn(e)||uh(e)){let{outline:l}=e;l!==void 0&&(l.color=l?.color??Ra({colorIndex:i}),e.outline={...l})}}return sf(e)?o=V_(e,!0):uh(e)?(e.style??=hr.lineSeries.marker.markerStyle,e.size??=hr.lineSeries.marker.markerBigSize,o=dw(e)):Xn(e)&&(o=pw(e,s)),o}function Ort(a,e,t){let i=nw(a.horizontalAlignment,t?.horizontalCenter),r=ow(a.horizontalAlignment,t?.align),s=hw(a.verticalAlignment,t?.verticalCenter),o=lw(a.verticalAlignment,t?.valign);return{fill:Ao(a.color,hr.color),fontFamily:a.font?.family??"Arial, Helvetica, sans-serif",fontSize:a.font?.size??hr.generalFontSize,fontWeight:a.font?.weight??"400",textDecoration:a.font?.decoration??"none",align:r,valign:o,verticalCenter:s,horizontalCenter:i,text:Eo({textSymbol:a,format:"amChartsV4"}),angle:I_(a.angle,t?.rotation),xOffset:a.xoffset??t?.dx??0,yOffset:a.yoffset??t?.dy??0,backgroundFill:Ao(a.backgroundColor),borderFill:Ao(a.borderLineColor),borderWidth:a.borderLineSize??1,haloSize:a.haloSize??-1,haloColor:Ao(a.haloColor),rtl:a.rightToLeft??e,wrap:t?.wrap??!1,maxWidth:t?.maxWidth??Number.NaN}}function N_(a,e,t){t!==void 0&&a.tooltip!==void 0&&(a.tooltip.getFillFromObject=!1,a.tooltip.background.fill=e),a.fill=t??e,a.fillOpacity=nt(a.fill.toString()).alpha===0?0:1}function uy(a,e){a.stroke=e.stroke,a.strokeOpacity=e.stroke.alpha===0?0:1,a.strokeDasharray=e.strokeDasharray,a.strokeLinecap=e.strokeLinecap,a.strokeWidth=e.strokeWidth}function cw(a){let{element:e,markerSymbol:t,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,o;return t!==void 0?(o=hy({symbol:t,defaultToColorFromRamp:r,colorRampIndex:s}),o!==void 0&&(e.path=o.path,e.rotation=o.angle,e.dx=o.xOffset,e.dy=o.yOffset,N_(e,o.fill),uy(e,o.outline)),sy(e,i),e.disabled=i===!1):e.disabled=!0,o}function fw(a){let{element:e,lineSymbol:t,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,o;return t!==void 0?(o=hy({symbol:t,defaultToColorFromRamp:r,colorRampIndex:s}),o!==void 0&&uy(e,o),sy(e,i)):sy(e,!1),o}function mw(a){let{element:e,fillSymbol:t,visible:i,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:o}=a,n,l;if(t!==void 0){if(t.style===Ri.Cross||t.style===Ri.DiagonalCross){let h=ew(e);h!==void 0&&(l=iw(h))}n=hy({symbol:t,defaultToColorFromRamp:r,colorRampIndex:s,isChartFillSymbol:o,chartBackgroundColor:l}),n!==void 0&&(N_(e,n.fill,n.pattern),uy(e,n.outline)),e.disabled=i===!1}else e.disabled=!0;return n}function gw(a){let{element:e,seriesIndex:t,colorMatch:i,seriesSymbol:r,isChartFillSymbol:s,rendererSymbol:o,seriesConfig:n}=a,l,h;i===!0&&o&&(l=Wc({rendererSymbol:o,seriesSymbol:r,colorIndex:t}));let u={element:e,defaultToColorFromRamp:!0,colorRampIndex:t,seriesConfig:n},p=l??{...r};switch(r.type){case ui.SLS:h=fw({...u,lineSymbol:p});break;case ui.SFS:h=mw({...u,fillSymbol:p,isChartFillSymbol:s});break;case ui.SMS:h=cw({...u,markerSymbol:p});break}return{symbolWithColorInfo:p,stylingInfo:h}}function Lrt(a,e){if(e!==void 0){let t=a.properties,{elementColor:i,elementOutlineColor:r,elementOutlineWidth:s,rotation:o,transformation:n}=e,{opacity:l,scale:h}=n??{};i!==void 0&&(t.fill=yc(i),t.fillOpacity=nt(t.fill.toString()).alpha===0?0:1),r!==void 0&&(t.stroke=yc(r)),s!==void 0&&(t.strokeWidth=s),o!==void 0&&(t.rotation=o),h!==void 0&&(t.scale=h),l!==void 0&&(t.fillOpacity=(t.fillOpacity??1)*l,t.strokeOpacity=(t.strokeOpacity??1)*l)}}function yw(a,e,t){let i=new Set(Array.from(e)),r=a.findIndex(s=>!i.has(ay(s)));return r!==-1?r:t}function ay(a){return`${a[0]},${a[1]},${a[2]}`}function vw(a){let{chartConfig:e,queryObject:t,popupTemplateFieldInfosEnabled:i,labelUpdateNeeded:r,utilsStrings:s}=a,{series:o}=e,n=o[0],{x:l}=n,h=!jy({chartConfig:e}),u=ji([n]),p=u===Ct.PieFromFields,d=Va(t),c=Hn(d).idField,f=Qc(t,i);return{x:l,isNonAggregatedChart:h,objectIdField:c,isPieFromFields:p,seriesConfig:n,fieldList:f,labelUpdateNeeded:r,chartSubType:u,colorMatch:Kc(e),utilsStrings:s}}function bw(a){let{dataContext:e,seriesConfig:t,existingSlicesColors:i,isGroupOfSlices:r,sliceFromConfig:s,dataIndex:o,colorMatch:n,chartSubType:l}=a,h=r?{...Et.pieChart.sliceGrouping.fillSymbol,...t.sliceGrouping?.fillSymbol}:Ro(s?.fillSymbol??t.fillSymbol),u=zc({dataItem:e,seriesConfig:t,chartSubType:l,colorMatch:n}),p=o;h?.color||(p=yw(Sy,i,o));let d={dataItem:{dataContext:e}},{symbolWithColorInfo:c}=gw({element:d,seriesConfig:t,y:t.y,seriesSymbol:h??Zu(),seriesIndex:p,rendererSymbol:u,colorMatch:n,isChartFillSymbol:!0});return c}function b_(a,e){let{x:t,isNonAggregatedChart:i,objectIdField:r,isPieFromFields:s,seriesConfig:o,fieldList:n,labelUpdateNeeded:l,colorMatch:h,chartSubType:u,utilsStrings:p}=a,d=[],c,f,g=new Set;return e?.forEach((m,y)=>{let v=Pw({dataContext:m,x:t,isNonAggregatedChart:i,dataIndex:y,objectIdField:r,isPieFromFields:s});m[Et.pieChart.technicalFieldSliceId]=v;let x=x_(o.slices,v);x?.fillSymbol?.color!==void 0&&g.add(ay(x.fillSymbol.color))}),e?.forEach((m,y)=>{let v=m[Et.pieChart.technicalFieldSliceId],x=x_(o.slices,v),_=wc(m),$=bw({dataContext:m,seriesConfig:o,existingSlicesColors:g,isGroupOfSlices:_,sliceFromConfig:x,dataIndex:y,colorMatch:h,chartSubType:u});$.color&&g.add(ay($.color));let T=$w({dataContext:m,sliceFromConfig:x,isGroupOfSlices:_,seriesConfig:o,fieldList:n,isPieFromFields:s,labelUpdateNeeded:l,colorMatch:h,utilsStrings:p}),S={sliceId:v,label:T,fillSymbol:$};S.originalLabel=x?.originalLabel??(m?.[Et.originalCategoryValue]!==void 0?m?.[Et.originalCategoryValue]:S.label),_?(f=m[Et.pieChart.technicalFieldGroupedSlices],o.sliceGrouping!==void 0&&(c={sliceId:o.sliceGrouping.sliceId,percentageThreshold:o.sliceGrouping.percentageThreshold,label:T,originalLabel:o.sliceGrouping.originalLabel??T,fillSymbol:$})):d.push(S)}),{slices:d,groupOfSlicesSymbols:c,groupOfSlices:f}}function xw(a){let{creation:e,dataInfo:t,pieChartDataActuallyChanged:i,chartConfig:r,previousConfig:s,queryObject:o,popupTemplateFieldInfosEnabled:n,utilsStrings:l}=a,h;if(r.series[0].type===Y.PieSeries){let u=fv(t.data),p=nv({oldConfig:s,newConfig:r}),d=ov(s,r),c=lv(s,r),f=vw({chartConfig:r,queryObject:o,popupTemplateFieldInfosEnabled:n,labelUpdateNeeded:e||i||p||c||d,utilsStrings:l}),{slices:g,groupOfSlicesSymbols:m,groupOfSlices:y}=b_(f,u),{slices:v}=b_(f,y??[]);h={slices:g,groupedSlices:v,groupOfSlices:m}}return h}async function Frt(a){let{creation:e,dataInfo:t,dataInfo:{data:i},pieChartDataActuallyChanged:r,chartConfig:s,previousConfig:o,pieSlicesSymbols:n,queryObject:l,options:h,utilsStrings:u}=a,{slices:p}=n??{},{chartWillRender:d}=h??{},c=ei(s.series),f=!1,g=s,m=Ro(n),y,v;if(d&&(c===Y.PieSeries||c===Y.GaugeSeries)){f=!0,g=Ro(s);let x=gv({data:i,seriesConfig:s.series});g=await d({chartConfig:g,data:x,slices:p}),!oh(l)&&c===Y.PieSeries&&i&&"dataItems"in i&&({colorMatchApplied:y,rendererFieldNames:v}=await uv({data:i.dataItems,queryObject:l,chartConfig:g,allowColorMatch:Ey({chartConfig:g,queryObject:l})}),m=xw({creation:e,dataInfo:t,chartConfig:g,previousConfig:o,queryObject:l,pieChartDataActuallyChanged:r,popupTemplateFieldInfosEnabled:h?.popupTemplateFieldInfosEnabled,utilsStrings:u}))}return{changesApplied:f,alteredConfig:g,alteredPieSlicesSymbols:m,colorMatchApplied:y,rendererFieldNames:v}}function wc(a){return a?.[Vo.defaultGroupOfSlicesId]===!0}function _w(a){let{dataContext:e,dataIndex:t,objectIdField:i}=a;return`${Vo.sliceIdPrefix}-${e[i??""]?.toString()??t}`}function Mrt(a){let{chartConfig:e,chartData:t,fieldList:i}=a,r=ji(e.series)===Ct.PieFromFields;if(e.orderOptions?.data!==void 0||r){hv({arrayToSort:t,chartConfig:e,fieldList:i});let{slices:s}=e.series[0];s!==void 0&&s.sort((o,n)=>{let l=t.findIndex(u=>u[Et.pieChart.technicalFieldSliceId]===o.sliceId),h=t.findIndex(u=>u[Et.pieChart.technicalFieldSliceId]===n.sliceId);return l-h})}}function x_(a,e){let t;return a!==void 0&&e!==void 0&&(t=a.find(i=>i.sliceId===e)),t}function Pw(a){let{dataContext:e,isNonAggregatedChart:t,x:i,dataIndex:r,objectIdField:s,isPieFromFields:o}=a,n="";return o===!0?n=e[Et.originalCategoryValue]??e[ih]:t?n=_w({dataContext:e,dataIndex:r,objectIdField:s}):(n=e[Et.originalCategoryValue],n===void 0||n===""?n=Vo.emptySliceId:n===null&&(n=Vo.nullSliceId),n=n??e[i]),n===void 0&&(n=Vo.undefinedSliceId),n.toString()}function $w(a){let{dataContext:e,sliceFromConfig:t,isGroupOfSlices:i,seriesConfig:r,fieldList:s,isPieFromFields:o,labelUpdateNeeded:n,colorMatch:l,utilsStrings:h}=a,{sliceGrouping:u}=r,{x:p}=r;o&&(p=ih);let d=e[p]??e[Et.originalCategoryValue],c=e[Et.originalCategoryValue]??d,f=d;return n&&(i?f=u?.label??u?.originalLabel?.toString()??h.pieChart.defaultSliceGroupingLabel:l&&e[Et.rendererSymbolField]?.label!==void 0?f=e[Et.rendererSymbolField].label:t!==void 0||s!==void 0?(t?.label&&t.label!==t?.sliceId&&(f=t?.label),f===c&&c!==void 0&&c!==null&&(f=xr(s,c))):t===void 0&&(f=c),f===Et.nullValue?f="null":f!=null&&(f=f.toString())),f}function Rrt(a,e){return a?.[0]?.sliceGrouping?.percentageThreshold!==e?.[0]?.sliceGrouping?.percentageThreshold}function B_(a){let{groupOfSlicesDataContext:e,chartData:t}=a;return(e??t?.find(i=>i[Vo.defaultGroupOfSlicesId]===!0))?.[Et.pieChart.technicalFieldGroupedSlices]}function Irt(a){let{dataContext:e,pieSlicesSymbols:t,seriesConfig:i}=a,r=i.fillSymbol?{...i.fillSymbol}:Zu();if(wc(e))r={...Et.pieChart.sliceGrouping.fillSymbol,...t?.groupOfSlices?.fillSymbol};else{let s=e[Et.pieChart.technicalFieldSliceId],o=t?.slices?.find(n=>n.sliceId===s);r=Ro(o?.fillSymbol??i.fillSymbol??Zu())}return r}var dc={Top:"top",Bottom:"bottom",Median:"median",Outliers:"outliers"},us={XAxisTitle:"XAxisTitle",YAxisTitle:"YAxisTitle",ChartTitle:"ChartTitle",ChartSubTitle:"ChartSubTitle",ChartFooter:"ChartFooter",GuideLabel:"GuideLabel",LegendTitle:"LegendTitle"};function*ww(a){let{filterList:e,queryObject:t,queryConfig:i,errorStrings:r}=a;for(let s=0;s<e.length;s+=1){let o={...i};o.where=sp([o.where,e[s]]),yield Jy({queryObject:t,queryConfig:o,uniqueFeature:!0,errorStrings:r})}}async function Cw(a){let{whereList:e,queryObject:t,queryFilter:i,queryConfig:r,errorStrings:s}=a,o=[];if(e.length>0){let n=Fy().maxElementsPerSelectionQuery,l=[],h=Math.ceil(e.length/n);for(let p=0;p<h;p+=1){let d=p*n,c=(p+1)*n,f=e.slice(d===0?0:d-1,c),g=sp(f,"OR");g=sp([i,g]),l.push(g)}let u=ww({filterList:l,queryObject:t,queryConfig:r,errorStrings:s});o=(await Promise.all(u)).flat(),o=Array.from(new Set(o))}return o}var Oo={Outlier:"outlier",Box:"box",OutlierToOutlier:"outlier-outlier",OutlierToBox:"outlier-box",BoxToOutlier:"box-outlier",BoxToBox:"box-box"};function Sw(a,e){let t=a[Et.boxPlot.boxPlotOutlierId]===!0?Oo.Outlier:Oo.Box,i=typeof e=="number"?Oo.Outlier:Oo.Box;return`${t}-${i}`}function Tw(a){let{oneSelectedItem:e,dataContext:t,selectedOutlierKey:i}=a;return e[i]===t[i]}function Dw(a){let{elementMin:e,elementMax:t,selectedOutlierValue:i}=a,r;return typeof e=="number"&&typeof t=="number"&&typeof i=="number"&&(r=i>=e&&i<=t),r}function kw(a){let{selectedMin:e,selectedMax:t,elementOutlierValue:i,oneSelectedItem:r,iqrField:s}=a,o;typeof e=="number"&&typeof t=="number"&&typeof i=="number"&&(o=i>=e&&i<=t);let n=s in r;return o!==!1&&n}function Aw(a){let{selectedMin:e,selectedMax:t,elementMin:i,oneSelectedItem:r,elementMax:s,iqrField:o}=a,n;typeof i=="number"&&typeof s=="number"&&typeof e=="number"&&typeof t=="number"&&(n=!(i>=t||s<=e));let l=o in r;return n!==!1&&l}function Ow(a){let{oneSelectedItem:e,dataContext:t,xAxisField:i}=a,r=t[Et.originalCategoryValue]??t[Et.boxPlot.boxPlotCategory]??t[i],s=e[Et.originalCategoryValue]??e[Et.boxPlot.boxPlotCategory]??e[i];return r===s}function Lw(a){let{chartSubType:e,yAxisField:t,splitBy:i,showOutliers:r}=a,s=e===Ct.BoxPlotMultiFieldsAndCategory?t:void 0,o={y:s,splitBy:i},n=gs({...o,key:Ue.Outlier}),l=gs({...o,key:Ue.Max,showOutliers:r}),h=gs({...o,key:Ue.Min,showOutliers:r}),u=gs({...o,key:Ue.Max,showOutliers:!1}),p=gs({...o,key:Ue.Min,showOutliers:!1}),d=gs({...o,key:Ue.Max,showOutliers:!0}),c=gs({...o,key:Ue.Min,showOutliers:!0}),f=gs({splitBy:i,y:s,key:Ue.IQR});return{selectedOutlierKey:n,maxField:l,minField:h,selectedMaxFieldWoOutliers:u,selectedMinFieldWoOutliers:p,selectedMaxFieldWithOutliers:d,selectedMinFieldWithOutliers:c,iqrField:f}}function Fw(a){let{elementDataContext:e,layerOidField:t,xAxisField:i,splitBy:r,yAxisField:s,chartSubType:o,showOutliers:n}=a,l=e,h;if(l?.[Et.boxPlot.boxPlotMeanLineMarkerId]===!0){let u=gs({splitBy:r,key:Ue.Average});h=p=>{let d=!i||!(i in p&&i in l)||p[i]===l[i],c=u in p&&u in l;return d&&c}}else i!==void 0&&s!==void 0&&(h=u=>{let p;if(t!==void 0&&t in u&&t in l)p=u[t]===l[t];else{let{selectedOutlierKey:d,maxField:c,minField:f,selectedMaxFieldWoOutliers:g,selectedMinFieldWoOutliers:m,selectedMaxFieldWithOutliers:y,selectedMinFieldWithOutliers:v,iqrField:x}=Lw({chartSubType:o,yAxisField:s,splitBy:r,showOutliers:n}),_=l[d],$=u[d],T=l[f],S=l[c],k=u[m]??u[v],A=u[g]??u[y],L=Ow({oneSelectedItem:u,dataContext:l,xAxisField:i});if(L)switch(Sw(u,_)){case Oo.OutlierToOutlier:L=Tw({oneSelectedItem:u,dataContext:l,selectedOutlierKey:d});break;case Oo.OutlierToBox:L=Dw({elementMin:T,elementMax:S,selectedOutlierValue:$});break;case Oo.BoxToOutlier:L=kw({selectedMin:k,selectedMax:A,elementOutlierValue:_,oneSelectedItem:u,iqrField:x});break;case Oo.BoxToBox:L=Aw({selectedMin:k,selectedMax:A,elementMin:T,oneSelectedItem:u,elementMax:S,iqrField:x});break}p=L===!0}return p});return h}function j_(a){let{layerOidField:e,sliceDataContext:t,selectionDataContext:i,xAxisField:r}=a,s=!1;if(e!==void 0&&e in t&&e in i)s=i[e]?.toString()===t[e]?.toString();else{let o=t[Et.originalCategoryValue];o===void 0&&(o=t[r]),o===void 0&&(o=t[ih]);let n=i[Et.originalCategoryValue];n===void 0&&(n=i[r]),n===void 0&&(n=i[ih]),s=o!==void 0&&n!==void 0&&o===n}return s}function cc(a){let{dataContext:e,specificField:t,xOrY:i}=a,r=e[i==="x"?Et.originalCategoryValue:Et.originalYCategoryValue];return r===void 0&&t&&(r=e[t]),r===void 0&&(r=e[i==="x"?pi.xField:pi.yField]),r}function H_(a){let{options:e,elementDataContext:t,selectionDataItems:i,layerOidField:r,xAxisField:s,yAxisField:o,chartType:n,splitBy:l,chartSubType:h}=a,u=!1,p;if(t!==void 0&&i!==void 0)switch(n){case Y.HeatSeries:let d=t,c=cc({dataContext:d,specificField:s,xOrY:"x"}),f=cc({dataContext:d,specificField:o,xOrY:"y"});p=g=>{let m=cc({dataContext:g,specificField:s,xOrY:"x"}),y=cc({dataContext:g,specificField:o,xOrY:"y"});return c===m&&f===y};break;case Y.RadarSeries:case Y.BarSeries:case Y.LineSeries:case Y.ComboLineAndBarSeries:if(s!==void 0&&o!==void 0){let g=t;p=m=>{let y,v=r;if(h===Ct.BarAndLineSplitByNoAggregation){let x=hh({where:l,keepSurroundingQuotes:!1,escape:!1});v=`${r}_${x}`}if(r!==void 0&&r in m&&r in g)y=m[r]===g[r];else if(v!==void 0&&v in m&&v in g)y=m[v]===g[v];else if(Et.dateBinningRange in g&&typeof m[s]=="number"){let x=m[s],_=m[Et.dateBinningRange],$=Array.isArray(_)&&Number.isFinite(_[0])&&Number.isFinite(_[1]),[T,S]=$?_:[0,0],[k,A]=g[Et.dateBinningRange],L=g[Et.lastTemporalBin]===!0?x<=A:x<A;y=($?T<A&&k<S:x>=k&&L)&&o in m&&Number.isFinite(m[o])}else{let x=$=>{let T=$[Et.originalCategoryValue];return T===void 0&&(T=$[s]),T=T===null?Et.nullValue:T,T},_=x(g);y=x(m)===_&&o in m}return y}}break;case Y.BoxPlotSeries:p=Fw(a);break;case Y.ScatterSeries:if(s!==void 0&&o!==void 0){let g=t;if(!By({dataContext:g,chartLimits:e?.chartLimits}))p=m=>{let y;return r!==void 0&&r in g&&r in m?y=m[r]===g[r]:y=m[s]===g[s]&&m[o]===g[o],y};else{let{dataContextXMinField:m,dataContextXMaxField:y,dataContextYMinField:v,dataContextYMaxField:x}=Et.scatterplotAggregationFields,{[m]:_,[y]:$}=g,T=s!==o?g[v]:_,S=s!==o?g[x]:$,k=L=>{let O=L[s]??Number.NaN,I=_??Number.NaN,R=$??Number.NaN;return _===$?O===I:(O??Number.NaN)>=I&&(O??Number.NaN)<R},A=L=>{let O=L[o]??Number.NaN,I=T??Number.NaN,R=S??Number.NaN;return T===S?O===I:O>=I&&O<R};p=L=>k(L)&&A(L)}}break;case Y.HistogramSeries:p=g=>{let m=!1,{minValue:y,maxValue:v}=t,{isLastBin:x}=t;if(s!==void 0&&s in g){let _=g[s];m=typeof _=="number"&&_>=y&&(x&&_<=v||!x&&_<v)}else if("minValue"in g&&"maxValue"in g){let{minValue:_,maxValue:$}=g;m=!(y>=$||v<=_)}return m};break;case Y.PieSeries:s!==void 0&&(p=g=>{let m=t,y=wc(m),v=[m];return y&&v.push(...B_({groupOfSlicesDataContext:m})??[]),v.some(x=>j_({sliceDataContext:x,selectionDataContext:g,layerOidField:r,xAxisField:s}))});break}return p!==void 0&&(u=i.some(p)),u}function vc(a){let{isFeatureCollectionLayer:e,dataContext:t,yAxisField:i,yList:r,xAxisField:s,splitBy:o,chartType:n,chartSubType:l,showOutliers:h}=a,u={...t};if(t!==void 0){if(n===Y.RadarSeries||n===Y.BarSeries||n===Y.LineSeries||n===Y.ComboLineAndBarSeries||n===Y.PieSeries){n!==Y.PieSeries&&(e||l!==Ct.BarAndLineNoAggregation&&l!==Ct.BarAndLineSplitByNoAggregation)&&r.forEach(d=>{d!==i&&delete u[d]});let p=Gc({value:t[s],dataContext:t,keepNullValues:!0});u[s]=p,!pr(o)&&!sv(o)&&(u[lh(o)]=hh({where:o,escape:!1}))}else if(n===Y.BoxPlotSeries){u={[s]:t[s]},[rh.uniqueIdsName,Et.boxPlot.boxPlotMeanLineMarkerId,Et.boxPlot.boxPlotOutlierId,Et.originalCategoryValue,Et.originalYCategoryValue].forEach(d=>{t[d]&&(u[d]=t[d])});let p=l===Ct.BoxPlotMultiFieldsAndCategory?i:void 0;Object.values(Ue).forEach(d=>{let c=gs({key:d,y:p,splitBy:o,showOutliers:h});t[c]!==void 0&&(u[c]=t[c])})}}return u}function Mw(a){return!!/^data:[a-z]+\/[a-z+.-]+;base64/u.test(a)}function Rw(a,e=512){if(!Mw(a))throw new Error("Cannot convert a string that is not a data uri to a blob");let t=a.split(",")[0].split(":")[1].split(";")[0],i=atob(a.split(",")[1]),r=[];for(let s=0;s<i.length;s+=e){let o=i.slice(s,s+e),n=new Array(o.length);for(let h=0;h<o.length;h++)n[h]=o.charCodeAt(h);let l=new Uint8Array(n);r.push(l)}return new Blob(r,{type:t})}var Zl={CustomActive:"custom-active",CustomInactive:"custom-inactive",Default:"default",Active:"active"};function bc(a,e){return e!=null&&e!==""?e:a}function X_(a,e){let t;switch(a){case cs.Average:{t=e.statistics.mean;break}case cs.ContinuousPercentile:{t=e.statistics.median;break}case cs.Sum:{t=e.statistics.sum;break}case cs.Minimum:{t=e.statistics.minimum;break}case cs.Maximum:{t=e.statistics.maximum;break}case cs.Variance:{t=e.statistics.variance;break}case cs.DiscretePercentile:{t=e.statistics.discretePercentile;break}case cs.NoAggregation:{t=e.statistics.noAggregation;break}case cs.Count:default:{t=e.statistics.count;break}}return t}function Y_(a){let{config:e,fieldName:t="",utilsStrings:i}=a,r=e.series[0].query?.outStatistics?.[0].statisticType??Rc.statisticType,s=X_(r,i);return R_(i.statistics.aggregation,{statistics:s,fieldName:t})}function Iw(a){let{config:e,fieldList:t,objectIdField:i,seriesIndex:r,isStacked100:s,utilsStrings:o}=a,n="",l=e.series[r].name,h=e.series[r],u=[h.y].flat()[0],p=e.axes,d=ji(e.series),c=i??rh.outStatistics.onStatisticField,f=h.query?.outStatistics?.[0].onStatisticField??c,g=xr(t,f),m=h.query?.outStatistics?.[0].statisticType??Rc.statisticType,y=X_(m,o);return d===Ct.BarAndLineNoAggregation?n=l??xr(t,u):d===Ct.BarAndLineSplitByNoAggregation?n=xr(t,u):(n=m===cs.Count&&f===c?o.statistics.count:R_(o.statistics.aggregation,{statistics:y,fieldName:g??l}),d===Ct.BarAndLineMonoField&&!s&&(n=bc(n,p[1].title?.content?.text))),n}var b={Rotated:0,NonRotated:1,RTL:2,LTR:3,Stacked:4,Stacked100:5,SideBySide:6,LegendTop:7,LegendBottom:8,LegendLeft:9,LegendRight:10,DateAxis:11,ValueAxis:12,CategoryAxis:13,OrderByFieldsASC:14,OrderByFieldsDESC:15},Vw=new Set([`${b.NonRotated}-${b.LTR}-${b.SideBySide}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.SideBySide}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.SideBySide}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.SideBySide}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.LTR}-${b.SideBySide}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.LTR}-${b.SideBySide}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.LTR}-${b.SideBySide}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.LTR}-${b.SideBySide}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.DateAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.CategoryAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsASC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.SideBySide}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.LTR}-${b.Stacked100}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendLeft}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.NonRotated}-${b.RTL}-${b.Stacked100}-${b.LegendRight}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendTop}-${b.ValueAxis}-${b.OrderByFieldsDESC}`,`${b.Rotated}-${b.RTL}-${b.Stacked100}-${b.LegendBottom}-${b.ValueAxis}-${b.OrderByFieldsDESC}`]),Vrt="AM5C241025748",Ti={SelectEnded:"selectended",DataValidated:"datavalidated",BoundsChanged:"boundschanged",PointerUp:"pointerup",FrameEnded:"frameended",Click:"click"},oy=new Map;function Ew(a,e){return Ln(a,e)}function Nw(a,e){On(a,e)}function On(a,e){let t=oy.get(a)??{};oy.set(a,{...t,...e})}function Ln(a,e){return oy.get(a)?.[e]}function et(a,e){return Ln(a,e)}function na(a,e){On(a,e)}function ue(a,e){return Ln(a,e)}function vr(a,e){On(a,e)}function Ert(a,e){return Ln(a,e)}function Nrt(a,e){On(a,e)}function Fn(a,e){return Ln(a,e)}function Bw(a,e){On(a,e)}function jw(a,e){return Ln(a,e)}function Hw(a,e){On(a,e)}function Brt(a,e){return Ln(a,e)}function jrt(a,e){On(a,e)}function Xw(a){let e="";return a instanceof yr?e=a.get("categoryXField")??a.get("valueXField")??"":a instanceof Ki&&(e=a.get("categoryField")??""),e}function Yw(a){let e="";return a instanceof yr?e=a.get("categoryYField")??a.get("valueYField")??"":a instanceof Ki&&(e=a.get("categoryField")??""),e}function Cc(a){let e="",{chart:t}=a;return t!==void 0&&(e=et(t.uid,"isRotated")===!0?Xw(a):Yw(a)),e}function zw(a){return a!=null&&!a.isDisposed()}function Ww(a){let e;if(a!=null){let t=a;if(t instanceof hi)e=t.chart;else{let i=t.dataItem?.component;i instanceof hi&&(e=i.chart)}}return e}function Gw(a){let e;if(a){let t=a.get("background")?.get("fill");if(t){let{r:i,g:r,b:s}=t;e=[Math.round(i),Math.round(r),Math.round(s),255]}}return e}function Uw(a){let e=Wi(a),{r:t,g:i,b:r}=e;return{r:t,g:i,b:r}}function Hrt(a,e){e&&a.setThemes([v_.new(a)])}function Xrt(a,e){e===!0&&a.setThemes([y_.new(a)])}function he(a){let e=Wi("#000000"),t=Vn;if(a!=null){let[i,r,s,o]=a;t=o/255,e=Wi(`rgba(${i}, ${r}, ${s}, ${t})`)}return{color:e,opacity:t}}function Di(a,e){e===!1&&(!("isHiding"in a)||!a.isHiding())?(a.set("visible",!1),"hide"in a&&a.hide()):e!==!1&&(!("isShowing"in a)||!a.isShowing())&&(a.set("visible",!0),"show"in a&&a.show())}function Ye(a){let{childId:e,parent:t,useChildId:i}=a,r=i?e:ps(e,t.uid);return t.children.values.find(s=>s.get("id")===r)}function ps(a,e){return`${a}${e}`}function Jl(a,e=100){return setTimeout(()=>a(),e)}function z_(a){let{series:e,chartConfig:t,whenReadyCallback:i}=a,r=ei(t.series);if(e){let s=e.root.events.on(Ti.FrameEnded,()=>{let o=!1,n=!1;switch(!0){case e instanceof Ie:o=e.columns.length===e.dataItems.length;break;case(!(e instanceof oa)&&e instanceof Te):let l=ue(e.uid,"bulletTemplate");if(l)if(r===Y.ScatterSeries)o=l.entities.length===e.data.length&&e.dataItems[e.dataItems.length-1]?.bullets?.[0]?.get("sprite")!==void 0;else{n=!0;let h=Cc(e)??"",u=t?.series[0]?.x??"";o=e.dataItems.filter(p=>{let d=p.dataContext;return h in d&&u in d&&d[u]!==void 0}).every(p=>!Number.isFinite(p.dataContext[h])||p?.bullets?.[0]?.get("sprite"))}break;default:o=!0;break}o&&(s.dispose(),i(),n&&e.markDirtySize())})}}function Yrt(a){let{chart:e,chartConfig:t,delayCallback:i}=a,{root:r}=e;if(ei(t.series)===Y.GaugeSeries||!i)Jc(r.dom);else if(e instanceof or&&i){let s=()=>{(e instanceof Si?e.yAxes.getIndex(0):e.series.getIndex(0))?.events.once(Ti.BoundsChanged,()=>{Jc(r.dom)})};z_({series:e.series.getIndex(0),chartConfig:t,whenReadyCallback:s})}}function zrt(a){let e=Number.NaN;if(typeof a=="number")e=a;else if(a.includes("%")){let t=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(t)&&(e=Jt(t))}return e}function Kw(a,e){return e!==!0||a?.includes("Dot")===!0?"round":"square"}function qw(a,e){let t=a??xi.Solid,i=e??q.lineWidth,r={[xi.Solid]:[],[xi.Dot]:[1,i],[xi.DashDotDot]:[4*i,i,1,i,1,i],[xi.Dash]:[4*i,3*i],[xi.DashDot]:[4*i,3*i,1,3*i],[xi.Null]:[]};return r[t]??r[xi.Null]}function Zw(a){let{root:e,fill:t,rotation:i,isLinePattern:r,chartBackgroundFill:s}=a,o;if(r!==!1){let{tileSize:n,diagonalTileSize:l}=q.patternLineProperties,h=i===45||i===135,u=h?l:n;o=Aa.new(e,{width:u,height:u,strokeWidth:q.patternLineProperties.strokeWidth??1,gap:6,color:t,...h?{angle:i}:{rotation:i??Number.NaN},...s!==void 0&&{fill:s,fillOpacity:1}})}else{let n=s!==void 0?1:q.patternRectProperties.fillOpacity??Number.NaN;o=Po.new(e,{width:q.patternRectProperties.width??Number.NaN,height:q.patternRectProperties.height??Number.NaN,strokeWidth:q.patternRectProperties.strokeWidth??Number.NaN,fillOpacity:n,color:s??t,fill:t,gap:1,maxWidth:q.patternRectProperties.rectWidth??Number.NaN,maxHeight:q.patternRectProperties.rectHeight??Number.NaN,rotation:i??Number.NaN})}return o}function Jw(a){let{fill:e,root:t,style:i,chartBackgroundFill:r}=a,s,o,n=!0;switch(i){case Ri.Horizontal:{o=0;break}case Ri.Vertical:{o=90;break}case Ri.ForwardDiagonal:{o=135;break}case Ri.BackwardDiagonal:{o=45;break}case Ri.Cross:{o=0,n=!1;break}case Ri.DiagonalCross:{o=135,n=!1;break}case Ri.Solid:}return o!==void 0&&t!==void 0&&(s=Zw({root:t,fill:e,rotation:o,isLinePattern:n,chartBackgroundFill:r})),s}function W_(a,e=0){return(a??e)%360}function G_(a,e){let t={stroke:he().color,strokeWidth:q.lineWidth,strokeDasharray:[],linecap:e!==!0?"round":"square",strokeOpacity:Vn};if(a!=null){let i=he(a.color);t.stroke=i.color,t.strokeOpacity=i.opacity,a.width!==void 0&&(t.strokeWidth=a.width,t.strokeOpacity=a.width===0?0:i.opacity),a.style!==void 0&&a.style!==xi.Null&&(t.strokeDasharray=qw(a.style,t.strokeWidth),t.linecap=Kw(a.style,e))}return t}function U_(a,e){let t=a,[i,r,s,o]=a?.color??e??q.color,n=[i,r,s,o];return t==null?t={type:ui.SLS,color:n}:t.color===void 0&&(t.color=n),G_(t,!1)}function Qw(a,e,t){let{color:i,outline:r,style:s}=a,o=he(i),n=Xc(s),l;return t!==void 0?l=he(t).color:n&&(l=he(q.backgroundColor).color),{pattern:Jw({root:e,fill:o.color,style:s,chartBackgroundFill:l}),fill:o.color,outline:U_(r,i),fillOpacity:o.opacity}}function tC(a){let{color:e,style:t,size:i,outline:r,xoffset:s,yoffset:o,angle:n}=a,l=W_(n),h=he(e),u=r,p=t!==Vc.Cross&&t!==Vc.X&&i!==void 0&&i<q.lineSeries.marker.markerSizeThresholdForTooltipDisplay&&(r?.width===void 0||r.width===0),d=i;return p&&(u={type:ui.SLS,style:r?.style??xi.Solid,color:[0,0,0,0],width:q.lineSeries.marker.markerSizeThresholdForTooltipDisplay-i},d=i+1),{path:t!==void 0?Yc(t,d):"",fill:h.color,outline:U_(u,e),xOffset:s??0,yOffset:o??0,angle:l,fillOpacity:h.opacity}}function eC(a){let e;switch(a){case"line-through":case"underline":e=a;break}return e}function iC(a){return a===!0?"wrap":"none"}function K_(a,e){let t=pt;switch(a??e){case"right":t=X;break;case"left":t=gi;break}return t}function q_(a,e){let t=pt;switch(a??e){case"top":t=gi;break;case"bottom":t=X;break}return t}function rC(a){let{angle:e,mappedHAlignment:t,mappedVAlignment:i,isGuideLabel:r}=a,s=t,o=i,n=t,l=i;return(Math.abs(e)===270||Math.abs(e)===90)&&(r||(n=void 0,o=void 0),l===gi?s=X:l===X?s=gi:l===pt&&(s=pt)),{align:s,valign:o,horizontalCenter:n,verticalCenter:l}}function py(a){let{root:e,symbol:t,defaultToColorFromRamp:i,colorRampIndex:r,isChartFillSymbol:s=!1,chartBackgroundColor:o}=a,n;if(i===!0){let l=s?Bc:Vn;if(t.color=t.color??Ra({colorIndex:r,opacity:l}),Xn(t)||uh(t)){let{outline:h}=t;h!==void 0&&(h.color=h?.color??Ra({colorIndex:r}),t.outline={...h})}}return sf(t)?n=G_(t,!0):uh(t)?(t.style??=q.lineSeries.marker.markerStyle,t.size??=q.lineSeries.marker.markerBigSize,n=tC(t)):Xn(t)&&(n=Qw(t,e,o)),n}function sC(a){let{input:e,isGuideLabel:t,defaults:i}=a,r=W_(e.angle,i?.rotation),s=K_(e.horizontalAlignment,i?.horizontalCenter),o=q_(e.verticalAlignment,i?.verticalCenter),{align:n,valign:l,horizontalCenter:h,verticalCenter:u}=rC({angle:r,mappedHAlignment:s,mappedVAlignment:o,isGuideLabel:t});return{fill:he(e.color).color,fontFamily:e.font?.family??"Arial, Helvetica, sans-serif",fontSize:e.font?.size??q.generalFontSize,fontWeight:e.font?.weight??"400",textDecoration:eC(e.font?.decoration),align:n,valign:l,verticalCenter:u,horizontalCenter:h,text:Eo({textSymbol:e,format:"amChartsV5"}),angle:r,xOffset:e.xoffset??i?.dx??0,yOffset:e.yoffset??i?.dy??0,backgroundFill:he(e.backgroundColor).color,borderFill:he(e.borderLineColor).color,borderWidth:e.borderLineSize??1,haloColor:he(e.haloColor).color,rtl:(e.rightToLeft??Py(document.documentElement))==="rtl"?"rtl":"ltr",wrap:iC(i?.wrap),maxWidth:i?.maxWidth??Number.NaN}}function aC(a,e){e!==void 0&&(e.marginBottom!==void 0&&a.set("marginBottom",e.marginBottom),e.marginTop!==void 0&&a.set("marginTop",e.marginTop),e.marginRight!==void 0&&a.set("marginRight",e.marginRight),e.marginLeft!==void 0&&a.set("marginLeft",e.marginLeft),e.verticalCenter!==void 0&&a.set("y",q_(e.verticalCenter)),e.horizontalCenter!==void 0&&a.set("x",K_(e.horizontalCenter)),e.strokeWidth!==void 0&&a.get("background")?.set("strokeWidth",e.strokeWidth),e.paddingBottom!==void 0&&a.set("paddingBottom",e.paddingBottom),e.paddingTop!==void 0&&a.set("paddingTop",e.paddingTop),e.paddingLeft!==void 0&&a.set("paddingLeft",e.paddingLeft),e.paddingRight!==void 0&&a.set("paddingRight",e.paddingRight),e.maxWidth!==void 0&&a.set("maxWidth",e.maxWidth))}function Z_(a){let{root:e,parent:t,defaults:i,index:r,id:s}=a,o=Qt.new(e,{text:"",textAlign:"center",background:He.new(e,{}),paddingBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0});return s!==void 0&&o.set("id",s),aC(o,i),t!==void 0&&t.children.insertIndex(r??t.children.length,o),o}function __(a){let{label:e,offset:t,offsetProperty:i}=a;e.adapters.remove(i),(e instanceof Qt?[e]:e.entities).forEach(r=>{if(typeof t=="string"&&!Number.isFinite(Number(t))){let s=Hy(t);typeof s=="number"&&(s/=100,r.adapters.add(i,()=>(i==="dx"?r.width():r.height())*(s??0)))}else{let s=Number(t);Number.isFinite(s)&&r.set(i,s)}})}function th(a){let{label:e,labelConfig:t,defaults:i,skipSettingText:r,skipSettingXAndY:s}=a,o=t?.visible??!0;if(e!==void 0&&!e.isDisposed()&&t!==void 0){let n=e instanceof Qt&&jw(e.uid,"isGuide"),l=sC({input:t.content,isGuideLabel:n,defaults:i});e.setAll({fill:l.fill,fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontSize:l.fontSize,textDecoration:l.textDecoration,rotation:l.angle,direction:l.rtl,oversizedBehavior:l.wrap,maxWidth:l.maxWidth}),r||e.setAll({text:l.text}),s||(__({label:e,offset:l.xOffset,offsetProperty:"dx"}),__({label:e,offset:l.yOffset,offsetProperty:"dy"}),e.setAll({centerX:l.align,centerY:l.valign,x:l.horizontalCenter,y:l.verticalCenter})),e.get("background")?.setAll({strokeWidth:l.borderWidth,strokeOpacity:1}),e.set("visible",o),e instanceof Qt?Di(e,o):e.entities.forEach(h=>{Di(h,o)})}}function xc(a){let{chart:e,label:t,labelType:i}=a,{legendTitle:r}=q.legendProperties,s=et(e.uid,"config"),o=r.maxWidth??Number.NaN;switch(i){case us.GuideLabel:if(e instanceof Si){let n=t.get("rotation");n===90||n===270?o=e.seriesContainer.height():o=e.seriesContainer.width()}break;case us.XAxisTitle:e instanceof Si&&(o=e.seriesContainer.width());break;case us.YAxisTitle:e instanceof Si&&(o=e.seriesContainer.height());break;case us.ChartTitle:case us.ChartSubTitle:case us.ChartFooter:o=e.chartContainer.width()-20;break;case us.LegendTitle:s?.legend?.position!==void 0&&(s?.legend?.position===Ut.Top||s?.legend?.position===Ut.Bottom)&&(o=e.chartContainer.width()-20);break}if(o>0)if(i===us.YAxisTitle){let n=Number(t.get("fontSize"))||q.generalFontSize,l=n*2.4,h=Math.max(1,Math.floor(o/Math.max(n*.5,1)));t.adapters.remove("text"),t.adapters.add("text",u=>Ry({input:u??"",charsPerLine:h})),t.setAll({maxHeight:Math.min(o,l),maxWidth:o,breakWords:!1,oversizedBehavior:"none"})}else t.setAll({maxWidth:o,oversizedBehavior:"wrap"})}function J_(a){let{chart:e}=a;xc(a),e.events.onDebounced(Ti.BoundsChanged,()=>xc(a),q.debounceTime)}function oC(a){let{hour:e,minute:t=0,format:i,locale:r="en-US"}=a,s=i&&Object.keys(i).length>0?i:{hour:"numeric",minute:"2-digit",hour12:!1},o=e.toString();if(Number.isInteger(e)&&e>=0&&e<=23&&Number.isInteger(t)&&t>=0&&t<=59){let n=new Date(2e3,0,1,e,t);o=new Intl.DateTimeFormat(r,s).format(n),o.includes(":")||o.startsWith("0")&&(o=o.slice(1))}return o}function nC(a){let{weekdayNumber:e,format:t,locale:i="en-US",firstDayOfWeek:r=7}=a,s=t&&Object.keys(t).length>0?t:{weekday:"long"},o=e.toString();if(Number.isInteger(e)&&e>0&&e<=7&&Number.isInteger(r)&&r>0&&r<=7){let n=(e+r-1)%7,l=new Date(2e3,0,2+n);o=new Intl.DateTimeFormat(i,s).format(l)}return o}function lC(a){let{monthNumber:e,format:t,locale:i="en-US"}=a,r=t&&Object.keys(t).length>0?t:{month:"long"},s=e.toString();if(Number.isInteger(e)&&e>0&&e<=12){let o=new Date(2e3,e-1);s=new Intl.DateTimeFormat(i,r).format(o)}return s}function hC(a){let e=a.dataItem?.component;e instanceof Te?(e.uid!==void 0?ue(e.uid,"bulletTemplate"):void 0)?.adapters?.remove?.("fill"):e instanceof Ie?e.columns?.template?.adapters?.remove?.("fill"):e instanceof Ki&&e.slices?.template?.adapters?.remove?.("fill")}function Q_(a){let{element:e,fill:t,fillOpacity:i,pattern:r,chartBackgroundFill:s}=a,o=e.get("tooltip"),n=!0,l=e;if(r!==void 0){o!==void 0&&(n=!1,o.get("background")?.set("fill",t)),l.set("fillPattern",r);let h=s??t;l.set("fill",h),l.set("fillOpacity",1),hC(l)}else l.set("fill",t),l.remove("fillPattern"),l.set("fillOpacity",i);o!==void 0&&o.set("getFillFromSprite",n)}function _c(a,e){a.setAll({stroke:e.stroke,strokeDasharray:e.strokeDasharray,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth,lineCap:e.linecap})}function uC(a){let{element:e,markerSymbol:t,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,o;return e!==void 0&&t!==void 0&&(o=py({symbol:t,defaultToColorFromRamp:r,colorRampIndex:s}),o!==void 0&&(e.setAll({svgPath:o.path,rotation:o.angle,dx:o.xOffset,dy:o.yOffset}),Q_({element:e,fill:o.fill,fillOpacity:o.fillOpacity}),_c(e,o.outline)),Di(e,i)),o}function t0(a){let{root:e,element:t,fillSymbol:i,visible:r,defaultToColorFromRamp:s,colorRampIndex:o,isChartFillSymbol:n,keepCurrentVisibility:l,chartBackgroundColor:h}=a,u=Xc(i?.style),p=Ww(t),d=h??(u?Gw(p)??[...q.backgroundColor]:void 0),c;if(t!==void 0&&!t.isDisposed()){if(i!==void 0&&(c=py({root:e,symbol:i,defaultToColorFromRamp:s,colorRampIndex:o,isChartFillSymbol:n,chartBackgroundColor:d}),c!==void 0)){let f=d!==void 0?he(d).color:void 0;Q_({element:t,fill:c.fill,fillOpacity:c.fillOpacity,pattern:c.pattern,chartBackgroundFill:f}),_c(t,c.outline)}l||Di(t,r)}return c}function Vu(a){let{element:e,lineSymbol:t,visible:i,defaultToColorFromRamp:r,colorRampIndex:s}=a,o;return e!==void 0&&!e.isDisposed()&&(t!==void 0&&(o=py({symbol:t,defaultToColorFromRamp:r,colorRampIndex:s}),o!==void 0&&(_c(e,o),e instanceof Te&&_c(e.strokes.template,o))),Di(e,i)),o}function e0(a){let{root:e,element:t,seriesIndex:i,seriesSymbol:r,isChartFillSymbol:s,colorMatch:o,rendererSymbol:n,keepCurrentVisibility:l}=a,h,u;o&&n!==void 0&&(h=Wc({rendererSymbol:n,seriesSymbol:r,colorIndex:i}));let p={root:e,element:t,defaultToColorFromRamp:!0,colorRampIndex:i},d=h??{...r};switch(r.type){case ui.SLS:u=Vu({...p,lineSymbol:d});break;case ui.SFS:u=t0({...p,fillSymbol:d,isChartFillSymbol:s,keepCurrentVisibility:l});break;case ui.SMS:u=uC({...p,markerSymbol:d});break}return{symbolWithColorInfo:d,stylingInfo:u}}function P_(a,e){if(e!==void 0){let{elementColor:t,elementOutlineColor:i,elementOutlineWidth:r,rotation:s,transformation:o}=e,{opacity:n,scale:l}=o??{};t!==void 0&&a.setAll({fill:he(t).color,fillOpacity:1}),i!==void 0&&a.setAll({stroke:he(i).color,strokeOpacity:1}),r!==void 0&&a.setAll({strokeWidth:r}),s!==void 0&&a.setAll({rotation:s}),l!==void 0&&a.setAll({scale:l}),n!==void 0&&a.setAll({fillOpacity:n,strokeOpacity:n})}}function Fo(a){let{root:e,type:t,intlOptions:i,formatLocale:r}=a,s;switch(t){case Y.NumberAxisFormat:{s=vn.new(e,{}),s.set("intlLocales",r),s.set("numberFormat",i);break}case Y.DateAxisFormat:{s=xn.new(e,{}),s.set("intlLocales",r);break}}return s}function pC(a,e,t){let i=e-a,r=[];if(i!==0){if(t===1)r=[a];else if(t>1){let s=i/(t-1);r=[...tv(a,e,s),e]}}return r}function dC({x:a,mean:e,stddev:t,scalingFactor:i}){let r=-1/(2*t**2);return(i??1)*Math.exp(r*(a-e)**2)}function cC(a){let e=0;if(a.length>0)for(let t=0;t<a.length;t+=1)a[t].count>e&&(e=a[t].count);return e}function i0(a){let e=!1,t;if(a.target.dataItem?.component instanceof hi?{chart:t}=a.target.dataItem.component:(a.target instanceof ks||a.target instanceof Fa)&&({chart:t}=a.target),t instanceof Si||t instanceof Os){let i=et(t.uid,"actionMode");if(i!==void 0){let{originalEvent:r}=a;e=i===ms.MultiSelection||i===ms.MultiSelectionWithCtrlKey&&("ctrlKey"in r&&r.ctrlKey||"metaKey"in r&&r.metaKey)}}return e}function Ir(a){let{element:e,selected:t,multiSelect:i,isDateOrCategoryAxis:r,backToDefaultState:s}=a,o=!1;if(e!==void 0){let n=Fn(e.uid,"selected")??!1;o=n,i!==!0?r===!0?o=n?!1:n!==t:o=t:o=n!==t;let l=s===!0?Zl.Default:Zl.CustomInactive;e.states.apply(Zl.Default),e.states.apply(o?Zl.CustomActive:l),o!==n&&(Bw(e.uid,{selected:o}),o&&(e.toFront(),e.dataItem?.component instanceof hi&&e.dataItem.component.toFront()))}return o}function fC(a,e){let t=et(e.chart?.uid??Number.NaN,"actionMode"),i=i0(a);return t===ms.MonoSelection||t===ms.MultiSelectionWithCtrlKey&&!i}function eh(a,e){let{selectedElementsTheme:t,nonSelectedElementsTheme:i}=e??q.selectionTheme??{},r=a.states.create(Zl.CustomActive,{}),s=a.states.create(Zl.CustomInactive,{});P_(r,t),P_(s,i)}function Ql(a){let{value:e,valueFormat:t,formatLocale:i,root:r}=a,s=e?.toString(),o=Fo({type:t.type,intlOptions:t.intlOptions,formatLocale:i,root:r});return typeof e=="number"&&t.type===Y.NumberAxisFormat?s=o.format(e,Ec(t)):(typeof e=="number"||e instanceof Date)&&t.type===Y.DateAxisFormat&&(s=o.format(e,Ec(t))),s}async function Wrt(a){let{root:e,exportOptions:t}=a,{format:i,quality:r=1,...s}=t,o=r<0||r>1?1:r,n=await ko.new(e,{}).exportImage(i,{quality:o,...s}),l=Rw(n),h=i==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${i}`,{type:h})}function r0(a,e){if(a!==void 0&&e!==void 0&&(a.states.lookup("default")?.setAll({fill:e.fill,fillOpacity:e.fillOpacity}),e.outline!==void 0)){let{outline:t}=e;a.states.lookup("default")?.setAll({stroke:t.stroke,strokeOpacity:t.strokeOpacity,strokeDasharray:t.strokeDasharray,lineCap:t.linecap,strokeWidth:t.strokeWidth})}}function s0(a){let{numberFormatter:e,dataLabelsConfigContent:t,stackedType:i,externalDataLabelFormatter:r}=a;return(s,o)=>{let n=i===fs.Stacked100&&o!==void 0?o:s;return e.get("numberFormat").style==="percent"&&(n/=100),Eo({textSymbol:{...t,text:e.format(n)},format:r===void 0?"amChartsV5":"html"})}}function mC(a,e){let t=a.dataItem,i;switch(e){case Y.LineSeries:case Y.ScatterSeries:i=t.get("point");break;case Y.HistogramSeries:case Y.BarSeries:case Y.HeatSeries:i=t.get("graphics");break}let r=i??a,s=i?.x??r?.get("x")??0,o=i?.y??r?.get("y")??0;return{x:s,y:o}}function a0(a){let{label:e,chart:t,seriesType:i}=a,r=o=>{if(t instanceof Si){let n=mC(o,i),l=t.plotContainer,h=l.x(),u=l.y(),p=n.x<h||n.x>h+l.width()||n.y<u||n.y>u+l.height();o.setAll({visible:!p,forceHidden:p})}},s=$y((o,n)=>{n&&r(n)},q.debounceTime);e.on("x",s),e.on("y",s)}function gC(a){let{series:e,label:t,isHeatChart:i}=a;t.adapters.add("y",(r,s)=>{let{chart:o}=e,n=o!==void 0?et(o.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null){let u=h?.get("valueY"),p=s.localBounds().bottom;if(n!==!0){let d=q.dataLabelNegative?.paddingTop??0;if(e.get("stacked")||i)if(u<0)l+=p-d;else{let c=i?q.heatChartLabelPadding.paddingTop:0;l+=p/2+c}}else{let d=q.rotatedChartPadding?.paddingTop??0;l+=p/2+d}}return l}),t.adapters.add("x",(r,s)=>{let{chart:o}=e,n=o!==void 0?et(o.uid,"isRotated"):!1,l=typeof r=="number"?r:r?.value,h=s.dataItem;if(h!==void 0&&l!==void 0&&l!==null&&n===!0){let u=h?.get("valueX"),p=s.width()/2,d=q.rotatedChartPadding?.paddingRight??0,c=p+d;e.get("stacked")||(u<0?l-=c:l+=c)}return l})}function yC(a){let{series:e,isRotated:t,externalDataLabelFormatter:i}=a;e.bullets.push(()=>{let r=et(e.chart?.uid??Number.NaN,"config")?.series?.find(l=>l.id===e.get("id"))?.dataLabels??a.dataLabelsConfig,s=e.get("stacked"),o=Cs.new(e.root,{locationY:!s&&!t?1:void 0,locationX:!s&&t?1:void 0,sprite:Qt.new(e.root,{text:t?"{valueX}":"{valueY}",populateText:!0,centerY:X,centerX:gi,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:he(r?.content.color).color,fontSize:r?.content.font?.size})}),n=o.get("sprite");if(n){let l=n;o0({dataLabel:l,series:e,externalDataLabelFormatter:i}),n0({...a,dataLabelsConfig:r,dataLabel:l,dataLabelFormatter:s0})}return o})}function dy(a,e=1){a.bullets.removeIndex(e)}function vC(a){let{textBackgroundColor:e,chartBackgroundColor:t,fillOpacity:i}=a,r;return ah({r:e.r,g:e.g,b:e.b,a:i})?r=ah({r:t.r,g:t.g,b:t.b,a:i})?he(Dy).color:t:r=ah({r:t.r,g:t.g,b:t.b,a:i})?t:he(Ty).color,r}function bC(a){let{dataLabel:e,labelConfigColor:t,seriesColor:i,backgroundColor:r,autoInverseDataLabelTextColor:s,isHeatChart:o}=a,n=r??he(q.backgroundColor).color;s===!0&&i&&e.adapters.add("fill",(l,h,u)=>{let p=t??h.text.get("fill"),d=(h.dataItem?.component).get("stacked"),c=p;if(p&&(d||o)){let f=h.dataItem.get("graphics"),g=f?.get("fillOpacity");c=vC({textBackgroundColor:f?.get("fill")??i,chartBackgroundColor:n,fillOpacity:g})}return c})}function o0(a){let{dataLabel:e,series:t,externalDataLabelFormatter:i}=a;e.adapters.remove("text"),e.adapters.remove("html");let r=i!==void 0?"html":"text";cy({label:e,labelOutputProp:r}),e.adapters.add(r,(s,o)=>{let n=s??"",l=o.dataItem,h=ue(t.uid,t instanceof Ie?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(h!==void 0&&t.chart&&l){let u=et(t.chart.uid,"isRotated"),p=u===!0?l.get("valueX"):l.get("valueY"),d=u===!0?l.get("valueXTotalPercent"):l.get("valueYTotalPercent"),c=t.get("valueYShow")==="valueYTotalPercent"||t.get("valueXShow")==="valueXTotalPercent";n=h(c?d:p)}return r==="html"?jn(n):n})}function cy(a){let{label:e,labelOutputProp:t}=a,i=e;t==="html"?i.set("html",q.htmlEmptyContent):i.set("html",void 0)}function Sc(a){let{series:e,seriesConfig:t,dataLabel:i,labelDefaults:r,dataLabelsConfig:s,yAxisValueFormat:o,stackedType:n,isRotated:l,seriesType:h,defaultDataLabelFormatter:u,externalDataLabelFormatter:p}=a,{chart:d}=e;if(i!==void 0){let c=p,f=s?.content??{type:ui.TS};if(p===void 0&&u!==void 0&&o?.type===Y.NumberAxisFormat&&d){let x=et(d.uid,"formatLocale"),_=Fo({root:d.root,type:o.type,formatLocale:x,intlOptions:o.intlOptions});c=u({numberFormatter:_,dataLabelsConfigContent:f,stackedType:n,externalDataLabelFormatter:p})}let g;switch(h){case Y.BarSeries:g="barSeriesDataLabelFormatter";break;case Y.LineSeries:g="lineSeriesDataLabelFormatter";break;case Y.HistogramSeries:g="histogramDataLabelFormatter";break;case Y.ScatterSeries:g="scatterplotDataLabelFormatter";break;case Y.HeatSeries:g="heatChartDataLabelFormatter";break}g!==void 0&&vr(e.uid,{[g]:c}),s!==void 0&&(h===Y.HeatSeries?s.content.text="{value}":s.content.text=l===!0?"{valueX}":"{valueY}",s.visible=s.visible!==!1),th({label:i,labelConfig:s,defaults:r??q.dataLabel,skipSettingText:!0});let m=e.get("stacked"),y=m&&h===Y.BarSeries&&t?.hideOversizedStackedLabels!==!1,v=!m&&h===Y.BarSeries&&t?.hideOversizedSideBySideLabels===!0;v||y?i.setAll({oversizedBehavior:"hide",maxWidth:void 0,maxHeight:v?100:void 0}):i.setAll({oversizedBehavior:"none"})}}function xC(a){let{series:e,labelDefaults:t,externalDataLabelFormatter:i}=a;e.dataItems.forEach(r=>{let s=r.bullets?.[1];if(s){s.set("locationY",e.get("stacked")?void 0:1);let o=s.get("sprite");o&&(o0({dataLabel:o,series:e,externalDataLabelFormatter:i}),Sc({...a,dataLabel:o,labelDefaults:t,defaultDataLabelFormatter:s0,externalDataLabelFormatter:i}))}})}function n0(a){let{series:e,dataLabelsConfig:t,autoInverseDataLabelTextColor:i,externalDataLabelFormatter:r,labelDefaults:s,seriesType:o,dataLabel:n,isHeatChart:l,dataLabelFormatter:h}=a;n&&(e.chart&&t?.visible&&a0({label:n,chart:e.chart,seriesType:o}),gC({series:e,label:n,isHeatChart:l}),Sc({...a,dataLabel:n,labelDefaults:s,defaultDataLabelFormatter:h,externalDataLabelFormatter:r}),bC({dataLabel:n,labelConfigColor:he(t?.content.color).color,seriesColor:e.get("fill"),backgroundColor:e.chart?.get("background")?.get("fill"),autoInverseDataLabelTextColor:i,isHeatChart:l}))}function Grt(a){let{series:e,dataLabelsConfig:t}=a,i=t?.visible,r=e.bullets.hasIndex(1);i!==!0?r&&dy(e):(r||yC(a),xC(a))}function _C(a){let{dataLabel:e,series:t,externalDataLabelFormatter:i}=a;e.adapters.remove("text"),e.adapters.remove("html");let r=i!==void 0?"html":"text";cy({label:e,labelOutputProp:r}),e.adapters.add(r,(s,o)=>{let n=s??"",l=o.dataItem,h=ue(t.uid,"heatChartDataLabelFormatter"),u=et(t.chart?.uid??NaN,"config");if(h!==void 0&&l){let p=l.get("value"),d=l.get("categoryX"),c=l.get("categoryY");p===null?n=u?.series[0].emptyCells?.text??q.heatChart.emptyCells?.text??"":p!==void 0&&(n=h(p,d,c))}return r==="html"?jn(n):n})}function PC(a){let{numberFormatter:e,dataLabelsConfigContent:t}=a;return i=>Eo({textSymbol:{...t,text:e.format(i)},format:"amChartsV5"})}function $C(a){let{series:e,externalDataLabelFormatter:t}=a;e.bullets.push(()=>{let i=et(e.chart?.uid??Number.NaN,"config")?.series?.[0]?.dataLabels??a.dataLabelsConfig,r=Cs.new(e.root,{sprite:Qt.new(e.root,{text:"{value}",populateText:!0,centerY:X,centerX:gi,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:he(i?.content.color).color,fontSize:i?.content.font?.size,oversizedBehavior:"hide"})}),s=r.get("sprite");if(s){let o=s;_C({dataLabel:o,series:e,externalDataLabelFormatter:t}),n0({...a,dataLabelsConfig:i,dataLabel:o,isHeatChart:!0,dataLabelFormatter:PC}),o.set("oversizedBehavior","hide"),o.set("maxWidth",void 0),o.set("maxHeight",void 0)}return r})}function wC(a){let{series:e,dataLabelsConfig:t}=a,i=t?.visible;e.bullets.hasIndex(0)&&dy(e,0),i===!0&&$C(a)}var Mi={nameField:"name",fillField:"fill",strokeField:"stroke",fillOpacityField:"fillOpacity",strokeOpacityField:"strokeOpacity"};function l0(a,e){let t=Eu(a);a.columns.template.set("tooltip",t);let i=e!==void 0||ue(a.uid,"hasExternalTooltipFormatter")===!0,r=i?"tooltipHTML":"tooltipText";la({element:a.columns.template,labelOutputProp:r}),a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove("tooltipText"),a.columns.template.adapters.remove("tooltipHTML"),a.columns.template.adapters.add(r,(s,o)=>Fs({element:o,series:a,isHTML:i})),a.columns.each(s=>{s.set("tooltip",t),la({element:s,labelOutputProp:r}),s.adapters.remove("tooltipText"),s.adapters.remove("tooltipHTML"),s.adapters.add(r,(o,n)=>Fs({element:n,series:a,isHTML:i}))})}function h0(a){let{axesConfig:e,currentSeries:t,tooltipValueFormat:i}=a,{root:r,chart:s}=t;if(s){let o=e?.[1]?.valueFormat,n=e?.[0].valueFormat,l=et(s.uid,"formatLocale");if(o?.type===Y.NumberAxisFormat){let h=Fo({root:r,type:o.type,formatLocale:l,intlOptions:o.intlOptions});vr(t.uid,{tooltipValueYNumberFormatCallback:u=>h.format(u,i?.intlOptions??o.intlOptions)})}if(n?.type===Y.NumberAxisFormat){let h=Fo({root:r,type:n.type,formatLocale:l,intlOptions:n.intlOptions});vr(t.uid,{tooltipValueXNumberFormatCallback:u=>h.format(u,i?.intlOptions??n.intlOptions)})}}}function CC(a){let{axes:e,seriesConfig:t,series:i,fieldList:r,utilsStrings:s}=a,{dataTooltipVisible:o}=t,n,l=et(i.chart?.uid??0,"rtl")??!1,h=Nn(l);return o===!1?n=(u,p,d)=>"":n=(u,p,d)=>{let c=xr(r,t.x),f=bc(c,e?.[0].title?.content?.text),g=bc(s?.statistics.count??"",e?.[1]?.title?.content?.text??""),m=ue(i.uid,"tooltipValueXNumberFormatCallback"),y=ue(i.uid,"tooltipValueYNumberFormatCallback"),v=m?m(p):p,x=m?m(d):d,_=y?y(u):u;return`[bold]${f}${h} [/]${v} - ${x}
42
+ [bold]${g}${h} [/]${_}`},n}function SC(a){let{seriesConfig:e,series:t,tooltip:i}=a,{dataTooltipVisible:r}=e;if(r!==!1){let s=ue(t.uid,"histogramTooltipFormatter");if(s!==void 0){let o=i.dataItem;if(o!==void 0){let n=o.dataContext;return s(o.get("valueY")??0,n.minValue,n.maxValue)}}}return""}function fy(a,e){let t=Eu(a);a.columns.template.set("tooltip",t);let i=e!==void 0||ue(a.uid,"hasExternalTooltipFormatter")===!0,r=i?"tooltipHTML":"tooltipText";la({element:a.columns.template,labelOutputProp:r}),a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove("tooltipText"),a.columns.template.adapters.remove("tooltipHTML"),a.columns.template.adapters.add(r,(s,o)=>Fs({element:o,series:a,isHTML:i})),a.columns.each(s=>{s.set("tooltip",t),s.set("tooltipPosition","pointer"),la({element:s,labelOutputProp:r}),s.adapters.remove("tooltipText"),s.adapters.remove("tooltipHTML"),s.adapters.add(r,(o,n)=>Fs({element:n,series:a,isHTML:i}))})}function TC(a){let{series:e,tooltipFormatter:t,axesConfig:i,seriesConfig:r}=a,s=ue(e.uid,"hasExternalTooltipFormatter")===!0,o=t!==void 0;h0({axesConfig:i,currentSeries:e,tooltipValueFormat:r.dataTooltipValueFormat}),vr(e.uid,{histogramTooltipFormatter:t??CC(a),hasExternalTooltipFormatter:o}),s!==o&&fy(e,t)}function u0(a){let{pieChart:e,valueIntlOptions:t,percentageIntlOptions:i,displayNumericValue:r,displayPercentage:s,valuePrefix:o,valueSuffix:n,percentagePrefix:l,percentageSuffix:h}=a,{root:u}=e,p=et(e.uid,"formatLocale"),d=Fo({root:u,type:Y.NumberAxisFormat,intlOptions:t,formatLocale:p}),c=Fo({root:u,type:Y.NumberAxisFormat,intlOptions:{...i,style:"percent"},formatLocale:p}),f=Nn(et(e.uid,"rtl")??!1," ");return(g,m,y)=>{let v="";if(m!==void 0&&y!==void 0){let x=`${o??""}${d.format(m)}${n??""}`,_=`${l??""}${c.format(Math.abs(y/100))}${h??""}`;Number.isFinite(m)?r===!0&&s===!0?v=`${_}${f}(${x})`:r===!0?v=x:s===!0&&(v=_):v=""}return v}}function DC(a,e){let t=(f,g,m)=>"",{numericValueFormat:i,percentValueFormat:r,dataTooltipValueFormat:s,dataTooltipPercentFormat:o,displayCategoryOnTooltip:n,displayNumericValueOnTooltip:l,displayPercentageOnTooltip:h,valuePrefix:u,valueSuffix:p,percentagePrefix:d,percentageSuffix:c}=e;return t=(f,g,m)=>{let y="",{chart:v}=a;if(v){let x=u0({pieChart:v,valueIntlOptions:(s??i)?.intlOptions,percentageIntlOptions:(o??r)?.intlOptions,displayNumericValue:l??q.pieChart.displayNumericValueOnTooltip,displayPercentage:h??q.pieChart.displayPercentageOnTooltip,valuePrefix:u,valueSuffix:p,percentagePrefix:d,percentageSuffix:c})("",g,m),_=!pr(f)&&(n??q.pieChart.displayCategoryOnTooltip);if(_&&(y=`[bold]${f}[/]`),!pr(x)){let $=Iy(x);y=_?`${y}
43
+ ${$}`:$}}return y},t}function kC(a){let e=a.get("tooltip");if(e!==void 0){let t=a.get("fill");t instanceof Aa&&(t=t.get("fill")),e.get("background")?.set("fill",t)}}function AC(a){let{pieSeries:e,tooltip:t}=a,i="",{chart:r}=e;if(r!==void 0&&t!==void 0){let s=et(r.uid,"config"),{dataTooltipVisible:o}=s?.series[0]??{};if(o!==!1){let n=ue(e.uid,"pieChartTooltipFormatter");if(n){let l=t.dataItem;if(l!==void 0){let h=l,u=h.get("category")??"",p=l.dataContext,d=Uc(p);d===void 0&&(d=u);let c=h.get("value"),f=h.get("valuePercentTotal");typeof c=="number"&&c!==0&&s?.series?.[0]?.dataTooltipVisible!==!1?(t.set("disabled",!1),kC(h.get("slice")),i=n(u,c,f,d)):t.set("disabled",!0)}}}else return}return i}function p0(a,e){let t=a.slices.template,i=Eu(a),r=e!==void 0||ue(a.uid,"hasExternalTooltipFormatter")===!0,s=r?"tooltipHTML":"tooltipText";la({element:t,labelOutputProp:s}),t.setAll({tooltip:i,tooltipPosition:q.sliceTooltipPosition}),t.adapters.remove("tooltipText"),t.adapters.remove("tooltipHTML"),t.adapters.add(s,(o,n)=>{let l=" ";try{let h=n.get("tooltip");h&&(h.dataItem=n.dataItem,l=Fs({element:h,series:a,isHTML:r}))}catch{}return l}),t.set(s," "),a.slices.each(o=>{o.set("tooltip",i),o.set("tooltipPosition","fixed"),la({element:o,labelOutputProp:s}),o.adapters.remove("tooltipText"),o.adapters.remove("tooltipHTML"),o.adapters.add(s,(n,l)=>{let h=" ";try{let u=l.get("tooltip");u&&(u.dataItem=l.dataItem,h=Fs({element:u,series:a,isHTML:r}))}catch{}return h})})}function Urt(a){let{series:e,seriesConfig:t,tooltipFormatter:i}=a,r=ue(e.uid,"hasExternalTooltipFormatter")===!0,s=i!==void 0;vr(e.uid,{pieChartTooltipFormatter:i??DC(e,t),hasExternalTooltipFormatter:s}),r!==s&&p0(e,i)}function OC(a){let{axesConfig:e,seriesConfig:t,series:i,fieldList:r}=a,{dataTooltipVisible:s}=t,o,{chart:n}=i,l=n?.uid!==void 0?et(n.uid,"rtl"):!1,h=Nn(l??!1);return s===!1?o=(u,p,d,c)=>"":o=(u,p,d,c)=>{let f=xr(r,t.x),g=pr(e?.[0].title?.content?.text)?f:e?.[0].title?.content?.text,m=xr(r,t.y),y=pr(e?.[1]?.title?.content?.text)?m:e?.[1]?.title?.content?.text,v=ue(i.uid,"tooltipValueXNumberFormatCallback"),x=v?v(u):u,_=ue(i.uid,"tooltipValueYNumberFormatCallback"),$=_?_(p):p,T=`[bold]${g}${h} [/]${x}
44
+ [bold]${y}${h} [/]${$}`;if(d!==void 0&&t.sizePolicy?.field!==void 0){let S=xr(r,t.sizePolicy?.field),k=_?_(d):d;T+=`
45
+ [bold]${S}${h} [/]${k}`}return t.additionalTooltipFields?.forEach(S=>{let k=xr(r,S),A=r?.find(I=>I.name===S),L=c?.[S],O="";if(L!=null&&L!==void 0&&A)if(iv(A)&&typeof L=="number")O=String(_?_(L):L);else if(tf(A)){let I=new Date(L),R=n?et(n.uid,"formatLocale"):void 0;O=new Intl.DateTimeFormat(R,{}).format(I)}else A.type===Ku.String&&typeof L=="string"&&(O=L);T+=l?`
46
+ ${O}[bold]${k}${h} [/]`:`
47
+ [bold]${k}${h} [/]${O}`}),T},o}function LC(a){let{seriesConfig:e,markerSeries:t,tooltip:i}=a,{x:r,y:s,sizePolicy:o,dataTooltipVisible:n}=e,{field:l}=o??{};if(n!==!1){let h=ue(t.uid,"scatterplotTooltipFormatter");if(!i.isHidden()&&h){let{dataItem:u}=i;if(u){let p=u.dataContext;if(p){let d=r in p&&typeof p[r]=="number"?Number(p[r]):Number.NaN,c=s in p&&typeof p[s]=="number"?Number(p[s]):Number.NaN,f=l&&l in p&&typeof p[l]=="number"?Number(p[l]):void 0;return h(d,c,f,p)}}}}}function FC(a){let{axesConfig:e,series:t,seriesConfig:i,tooltipFormatter:r}=a;h0({axesConfig:e,currentSeries:t,tooltipValueFormat:i.dataTooltipValueFormat}),vr(t.uid,{scatterplotTooltipFormatter:r??OC(a),hasExternalTooltipFormatter:r!==void 0});let s=ue(t.uid,"bulletTemplate");s&&Tc({series:t,element:s,tooltipFormatter:r})}function $_(a,e){if(e!==void 0){let t=Uw(e);t!==void 0&&a.label.setAll({fill:ah({r:t.r,g:t.g,b:t.b,a:1})?Wi("#000000"):Wi("#ffffff")})}}function MC(a){a.label.setAll({paddingTop:4,paddingBottom:4})}function RC(a,e){let{dataTooltipStyleReversed:t,dataTooltipStyle:i}=q;if(e===!0){let r=a.get("background")?.get("fill");if(r!==void 0)if($_(a,a.get("background")?.get("fill")?.toCSS()),t?.color!==void 0&&r.toCSSHex()!==he(t.color).color.toCSSHex()){a.get("background")?.setAll({fill:he(t.color).color,stroke:r,strokeWidth:t.outline?.width??Number.NaN});let s=a.get("background");if(s instanceof kt&&s.parent instanceof Ci){let o=s.parent.get("tooltipTarget");s.set("strokeOpacity",o instanceof kt?o.get("fillOpacity"):void 0)}a.get("background")?.adapters.enable("fillOpacity")}else r.toCSSHex()===he(t?.color).color.toCSSHex()&&a.get("background")?.adapters.disable("fillOpacity")}else $_(a,a.get("background")?.get("fill")?.toCSS()),a.setAll({getStrokeFromSprite:!0,getFillFromSprite:!0}),a.get("background")?.adapters.enable("fillOpacity"),a.get("background")?.setAll({strokeWidth:i?.outline?.width??Number.NaN,stroke:he(i?.outline?.color).color})}function IC(a){a.get("background")?.adapters.add("fillOpacity",(e,t)=>{let i=e;if(t.parent instanceof Ci){let r=t.parent.get("tooltipTarget");i=r instanceof kt?r.get("fillOpacity"):i}return i})}function Eu(a){let{root:e,chart:t}=a,i=Ci.new(e,{});return i.label.setAll({oversizedBehavior:"wrap",maxWidth:q.tooltipWidth}),i.adapters.add("visible",(r,s)=>(r&&EC(s,a),r)),IC(i),VC(i,t),i}function Tc(a){let{series:e,element:t,tooltipFormatter:i}=a,r,s=Eu(e);t&&t.get("tooltip")===void 0?(r=t,t.setAll({tooltip:s,tooltipPosition:q.markerTooltipPosition})):r=s;let o=i!==void 0||ue(e.uid,"hasExternalTooltipFormatter")===!0,n=o?"tooltipHTML":"tooltipText";la({element:r,labelOutputProp:n}),r instanceof Ci?(r.adapters.remove("tooltipText"),r.adapters.remove("tooltipHTML"),r.adapters.add(n,(h,u)=>Fs({element:u,series:e,isHTML:o}))):r instanceof jt&&(r.adapters.remove("tooltipText"),r.adapters.remove("tooltipHTML"),r.adapters.add(n,(h,u)=>Fs({element:u,series:e,isHTML:o})));let l=h=>{h.set("tooltip",s),h.set("tooltipPosition",q.markerTooltipPosition),la({element:h,labelOutputProp:n}),h.adapters.remove("tooltipText"),h.adapters.remove("tooltipHTML"),h.adapters.add(n,(u,p)=>Fs({element:p,series:e,isHTML:o}))};return e.bulletsContainer.children.each(h=>{h instanceof yi&&l(h)}),s}function la(a){let{element:e,labelOutputProp:t}=a,i=t==="tooltipHTML";if(e instanceof Ci)i?(e.label.set("html",q.htmlEmptyContent),e.label.set("text","")):e.label.set("html",void 0);else if(e instanceof yi){let r=e.get("tooltip");r&&(i?(r.label.set("html",q.htmlEmptyContent),r.label.set("text","")):r.label.set("html",void 0)),e.set("tooltipText",i?void 0:q.htmlEmptyContent),e.set("tooltipHTML",i?q.htmlEmptyContent:void 0)}else e instanceof jt&&(e.set("tooltipText",i?void 0:q.htmlEmptyContent),e.set("tooltipHTML",i?q.htmlEmptyContent:void 0))}function VC(a,e){if(a){let t=et(e?.uid??0,"rtl");a.label.set("direction",t?"rtl":"ltr"),MC(a)}}function EC(a,e){let{chart:t}=e;if(t&&a){let i=et(t.uid,"config");if(i){let{seriesConfig:r}=Ac(e,i);if(r){let{dataTooltipReverseColor:s}=r;RC(a,s)}}}}function NC(a){let{seriesConfig:e,series:t,tooltip:i,isRotated:r}=a,s=ue(t.uid,"barAndLineTooltipFormatter");if(s!==void 0){let o=i.dataItem;if(o!==void 0){let n=o.get("valueX"),l=o.get("valueY"),h=o.get("valueXTotalPercent"),u=o.get("valueYTotalPercent"),p=r?n:l,d;r&&typeof h=="number"?d=h:!r&&typeof u=="number"&&(d=u),d&&(d/=100);let c=o.dataContext??{},f=et(t.chart?.uid??0,"config"),g=et(t.chart?.uid??0,"rendererFieldNames"),m=Gc({value:c[e.x],dataContext:c,useRendererLabel:Ny(f,g),specificField:zy(ji([e]),e)}),y=Uc(c);y===void 0&&(y=m);let v=c[q.dateBinningRange];if(y!==void 0||p!==void 0||d!==void 0||v!==void 0)return s({seriesName:t.get("name")??e.name,xValue:m,originalXValue:y,dateBinningRange:v,statValue:p,percentValue:d})}}}function w_(a,e){if(a instanceof Ci)a.set("forceHidden",e);else{let t=a.get("tooltip");t&&t.set("forceHidden",e)}}function Fs(a){let{element:e,series:t,isHTML:i}=a,r,{chart:s}=t;if(s!==void 0){let n=et(s.uid,"config"),{seriesConfig:l}=Ac(t,n),{dataTooltipVisible:h}=n?.series[0]??{};if(h===!1||!l)r="",w_(e,!0);else switch(w_(e,!1),l.type){case Y.ScatterSeries:t instanceof Te&&(r=LC({seriesConfig:l,markerSeries:t,tooltip:e}));break;case Y.BarSeries:case Y.LineSeries:case Y.RadarSeries:r=NC({seriesConfig:l,series:t,tooltip:e,isRotated:n?.rotated??!1});break;case Y.HistogramSeries:r=SC({seriesConfig:l,series:t,tooltip:e});break;case Y.HeatSeries:r=zC({heatSeries:t,tooltip:e});break;case Y.PieSeries:t instanceof Ki&&e instanceof Ci&&(r=AC({pieSeries:t,tooltip:e}));break}}let o=r??"";if(i){let n=jn(o),l=e instanceof Ci?e:e.get("tooltip");return l&&l.label.setAll({html:n,text:""}),n}return o}function BC(a){let{series:e,dateRange:t,xAxisValueFormat:i}=a,r;if(t!==void 0&&t.length>0){let s=e.chart?.uid??Number.NaN,o=et(s,"timeIntervalInfo"),n=et(s,"config"),l=et(s,"options"),h=et(s,"queryObject"),u=n&&ef(n.series[0])?n.series[0].temporalBinning?.outTimeZone:void 0,p={};switch(o?.unit){case Ma.Second:p={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};break;case Ma.Minute:p={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ma.Hour:p={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case Ma.Day:case Ma.Week:case Ma.Month:case Ma.Year:p={month:"numeric",day:"numeric",year:"numeric"};break}Zy({chartConfig:n,queryObject:h,options:l})&&(p.timeZone=u??i.intlOptions.timeZone);let d=new Date(t[0]),c=new Date(t[1]),{root:f}=e;if(!Number.isNaN(d.valueOf())&&e.chart!==void 0){let g=et(e.chart.uid,"formatLocale"),m=Fo({root:f,type:Y.DateAxisFormat,formatLocale:g,intlOptions:p}),y=m.format(d,p);if(r=y,!Number.isNaN(c.valueOf())){let v=m.format(c,p);v!==y&&(r=`${r} - ${v}`)}}}return r?.toString()??""}function jC(a){let{seriesConfig:e,xAxisValueFormat:t,setTimeBinningInfoWhenNotProvided:i,dataTooltipValueFormat:r,dataTooltipDateFormat:s,series:o,xValue:n,dateBinningRange:l,isTimeOnlyField:h,queryObject:u}=a,{root:p}=o,d,c=et(o.chart?.uid??0,"formatLocale");return av({seriesConfig:e,xAxisValueFormatType:t?.type,setTimeBinningInfoWhenNotProvided:i,queryObject:u})&&l!==void 0&&t?.type===Y.DateAxisFormat?d=BC({series:o,dateRange:l,xAxisValueFormat:t}):Cy(t)?h&&typeof n=="number"?d=new Date(n).toLocaleTimeString(c):(n instanceof Date||typeof n=="number"&&Number.isFinite(n))&&(d=Ql({root:p,value:n,valueFormat:s??t,formatLocale:c})):typeof n=="number"&&Nc(t)?d=Ql({root:p,value:n,valueFormat:r??t,formatLocale:c}):d=n,d?.toString()??""}function HC(a){let{isStacked100:e,series:t,statValue:i,percentValue:r,yAxisValueFormat:s,dataTooltipValueFormat:o,dataTooltipPercentFormat:n}=a,l=t.chart?.uid??0,{root:h}=t,u=o;u===void 0&&(Nc(s)&&s?(u=s,e&&(u.intlOptions.style="decimal")):u=ky());let p=et(l,"formatLocale"),d=i!==void 0?Ql({root:h,value:i,valueFormat:u,formatLocale:p}):"",c="";if(e&&r!==void 0&&h!==void 0){let f=n;f===void 0&&(f=Ay(),f.intlOptions.minimumFractionDigits=2,f.intlOptions.maximumFractionDigits=2),c=Ql({root:h,value:r,valueFormat:f,formatLocale:p})}return{formattedStatValue:d,formattedPercentValue:c}}function XC(a){let{utilsStrings:e,fieldList:t,queryObject:i,series:r,seriesConfig:s,seriesIndex:o,setTimeBinningInfoWhenNotProvided:n}=a,{chart:l}=r,{dataTooltipDateFormat:h,dataTooltipPercentFormat:u,dataTooltipValueFormat:p}=s,d=()=>"";if(l!==void 0){let c=et(l.uid,"config");if(c!==void 0){let{dataTooltipVisible:f}=s,g=r instanceof Te?s.markerVisible:void 0;if(f!==!1&&g!==!1){let m=c.axes,y=m[0].valueFormat,v=m[1].valueFormat,x=t?.find(R=>R.name===s.x)?.type===Ku.TimeOnly,_=ji(c.series),$=sh(c)===fs.Stacked100,T=Va(i),S=Hn(T).idField,k=xr(t,s.x),A=bc(k,m[0].title?.content.text),L=Iw({config:c,fieldList:t,objectIdField:S,seriesIndex:o,utilsStrings:e,isStacked100:$}),O=et(l.uid,"rtl"),I=Nn(O??!1);d=R=>{let{seriesName:B,statValue:Z,percentValue:j,xValue:it,dateBinningRange:st}=R,ht=jC({seriesConfig:s,xAxisValueFormat:y,dataTooltipValueFormat:p,dataTooltipDateFormat:h,setTimeBinningInfoWhenNotProvided:n,series:r,xValue:it,dateBinningRange:st,isTimeOnlyField:x,queryObject:i}),{formattedStatValue:dt,formattedPercentValue:Xt}=HC({isStacked100:$,yAxisValueFormat:v,dataTooltipValueFormat:p,dataTooltipPercentFormat:u,series:r,statValue:Z,percentValue:j}),tt=[`[bold]${A}${I} [/]${ht}`];switch(_){case Ct.BarAndLineFromFields:{tt.pop();let Tt=Y_({config:c,fieldName:xr(t,ht??""),utilsStrings:e});tt.push(`[bold]${Tt}${I} [/]${dt}`);break}case Ct.BarAndLineMonoField:case Ct.BarAndLineNoAggregation:case Ct.BarAndLineMultiFields:tt.push(`[bold]${L}${I} [/]${dt}`);break;case Ct.BarAndLineSplitByNoAggregation:case Ct.BarAndLineSplitBy:{let Tt=lh(s.query?.where,!1),Nt=Xy({value:xr(t,Tt),escape:!0});tt.push(`[bold]${Nt}${I} [/]${B}
48
+ [bold]${L}${I} [/]${dt}`)}break}return $&&tt.push(`[bold]${e.statistics.percent}${I} [/]${Xt}`),tt.join(`
49
+ `)}}}}return d}function Krt(a){let{series:e,tooltipFormatter:t,seriesConfig:i}=a,r=ue(e.uid,"hasExternalTooltipFormatter")===!0,s=t!==void 0;if(vr(e.uid,{barAndLineTooltipFormatter:t??XC(a),hasExternalTooltipFormatter:s}),r!==s)switch(i.type){case Y.BarSeries:{e instanceof Ie&&l0(e,t);break}case Y.LineSeries:case Y.RadarSeries:{if(e instanceof Te){let o=ue(e.uid,"bulletTemplate");o&&Tc({series:e,element:o,tooltipFormatter:t})}break}}}function qrt(a){let{chartType:e,series:t,tooltipFormatter:i}=a;switch(!0){case(e===Y.HistogramSeries&&t instanceof Ie):{fy(t,i);break}case(e===Y.PieSeries&&t instanceof Ki):{let r=ue(t.uid,"tooltipCallback");r&&r.dispose();let s=t.events.on(Ti.DataValidated,()=>{p0(t,i)});vr(t.uid,{tooltipCallback:s});break}case(e===Y.HeatSeries&&t instanceof Ie):{my(t,i);break}case((e===Y.ComboLineAndBarSeries||e===Y.BarSeries)&&t instanceof Ie):{l0(t,i);break}case(t instanceof Te&&(e===Y.ComboLineAndBarSeries||e===Y.LineSeries||e===Y.RadarSeries||e===Y.ScatterSeries)):{let r=ue(t.uid,"bulletTemplate");r&&Tc({series:t,element:r,tooltipFormatter:i});break}}}function Pc(a){let{value:e,formatLocale:t,unit:i,config:r,utilsStrings:s}=a,o={label:"",value:e.toString()};switch(i){case ha.DayOfWeek:o={label:s.heatChartCalendarDatePartsUnits.dayOfWeek,value:nC({weekdayNumber:e,firstDayOfWeek:"firstDayOfWeek"in r?r.firstDayOfWeek:q.heatChartFirstDayOfWeek,locale:t})};break;case ha.MonthOfYear:o={label:s.heatChartCalendarDatePartsUnits.monthOfYear,value:lC({monthNumber:e,locale:t})};break;case ha.HourOfDay:o={label:s.heatChartCalendarDatePartsUnits.hourOfDay,value:oC({hour:e,format:{hour:"numeric",hour12:!1},locale:t})};break;case ha.DayOfMonth:o={label:s.heatChartCalendarDatePartsUnits.dayOfMonth,value:typeof e=="string"?e:e?.toString()??""};break;case ha.DayOfYear:o={label:s.heatChartCalendarDatePartsUnits.dayOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case ha.MinuteOfDay:o={label:s.heatChartCalendarDatePartsUnits.minuteOfDay,value:typeof e=="string"?e:e?.toString()??""};break;case ha.WeekOfYear:o={label:s.heatChartCalendarDatePartsUnits.weekOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case ha.QuarterOfYear:o={label:s.heatChartCalendarDatePartsUnits.quarterOfYear,value:typeof e=="string"?e:e?.toString()??""};break}return o}function YC(a){let{columnSeries:e,seriesConfig:t,utilsStrings:i,fieldList:r,queryObject:s}=a;return(o,n,l)=>{let h="",u=o,p=et(e.chart?.uid??0,"rtl"),d=et(e.chart?.uid??0,"config");if(Qu(d)){u!==null?e.chart&&(u=Fo({root:e.chart.root,type:"number",intlOptions:{}}).format(o)):u=d.series[0].emptyCells?.text??q.heatChart.emptyCells?.text??"";let c=Nn(p??!1),f=t.query?.outStatistics?.[0].onStatisticField,g=Va(s),m=i.statistics.count;f!==Hn(g).idField&&(m=Y_({config:d,fieldName:xr(r,t.query?.outStatistics?.[0].onStatisticField??""),utilsStrings:i}));let y=et(e.chart?.uid??0,"formatLocale"),v={label:t.x,value:n},x={label:t.y,value:l};if(t.xTemporalBinning!==void 0){let{label:_,value:$}=Pc({value:Number(n),config:d,formatLocale:y,unit:t.xTemporalBinning.unit,utilsStrings:i});!pr(_)&&!pr($)&&(v={label:_,value:$})}if(t.yTemporalBinning!==void 0){let{label:_,value:$}=Pc({value:Number(l),config:d,formatLocale:y,unit:t.yTemporalBinning.unit,utilsStrings:i});!pr(_)&&!pr($)&&(x={label:_,value:$})}pr(h)&&(h=`[bold]${v.label}${c} [/]${v.value}
50
+ [bold]${x.label}${c} [/]${x.value}
51
+ [bold]${m}${c}[/] ${u} [/]]`)}return h}}function zC(a){let{heatSeries:e,tooltip:t}=a,i="",{chart:r}=e;if(r!==void 0&&t!==void 0){let s=et(r.uid,"config"),{dataTooltipVisible:o}=s?.series[0]??{};if(o!==!1){let n=ue(e.uid,"heatChartTooltipFormatter");if(n){let l=t.dataItem;if(l!==void 0){let h=l.dataContext;if(s?.series?.[0]?.dataTooltipVisible!==!1){let u=h?.[pi.valueField]??null,p=h?.[pi.xField],d=h?.[pi.yField];i=n(u,p,d)}}}}else return}return jn(i)}function my(a,e){let t=Eu(a);a.columns.template.set("tooltip",t);let i=e!==void 0||ue(a.uid,"hasExternalTooltipFormatter")===!0,r=i?"tooltipHTML":"tooltipText";la({element:a.columns.template,labelOutputProp:r}),a.columns.template.setAll({tooltipPosition:q.columnTooltipPosition}),a.columns.template.adapters.remove("tooltipText"),a.columns.template.adapters.remove("tooltipHTML"),a.columns.template.adapters.add(r,(s,o)=>Fs({element:o,series:a,isHTML:i})),a.columns.each(s=>{s.set("tooltip",t),s.set("tooltipPosition","pointer"),la({element:s,labelOutputProp:r}),s.adapters.remove("tooltipText"),s.adapters.remove("tooltipHTML"),s.adapters.add(r,(o,n)=>Fs({element:n,series:a,isHTML:i}))})}function WC(a){let{series:e,seriesConfig:t,utilsStrings:i,fieldList:r,options:s,queryObject:o}=a,n=ue(e.uid,"hasExternalTooltipFormatter")===!0,l=s?.tooltipFormatter!==void 0;vr(e.uid,{heatChartTooltipFormatter:s?.tooltipFormatter??YC({columnSeries:e,seriesConfig:t,utilsStrings:i,fieldList:r,queryObject:o}),hasExternalTooltipFormatter:l}),n!==l&&my(e,s?.tooltipFormatter)}function $c(a){let e={type:ui.SLS,color:[0,0,0,0],width:0},t=a?.color?a:e,i=a?.color?he(a.color).color:void 0,r=a?.color?he(a.color).opacity:void 0;return{outlineSymbol:t,outlineColor:i,outlineOpacity:r}}function Zrt(a){let{root:e,xAxis:t,yAxis:i,options:r,chartConfig:s,queryObject:o,errorStrings:n}=a,l=Ie.new(e,{calculateAggregates:!0,stroke:he(q.backgroundColor).color,clustered:!1,turboMode:!0,xAxis:t,yAxis:i,categoryXField:pi.xField,categoryYField:pi.yField,valueField:pi.valueField});return l.columns.template.setAll({tooltipText:`x: {${pi.xField}}
52
+ y: {${pi.yField}}
53
+ Value: {${pi.valueField}}`,width:X,height:X}),my(l,r?.tooltipFormatter),by(l,s),eh(l.columns.template,r?.selectionTheme),vy({element:l.columns.template,series:l,queryObject:o,errorStrings:n}),l}function GC(a){let{columnSeries:e,data:t,loaderHandle:i}=a;t?.dataItems&&(e.events.once(Ti.DataValidated,()=>{i.hideLoader()}),e.data.setAll(t.dataItems))}function UC(a){let{columnSeries:e,seriesConfig:t}=a,{gradientHeatRules:i}=q.heatChart,{gradientRules:r,heatRulesType:s,gridLine:o}=t,n=t.emptyCells?.symbol??q.heatChart.emptyCells?.symbol,l=r?.colorList?.[0]??i.minColor,h=r?.colorList?.[1]??i.maxColor,u=r?.outsideRangeLowerColor??i.outsideRangeLowerColor,p=r?.outsideRangeUpperColor??i.outsideRangeUpperColor,{minValue:d,maxValue:c}=r??{},{color:f,opacity:g}=he(l),{color:m,opacity:y}=he(h),v=he(u),x=he(p);e.set("heatRules",[{target:e.columns.template,dataField:"value",key:"fill",customFunction:(_,$,T,S)=>{let k=_.dataItem?.dataContext;if(_ instanceof kt){let A,L,O,I=!1;if(s===Io.Renderer){let R=k?.[Et.rendererSymbolField];if(Xn(R)){O=Ro(R);let{outlineSymbol:B}=$c(o);O.outline=B}else I=!0}if((!Number.isFinite(S)||I)&&n){O=Ro(n);let{outlineSymbol:R}=$c(o);O.outline=R}if(O){let R=t0({root:e.root,element:_,fillSymbol:O});r0(_,R)}else typeof d=="number"&&S<d?{color:A,opacity:L}=v:typeof c=="number"&&S>c?{color:A,opacity:L}=x:$===T?(A=f,L=g):(A=yt.interpolate((S-$)/(T-$),f,m,"rgb"),L=g+(S-$)/(T-$)*(y-g)),A&&_.set("fill",A),L!==void 0&&_.set("fillOpacity",L)}}}])}function KC(a,e){e?.color?Vu({element:a.columns.template,lineSymbol:e}):a.columns.template.setAll({strokeOpacity:0,strokeWidth:0})}function Jrt(a){let{series:e,data:t,loaderHandle:i,dataWasUpdated:r,sortChanged:s,timeZoneChanged:o,seriesWereReinitialized:n,seriesConfig:l,autoInverseDataLabelTextColor:h,options:u,queryObject:p,chartConfig:d}=a,c=r===!0||s===!0||o||n===!0;e.set("id",l.id),Di(e,l.visible),L_(e,!1),eh(e.columns.template,u?.selectionTheme),N0(e.columns.template,t?.dataItems?.length),WC(a),KC(e,l.gridLine),UC({columnSeries:e,seriesConfig:l}),c&&GC({columnSeries:e,data:t,loaderHandle:i}),wC({seriesType:Y.HeatSeries,series:e,seriesConfig:l,dataLabelsConfig:l.dataLabels,yAxisValueFormat:{intlOptions:{},type:"number"},autoInverseDataLabelTextColor:h,externalDataLabelFormatter:u?.dataLabelFormatter});let{chart:f}=e;f&&qC({seriesConfig:l,queryObject:p,chartConfig:d,chart:f}),u?.interactionsDisabled&&L_(e,!0)}function qC(a){let{seriesConfig:e,queryObject:t,chartConfig:i,chart:r}=a,s;if(e.heatRulesType===Io.Renderer)s={heatRulesType:Io.Renderer,seriesColors:c0({queryObject:t,chartConfig:i,forLegend:!1})};else{let{gradientHeatRules:o}=q.heatChart,{gradientRules:n}=e;s={heatRulesType:Io.Gradient,seriesColors:{startColor:n?.colorList?.[0]??o.minColor,endColor:n?.colorList?.[1]??o.maxColor}}}rp({chartId:r.get("id"),data:s,colorMatchApplied:!1,htmlContainer:r.root.dom})}function d0(a,e){let t="",i,r,s;return a&&typeof a=="object"&&(t="label"in a&&typeof a.label=="string"?a.label:"",i="symbol"in a&&a.symbol&&typeof a.symbol=="object"&&"color"in a.symbol&&Array.isArray(a.symbol.color)?a.symbol.color:void 0,s="symbol"in a&&a.symbol&&typeof a.symbol=="object"&&"outline"in a.symbol&&Array.isArray(a.symbol.outline)?a.symbol.outline:void 0,e&&(Array.isArray(i)&&({color:i,opacity:r}=he(i)),Array.isArray(s)&&(s=he(s).color))),{legendItemLabel:t,legendItemColor:i,legendItemColorOpacity:r,legendItemStrokeColor:s}}function ZC(a){let e,{outlineColor:t,outlineOpacity:i,dataItems:r,valueField:s,classBreakInfo:o,classBreakIndex:n,numberOfClassBreaks:l,evaluateUpTo:h}=a,{legendItemLabel:u,legendItemColor:p,legendItemColorOpacity:d}=d0(o,!0);if(o&&typeof o=="object"&&p&&!Array.isArray(p)){let c=!0;if(r&&s){let f="classMinValue"in o&&typeof o.classMinValue=="number"?o.classMinValue:-1/0,g="classMaxValue"in o&&typeof o.classMaxValue=="number"?o.classMaxValue:1/0,m=n===l-1;c=r.some(y=>{let v=y[s];return m||h?typeof v=="number"&&v>=f&&v<=g:typeof v=="number"&&v>=f&&v<g})}c&&(e={[Mi.nameField]:u,[Mi.fillField]:p,[Mi.strokeField]:t,[Mi.fillOpacityField]:d,[Mi.strokeOpacityField]:i})}return e}function JC(a){let e,{legendItemLabel:t,legendItemColor:i,legendItemStrokeColor:r}=d0(a,!1);return Array.isArray(i)&&(!r||Array.isArray(r))&&(e={label:t,symbol:{type:ui.SFS,style:Ri.Solid,color:i,outline:{type:ui.SLS,color:r??i}}}),e}function c0(a){let{queryObject:e,chartConfig:t,forLegend:i,series:r}=a,s,o=Va(e),n=t.series?.[0],l=t.chartRenderer??o?.renderer?.toJSON(),{outlineColor:h,outlineOpacity:u}=$c(n?.gridLine);if((l?.type==="classBreaks"||l?.type==="class-breaks")&&"classBreakInfos"in l){let p=r?.data.values,d=r?.get("valueField")??pi.valueField,c=l.classBreakInfos?.[0],f=c?c.classMinValue===c.classMaxValue:!1;s=l.classBreakInfos.map((g,m)=>{let y;return i?y=ZC({outlineColor:h,outlineOpacity:u,dataItems:p,valueField:d,classBreakInfo:g,classBreakIndex:m,numberOfClassBreaks:l.classBreakInfos.length,evaluateUpTo:f}):y=JC(g),y}).filter(Boolean)}return s}var f0="arcgis_charts_title_container",QC="arcgis_charts_subtitle_container",m0="arcgis_charts_footer_container",Qrt="arcgis_charts_title",tst="arcgis_charts_subtitle",est="arcgis_charts_footer",ur="arcgis_charts_legend_container",ds="arcgis_charts_legend_title",tS="arcgis_charts_axis_title_id";function eS(a){let e=a.yAxes.getIndex(0);if(e){let t=Ye({childId:`${tS}_y_${e.uid}`,parent:e});t instanceof Qt&&t.set("dx",0)}}function iS(a,e){let t=q.axisLabelSpacing.verticalAxisLabelSidePadding,i=q.heatChart.legend.legendPadding+t;e.set("marginRight",i),a.leftAxesContainer.setAll({paddingLeft:t});let r=a.leftAxesContainer.children.values[0];r instanceof sa&&r.set("paddingLeft",t)}function g0(a,e){let{root:t}=a,i=et(a.uid,"rtl")??!1,r=et(a.uid,"config")??e,s=r?.series[0],{start:o,end:n}=Dc(i,s),l=r?.legend?.position??q.heatChart.legend.position,h=l===Ut.Top||l===Ut.Bottom;return Ds.new(t,{orientation:h?"horizontal":"vertical",startColor:o.color,endColor:n.color,visible:r?.legend?.visible,startOpacity:o.opacity,endOpacity:n.opacity})}function rS(a,e){let t=et(e.uid,"rtl")??!1,i=et(e.uid,"config");if(i?.series[0].type===Y.HeatSeries){let r=i?.series[0],{start:s,end:o}=Dc(t,r);a.setAll({startColor:s.color,endColor:o.color,startOpacity:s.opacity,endOpacity:o.opacity})}}function Dc(a=!1,e){let t=q.heatChart.gradientHeatRules,i=e.gradientRules?.colorList??[...a?[t.maxColor,t.minColor]:[t.minColor,t.maxColor]],{color:r,opacity:s}=he(i[0]),{color:o,opacity:n}=he(i[1]);return{start:{color:r,opacity:s},end:{color:o,opacity:n}}}function C_(a,e){let t=et(a.uid,"rtl")??!1,i=et(a.uid,"config")?.series[0],{start:r,end:s}=Dc(t,i);e.setAll({startColor:r.color,endColor:s.color})}function ist(a){let e=et(a.uid,"config");if(e?.series?.[0]?.type===Y.HeatSeries&&e?.legend?.visible!==!1){let t=q.heatChart.legend,i=e?.legend?.position??t.position,r=ps(ur,a.uid),s,o=!1;switch(i){case Ut.Top:s=a.topAxesContainer,o=!0;break;case Ut.Bottom:s=a.bottomAxesContainer,o=!1;break;case Ut.Left:s=a.leftAxesContainer,o=!0;break;case Ut.Right:s=a.rightAxesContainer,o=!1;break;default:s=void 0}if(s!==void 0){let n=Ye({childId:r,parent:s,useChildId:!0});if(n!==void 0){let{children:l}=s,h=l.indexOf(n);h!==-1&&(o&&h!==0?(l.removeValue(n),l.unshift(n),s.markDirty()):!o&&h!==l.length-1&&(l.removeValue(n),l.push(n),s.markDirty()))}}}}function y0(a){let{chart:e,legend:t,legendContainer:i}=a,{root:r}=e,s=et(e.uid,"config"),o=q.heatChart.legend,n=s?.legend?.position??o.position,l,h,u,p=n===Ut.Left||n===Ut.Top,d=Ye({childId:ds,parent:i}),c=s?.legend?s.legend.visible??!0:!1,f=s?.legend?.title?s.legend.title.visible??!0:!1,g=d instanceof Qt&&c&&f?d.height()>0?d.height():o.titleHeight:0,m=n===Ut.Left||n===Ut.Right;switch(t.setAll({orientation:m?"vertical":"horizontal",width:X}),n){case Ut.Left:i.setAll({layout:r.verticalLayout,paddingRight:o.legendPadding,width:o.width}),iS(e,i),l=e.leftAxesContainer;break;case Ut.Right:i.setAll({layout:r.verticalLayout,paddingLeft:o.legendPadding,paddingRight:o.legendPadding,width:o.width}),e.rightAxesContainer.setAll({paddingRight:o.chartPadding}),l=e.rightAxesContainer;break;case Ut.Top:u=o.chartPadding,i.setAll({layout:r.verticalLayout,paddingBottom:o.legendPadding,paddingTop:o.legendPadding,width:X}),l=e.topAxesContainer;break;case Ut.Bottom:{h=o.chartPadding,i.setAll({layout:r.verticalLayout,paddingTop:o.legendPadding,width:X}),e.bottomAxesContainer.setAll({paddingBottom:o.legendPadding+g});let y=Ye({childId:m0,parent:e});y instanceof ot&&y.set("paddingBottom",o.chartPadding+g),l=e.bottomAxesContainer}break}eS(e),t.markDirty(),v0(e,{chartPaddingTop:u,chartPaddingBottom:h}),Jl(()=>{l&&(p?l.children.unshift(i):l.children.push(i),e.markDirty(),t.markDirty(),l.markDirty())})}function v0(a,e){let{chartPaddingTop:t,chartPaddingLeft:i,chartPaddingRight:r,chartPaddingBottom:s}=e;a.setAll({paddingTop:t,paddingLeft:i,paddingRight:r,paddingBottom:s})}function b0(a,e){let t=a.root.events.on(Ti.FrameEnded,()=>{a.markerContainer.children.length>0&&(e(),t.dispose())})}function x0(a){let{series:e,legend:t,chart:i}=a,r=et(i.uid,"config"),s=o=>{let n=o.getPrivate("valueLow"),l=o.getPrivate("valueHigh");n!==void 0&&l!==void 0&&(t.get("orientation")==="vertical"?(t.set("startValue",l),t.set("endValue",n)):(t.set("startValue",n),t.set("endValue",l))),Jl(()=>{b0(t,()=>{_0({legend:t,series:o,chartConfig:r})})})};e!==void 0&&(e.events.on("datavalidated",()=>{s(e)}),s(e)),P0(t,r?.legend)}function _0(a){let{legend:e,series:t,chartConfig:i}=a,r=i?.series[0],s=r?.gradientRules;if(s&&(s.minValue!==void 0||s.maxValue!==void 0)){let o=t.getPrivate("valueLow"),n=t.getPrivate("valueHigh");if(o!==void 0&&n!==void 0&&n>o){let l=o,h=n,u=h-l,p=s.minValue??l,d=s.maxValue??h,c=(p-l)/u,f=(d-l)/u;c=Math.max(0,Math.min(1,c)),f=Math.max(0,Math.min(1,f));let{start:g,end:m}=Dc(!1,r),{color:y,opacity:v}=he(s.outsideRangeLowerColor??q.heatChart.gradientHeatRules.outsideRangeLowerColor),{color:x,opacity:_}=he(s.outsideRangeUpperColor??q.heatChart.gradientHeatRules.outsideRangeUpperColor),$=[{color:y,opacity:v,offset:0},{color:y,opacity:v,offset:c},{color:g.color,opacity:g.opacity,offset:c},{color:m.color,opacity:m.opacity,offset:f},{color:x,opacity:_,offset:f},{color:x,opacity:_,offset:1}],T=(k,A,L)=>{let O=ps(`heatLegendLabel${L}`,e.uid),I=e.markerContainer.children.values.find(Z=>Z instanceof Qt&&Z.get("id")===O),R=I&&!I.isDisposed()?I:void 0,B=e.startLabel;if(R||(R=Qt.new(e.root,{id:O,position:"absolute",isMeasured:!1,centerX:pt,centerY:pt,paddingLeft:0}),e.markerContainer.children.push(R)),R.setAll({fill:B.get("fill"),fontSize:B.get("fontSize"),fontFamily:B.get("fontFamily")}),R.set("text",k.toString()),e.get("orientation")==="vertical"){let Z=B.localBounds().top,j=B.get("fontSize")??0;if(typeof j=="number"){let it=q.heatChart.legend.minMaxLabelPadding;R.set("x",Z-j*2-it)}else R.set("x",Z);R.set("y",Jt(A*100)),R.set("centerY",pt)}else{R.set("x",Jt(A*100));let Z=e.startLabel.localBounds().bottom,j=q.heatChart.legend.minMaxLabelPadding;R.set("y",-Z-j),R.set("centerX",gi)}};c>0&&c<1&&T(p,c,"Min"),f>0&&f<1&&T(d,f,"Max");let S=()=>{let k;if(e.markerContainer.children.length>0&&e.markerContainer.children.each(A=>{A instanceof He&&(k=A)}),k){let A=0;e.get("orientation")==="vertical"&&(A=90),k.set("fillGradient",Qs.new(e.root,{stops:$,rotation:A}))}};if(e.markerContainer.children.length>0)S();else{let k=e.markerContainer.children.events.once("push",()=>{e.markerContainer.children.length>0&&(k.dispose(),S())})}}}else{let o=()=>{if(e.get("orientation")==="vertical"){let n;e.markerContainer.children.length>0&&e.markerContainer.children.each(l=>{l instanceof He&&(n=l)}),n&&n.set("rotation",180)}};if(e.markerContainer.children.length>0)o();else{let n=e.markerContainer.children.events.once("push",()=>{e.markerContainer.children.length>0&&(n.dispose(),o())})}}}function P0(a,e){if(a!==void 0){let t={type:Y.Text,visible:e?.visible,content:{...e?.body,type:ui.TS,text:" "}};[a.startLabel,a.endLabel].forEach(i=>{th({label:i,labelConfig:t,skipSettingText:!0,skipSettingXAndY:!0})})}}function gy(a){let e=ps(ur,a.uid);[a.bottomAxesContainer,a.rightAxesContainer,a.leftAxesContainer,a.topAxesContainer].forEach(t=>{let i=Ye({childId:e,parent:t,useChildId:!0});i&&(i.children.values.filter(r=>r instanceof Ds).forEach(r=>{r.dispose()}),t.children.removeValue(i),i.dispose()),t.markDirty()}),v0(a,{}),aS(a)}function yy(a,e){let t=Z_({root:e.root,parent:e,index:0,id:ps(ds,e.uid)});return t.set("paddingTop",q.heatChart.legend.titlePadding),J_({chart:a,label:t,labelType:us.LegendTitle}),t}function ny(a){let{chart:e,legendConfig:t,container:i}=a,r=ps(ur,e.uid),s=i;if(s||[e.bottomAxesContainer,e.rightAxesContainer,e.leftAxesContainer,e.topAxesContainer].forEach(o=>{let n=Ye({childId:r,parent:o,useChildId:!0});n&&(s=n)}),s!==void 0){let o=Ye({childId:ds,parent:s})??yy(e,s);if(t!==void 0){let{title:n,visible:l}=t,{legendTitle:h}=q.legendProperties;if(n!==void 0){th({label:o,labelConfig:{...n,visible:l!==!1&&n.visible!==!1},defaults:{...h,verticalCenter:"top"}});let u=et(e.uid,"config")?.legend?.position??q.heatChart.legend.position;u===Ut.Left||u===Ut.Right?(o.set("maxWidth",250),xc({chart:e,label:o,labelType:us.LegendTitle})):o.set("maxWidth",void 0),$0({legendContainer:s,chart:e})}else Di(o,!1)}}}function sS(a,e){let{root:t}=a,i=et(a.uid,"config"),r=i?.legend,s=a.series.values[0];gy(a);let o=g0(a,i??e),n=ot.new(t,{id:ps(ur,a.uid),layout:t.verticalLayout});return n.children.push(o),yy(a,n),ny({chart:a,legendConfig:r,container:n}),x0({series:s,legend:o,chart:a}),r!==void 0&&r.visible!==!1&&(y0({chart:a,legend:o,legendContainer:n}),ly({legend:o,chart:a,legendContainer:n})),o}function ly(a){let{legend:e,chart:t,legendContainer:i}=a,r=et(t.uid,"config"),s=q.heatChart.legend,o=r?.legend?.position??s.position;if(o===Ut.Left||o===Ut.Right)e.set("height",X),i.set("height",X),$0({legendContainer:i,chart:t});else{let n=Ye({childId:ds,parent:i}),l=r?.legend?r.legend.visible??!0:!1,h=r?.legend?.title?r.legend.title.visible??!0:!1,u=n instanceof Qt&&l&&h?n.height()>0?n.height():s.titleHeight+s.titlePadding:0,p=o===Ut.Top?s.topHeight:s.bottomHeight;e.set("height",p),i.set("height",p+u+20)}}function $0(a){let{legendContainer:e,chart:t}=a,i=et(t.uid,"config"),r=q.heatChart.legend,s=i?.legend?.position??r.position;if(s!==Ut.Left&&s!==Ut.Right)return;let o=Ye({childId:ds,parent:e}),n=i?.legend?.title?i.legend.title.visible??!0:!1;if(o instanceof Qt&&n){let l=()=>{let h=o.width(),u=r.width,p=Math.max(h+r.legendPadding*2,u);e.set("width",p)};o.width()>0?l():o.events.once("boundschanged",l)}else e.set("width",r.width)}function aS(a){let e=Ye({childId:f0,parent:a});e instanceof ot&&e.set("marginTop",0)}function oS(a){let e,t=ps(ur,a.uid);return[a.bottomAxesContainer,a.rightAxesContainer,a.leftAxesContainer,a.topAxesContainer].forEach(i=>{let r=Ye({childId:t,parent:i,useChildId:!0});if(r){let o=r.children.values.find(n=>n instanceof Ds);if(o){e=o;return}}let s=i.children.values.find(o=>o instanceof Ds);if(s){e=s;return}}),e}function nS(a){let{chart:e,chartConfig:t,heatLegendPositionChanged:i,heatRulesTypeChanged:r}=a,{legend:s}=t,o=s!==void 0&&s.visible!==!1,n=e.series.values[0];if(i||r)gy(e),o&&n instanceof Ie&&Jl(()=>{let l=g0(e),h=ot.new(e.root,{id:ps(ur,e.uid),layout:e.root.verticalLayout});h.children.push(l),yy(e,h),ny({chart:e,legendConfig:s,container:h}),C_(e,l),y0({chart:e,legend:l,legendContainer:h}),x0({series:n,legend:l,chart:e}),ly({legend:l,chart:e,legendContainer:h})});else if(n instanceof Ie){let l=oS(e);if(l){C_(e,l),ny({chart:e,legendConfig:s}),P0(l,s);let h=l.parent;h?.get("id")===ps(ur,e.uid)&&Di(h,o),Di(l,o),rS(l,e),h&&ly({legend:l,chart:e,legendContainer:h}),Jl(()=>{b0(l,()=>{_0({legend:l,series:n,chartConfig:t})})})}}}function lS(a,e){let t=!1;if(e===Ut.Right||e===Ut.Left)t=!0;else{let i=a.dataItems[0]?.get("itemContainer").bounds().left;i!==void 0&&(t=!a.dataItems.some(r=>r.get("itemContainer").bounds().left!==i))}return t}function hS(a){let e=!1,t=a.dataItems[0]?.get("itemContainer").bounds().bottom;return t!==void 0&&(e=!a.dataItems.some(i=>i.get("itemContainer").bounds().bottom!==t)),e}function uS(a){Hw(a.uid,{isLegendValueLabel:!0}),a.valueLabels.template.adapters.add("text",(e,t)=>{let i=e??"",r=Ew(a.uid,"pieChartLegendValueLabelsFormatter");return r!==void 0&&(i=r(t.dataItem?.get("value")??0,t.dataItem?.get("valuePercentTotal")??0)),i}),a.valueLabels.template.set("text","")}function w0(a){let{legend:e,seriesConfig:t,webChartLegend:i,pieChartLegendValueLabelFormatter:r,chart:s}=a,{visible:o,body:n,displayNumericValue:l,displayPercentage:h}=i??{};if(ei(t)===Y.PieSeries){let{numericValueFormat:u,percentValueFormat:p,valuePrefix:d,valueSuffix:c,percentagePrefix:f,percentageSuffix:g}=t[0],m=l??q.pieChart.displayNumericValueOnLegend,y=h??q.pieChart.displayPercentageOnLegend,v=r;if(r===void 0){let A=u0({pieChart:s,valueIntlOptions:u?.intlOptions,percentageIntlOptions:p?.intlOptions,displayNumericValue:m,displayPercentage:y,valuePrefix:d,valueSuffix:c,percentagePrefix:f,percentageSuffix:g});v=(L,O)=>A("",L,O)}Nw(e.uid,{pieChartLegendValueLabelsFormatter:v});let x=et(s?.uid??0,"config")?.legend?.position??q.legendProperties.position,_=i?.valueLabelMaxWidth,$=lS(e,x),T={type:Y.Text,visible:o,content:{...n,type:ui.TS,text:".",verticalAlignment:"middle",horizontalAlignment:$?"right":"center"}};th({label:e.valueLabels.template,labelConfig:T,defaults:q.legendProperties.valueLabels});let S=et(s?.uid??0,"rtl")??!1,k=_!==void 0&&!Number.isNaN(_);e.valueLabels.template.setAll({x:void 0,y:void 0,paddingRight:5,textAlign:S?"right":"left",disabled:m===!1&&y===!1,width:k?_:null,oversizedBehavior:k?"wrap":"none"})}}function pS(a,e){a.labels.template.adapters.add("maxWidth",t=>{let i=t,r=et(e.uid,"config"),s=r?.legend?.labelMaxWidth,o=r?.legend?.position??q.legendProperties.position;if(o===Ut.Right||o===Ut.Left)i=s??q.legendProperties.legendLabels.maxWidth;else if(s!==void 0)i=s;else{let n=0;a.valueLabels.template.get("forceHidden")||a.valueLabels.each(h=>{let u=h.get("width",0);typeof u=="number"&&(n=Math.max(n,u))});let l=a.get("width",200);typeof l=="number"&&(i=l+n)}return i}),a.valueLabels.template.adapters.add("maxWidth",t=>{let i=t,r=et(e.uid,"config"),s=r?.legend?.valueLabelMaxWidth,o=r?.legend?.position??q.legendProperties.position;return o===Ut.Right||o===Ut.Left?i=s??q.legendProperties.valueLabels.maxWidth:i=s??Number.NaN,i})}function C0(a,e){let t=0;for(let i of a.dataItems){let r=i.get("label")?._contentWidth??0;t=Math.max(t,r)}return e&&t>e?e:t}function dS(a,e){for(let t of a.dataItems)t.get("label")?.set("width",e)}function cS(a,e){let t=0;for(let i of a.dataItems){let r=i.get("marker")?._contentWidth??0,s=i.get("valueLabel")?._contentWidth??0,o=r+e+s;t=Math.max(t,o)}return Math.ceil(t)+q.legendPadding}function S0(a,e){Jl(()=>{let t=hS(a),i=e===Ut.Right||e===Ut.Left||!t;dS(a,i?C0(a):void 0)})}function fS(a){let{legend:e,chart:t,seriesConfig:i,legendConfig:r}=a,{displayCategory:s}=r??{},o=s??q.pieChart.displayCategoryOnLegend,n=et(t?.uid??0,"rtl")??!1;e.labels.template.setAll({forceHidden:o===!1,direction:n?"rtl":"ltr",oversizedBehavior:r?.labelMaxWidth!==void 0&&!Number.isNaN(r.labelMaxWidth)?"wrap":"none"}),Jl(()=>{let l=C0(e,r?.labelMaxWidth),h=cS(e,l);e.itemContainers.template.setAll({width:h,layout:t.root.horizontalLayout}),pS(e,t),w0({legend:e,seriesConfig:i,webChartLegend:r,chart:t});let u=r.position??q.legendProperties.position;S0(e,u),e.markDirty()})}function T0(a){return a?.[0].type===Y.HeatSeries&&a[0].heatRulesType!==Io.Renderer}function mS(a){let e=a.get("id");a.on("visible",(t,i)=>{if(i){let{chart:r}=i;if(r instanceof or){let s=Ye({childId:ur,parent:r});s!==void 0&&s.dataItems?.forEach(o=>{o.get("id")===e&&s.set("opacity",t?1:q.legendProperties.legendLabelReducedOpacity)})}}})}function gS(a){let e=a.target.dataItem;if(e?.dataContext!==void 0){let{dataContext:t}=e,i=typeof t=="object"&&t!==null&&"component"in t?t.component:t;if(i instanceof hi){let r={visible:!i.get("visible")};Mn(i)||Bu(i)?r.overlayType=ue(i.uid,"type"):r.seriesId=i.get("id"),Wy(r,i.root.dom)}}}function yS(a){a.itemContainers.template.events.on(Ti.Click,gS)}function vS(a,e){let t=et(e.uid,"rtl")??!1;a.itemContainers.template.setAll({reverseChildren:t})}function bS(a){let{chart:e,legend:t,chartConfig:i,showEmptySeries:r,queryObject:s}=a,o=ei(i.series);if(e.series.length>1||o===Y.PieSeries||o===Y.HeatSeries){let n=[],l=ji(i.series);switch(o){case Y.BoxPlotSeries:{let h=tp(i);n=e.series.values.filter(u=>{let p=!1;return h?p=u instanceof Te&&!(u instanceof oa):p=u instanceof aa,p});break}case Y.HistogramSeries:{n=e.series.values.filter(h=>{let u=!1;if(ue(h.uid,"isOverlay")){let p=i.series[0].type===Y.HistogramSeries?i.series[0].overlays:void 0,d=ue(h.uid,"type"),c;switch(d){case ze.Mean:c=p?.mean?.created;break;case ze.Median:c=p?.median?.created;break;case ze.Normal:c=p?.comparisonDistribution?.created;break;case ze.StdDev:c=p?.standardDeviation?.created;break}u=c===!0}return u});break}case Y.PieSeries:{n=e.series.getIndex(0)?.dataItems??[];break}case Y.ComboLineAndBarSeries:case Y.LineSeries:case Y.RadarSeries:case Y.BarSeries:n=e.series.values.filter(h=>{let u=!0;if(!r){let p=i.series.find(d=>d.id===h.get("id"));if(p!==void 0&&"y"in p&&typeof p.y=="string"){let{x:d,y:c}=p,f=l===Ct.BarAndLineSplitByNoAggregation?`${c}_${hh({where:p.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:c;u=h.data.values.some(g=>mv({dataItem:g,x:d,y:f}))}}return u});break;case Y.ScatterSeries:{let h=MS(e);h!==void 0&&(n=[h]);break}case Y.HeatSeries:{let h=e.series.getIndex(0);if(h instanceof Ie&&Qu(i)&&!oh(s)){let u=c0({queryObject:s,chartConfig:i,forLegend:!0,series:h});if(u){n=[...u];let p=LS(e);p!==void 0&&n.push(p)}}break}}t.data.setAll(n)}}function S_(a){let e=0;return a.dataItems.forEach(t=>{let i=t.get("itemContainer").width();e=Math.max(i,e)}),Math.ceil(e)}function T_(a){let e=0;if(a instanceof Qt&&a.get("visible")!==!1&&a.get("forceHidden")!==!0){let t=a.width();Number.isFinite(t)&&(e=t)}return e}function D_(a){let e=0;return a.series.values.forEach(t=>{let i=t.bulletsContainer;i&&i.children.values.forEach(r=>{e=Math.max(e,T_(r))}),e===0&&t.dataItems.forEach(r=>{let s=r.bullets;if(s)for(let o of s)e=Math.max(e,T_(o.get("sprite")))})}),Math.ceil(e)}function Dn(a,e){let{root:t}=a,i=Ye({childId:ur,parent:a});if(i!==void 0){let r=et(a.uid,"config"),s=et(a.uid,"rtl"),o=qc(r),n=ei(r?.series),l=sh(r),h=r?.series?.some(ye=>ye.dataLabels?.visible!==!1)??!1,u=r?.title?r.title.visible??!0:!1,p=r?.subtitle?r.subtitle.visible??!0:!1,d=r?.footer?r.footer.visible??!0:!1,c=r?.legend?r.legend.visible??!0:!1,f=r?.legend?.title?r.legend.title.visible??!0:!1,g=Ye({childId:f0,parent:a}),m=g instanceof ot&&u?g.height():0,y=Ye({childId:QC,parent:a}),v=y instanceof ot&&p?y.height():0,x=Ye({childId:m0,parent:a}),_=x instanceof ot&&d?x.height():0,$=Ye({childId:ds,parent:i}),T=$ instanceof Qt&&c&&f?$?.height():0,S=r?.legend?.position??q.legendProperties.position,k,A=e.get("verticalScrollbar"),L=pt,O=pt,I=t.verticalLayout,R=pt,B=pt,Z=pt,j=pt,it=0,st,ht=e.height()+T,dt=0,Xt=0,tt=h&&!o?q.chartContainer.paddingTop??0:0,Tt=0,Nt,Pe;switch(S){case Ut.Left:I=t.verticalLayout,R=gi,Z=gi,B=gi,j=gi,st=void 0,L=gi,O=gi,dt=i.width(),it=m+v,ht<a.seriesContainer.height()&&(it+=a.seriesContainer.height()/2-ht/2),k=S_(e),A?.width()!==void 0&&k&&A.isVisible()&&(k+=A.width()+q.scrollbarPadding),s&&(Nt=X,Pe=k);break;case Ut.Right:I=t.verticalLayout,R=X,Z=X,B=gi,j=gi,st=void 0,L=gi,O=gi,Xt=i.width(),it=m+v,ht<a.seriesContainer.height()&&(it+=a.seriesContainer.height()/2-ht/2),k=S_(e),A?.width()!==void 0&&k&&A.isVisible()&&(k+=A.width()+q.scrollbarPadding),s&&(Nt=X,Pe=k);break;case Ut.Top:I=t.gridLayout,R=pt,Z=pt,B=gi,j=gi,st=X,L=pt,O=pt,tt+=ht,it+=m+v,k=void 0,s&&(Nt=void 0);break;case Ut.Bottom:I=t.gridLayout,R=pt,Z=pt,B=X,j=X,st=X,L=pt,O=pt,Tt=ht,it=-Tt-_,k=void 0,s&&(Nt=void 0);break}if(o&&h&&(n===Y.LineSeries||n===Y.ComboLineAndBarSeries||n===Y.BarSeries&&l===fs.Side)){let ye=D_(a);if(ye>0)Xt+=ye;else if(a.series.length>0){let ke=e.root.events.on(Ti.FrameEnded,()=>{let We=D_(a);We>0&&(s?dt+=We:Xt+=We,ke.dispose(),Dn(a,e))})}}(k===void 0||k>0)&&(e.setPrivate("width",k),s&&e.itemContainers.template.setAll({centerX:Nt,dx:Pe})),e.setAll({layout:I,x:L,centerX:O}),i.setAll({x:R,y:B,centerX:Z,centerY:j,dy:it,width:st,height:0}),a.chartContainer.setAll({paddingBottom:Tt,paddingTop:tt,paddingLeft:dt,paddingRight:Xt}),st===void 0&&(i.setPrivate("width",void 0),i.markDirty()),a instanceof Os&&S0(e,S)}}function xS(a){let{chart:e,legend:t,legendContainer:i}=a,r=Ye({childId:ds,parent:i});r&&r.on("visible",()=>{t.root.events.once(Ti.FrameEnded,()=>{Dn(e,t)})}),i.events.on(Ti.BoundsChanged,()=>{Dn(e,t)}),t.events.on(Ti.BoundsChanged,()=>{Dn(e,t)}),e.seriesContainer.onPrivate("height",()=>{Dn(e,t)}),e.series.each(s=>{s.events.on(Ti.DataValidated,()=>{Dn(e,t)})})}function D0(a,e){let t=Z_({root:e.root,parent:e,index:0,id:ps(ds,e.uid)});return t.set("paddingTop",10),J_({chart:a,label:t,labelType:us.LegendTitle}),t}function _S(a,e){e.markers.template.setAll({width:q.legendProperties.legendMarkersSize,height:q.legendProperties.legendMarkersSize}),e.markerRectangles.template.adapters.add("fillOpacity",(t,i)=>{let r=i.parent?.dataItem?.dataContext,s=r&&Mi.fillOpacityField in r?r[Mi.fillOpacityField]:t;return typeof s=="number"?s:t}),e.markerRectangles.template.adapters.add("strokeOpacity",(t,i)=>{let r=i.parent?.dataItem?.dataContext,s=r&&Mi.strokeOpacityField in r?r[Mi.strokeOpacityField]:t;return typeof s=="number"?s:t}),e.labels.template.adapters.add("text",(t,i)=>{let r=t,s=et(a.uid,"config");if(ei(s?.series)!==Y.HeatSeries){let o=i.dataItem?.component;if(o instanceof Ki){let n=o.get("categoryField")??"",l=i.dataItem,h=l?.get("category"),u=l?.dataContext;r=h??(u?.[n]??t)?.toString()}else o instanceof hi&&(r=o.get("name"))}if(s!==void 0){let{legend:o}=s,n={...o?.body,type:ui.TS,text:r};r=Eo({textSymbol:n,format:"amChartsV5"})}return r})}function PS(a,e){e.seriesContainer.onPrivate("height",t=>{let i=0,r=et(e.uid,"config"),s=r?.legend,o=Ye({childId:ur,parent:e});if(o!==void 0){let l=Ye({childId:ds,parent:o});l!==void 0&&s?.visible!==!1&&s?.title?.visible!==!1&&(i=l.height())}let n=r?.legend?.maxHeight??Number.NaN;Number.isFinite(n)||(r?.legend?.position===Ut.Top||r?.legend?.position===Ut.Bottom?n=q.legendProperties.maxHeight:typeof t=="number"&&(n=t-i)),a.set("maxHeight",n)})}function $S(a,e,t){a.events.on(Ti.DataValidated,()=>{a.dataItems.length>0&&k0(a,e,t)})}function wS(a){let e;if(a!==void 0){let t=et(a?.uid,"config");e=et(a.uid,"rtl")&&(t?.legend?.position===Ut.Top||t?.legend?.position===Ut.Bottom)}return e??!1}function CS(a){let e="";if(a instanceof Si){let t=et(a.uid,"config"),i=qc(t),r=i?b.Rotated:b.NonRotated,s=sh(t),o=b.SideBySide;s===fs.Stacked?o=b.Stacked:s===fs.Stacked100&&(o=b.Stacked100);let n=et(a.uid,"rtl")?b.RTL:b.LTR,l;switch(t?.legend?.position){case Ut.Left:l=b.LegendLeft;break;case Ut.Top:l=b.LegendTop;break;case Ut.Bottom:l=b.LegendBottom;break;case Ut.Right:default:l=b.LegendRight;break}let h=i?a.yAxes.getIndex(0):a.xAxes.getIndex(0),u;h instanceof Oa?u=b.DateAxis:h instanceof lr?u=b.ValueAxis:u=b.CategoryAxis;let p=t?.orderOptions?.data&&"orderBy"in t.orderOptions.data&&t.orderOptions.data.orderBy===wy.Descending?b.OrderByFieldsDESC:b.OrderByFieldsASC;e=`${r}-${n}-${o}-${l}-${u}-${p}`}return e}function SS(a){let e=CS(a);return Vw.has(e)}function k0(a,e,t){switch(t){case Y.HistogramSeries:case Y.PieSeries:a.set("reverseChildren",wS(e));break;case Y.BarSeries:case Y.LineSeries:case Y.RadarSeries:case Y.ComboLineAndBarSeries:a.set("reverseChildren",SS(e));break}}function TS(a,e){let t=Ye({childId:ur,parent:a});if(t!==void 0){let i=Ye({childId:ds,parent:t})??D0(a,t);if(e!==void 0){let{title:r,visible:s}=e,{legendTitle:o}=q.legendProperties;r!==void 0?(th({label:i,labelConfig:{...r,visible:s!==!1&&r.visible!==!1},defaults:{...o,verticalCenter:"top"}}),xc({chart:a,label:i,labelType:us.LegendTitle})):Di(i,!1)}}}function DS(a,e=!1){let t=e?q.legendProperties.roundedMarkerRadius:q.legendProperties.rectangleMarkerRadius;a.markerRectangles.template.setAll({cornerRadiusTL:t,cornerRadiusTR:t,cornerRadiusBL:t,cornerRadiusBR:t})}function kS(a){let{legend:e,legendConfig:t,chartType:i,seriesConfig:r,chart:s}=a;if(e!==void 0){let o={type:Y.Text,visible:t?.visible,content:{...t?.body,type:ui.TS,text:" "}};if(i===Y.PieSeries){let n=Ye({childId:ur,parent:s});n!==void 0&&Ye({childId:ds,parent:n})!==void 0&&w0({legend:e,seriesConfig:r,webChartLegend:t,chart:s})}th({label:e.labels.template,labelConfig:o}),e.labels.template.setAll({x:void 0,y:void 0,paddingRight:5})}}function AS(a,e){e===!0&&a.itemContainers.each(t=>{t.events.disableType(Ti.Click)})}function OS(a){let{legend:e,chart:t,seriesConfig:i}=a;i?.[0].type!==Y.HeatSeries&&e.itemContainers.template.adapters.add("cursorOverStyle",()=>et(t.uid,"options")?.togglingLegendItemsDisabled===!0?"default":"pointer")}function rst(a,e){let{root:t}=a,i;if(T0(e?.series))i=sS(a,e);else{let r=ot.new(t,{id:ps(ur,a.uid),layout:t.verticalLayout}),s=e?.series?.[0].type===Y.HeatSeries?{nameField:Mi.nameField,fillField:Mi.fillField,strokeField:Mi.strokeField,fillOpacityField:Mi.fillOpacityField,strokeOpacityField:Mi.strokeOpacityField}:{};i=Da.new(t,{...s,verticalScrollbar:yo.new(t,{orientation:"vertical"})}),a instanceof Os?uS(i):i.valueLabels.template.setAll({forceHidden:!0,textAlign:"left"}),_S(a,i),D0(a,r),yS(i),vS(i,a),xS({chart:a,legend:i,legendContainer:r}),PS(i,a),$S(i,a,ei(e?.series)),OS({legend:i,chart:a,seriesConfig:e?.series}),r.children.push(i),a.children.push(r)}return i}function LS(a){let e=et(a.uid??NaN,"config"),t=e?.series[0].heatRulesType===Io.Renderer,i=a.series.values[0].data.values.some(s=>s[pi.valueField]===null||t&&!s[Et.rendererSymbolField]),r;if(i){let s=e?.series[0].emptyCells,o=s?.symbol?.color??q.heatChart.emptyCells?.symbol?.color,{outlineColor:n,outlineOpacity:l}=$c(e?.series[0].gridLine);r={[Mi.nameField]:s?.text??q.heatChart.emptyCells?.text??"",[Mi.fillField]:he(o).color,[Mi.fillOpacityField]:he(o).opacity,[Mi.strokeField]:n,[Mi.strokeOpacityField]:l}}return r}function k_(a){let{chart:e,legend:t,showLegend:i}=a,r=Ye({childId:ur,parent:e});r&&(Di(r,i),Di(t,i))}function A_(a){let{chart:e,showLegend:t,legendConfig:i}=a;if(i){let{title:r,visible:s}=i,o=r!==void 0&&s!==!1&&r.visible!==!1,n=Ye({childId:ur,parent:e});if(n){let l=Ye({childId:ds,parent:n});l&&(r?Di(l,o):Di(l,t))}}}function sst(a){let{chart:e,chartConfig:t,legend:i,heatChartLegendUpdatedNeeded:r,showEmptySeries:s,seriesConfig:o,queryObject:n,heatRulesTypeChanged:l,heatLegendPositionChanged:h}=a,{legend:u,series:p}=t;if(T0(o)&&r)l&&i&&(k_({chart:e,legend:i,showLegend:!1}),A_({chart:e,showLegend:!1,legendConfig:u})),nS({chart:e,chartConfig:t,heatLegendPositionChanged:h,heatRulesTypeChanged:l});else if(i instanceof Da&&(o?.[0].type===Y.HeatSeries&&gy(e),Ye({childId:ur,parent:e})!==void 0)){let d=Yy(p)&&u!==void 0&&u.visible!==!1;if(k_({chart:e,legend:i,showLegend:d}),A_({chart:e,showLegend:d,legendConfig:u}),d){DS(i,u?.roundMarkers),kS({legend:i,legendConfig:u,chartType:ei(p),seriesConfig:o,chart:e}),k0(i,e,ei(p)),bS({chart:e,legend:i,chartConfig:t,showEmptySeries:s,queryObject:n}),TS(e,u),Dn(e,i);let c=et(e.uid,"options");AS(i,c?.togglingLegendItemsDisabled),e instanceof Os&&fS({legend:i,chart:e,seriesConfig:o,legendConfig:u})}}}function FS(a){let{seriesConfig:e,series:t,sizePolicyChanged:i}=a,{sizePolicy:r}=e,s=t.get("heatRules")?.[0],o=ue(t.uid,"bulletTemplate");if(o!==void 0)if(r!==void 0){let{scaleType:n,field:l,minSize:h,maxSize:u}=r,p=Oy(),d=e.markerSymbol?.size??Hc().size??1,c=(h??p.minSize)/d,f=(u??p.maxSize)/d;s!==void 0?i&&(s.min=c,s.max=f,s.logarithmic=n===Ic.Logarithmic,t.set("valueField",l),t.markDirtySize()):t.setAll({valueField:l,calculateAggregates:!0,heatRules:[{target:o,key:"scale",min:c,max:f,dataField:"value",logarithmic:n===Ic.Logarithmic}]})}else t.get("heatRules")?.pop(),t.setAll({valueField:void 0,calculateAggregates:!1})}function Mn(a){return a.get("id")===q.overlayId.scatterplotTrendLine}function ast(a){return a.series.values.find(e=>!Mn(e))}function MS(a){return a.series.values.find(e=>Mn(e))}function RS(a){let{root:e,xAxis:t,yAxis:i,seriesConfig:r}=a,{x:s,y:o}=r,n=Te.new(e,{xAxis:t,yAxis:i,valueXField:s,valueYField:o,layer:q.zIndexes.scatterplotTrendLine});return n.set("id",q.overlayId.scatterplotTrendLine),vr(n.uid,{type:ze.Trendline}),n}function IS(a){let{markerSeries:e,options:t,queryObject:i,errorStrings:r}=a,s=jt.new({});vr(e.uid,{bulletTemplate:s}),eh(s,t?.selectionTheme),e.bullets.push(o=>{let n=kt.new(o,{nonScalingStroke:!0,tooltip:Tc({series:e,tooltipFormatter:t?.tooltipFormatter})},s);return vy({element:n,series:e,queryObject:i,errorStrings:r}),hT(n,e),Cs.new(o,{sprite:n})})}function ost(a){let{root:e,chartConfig:t,seriesConfig:i,xAxis:r,yAxis:s,options:o,queryObject:n,errorStrings:l}=a,{x:h,y:u,id:p}=i,d=[],c=Te.new(e,{xAxis:r,yAxis:s,valueXField:h,valueYField:u,id:p,opacity:0,valueField:"value",maskBullets:!1,layer:q.zIndexes.lineSeries});c.strokes.template.set("forceHidden",!0),IS({markerSeries:c,options:o,queryObject:n,errorStrings:l}),by(c,t),d.push(c);let f=RS({root:e,xAxis:r,yAxis:s,seriesConfig:i});return mS(f),d.push(f),c.appear(),d}function VS(a){let{root:e,trendLineSeries:t,data:i,dataWasUpdated:r,seriesWereReinitialized:s,valueFormat:o,defaultR2Value:n,chartConfig:l}=a,{chart:h}=t,u=l.series[0],p=u.overlays?.trendLine,d=p?.symbol??{type:ui.SLS},c=p?.created===!0&&p.visible!==!1;if(i&&(r||s)){let f=q.scatterplotSeries,g=h!==void 0?et(h.uid,"formatLocale"):void 0,{x:m,y}=u;t.setAll({valueXField:m,valueYField:y}),t.data.setAll(i.trendLinePoints??q.scatterplotSeries.trendLinePoints);let v=Number.isFinite(i.r2)?Ql({root:e,value:i.r2??f.r2,valueFormat:o,formatLocale:g}):void 0,x=v!==void 0?`R\xB2 = ${v}`:n;t.set("name",x)}d.color===void 0&&(d.color=Ra({colorIndex:1})),Vu({element:t,lineSymbol:d,visible:c})}function ES(a){let{root:e,chartConfig:t,markerSeries:i}=a,r=i.chart;if(r){let s=t.series[0],o=Kc(t),n,l,h=Hc(),u=new Set;i.dataItems.forEach(d=>{let c=d.bullets?.[0]?.get("sprite");if(c!==void 0){let f=zc({dataItem:d?.dataContext,seriesConfig:s,chartSubType:Ct.NonSpecific,colorMatch:o}),g=e0({root:e,element:c,seriesSymbol:s.markerSymbol??h,rendererSymbol:f,colorMatch:o});n=g.symbolWithColorInfo,l=g.stylingInfo,r0(c,l),u.add(JSON.stringify(l))}}),n=u.size>1?void 0:n;let p=new Map;p.set(0,n),rp({data:p,htmlContainer:e.dom,chartId:i.chart?.get("id"),colorMatchApplied:B0(r)})}}function NS(a){let{dataWasUpdated:e,seriesWereReinitialized:t,data:i,series:r,chartConfig:s,loaderHandle:o}=a;if((e||t)&&i){let{x:n,y:l}=s.series[0];if(r.setAll({valueXField:n,valueYField:l}),r.events.once(Ti.DataValidated,()=>{o.hideLoader()}),s.series[0].type===Y.ScatterSeries&&s.series[0].sizePolicy){let{field:h}=s.series[0].sizePolicy;i.dataItems=i.dataItems.sort((u,p)=>typeof p[h]=="number"&&typeof u[h]=="number"?p[h]-u[h]:0)}r.data.setAll(i.dataItems)}}function nst(a){let{root:e,chartConfig:t,seriesConfig:i,options:r,fieldList:s,series:o,trendLineSeries:n,data:l,dataWasUpdated:h,seriesWereReinitialized:u,sizePolicyChanged:p,loaderHandle:d,utilsStrings:c}=a,{axes:f}=t,{tooltipFormatter:g}=r??{};o.set("id",i.id);let m=ue(o.uid,"bulletTemplate");m&&eh(m,r?.selectionTheme),Di(o.bulletsContainer,i.visible),VS({root:e,trendLineSeries:n,chartConfig:t,data:l,dataWasUpdated:h,seriesWereReinitialized:u,valueFormat:jc(),defaultR2Value:c.notAvailable}),FS({seriesConfig:i,series:o,sizePolicyChanged:p}),I0(a)&&E0({styleCallback:()=>ES({root:e,chartConfig:t,markerSeries:o}),series:o,seriesConfig:i}),FC({axesConfig:f,seriesConfig:i,series:o,fieldList:s,tooltipFormatter:g}),NS({dataWasUpdated:h,seriesWereReinitialized:u,data:l,series:o,chartConfig:t,loaderHandle:d})}function BS(a){a.series.each(e=>{e instanceof Te?e.dataItems.forEach(t=>{let i=t.bullets?.[0];i&&Ir({element:i.get("sprite"),selected:!1,backToDefaultState:!0})}):e instanceof Ie?e.columns.each(t=>{Ir({element:t,selected:!1,backToDefaultState:!0})}):e instanceof Ki&&e.slices.each(t=>{Ir({element:t,selected:!1,backToDefaultState:!0})})})}function Nu(a){let{chart:e,selectionSource:t}=a,i=et(e.uid,"currentSelectionDataItems");na(e.uid,{currentSelectionDataItems:void 0,currentSelectionOIDs:void 0,currentSelectionIndexes:void 0,computedSelectionDataItems:void 0,computedSelectionIndexes:void 0,pendingSelectionQueries:!1}),zw(e)&&BS(e),i&&ip({data:{selectionSource:t??Bn.ClearSelection},htmlContainer:e.root.dom})}function A0(a){let e=a?.selection.width();return e!==void 0&&e>0&&e!==2e7}function vy(a){let{element:e,series:t,queryObject:i,errorStrings:r}=a;e.events.on(Ti.PointerUp,async s=>{let{chart:o}=t;if(o){let n=o.get("cursor");if(!A0(n)){let l=et(t.chart?.uid??Number.NaN,"actionMode");if(!et(t.chart?.uid??Number.NaN,"filterBySelection")&&l!==ms.None&&l!==ms.Zoom){let h=s.target,u=fC(s,t);Ir({element:h,selected:Fn(h.uid,"selected")!==!0}),u&&o.series.each(p=>{p instanceof Te?p.dataItems.forEach(d=>{let c=d.bullets?.[0]?.get("sprite");c!==h&&Ir({element:c,selected:!1})}):p instanceof Ie?p.columns.each(d=>{d!==h&&Ir({element:d,selected:!1})}):p instanceof Ki&&p.slices.each(d=>{d!==h&&Ir({element:d,selected:!1})})}),await R0({chart:o,selectionSource:Bn.SelectionByClick,queryObject:i,errorStrings:r})}}}})}function O_(a,e){let t=Number.NaN,i=Number.NaN;if(a instanceof Fa){let r=e.get("renderer")instanceof Do,s=a.getPrivate(r?"downPositionX":"downPositionY"),o=a.getPrivate(r?"positionX":"positionY");if(s!==void 0&&o!==void 0)if(e instanceof sa)t=e.axisPositionToIndex(e.toAxisPosition(s)),i=e.axisPositionToIndex(e.toAxisPosition(o));else if(e instanceof Oa){t=e.positionToDate(e.toAxisPosition(s)).getTime(),i=e.positionToDate(e.toAxisPosition(o)).getTime();let n=e.getPrivate("baseInterval"),l=_n.getDuration(n.timeUnit,n.count)*(e.chart?.series.getIndex(0)?.get("locationX")??1);t-=l,i-=l}else e instanceof lr&&(t=e.positionToValue(e.toAxisPosition(s)),i=e.positionToValue(e.toAxisPosition(o)))}else{let r=e.get("renderer")instanceof $o,s=a.getPrivate(r?"downPositionX":"downPositionY"),o=a.getPrivate(r?"positionX":"positionY");s!==void 0&&o!==void 0&&(t=s*(r?e.width():e.height()),i=o*(r?e.width():e.height()))}return{value1:t,value2:i}}function lst(a){let e=()=>{let t=a instanceof Si?a.get("cursor"):void 0,i=et(a.uid,"filterBySelection");(t===void 0||!A0(t))&&!i&&Nu({chart:a})};a.get("background")?.events.on(Ti.Click,e),a instanceof Si&&a.plotContainer.events.on(Ti.PointerUp,e)}function jS(a){let{series:e,cursorBounds:t,multiSelect:i}=a,r=et(e.chart?.uid??NaN,"config"),s=ei(r?.series);e.columns.each(o=>{let n=o.get("x"),l=o.get("y"),h=o.height()<0&&s!==Y.HeatSeries,u=h?Math.abs(o.height()):o.height();if(typeof n=="number"&&typeof l=="number"){let p=h?l-u:l,d={left:n,right:n+o.width(),top:p,bottom:p+u};if(s===Y.HeatSeries){let f=d.top;d.top=d.bottom,d.bottom=f}let c=!(d.left>t.right||d.right<t.left||d.top>t.bottom||d.bottom<t.top)||i&&Fn(o.uid,"selected")===!0;Ir({element:o,selected:c})}})}function HS(a){let{series:e,cursorBounds:t,multiSelect:i}=a;e.dataItems.forEach(r=>{let s=r.bullets?.[0]?.get("sprite");if(s){let o=r.bullets?.[0]?.get("sprite").get("x"),n=r.bullets?.[0]?.get("sprite").get("y"),l=typeof o=="number"&&typeof n=="number"&&o>=t.left&&o<=t.right&&n>=t.top&&n<=t.bottom||i&&Fn(s.uid,"selected")===!0;Ir({element:s,selected:l})}})}function XS(a){let{xAxis:e,series:t,cursorBounds:i,multiSelect:r}=a;t.dataItems.forEach(s=>{let o=s.bullets?.[0]?.get("sprite");if(o){let n=s.dataContext,l=s.get("valueX"),h=s.get("valueY");if(e instanceof sa){let c=n?.[q.xAxisField];typeof c=="string"&&(l=e.categoryToIndex(c))}let u=typeof l=="number"&&l>=i.left&&l<=i.right,p=typeof h=="number"&&h>=i.top&&h<=i.bottom,d=u&&p||r&&Fn(o.uid,"selected")===!0;Ir({element:o,selected:d})}})}function YS(a){let{cursor:e,xAxis:t,yAxis:i}=a,r=e.get("behavior"),{value1:s,value2:o}=O_(e,t),{value1:n,value2:l}=O_(e,i),h={left:s>o?o:s,right:s>o?s:o,top:n<l?n:l,bottom:n<l?l:n};return r==="selectX"?(h.top=Number.NEGATIVE_INFINITY,h.bottom=Number.POSITIVE_INFINITY):r==="selectY"&&(h.right=Number.POSITIVE_INFINITY,h.left=Number.NEGATIVE_INFINITY),h}function hst(a){let{chart:e,queryObject:t,errorStrings:i}=a;e.get("cursor")?.events.on(Ti.SelectEnded,async r=>{let s=et(e.uid,"actionMode");if(s===ms.MultiSelection||s===ms.MultiSelectionWithCtrlKey){let o=e.xAxes.getIndex(0),n=e.yAxes.getIndex(0);if(o&&n){let l=et(e.uid,"config"),h=ei(l?.series),u=e.get("cursor"),p=YS({cursor:u,xAxis:o,yAxis:n}),d=i0(r);e.series.each(c=>{!Mn(c)&&!Bu(c)&&(c instanceof Ie?jS({series:c,cursorBounds:p,multiSelect:d}):c instanceof Te&&(h===Y.RadarSeries?XS({xAxis:o,series:c,cursorBounds:p,multiSelect:d}):HS({series:c,cursorBounds:p,multiSelect:d})))}),Di(u.selection,!1),await R0({chart:e,selectionSource:Bn.SelectionByRange,queryObject:t,errorStrings:i})}}})}function zS(a){let{series:e,labelDefaults:t,externalDataLabelFormatter:i,seriesType:r}=a;e.bullets.push(()=>{let s=et(e.chart?.uid??Number.NaN,"config")?.series?.[0]?.dataLabels??a.dataLabelsConfig,o=Cs.new(e.root,{locationY:1,sprite:Qt.new(e.root,{populateText:!0,oversizedBehavior:"hide",centerY:X,centerX:pt,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:he(s?.content.color).color,fontSize:s?.content.font?.size})}),n=o.get("sprite");return n&&(O0({dataLabel:n,series:e,externalDataLabelFormatter:i}),e.chart&&s?.visible&&a0({label:n,chart:e.chart,seriesType:r}),Sc({...a,dataLabel:n,dataLabelsConfig:s,labelDefaults:t,defaultDataLabelFormatter:L0})),o})}function O0(a){let{dataLabel:e,series:t,externalDataLabelFormatter:i}=a;e.adapters.remove("text"),e.adapters.remove("html");let r=i!==void 0?"html":"text";cy({label:e,labelOutputProp:r}),e.adapters.add(r,(s,o)=>{let n=s??"",l=ue(t.uid,"histogramDataLabelFormatter"),h=o.dataItem;if(h&&"dataContext"in h&&h.dataContext!==void 0&&l!==void 0){let{count:u,minValue:p,maxValue:d}=h.dataContext;n=l(u,p,d)}return r==="html"?jn(n):n})}function L0(a){let{numberFormatter:e,dataLabelsConfigContent:t,externalDataLabelFormatter:i}=a;return(r,s,o)=>Eo({textSymbol:{...t,text:e.format(r)},format:i===void 0?"amChartsV5":"html"})}function WS(a){let{series:e,labelDefaults:t,externalDataLabelFormatter:i}=a;e.dataItems.forEach(r=>{let s=r.bullets?.[0];if(s){let o=s.get("sprite");o&&o instanceof Qt&&(O0({dataLabel:o,series:e,externalDataLabelFormatter:i}),Sc({...a,dataLabel:o,labelDefaults:t,defaultDataLabelFormatter:L0,externalDataLabelFormatter:i}))}})}function F0(a){let{series:e,dataLabelsConfig:t}=a,i=t?.visible,r=e.bullets.hasIndex(0);i!==!0?r&&dy(e,0):(r||zS(a),WS(a))}function Bu(a){return[q.overlayId.histogramMean,q.overlayId.histogramMedian,q.overlayId.histogramStdDev,q.overlayId.histogramNormalDistribution].includes(a.get("id")??"")}function GS(a){let e="";switch(a){case ze.Mean:e=q.overlayId.histogramMean;break;case ze.Median:e=q.overlayId.histogramMedian;break;case ze.StdDev:e=q.overlayId.histogramStdDev;break;case ze.Normal:e=q.overlayId.histogramNormalDistribution;break}return e}function US(a){let{series:e,seriesConfig:t,colorMatch:i,rendererSymbol:r}=a,{root:s}=e,o=e.chart;if(o){let n=t.fillSymbol??Ly(),l=e0({root:e.root,element:e.columns.template,seriesSymbol:n,rendererSymbol:r,colorMatch:i,isChartFillSymbol:!0}).symbolWithColorInfo;if(l!==void 0){let h=new Map;h.set(0,l),rp({data:h,htmlContainer:s.dom,chartId:o.get("id"),colorMatchApplied:B0(o)})}}}function KS(a){let{series:e,data:t,dataWasUpdated:i,seriesWereReinitialized:r,loaderHandle:s}=a;t&&(i===!0||r===!0)&&(e.events.once(Ti.DataValidated,()=>{s.hideLoader()}),e.data.setAll(t.bins))}function fc(a){let{root:e,xAxis:t,yAxis:i,type:r,utilsStrings:s}=a,o=Te.new(e,{id:GS(r),valueXField:"x",valueYField:"y",xAxis:t,yAxis:i,visible:!1});return r===ze.Normal&&kc(o,s.overlays.normal),vr(o.uid,{isOverlay:!0,type:r}),o.set("connect",!1),o.appear(),o}function qS(a){let{root:e,seriesConfig:t,xAxis:i,yAxis:r,options:s,chartConfig:o,queryObject:n,errorStrings:l}=a,{id:h,name:u}=t,p=Ie.new(e,{id:h,name:u,xAxis:i,yAxis:r,categoryXField:qu.Start,valueYField:qu.Count,maskBullets:!1});return eh(p.columns.template,s?.selectionTheme),vy({element:p.columns.template,series:p,queryObject:n,errorStrings:l}),p.columns.template.setAll({width:X}),F0({yAxisValueFormat:o.axes?.[1]?.valueFormat,series:p,seriesConfig:t,seriesType:Y.HistogramSeries,dataLabelsConfig:t.dataLabels,externalDataLabelFormatter:s?.dataLabelFormatter}),by(p,o),p.appear(),p}function ust(a){let{root:e,seriesConfig:t,xAxis:i,xAxisForOverlaySeries:r,yAxis:s,utilsStrings:o,options:n,chartConfig:l,queryObject:h,errorStrings:u}=a,p=[],d=qS({root:e,seriesConfig:t,xAxis:i,yAxis:s,options:n,chartConfig:l,queryObject:h,errorStrings:u});return p.push(d),fy(d,n?.tooltipFormatter),r&&(p.push(fc({root:e,xAxis:r,yAxis:s,type:ze.Mean,utilsStrings:o})),p.push(fc({root:e,xAxis:r,yAxis:s,type:ze.Median,utilsStrings:o})),p.push(fc({root:e,xAxis:r,yAxis:s,type:ze.StdDev,utilsStrings:o})),p.push(fc({root:e,xAxis:r,yAxis:s,type:ze.Normal,utilsStrings:o}))),p}function ZS(a){let{lineSeries:e,overlayConfig:t,data:i,utilsStrings:r}=a;if(!t)Di(e,!1);else{let{symbol:s,created:o,visible:n}=t,l=ue(e.uid,"type"),h=s??{type:ui.SLS};if(t.symbol?.color===void 0&&(h.color=Ra({colorIndex:Zc(l),histogramOverlays:!0})),Vu({element:e,lineSymbol:h,visible:o===!0&&n!==!1}),i&&"bins"in i){let p=i.bins.map(x=>x.count),d=Math.max(...p),{mean:c,stddev:f,median:g}=i,m=c-f,y=c+f,v=[];switch(l){case ze.Mean:v=[{x:c,y:0},{x:c,y:d}];break;case ze.Median:v=[{x:g,y:0},{x:g,y:d}];break;case ze.StdDev:v=[{x:m,y:0},{x:m,y:d},{x:null,y:null},{x:y,y:0},{x:y,y:d}];break}e.data.setAll(v)}let u=e.data.getIndex(0)?.x;if(l===ze.StdDev&&(u=i?.stddev??ue(e.uid,"stddev"),vr(e.uid,{stddev:u})),typeof u=="number"){let p=l;switch(l){case ze.Mean:p=r.overlays.mean;break;case ze.Median:p=r.overlays.median;break;case ze.StdDev:p=r.overlays.stdDev;break}let d=et(e.chart?.uid??Number.NaN,"formatLocale"),c=Ql({root:e.root,value:u,valueFormat:jc(),formatLocale:d}),f=`${p}: ${c}`;kc(e,f)}}}function JS(a){let{lineSeries:e,overlayConfig:t,data:i,numberOfPoints:r}=a;if(!t)Di(e,!1);else{let{symbol:s,created:o,visible:n}=t,l=s??{type:ui.SLS};if(t?.symbol?.color===void 0&&(l.color=Ra({colorIndex:Zc(ze.Normal),histogramOverlays:!0})),Vu({element:e,lineSymbol:l,visible:o===!0&&n!==!1}),i&&"bins"in i){let{mean:h,stddev:u,min:p,max:d}=i,c=cC(i.bins),f=pC(p,d,r??q.histogramSeries.normalDistribNumberOfPoints).map(g=>({x:g,y:dC({x:g,mean:h,stddev:u,scalingFactor:c})}));e.data.setAll(f)}}}function QS(a){let{series:e,seriesConfig:t,seriesWereReinitialized:i,dataWasUpdated:r,data:s,loaderHandle:o,options:n}=a;e.set("id",t.id),Di(e,t.visible),eh(e.columns.template,n?.selectionTheme),N0(e.columns.template,s?.bins?.length),kc(e,t.name);let l=s?.bins.find(h=>"symbol"in h)?.symbol;I0(a)&&E0({styleCallback:()=>US({...a,rendererSymbol:l}),series:e,seriesConfig:t}),KS({series:e,seriesWereReinitialized:i,dataWasUpdated:r,data:s,loaderHandle:o})}function pst(a){let{allChartSeries:e,seriesConfig:t,data:i,utilsStrings:r,fieldList:s,axes:o,options:n,dataLabelFormatter:l,chartConfig:h}=a,{tooltipFormatter:u}=n??{};for(let p=0;p<e.length;p++){let d=e[p];if(d instanceof Te&&ue(d.uid,"isOverlay")){let c=ue(d.uid,"type");if(c===ze.Normal)JS({lineSeries:d,overlayConfig:t.overlays?.comparisonDistribution,data:i});else{let f;switch(c){case ze.Mean:f=t.overlays?.mean;break;case ze.Median:f=t.overlays?.median;break;case ze.StdDev:f=t.overlays?.standardDeviation;break}ZS({lineSeries:d,overlayConfig:f,data:i,utilsStrings:r})}}else d instanceof Ie&&(QS({...a,series:d}),F0({series:d,yAxisValueFormat:h.axes?.[1]?.valueFormat,seriesConfig:t,seriesType:Y.HistogramSeries,dataLabelsConfig:t.dataLabels,externalDataLabelFormatter:l}),TC({axes:o,series:d,seriesConfig:t,fieldList:s,tooltipFormatter:u,utilsStrings:r,axesConfig:h.axes}))}}function tT(a){Qy(),Gy(a.root.dom),Nu({chart:a})}function eT(a){let{chart:e,chartType:t,showMean:i}=a;return e.series.values.filter(r=>{let s=!0;return Mn(r)||Bu(r)||ue(r.uid,"isOverlay")===!0?s=!1:t===Y.BoxPlotSeries&&(i?s=ue(r.uid,"isBoxPlotMeanLineSeries")===!0:s=r instanceof aa),s}).every(r=>ue(r.uid,"isSelectionApplied")===!0)}function iT(a){a.series.each(e=>vr(e.uid,{isSelectionApplied:void 0}))}function rT(a){let e=[];if(!Mn(a)&&!Bu(a))switch(!0){case a instanceof Ki:e=a.slices.values;break;case a instanceof Ie:let{chart:t}=a;if(t){let i=et(t.uid,"config");if(i){let r=ei(i?.series),s=[];r===Y.HistogramSeries?s=[qu.Count]:r===Y.HeatSeries?s=[pi.valueField]:s=ua(i?.series,[a.get("id")??""]),e=a.columns.values.filter(o=>{let n=!1,l=o.dataItem?.dataContext;return l&&(n=r===Y.HeatSeries||s.some(h=>h in l&&Number.isFinite(l[h]))),n})}}break;case a instanceof Te:e=Array.from(a.dataItems.values());break}return e}function M0(a,e){let t=et(a.uid,"actionMode");(t===ms.MonoSelection||t===ms.None)&&e.length>1?Nu({chart:a}):e.forEach(i=>{Ir({element:i,selected:!0})})}function sT(a){let{chart:e,selectionIndexes:t,queryObject:i}=a,r=[],s=[],o=et(e.uid,"config"),n=ep(o),l=ua(o?.series??[]),h=ji(o?.series),u=ei(o?.series);return e.series.each((p,d)=>{if(o&&p.get("visible")===!0&&p.get("id")!==q.overlayId.scatterplotTrendLine){let c=o.series[0].x,f=Cc(p),g=t.get(d);if(g!==void 0){let m;if(p instanceof Te&&(m=p.dataItems.map(y=>y?.bullets?.[0]?.get("sprite")).filter(y=>y!==void 0)),m!==void 0){let{indexesToSelect:y}=g;m.forEach((v,x)=>{if(y===void 0||y.includes(x)){let _=vc({dataContext:v.dataItem?.dataContext,yList:l,yAxisField:f,xAxisField:c,chartType:u,chartSubType:h,showOutliers:n,isFeatureCollectionLayer:nh(i)});_!==void 0&&r.push(_),s.push(v)}else Ir({element:v,selected:!1})})}}}}),M0(e,s),r}function aT(a){let{chart:e,chartConfig:t,options:i,elementsToApplySelectionTo:r,selectionDataItems:s,layerOidField:o,xAxisField:n,yAxisField:l,splitBy:h,queryObject:u}=a,p=ei(t.series),d=ji(t.series),c=ep(t),f=[],g=[],m=[],y=ua(t.series);return r.forEach((v,x)=>{let _=v instanceof Xe||v instanceof nr?v:v.bullets?.[0]?.get("sprite");if(_!==void 0){let $=v instanceof Xe||v instanceof nr?_.dataItem?.dataContext:v.dataContext;if($!==void 0&&p===Y.BoxPlotSeries&&$[q.boxPlot.boxPlotOutlierId]!==!0&&($=vc({dataContext:$,yAxisField:l,yList:y,xAxisField:n,splitBy:h,chartType:p,chartSubType:d,showOutliers:c,isFeatureCollectionLayer:nh(u)})),H_({elementDataContext:$,options:i,selectionDataItems:s,layerOidField:o,xAxisField:n,yAxisField:l,chartType:p,splitBy:h,chartSubType:d,showOutliers:c}))if(f.push(_),g.push(x),_?.dataItem instanceof xa&&$!==void 0)m.push($);else{let T=new Set;p===Y.PieSeries&&wc($)?(B_({groupOfSlicesDataContext:$})??[]).forEach(S=>{s.forEach(k=>{j_({layerOidField:o,sliceDataContext:S,selectionDataContext:k,xAxisField:n})&&T.add(S)})}):T.add($),Array.from(T)?.forEach(S=>{let k=vc({dataContext:S,yAxisField:l,yList:y,xAxisField:n,splitBy:h,chartType:p,chartSubType:d,showOutliers:c,isFeatureCollectionLayer:nh(u)});k!==void 0&&m.push(k)})}else Ir({element:_,selected:!1})}}),M0(e,f),{selectedIndexes:g,newSelectionDataItems:m}}function oT(a){let{series:e,seriesIndex:t,queryObject:i,dataWasUpdated:r,sortChanged:s,groupOfSlicesWasUpdated:o,xAxisField:n,yAxisField:l,splitBy:h,rotationChanged:u}=a,{chart:p}=e;if(p instanceof or){let d=et(p.uid,"options"),{filterBySelection:c,selectionData:f,returnSelectionIndexes:g,returnSelectionOIDs:m}=d??{},{selectionIndexes:y}=f??{},v=et(p.uid,"config"),x=tp(v),_=ei(v?.series),$=ji(v?.series),T=rT(e);if(c!==!0&&v!==void 0){let S=Va(i),k=Hn(S).idField,A=et(p.uid,"currentSelectionDataItems"),L=!1,O=!1,I,R=!1;if(T?.[0]!==void 0){if(d?.viewExtentUpdated!==!0){I=d?.selectionData?.selectionItems??A;let B=et(p.uid,"currentSelectionIndexes");R=pv({itemsA:I,itemsB:A,isPieFromFields:$===Ct.PieFromFields,x:n,y:l,outStatisticFieldName:v.series[0].query?.outStatistics?.[0]?.outStatisticFieldName});let Z=y?.keys.length!==B?.keys.length||!Fc(y,B);L=s===!0||r===!0||o===!0||u===!0||I!==void 0&&R;let j=!0;if(y!==void 0&&y.size>0){let{indexesToSelect:it}=y.get(t??0)??{};j=it!==void 0&&it[0]===void 0}O=r===!0||o===!0||u===!0||!j&&Z}if(L&&I!==void 0&&I.length>0){let{selectedIndexes:B,newSelectionDataItems:Z}=aT({chart:p,chartConfig:v,options:d,elementsToApplySelectionTo:T,selectionDataItems:I,layerOidField:k,xAxisField:n,yAxisField:l,splitBy:h,queryObject:i}),j=et(p.uid,"computedSelectionDataItems")??[];if(j.push(...Z),v.series.length>1&&$!==Ct.BarAndLineNoAggregation&&$!==Ct.BarAndLineSplitByNoAggregation&&(j=cv({data:j,x:v.series[0].x,splitByField:lh(v.series[0].query?.where)})),na(p.uid,{computedSelectionDataItems:j}),g===!0){let it=Array.from(new Set(B)),st=et(p.uid,"computedSelectionIndexes");st===void 0&&(st=new Map),it.length===T.length?st.set(t??0,{}):st.set(t??0,{indexesToSelect:it}),na(p.uid,{computedSelectionIndexes:st})}}else if(y!==void 0&&O)I=sT({chart:p,selectionIndexes:y,queryObject:i});else{let B=Z=>{let j=Z.dataItem?.dataContext;return H_({elementDataContext:j,options:d,selectionDataItems:I??A??[],layerOidField:k,xAxisField:n,yAxisField:l,chartType:_,splitBy:h,chartSubType:$})};T.forEach(Z=>{let j=Z instanceof Xe||Z instanceof nr?Z:Z.bullets?.[0]?.get("sprite");j!==void 0&&Ir({element:j,selected:Fn(j.uid,"selected")===!0||B(j),backToDefaultState:I===void 0||I.length===0})})}}if(vr(e.uid,{isSelectionApplied:!0}),eT({chart:p,chartType:_,showMean:x})&&(iT(p),R||O)){let B=et(p.uid,"computedSelectionDataItems")??I;B=Array.from(new Set(B?.map(j=>JSON.stringify(j)))).map(j=>JSON.parse(j)),I!==void 0&&na(p.uid,{currentSelectionDataItems:B}),f?.selectionOIDs!==void 0&&na(p.uid,{currentSelectionOIDs:f.selectionOIDs});let Z;if(g===!0&&(Z=et(p.uid,"computedSelectionIndexes")??y,Z!==void 0&&na(p.uid,{currentSelectionIndexes:Z})),B===void 0||B.length===0)Nu({chart:p,selectionSource:Bn.ProgrammaticSelection});else{let j={selectionItems:B,selectionSource:Bn.ProgrammaticSelection};g===!0&&(j.selectionIndexes=Z),m!==!1&&(j.selectionOIDs=f?.selectionOIDs??et(p.uid,"currentSelectionOIDs")),ip({data:j,htmlContainer:p.root.dom})}na(p.uid,{computedSelectionIndexes:void 0,computedSelectionDataItems:void 0})}}}}function dst(a){let{chart:e,chartConfig:t,queryObject:i}=a;!et(e.uid,"filterBySelection")&&!oh(i)&&e.series.values.filter(r=>!Mn(r)&&!Bu(r)).forEach(r=>{let{seriesConfig:s,seriesIndex:o}=Ac(r,t);if(s){let n=s.x,l=s.type===Y.BoxPlotSeries||s.type===Y.HeatSeries?s.y.toString():Cc(r),h=s.query?.where??"";nT({callbackProps:{...a,series:r,seriesIndex:o,xAxisField:n,yAxisField:l,splitBy:h},series:r,seriesConfig:s})}})}async function R0(a){let{chart:e,selectionSource:t,queryObject:i,errorStrings:r}=a,s=et(e.uid,"config"),o=oh(i);if(s){let n=et(e.uid,"options"),l=ei(s.series),h=ji(s.series),u=ep(s),p=ua(s.series),d=s.series[0].x,c=Ky(i),f=o?void 0:qy(Va(i))?.dateFieldsTimeZone,g;Qu(s)?g=s.outTimeZone:ef(s.series[0])&&(g=s.series[0].temporalBinning?.outTimeZone);let m=Qc(i).find(y=>y.name===d)?.type;try{let y=new Set,v=[],x=new Map,_=[],$=[],T=0;if(e.series.each((S,k)=>{let{seriesConfig:A}=Ac(S,s),L=A?.query?.where??"",O=A?.type===Y.BoxPlotSeries?A.y.toString():Cc(S),I;S instanceof Te?I=S.dataItems:S instanceof Ie?I=S.columns.values:S instanceof Ki&&(I=S.slices.values),I?.forEach((R,B)=>{let Z=R instanceof Xe||R instanceof nr?R:R.bullets?.[0]?.get("sprite");if(Z!==void 0&&Fn(Z.uid,"selected")===!0){T+=1;let j=R instanceof Xe||R instanceof nr?R.dataItem?.dataContext:R.dataContext;if(j!==void 0){if(j=vc({dataContext:j,yAxisField:O,yList:p,xAxisField:d,splitBy:L,chartType:l,chartSubType:h,showOutliers:u,isFeatureCollectionLayer:nh(i)}),y.has(JSON.stringify(j))||(y.add(JSON.stringify(j)),v.push(j)),B!==void 0){let st=x.get(k)?.indexesToSelect??[];st.push(B),x.set(k,{indexesToSelect:Array.from(new Set(st))})}let it=j[rh.uniqueIdsName]!==void 0?[j[rh.uniqueIdsName]].flat():[];if(it.length>0)$.push(...it);else if(!o&&n?.returnSelectionOIDs!==!1){let st=dv({dataContext:j,options:n,xAxisField:d,yAxisField:O??"",splitBy:L,xAxisFieldType:m,chartConfig:s,outTimeZone:g,dataTimeZone:f,runsOnClientQueryEngine:c,queryObject:i});_.push(st)}}}})}),T===0)Nu({chart:e,selectionSource:t});else{if(!o&&n?.returnSelectionOIDs!==!1&&_.length>0){let k={...et(e.uid,"queryConfig")};delete k.groupByFieldsForStatistics,delete k.orderByFields,delete k.outStatistics;let A=await Cw({whereList:_,queryObject:i,queryConfig:k,errorStrings:r});if(_.length===T)$=A;else for(let L=0;L<A.length;L+=1)$.push(A[L])}$=Array.from(new Set($)),na(e.uid,{currentSelectionDataItems:v,currentSelectionOIDs:$,currentSelectionIndexes:x});let S={selectionItems:v,selectionSource:t};n?.returnSelectionIndexes===!0&&(S.selectionIndexes=x),n?.returnSelectionOIDs!==!1&&(S.selectionOIDs=$),o&&(S.selectionPixelTarget=ev({chartConfig:s,layer:i,selectionDataItems:v})),ip({data:S,htmlContainer:e.root.dom})}}catch(y){na(e.uid,{pendingSelectionQueries:!1});let{httpStatus:v}=y instanceof Uy?y.details.details:y.details??{};if(v===429)tT(e);else throw y}na(e.uid,{pendingSelectionQueries:!1})}}function cst(a,e){let{y:t,query:i}=e,r=ji(a.series)===Ct.BarAndLineSplitByNoAggregation?`${t.toString()}_${hh({where:i?.where,keepSurroundingQuotes:!1,escape:!1})}`:[t].flat()[0],s=q.xAxisField,o=a.rotated===!0?"categoryYField":"categoryXField",n=a.rotated===!0?"valueYField":"valueXField",l=a.axes?.[0]?.valueFormat?.type===Y.CategoryAxisFormat?o:n,h=a.rotated===!0?"valueXField":"valueYField";return{xField:s,yField:r,xAxisField:l,yAxisField:h}}function I0(a){let{chartConfig:e,seriesWereReinitialized:t,dataWasUpdated:i,colorMatchChanged:r,seriesStyleChanged:s,sortChanged:o,groupOfSlicesUpdateNeeded:n,stackedTypeChanged:l}=a,h=e.series.length===1,u=ei(e.series),p=!!(t||i||r||s||l),d=!1;switch(u){case Y.BarSeries:d=!!(h&&o);break;case Y.PieSeries:d=!!(n||o);break}return p||d}function V0(a){let{series:e,callbackInfo:t,seriesConfig:i}=a,r=o=>{let{type:n}=o;n==="selection"?oT(o.callbackProps):(Di(e,i.visible),o.styleCallback())},s=et(e.chart?.uid??Number.NaN,"config");s&&z_({series:e,chartConfig:s,whenReadyCallback:()=>r(t)})}function nT(a){let{series:e,callbackProps:t,seriesConfig:i}=a;V0({callbackInfo:{callbackProps:t,type:"selection"},series:e,seriesConfig:i})}function E0(a){let{series:e,styleCallback:t,seriesConfig:i}=a;V0({callbackInfo:{styleCallback:t,type:"style"},series:e,seriesConfig:i})}function fst(a){let e;return a&&a.series.length>0&&(e=a.series.values.map(t=>t.get("visible")!==!1?`${t.get("id")}`:"").filter(t=>t!=="")),e}function mst(a){let{series:e,chartConfig:t,isRotated:i}=a,r=sh(t),s=t.series[0],o=e.chart?.xAxes.getIndex(0),n=e.chart?.yAxes.getIndex(0),l=i&&(r===fs.Stacked||r===fs.Stacked100)?n:o;switch(r){case fs.Stacked:{e.setAll({stacked:!0,valueYShow:"valueYWorking",valueXShow:"valueXWorking",baseAxis:l}),e instanceof Te&&e.set("stackToNegative",s.stackNegativeValuesToBaseline??q.lineSeries.stackNegativeValuesToBaseline);break}case fs.Stacked100:{e.setAll({stacked:!0,baseAxis:l}),i===!0?(e.setAll({valueXShow:"valueXTotalPercent"}),o instanceof lr&&o.set("calculateTotals",!0)):(e.setAll({valueYShow:"valueYTotalPercent"}),n instanceof lr&&n.set("calculateTotals",!0));break}case fs.Side:default:{e.setAll({stacked:!1,valueYShow:"valueYWorking",valueXShow:"valueXWorking"});break}}}function kc(a,e){a.set("name",e)}function gst(a){let{chart:e,chartType:t,rotated:i,assignToSecondValueAxis:r}=a,s=e.xAxes.getIndex(0),o=e.yAxes.getIndex(0),n=[s,o,e.xAxes.getIndex(1)??e.yAxes.getIndex(1)],l,h;i!==!0?(l=n[0],h=r===!0&&n[2]?n[2]:n[1]):(l=r===!0&&n[2]?n[2]:n[0],h=n[1]);let u=t===Y.HistogramSeries?e.xAxes.getIndex(1):void 0;return{xAxis:l,xAxisForHistogramOverlaySeries:u,yAxis:h}}function by(a,e){let{series:t}=e,i=ei(t);a instanceof Ie&&(a.columns.template.setAll({hoverOnFocus:!0}),i===Y.HeatSeries?a.columns.template.set("ariaLabel",uT()):a.columns.template.set("ariaLabel",Vy()))}function N0(a,e){a&&a.set("focusable",(e??0)<q.focusableThreshold)}function yst(a){let{currentChartSeriesCount:e,chartConfig:t,dataUpdateDetails:i,seriesCompositionChanged:r,seriesFilteredOut:s,sizePolicyChangesRequireSeriesReinit:o}=a,n=!1,l=ei(t.series);switch(l){case Y.BarSeries:case Y.LineSeries:case Y.RadarSeries:case Y.ComboLineAndBarSeries:case Y.BoxPlotSeries:let h=t.series.length;l===Y.BoxPlotSeries&&(tp(t)?h+=4:h*=5),n=s||r||i?.common?.numberOfSeriesChanged===!0||e!==h;break;case Y.ScatterSeries:n=o===!0;break}return n}function vst(a){let{chartConfig:e,series:t,seriesIndex:i,queryObject:r}=a,s=e.series[i];if(s){let o=ji(e.series),n=s.name;if(o===Ct.BarAndLineSplitBy||o===Ct.BarAndLineSplitByNoAggregation){let l=lh(s.query?.where);n=rv({queryObject:r,fieldName:l,fieldValue:n})??n}kc(t,n)}}function Ac(a,e){let t=ei(e?.series),i,r;return e?.series.forEach((s,o)=>{let n=!1;t!==Y.BoxPlotSeries||a instanceof aa?n=a.get("id")===s.id:a instanceof oa?n=a.get("id")?.replace(`_${dc.Top}`,"")===s.id||a.get("id")?.replace(`_${dc.Median}`,"")===s.id||a.get("id")?.replace(`_${dc.Bottom}`,"")===s.id:a instanceof Te&&(n=a.get("id")?.replace(`_${dc.Outliers}`,"")===s.id),n&&(i=s,r=o)}),{seriesConfig:i,seriesIndex:r}}function lT(a,e){let{chart:t}=e;if(t instanceof Si){let i=e.get("xAxis"),r=e.get("yAxis"),s=a.dataItem?.get("valueX"),o=a.dataItem?.get("valueY");if(typeof s=="number"&&typeof o=="number"){let n=i?.getPrivate("min",0),l=i?.getPrivate("max",0),h=r?.getPrivate("min",0),u=r?.getPrivate("max",0),p=i?.get("start",0),d=i?.get("end",1),c=r?.get("start",0),f=r?.get("end",1),g=n+p*(l-n),m=n+d*(l-n),y=h+c*(u-h),v=h+f*(u-h),x=s<g||s>m||o<y||o>v;a.set("forceHidden",x)}}}function hT(a,e){let t=(i,r)=>{r!==void 0&&lT(r,e)};a.on("x",t),a.on("y",t)}function B0(a,e){let t=e;t===void 0&&(t=et(a.uid,"config"));let i=et(a.uid,"colorMatchApplied")??!1;return(t?.colorMatch??!1)&&i}function L_(a,e){a.set("turboMode",e===!0)}function uT(){return`{${pi.xField}} {${pi.yField}} {${pi.valueField}}`}function pT(a,e){return!Fc(a,e)}function bst(a,e){return pT(a,e)||a!==e}function dT(a){return(new Intl.NumberFormat(a,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??".")==="."?",":";"}function cT(a){return new Intl.NumberFormat(a,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??"."}var F_=a=>{let{value:e,quoteAll:t=!1,locale:i,roundDecimals:r}=a,s=e==null?"":String(e);if(e===null)s="null";else if(e===void 0)s="";else if(typeof e=="number"&&Number.isFinite(e)&&i!==void 0){let o=cT(i),n=r??s.split(o)[1]?.length??2;s=new Intl.NumberFormat(i,{maximumFractionDigits:n}).format(e).replace(/\u202F/gu," ")}return(t||/[",\r\n]/u.test(s))&&(s=`"${s.replace(/"/gu,'""')}"`),s};function xst(a,e={}){let{columns:t,delimiter:i,includeHeader:r=!0,quoteAll:s=!1,locale:o,roundDecimals:n}=e,l=a.length===0,h="";if(!l){let u=t??Object.keys(a[0]),p=[],d=i??dT(o??"en");if(o!==void 0&&d!==","&&(h+=`sep=${d}\r
54
+ `),r){let c=u.map(f=>F_({value:f,quoteAll:s,locale:o,roundDecimals:n}));p.push(c.join(d))}a.forEach(c=>{let f=u.map(g=>F_({value:c[g],quoteAll:s,locale:o,roundDecimals:n}));p.push(f.join(d))}),h+=p.join(`\r
55
+ `)}return h}function _st(a){let{rawData:e,config:t,layer:i,fieldList:r,formatters:s,formatLocale:o,utilsStrings:n}=a,l=[];if(t!==void 0&&Array.isArray(e)&&e.length>0){let h=ei(t?.series);h===Y.HistogramSeries?l=gT(t,e,s):h===Y.HeatSeries?l=mT({config:t,rows:e,layer:i,fieldList:r,formatLocale:o,utilsStrings:n}):h===Y.BarSeries||h===Y.LineSeries||h===Y.ComboLineAndBarSeries?l=vT({config:t,rows:e,layer:i,fieldList:r,formatters:s}):h===Y.PieSeries?l=xT({config:t,rows:e,layer:i,fieldList:r,formatters:s}):h===Y.BoxPlotSeries&&(l=PT({config:t,rows:e,fieldList:r,formatters:s}))}return l}function qi(a){let{value:e,originalValue:t,formatter:i}=a,r=e;return i!==void 0&&(e===null||e instanceof Date||typeof e=="number"||typeof e=="string")&&(r=i(e,t)),r}function Lo(a){let{field:e,row:t,fieldList:i,formatter:r}=a,s=Object.keys(t).find(l=>l.toLocaleLowerCase()===e.toLocaleLowerCase()),o=t[s??e],n;return o==null||typeof o=="boolean"||Array.isArray(o)?n=o:typeof o=="string"||typeof o=="number"||o instanceof Date?n=j0({field:e,value:o,fieldList:i}):n=o,qi({value:n,originalValue:o,formatter:r})}function ry(a){let{config:e,seriesIndex:t,formatters:i}=a;return e.series?.[t]?.assignToSecondValueAxis===!0?i?.secondaryYAxisLabelFormatter:i?.yAxisLabelFormatter}function fT(a){let{config:e,splitValueIndex:t,formatters:i}=a;return e?.series?.[t]?.assignToSecondValueAxis===!0?i?.secondaryYAxisLabelFormatter:i?.yAxisLabelFormatter}function mT(a){let{config:e,rows:t,layer:i,fieldList:r,formatLocale:s,utilsStrings:o}=a,[n]=e.series,l=n.x,h=nf(e),u=lf(e),p=op({config:e,xAxisField:l,numericFields:u,aggregationType:h,layer:i,fieldList:r});return t.map(d=>{let c=d[pi.xField],f=d[pi.yField],g=d[pi.valueField],m=typeof g=="number"&&Number.isFinite(g)?g.toFixed(2):g,y={label:n.x,value:c},v={label:n.y,value:f};if(n.xTemporalBinning!==void 0){let{label:x,value:_}=Pc({value:Number(c),config:e,formatLocale:s,unit:n.xTemporalBinning.unit,utilsStrings:o});!pr(x)&&!pr(_)&&(y={label:x,value:_})}if(n.yTemporalBinning!==void 0){let{label:x,value:_}=Pc({value:Number(f),config:e,formatLocale:s,unit:n.yTemporalBinning.unit,utilsStrings:o});!pr(x)&&!pr(_)&&(v={label:x,value:_})}return{[y.label]:y.value,[v.label]:v.value,[p.description]:m}})}function gT(a,e,t){let i=bv(a),r=`${oi(ap.Min)} of ${i}`,s=`${oi(ap.Max)} of ${i}`,o=`${oi(ap.Count)} of ${i}`;return e.map(n=>{let{minValue:l,maxValue:h,count:u}=n,p=Uu(l),d=Uu(h),c=Uu(u),f={};if(p&&(f[r]=qi({value:l,originalValue:l,formatter:t?.xAxisLabelFormatter})),d&&(f[s]=qi({value:h,originalValue:h,formatter:t?.xAxisLabelFormatter})),p&&d){let g=qi({value:l,originalValue:l,formatter:t?.xAxisLabelFormatter}),m=qi({value:h,originalValue:h,formatter:t?.xAxisLabelFormatter});f.Label=`${String(g??"")} - ${String(m??"")}`}return c&&(f[o]=qi({value:u,originalValue:u,formatter:t?.yAxisLabelFormatter})),f})}function yT(a,e,t){let i=Object.keys(a),r=[];return t?r=t.map(s=>i.find(o=>o.toLowerCase().includes(s.toLowerCase()))||""):r=i.filter(s=>s.toLowerCase().includes(e.toLowerCase())),r.filter(s=>s.trim()!=="")}function vT(a){let{config:e,rows:t,layer:i,fieldList:r,formatters:s}=a,o=yv(e),n=nf(e),l=oi(n),h=lf(e),u=ji(e.series),p=af(e),d=$v(e),{idField:c,isTraditionalTypeOID:f}=Hn(Va(i)),g=f&&h.length===1&&h[0]===c,m;switch(u){case Ct.BarAndLineNoAggregation:m=t.map(y=>{let v=Lo({field:o,row:y,fieldList:r,formatter:s?.xAxisLabelFormatter}),x={[o]:v};return Object.assign(x,...h.map((_,$)=>({[_]:qi({value:y[_],originalValue:y[_],formatter:ry({config:e,seriesIndex:$,formatters:s})})}))),x});break;case Ct.BarAndLineFromFields:m=Mc(h,t).map(([y,v])=>{let x=ua(e.series)[0],_={};return v!==void 0&&y!==void 0&&(_.Field=qi({value:v[o],originalValue:v[o],formatter:s?.xAxisLabelFormatter}),_.Value=qi({value:v[x],originalValue:v[x],formatter:ry({config:e,seriesIndex:0,formatters:s})})),_});break;case Ct.BarAndLineMonoField:case Ct.BarAndLineMultiFields:m=t.map(y=>{let v=Lo({field:o,row:y,fieldList:r,formatter:s?.xAxisLabelFormatter}),x={[o]:v};return h.forEach((_,$)=>{let T=op({config:e,xAxisField:o,numericFields:h,aggregationType:n,layer:i,numericFieldIndex:$,fieldList:r}),S=ua(e.series)[$],k=S,A=S;S.toLowerCase()===T.name.toLowerCase()&&(k=T.description,A=T.name),x[k]=qi({value:y[A],originalValue:y[A],formatter:ry({config:e,seriesIndex:$,formatters:s})})}),x});break;case Ct.BarAndLineSplitBy:m=t.flatMap(y=>{let v=ua(e.series),x=Lo({field:o,row:y,fieldList:r,formatter:s?.xAxisLabelFormatter});return p.map((_,$)=>({[o]:x,[d]:_,[g?l:`${l} of ${h[0]}`]:qi({value:y[v[$]],originalValue:y[v[$]],formatter:fT({config:e,splitValueIndex:$,formatters:s})})}))});break;case Ct.BarAndLineSplitByNoAggregation:m=t.map(y=>{let v=Lo({field:o,row:y,fieldList:r,formatter:s?.xAxisLabelFormatter}),x=yT(y,h[0],p);return{[o]:v,[d]:y[d],[h[0]]:qi({value:y[x[0]],originalValue:y[x[0]],formatter:s?.yAxisLabelFormatter})}});break;default:m=t}return m}function bT(a){if(a.length===0)return[];let e=a.reduce((t,i)=>{for(let[r,s]of Object.entries(i))typeof s=="number"&&Number.isFinite(s)&&(t[r]=(t[r]??0)+s);return t},{});return a.map(t=>{let i={...t};for(let[r,s]of Object.entries(t))if(typeof s=="number"&&e[r]>0){let o=s/e[r];i[`${r}${Ia}`]=o.toPrecision(2)}return i})}function xT(a){let{config:e,rows:t,layer:i,fieldList:r,formatters:s}=a,o=xv(e),n=ji(e.series),l=bT(t),h=_v(e),u=n!==Ct.PieFromFields?rf.Category:rf.Fields,p=Pv(e,u),d=op({config:e,xAxisField:o,numericFields:h,aggregationType:p,mode:u,layer:i,fieldList:r}),c=ua(e.series)[0];return n===Ct.PieFromCategory||n===Ct.PieNoAggregation?l=l.map(f=>{let g=Lo({field:o,row:f,fieldList:r,formatter:s?.xAxisLabelFormatter}),m={[o]:g},y=c,v=c;return n===Ct.PieFromCategory&&c.toLowerCase()===d.name.toLowerCase()&&(y=d.description,v=d.name),m[y]=qi({value:f[v],originalValue:f[v],formatter:s?.yAxisLabelFormatter}),m[oi(Ia.trim())]=qi({value:f[`${v}${Ia}`],originalValue:f[`${v}${Ia}`],formatter:s?.yAxisLabelFormatter}),m}):n===Ct.PieFromFields&&(l=Mc(h,l).map(([f,g])=>{let m={};return g!==void 0&&f!==void 0&&(m.Field=qi({value:g[o],originalValue:g[o],formatter:s?.xAxisLabelFormatter}),m.Value=qi({value:g[c],originalValue:g[c],formatter:s?.yAxisLabelFormatter}),m[oi(Ia.trim())]=qi({value:g[`${c}${Ia}`],originalValue:g[`${c}${Ia}`],formatter:s?.yAxisLabelFormatter})),m})),l}function mc(a){let{rawData:e,keyBase:t="",outRow:i}=a;for(let[r,s]of Object.entries(Ue)){let o=e[t+s];o!==void 0&&(i[r]=o);let n=e[t+s+My];n!==void 0&&(i[`${r} Outlier`]=n);let l=e[t+s+Ju];l!==void 0&&(i[`${r} Z-Score`]=l)}}function Iu(a){let{rawData:e,outRow:t,config:i,boxPlotSubType:r,fieldList:s}=a,o=np(i),n=of(i),l=lp(i),h=Ue.Outlier,u=En;switch(r){case Ct.BoxPlotMonoFieldAndCategory:{let c=j0({field:o,value:e[o],fieldList:s});t[o]=c,t[oi(Ue.Outlier)]=e[h];break}case Ct.BoxPlotMultiFieldsAndCategory:{t[oi(o)]=e[o],h=`${n.find(c=>Object.keys(e).some(f=>f.toLowerCase().includes(c.toLowerCase())))??""}_${h}`,t[oi(Ue.Outlier)]=e[h];break}case Ct.BoxPlotMonoFieldAndSplitBy:case Ct.BoxPlotMultiFieldsAndSplitBy:{let c=String(e[l]);h=`${c}_${h}`,t.Field=e[u],t[oi(l)]=c,t[oi(Ue.Outlier)]=e[h];break}case Ct.BoxPlotMonoFieldAndCategoryAndSplitBy:{let c=String(e[l]);h=`${c}_${h}`,t[oi(o)]=e[o],t[oi(l)]=c,t[oi(Ue.Outlier)]=e[h];break}case Ct.BoxPlotMonoField:case Ct.BoxPlotMultiFields:default:{t.Field=e[u],t[oi(Ue.Outlier)]=e[h];break}}let p=`${h}${Ju}`,d=e[p];d!==void 0&&(t[`${oi(Ue.Outlier)} Z-Score`]=d)}function _T(a){let{rawData:e,outRow:t,config:i,splitByValue:r}=a,s=ji(i.series),o=e[`${r}_${Ue.Average}`],n=lp(i),l=np(i),h="";switch(s){case Ct.BoxPlotMonoFieldAndSplitBy:{h=`${r}_${n}`,t.Field=e[En],t[oi(n)]=e[h];break}case Ct.BoxPlotMultiFieldsAndSplitBy:{h=`${r}_${Ue.Average}`,t.Field=e[En],t[oi(n)]=e[h];break}case Ct.BoxPlotMonoFieldAndCategoryAndSplitBy:{h=`${r}_${Ue.Average}`,t[l]=e[l],t[oi(n)]=r;break}}t[oi(Ue.Average)]=o;let u=`${String(o)}${Ju}`,p=e[u];p!==void 0&&(t[`${oi(Ue.Average)} Z-Score`]=p)}function PT(a){let{config:e,rows:t,fieldList:i,formatters:r}=a,s=ji(e.series),o=s,n=vv(e),l=Array.isArray(t)&&t.length>0&&t.every(f=>f[Et.boxPlot.boxPlotMeanLineMarkerId]!==void 0);n&&!l&&(s===Ct.BoxPlotMonoFieldAndSplitBy?o=Ct.BoxPlotMonoField:s===Ct.BoxPlotMultiFieldsAndSplitBy?o=Ct.BoxPlotMultiFields:s===Ct.BoxPlotMonoFieldAndCategoryAndSplitBy&&(o=Ct.BoxPlotMonoFieldAndCategory));let h=np(e),u=of(e),p=af(e),d=lp(e),c;switch(o){case Ct.BoxPlotMonoField:case Ct.BoxPlotMonoFieldAndCategory:{c=t.map(f=>{let g={};if(f[Et.boxPlot.boxPlotOutlierId])Iu({rawData:f,outRow:g,config:e,boxPlotSubType:o});else{if(o===Ct.BoxPlotMonoFieldAndCategory){let m=Lo({field:h,row:f,fieldList:i,formatter:r?.xAxisLabelFormatter});g[h]=m}else o===Ct.BoxPlotMonoField&&(g.Field=f[En]);mc({rawData:f,outRow:g})}return g});break}case Ct.BoxPlotMultiFields:{c=t.flatMap(f=>{let g={};return f[Et.boxPlot.boxPlotOutlierId]?Iu({rawData:f,outRow:g,config:e,boxPlotSubType:o}):(g.Field=f[En],mc({rawData:f,outRow:g})),[g]});break}case Ct.BoxPlotMultiFieldsAndCategory:{c=t.flatMap(f=>u.map(g=>{let m={},y="";if(m.Field=g,f[Et.boxPlot.boxPlotOutlierId])Iu({rawData:f,outRow:m,config:e,boxPlotSubType:o});else{if(o===Ct.BoxPlotMultiFieldsAndCategory){let v=Lo({field:h,row:f,fieldList:i,formatter:r?.xAxisLabelFormatter});m[h]=v,y=`${g}_`}mc({rawData:f,outRow:m,keyBase:y})}return m}));break}case Ct.BoxPlotMonoFieldAndSplitBy:case Ct.BoxPlotMultiFieldsAndSplitBy:case Ct.BoxPlotMonoFieldAndCategoryAndSplitBy:{c=t.flatMap(f=>{if(f[Et.boxPlot.boxPlotOutlierId]){let g={};return Iu({rawData:f,outRow:g,config:e,boxPlotSubType:o}),[g]}else return f[Et.boxPlot.boxPlotMeanLineMarkerId]?p?.map(g=>{let m={};return _T({rawData:f,outRow:m,splitByValue:g,config:e}),m}):p.map(g=>{let m={};if(o===Ct.BoxPlotMonoFieldAndCategoryAndSplitBy){let y=Lo({field:h,row:f,fieldList:i,formatter:r?.xAxisLabelFormatter});m[h]=y}return f[Et.boxPlot.boxPlotOutlierId]?Iu({rawData:f,outRow:m,config:e,boxPlotSubType:o}):(m[d]=g,mc({rawData:f,outRow:m,keyBase:`${g}_`})),m})});break}default:c=t}return c}var M_=a=>{let e=!1;return(typeof a=="string"||typeof a=="number")&&(e=!Number.isNaN(new Date(a).getTime())),e},j0=a=>{let{field:e,value:t,fieldList:i}=a,r=t,s=i?.find(o=>o.name===e);if(s){let o=s.type===Ku.DateOnly;tf(s)&&!o?r=M_(t)?new Date(t).toISOString():t:o&&typeof t!="string"&&(r=M_(t)?new Date(t).toISOString().split("T")[0]:t)}return r};function Pst(){let a=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${a()+a()}-${a()}-${a()}-${a()}-${a()}${a()}${a()}`}return{a:_t,b:N,c:Sf,d:Nv,e:Dt,f:nt,g:Rt,h:$t,i:Uf,j:Le,k:ml,l:js,m:rt,n:Q,o:Me,p:$i,q:Ys,r:Xp,s:qa,t:Za,u:Ab,v:zh,w:Ja,x:xl,y:_l,z:Ni,A:on,B:At,C:Cm,D:me,E:Tr,F:Sm,G:Ce,H:es,I:sr,J:xa,K:wl,L:ro,M:Zp,N:Qp,O:Vb,P:Hr,Q:Kh,R:Dl,S:kl,T:mr,U:Ar,V:Jh,W:ad,X:Eb,Y:od,Z:nd,_:Ml,$:Rl,aa:s$,ba:a$,ca:o$,da:Jt,ea:gi,fa:X,ga:pt,ha:Xr,ia:l$,ja:jt,ka:kt,la:He,ma:ot,na:Qt,oa:Ci,pa:vn,qa:wu,ra:Au,sa:Cs,ta:Li,ua:Da,va:yo,wa:Fu,xa:E$,ya:N$,za:B$,Aa:j$,Ba:or,Ca:Si,Da:ks,Ea:yr,Fa:lr,Ga:sa,Ha:Oa,Ia:zl,Ja:$o,Ka:Wl,La:Ie,Ma:aa,Na:Te,Oa:oa,Pa:Os,Qa:Ki,Ra:Do,Sa:Gl,Ta:Ul,Ua:Kl,Va:Fa,Wa:ql,Xa:prt,Ya:drt,Za:crt,_a:frt,$a:mrt,ab:grt,bb:yrt,cb:vrt,db:brt,eb:xrt,fb:_rt,gb:Prt,hb:$rt,ib:wrt,jb:sy,kb:Crt,lb:tw,mb:yc,nb:Srt,ob:Trt,pb:Drt,qb:krt,rb:hr,sb:Art,tb:Ao,ub:ow,vb:nw,wb:hw,xb:Ort,yb:uy,zb:cw,Ab:fw,Bb:mw,Cb:gw,Db:Lrt,Eb:xw,Fb:Frt,Gb:wc,Hb:Mrt,Ib:x_,Jb:Rrt,Kb:B_,Lb:Irt,Mb:dc,Nb:us,Ob:Cw,Pb:j_,Qb:H_,Rb:vc,Sb:Rw,Tb:Zl,Ub:bc,Vb:Y_,Wb:Iw,Xb:b,Yb:Vw,Zb:Vrt,_b:Ti,$b:et,ac:na,bc:ue,cc:vr,dc:Ert,ec:Nrt,fc:Fn,gc:jw,hc:Hw,ic:Brt,jc:jrt,kc:Cc,lc:zw,mc:Gw,nc:Uw,oc:Hrt,pc:Xrt,qc:he,rc:Di,sc:Ye,tc:ps,uc:Jl,vc:Yrt,wc:zrt,xc:aC,yc:Z_,zc:th,Ac:xc,Bc:J_,Cc:oC,Dc:nC,Ec:lC,Fc:uC,Gc:t0,Hc:Vu,Ic:e0,Jc:Fo,Kc:Ir,Lc:eh,Mc:Wrt,Nc:r0,Oc:vC,Pc:cy,Qc:Grt,Rc:l0,Sc:u0,Tc:p0,Uc:Urt,Vc:MC,Wc:RC,Xc:Tc,Yc:Krt,Zc:qrt,_c:Zrt,$c:Jrt,ad:f0,bd:QC,cd:m0,dd:Qrt,ed:tst,fd:est,gd:tS,hd:ist,id:mS,jd:rst,kd:sst,ld:Mn,md:ast,nd:MS,od:ost,pd:nst,qd:Nu,rd:vy,sd:lst,td:hst,ud:ust,vd:pst,wd:dst,xd:R0,yd:cst,zd:I0,Ad:E0,Bd:fst,Cd:mst,Dd:kc,Ed:gst,Fd:by,Gd:N0,Hd:yst,Id:vst,Jd:hT,Kd:B0,Ld:L_,Md:pT,Nd:bst,Od:xst,Pd:_st,Qd:Pst}},"layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","AttributeBinsGraphic","layers/support/CodedValueDomain","intl","request","core/sql","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","applications/Components/imageryUtils","geometry/Extent","geometry/Point",a,b,c,d,e,f,g)