apexcharts 8.6.0 → 8.7.0

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 (193) hide show
  1. package/LICENSE.md +2 -1
  2. package/README.md +7 -7
  3. package/dist/apexcharts.common.js +2 -2
  4. package/dist/apexcharts.core.js +677 -163
  5. package/dist/apexcharts.core.min.js +2 -2
  6. package/dist/apexcharts.esm.js +31 -3
  7. package/dist/apexcharts.full.js +719 -165
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +706 -164
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +706 -164
  13. package/dist/area.common.js +1 -1
  14. package/dist/area.esm.js +1 -1
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +3 -2
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +3 -2
  20. package/dist/bubble.common.js +1 -1
  21. package/dist/bubble.esm.js +1 -1
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +3 -2
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +3 -2
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +677 -163
  29. package/dist/donut.common.js +1 -1
  30. package/dist/donut.esm.js +1 -1
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +3 -2
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +31 -2
  35. package/dist/features/annotations.common.js +2 -2
  36. package/dist/features/annotations.esm.js +6 -2
  37. package/dist/features/annotations.js +2 -2
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +1 -1
  42. package/dist/features/drilldown.esm.js +1 -1
  43. package/dist/features/drilldown.js +1 -1
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +2 -2
  48. package/dist/features/exports.esm.js +26 -1
  49. package/dist/features/exports.js +2 -2
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +1 -1
  54. package/dist/features/highlight-filter.esm.js +1 -1
  55. package/dist/features/highlight-filter.js +1 -1
  56. package/dist/features/history.common.js +2 -2
  57. package/dist/features/history.esm.js +13 -2
  58. package/dist/features/history.js +2 -2
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +1 -1
  63. package/dist/features/keyboard.esm.js +1 -1
  64. package/dist/features/keyboard.js +1 -1
  65. package/dist/features/legend.common.js +1 -1
  66. package/dist/features/legend.esm.js +1 -1
  67. package/dist/features/legend.js +1 -1
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +1 -1
  78. package/dist/features/morph.esm.js +1 -1
  79. package/dist/features/morph.js +1 -1
  80. package/dist/features/perspectives.common.js +2 -2
  81. package/dist/features/perspectives.esm.js +13 -2
  82. package/dist/features/perspectives.js +2 -2
  83. package/dist/features/radial-targets.common.js +1 -1
  84. package/dist/features/radial-targets.esm.js +1 -1
  85. package/dist/features/radial-targets.js +1 -1
  86. package/dist/features/raincloud.common.js +1 -1
  87. package/dist/features/raincloud.esm.js +1 -1
  88. package/dist/features/raincloud.js +1 -1
  89. package/dist/features/renderer-canvas.common.js +1 -1
  90. package/dist/features/renderer-canvas.esm.js +1 -1
  91. package/dist/features/renderer-canvas.js +1 -1
  92. package/dist/features/stats.common.js +1 -1
  93. package/dist/features/stats.esm.js +1 -1
  94. package/dist/features/stats.js +1 -1
  95. package/dist/features/storyboard.common.js +2 -2
  96. package/dist/features/storyboard.esm.js +13 -2
  97. package/dist/features/storyboard.js +2 -2
  98. package/dist/features/streamgraph.common.js +1 -1
  99. package/dist/features/streamgraph.esm.js +1 -1
  100. package/dist/features/streamgraph.js +1 -1
  101. package/dist/features/toolbar.common.js +2 -2
  102. package/dist/features/toolbar.esm.js +26 -1
  103. package/dist/features/toolbar.js +2 -2
  104. package/dist/features/trellis.common.js +2 -2
  105. package/dist/features/trellis.esm.js +8 -2
  106. package/dist/features/trellis.js +2 -2
  107. package/dist/features/waterfall.common.js +1 -1
  108. package/dist/features/waterfall.esm.js +1 -1
  109. package/dist/features/waterfall.js +1 -1
  110. package/dist/features/weave.common.js +1 -1
  111. package/dist/features/weave.esm.js +1 -1
  112. package/dist/features/weave.js +1 -1
  113. package/dist/full.common.js +2 -2
  114. package/dist/full.esm.js +14 -2
  115. package/dist/heatmap.common.js +1 -1
  116. package/dist/heatmap.esm.js +1 -1
  117. package/dist/heatmap.js +1 -1
  118. package/dist/histogram.common.js +2 -2
  119. package/dist/histogram.esm.js +3 -2
  120. package/dist/icicle.common.js +1 -1
  121. package/dist/icicle.esm.js +1 -1
  122. package/dist/icicle.js +1 -1
  123. package/dist/line.common.js +1 -1
  124. package/dist/line.esm.js +1 -1
  125. package/dist/line.js +1 -1
  126. package/dist/pictograms.common.js +1 -1
  127. package/dist/pictograms.esm.js +1 -1
  128. package/dist/pictograms.js +1 -1
  129. package/dist/pie.common.js +1 -1
  130. package/dist/pie.esm.js +1 -1
  131. package/dist/pie.js +1 -1
  132. package/dist/polarArea.common.js +1 -1
  133. package/dist/polarArea.esm.js +1 -1
  134. package/dist/radar.common.js +1 -1
  135. package/dist/radar.esm.js +1 -1
  136. package/dist/radar.js +1 -1
  137. package/dist/radialBar.common.js +1 -1
  138. package/dist/radialBar.esm.js +1 -1
  139. package/dist/radialBar.js +1 -1
  140. package/dist/raincloud.common.js +1 -1
  141. package/dist/raincloud.esm.js +1 -1
  142. package/dist/rangeArea.common.js +1 -1
  143. package/dist/rangeArea.esm.js +1 -1
  144. package/dist/rangeBar.common.js +2 -2
  145. package/dist/rangeBar.esm.js +3 -2
  146. package/dist/scatter.common.js +1 -1
  147. package/dist/scatter.esm.js +1 -1
  148. package/dist/streamgraph.common.js +1 -1
  149. package/dist/streamgraph.esm.js +1 -1
  150. package/dist/sunburst.common.js +1 -1
  151. package/dist/sunburst.esm.js +1 -1
  152. package/dist/sunburst.js +1 -1
  153. package/dist/treemap.common.js +1 -1
  154. package/dist/treemap.esm.js +1 -1
  155. package/dist/treemap.js +1 -1
  156. package/dist/unit-shapes.common.js +1 -1
  157. package/dist/unit-shapes.esm.js +1 -1
  158. package/dist/unit-shapes.js +1 -1
  159. package/dist/unit.common.js +1 -1
  160. package/dist/unit.esm.js +1 -1
  161. package/dist/unit.js +1 -1
  162. package/dist/violin.common.js +1 -1
  163. package/dist/violin.esm.js +1 -1
  164. package/dist/violin.js +1 -1
  165. package/dist/waterfall.common.js +2 -2
  166. package/dist/waterfall.esm.js +3 -2
  167. package/package.json +1 -1
  168. package/src/apexcharts.js +72 -7
  169. package/src/charts/common/bar/Helpers.js +2 -1
  170. package/src/modules/Base.js +3 -0
  171. package/src/modules/CoincidentMarkers.js +289 -0
  172. package/src/modules/Core.js +31 -9
  173. package/src/modules/Data.js +19 -4
  174. package/src/modules/Events.js +6 -0
  175. package/src/modules/Exports.js +48 -0
  176. package/src/modules/Graphics.js +14 -16
  177. package/src/modules/Range.js +24 -12
  178. package/src/modules/Theme.js +40 -12
  179. package/src/modules/annotations/Helpers.js +15 -1
  180. package/src/modules/helpers/UpdateHelpers.js +24 -0
  181. package/src/modules/history/History.js +8 -1
  182. package/src/modules/settings/Config.js +42 -4
  183. package/src/modules/settings/Defaults.js +32 -1
  184. package/src/modules/settings/Globals.js +3 -0
  185. package/src/modules/settings/Options.js +5 -1
  186. package/src/modules/state/ViewState.js +35 -2
  187. package/src/modules/tooltip/Intersect.js +63 -11
  188. package/src/modules/tooltip/Labels.js +193 -18
  189. package/src/modules/tooltip/README.md +2 -0
  190. package/src/modules/tooltip/Tooltip.js +106 -87
  191. package/src/types/internal.d.ts +7 -0
  192. package/src/utils/Resize.js +12 -21
  193. package/types/apexcharts.d.ts +48 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(n,e,o)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,i=(t,n)=>{for(var e in n||(n={}))r.call(n,e)&&s(t,e,n[e]);if(o)for(var e of o(n))a.call(n,e)&&s(t,e,n[e]);return t},c=(t,o)=>n(t,e(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=/[MmLlHhVvCcSsQqTtAaZz]/;function h(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,h=0,L=0,u=0,p=0,f=0,g="";const x=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function m(){for(;a<r&&x(t[a]);)a++}function M(){m();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function y(){m();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=L=t,h=u=n,i=[{x:t,y:n}]}function w(t,n){i.push({x:t,y:n}),c=t,h=n}function C(t,n,e,r,a,s){const l=Math.hypot(t-c,n-h)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),L=Math.max(2,Math.min(160,Math.ceil(l/o))),u=c,g=h;for(let o=1;o<=L;o++){const c=o/L,l=1-c,h=l*l*l,p=3*l*l*c,f=3*l*c*c,x=c*c*c;i.push({x:h*u+p*t+f*e+x*a,y:h*g+p*n+f*r+x*s})}p=e,f=r,c=a,h=s}function Z(t,n,e,o){const r=t,a=n;C(c+2/3*(t-c),h+2/3*(n-h),e+2/3*(t-e),o+2/3*(n-o),e,o),p=r,f=a}function A(t,n,e,r,a,s,l){if(!t||!n)return void w(s,l);const L=c,u=h;t=Math.abs(t),n=Math.abs(n);const g=e*Math.PI/180,x=Math.cos(g),m=Math.sin(g),M=(L-s)/2,y=(u-l)/2,d=x*M+m*y,b=-m*M+x*y,C=d*d/(t*t)+b*b/(n*n);if(C>1){const e=Math.sqrt(C);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=x*$-m*k+(L+s)/2,O=m*$+x*k+(u+l)/2,q=(d-$)/t,j=(b-k)/n,E=(-d-$)/t,P=(-b-k)/n,Y=Math.atan2(j,q);let I=Math.atan2(P,E)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*x-n*a*m,y:O+t*r*m+n*a*x})}p=s,f=l,c=s,h=l}for(;a<r&&(m(),!(a>=r));){let n=t[a];if(l.test(n))a++;else{if(!g)break;n="M"===g?"L":"m"===g?"l":g}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:L,y:u}),d(),c=L,h=u,g=n;continue}const r=t=>null==t?NaN:t,x=r(M());if(isNaN(x))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+x:x,e?h+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;w(e?c+x:x,e?h+t:t);break}case"H":w(e?c+x:x,h);break;case"V":w(c,e?h+x:x);break;case"C":{const t=[x,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;C(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3],e?c+n[4]:n[4],e?h+n[5]:n[5]);break}case"S":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=g&&"CcSs".indexOf(g)>=0;C(o?2*c-p:c,o?2*h-f:h,e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"Q":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=g&&"QqTt".indexOf(g)>=0;Z(n?2*c-p:c,n?2*h-f:h,e?c+x:x,e?h+t:t);break}case"A":{const t=x,n=M(),o=M(),r=y(),a=y(),i=M(),l=M();if(null==n||null==o||null==r||null==a||null==i||null==l)return s;A(t,n,o,r,a,e?c+i:i,e?h+l:l);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(p=c,f=h),g=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const u=128;function p(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function f(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function g(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function x(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;f(t,a,a*e).capacity>=n?o=a:r=a}return o}function m(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const M={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function y(t,n,e,o){const r=void 0!==M[e]?M[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function d(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const b=new Set;function w(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!b.has(t.name)){b.add(t.name);const e="stroke"===t.kind?"A stroke thins to a dotted line below that, which may well be fine.":"Fine detail closes up below that.";console.warn(`[ApexCharts] unit shape "${t.name}" reads best from about ${o} units; this chart has ${n.length}. ${e} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return e(n,r)};return r.shape=Object.freeze(i({},t)),r.with=e=>w(i(i({},t),e),n),r}const C=new Map;function Z(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=C.get(e);if(!o){const r=h(t,n);o={polys:r,bounds:L(r)},C.set(e,o)}return o}(n,s);if(!c.length)return[];const M=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,L=n.offY+o.y*n.scale,u=n.offX+l.x*n.scale,p=n.offY+l.y*n.scale;h<i&&(i=h),u<i&&(i=u),h>c&&(c=h),u>c&&(c=u),L<a&&(a=L),p<a&&(a=p),L>s&&(s=L),p>s&&(s=p),L!==p&&r.push({x0:h,y0:L,x1:u,y1:p})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*u),r=Math.floor((e-a)/l*u);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,p(l,i,o),{evenOdd:a}),b=x(M,t.length,r),w=f(M,b,b*r);if(!w.cells.length)return[];const Z=g(w.cells.map(t=>t.cap),t.length),A=m(t[0].r>0?t[0].r:3,b),U=[];return w.cells.forEach((t,n)=>{d(t,Z[n],b,w.inset,A,U)}),y(t,U,e,b)}}function A(t){return w(c(i({},t),{kind:"silhouette"}),Z)}const U=A({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),$=A({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),k=A({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),v=A({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),O=A({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),q=A({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),j=A({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),E=A({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),P=t=>t.reduce((t,n)=>t+n,0);function Y(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&P(l(h))<a;)h++;const L=s/h,u=g(l(h),a),p=m(t[0].r>0?t[0].r:3,L),f=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*L,a=u[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;f.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:p,row:t})}}return y(t,f,"rows",L)}}function I(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),L=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},u=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,u=[];let p=0;const f=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const g=s<=-1?Math.PI:Math.acos(s),x=g>=Math.PI-1e-9,m=[],M=[0];for(let t=0;t<=40;t++){const n=L(a,r,2*g*t/40-g);if(m.push(n),t>0){const e=m[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const y=M[M.length-1],d=x?0:Math.min(.42*t,y/2),b=y-2*d;let w;if(w=x?Math.max(1,Math.round(y/t)):b>0?Math.floor(b/t)+1:y>=.45*t?1:0,!w)continue;const C=x?y/w:w>1?b/(w-1):0,Z=[];let A=0;for(let t=0;t<w;t++){const n=x?t*C:w>1?d+t*C:y/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=m[A],s=m[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};f(l)&&Z.push(l)}Z.length&&(u.push(Z),p+=Z.length)}return{rows:u,total:p}};let p=1,f=2*s;for(let t=0;t<30;t++){const t=(p+f)/2;u(t).total>=a?p=t:f=t}const x=p,{rows:M}=u(x),d=g(M.map(t=>t.length),a),b=m(t[0].r>0?t[0].r:3,x),w=[];return M.forEach((t,n)=>{const e=d[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];w.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),w.sort((t,n)=>t.y-n.y||t.x-n.x),y(t,w,o,x)}}function S(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=g(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),L=h*e,u=r.x+r.width/2,p=r.y+(r.height-s*L)/2,f=m(t[0].r>0?t[0].r:3,h),x=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)x.push({x:u+(n-(c[t]-1)/2)*h,y:p+(t+.5)*L,r:f,row:t});return y(t,x,o,h)}}function X(t){return w(c(i({},t),{kind:"rings"}),Y)}function F(t){return w(c(i({},t),{kind:"globe"}),I)}function N(t){return w(c(i({},t),{kind:"tiers"}),S)}const R=X({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),T=F({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),_=N({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),D=A({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),Q=A({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),z=A({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),B=A({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),V=A({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),H=A({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),G=A({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),J=A({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),K=A({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),W=A({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),tt=A({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),nt=A({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),et=A({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),ot=A({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),rt=A({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),at=A({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),st=A({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),it=A({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),ct=A({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),lt=A({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),ht=A({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),Lt=new Map;function ut(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=h(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const M=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,L=n.offX+t[e+1].x*n.scale,u=n.offY+t[e+1].y*n.scale,p=Math.hypot(L-l,u-h),f=p>1e-9?-(u-h)/p*o:o,g=p>1e-9?(L-l)/p*o:0;r.push({ax:l,ay:h,bx:L,by:u,nx:f,ny:g}),Math.min(l,L)-o<i&&(i=Math.min(l,L)-o),Math.max(l,L)+o>c&&(c=Math.max(l,L)+o),Math.min(h,u)-o<a&&(a=Math.min(h,u)-o),Math.max(h,u)+o>s&&(s=Math.max(h,u)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*u),s=Math.floor((e-a)/l*u);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const L=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const L=a[n]+(t-o)/(r-o)*(a[e]-a[n]);L<i&&(i=L),L>c&&(c=L)}c>i&&o.push({x0:i,x1:c});const l=L(r.ax,r.ay,t);l&&o.push(l);const h=L(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,p({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),b=x(M,t.length,r),w=f(M,b,b*r);if(!w.cells.length)return[];const C=g(w.cells.map(t=>t.cap),t.length),Z=m(t[0].r>0?t[0].r:3,b),A=[];return w.cells.forEach((t,n)=>{d(t,C[n],b,w.inset,Z,A)}),y(t,A,e,b)}}function pt(t){return w(c(i({},t),{kind:"stroke"}),ut)}const ft=pt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),gt=pt({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),xt=pt({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),mt=pt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),Mt=pt({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),yt=pt({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),dt=pt({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"}),bt=[U,$,k,v,O,q,j,E,R,T,_,D,Q,z,B,V,H,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ft,gt,xt,mt,Mt,yt,dt],wt="__apexcharts_unit_layouts__";function Ct(){const t=globalThis;return t[wt]||(t[wt]=Object.create(null)),t[wt]}const Zt=46,At=48,Ut=88,$t={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,Ut,38,Ut],e:[6,51,6,85],f:[6,11,6,45],g:[8,At,38,At]},kt={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},vt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},Ot={1:23,".":19.32,",":19.32,":":19.32," ":23};function qt(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=Ot[" "]+n;continue}const t=vt[r];if(t){e+=t(o),o+=(Ot[r]||Zt)+n;continue}const a=kt[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=$t[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(Ot[r]||Zt)+n}return e.trim()}const jt=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Et(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function Pt(t){return Math.round(10*t)/10}exports.arrow=H,exports.battery=q,exports.bolt=K,exports.bulb=W,exports.car=nt,exports.catalog=bt,exports.check=ft,exports.cross=J,exports.crown=G,exports.digitsPath=qt,exports.droplet=$,exports.fish=B,exports.flame=z,exports.flask=tt,exports.funnel=st,exports.gear=it,exports.globe=T,exports.glyphs=function(t,n={}){const e=String(t),s=n,{gap:l}=s,h=((t,n)=>{var e={};for(var s in t)r.call(t,s)&&n.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&o)for(var s of o(t))n.indexOf(s)<0&&a.call(t,s)&&(e[s]=t[s]);return e})(s,["gap"]);return pt(c(i({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:qt(e,l)}))},exports.group=ot,exports.heart=U,exports.house=O,exports.human=k,exports.leaf=D,exports.moneybag=at,exports.mountain=ht,exports.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return pt(c(i({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},exports.percent=Mt,exports.pin=lt,exports.plane=et,exports.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?jt:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=g(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],L=[],u=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Et(l,t):0;L.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:u})}const p=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),f=new Map;p.forEach((t,n)=>{const e=l?L[n]%c.length:Math.floor(n/p.length*c.length),o=c[e]||c[0],r=`<circle cx="${Pt(t.x)}" cy="${Pt(t.y)}" r="${Pt(t.r||3)}"/>`,a=f.get(o);a?a.push(r):f.set(o,[r])});let x="";return f.forEach((t,n)=>{x+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?x:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${p.length} dots">${x}</svg>`},exports.pulse=xt,exports.pyramid=_,exports.question=yt,exports.registerShapes=function(t){const n=Ct(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e},exports.registeredShapeNames=function(){return Object.keys(Ct())},exports.rings=X,exports.robot=ct,exports.rocket=E,exports.shapeFrom=function(t,n={}){return A(c(i({name:"custom"},n),{path:t}))},exports.shield=j,exports.silhouette=A,exports.sphere=F,exports.spiral=dt,exports.star=V,exports.stroke=pt,exports.strokeFrom=function(t,n={}){return pt(c(i({name:"custom-stroke"},n),{path:t}))},exports.sun=Q,exports.target=R,exports.tiers=N,exports.tree=v,exports.trophy=rt,exports.unregisterShapes=function(t){const n=Ct();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},exports.wifi=gt,exports.xmark=mt;
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
30
30
  return target2;
31
31
  };
32
32
  /*!
33
- * ApexCharts v8.6.0
33
+ * ApexCharts v8.7.0
34
34
  * (c) 2018-2026 ApexCharts
35
35
  */
36
36
  const CMD = /[MmLlHhVvCcSsQqTtAaZz]/;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).ApexUnitShapes={})}(this,function(t){"use strict";var n=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,e,o)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,c=(t,n)=>{for(var e in n||(n={}))a.call(n,e)&&i(t,e,n[e]);if(r)for(var e of r(n))s.call(n,e)&&i(t,e,n[e]);return t},l=(t,n)=>e(t,o(n));const h=/[MmLlHhVvCcSsQqTtAaZz]/;function u(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,l=0,u=0,L=0,f=0,g=0,m="";const p=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function y(){for(;a<r&&p(t[a]);)a++}function M(){y();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function x(){y();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=u=t,l=L=n,i=[{x:t,y:n}]}function w(t,n){i.push({x:t,y:n}),c=t,l=n}function C(t,n,e,r,a,s){const h=Math.hypot(t-c,n-l)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),u=Math.max(2,Math.min(160,Math.ceil(h/o))),L=c,m=l;for(let o=1;o<=u;o++){const c=o/u,l=1-c,h=l*l*l,f=3*l*l*c,g=3*l*c*c,p=c*c*c;i.push({x:h*L+f*t+g*e+p*a,y:h*m+f*n+g*r+p*s})}f=e,g=r,c=a,l=s}function Z(t,n,e,o){const r=t,a=n;C(c+2/3*(t-c),l+2/3*(n-l),e+2/3*(t-e),o+2/3*(n-o),e,o),f=r,g=a}function A(t,n,e,r,a,s,h){if(!t||!n)return void w(s,h);const u=c,L=l;t=Math.abs(t),n=Math.abs(n);const m=e*Math.PI/180,p=Math.cos(m),y=Math.sin(m),M=(u-s)/2,x=(L-h)/2,d=p*M+y*x,b=-y*M+p*x,C=d*d/(t*t)+b*b/(n*n);if(C>1){const e=Math.sqrt(C);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=p*$-y*k+(u+s)/2,O=y*$+p*k+(L+h)/2,j=(d-$)/t,q=(b-k)/n,E=(-d-$)/t,P=(-b-k)/n,Y=Math.atan2(q,j);let I=Math.atan2(P,E)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*p-n*a*y,y:O+t*r*y+n*a*p})}f=s,g=h,c=s,l=h}for(;a<r&&(y(),!(a>=r));){let n=t[a];if(h.test(n))a++;else{if(!m)break;n="M"===m?"L":"m"===m?"l":m}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:u,y:L}),d(),c=u,l=L,m=n;continue}const r=t=>null==t?NaN:t,p=r(M());if(isNaN(p))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+p:p,e?l+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;w(e?c+p:p,e?l+t:t);break}case"H":w(e?c+p:p,l);break;case"V":w(c,e?l+p:p);break;case"C":{const t=[p,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;C(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3],e?c+n[4]:n[4],e?l+n[5]:n[5]);break}case"S":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=m&&"CcSs".indexOf(m)>=0;C(o?2*c-f:c,o?2*l-g:l,e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"Q":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=m&&"QqTt".indexOf(m)>=0;Z(n?2*c-f:c,n?2*l-g:l,e?c+p:p,e?l+t:t);break}case"A":{const t=p,n=M(),o=M(),r=x(),a=x(),i=M(),h=M();if(null==n||null==o||null==r||null==a||null==i||null==h)return s;A(t,n,o,r,a,e?c+i:i,e?l+h:h);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(f=c,g=l),m=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const f=128;function g(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function m(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function p(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function y(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;m(t,a,a*e).capacity>=n?o=a:r=a}return o}function M(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const x={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function d(t,n,e,o){const r=void 0!==x[e]?x[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function b(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const w=new Set;function C(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!w.has(t.name)){w.add(t.name);const e="stroke"===t.kind?"A stroke thins to a dotted line below that, which may well be fine.":"Fine detail closes up below that.";console.warn(`[ApexCharts] unit shape "${t.name}" reads best from about ${o} units; this chart has ${n.length}. ${e} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return e(n,r)};return r.shape=Object.freeze(c({},t)),r.with=e=>C(c(c({},t),e),n),r}const Z=new Map;function A(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Z.get(e);if(!o){const r=u(t,n);o={polys:r,bounds:L(r)},Z.set(e,o)}return o}(n,s);if(!c.length)return[];const h=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,u=n.offY+o.y*n.scale,L=n.offX+l.x*n.scale,f=n.offY+l.y*n.scale;h<i&&(i=h),L<i&&(i=L),h>c&&(c=h),L>c&&(c=L),u<a&&(a=u),f<a&&(a=f),u>s&&(s=u),f>s&&(s=f),u!==f&&r.push({x0:h,y0:u,x1:L,y1:f})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*f),r=Math.floor((e-a)/l*f);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,g(l,i,o),{evenOdd:a}),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),A=M(t[0].r>0?t[0].r:3,x),U=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,A,U)}),d(t,U,e,x)}}function U(t){return C(l(c({},t),{kind:"silhouette"}),A)}const $=U({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),k=U({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),v=U({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),O=U({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),j=U({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),q=U({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),E=U({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),P=U({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),Y=t=>t.reduce((t,n)=>t+n,0);function I(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&Y(l(h))<a;)h++;const u=s/h,L=p(l(h),a),f=M(t[0].r>0?t[0].r:3,u),g=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*u,a=L[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;g.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:f,row:t})}}return d(t,g,"rows",u)}}function S(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),u=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},L=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,L=[];let f=0;const g=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const m=s<=-1?Math.PI:Math.acos(s),p=m>=Math.PI-1e-9,y=[],M=[0];for(let t=0;t<=40;t++){const n=u(a,r,2*m*t/40-m);if(y.push(n),t>0){const e=y[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const x=M[M.length-1],d=p?0:Math.min(.42*t,x/2),b=x-2*d;let w;if(w=p?Math.max(1,Math.round(x/t)):b>0?Math.floor(b/t)+1:x>=.45*t?1:0,!w)continue;const C=p?x/w:w>1?b/(w-1):0,Z=[];let A=0;for(let t=0;t<w;t++){const n=p?t*C:w>1?d+t*C:x/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=y[A],s=y[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};g(l)&&Z.push(l)}Z.length&&(L.push(Z),f+=Z.length)}return{rows:L,total:f}};let f=1,g=2*s;for(let t=0;t<30;t++){const t=(f+g)/2;L(t).total>=a?f=t:g=t}const m=f,{rows:y}=L(m),x=p(y.map(t=>t.length),a),b=M(t[0].r>0?t[0].r:3,m),w=[];return y.forEach((t,n)=>{const e=x[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];w.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),w.sort((t,n)=>t.y-n.y||t.x-n.x),d(t,w,o,m)}}function X(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=p(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),u=h*e,L=r.x+r.width/2,f=r.y+(r.height-s*u)/2,g=M(t[0].r>0?t[0].r:3,h),m=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)m.push({x:L+(n-(c[t]-1)/2)*h,y:f+(t+.5)*u,r:g,row:t});return d(t,m,o,h)}}function F(t){return C(l(c({},t),{kind:"rings"}),I)}function N(t){return C(l(c({},t),{kind:"globe"}),S)}function T(t){return C(l(c({},t),{kind:"tiers"}),X)}const R=F({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),_=N({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),D=T({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),Q=U({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),z=U({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),B=U({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),V=U({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),H=U({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),G=U({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),J=U({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),K=U({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),W=U({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),tt=U({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),nt=U({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),et=U({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),ot=U({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),rt=U({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),at=U({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),st=U({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),it=U({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),ct=U({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),lt=U({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),ht=U({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),ut=U({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),Lt=new Map;function ft(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=u(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const h=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,u=n.offX+t[e+1].x*n.scale,L=n.offY+t[e+1].y*n.scale,f=Math.hypot(u-l,L-h),g=f>1e-9?-(L-h)/f*o:o,m=f>1e-9?(u-l)/f*o:0;r.push({ax:l,ay:h,bx:u,by:L,nx:g,ny:m}),Math.min(l,u)-o<i&&(i=Math.min(l,u)-o),Math.max(l,u)+o>c&&(c=Math.max(l,u)+o),Math.min(h,L)-o<a&&(a=Math.min(h,L)-o),Math.max(h,L)+o>s&&(s=Math.max(h,L)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*f),s=Math.floor((e-a)/l*f);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const u=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const u=a[n]+(t-o)/(r-o)*(a[e]-a[n]);u<i&&(i=u),u>c&&(c=u)}c>i&&o.push({x0:i,x1:c});const l=u(r.ax,r.ay,t);l&&o.push(l);const h=u(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,g({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),Z=M(t[0].r>0?t[0].r:3,x),A=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,Z,A)}),d(t,A,e,x)}}function gt(t){return C(l(c({},t),{kind:"stroke"}),ft)}const mt=gt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),pt=gt({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),yt=gt({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),Mt=gt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),xt=gt({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),dt=gt({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),bt=gt({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"}),wt=[$,k,v,O,j,q,E,P,R,_,D,Q,z,B,V,H,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ut,mt,pt,yt,Mt,xt,dt,bt],Ct="__apexcharts_unit_layouts__";function Zt(){const t=globalThis;return t[Ct]||(t[Ct]=Object.create(null)),t[Ct]}function At(t){const n=Zt(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e}const Ut=46,$t=48,kt=88,vt={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,kt,38,kt],e:[6,51,6,85],f:[6,11,6,45],g:[8,$t,38,$t]},Ot={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},jt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},qt={1:23,".":19.32,",":19.32,":":19.32," ":23};function Et(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=qt[" "]+n;continue}const t=jt[r];if(t){e+=t(o),o+=(qt[r]||Ut)+n;continue}const a=Ot[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=vt[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(qt[r]||Ut)+n}return e.trim()}const Pt=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Yt(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function It(t){return Math.round(10*t)/10}At(wt);const St=globalThis;St.ApexCharts&&(St.ApexCharts.unitShapes=wt),t.arrow=G,t.battery=q,t.bolt=W,t.bulb=tt,t.car=et,t.catalog=wt,t.check=mt,t.cross=K,t.crown=J,t.digitsPath=Et,t.droplet=k,t.fish=V,t.flame=B,t.flask=nt,t.funnel=it,t.gear=ct,t.globe=_,t.glyphs=function(t,n={}){const e=String(t),o=n,{gap:i}=o,h=((t,n)=>{var e={};for(var o in t)a.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&r)for(var o of r(t))n.indexOf(o)<0&&s.call(t,o)&&(e[o]=t[o]);return e})(o,["gap"]);return gt(l(c({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:Et(e,i)}))},t.group=rt,t.heart=$,t.house=j,t.human=v,t.leaf=Q,t.moneybag=st,t.mountain=ut,t.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return gt(l(c({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},t.percent=xt,t.pin=ht,t.plane=ot,t.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?Pt:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=p(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],u=[],L=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Yt(l,t):0;u.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:L})}const f=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),g=new Map;f.forEach((t,n)=>{const e=l?u[n]%c.length:Math.floor(n/f.length*c.length),o=c[e]||c[0],r=`<circle cx="${It(t.x)}" cy="${It(t.y)}" r="${It(t.r||3)}"/>`,a=g.get(o);a?a.push(r):g.set(o,[r])});let m="";return g.forEach((t,n)=>{m+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?m:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${f.length} dots">${m}</svg>`},t.pulse=yt,t.pyramid=D,t.question=dt,t.registerShapes=At,t.registeredShapeNames=function(){return Object.keys(Zt())},t.rings=F,t.robot=lt,t.rocket=P,t.shapeFrom=function(t,n={}){return U(l(c({name:"custom"},n),{path:t}))},t.shield=E,t.silhouette=U,t.sphere=N,t.spiral=bt,t.star=H,t.stroke=gt,t.strokeFrom=function(t,n={}){return gt(l(c({name:"custom-stroke"},n),{path:t}))},t.sun=z,t.target=R,t.tiers=T,t.tree=O,t.trophy=at,t.unregisterShapes=function(t){const n=Zt();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},t.wifi=pt,t.xmark=Mt,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,i,a)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,n=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&o(t,i,e[i]);if(a)for(var i of a(e))r.call(e,i)&&o(t,i,e[i]);return t},l=(t,a)=>e(t,i(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const a=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const h=c(require("apexcharts/core")),u=1/45;function d(t,e,i,a){return{value:t,velocity:0,target:t,stiffness:e,damping:i}}function p(t,e){if(e<=0)return m(t);let i=e;for(;i>0;){const e=Math.min(i,u),a=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=a*e,t.value+=t.velocity*e,i-=e}return!!m(t)&&(t.value=t.target,t.velocity=0,!0)}function f(t,e){t.target=e}function m(t){var e,i;const a=null!=(e=t.restVelocity)?e:.05,s=null!=(i=t.restDisplacement)?i:.05;return Math.abs(t.velocity)<a&&Math.abs(t.value-t.target)<s}const x={crisp:[210,26],gentle:[120,20],snappy:[320,30]};const g=h.__apex_Graphics,y="__apexcharts_unit_layouts__",b=globalThis;function M(t){const e=globalThis[y];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}b[y]||(b[y]=Object.create(null));const _="__apexcharts_unit_marks__",A=globalThis;function w(t,e){if("string"==typeof t){const i=t.trim();return i?Object.freeze({name:e||"anonymous",path:i,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(l(n({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function S(t){const e=globalThis[_];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}A[_]||(A[_]=Object.create(null));const R=h.__apex_Utils,k=h.__apex_Environment_Environment,v=h.__apex_BrowserAPIs_BrowserAPIs,F=h.__apex_Animations_prefersReducedMotion,E=h.__apex_Easing_resolveEasing;function C(t,e,i){if("string"!=typeof t)return null;const a=t.trim();return e.has(a)||e.set(a,R.parseColor(a)||R.parseColor(R.resolveColor(a,i))||null),e.get(a)}function L(t,e,i){const a=[0,1,2].map(a=>Math.round(t[a]+(e[a]-t[a])*i)),s=t[3]+(e[3]-t[3])*i;return s>=1?`rgb(${a})`:`rgba(${a},${s})`}function D(t,e,i={}){const a=new g(t),s=i.fontSize||"12px",r=parseFloat(s)||12;let o=0;return e.forEach(t=>{if(null==t||""===t)return;const e=`${t}`,n=a.getTextRects(e,s,i.fontFamily,"",!0,i.fontWeight).width;o=Math.max(o,n>0?n:e.length*r*.58)}),o}const T=Math.PI*(3-Math.sqrt(5)),$=new WeakMap,O=(t,e)=>{const i=(t.get(e)||0)+1;return t.set(e,i),i>1?e+"#"+i:e},B=t=>("string"==typeof t&&(t=parseFloat(t)),"number"==typeof t&&isFinite(t)?t:null);function j(t,e){const[i,a]=null!=(r=x[null!=(s=t)?s:"crisp"])?r:x.crisp;var s,r;const o=800/Math.max(1,e);return[i*o*o,a*o]}h.default.use({unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,i=new g(e,this.ctx),a=i.group({class:"apexcharts-unit"});if(v.cancelAnimationFrame(e.globals.unitGatherRAF||0),v.cancelAnimationFrame(e.globals.unitExitRAF||0),e.globals.unitGatherRAF=e.globals.unitExitRAF=null,e.globals.noData||!Array.isArray(t)||0===t.length)return a;const s=e.config.plotOptions.unit,r="packed"===s.layout?"packed":"columns"===s.layout?"columns":"grid"===s.layout?"grid":"scatter"===s.layout?"scatter":"arc"===s.layout?"arc":"custom"===s.layout?"custom":"grouped",o=s.transition,c="flow"===o,h="identity"===o,u=s.unitValue>0?s.unitValue:1,d="grid"===r&&!(!s.grid||!s.grid.split);let p=t.map(t=>{const e=Math.abs(R.parseNumber(t))/u;return d?e:e>0?Math.max(1,Math.round(e)):0});d||"scatter"===r||(p=this._applyMaxUnits(p,s.maxUnits));const f=p.reduce((t,e)=>t+e,0),m="packed"===r?this._layoutPacked(p,s):"columns"===r?this._layoutColumns(p,s):"grid"===r?this._layoutGrid(p,s):"scatter"===r?this._layoutScatter(s):"arc"===r?this._layoutArc(p,s):"custom"===r?this._layoutCustom(p,s):this._layoutGrouped(p,s);"scatter"===r&&this._drawScatterAxes(a,i);const x=this._lastDotR,y=!(!this.ctx||!this.ctx._unitPrevDots),b=y&&this.ctx._unitPieces&&this.ctx.morphTypeChange?this.ctx.morphTypeChange.getSpeed():0,M=this._shouldAnimate(y&&!b),_=b||this._speed(y),A=this.ctx&&this.ctx.morphTypeChange,w=M&&!!A&&"function"==typeof A.isActive&&A.isActive()&&"function"==typeof A.getInitialSlotFor,S=w&&"function"==typeof A.usesPieceTakeover&&A.usesPieceTakeover(),k=M&&!w&&y?this.ctx._unitPrevDots:null,F=this.ctx&&this.ctx._unitPieces;F&&(this.ctx._unitPieces=null,k&&F.querySelectorAll("rect").forEach(t=>{const e=t.getAttribute("data-key"),i=k.get(e),a=e=>+t.getAttribute(e);i&&k.set(e,l(n({},i),{x:a("x")+a("width")/2,y:a("y")+a("height")/2,r:Math.min(a("width"),a("height"))/2,fill:t.getAttribute("fill")}))}));const E=new Map,C=[],L=e.seriesData.unitData||[],D=this._bubbleStats(L,s,x);let T=0;const $=new Map,B=d&&this._gridTrack&&this._gridTrack.cells||[],j=i.group({class:"apexcharts-unit-track"});B.length&&a.add(j);const z=s.grid&&s.grid.trackColor||"rgba(128,128,128,0.14)",P=this._baseSpec({shape:"square"===s.shape&&"square"},x),Y=B.length/Math.max(1,m.length),W=this.ctx&&this.ctx._unitSprings,N=(t,e,i,a,s,r,o,n)=>{const l=k&&k.get(s),c=W&&W.get(s),h=l&&l.x===i&&l.y===a&&l.r===r&&(!c||c.x.value===i&&c.y.value===a);if(E.set(s,{x:i,y:a,fill:z,r:r,spec:e}),k&&M&&!S&&!h){const c=l?l.x:i,h=l?l.y:a;t.style.opacity=l?"1":"0",this._place(t,e,c,h),C.splice(o,0,{node:t,spec:e,x:i,y:a,cx0:c,cy0:h,key:s,r0:l&&null!=l.r?l.r:r,r1:r,delay:0,isEnter:!l,pair:n})}else this._place(t,e,i,a)},q=(t,e)=>{const a=this._drawDot(i,s,x,z,-1,0,P);a.node.classList.add("apexcharts-unit-track-cell"),j.add(a),N(a.node,P,B[t].x,B[t].y,"trk:"+t,x,C.length,e)};if(m.forEach((t,o)=>{const n=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",l=i.group({class:"apexcharts-series",seriesName:R.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),u=t.dots.length,m=L[t.i],g=C.length;t.dots.forEach((e,a)=>{B.length&&q(o*Y+a,!0);const r=null!=e.j?e.j:a,p=m?m[r]:void 0,f=p&&"object"==typeof p&&p.fillColor?p.fillColor:n,g=null!=e.r?e.r:D?this._radiusForValue(this._unitValueOf(p),D):x,y=this._markSpecFor(s,p,t.i,g),b=this._drawDot(i,s,g,f,t.i,r,y);let _;if(l.add(b),h){const t=p&&"object"==typeof p?null!=p.id?p.id:p.name:void 0;_=null!=t?`id:${O($,String(t))}`:`g:${T}`}else _=c?String(T):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(T++,E.set(_,{x:e.x,y:e.y,fill:f,r:g,spec:y}),S)this._place(b.node,y,e.x,e.y),b.node.setAttribute("opacity","0"),b.node.setAttribute("data-piece-hidden","1"),b.node.setAttribute("data-key",_);else if(M){const i=k&&k.get(_),a=i||(w?A.getInitialSlotFor(t.i,r,u):null),o=s.gather&&s.gather.enter||"burst",n=d||"fade"===o||"rise"===o,l=a||d&&k&&k.get("trk:"+e.slot),c=l?l.x:n?e.x:t.cx,h=l?l.y:"rise"!==o||d?n?e.y:t.cy:e.y+14;b.node.style.opacity=a?"1":"0",this._place(b.node,y,c,h),C.push({node:b.node,spec:y,x:e.x,y:e.y,cx0:c,cy0:h,key:_,r0:i&&null!=i.r?i.r:g,r1:g,fill0:i?i.fill:f,fill1:f,delay:0,isEnter:!a})}else this._place(b.node,y,e.x,e.y)});for(let e=t.dots.length;e<Y;e++)q(o*Y+e,!1);if(("grouped"===r||"columns"===r||d)&&s.clusterLabels&&s.clusterLabels.show&&p[t.i]>0){const e=d?this._gridDenom:f,i=this._drawClusterLabel(l,t,p[t.i],e,s,n);if(i&&d){const e={pk:1,hx:0,hy:0,r:0},a=+(i.getAttribute("x")||0),s=+(i.getAttribute("y")||0);N(i,e,a,s,"lbl:"+t.i,0,g,C.length>g)}}a.add(l)}),this._outerLabelsOn(s)&&this._drawOuterLabels(a,m,p,f,s,M&&!k),k){const t=this._collectExits(k,E,s);if(t.length){const e=i.group({class:"apexcharts-unit-exits"});a.add(e),this._runExits(e,t,s,_)}}return this.ctx&&(this.ctx._unitPrevDots=E),!this.ctx||M&&!w||(this.ctx._unitSprings=null),M&&C.length?this._runGather(C,_):e.globals.animationEnded=!0,a}_applyMaxUnits(t,e){const i=t.reduce((t,e)=>t+e,0);if(!e||e<=0||i<=e)return t;const a=e/i,s=this.ctx||{};return s._unitCapWarned||(s._unitCapWarned=!0,console.warn(`[ApexCharts] unit chart: ${i} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`)),t.map(t=>t>0?Math.max(1,Math.round(t*a)):0)}_layoutCustom(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=t.reduce((t,e)=>t+e,0),o=this._resolveLayoutProvider(e);if(!o)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const n=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=n;const l={x:n,y:0,width:Math.max(1,a-2*n),height:s},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,r);this._lastDotR=this._dotRadiusFromStep(h,e);const u=this._lastDotR,d=this._layoutObjects(t,u);let p;try{p=o(d,l)}catch(i){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",i),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const f=new Map;p.forEach(t=>{t&&isFinite(t.x)&&isFinite(t.y)&&f.set(String(t.id),{x:t.x,y:t.y,r:"number"==typeof t.r&&t.r>0?t.r:void 0})});const m=t.map((t,e)=>({i:e,cx:a/2,cy:s/2,outerR:u,dots:[]}));return d.forEach(t=>{const e=f.get(t.id);e&&m[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})}),m.forEach(t=>{if(!t.dots.length)return;let e=0,i=0;t.dots.forEach(t=>{e+=t.x,i+=t.y}),t.cx=e/t.dots.length,t.cy=i/t.dots.length;let a=0;t.dots.forEach(e=>{a=Math.max(a,Math.hypot(e.x-t.cx,e.y-t.cy))}),t.outerR=a+u}),m}_layoutObjects(t,e){const i=this.w,a=i.seriesData.unitData||[],s=i.seriesData.seriesNames||[],r=[],o=new Map;let n=0;return t.forEach((t,i)=>{var l;const c=a[i];for(let a=0;a<t;a++){const t=c?c[a]:void 0,h=O(o,!t||"object"!=typeof t||null==t.id&&null==t.name?`${i}:${a}`:String(null!=t.id?t.id:t.name));r.push({id:h,index:n,seriesIndex:i,dataPointIndex:a,label:s[i],value:null!=(l=this._unitValueOf(t))?l:void 0,datum:t,r:e}),n++}}),r}_resolveLayoutProvider(t){const e=t.positions;if("function"==typeof e)return e;if("string"==typeof e&&e){const t=M(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,o=t.map((t,e)=>e).filter(e=>t[e]>0),n=Math.max(1,o.length),l=new Array(t.length).fill(-1);o.forEach((t,e)=>l[t]=e);const c=a/n,h=s-r,u=Math.max(1,...t),d=.08*Math.min(c,h),p=Math.max(4,Math.min(c,h)/2-d),f=this._resolveStep(e,p,u);this._lastDotR=this._dotRadiusFromStep(f,e);const m=this._lastDotR,x=r+h/2,g=t.map(t=>f*Math.sqrt(Math.max(1,t))+m);let y=t.map((t,e)=>(t=>l[t]>=0?c*(l[t]+.5):a/2)(e));const b=o.map(t=>g[t]);let M=!1;for(let t=1;t<n;t++)if(y[o[t]]-y[o[t-1]]<b[t]+b[t-1]){M=!0;break}if(M){const e=Math.max(2*m,8),i=b.reduce((t,e)=>t+2*e,0)+e*(n-1);let s;if(i<=a){let t=(a-i)/2;s=b.map(i=>{const a=t+i;return t+=2*i+e,a})}else if(1===n)s=[a/2];else{const t=b[0],e=a-b[n-1];s=b.map((i,a)=>t+(e-t)*a/(n-1))}y=t.map((t,e)=>l[e]>=0?s[l[e]]:a/2)}return t.map((t,e)=>({i:e,cx:y[e],cy:x,outerR:g[e],dots:this._spiral(y[e],x,t,f,0)}))}_layoutPacked(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),o=Math.max(4,Math.min(a,s-6)/2-.06*Math.min(a,s)),n=this._resolveStep(e,o,r);this._lastDotR=this._dotRadiusFromStep(n,e);const l=a/2,c=6+(s-6)/2,h=t.map((t,e)=>e);!1!==e.sortByGroup&&h.sort((e,i)=>t[e]-t[i]);const u=t.map((t,e)=>({i:e,cx:l,cy:c,outerR:n*Math.sqrt(r)+this._lastDotR,dots:[]}));let d=0;return h.forEach(e=>{for(let i=0;i<t[e];i++){const t=n*Math.sqrt(d+.5),i=d*T;u[e].dots.push({x:l+t*Math.cos(i),y:c+t*Math.sin(i),slot:d}),d++}}),u}_layoutArc(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),o=e.arc||{},n="number"==typeof o.startAngle?o.startAngle:-90,l="number"==typeof o.endAngle?o.endAngle:90,c=n*Math.PI/180,h=l*Math.PI/180,u=h-c||Math.PI,d=Math.max(0,Math.min(.95,"number"==typeof o.innerRadiusRatio?o.innerRadiusRatio:.4)),p=t=>Math.sin(t),f=t=>-Math.cos(t),m=this._arcBounds(c,h),x=.04*Math.min(a,s),g=Math.max(1e-6,m.maxX-m.minX),y=Math.max(1e-6,m.maxY-m.minY),b=t=>Math.max(4,Math.min((a-2*x-t)/g,(s-2*x-t)/y)),M=t=>b(2*this._arcAllocate(r,t*d,t,u,e).dotR);let _=b(0),A=M(_);for(let t=0;t<6;t++){const t=(A+_)/2;t<=M(t)?A=t:_=t}const w=a/2-(m.minX+m.maxX)/2*A,S=s/2-(m.minY+m.maxY)/2*A,R=this._arcAllocate(r,A*d,A,u,e);this._lastDotR=R.dotR;const k=[];for(let t=0;t<R.R;t++){const e=R.radii[t],i=R.seatsPerRow[t];for(let t=0;t<i;t++){const a=1===i?(c+h)/2:c+u*(t+.5)/i;k.push({a:a,x:w+e*p(a),y:S+e*f(a)})}}k.sort((t,e)=>t.a-e.a);const v=t.map((t,e)=>({i:e,cx:w,cy:S,outerR:A,dots:[]}));let F=0,E=0;return k.forEach((e,i)=>{for(;F<t.length&&E>=t[F];)F++,E=0;F>=t.length||(v[F].dots.push({x:e.x,y:e.y,slot:i}),E++)}),v}_arcBounds(t,e){const i=t=>Math.sin(t),a=t=>-Math.cos(t),s=Math.min(t,e),r=Math.max(t,e),o=[0,i(t),i(e)],n=[0,a(t),a(e)],l=Math.PI/2;for(let t=Math.ceil(s/l);t*l<=r;t++)o.push(i(t*l)),n.push(a(t*l));return{minX:Math.min(...o),maxX:Math.max(...o),minY:Math.min(...n),maxY:Math.max(...n)}}_arcAllocate(t,e,i,a,s){const r=s.spacing>0?s.spacing:1.05,o=Math.abs(a)||Math.PI,n=this._fixedRadius(s),l=a=>{a=Math.max(1,Math.round(a));const s=[];for(let t=0;t<a;t++)s.push(1===a?(e+i)/2:e+t/(a-1)*(i-e));const n=s.reduce((t,e)=>t+e,0)||1,l=s.map(e=>t*e/n),c=l.map(t=>Math.floor(t));let h=t-c.reduce((t,e)=>t+e,0);for(l.map((t,e)=>({idx:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac).forEach(t=>{h>0&&(c[t.idx]++,h--)});h>0;)c[a-1]++,h--;const u=1===a?i-e||i:(i-e)/(a-1);let d=1/0;for(let t=0;t<a;t++){const e=c[t];if(e<=0)continue;const i=s[t]*o/e;i<d&&(d=i)}const p=Math.min(u,d);return{R:a,radii:s,seatsPerRow:c,dotR:Math.max(1,p/(2*r))}},c=s.arc&&s.arc.rows;let h;if("number"==typeof c&&c>=1)h=l(c);else if(n){h=l((i-e)/(2*n*r)+1)}else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>h.dotR&&(h=e)}}return n&&(h.dotR=n),h}_layoutColumns(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),o=r&&"bottom"===e.clusterLabels.position,n=r&&!o?30:6,l=t.map((t,e)=>e).filter(e=>t[e]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((t,e)=>h[t]=e);const u=a/c,d=.62*u,p=Math.max(8,.04*s)+(o?30:0),f=Math.max(4,s-n-p),m=Math.max(1,...t),x=e.spacing>0?e.spacing:1,g=e.columns?e.columns.size:void 0;let y;y="image"!==e.shape&&"auto"===g?null:"image"!==e.shape&&"number"==typeof g&&g>0?g:this._fixedRadius(e);let b=1,M=0;if(y){M=2*y*x,this._lastDotR=y;const t=Math.max(1,Math.floor(f/M)),e=Math.max(1,Math.floor(d/M));b=Math.max(1,Math.min(e,Math.ceil(m/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(d/4)));for(let i=1;i<=e;i++){const e=Math.ceil(m/i),a=Math.min(d/i,f/e);a>t&&(t=a,b=i)}M=t,this._lastDotR=Math.max(1,M/(2*x))}const _=this._lastDotR,A=Math.ceil(m/b),w=n+(f+Math.min(f,A*M))/2;return t.map((t,e)=>{const i=h[e]>=0?u*(h[e]+.5):a/2,s=Math.ceil(Math.max(1,t)/b)*M,r=i-b*M/2+M/2,o=[];for(let e=0;e<t;e++){const t=Math.floor(e/b),i=e%b;o.push({x:r+i*M,y:w-_-t*M})}return{i:e,cx:i,cy:w-s/2,outerR:s/2,flat:!0,dots:o}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},o=Math.max(1,Math.round(r.columns>0?r.columns:10)),n="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),c=l.reduce((t,e)=>t+e,0),h=Math.max(1,Math.ceil(Math.max(1,c)/o)),u=e.spacing>0?e.spacing:1,d=Math.max(4,a),p=Math.max(4,s-6),f=this._fixedRadius(e);let m=0;f?(m=2*f*u,this._lastDotR=f):(m=Math.min(d/o,p/h),this._lastDotR=Math.max(1,m/(2*u)));const x=o*m,g=h*m,y=(a-x)/2+m/2,b=6+(p-g)/2,M=t=>"bottom"===n?b+g-m/2-t*m:b+m/2+t*m,_=t.map((t,e)=>({i:e,cx:a/2,cy:6+p/2,outerR:Math.max(x,g)/2,dots:[]}));let A=0;for(let t=0;t<l.length;t++)for(let e=0;e<l[t];e++){const e=A%o,i=Math.floor(A/o);_[t].dots.push({x:y+e*m,y:M(i),slot:A}),A++}return _}_layoutGridSplit(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},o=Math.max(1,Math.round(r.columns>0?r.columns:10)),n="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),c=Math.max(1,Math.ceil(l/o)),h=t.map((t,e)=>e).filter(e=>t[e]>0),u=Math.max(1,h.length),d=r.max>0?r.max:Math.max(...t)||1,p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(u)))),f=Math.max(1,Math.ceil(u/p)),m=!(e.clusterLabels&&!1===e.clusterLabels.show),x=m&&e.clusterLabels&&"bottom"===e.clusterLabels.position,g=m&&!x?22:4,y=m&&x?22:4,b=a/p,M=s/f,_=Math.max(4,.86*b),A=Math.max(4,M-g-y),w=e.spacing>0?e.spacing:1,S=this._fixedRadius(e);let R=0;S?(R=2*S*w,this._lastDotR=S):(R=Math.min(_/o,A/c),this._lastDotR=Math.max(1,R/(2*w)));const k=o*R,v=c*R,F=(t,e)=>"bottom"===n?t+v-R/2-e*R:t+R/2+e*R,E=[],C=[];return h.forEach((e,i)=>{const a=i%p,s=Math.floor(i/p),r=a*b,n=r+(b-k)/2+R/2,c=s*M+g+(A-v)/2,h=t=>({x:n+t%o*R,y:F(c,Math.floor(t/o))});for(let t=0;t<l;t++)E.push(h(t));const u=Math.max(0,Math.min(l,Math.round(t[e]/d*l))),f=[];for(let t=0;t<u;t++){const e=h(t);f.push({x:e.x,y:e.y,slot:i*l+t})}C.push({i:e,cx:r+b/2,cy:c+v/2,outerR:v/2,flat:!0,split:!0,dots:f})}),this._gridDenom=d,this._gridTrack={cells:E},C}_layoutScatter(t){const e=this.w,i=t.scatter||{},a=e.seriesData.unitData||[],s=a.map(t=>t?t.length:0),r=this._applyMaxUnits(s,t.maxUnits),o=(t,e)=>Math.floor((e+1)*r[t]/s[t])>Math.floor(e*r[t]/s[t]);if("value"===i.y)return this._layoutScatter2D(t,o);const l="vertical"===i.orientation,c=e.layout.gridWidth,h=e.layout.gridHeight,u=e.seriesData.seriesNames||[],d=t=>this._unitValueOf(t),p=this._scatterSizeStats(i,a),f=a.map(t=>Array.isArray(t)?t.map(d):[]),m=t=>null!=t&&isFinite(t),x=f.map((t,e)=>e).filter(t=>f[t].some(m)),g=Math.max(1,x.length);let y=1/0,b=-1/0;f.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<y&&(y=t),t>b&&(b=t))})),y===1/0&&(y=0,b=1);const M=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),_=this._scatterValueDomain(i.xMin,i.xMax,y,b,M),A=_.min,w=_.max,S=w-A||1,R={fontFamily:e.config.chart.fontFamily,fontWeight:600},k=t=>u[t]||`series-${t+1}`,v=l?0:null!=i.laneLabelWidth?Math.max(0,i.laneLabelWidth):g>1?Math.min(c/3,D(e,x.map(k),R)+14):8,F=l?46+(i.xTitle?18:0):v,E=c-(l?10:8),C=h-(l?g>1?26:10:30+(i.xTitle?20:0)),L=Math.max(4,E-F),T=Math.max(4,C-10),$=l?t=>C-(t-A)/S*T:t=>F+(t-A)/S*L,O=(l?L:T)/g;let B=0;const j=this._fixedRadius(t);if(j)B=j;else{const t=Math.max(1,...x.map(t=>f[t].filter(m).length));B=Math.max(2,Math.min(6,.12*O,(l?T:L)/(2.5*Math.sqrt(t))))}this._lastDotR=B;const z=t.spacing>0?t.spacing:1,P=Math.max(.5,B*z),Y="jitter"===i.spread,W=[],N=[],q=p?p.rMax:B;return x.forEach((t,i)=>{const s=(t=>(l?F:10)+O*(t+.5))(i);let r=k(t);const n=v>12?D(e,[r],R):0;n>v-14&&n&&(r=r.slice(0,Math.max(1,Math.floor(r.length*(v-14)/n)-1))+"\u2026"),N.push(l?{i:t,cx:s,name:r}:{i:t,cy:s,name:r});const c=[];if((a[t]||[]).forEach((e,i)=>{const a=d(e);if(!m(a)||!o(t,i))return;const r={j:i,f:$(a),s:s};p&&(r.r=this._scatterRadius(e,p,B)),c.push(r)}),Y){const e=Math.max(q,O/2-q);c.forEach(i=>{i.s=s+(2*function(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}(7919*t+i.j)-1)*e})}else this._beeswarm(c,s,B,P,q);W.push({i:t,cx:l?s:(F+E)/2,cy:l?(10+C)/2:s,outerR:O/2,dots:c.map(t=>l?{x:t.s,y:t.f,r:t.r,j:t.j}:{x:t.f,y:t.s,r:t.r,j:t.j})})}),this._scatterAxis=n({mode:"1d",plotL:F,plotR:E,plotT:10,plotB:C,ticks:_.ticks,lanes:N,formatter:"function"==typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},l?{orientation:"vertical",vMin:A,vMax:w,plotY:$,valueTitle:i.xTitle}:{xMin:A,xMax:w,plotX:$,xTitle:i.xTitle}),W}_layoutScatter2D(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=t.scatter||{},o=i.seriesData.unitData||[],n=t=>null!=t,l=t=>t&&"object"==typeof t?B(t.x):null,c=t=>t&&"object"==typeof t?B(null!=t.y?t.y:t.value):null,h=o.map((t,e)=>e).filter(t=>(o[t]||[]).some(t=>n(l(t))&&n(c(t))));let u=1/0,d=-1/0,p=1/0,f=-1/0;o.forEach(t=>(t||[]).forEach(t=>{const e=l(t),i=c(t);n(e)&&n(i)&&(e<u&&(u=e),e>d&&(d=e),i<p&&(p=i),i>f&&(f=i))})),u===1/0&&(u=0,d=1,p=0,f=1);const m=this._scatterValueDomain(r.xMin,r.xMax,u,d,Math.max(2,Math.round(r.tickAmount>0?r.tickAmount:5))),x=this._scatterValueDomain(r.yMin,r.yMax,p,f,Math.max(2,Math.round(r.yTickAmount>0?r.yTickAmount:5))),g=m.min,y=m.max,b=x.min,M=x.max,_=y-g||1,A=M-b||1,w=46+(r.yTitle?18:0),S=30+(r.xTitle?20:0),R=w,k=a-12,v=s-S,F=Math.max(4,k-R),E=Math.max(4,v-10),C=t=>R+(t-g)/_*F,L=t=>v-(t-b)/A*E,D=this._scatterSizeStats(r,o),T=this._fixedRadius(t)||5;this._lastDotR=T;const $=[];return h.forEach(t=>{const i=[];(o[t]||[]).forEach((a,s)=>{const r=l(a),o=c(a);null!=r&&null!=o&&e(t,s)&&i.push({x:C(r),y:L(o),r:D?this._scatterRadius(a,D,T):void 0,j:s})}),$.push({i:t,cx:(R+k)/2,cy:(10+v)/2,outerR:E/2,dots:i})}),this._scatterAxis={mode:"2d",plotL:R,plotR:k,plotT:10,plotB:v,plotX:C,plotY:L,xTicks:m.ticks,yTicks:x.ticks,xTitle:r.xTitle,yTitle:r.yTitle,xFormatter:"function"==typeof r.xFormatter?r.xFormatter:null,yFormatter:"function"==typeof r.yFormatter?r.yFormatter:null,gridlines:!1!==r.gridlines},$}_scatterSizeStats(t,e){const i=t&&t.sizeRange;if(!Array.isArray(i)||i.length<2)return null;const a=Math.max(.5,+i[0]),s=Math.max(a,+i[1]),r=t.sizeField||"z";let o=1/0,n=-1/0;return e.forEach(t=>(t||[]).forEach(t=>{const e=t&&"object"==typeof t?t[r]:null;"number"==typeof e&&isFinite(e)&&(e<o&&(o=e),e>n&&(n=e))})),o===1/0?null:{zmin:o,zmax:n,rMin:a,rMax:s,field:r}}_scatterRadius(t,e,i){if(!e)return i;const a=t&&"object"==typeof t?t[e.field]:null;if("number"!=typeof a||!isFinite(a))return e.rMin;const s=e.zmax>e.zmin?(a-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,s)),o=e.rMin*e.rMin,n=e.rMax*e.rMax;return Math.sqrt(o+r*(n-o))}_beeswarm(t,e,i,a,s){const r=t.slice().sort((t,e)=>t.f-e.f),o=[],n=null!=s?s:i;r.forEach(t=>{const s=null!=t.r?t.r:i;let r=0;for(let i=0;i<2e3;i++){const l=0===i?0:Math.ceil(i/2)*a*(i%2?1:-1),c=e+l;let h=!0;for(let e=o.length-1;e>=0;e--){const i=o[e],a=t.f-i.f;if(a>s+n)break;const r=s+i.r,l=c-i.s;if(a*a+l*l<r*r){h=!1;break}}if(h){r=l;break}}t.s=e+r,o.push({f:t.f,s:t.s,r:s})})}_scatterValueDomain(t,e,i,a,s){const r=(t,e,i)=>{const a=[];for(let s=0,r=t;r<=e+.5*i;r=t+ ++s*i)a.push(Math.abs(r)<1e-9*i?0:r);return a};if(null!=t||null!=e){let o=null!=t?t:e,n=null!=e?e:t;const l=n>o?(n-o)/Math.max(1,s-1):this._niceScale(Math.min(o,i),Math.max(n,a),s).spacing;if(i<o&&(o-=Math.ceil((o-i)/l)*l),a>n&&(n+=Math.ceil((a-n)/l)*l),n>o||(n=o+l),(n-o)/l<=2*s)return{min:o,max:n,ticks:r(o,n,l)};i=o,a=n}const o=this._niceScale(i,a,s),n=o.spacing||(o.max-o.min)/Math.max(1,s-1);return{min:o.min,max:o.max,ticks:r(o.min,o.max,n)}}_niceScale(t,e,i){const a=t;let s=e;s>a||(s=a+1);const r=this._niceNum(s-a,!1),o=this._niceNum(r/Math.max(1,i-1),!0);return{min:Math.floor(a/o)*o,max:Math.ceil(s/o)*o,spacing:o}}_niceNum(t,e){const i=t>0?t:1,a=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,a);let r;return r=e?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,r*Math.pow(10,a)}_drawScatterAxes(t,e){const i=this.w;if(!k.isBrowser())return;const a=this._scatterAxis;if(!a)return;const s="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}),o=i.config.grid&&i.config.grid.borderColor||"rgba(128,128,128,0.18)",n="rgba(128,128,128,0.5)",l=i.config.xaxis&&i.config.xaxis.labels&&i.config.xaxis.labels.style&&i.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",u=(t,e,i,a,o)=>{const n=v.createElementNS(s,"line");n.setAttribute("x1",String(t)),n.setAttribute("y1",String(e)),n.setAttribute("x2",String(i)),n.setAttribute("y2",String(a)),n.setAttribute("stroke",o),n.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(n)},d=(t,e,a,o,n,l,c,h)=>{const u=v.createElementNS(s,"text");u.setAttribute("class",h),u.setAttribute("x",String(e)),u.setAttribute("y",String(a)),u.setAttribute("text-anchor",o),u.setAttribute("dominant-baseline","middle"),u.setAttribute("font-size",`${l}px`),u.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),u.setAttribute("font-weight",String(c)),u.setAttribute("fill",n),u.textContent=t,r.node.appendChild(u)};if("2d"!==a.mode){if("vertical"===a.orientation){if(a.ticks.forEach(t=>{const e=a.plotY(t);a.gridlines&&u(a.plotL,e,a.plotR,e,o);const i=a.formatter?String(a.formatter(t)):this._formatTick(t,a.ticks);d(i,a.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotT,a.plotL,a.plotB,n),a.valueTitle){const t=v.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,o=(a.plotT+a.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(o)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${o})`),t.textContent=String(a.valueTitle),r.node.appendChild(t)}return a.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";d(t.name,t.cx,a.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")}),void t.add(r)}a.ticks.forEach((t,e)=>{const i=a.plotX(t);a.gridlines&&u(i,a.plotT,i,a.plotB,o);const s=a.formatter?String(a.formatter(t)):this._formatTick(t,a.ticks),r=0===e?"start":e===a.ticks.length-1?"end":"middle";d(s,i,a.plotB+14,r,h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotB,a.plotR,a.plotB,n),a.xTitle&&d(String(a.xTitle),(a.plotL+a.plotR)/2,a.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),a.plotL>12&&a.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";d(t.name,a.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")}),t.add(r)}else{if(a.yTicks.forEach(t=>{const e=a.plotY(t);a.gridlines&&u(a.plotL,e,a.plotR,e,o);const i=a.yFormatter?String(a.yFormatter(t)):this._formatTick(t,a.yTicks);d(i,a.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),a.xTicks.forEach(t=>{const e=a.plotX(t);a.gridlines&&u(e,a.plotT,e,a.plotB,o);const i=a.xFormatter?String(a.xFormatter(t)):this._formatTick(t,a.xTicks);d(i,e,a.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotB,a.plotR,a.plotB,n),u(a.plotL,a.plotT,a.plotL,a.plotB,n),a.xTitle&&d(String(a.xTitle),(a.plotL+a.plotR)/2,a.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),a.yTitle){const t=v.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,o=(a.plotT+a.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(o)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${o})`),t.textContent=String(a.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t,e){if(!isFinite(t))return"";const i=Math.abs(t);if(i>=1e6)return+(t/1e6).toFixed(1)+"M";if(i>=1e4)return+(t/1e3).toFixed(1)+"k";if(Number.isInteger(t))return String(t);const a=Math.abs(e[1]-e[0])||1;return String(+t.toFixed(Math.min(20,Math.max(2,1-Math.floor(Math.log10(a))))))}_largestRemainder(t,e){const i=t.reduce((t,e)=>t+e,0);if(i<=0||e<=0)return t.map(()=>0);const a=t.map(t=>t/i*e),s=a.map(t=>Math.floor(t)),r=s.reduce((t,e)=>t+e,0),o=Math.max(0,e-r),n=a.map((t,e)=>({i:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac),l=s.slice();for(let t=0;t<o&&t<n.length;t++)l[n[t].i]++;return l}_spiral(t,e,i,a,s){const r=[];for(let o=0;o<i;o++){const i=s+o,n=a*Math.sqrt(i+.5),l=i*T;r.push({x:t+n*Math.cos(l),y:e+n*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"==typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"==typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){return B(t&&"object"==typeof t?null!=t.value?t.value:t.y:t)}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const i=e.max>e.min?(t-e.min)/(e.max-e.min):1,a=Math.max(0,Math.min(1,i));if("linear"===e.scale)return e.minR+a*(e.maxR-e.minR);const s=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(s+a*(r-s))}_bubbleStats(t,e,i){if(!this._bubbleActive(e))return null;let a=1/0,s=-1/0;if(t.forEach(t=>{t&&t.forEach(t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<a&&(a=e),e>s&&(s=e))})}),a===1/0||s<a)return null;const r=e.sizeByValue,o=i,n=Math.max(1,Math.min(o,"number"==typeof r.minRadius?r.minRadius:.35*o));return{min:a,max:s,minR:n,maxR:o,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,i){const a=t.spacing>0?t.spacing:1,s=this._fixedRadius(t);return s?2*s*a:e/(Math.sqrt(Math.max(1,i))+.5)}_dotRadiusFromStep(t,e){const i=e.spacing>0?e.spacing:1,a=this._fixedRadius(e);return a||Math.max(1,t/(2*i))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const i=null!=e?e:this._lastDotR;return{hx:i,hy:i}}_place(t,e,i,a,s=1){const r=e;2===r.pk?t.setAttribute("transform","translate("+(i-r.ox*s)+","+(a-r.oy*s)+(1===s?r.tail:") scale("+r.s*s+")")):1===r.pk?(t.setAttribute("x",String(i-r.hx*s)),t.setAttribute("y",String(a-r.hy*s))):(t.setAttribute("cx",String(i)),t.setAttribute("cy",String(a)))}_size(t,e,i){const a=e;0===a.pk?t.setAttribute("r",String(a.r*i)):1===a.pk&&(t.setAttribute("width",String(2*a.hx*i)),t.setAttribute("height",String(2*a.hy*i)))}_baseSpec(t,e){const i=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:i};const{hx:a,hy:s}=this._halfExtent(t,i);return{pk:1,hx:a,hy:s,r:i}}_resolveMark(t){if(null==t)return null;if("object"==typeof t)return w(t);if("string"!=typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return w(e);const i=S(e);let a=i&&"object"==typeof i?$.get(i):null;return void 0===a&&(a=w(i,e),$.set(i,a)),a||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(i?`[ApexCharts] unit chart: mark "${e}" needs a path string and a viewBox of 4 numbers with a positive width and height.`:`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,i){const a=Math.round(10*e)/10,s=t.name+t.path+t.viewBox+t.fillRule+a,r=this._specCache.get(s);if(r)return r;const o=t.viewBox||[0,0,100,100],n=2*a*(1-Math.max(0,Math.min(.9,i.padding||0)))*("number"==typeof i.scale&&i.scale>0?i.scale:1),l="width"===i.fit?n/o[2]:"height"===i.fit?n/o[3]:n/Math.max(o[2],o[3]),c=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(o[0]+o[2]/2)*l,oy:(o[1]+o[3]/2)*l,tail:") scale("+l+")",r:a});return this._specCache.set(s,c),c}_markSpecFor(t,e,i,a){if("pictogram"!==t.shape)return this._baseSpec(t,a);const s=t.pictogram||{},r=e&&"object"==typeof e?e.mark:void 0,o=Array.isArray(s.mark)?s.mark[i%s.mark.length]:s.mark,c=this._resolveMark(null!=r?r:o);return c?this._glyphSpec(c,a,s):this._baseSpec(l(n({},t),{shape:"square"===s.fallback?"square":"circle"}),a)}_drawDot(t,e,i,a,s,r,o){const n=this.w,l=n.config.stroke.show?n.config.stroke.width:0,c=Array.isArray(n.globals.stroke.colors)&&n.globals.stroke.colors[s]||"none",h="number"==typeof n.config.fill.opacity?n.config.fill.opacity:1;let u;if(2===o.pk)u=n.dom.Paper.path(o.d),u.node.setAttribute("fill",a),"evenodd"===o.fillRule&&u.node.setAttribute("fill-rule","evenodd"),h<1&&u.node.setAttribute("fill-opacity",String(h)),u.node.setAttribute("data:r",String(o.r));else if(1===o.pk&&"image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,i=e.image.height||20;u=n.dom.Paper.image(e.image.src),u.node.setAttribute("width",String(t)),u.node.setAttribute("height",String(i)),u.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&u.node.setAttribute("filter",`url(#${this._tintFilter(a)})`)}else if(1===o.pk){const s=2*i;u=t.drawRect(0,0,s,s,e.borderRadius||0,a,1,l,c),u.node.setAttribute("fill",a),h<1&&u.node.setAttribute("fill-opacity",String(h))}else u=t.drawCircle(i,{fill:a,"stroke-width":l,stroke:c}),u.node.setAttribute("fill",a),h<1&&u.node.setAttribute("fill-opacity",String(h));return s>=0&&(u.node.classList.add("apexcharts-unit-area"),u.node.setAttribute("i",String(s)),u.node.setAttribute("j",String(r))),u}_tintFilter(t){const e=this.w,i="http://www.w3.org/2000/svg",a=this._tints||(this._tints=new Map);let s=a.get(t);if(s)return s;s=`apexcharts-unit-tint-${e.globals.chartID}-${a.size}`,a.set(t,s);const r=e.dom.Paper.node;let o=r.querySelector("defs");o||(o=v.createElementNS(i,"defs"),r.insertBefore(o,r.firstChild));const n=v.createElementNS(i,"filter");n.setAttribute("id",s),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%");const l=v.createElementNS(i,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=v.createElementNS(i,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),n.appendChild(l),n.appendChild(c),o.appendChild(n),s}_placeDot(t,e,i,a,s){this._place(t,s||this._baseSpec(e),i,a)}_shouldAnimate(t){var e;const i=this.w,a=i.config.chart.animations;return!!k.isBrowser()&&(!(!a||!1===a.enabled)&&((!t||!1!==(null==(e=a.dynamicAnimation)?void 0:e.enabled))&&(!1!==i.globals.shouldAnimate&&(!(i.globals.resized&&!i.globals.dataChanged)&&(!a.respectReducedMotion||!F())))))}_speed(t){var e;const i=this.w.config.chart.animations;return Math.max(1,(t?null==(e=i.dynamicAnimation)?void 0:e.speed:i.speed)||800)}_seedSprings(t,e,i){const[a,s]=j(e.spring,i),r=this.ctx?this.ctx._unitSprings:null,o=new Map;for(let e=0;e<t.length;e++){const i=t[e],n=r&&!i.isEnter&&null!=i.key?r.get(i.key):null,l=n?n.x:d(i.cx0,a,s),c=n?n.y:d(i.cy0,a,s);n&&(l.stiffness=a,c.stiffness=a,l.damping=s,c.damping=s,i.cx0=l.value,i.cy0=c.value,this._place(i.node,i.spec,i.cx0,i.cy0),0===l.velocity&&0===c.velocity||(i.delay=0)),i.sx=l,i.sy=c,null!=i.key&&o.set(i.key,{x:l,y:c})}this.ctx&&(this.ctx._unitSprings=o)}_stale(t){const e=this.w.dom.Paper;return!!this.w.globals.isDestroyed||!e||!e.node.contains(t)}_runGather(t,e){const i=this.w,a=i.config.plotOptions.unit,s=Math.min(.6*e,450),r=t.length;for(let e=r;e--;)t[e].delay=t[e].pair?t[e+1].delay:r>1?e/(r-1)*s:0;const o=a.gather||{},n=o.motion||"auto";"spring"===n||"auto"===n&&(!o.easing||"outCubic"===o.easing)?this._seedSprings(t,o,e):this.ctx&&(this.ctx._unitSprings=null);for(let e=0;e<r;e++){const i=t[e];i.r0!==i.r1&&(this._size(i.node,i.spec,i.r0/i.r1),this._place(i.node,i.spec,i.cx0,i.cy0,i.r0/i.r1))}const l=new Map,c=i.dom.elWrap;for(let e=0;e<r;e++){const i=t[e];i.fill0&&i.fill1&&i.fill0!==i.fill1&&(i._c0=C(i.fill0,l,c),i._c1=C(i.fill1,l,c))}const h=E("easeOutCubic"),u="outBack"===o.easing?(d="number"==typeof o.overshoot?o.overshoot:1.70158,t=>1+(d+1)*Math.pow(t-1,3)+d*Math.pow(t-1,2)):"inOutCubic"===o.easing?E("easeInOutCubic"):h;var d;const m=performance.now();let x=m;const g=i=>{if(this._stale(t[0].node))return void(this.w.globals.unitGatherRAF=null);const a=Math.min(.25,Math.max(0,(i-x)/1e3));x=i;let s=!0;for(let o=0;o<r;o++){const r=t[o],n=i-m-r.delay,l=Math.max(0,Math.min(1,n/e)),c=h(l);let d,x;if(r.sx&&r.sy){n>=0&&!r.released&&(f(r.sx,r.x),f(r.sy,r.y),r.released=!0);const t=p(r.sx,a),e=p(r.sy,a);r.released&&t&&e||(s=!1),d=r.sx.value,x=r.sy.value}else{const t=u(l);d=r.cx0+(r.x-r.cx0)*t,x=r.cy0+(r.y-r.cy0)*t}let g=1;r.r0!==r.r1&&(g=(r.r0+(r.r1-r.r0)*c)/r.r1,this._size(r.node,r.spec,g)),this._place(r.node,r.spec,d,x,g),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*l))),r._c0&&r._c1&&r.node.setAttribute("fill",L(r._c0,r._c1,c)),l<1&&(s=!1)}if(s){for(let e=0;e<r;e++){const i=t[e];i.node.style.opacity="",i._c1&&i.fill1&&i.node.setAttribute("fill",i.fill1),i.r0!==i.r1&&(this._size(i.node,i.spec,1),this._place(i.node,i.spec,i.x,i.y))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=v.requestAnimationFrame(g)};this.w.globals.unitGatherRAF=v.requestAnimationFrame(g)}_collectExits(t,e,i){const a=Math.max(0,i.maxUnits||5e3),s=[];for(const[i,r]of t)if(!e.has(i)&&"l"!==i[0]&&(s.push(r),s.length>=a))break;return s}_runExits(t,e,i,a){const s=this.w,r=new g(s,this.ctx),o=this._lastDotR,n=s.layout.gridWidth/2,l=s.layout.gridHeight/2,c="grid"===i.layout||"scatter"===i.layout||"arc"===i.layout||"custom"===i.layout?0:.35,h=[];e.forEach(e=>{const a=null!=e.r?e.r:o,s=e.spec||this._baseSpec(i,a),n=this._drawDot(r,i,a,e.fill,-1,0,s);n.node.classList.add("apexcharts-unit-exit"),this._place(n.node,s,e.x,e.y),t.add(n),h.push({node:n.node,x0:e.x,y0:e.y,spec:s})});const u=performance.now(),d=E("easeOutCubic"),p=e=>{if(this._stale(t.node))return void(this.w.globals.unitExitRAF=null);const i=Math.max(0,Math.min(1,(e-u)/a)),s=d(i);for(let t=0;t<h.length;t++){const e=h[t];if(c){const t=e.x0+(n-e.x0)*s*c,i=e.y0+(l-e.y0)*s*c;this._place(e.node,e.spec,t,i)}e.node.style.opacity=String(1-s)}i<1?this.w.globals.unitExitRAF=v.requestAnimationFrame(p):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=v.requestAnimationFrame(p)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,i,a){const s=this.w,r=s.seriesData.seriesNames[t]||`series-${t+1}`,o=i>0?e/i*100:0,n=a.clusterLabels,l="function"==typeof n.formatter?n.formatter(r,{seriesIndex:t,value:e,percent:o,w:s}):`${r}\n${o.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const i=this.w,a=e.clusterLabels,s=a.external.connector||{},r=t.reduce((t,e)=>t+e,0),o=[];if(t.forEach((t,i)=>{t>0&&o.push(...this._outerLabelLines(i,t,r,e))}),!o.length)return 0;const n=D(i,o,{fontSize:a.fontSize,fontFamily:a.fontFamily||i.config.chart.fontFamily,fontWeight:a.fontWeight})+(null!=s.gap?s.gap:8)+(null!=s.length?s.length:22)+8+Math.abs(parseFloat(a.external.offsetX)||0);return Math.min(n,.25*i.layout.gridWidth)}_drawOuterLabels(t,e,i,a,s,r){const o=this.w;if(!k.isBrowser())return;const n=s.clusterLabels,l=n.external,c=l.connector||{},h=null!=c.gap?c.gap:8,u=null!=c.length?c.length:22,d=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,f=o.layout.gridWidth,m=o.layout.gridHeight,x=this._lastDotR,y=e.filter(t=>t.dots.length>0);if(!y.length)return;let b=0,M=0;if(y.length>1){const t=y.map(t=>t.cx),e=y.map(t=>t.cy);b=Math.max(...t)-Math.min(...t),M=Math.max(...e)-Math.min(...e)}const _=b>M,A=parseFloat(n.fontSize)||13,w=Math.round(1.35*A),S=[];if(y.slice().sort((t,e)=>t.cy-e.cy).forEach((t,e)=>{const r=this._outerLabelLines(t.i,i[t.i],a,s);if(!r.some(t=>""!==t))return;const o=_?t.cx>=f/2?"right":"left":e%2==0?"right":"left",n="right"===o?1:-1;let l=t.dots[0],c=-1/0;t.dots.forEach(e=>{const i=n*e.x-.75*Math.abs(e.y-t.cy);i>c&&(c=i,l=e)});const m={x:l.x+n*(l.r||x),y:l.y},g={x:m.x+n*h,y:m.y};S.push({i:t.i,lines:r,anchor:m,elbow:g,labelX:g.x+n*u+d,idealY:m.y+p,labelY:m.y+p,side:o})}),!S.length)return;const R=S.reduce((t,e)=>Math.max(t,e.lines.length),1)*w,v=R/2;["left","right"].forEach(t=>{!function(t,e,i,a){const s=t.slice().sort((t,e)=>t.idealY-e.idealY);s.forEach(t=>{t.labelY=t.idealY});for(let t=1;t<s.length;t++)s[t].labelY-s[t-1].labelY<e&&(s[t].labelY=s[t-1].labelY+e);const r=s[s.length-1],o=r?r.labelY-i:0;if(o>0)for(let t=s.length-1;t>=0;t--)s[t].labelY-=o,t<s.length-1&&s[t+1].labelY-s[t].labelY<e&&(s[t].labelY=s[t+1].labelY-e);if(null!=a&&s.length&&s[0].labelY<a){const t=a-s[0].labelY;for(let e=0;e<s.length;e++)s[e].labelY+=t}}(S.filter(e=>e.side===t),R+2,m-v,v)});const F=new g(o,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,o.config.chart.animations.speed||800);F.node.classList.add("apexcharts-unit-label-delay"),F.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}S.forEach(t=>{const e=o.globals.colors[t.i]||o.globals.colors[0]||"#008FFB";F.add(function(t,e){const{lines:i,lineHeight:a,anchor:s,elbow:r,labelX:o,labelY:n,side:l,connector:c,style:h,foreColor:u}=e,d=new g(t),p=d.group({class:e.groupClass||"apexcharts-outer-label-group"});if(c.show){const t=`M ${s.x} ${s.y} L ${r.x} ${r.y} L ${o} ${n}`,i=d.drawPath({d:t,stroke:c.color,strokeWidth:c.width,fill:"none",strokeLinecap:"round"});i.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(i)}const f="right"===l?o+4:o-4,m=i.length,x=n-(m-1)*a/2,y=d.drawText({x:f,y:x,text:1===m?i[0]:i,textAnchor:"right"===l?"start":"end",fontSize:h.fontSize,fontFamily:h.fontFamily,fontWeight:h.fontWeight,foreColor:u,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(m>1){const t=y.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${f}`),t[e].setAttribute("dy",0===e?"0":`${a}`)}return p.add(y),p}(o,{lines:t.lines,lineHeight:w,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==c.show,width:null!=c.width?c.width:1.5,color:c.color||e},style:{fontSize:n.fontSize,fontFamily:n.fontFamily||o.config.chart.fontFamily,fontWeight:n.fontWeight},foreColor:n.color||o.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(F)}_drawClusterLabel(t,e,i,a,s,r){const o=this.w;if(!k.isBrowser())return;const n="http://www.w3.org/2000/svg",l=o.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=a>0?i/a*100:0,h=s.clusterLabels,u=parseFloat(h.fontSize)||13;let d;d="function"==typeof h.formatter?h.formatter(l,{seriesIndex:e.i,value:i,percent:c,w:o}):`${l} (${c.toFixed(1)}%)`;const p="string"==typeof d?d:String(d),f=v.createElementNS(n,"text");f.setAttribute("class","apexcharts-unit-label"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size",`${u}px`),f.setAttribute("font-family",h.fontFamily||o.config.chart.fontFamily||"inherit"),f.setAttribute("font-weight",String(h.fontWeight||600)),f.setAttribute("fill",h.color||r);const m="bottom"===h.position,x=e.outerR+.6*u+3+(h.offsetY||0),g=p.length*u*.55;if(!m&&!e.flat&&!1!==h.curved&&g<=Math.PI*x*.95){const i=e.cy,a=`M ${e.cx-x} ${i} A ${x} ${x} 0 0 1 ${e.cx+x} ${i}`,s=`apexcharts-unit-label-${o.globals.chartID}-${e.i}`,r=v.createElementNS(n,"path");r.setAttribute("id",s),r.setAttribute("d",a),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=v.createElementNS(n,"textPath");l.setAttribute("href",`#${s}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${s}`),l.setAttribute("startOffset","50%"),l.textContent=p,f.appendChild(l),t.node.appendChild(r)}else{f.setAttribute("x",String(e.cx));const t=m?e.cy+e.outerR+u+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);f.setAttribute("y",String(t)),f.textContent=p}return t.node.appendChild(f),f}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>h.default});
package/dist/unit.esm.js CHANGED
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.6.0
21
+ * ApexCharts v8.7.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
package/dist/unit.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  !function(t){var e="undefined"!=typeof globalThis?globalThis:self,a=e.ApexCharts;if(a&&a.__internals)return t.call(e);if(a)throw new Error("ApexCharts: dist/unit.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return t.call(e);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/unit.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var i={file:"dist/unit.js",run:t,done:!1},s=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);s.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var a=e.ApexCharts;if(a)if(a.__internals){i.done=!0;var r=s.indexOf(i);-1!==r&&s.splice(r,1);try{t.call(e),a.__drainsAddons||e.console.warn("ApexCharts: dist/unit.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(t){e.console.error("ApexCharts: dist/unit.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/unit.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else e.console.warn("ApexCharts: dist/unit.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var t,e;t=this,e=function(t){"use strict";var e=Object.defineProperty,a=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(t,a,i)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,l=(t,e)=>{for(var a in e||(e={}))r.call(e,a)&&o(t,a,e[a]);if(s)for(var a of s(e))n.call(e,a)&&o(t,a,e[a]);return t},c=(t,e)=>a(t,i(e));const h=globalThis.ApexCharts,u=1/45;function d(t,e,a,i){return{value:t,velocity:0,target:t,stiffness:e,damping:a}}function p(t,e){if(e<=0)return m(t);let a=e;for(;a>0;){const e=Math.min(a,u),i=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=i*e,t.value+=t.velocity*e,a-=e}return!!m(t)&&(t.value=t.target,t.velocity=0,!0)}function f(t,e){t.target=e}function m(t){var e,a;const i=null!=(e=t.restVelocity)?e:.05,s=null!=(a=t.restDisplacement)?a:.05;return Math.abs(t.velocity)<i&&Math.abs(t.value-t.target)<s}const x={crisp:[210,26],gentle:[120,20],snappy:[320,30]},g=globalThis.ApexCharts.__internals.__apex_Graphics,y="__apexcharts_unit_layouts__",b=globalThis;function _(t){const e=globalThis[y];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}b[y]||(b[y]=Object.create(null));const M="__apexcharts_unit_marks__",A=globalThis;function w(t,e){if("string"==typeof t){const a=t.trim();return a?Object.freeze({name:e||"anonymous",path:a,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const a=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!a.every(t=>isFinite(t))||a[2]<=0||a[3]<=0?null:Object.freeze(c(l({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:a,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function S(t){const e=globalThis[M];return Object.prototype.hasOwnProperty.call(e,t)?e[t]:null}A[M]||(A[M]=Object.create(null));const R=globalThis.ApexCharts.__internals.__apex_Utils,v=globalThis.ApexCharts.__internals.__apex_Environment_Environment,k=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,F=globalThis.ApexCharts.__internals;F.__apex_Animations,F.__apex_Animations_computeStagger,F.__apex_Animations_applyAnimationPolicy;const C=F.__apex_Animations_prefersReducedMotion;F.__apex_Animations_applyProgressiveReveal;const E=globalThis.ApexCharts.__internals;E.__apex_Easing_easeInOutSine,E.__apex_Easing_DEFAULT_EASING_NAME,E.__apex_Easing_cubicBezier,E.__apex_Easing_registerEasing;const T=E.__apex_Easing_resolveEasing;function L(t,e,a){if("string"!=typeof t)return null;const i=t.trim();return e.has(i)||e.set(i,R.parseColor(i)||R.parseColor(R.resolveColor(i,a))||null),e.get(i)}function D(t,e,a){const i=[0,1,2].map(i=>Math.round(t[i]+(e[i]-t[i])*a)),s=t[3]+(e[3]-t[3])*a;return s>=1?`rgb(${i})`:`rgba(${i},${s})`}function j(t,e,a={}){const i=new g(t),s=a.fontSize||"12px",r=parseFloat(s)||12;let n=0;return e.forEach(t=>{if(null==t||""===t)return;const e=`${t}`,o=i.getTextRects(e,s,a.fontFamily,"",!0,a.fontWeight).width;n=Math.max(n,o>0?o:e.length*r*.58)}),n}const $=Math.PI*(3-Math.sqrt(5)),B=new WeakMap,z=(t,e)=>{const a=(t.get(e)||0)+1;return t.set(e,a),a>1?e+"#"+a:e},O=t=>("string"==typeof t&&(t=parseFloat(t)),"number"==typeof t&&isFinite(t)?t:null);function P(t,e){const[a,i]=null!=(r=x[null!=(s=t)?s:"crisp"])?r:x.crisp;var s,r;const n=800/Math.max(1,e);return[a*n*n,i*n]}h.use({unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,a=new g(e,this.ctx),i=a.group({class:"apexcharts-unit"});if(k.cancelAnimationFrame(e.globals.unitGatherRAF||0),k.cancelAnimationFrame(e.globals.unitExitRAF||0),e.globals.unitGatherRAF=e.globals.unitExitRAF=null,e.globals.noData||!Array.isArray(t)||0===t.length)return i;const s=e.config.plotOptions.unit,r="packed"===s.layout?"packed":"columns"===s.layout?"columns":"grid"===s.layout?"grid":"scatter"===s.layout?"scatter":"arc"===s.layout?"arc":"custom"===s.layout?"custom":"grouped",n=s.transition,o="flow"===n,h="identity"===n,u=s.unitValue>0?s.unitValue:1,d="grid"===r&&!(!s.grid||!s.grid.split);let p=t.map(t=>{const e=Math.abs(R.parseNumber(t))/u;return d?e:e>0?Math.max(1,Math.round(e)):0});d||"scatter"===r||(p=this._applyMaxUnits(p,s.maxUnits));const f=p.reduce((t,e)=>t+e,0),m="packed"===r?this._layoutPacked(p,s):"columns"===r?this._layoutColumns(p,s):"grid"===r?this._layoutGrid(p,s):"scatter"===r?this._layoutScatter(s):"arc"===r?this._layoutArc(p,s):"custom"===r?this._layoutCustom(p,s):this._layoutGrouped(p,s);"scatter"===r&&this._drawScatterAxes(i,a);const x=this._lastDotR,y=!(!this.ctx||!this.ctx._unitPrevDots),b=y&&this.ctx._unitPieces&&this.ctx.morphTypeChange?this.ctx.morphTypeChange.getSpeed():0,_=this._shouldAnimate(y&&!b),M=b||this._speed(y),A=this.ctx&&this.ctx.morphTypeChange,w=_&&!!A&&"function"==typeof A.isActive&&A.isActive()&&"function"==typeof A.getInitialSlotFor,S=w&&"function"==typeof A.usesPieceTakeover&&A.usesPieceTakeover(),v=_&&!w&&y?this.ctx._unitPrevDots:null,F=this.ctx&&this.ctx._unitPieces;F&&(this.ctx._unitPieces=null,v&&F.querySelectorAll("rect").forEach(t=>{const e=t.getAttribute("data-key"),a=v.get(e),i=e=>+t.getAttribute(e);a&&v.set(e,c(l({},a),{x:i("x")+i("width")/2,y:i("y")+i("height")/2,r:Math.min(i("width"),i("height"))/2,fill:t.getAttribute("fill")}))}));const C=new Map,E=[],T=e.seriesData.unitData||[],L=this._bubbleStats(T,s,x);let D=0;const j=new Map,$=d&&this._gridTrack&&this._gridTrack.cells||[],B=a.group({class:"apexcharts-unit-track"});$.length&&i.add(B);const O=s.grid&&s.grid.trackColor||"rgba(128,128,128,0.14)",P=this._baseSpec({shape:"square"===s.shape&&"square"},x),Y=$.length/Math.max(1,m.length),W=this.ctx&&this.ctx._unitSprings,N=(t,e,a,i,s,r,n,o)=>{const l=v&&v.get(s),c=W&&W.get(s),h=l&&l.x===a&&l.y===i&&l.r===r&&(!c||c.x.value===a&&c.y.value===i);if(C.set(s,{x:a,y:i,fill:O,r:r,spec:e}),v&&_&&!S&&!h){const c=l?l.x:a,h=l?l.y:i;t.style.opacity=l?"1":"0",this._place(t,e,c,h),E.splice(n,0,{node:t,spec:e,x:a,y:i,cx0:c,cy0:h,key:s,r0:l&&null!=l.r?l.r:r,r1:r,delay:0,isEnter:!l,pair:o})}else this._place(t,e,a,i)},I=(t,e)=>{const i=this._drawDot(a,s,x,O,-1,0,P);i.node.classList.add("apexcharts-unit-track-cell"),B.add(i),N(i.node,P,$[t].x,$[t].y,"trk:"+t,x,E.length,e)};if(m.forEach((t,n)=>{const l=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",c=a.group({class:"apexcharts-series",seriesName:R.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),u=t.dots.length,m=T[t.i],g=E.length;t.dots.forEach((e,i)=>{$.length&&I(n*Y+i,!0);const r=null!=e.j?e.j:i,p=m?m[r]:void 0,f=p&&"object"==typeof p&&p.fillColor?p.fillColor:l,g=null!=e.r?e.r:L?this._radiusForValue(this._unitValueOf(p),L):x,y=this._markSpecFor(s,p,t.i,g),b=this._drawDot(a,s,g,f,t.i,r,y);let M;if(c.add(b),h){const t=p&&"object"==typeof p?null!=p.id?p.id:p.name:void 0;M=null!=t?`id:${z(j,String(t))}`:`g:${D}`}else M=o?String(D):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(D++,C.set(M,{x:e.x,y:e.y,fill:f,r:g,spec:y}),S)this._place(b.node,y,e.x,e.y),b.node.setAttribute("opacity","0"),b.node.setAttribute("data-piece-hidden","1"),b.node.setAttribute("data-key",M);else if(_){const a=v&&v.get(M),i=a||(w?A.getInitialSlotFor(t.i,r,u):null),n=s.gather&&s.gather.enter||"burst",o=d||"fade"===n||"rise"===n,l=i||d&&v&&v.get("trk:"+e.slot),c=l?l.x:o?e.x:t.cx,h=l?l.y:"rise"!==n||d?o?e.y:t.cy:e.y+14;b.node.style.opacity=i?"1":"0",this._place(b.node,y,c,h),E.push({node:b.node,spec:y,x:e.x,y:e.y,cx0:c,cy0:h,key:M,r0:a&&null!=a.r?a.r:g,r1:g,fill0:a?a.fill:f,fill1:f,delay:0,isEnter:!i})}else this._place(b.node,y,e.x,e.y)});for(let e=t.dots.length;e<Y;e++)I(n*Y+e,!1);if(("grouped"===r||"columns"===r||d)&&s.clusterLabels&&s.clusterLabels.show&&p[t.i]>0){const e=d?this._gridDenom:f,a=this._drawClusterLabel(c,t,p[t.i],e,s,l);if(a&&d){const e={pk:1,hx:0,hy:0,r:0},i=+(a.getAttribute("x")||0),s=+(a.getAttribute("y")||0);N(a,e,i,s,"lbl:"+t.i,0,g,E.length>g)}}i.add(c)}),this._outerLabelsOn(s)&&this._drawOuterLabels(i,m,p,f,s,_&&!v),v){const t=this._collectExits(v,C,s);if(t.length){const e=a.group({class:"apexcharts-unit-exits"});i.add(e),this._runExits(e,t,s,M)}}return this.ctx&&(this.ctx._unitPrevDots=C),!this.ctx||_&&!w||(this.ctx._unitSprings=null),_&&E.length?this._runGather(E,M):e.globals.animationEnded=!0,i}_applyMaxUnits(t,e){const a=t.reduce((t,e)=>t+e,0);if(!e||e<=0||a<=e)return t;const i=e/a,s=this.ctx||{};return s._unitCapWarned||(s._unitCapWarned=!0,console.warn(`[ApexCharts] unit chart: ${a} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`)),t.map(t=>t>0?Math.max(1,Math.round(t*i)):0)}_layoutCustom(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=t.reduce((t,e)=>t+e,0),n=this._resolveLayoutProvider(e);if(!n)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,i-2*o),height:s},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,r);this._lastDotR=this._dotRadiusFromStep(h,e);const u=this._lastDotR,d=this._layoutObjects(t,u);let p;try{p=n(d,l)}catch(a){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",a),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const f=new Map;p.forEach(t=>{t&&isFinite(t.x)&&isFinite(t.y)&&f.set(String(t.id),{x:t.x,y:t.y,r:"number"==typeof t.r&&t.r>0?t.r:void 0})});const m=t.map((t,e)=>({i:e,cx:i/2,cy:s/2,outerR:u,dots:[]}));return d.forEach(t=>{const e=f.get(t.id);e&&m[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})}),m.forEach(t=>{if(!t.dots.length)return;let e=0,a=0;t.dots.forEach(t=>{e+=t.x,a+=t.y}),t.cx=e/t.dots.length,t.cy=a/t.dots.length;let i=0;t.dots.forEach(e=>{i=Math.max(i,Math.hypot(e.x-t.cx,e.y-t.cy))}),t.outerR=i+u}),m}_layoutObjects(t,e){const a=this.w,i=a.seriesData.unitData||[],s=a.seriesData.seriesNames||[],r=[],n=new Map;let o=0;return t.forEach((t,a)=>{var l;const c=i[a];for(let i=0;i<t;i++){const t=c?c[i]:void 0,h=z(n,!t||"object"!=typeof t||null==t.id&&null==t.name?`${a}:${i}`:String(null!=t.id?t.id:t.name));r.push({id:h,index:o,seriesIndex:a,dataPointIndex:i,label:s[a],value:null!=(l=this._unitValueOf(t))?l:void 0,datum:t,r:e}),o++}}),r}_resolveLayoutProvider(t){const e=t.positions;if("function"==typeof e)return e;if("string"==typeof e&&e){const t=_(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,n=t.map((t,e)=>e).filter(e=>t[e]>0),o=Math.max(1,n.length),l=new Array(t.length).fill(-1);n.forEach((t,e)=>l[t]=e);const c=i/o,h=s-r,u=Math.max(1,...t),d=.08*Math.min(c,h),p=Math.max(4,Math.min(c,h)/2-d),f=this._resolveStep(e,p,u);this._lastDotR=this._dotRadiusFromStep(f,e);const m=this._lastDotR,x=r+h/2,g=t.map(t=>f*Math.sqrt(Math.max(1,t))+m);let y=t.map((t,e)=>(t=>l[t]>=0?c*(l[t]+.5):i/2)(e));const b=n.map(t=>g[t]);let _=!1;for(let t=1;t<o;t++)if(y[n[t]]-y[n[t-1]]<b[t]+b[t-1]){_=!0;break}if(_){const e=Math.max(2*m,8),a=b.reduce((t,e)=>t+2*e,0)+e*(o-1);let s;if(a<=i){let t=(i-a)/2;s=b.map(a=>{const i=t+a;return t+=2*a+e,i})}else if(1===o)s=[i/2];else{const t=b[0],e=i-b[o-1];s=b.map((a,i)=>t+(e-t)*i/(o-1))}y=t.map((t,e)=>l[e]>=0?s[l[e]]:i/2)}return t.map((t,e)=>({i:e,cx:y[e],cy:x,outerR:g[e],dots:this._spiral(y[e],x,t,f,0)}))}_layoutPacked(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),n=Math.max(4,Math.min(i,s-6)/2-.06*Math.min(i,s)),o=this._resolveStep(e,n,r);this._lastDotR=this._dotRadiusFromStep(o,e);const l=i/2,c=6+(s-6)/2,h=t.map((t,e)=>e);!1!==e.sortByGroup&&h.sort((e,a)=>t[e]-t[a]);const u=t.map((t,e)=>({i:e,cx:l,cy:c,outerR:o*Math.sqrt(r)+this._lastDotR,dots:[]}));let d=0;return h.forEach(e=>{for(let a=0;a<t[e];a++){const t=o*Math.sqrt(d+.5),a=d*$;u[e].dots.push({x:l+t*Math.cos(a),y:c+t*Math.sin(a),slot:d}),d++}}),u}_layoutArc(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),n=e.arc||{},o="number"==typeof n.startAngle?n.startAngle:-90,l="number"==typeof n.endAngle?n.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,u=h-c||Math.PI,d=Math.max(0,Math.min(.95,"number"==typeof n.innerRadiusRatio?n.innerRadiusRatio:.4)),p=t=>Math.sin(t),f=t=>-Math.cos(t),m=this._arcBounds(c,h),x=.04*Math.min(i,s),g=Math.max(1e-6,m.maxX-m.minX),y=Math.max(1e-6,m.maxY-m.minY),b=t=>Math.max(4,Math.min((i-2*x-t)/g,(s-2*x-t)/y)),_=t=>b(2*this._arcAllocate(r,t*d,t,u,e).dotR);let M=b(0),A=_(M);for(let t=0;t<6;t++){const t=(A+M)/2;t<=_(t)?A=t:M=t}const w=i/2-(m.minX+m.maxX)/2*A,S=s/2-(m.minY+m.maxY)/2*A,R=this._arcAllocate(r,A*d,A,u,e);this._lastDotR=R.dotR;const v=[];for(let t=0;t<R.R;t++){const e=R.radii[t],a=R.seatsPerRow[t];for(let t=0;t<a;t++){const i=1===a?(c+h)/2:c+u*(t+.5)/a;v.push({a:i,x:w+e*p(i),y:S+e*f(i)})}}v.sort((t,e)=>t.a-e.a);const k=t.map((t,e)=>({i:e,cx:w,cy:S,outerR:A,dots:[]}));let F=0,C=0;return v.forEach((e,a)=>{for(;F<t.length&&C>=t[F];)F++,C=0;F>=t.length||(k[F].dots.push({x:e.x,y:e.y,slot:a}),C++)}),k}_arcBounds(t,e){const a=t=>Math.sin(t),i=t=>-Math.cos(t),s=Math.min(t,e),r=Math.max(t,e),n=[0,a(t),a(e)],o=[0,i(t),i(e)],l=Math.PI/2;for(let t=Math.ceil(s/l);t*l<=r;t++)n.push(a(t*l)),o.push(i(t*l));return{minX:Math.min(...n),maxX:Math.max(...n),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,a,i,s){const r=s.spacing>0?s.spacing:1.05,n=Math.abs(i)||Math.PI,o=this._fixedRadius(s),l=i=>{i=Math.max(1,Math.round(i));const s=[];for(let t=0;t<i;t++)s.push(1===i?(e+a)/2:e+t/(i-1)*(a-e));const o=s.reduce((t,e)=>t+e,0)||1,l=s.map(e=>t*e/o),c=l.map(t=>Math.floor(t));let h=t-c.reduce((t,e)=>t+e,0);for(l.map((t,e)=>({idx:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac).forEach(t=>{h>0&&(c[t.idx]++,h--)});h>0;)c[i-1]++,h--;const u=1===i?a-e||a:(a-e)/(i-1);let d=1/0;for(let t=0;t<i;t++){const e=c[t];if(e<=0)continue;const a=s[t]*n/e;a<d&&(d=a)}const p=Math.min(u,d);return{R:i,radii:s,seatsPerRow:c,dotR:Math.max(1,p/(2*r))}},c=s.arc&&s.arc.rows;let h;if("number"==typeof c&&c>=1)h=l(c);else if(o)h=l((a-e)/(2*o*r)+1);else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>h.dotR&&(h=e)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),n=r&&"bottom"===e.clusterLabels.position,o=r&&!n?30:6,l=t.map((t,e)=>e).filter(e=>t[e]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((t,e)=>h[t]=e);const u=i/c,d=.62*u,p=Math.max(8,.04*s)+(n?30:0),f=Math.max(4,s-o-p),m=Math.max(1,...t),x=e.spacing>0?e.spacing:1,g=e.columns?e.columns.size:void 0;let y;y="image"!==e.shape&&"auto"===g?null:"image"!==e.shape&&"number"==typeof g&&g>0?g:this._fixedRadius(e);let b=1,_=0;if(y){_=2*y*x,this._lastDotR=y;const t=Math.max(1,Math.floor(f/_)),e=Math.max(1,Math.floor(d/_));b=Math.max(1,Math.min(e,Math.ceil(m/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(d/4)));for(let a=1;a<=e;a++){const e=Math.ceil(m/a),i=Math.min(d/a,f/e);i>t&&(t=i,b=a)}_=t,this._lastDotR=Math.max(1,_/(2*x))}const M=this._lastDotR,A=Math.ceil(m/b),w=o+(f+Math.min(f,A*_))/2;return t.map((t,e)=>{const a=h[e]>=0?u*(h[e]+.5):i/2,s=Math.ceil(Math.max(1,t)/b)*_,r=a-b*_/2+_/2,n=[];for(let e=0;e<t;e++){const t=Math.floor(e/b),a=e%b;n.push({x:r+a*_,y:w-M-t*_})}return{i:e,cx:a,cy:w-s/2,outerR:s/2,flat:!0,dots:n}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),c=l.reduce((t,e)=>t+e,0),h=Math.max(1,Math.ceil(Math.max(1,c)/n)),u=e.spacing>0?e.spacing:1,d=Math.max(4,i),p=Math.max(4,s-6),f=this._fixedRadius(e);let m=0;f?(m=2*f*u,this._lastDotR=f):(m=Math.min(d/n,p/h),this._lastDotR=Math.max(1,m/(2*u)));const x=n*m,g=h*m,y=(i-x)/2+m/2,b=6+(p-g)/2,_=t=>"bottom"===o?b+g-m/2-t*m:b+m/2+t*m,M=t.map((t,e)=>({i:e,cx:i/2,cy:6+p/2,outerR:Math.max(x,g)/2,dots:[]}));let A=0;for(let t=0;t<l.length;t++)for(let e=0;e<l[t];e++){const e=A%n,a=Math.floor(A/n);M[t].dots.push({x:y+e*m,y:_(a),slot:A}),A++}return M}_layoutGridSplit(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),c=Math.max(1,Math.ceil(l/n)),h=t.map((t,e)=>e).filter(e=>t[e]>0),u=Math.max(1,h.length),d=r.max>0?r.max:Math.max(...t)||1,p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(u)))),f=Math.max(1,Math.ceil(u/p)),m=!(e.clusterLabels&&!1===e.clusterLabels.show),x=m&&e.clusterLabels&&"bottom"===e.clusterLabels.position,g=m&&!x?22:4,y=m&&x?22:4,b=i/p,_=s/f,M=Math.max(4,.86*b),A=Math.max(4,_-g-y),w=e.spacing>0?e.spacing:1,S=this._fixedRadius(e);let R=0;S?(R=2*S*w,this._lastDotR=S):(R=Math.min(M/n,A/c),this._lastDotR=Math.max(1,R/(2*w)));const v=n*R,k=c*R,F=(t,e)=>"bottom"===o?t+k-R/2-e*R:t+R/2+e*R,C=[],E=[];return h.forEach((e,a)=>{const i=a%p,s=Math.floor(a/p),r=i*b,o=r+(b-v)/2+R/2,c=s*_+g+(A-k)/2,h=t=>({x:o+t%n*R,y:F(c,Math.floor(t/n))});for(let t=0;t<l;t++)C.push(h(t));const u=Math.max(0,Math.min(l,Math.round(t[e]/d*l))),f=[];for(let t=0;t<u;t++){const e=h(t);f.push({x:e.x,y:e.y,slot:a*l+t})}E.push({i:e,cx:r+b/2,cy:c+k/2,outerR:k/2,flat:!0,split:!0,dots:f})}),this._gridDenom=d,this._gridTrack={cells:C},E}_layoutScatter(t){const e=this.w,a=t.scatter||{},i=e.seriesData.unitData||[],s=i.map(t=>t?t.length:0),r=this._applyMaxUnits(s,t.maxUnits),n=(t,e)=>Math.floor((e+1)*r[t]/s[t])>Math.floor(e*r[t]/s[t]);if("value"===a.y)return this._layoutScatter2D(t,n);const o="vertical"===a.orientation,c=e.layout.gridWidth,h=e.layout.gridHeight,u=e.seriesData.seriesNames||[],d=t=>this._unitValueOf(t),p=this._scatterSizeStats(a,i),f=i.map(t=>Array.isArray(t)?t.map(d):[]),m=t=>null!=t&&isFinite(t),x=f.map((t,e)=>e).filter(t=>f[t].some(m)),g=Math.max(1,x.length);let y=1/0,b=-1/0;f.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<y&&(y=t),t>b&&(b=t))})),y===1/0&&(y=0,b=1);const _=Math.max(2,Math.round(a.tickAmount>0?a.tickAmount:5)),M=this._scatterValueDomain(a.xMin,a.xMax,y,b,_),A=M.min,w=M.max,S=w-A||1,R={fontFamily:e.config.chart.fontFamily,fontWeight:600},v=t=>u[t]||`series-${t+1}`,k=o?0:null!=a.laneLabelWidth?Math.max(0,a.laneLabelWidth):g>1?Math.min(c/3,j(e,x.map(v),R)+14):8,F=o?46+(a.xTitle?18:0):k,C=c-(o?10:8),E=h-(o?g>1?26:10:30+(a.xTitle?20:0)),T=Math.max(4,C-F),L=Math.max(4,E-10),D=o?t=>E-(t-A)/S*L:t=>F+(t-A)/S*T,$=(o?T:L)/g;let B=0;const z=this._fixedRadius(t);if(z)B=z;else{const t=Math.max(1,...x.map(t=>f[t].filter(m).length));B=Math.max(2,Math.min(6,.12*$,(o?L:T)/(2.5*Math.sqrt(t))))}this._lastDotR=B;const O=t.spacing>0?t.spacing:1,P=Math.max(.5,B*O),Y="jitter"===a.spread,W=[],N=[],I=p?p.rMax:B;return x.forEach((t,a)=>{const s=(t=>(o?F:10)+$*(t+.5))(a);let r=v(t);const l=k>12?j(e,[r],R):0;l>k-14&&l&&(r=r.slice(0,Math.max(1,Math.floor(r.length*(k-14)/l)-1))+"\u2026"),N.push(o?{i:t,cx:s,name:r}:{i:t,cy:s,name:r});const c=[];if((i[t]||[]).forEach((e,a)=>{const i=d(e);if(!m(i)||!n(t,a))return;const r={j:a,f:D(i),s:s};p&&(r.r=this._scatterRadius(e,p,B)),c.push(r)}),Y){const e=Math.max(I,$/2-I);c.forEach(a=>{a.s=s+(2*function(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}(7919*t+a.j)-1)*e})}else this._beeswarm(c,s,B,P,I);W.push({i:t,cx:o?s:(F+C)/2,cy:o?(10+E)/2:s,outerR:$/2,dots:c.map(t=>o?{x:t.s,y:t.f,r:t.r,j:t.j}:{x:t.f,y:t.s,r:t.r,j:t.j})})}),this._scatterAxis=l({mode:"1d",plotL:F,plotR:C,plotT:10,plotB:E,ticks:M.ticks,lanes:N,formatter:"function"==typeof a.xFormatter?a.xFormatter:null,gridlines:!1!==a.gridlines},o?{orientation:"vertical",vMin:A,vMax:w,plotY:D,valueTitle:a.xTitle}:{xMin:A,xMax:w,plotX:D,xTitle:a.xTitle}),W}_layoutScatter2D(t,e){const a=this.w,i=a.layout.gridWidth,s=a.layout.gridHeight,r=t.scatter||{},n=a.seriesData.unitData||[],o=t=>null!=t,l=t=>t&&"object"==typeof t?O(t.x):null,c=t=>t&&"object"==typeof t?O(null!=t.y?t.y:t.value):null,h=n.map((t,e)=>e).filter(t=>(n[t]||[]).some(t=>o(l(t))&&o(c(t))));let u=1/0,d=-1/0,p=1/0,f=-1/0;n.forEach(t=>(t||[]).forEach(t=>{const e=l(t),a=c(t);o(e)&&o(a)&&(e<u&&(u=e),e>d&&(d=e),a<p&&(p=a),a>f&&(f=a))})),u===1/0&&(u=0,d=1,p=0,f=1);const m=this._scatterValueDomain(r.xMin,r.xMax,u,d,Math.max(2,Math.round(r.tickAmount>0?r.tickAmount:5))),x=this._scatterValueDomain(r.yMin,r.yMax,p,f,Math.max(2,Math.round(r.yTickAmount>0?r.yTickAmount:5))),g=m.min,y=m.max,b=x.min,_=x.max,M=y-g||1,A=_-b||1,w=46+(r.yTitle?18:0),S=30+(r.xTitle?20:0),R=w,v=i-12,k=s-S,F=Math.max(4,v-R),C=Math.max(4,k-10),E=t=>R+(t-g)/M*F,T=t=>k-(t-b)/A*C,L=this._scatterSizeStats(r,n),D=this._fixedRadius(t)||5;this._lastDotR=D;const j=[];return h.forEach(t=>{const a=[];(n[t]||[]).forEach((i,s)=>{const r=l(i),n=c(i);null!=r&&null!=n&&e(t,s)&&a.push({x:E(r),y:T(n),r:L?this._scatterRadius(i,L,D):void 0,j:s})}),j.push({i:t,cx:(R+v)/2,cy:(10+k)/2,outerR:C/2,dots:a})}),this._scatterAxis={mode:"2d",plotL:R,plotR:v,plotT:10,plotB:k,plotX:E,plotY:T,xTicks:m.ticks,yTicks:x.ticks,xTitle:r.xTitle,yTitle:r.yTitle,xFormatter:"function"==typeof r.xFormatter?r.xFormatter:null,yFormatter:"function"==typeof r.yFormatter?r.yFormatter:null,gridlines:!1!==r.gridlines},j}_scatterSizeStats(t,e){const a=t&&t.sizeRange;if(!Array.isArray(a)||a.length<2)return null;const i=Math.max(.5,+a[0]),s=Math.max(i,+a[1]),r=t.sizeField||"z";let n=1/0,o=-1/0;return e.forEach(t=>(t||[]).forEach(t=>{const e=t&&"object"==typeof t?t[r]:null;"number"==typeof e&&isFinite(e)&&(e<n&&(n=e),e>o&&(o=e))})),n===1/0?null:{zmin:n,zmax:o,rMin:i,rMax:s,field:r}}_scatterRadius(t,e,a){if(!e)return a;const i=t&&"object"==typeof t?t[e.field]:null;if("number"!=typeof i||!isFinite(i))return e.rMin;const s=e.zmax>e.zmin?(i-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,s)),n=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(n+r*(o-n))}_beeswarm(t,e,a,i,s){const r=t.slice().sort((t,e)=>t.f-e.f),n=[],o=null!=s?s:a;r.forEach(t=>{const s=null!=t.r?t.r:a;let r=0;for(let a=0;a<2e3;a++){const l=0===a?0:Math.ceil(a/2)*i*(a%2?1:-1),c=e+l;let h=!0;for(let e=n.length-1;e>=0;e--){const a=n[e],i=t.f-a.f;if(i>s+o)break;const r=s+a.r,l=c-a.s;if(i*i+l*l<r*r){h=!1;break}}if(h){r=l;break}}t.s=e+r,n.push({f:t.f,s:t.s,r:s})})}_scatterValueDomain(t,e,a,i,s){const r=(t,e,a)=>{const i=[];for(let s=0,r=t;r<=e+.5*a;r=t+ ++s*a)i.push(Math.abs(r)<1e-9*a?0:r);return i};if(null!=t||null!=e){let n=null!=t?t:e,o=null!=e?e:t;const l=o>n?(o-n)/Math.max(1,s-1):this._niceScale(Math.min(n,a),Math.max(o,i),s).spacing;if(a<n&&(n-=Math.ceil((n-a)/l)*l),i>o&&(o+=Math.ceil((i-o)/l)*l),o>n||(o=n+l),(o-n)/l<=2*s)return{min:n,max:o,ticks:r(n,o,l)};a=n,i=o}const n=this._niceScale(a,i,s),o=n.spacing||(n.max-n.min)/Math.max(1,s-1);return{min:n.min,max:n.max,ticks:r(n.min,n.max,o)}}_niceScale(t,e,a){const i=t;let s=e;s>i||(s=i+1);const r=this._niceNum(s-i,!1),n=this._niceNum(r/Math.max(1,a-1),!0);return{min:Math.floor(i/n)*n,max:Math.ceil(s/n)*n,spacing:n}}_niceNum(t,e){const a=t>0?t:1,i=Math.floor(Math.log(a)/Math.LN10),s=a/Math.pow(10,i);let r;return r=e?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,r*Math.pow(10,i)}_drawScatterAxes(t,e){const a=this.w;if(!v.isBrowser())return;const i=this._scatterAxis;if(!i)return;const s="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}),n=a.config.grid&&a.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=a.config.xaxis&&a.config.xaxis.labels&&a.config.xaxis.labels.style&&a.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",u=(t,e,a,i,n)=>{const o=k.createElementNS(s,"line");o.setAttribute("x1",String(t)),o.setAttribute("y1",String(e)),o.setAttribute("x2",String(a)),o.setAttribute("y2",String(i)),o.setAttribute("stroke",n),o.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(o)},d=(t,e,i,n,o,l,c,h)=>{const u=k.createElementNS(s,"text");u.setAttribute("class",h),u.setAttribute("x",String(e)),u.setAttribute("y",String(i)),u.setAttribute("text-anchor",n),u.setAttribute("dominant-baseline","middle"),u.setAttribute("font-size",`${l}px`),u.setAttribute("font-family",a.config.chart.fontFamily||"inherit"),u.setAttribute("font-weight",String(c)),u.setAttribute("fill",o),u.textContent=t,r.node.appendChild(u)};if("2d"!==i.mode){if("vertical"===i.orientation){if(i.ticks.forEach(t=>{const e=i.plotY(t);i.gridlines&&u(i.plotL,e,i.plotR,e,n);const a=i.formatter?String(i.formatter(t)):this._formatTick(t,i.ticks);d(a,i.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),u(i.plotL,i.plotT,i.plotL,i.plotB,o),i.valueTitle){const t=k.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(i.plotT+i.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",a.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(i.valueTitle),r.node.appendChild(t)}return i.lanes.forEach(t=>{const e=c||a.globals.colors[t.i]||a.globals.colors[0]||"#008FFB";d(t.name,t.cx,i.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")}),void t.add(r)}i.ticks.forEach((t,e)=>{const a=i.plotX(t);i.gridlines&&u(a,i.plotT,a,i.plotB,n);const s=i.formatter?String(i.formatter(t)):this._formatTick(t,i.ticks),r=0===e?"start":e===i.ticks.length-1?"end":"middle";d(s,a,i.plotB+14,r,h,11,400,"apexcharts-unit-tick")}),u(i.plotL,i.plotB,i.plotR,i.plotB,o),i.xTitle&&d(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.plotL>12&&i.lanes.forEach(t=>{const e=c||a.globals.colors[t.i]||a.globals.colors[0]||"#008FFB";d(t.name,i.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")}),t.add(r)}else{if(i.yTicks.forEach(t=>{const e=i.plotY(t);i.gridlines&&u(i.plotL,e,i.plotR,e,n);const a=i.yFormatter?String(i.yFormatter(t)):this._formatTick(t,i.yTicks);d(a,i.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),i.xTicks.forEach(t=>{const e=i.plotX(t);i.gridlines&&u(e,i.plotT,e,i.plotB,n);const a=i.xFormatter?String(i.xFormatter(t)):this._formatTick(t,i.xTicks);d(a,e,i.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),u(i.plotL,i.plotB,i.plotR,i.plotB,o),u(i.plotL,i.plotT,i.plotL,i.plotB,o),i.xTitle&&d(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.yTitle){const t=k.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(i.plotT+i.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",a.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(i.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t,e){if(!isFinite(t))return"";const a=Math.abs(t);if(a>=1e6)return+(t/1e6).toFixed(1)+"M";if(a>=1e4)return+(t/1e3).toFixed(1)+"k";if(Number.isInteger(t))return String(t);const i=Math.abs(e[1]-e[0])||1;return String(+t.toFixed(Math.min(20,Math.max(2,1-Math.floor(Math.log10(i))))))}_largestRemainder(t,e){const a=t.reduce((t,e)=>t+e,0);if(a<=0||e<=0)return t.map(()=>0);const i=t.map(t=>t/a*e),s=i.map(t=>Math.floor(t)),r=s.reduce((t,e)=>t+e,0),n=Math.max(0,e-r),o=i.map((t,e)=>({i:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac),l=s.slice();for(let t=0;t<n&&t<o.length;t++)l[o[t].i]++;return l}_spiral(t,e,a,i,s){const r=[];for(let n=0;n<a;n++){const a=s+n,o=i*Math.sqrt(a+.5),l=a*$;r.push({x:t+o*Math.cos(l),y:e+o*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"==typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"==typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){return O(t&&"object"==typeof t?null!=t.value?t.value:t.y:t)}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const a=e.max>e.min?(t-e.min)/(e.max-e.min):1,i=Math.max(0,Math.min(1,a));if("linear"===e.scale)return e.minR+i*(e.maxR-e.minR);const s=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(s+i*(r-s))}_bubbleStats(t,e,a){if(!this._bubbleActive(e))return null;let i=1/0,s=-1/0;if(t.forEach(t=>{t&&t.forEach(t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<i&&(i=e),e>s&&(s=e))})}),i===1/0||s<i)return null;const r=e.sizeByValue,n=a,o=Math.max(1,Math.min(n,"number"==typeof r.minRadius?r.minRadius:.35*n));return{min:i,max:s,minR:o,maxR:n,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,a){const i=t.spacing>0?t.spacing:1,s=this._fixedRadius(t);return s?2*s*i:e/(Math.sqrt(Math.max(1,a))+.5)}_dotRadiusFromStep(t,e){const a=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i||Math.max(1,t/(2*a))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const a=null!=e?e:this._lastDotR;return{hx:a,hy:a}}_place(t,e,a,i,s=1){const r=e;2===r.pk?t.setAttribute("transform","translate("+(a-r.ox*s)+","+(i-r.oy*s)+(1===s?r.tail:") scale("+r.s*s+")")):1===r.pk?(t.setAttribute("x",String(a-r.hx*s)),t.setAttribute("y",String(i-r.hy*s))):(t.setAttribute("cx",String(a)),t.setAttribute("cy",String(i)))}_size(t,e,a){const i=e;0===i.pk?t.setAttribute("r",String(i.r*a)):1===i.pk&&(t.setAttribute("width",String(2*i.hx*a)),t.setAttribute("height",String(2*i.hy*a)))}_baseSpec(t,e){const a=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:a};const{hx:i,hy:s}=this._halfExtent(t,a);return{pk:1,hx:i,hy:s,r:a}}_resolveMark(t){if(null==t)return null;if("object"==typeof t)return w(t);if("string"!=typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return w(e);const a=S(e);let i=a&&"object"==typeof a?B.get(a):null;return void 0===i&&(i=w(a,e),B.set(a,i)),i||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(a?`[ApexCharts] unit chart: mark "${e}" needs a path string and a viewBox of 4 numbers with a positive width and height.`:`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,a){const i=Math.round(10*e)/10,s=t.name+t.path+t.viewBox+t.fillRule+i,r=this._specCache.get(s);if(r)return r;const n=t.viewBox||[0,0,100,100],o=2*i*(1-Math.max(0,Math.min(.9,a.padding||0)))*("number"==typeof a.scale&&a.scale>0?a.scale:1),l="width"===a.fit?o/n[2]:"height"===a.fit?o/n[3]:o/Math.max(n[2],n[3]),c=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(n[0]+n[2]/2)*l,oy:(n[1]+n[3]/2)*l,tail:") scale("+l+")",r:i});return this._specCache.set(s,c),c}_markSpecFor(t,e,a,i){if("pictogram"!==t.shape)return this._baseSpec(t,i);const s=t.pictogram||{},r=e&&"object"==typeof e?e.mark:void 0,n=Array.isArray(s.mark)?s.mark[a%s.mark.length]:s.mark,o=this._resolveMark(null!=r?r:n);return o?this._glyphSpec(o,i,s):this._baseSpec(c(l({},t),{shape:"square"===s.fallback?"square":"circle"}),i)}_drawDot(t,e,a,i,s,r,n){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,c=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[s]||"none",h="number"==typeof o.config.fill.opacity?o.config.fill.opacity:1;let u;if(2===n.pk)u=o.dom.Paper.path(n.d),u.node.setAttribute("fill",i),"evenodd"===n.fillRule&&u.node.setAttribute("fill-rule","evenodd"),h<1&&u.node.setAttribute("fill-opacity",String(h)),u.node.setAttribute("data:r",String(n.r));else if(1===n.pk&&"image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,a=e.image.height||20;u=o.dom.Paper.image(e.image.src),u.node.setAttribute("width",String(t)),u.node.setAttribute("height",String(a)),u.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&u.node.setAttribute("filter",`url(#${this._tintFilter(i)})`)}else if(1===n.pk){const s=2*a;u=t.drawRect(0,0,s,s,e.borderRadius||0,i,1,l,c),u.node.setAttribute("fill",i),h<1&&u.node.setAttribute("fill-opacity",String(h))}else u=t.drawCircle(a,{fill:i,"stroke-width":l,stroke:c}),u.node.setAttribute("fill",i),h<1&&u.node.setAttribute("fill-opacity",String(h));return s>=0&&(u.node.classList.add("apexcharts-unit-area"),u.node.setAttribute("i",String(s)),u.node.setAttribute("j",String(r))),u}_tintFilter(t){const e=this.w,a="http://www.w3.org/2000/svg",i=this._tints||(this._tints=new Map);let s=i.get(t);if(s)return s;s=`apexcharts-unit-tint-${e.globals.chartID}-${i.size}`,i.set(t,s);const r=e.dom.Paper.node;let n=r.querySelector("defs");n||(n=k.createElementNS(a,"defs"),r.insertBefore(n,r.firstChild));const o=k.createElementNS(a,"filter");o.setAttribute("id",s),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=k.createElementNS(a,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=k.createElementNS(a,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),n.appendChild(o),s}_placeDot(t,e,a,i,s){this._place(t,s||this._baseSpec(e),a,i)}_shouldAnimate(t){var e;const a=this.w,i=a.config.chart.animations;return!(!v.isBrowser()||!i||!1===i.enabled||t&&!1===(null==(e=i.dynamicAnimation)?void 0:e.enabled)||!1===a.globals.shouldAnimate||a.globals.resized&&!a.globals.dataChanged||i.respectReducedMotion&&C())}_speed(t){var e;const a=this.w.config.chart.animations;return Math.max(1,(t?null==(e=a.dynamicAnimation)?void 0:e.speed:a.speed)||800)}_seedSprings(t,e,a){const[i,s]=P(e.spring,a),r=this.ctx?this.ctx._unitSprings:null,n=new Map;for(let e=0;e<t.length;e++){const a=t[e],o=r&&!a.isEnter&&null!=a.key?r.get(a.key):null,l=o?o.x:d(a.cx0,i,s),c=o?o.y:d(a.cy0,i,s);o&&(l.stiffness=i,c.stiffness=i,l.damping=s,c.damping=s,a.cx0=l.value,a.cy0=c.value,this._place(a.node,a.spec,a.cx0,a.cy0),0===l.velocity&&0===c.velocity||(a.delay=0)),a.sx=l,a.sy=c,null!=a.key&&n.set(a.key,{x:l,y:c})}this.ctx&&(this.ctx._unitSprings=n)}_stale(t){const e=this.w.dom.Paper;return!!this.w.globals.isDestroyed||!e||!e.node.contains(t)}_runGather(t,e){const a=this.w,i=a.config.plotOptions.unit,s=Math.min(.6*e,450),r=t.length;for(let e=r;e--;)t[e].delay=t[e].pair?t[e+1].delay:r>1?e/(r-1)*s:0;const n=i.gather||{},o=n.motion||"auto";"spring"!==o&&("auto"!==o||n.easing&&"outCubic"!==n.easing)?this.ctx&&(this.ctx._unitSprings=null):this._seedSprings(t,n,e);for(let e=0;e<r;e++){const a=t[e];a.r0!==a.r1&&(this._size(a.node,a.spec,a.r0/a.r1),this._place(a.node,a.spec,a.cx0,a.cy0,a.r0/a.r1))}const l=new Map,c=a.dom.elWrap;for(let e=0;e<r;e++){const a=t[e];a.fill0&&a.fill1&&a.fill0!==a.fill1&&(a._c0=L(a.fill0,l,c),a._c1=L(a.fill1,l,c))}const h=T("easeOutCubic"),u="outBack"===n.easing?(d="number"==typeof n.overshoot?n.overshoot:1.70158,t=>1+(d+1)*Math.pow(t-1,3)+d*Math.pow(t-1,2)):"inOutCubic"===n.easing?T("easeInOutCubic"):h;var d;const m=performance.now();let x=m;const g=a=>{if(this._stale(t[0].node))return void(this.w.globals.unitGatherRAF=null);const i=Math.min(.25,Math.max(0,(a-x)/1e3));x=a;let s=!0;for(let n=0;n<r;n++){const r=t[n],o=a-m-r.delay,l=Math.max(0,Math.min(1,o/e)),c=h(l);let d,x;if(r.sx&&r.sy){o>=0&&!r.released&&(f(r.sx,r.x),f(r.sy,r.y),r.released=!0);const t=p(r.sx,i),e=p(r.sy,i);r.released&&t&&e||(s=!1),d=r.sx.value,x=r.sy.value}else{const t=u(l);d=r.cx0+(r.x-r.cx0)*t,x=r.cy0+(r.y-r.cy0)*t}let g=1;r.r0!==r.r1&&(g=(r.r0+(r.r1-r.r0)*c)/r.r1,this._size(r.node,r.spec,g)),this._place(r.node,r.spec,d,x,g),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*l))),r._c0&&r._c1&&r.node.setAttribute("fill",D(r._c0,r._c1,c)),l<1&&(s=!1)}if(s){for(let e=0;e<r;e++){const a=t[e];a.node.style.opacity="",a._c1&&a.fill1&&a.node.setAttribute("fill",a.fill1),a.r0!==a.r1&&(this._size(a.node,a.spec,1),this._place(a.node,a.spec,a.x,a.y))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=k.requestAnimationFrame(g)};this.w.globals.unitGatherRAF=k.requestAnimationFrame(g)}_collectExits(t,e,a){const i=Math.max(0,a.maxUnits||5e3),s=[];for(const[a,r]of t)if(!e.has(a)&&"l"!==a[0]&&(s.push(r),s.length>=i))break;return s}_runExits(t,e,a,i){const s=this.w,r=new g(s,this.ctx),n=this._lastDotR,o=s.layout.gridWidth/2,l=s.layout.gridHeight/2,c="grid"===a.layout||"scatter"===a.layout||"arc"===a.layout||"custom"===a.layout?0:.35,h=[];e.forEach(e=>{const i=null!=e.r?e.r:n,s=e.spec||this._baseSpec(a,i),o=this._drawDot(r,a,i,e.fill,-1,0,s);o.node.classList.add("apexcharts-unit-exit"),this._place(o.node,s,e.x,e.y),t.add(o),h.push({node:o.node,x0:e.x,y0:e.y,spec:s})});const u=performance.now(),d=T("easeOutCubic"),p=e=>{if(this._stale(t.node))return void(this.w.globals.unitExitRAF=null);const a=Math.max(0,Math.min(1,(e-u)/i)),s=d(a);for(let t=0;t<h.length;t++){const e=h[t];if(c){const t=e.x0+(o-e.x0)*s*c,a=e.y0+(l-e.y0)*s*c;this._place(e.node,e.spec,t,a)}e.node.style.opacity=String(1-s)}a<1?this.w.globals.unitExitRAF=k.requestAnimationFrame(p):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=k.requestAnimationFrame(p)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,a,i){const s=this.w,r=s.seriesData.seriesNames[t]||`series-${t+1}`,n=a>0?e/a*100:0,o=i.clusterLabels,l="function"==typeof o.formatter?o.formatter(r,{seriesIndex:t,value:e,percent:n,w:s}):`${r}\n${n.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const a=this.w,i=e.clusterLabels,s=i.external.connector||{},r=t.reduce((t,e)=>t+e,0),n=[];if(t.forEach((t,a)=>{t>0&&n.push(...this._outerLabelLines(a,t,r,e))}),!n.length)return 0;const o=j(a,n,{fontSize:i.fontSize,fontFamily:i.fontFamily||a.config.chart.fontFamily,fontWeight:i.fontWeight})+(null!=s.gap?s.gap:8)+(null!=s.length?s.length:22)+8+Math.abs(parseFloat(i.external.offsetX)||0);return Math.min(o,.25*a.layout.gridWidth)}_drawOuterLabels(t,e,a,i,s,r){const n=this.w;if(!v.isBrowser())return;const o=s.clusterLabels,l=o.external,c=l.connector||{},h=null!=c.gap?c.gap:8,u=null!=c.length?c.length:22,d=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,f=n.layout.gridWidth,m=n.layout.gridHeight,x=this._lastDotR,y=e.filter(t=>t.dots.length>0);if(!y.length)return;let b=0,_=0;if(y.length>1){const t=y.map(t=>t.cx),e=y.map(t=>t.cy);b=Math.max(...t)-Math.min(...t),_=Math.max(...e)-Math.min(...e)}const M=b>_,A=parseFloat(o.fontSize)||13,w=Math.round(1.35*A),S=[];if(y.slice().sort((t,e)=>t.cy-e.cy).forEach((t,e)=>{const r=this._outerLabelLines(t.i,a[t.i],i,s);if(!r.some(t=>""!==t))return;const n=M?t.cx>=f/2?"right":"left":e%2==0?"right":"left",o="right"===n?1:-1;let l=t.dots[0],c=-1/0;t.dots.forEach(e=>{const a=o*e.x-.75*Math.abs(e.y-t.cy);a>c&&(c=a,l=e)});const m={x:l.x+o*(l.r||x),y:l.y},g={x:m.x+o*h,y:m.y};S.push({i:t.i,lines:r,anchor:m,elbow:g,labelX:g.x+o*u+d,idealY:m.y+p,labelY:m.y+p,side:n})}),!S.length)return;const R=S.reduce((t,e)=>Math.max(t,e.lines.length),1)*w,k=R/2;["left","right"].forEach(t=>{!function(t,e,a,i){const s=t.slice().sort((t,e)=>t.idealY-e.idealY);s.forEach(t=>{t.labelY=t.idealY});for(let t=1;t<s.length;t++)s[t].labelY-s[t-1].labelY<e&&(s[t].labelY=s[t-1].labelY+e);const r=s[s.length-1],n=r?r.labelY-a:0;if(n>0)for(let t=s.length-1;t>=0;t--)s[t].labelY-=n,t<s.length-1&&s[t+1].labelY-s[t].labelY<e&&(s[t].labelY=s[t+1].labelY-e);if(null!=i&&s.length&&s[0].labelY<i){const t=i-s[0].labelY;for(let e=0;e<s.length;e++)s[e].labelY+=t}}(S.filter(e=>e.side===t),R+2,m-k,k)});const F=new g(n,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,n.config.chart.animations.speed||800);F.node.classList.add("apexcharts-unit-label-delay"),F.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}S.forEach(t=>{const e=n.globals.colors[t.i]||n.globals.colors[0]||"#008FFB";F.add(function(t,e){const{lines:a,lineHeight:i,anchor:s,elbow:r,labelX:n,labelY:o,side:l,connector:c,style:h,foreColor:u}=e,d=new g(t),p=d.group({class:e.groupClass||"apexcharts-outer-label-group"});if(c.show){const t=`M ${s.x} ${s.y} L ${r.x} ${r.y} L ${n} ${o}`,a=d.drawPath({d:t,stroke:c.color,strokeWidth:c.width,fill:"none",strokeLinecap:"round"});a.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(a)}const f="right"===l?n+4:n-4,m=a.length,x=o-(m-1)*i/2,y=d.drawText({x:f,y:x,text:1===m?a[0]:a,textAnchor:"right"===l?"start":"end",fontSize:h.fontSize,fontFamily:h.fontFamily,fontWeight:h.fontWeight,foreColor:u,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(m>1){const t=y.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${f}`),t[e].setAttribute("dy",0===e?"0":`${i}`)}return p.add(y),p}(n,{lines:t.lines,lineHeight:w,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==c.show,width:null!=c.width?c.width:1.5,color:c.color||e},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||n.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||n.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(F)}_drawClusterLabel(t,e,a,i,s,r){const n=this.w;if(!v.isBrowser())return;const o="http://www.w3.org/2000/svg",l=n.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=i>0?a/i*100:0,h=s.clusterLabels,u=parseFloat(h.fontSize)||13;let d;d="function"==typeof h.formatter?h.formatter(l,{seriesIndex:e.i,value:a,percent:c,w:n}):`${l} (${c.toFixed(1)}%)`;const p="string"==typeof d?d:String(d),f=k.createElementNS(o,"text");f.setAttribute("class","apexcharts-unit-label"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size",`${u}px`),f.setAttribute("font-family",h.fontFamily||n.config.chart.fontFamily||"inherit"),f.setAttribute("font-weight",String(h.fontWeight||600)),f.setAttribute("fill",h.color||r);const m="bottom"===h.position,x=e.outerR+.6*u+3+(h.offsetY||0),g=p.length*u*.55;if(!m&&!e.flat&&!1!==h.curved&&g<=Math.PI*x*.95){const a=e.cy,i=`M ${e.cx-x} ${a} A ${x} ${x} 0 0 1 ${e.cx+x} ${a}`,s=`apexcharts-unit-label-${n.globals.chartID}-${e.i}`,r=k.createElementNS(o,"path");r.setAttribute("id",s),r.setAttribute("d",i),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=k.createElementNS(o,"textPath");l.setAttribute("href",`#${s}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${s}`),l.setAttribute("startOffset","50%"),l.textContent=p,f.appendChild(l),t.node.appendChild(r)}else{f.setAttribute("x",String(e.cx));const t=m?e.cy+e.outerR+u+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);f.setAttribute("y",String(t)),f.textContent=p}return t.node.appendChild(f),f}}}),t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexUnit={})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,l=(t,e)=>{for(var i in e||(e={}))s.call(e,i)&&r(t,i,e[i]);if(n)for(var i of n(e))o.call(e,i)&&r(t,i,e[i]);return t},a=(t,n)=>e(t,i(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const c=h(require("apexcharts/core")),u=c.__apex_CoreUtils,d=c.__apex_ChartFactory_getChartClass,p=c.__apex_Fill,x=c.__apex_Graphics,g=c.__apex_Series;function f(t,e,i){var n,s;return function(t,e,i,n,s){if(t){const t=null==e?void 0:e[n];if(t&&t.length&&null!=t[s])return"x:"+t[s]}const o=null==i?void 0:i[s];if(null!=o&&""!==String(o))return"c:"+(Array.isArray(o)?o.join(" "):String(o));return"j:"+s}(null==(n=t.axisFlags)?void 0:n.isXNumeric,null==(s=t.seriesData)?void 0:s.seriesX,t.globals.labels,e,i)}const b=c.__apex_Utils,v=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=y(i,n),o=1;for(let r=t.length-1;o<r;o++)i=n,n=t[o+1],e[o]=.5*(s+(s=y(i,n)));return e[o]=s,e}(t),i=t.length-1,n=[];let s,o,r,l;for(let n=0;n<i;n++)r=y(t[n],t[n+1]),Math.abs(r)<1e-6?e[n]=e[n+1]=0:(s=e[n]/r,o=e[n+1]/r,l=s*s+o*o,l>9&&(l=3*r/Math.sqrt(l),e[n]=l*s,e[n+1]=l*o));for(let s=0;s<=i;s++)l=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([l||0,e[s]*l||0]);return n},m={points(t){const e=v(t),i=t[1],n=t[0],s=[],o=e[1],r=e[0];s.push(n,[n[0]+r[0],n[1]+r[1],i[0]-o[0],i[1]-o[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],o=e[i];s.push([n[0]-o[0],n[1]-o[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function y(t,e){return(e[1]-t[1])/(e[0]-t[0])}function w({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:o,realIndex:r,wrapClass:l,pointClass:a}){if(!s||!1===s.show||!n.length)return;const h=null!=s.opacity?s.opacity:.9,c=null!=s.strokeColor?s.strokeColor:"#fff",u=null!=s.strokeWidth?s.strokeWidth:1,d=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:d?`${l} apexcharts-element-hidden`:l});d&&e.globals.delayedElements.push({el:p.node}),n.forEach(({groups:i,j:n})=>{const l=o?e.globals.colors[n]:e.globals.colors[r],d=s.fillColor,x="series"===d?l:"series-dark"===d?P(l,.45):d||P(l,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:x,stroke:u>0?c:"none",strokeWidth:u,fillOpacity:h,classes:a});s.attr("data:realIndex",r),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",p.add(s)})}),i.add(p)}function P(t,e){const i=b.parseColor(t)||b.parseColor(b.resolveColor(t));if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function S(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,o=b.parseHex(t[n])||[0,0,0],r=b.parseHex(t[Math.min(n+1,t.length-1)])||o,l=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${l(o[0],r[0])},${l(o[1],r[1])},${l(o[2],r[2])})`}function O(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function M(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function F(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const W=class{};class C extends W{constructor(t,e,i){!function(){const t=d("bar");if(Object.getPrototypeOf(C)===t)return;Object.setPrototypeOf(C,t),Object.setPrototypeOf(C.prototype,t.prototype)}(),super(t,e,i)}draw(t,e,i){var n,s,o;const r=this.w,l=new x(this.w),a=new p(this.w);this.violinOptions=r.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.jx=function(t,e){let i=1/0,n=-1/0;return t.slice(0,e.seriesData.series.length).flat(2).forEach(t=>{t===+t&&(t<i&&(i=t),t>n&&(n=t))}),[i,n]}(r.violinData.seriesViolinPoints,r),this.boxOptions=this.violinOptions.box||{},this.cloudSign=I(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:I(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?H(this.boxOptions.width,.15):0,this.rainFrac=H(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=r.config.plotOptions.bar.distributed,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.coreUtils=new u(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,i);const h=l.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let c,u;const d=[],p=[],x=r.globals.comboCharts?i[e]:e,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),v=l.group({class:"apexcharts-series",seriesName:b.escapeString(r.seriesData.seriesNames[x]),rel:e+1,"data:realIndex":x});g.addCollapsedClassToSeries(this.w,v,x),t[e].length>0&&(this.visibleI=this.visibleI+1);const m=this.setSeriesAxis(x),y=this.barHelpers.initialPositions(x),{y:P,barHeight:S,yDivision:O,zeroW:M,x:F,barWidth:W,xDivision:C,zeroH:j}=y;u=P,c=F,p.push(c+(null!=W?W:0)/2);const I=l.group({class:"apexcharts-datalabels","data:realIndex":x});if(this.seriesMaxWeight=0,"group"===this.normalize){(r.violinData.seriesViolinDensity[x]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const H=[];for(let i=0;i<r.globals.dataPoints;i++){const l=this.barHelpers.getStrokeWidth(e,i,x),h=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:m},y:u,yDivision:O,barHeight:S,zeroW:M}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:m},x:c,xDivision:C,barWidth:W,zeroH:j});c=h.x,u=h.y,i>0&&p.push(h.center),d.push(h.alongRepresentative);const g=this.buildPointsSubPath({realIndex:x,j:i,center:h.center,halfExtent:h.halfExtent,alongFn:h.alongFn,density:h.density,maxWeight:h.maxWeight,cloudBase:h.cloudBase,cloudMaxPx:h.cloudMaxPx,rainCenter:h.rainCenter,rainHalfPx:h.rainHalfPx});g.length&&H.push({groups:g,j:i});const b=a.fillPath({seriesNumber:this.distributed?i:x,dataPointIndex:i,color:this.distributed?r.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:x,pathFill:b,lineFill:r.globals.stroke.colors[x],j:i,i:e,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:l,elSeries:v,x:c,y:u,series:t,columnGroupIndex:f,barHeight:S,barWidth:W,elDataLabelsWrap:I,visibleSeries:this.visibleI,type:"violin"});const y=v.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(y&&isFinite(h.alongRepresentative)&&y.setAttribute(this.isHorizontal?"cx":"cy",`${h.alongRepresentative}`),y&&y.setAttribute("data:center",`${h.center}`),h.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;h.boxPaths.forEach(n=>{this.renderSeries({realIndex:x,pathFill:n.filled?this.boxOptions.fillColor||b:"none",lineFill:r.globals.stroke.colors[x],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:v,x:c,y:u,series:t,columnGroupIndex:f,barHeight:S,barWidth:W,elDataLabelsWrap:I,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box",noLabel:!0})})}const w=!y&&(null==(o=null==(s=r.globals.barCanvasCoords)?void 0:s[x])?void 0:o[i]);w&&isFinite(h.alongRepresentative)&&(this.isHorizontal?w.cx=h.alongRepresentative:(w.bodyCx=w.cx,w.cx=h.center,w.cy=h.alongRepresentative))}w({graphics:l,w:r,elSeries:v,pointsByCat:H,options:this.pointsOptions,distributed:this.distributed,realIndex:x,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=d,h.add(v)}return h}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){const{realIndex:o,j:r,translationsIndex:h}=t,c=this.yRatio[h]*(this.isReversed?-1:1);let u=e+n*this.visibleI;return this.w.axisFlags.isXNumeric?({x:e,barXPosition:u}=this.getBarXForNumericXAxis({x:e,barWidth:n,realIndex:o,j:r})):e+=i,a(l({},this.buildViolin({realIndex:o,j:r,center:u+n/2,halfExtent:n/2,alongFn:t=>s-this.logVal(t,o)/c,vertical:!0})),{x:e,y:s})}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){const{realIndex:o,j:r}=t,h=this.invertedYRatio*(this.isReversed?-1:1),c=e+n*this.visibleI;return a(l({},this.buildViolin({realIndex:o,j:r,center:c+n/2,halfExtent:n/2,alongFn:t=>s+this.logVal(t,o)/h,vertical:!1})),{x:s,y:e+i})}buildViolin({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,vertical:o}){var r,l,a,h,c,u,d;const p=this.w,x=this.getDensity(t,e),g=this.effectiveMaxWeight(x),f=function({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const o=n*t,r=0===i?t:s*t,l=0===i?0:i*(t-r);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:o,rainCenterOff:l,rainHalfPx:r};const a=0===i?0:s,h=2*Math.max(0,1-a-n)*t,c=e*(t-h);return{cloudBaseOff:c,cloudMaxPx:h,boxCenterOff:c-e*o,boxHalfPx:o,rainCenterOff:l,rainHalfPx:r}}({halfExtent:n,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(l=this.rainSign)?l:0,boxFrac:null!=(a=this.boxFrac)?a:0,rainFrac:null!=(h=this.rainFrac)?h:0}),b=i+f.cloudBaseOff,v=t=>this.buildBodyPath({nodes:x.nodes,center:b,halfExtent:f.cloudMaxPx,maxWeight:g,vertical:o,alongFn:s,collapsed:t,sideSign:this.cloudSign}),m=v(!1);let y=null;const w=null==(u=null==(c=this.ctx)?void 0:c.morphTypeChange)?void 0:u.getInitialPathFor(t,e);return w?y=w:p.globals.previousPaths.length>0&&(y=this._prevBody(t,e,m)),null==y&&(y=v(!0)),{pathTo:m,pathFrom:y,center:i,halfExtent:n,alongFn:s,density:x,maxWeight:g,cloudBase:b,cloudMaxPx:f.cloudMaxPx,rainCenter:i+f.rainCenterOff,rainHalfPx:f.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:t,j:e,boxCenter:i+f.boxCenterOff,boxHalfPx:f.boxHalfPx,alongFn:s,vertical:o}),alongRepresentative:s(null!=(d=p.seriesData.series[t][e])?d:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const o=[];let r=null;for(const t of s){const e=n.values[t];null!==r&&e===r||(o.push({v:e,w:n.weights[t]}),r=e)}return{nodes:o,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:o,collapsed:r,sideSign:l=0}){const a=new x(this.w);if(0===t.length){const t=o(0);return s?a.move(e,t)+a.line(e,t):a.move(t,e)+a.line(t,e)}const h=t=>{if(r||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},c=[],u=[];for(let i=0;i<t.length;i++){const n=o(t[i].v),r=h(t[i].w),a=0===l?e+r:e+l*r,d=0===l?e-r:e;s?(c.push([a,n]),u.push([d,n])):(c.push([n,a]),u.push([n,d]))}return u.reverse(),this.smoothSegment(c,s,!1)+this.smoothSegment(u,s,!0)+"z"}_prevBody(t,e,i){var n,s;const o=null==(s=null==(n=this._prevKeyedPaths(t))?void 0:n.get(f(this.w,t,e)))?void 0:s.d;return o&&C.pathCommandCount(o)===C.pathCommandCount(i)?o:null}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:o}){var r,l,a;const h=this.w;if(!this.boxShown||n<=0)return null;const c=null==(r=h.violinData.seriesViolinSummary[t])?void 0:r[e];if(!c)return null;const u=n*Math.min(1,Math.max(0,null!=(l=this.boxOptions.capWidth)?l:.5)),[d,p,g,b,v]=c.map(t=>s(t)),m=(t,e)=>{const n=new x(this.w),s=(t,e)=>o?[t,e]:[e,t],r=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),l=i;return{whiskers:r([s(l,d),s(l,p)])+r([s(l,b),s(l,v)])+r([s(l-t,d),s(l+t,d)])+r([s(l-t,v),s(l+t,v)]),box:r([s(l-e,p),s(l+e,p),s(l+e,b),s(l-e,b)])+"z"+r([s(l-e,g),s(l+e,g)])}},y=m(u,n),w=m(0,0),P=h.globals.previousPaths.length?this._prevKeyedPaths(t):null,S=(null==(a=null==P?void 0:P.get(f(h,t,e)))?void 0:a.box)||[];return[{pathTo:y.whiskers,pathFrom:S[0]||w.whiskers,filled:!1},{pathTo:y.box,pathFrom:S[1]||w.box,filled:!0}]}smoothSegment(t,e,i){const n=new x(this.w),s=t[0];let o=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)o+=n.line(t[e][0],t[e][1]);return o}const r=t.map(([t,i])=>e?[i,t]:[t,i]),l=m.points(r);return o+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?l.map(j):l),o}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:o,maxWeight:r,cloudBase:l,cloudMaxPx:a,rainCenter:h,rainHalfPx:c}){var u;const d=0!==this.rainSign,p=d?h:0!==this.cloudSign?l:i,x=d?c:0!==this.cloudSign?a:n;return function({points:t,extent:e,seedA:i,seedB:n,center:s,halfExtent:o,alongFn:r,isHorizontal:l,options:a,clampAt:h,sideSign:c}){var u,d;const p=a;if(!p||!1===p.show)return[];if(!t||!t.length)return[];const x=p.maxPoints||3e3,g=t.length>x?Math.ceil(t.length/x):1,f=null!=p.size?p.size:2.5,b=o*(null!=p.jitter?p.jitter:.5),v=!1!==p.constrainToViolin&&"function"==typeof h,m="square"===p.shape,y=p.colorScale,w=y&&Array.isArray(y.colors)&&y.colors.length>0,P=w?Math.max(2,y.steps||24):1,W=null!=(u=null==y?void 0:y.min)?u:e[0],C=(null!=(d=null==y?void 0:y.max)?d:e[1])-W||1,j=w?new Array(P).fill(""):[""];for(let e=0;e<t.length;e+=g){const o=t[e],a=r(o);let u=2*(O(7919*i+100003*n+e)-.5)*b;if(v){const t=h(o);u>t&&(u=t),u<-t&&(u=-t)}c&&(u=Math.abs(u)*c);const d=l?a:s+u,p=l?s+u:a,x=m?F(d,p,f):M(d,p,f);if(w){let t=(o-W)/C;t<0&&(t=0),t>1&&(t=1),j[Math.round(t*(P-1))]+=x}else j[0]+=x}if(!w)return j[0]?[{fill:null,d:j[0]}]:[];const I=[];for(let t=0;t<P;t++)j[t]&&I.push({fill:S(y.colors,t/(P-1)),d:j[t]});return I}({points:null==(u=this.w.violinData.seriesViolinPoints[t])?void 0:u[e],extent:this.jx,seedA:t,seedB:e,center:p,halfExtent:x,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:t=>this.halfWidthAtValue(t,o,x,r),sideSign:d?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,o=null!=n?n:e.maxWeight;if(!s.length||o<=0)return 0;const r=t=>Math.min(i,t/o*i*this.bandwidthScale);if(t<=s[0].v)return r(s[0].w);if(t>=s[s.length-1].v)return r(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],o=n.v===i.v?0:(t-i.v)/(n.v-i.v);return r(i.w+(n.w-i.w)*o)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function j(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function I(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function H(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}c.default.use({violin:C}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.6.0
21
+ * ApexCharts v8.7.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
package/dist/violin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v8.6.0
2
+ * ApexCharts v8.7.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  !function(t){var e="undefined"!=typeof globalThis?globalThis:self,i=e.ApexCharts;if(i&&i.__internals)return t.call(e);if(i)throw new Error("ApexCharts: dist/violin.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return t.call(e);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/violin.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/violin.js",run:t,done:!1},s=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);s.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var i=e.ApexCharts;if(i)if(i.__internals){n.done=!0;var o=s.indexOf(n);-1!==o&&s.splice(o,1);try{t.call(e),i.__drainsAddons||e.console.warn("ApexCharts: dist/violin.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(t){e.console.error("ApexCharts: dist/violin.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/violin.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else e.console.warn("ApexCharts: dist/violin.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var t,e;t=this,e=function(t){"use strict";var e=Object.defineProperty,i=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,r=(t,i,n)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n,l=(t,e)=>{for(var i in e||(e={}))o.call(e,i)&&r(t,i,e[i]);if(s)for(var i of s(e))a.call(e,i)&&r(t,i,e[i]);return t},h=(t,e)=>i(t,n(e));const c=globalThis.ApexCharts,d=globalThis.ApexCharts.__internals.__apex_CoreUtils,p=globalThis.ApexCharts.__internals;p.__apex_ChartFactory_register;const u=p.__apex_ChartFactory_getChartClass;p.__apex_ChartFactory_isCustom;const x=globalThis.ApexCharts.__internals.__apex_Fill,g=globalThis.ApexCharts.__internals.__apex_Graphics,f=globalThis.ApexCharts.__internals.__apex_Series,b=globalThis.ApexCharts.__internals;b.__apex_Animations,b.__apex_Animations_computeStagger,b.__apex_Animations_applyAnimationPolicy,b.__apex_Animations_prefersReducedMotion,b.__apex_Animations_applyProgressiveReveal,globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,globalThis.ApexCharts.__internals.__apex_Environment_Environment;const v=globalThis.ApexCharts.__internals;function _(t,e,i){var n,s;return function(t,e,i,n,s){if(t){const t=null==e?void 0:e[n];if(t&&t.length&&null!=t[s])return"x:"+t[s]}const o=null==i?void 0:i[s];return null!=o&&""!==String(o)?"c:"+(Array.isArray(o)?o.join(" "):String(o)):"j:"+s}(null==(n=t.axisFlags)?void 0:n.isXNumeric,null==(s=t.seriesData)?void 0:s.seriesX,t.globals.labels,e,i)}v.__apex_Easing_easeInOutSine,v.__apex_Easing_DEFAULT_EASING_NAME,v.__apex_Easing_cubicBezier,v.__apex_Easing_registerEasing,v.__apex_Easing_resolveEasing;const m=globalThis.ApexCharts.__internals.__apex_Utils,y=t=>{const e=function(t){const e=[];let i=t[0],n=t[1],s=e[0]=C(i,n),o=1;for(let a=t.length-1;o<a;o++)i=n,n=t[o+1],e[o]=.5*(s+(s=C(i,n)));return e[o]=s,e}(t),i=t.length-1,n=[];let s,o,a,r;for(let n=0;n<i;n++)a=C(t[n],t[n+1]),Math.abs(a)<1e-6?e[n]=e[n+1]=0:(s=e[n]/a,o=e[n+1]/a,r=s*s+o*o,r>9&&(r=3*a/Math.sqrt(r),e[n]=r*s,e[n+1]=r*o));for(let s=0;s<=i;s++)r=(t[Math.min(i,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+e[s]*e[s])),n.push([r||0,e[s]*r||0]);return n},w={points(t){const e=y(t),i=t[1],n=t[0],s=[],o=e[1],a=e[0];s.push(n,[n[0]+a[0],n[1]+a[1],i[0]-o[0],i[1]-o[1],i[0],i[1]]);for(let i=2,n=e.length;i<n;i++){const n=t[i],o=e[i];s.push([n[0]-o[0],n[1]-o[1],n[0],n[1]])}return s},slice(t,e,i){const n=t.slice(e,i);if(e){if(i-e>1&&n[1].length<6){const t=n[0].length;n[1]=[2*n[0][t-2]-n[0][t-4],2*n[0][t-1]-n[0][t-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n}};function C(t,e){return(e[1]-t[1])/(e[0]-t[0])}function P({graphics:t,w:e,elSeries:i,pointsByCat:n,options:s,distributed:o,realIndex:a,wrapClass:r,pointClass:l}){if(!s||!1===s.show||!n.length)return;const h=null!=s.opacity?s.opacity:.9,c=null!=s.strokeColor?s.strokeColor:"#fff",d=null!=s.strokeWidth?s.strokeWidth:1,p=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,u=t.group({class:p?`${r} apexcharts-element-hidden`:r});p&&e.globals.delayedElements.push({el:u.node}),n.forEach(({groups:i,j:n})=>{const r=o?e.globals.colors[n]:e.globals.colors[a],p=s.fillColor,x="series"===p?r:"series-dark"===p?S(r,.45):p||S(r,.45);i.forEach(i=>{const s=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:x,stroke:d>0?c:"none",strokeWidth:d,fillOpacity:h,classes:l});s.attr("data:realIndex",a),s.attr("j",n),s.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),s.node.style.pointerEvents="none",u.add(s)})}),i.add(u)}function S(t,e){const i=m.parseColor(t)||m.parseColor(m.resolveColor(t));if(!i)return t;const n=Math.max(0,1-e);return`rgb(${Math.round(i[0]*n)},${Math.round(i[1]*n)},${Math.round(i[2]*n)})`}function A(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),n=Math.floor(i),s=i-n,o=m.parseHex(t[n])||[0,0,0],a=m.parseHex(t[Math.min(n+1,t.length-1)])||o,r=(t,e)=>Math.round(t+(e-t)*s);return`rgb(${r(o[0],a[0])},${r(o[1],a[1])},${r(o[2],a[2])})`}function j(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function M(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function O(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}const F=class{};class W extends F{constructor(t,e,i){!function(){const t=u("bar");Object.getPrototypeOf(W)!==t&&(Object.setPrototypeOf(W,t),Object.setPrototypeOf(W.prototype,t.prototype))}(),super(t,e,i)}draw(t,e,i){var n,s,o;const a=this.w,r=new g(this.w),l=new x(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.jx=function(t,e){let i=1/0,n=-1/0;return t.slice(0,e.seriesData.series.length).flat(2).forEach(t=>{t===+t&&(t<i&&(i=t),t>n&&(n=t))}),[i,n]}(a.violinData.seriesViolinPoints,a),this.boxOptions=this.violinOptions.box||{},this.cloudSign=E(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:E(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?H(this.boxOptions.width,.15):0,this.rainFrac=H(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new d(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t,i);const h=r.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let c,d;const p=[],u=[],x=a.globals.comboCharts?i[e]:e,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(x),b=r.group({class:"apexcharts-series",seriesName:m.escapeString(a.seriesData.seriesNames[x]),rel:e+1,"data:realIndex":x});f.addCollapsedClassToSeries(this.w,b,x),t[e].length>0&&(this.visibleI=this.visibleI+1);const v=this.setSeriesAxis(x),_=this.barHelpers.initialPositions(x),{y:y,barHeight:w,yDivision:C,zeroW:S,x:A,barWidth:j,xDivision:M,zeroH:O}=_;d=y,c=A,u.push(c+(null!=j?j:0)/2);const F=r.group({class:"apexcharts-datalabels","data:realIndex":x});this.seriesMaxWeight=0,"group"===this.normalize&&(a.violinData.seriesViolinDensity[x]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)});const W=[];for(let i=0;i<a.globals.dataPoints;i++){const r=this.barHelpers.getStrokeWidth(e,i,x),h=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:v},y:d,yDivision:C,barHeight:w,zeroW:S}):this.drawVerticalViolin({indexes:{i:e,j:i,realIndex:x,translationsIndex:v},x:c,xDivision:M,barWidth:j,zeroH:O});c=h.x,d=h.y,i>0&&u.push(h.center),p.push(h.alongRepresentative);const f=this.buildPointsSubPath({realIndex:x,j:i,center:h.center,halfExtent:h.halfExtent,alongFn:h.alongFn,density:h.density,maxWeight:h.maxWeight,cloudBase:h.cloudBase,cloudMaxPx:h.cloudMaxPx,rainCenter:h.rainCenter,rainHalfPx:h.rainHalfPx});f.length&&W.push({groups:f,j:i});const _=l.fillPath({seriesNumber:this.distributed?i:x,dataPointIndex:i,color:this.distributed?a.globals.colors[i]:void 0,value:t[e][i]});this.renderSeries({realIndex:x,pathFill:_,lineFill:a.globals.stroke.colors[x],j:i,i:e,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:b,x:c,y:d,series:t,columnGroupIndex:g,barHeight:w,barWidth:j,elDataLabelsWrap:F,visibleSeries:this.visibleI,type:"violin"});const m=b.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(m&&isFinite(h.alongRepresentative)&&m.setAttribute(this.isHorizontal?"cx":"cy",`${h.alongRepresentative}`),m&&m.setAttribute("data:center",`${h.center}`),h.boxPaths){const s=null!=(n=this.boxOptions.strokeWidth)?n:1;h.boxPaths.forEach(n=>{this.renderSeries({realIndex:x,pathFill:n.filled?this.boxOptions.fillColor||_:"none",lineFill:a.globals.stroke.colors[x],j:i,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:s,elSeries:b,x:c,y:d,series:t,columnGroupIndex:g,barHeight:w,barWidth:j,elDataLabelsWrap:F,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box",noLabel:!0})})}const y=!m&&(null==(o=null==(s=a.globals.barCanvasCoords)?void 0:s[x])?void 0:o[i]);y&&isFinite(h.alongRepresentative)&&(this.isHorizontal?y.cx=h.alongRepresentative:(y.bodyCx=y.cx,y.cx=h.center,y.cy=h.alongRepresentative))}P({graphics:r,w:a,elSeries:b,pointsByCat:W,options:this.pointsOptions,distributed:this.distributed,realIndex:x,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[x]=u,a.globals.seriesYvalues[x]=p,h.add(b)}return h}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:n,zeroH:s}){const{realIndex:o,j:a,translationsIndex:r}=t,c=this.yRatio[r]*(this.isReversed?-1:1);let d=e+n*this.visibleI;return this.w.axisFlags.isXNumeric?({x:e,barXPosition:d}=this.getBarXForNumericXAxis({x:e,barWidth:n,realIndex:o,j:a})):e+=i,h(l({},this.buildViolin({realIndex:o,j:a,center:d+n/2,halfExtent:n/2,alongFn:t=>s-this.logVal(t,o)/c,vertical:!0})),{x:e,y:s})}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:n,zeroW:s}){const{realIndex:o,j:a}=t,r=this.invertedYRatio*(this.isReversed?-1:1),c=e+n*this.visibleI;return h(l({},this.buildViolin({realIndex:o,j:a,center:c+n/2,halfExtent:n/2,alongFn:t=>s+this.logVal(t,o)/r,vertical:!1})),{x:s,y:e+i})}buildViolin({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,vertical:o}){var a,r,l,h,c,d,p;const u=this.w,x=this.getDensity(t,e),g=this.effectiveMaxWeight(x),f=function({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:n,rainFrac:s}){const o=n*t,a=0===i?t:s*t,r=0===i?0:i*(t-a);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:o,rainCenterOff:r,rainHalfPx:a};const l=0===i?0:s,h=2*Math.max(0,1-l-n)*t,c=e*(t-h);return{cloudBaseOff:c,cloudMaxPx:h,boxCenterOff:c-e*o,boxHalfPx:o,rainCenterOff:r,rainHalfPx:a}}({halfExtent:n,cloudSign:null!=(a=this.cloudSign)?a:0,rainSign:null!=(r=this.rainSign)?r:0,boxFrac:null!=(l=this.boxFrac)?l:0,rainFrac:null!=(h=this.rainFrac)?h:0}),b=i+f.cloudBaseOff,v=t=>this.buildBodyPath({nodes:x.nodes,center:b,halfExtent:f.cloudMaxPx,maxWeight:g,vertical:o,alongFn:s,collapsed:t,sideSign:this.cloudSign}),_=v(!1);let m=null;const y=null==(d=null==(c=this.ctx)?void 0:c.morphTypeChange)?void 0:d.getInitialPathFor(t,e);return y?m=y:u.globals.previousPaths.length>0&&(m=this._prevBody(t,e,_)),null==m&&(m=v(!0)),{pathTo:_,pathFrom:m,center:i,halfExtent:n,alongFn:s,density:x,maxWeight:g,cloudBase:b,cloudMaxPx:f.cloudMaxPx,rainCenter:i+f.rainCenterOff,rainHalfPx:f.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:t,j:e,boxCenter:i+f.boxCenterOff,boxHalfPx:f.boxHalfPx,alongFn:s,vertical:o}),alongRepresentative:s(null!=(p=u.seriesData.series[t][e])?p:0)}}getDensity(t,e){var i;const n=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!n||!n.values.length)return{nodes:[],maxWeight:0};const s=n.values.map((t,e)=>e);s.sort((t,e)=>n.values[t]-n.values[e]);const o=[];let a=null;for(const t of s){const e=n.values[t];null!==a&&e===a||(o.push({v:e,w:n.weights[t]}),a=e)}return{nodes:o,maxWeight:n.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:n,vertical:s,alongFn:o,collapsed:a,sideSign:r=0}){const l=new g(this.w);if(0===t.length){const t=o(0);return s?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const h=t=>{if(a||n<=0)return 0;const e=t/n*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},c=[],d=[];for(let i=0;i<t.length;i++){const n=o(t[i].v),a=h(t[i].w),l=0===r?e+a:e+r*a,p=0===r?e-a:e;s?(c.push([l,n]),d.push([p,n])):(c.push([n,l]),d.push([n,p]))}return d.reverse(),this.smoothSegment(c,s,!1)+this.smoothSegment(d,s,!0)+"z"}_prevBody(t,e,i){var n,s;const o=null==(s=null==(n=this._prevKeyedPaths(t))?void 0:n.get(_(this.w,t,e)))?void 0:s.d;return o&&W.pathCommandCount(o)===W.pathCommandCount(i)?o:null}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:n,alongFn:s,vertical:o}){var a,r,l;const h=this.w;if(!this.boxShown||n<=0)return null;const c=null==(a=h.violinData.seriesViolinSummary[t])?void 0:a[e];if(!c)return null;const d=n*Math.min(1,Math.max(0,null!=(r=this.boxOptions.capWidth)?r:.5)),[p,u,x,f,b]=c.map(t=>s(t)),v=(t,e)=>{const n=new g(this.w),s=(t,e)=>o?[t,e]:[e,t],a=t=>t.map(([t,e],i)=>0===i?n.move(t,e):n.line(t,e)).join(""),r=i;return{whiskers:a([s(r,p),s(r,u)])+a([s(r,f),s(r,b)])+a([s(r-t,p),s(r+t,p)])+a([s(r-t,b),s(r+t,b)]),box:a([s(r-e,u),s(r+e,u),s(r+e,f),s(r-e,f)])+"z"+a([s(r-e,x),s(r+e,x)])}},m=v(d,n),y=v(0,0),w=h.globals.previousPaths.length?this._prevKeyedPaths(t):null,C=(null==(l=null==w?void 0:w.get(_(h,t,e)))?void 0:l.box)||[];return[{pathTo:m.whiskers,pathFrom:C[0]||y.whiskers,filled:!1},{pathTo:m.box,pathFrom:C[1]||y.box,filled:!0}]}smoothSegment(t,e,i){const n=new g(this.w),s=t[0];let o=i?n.line(s[0],s[1]):n.move(s[0],s[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)o+=n.line(t[e][0],t[e][1]);return o}const a=t.map(([t,i])=>e?[i,t]:[t,i]),r=w.points(a);return o+=(t=>{let e="";for(let i=0;i<t.length;i++){const n=t[i],s=n.length;s>4?(e+=`C${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`,e+=`, ${n[4]}, ${n[5]}`):s>2&&(e+=`S${n[0]}, ${n[1]}`,e+=`, ${n[2]}, ${n[3]}`)}return e})(e?r.map(I):r),o}strictlyMonotonic(t,e){const i=e?1:0;for(let e=1;e<t.length;e++)if(t[e][i]===t[e-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:n,alongFn:s,density:o,maxWeight:a,cloudBase:r,cloudMaxPx:l,rainCenter:h,rainHalfPx:c}){var d;const p=0!==this.rainSign,u=p?h:0!==this.cloudSign?r:i,x=p?c:0!==this.cloudSign?l:n;return function({points:t,extent:e,seedA:i,seedB:n,center:s,halfExtent:o,alongFn:a,isHorizontal:r,options:l,clampAt:h,sideSign:c}){var d,p;const u=l;if(!u||!1===u.show)return[];if(!t||!t.length)return[];const x=u.maxPoints||3e3,g=t.length>x?Math.ceil(t.length/x):1,f=null!=u.size?u.size:2.5,b=o*(null!=u.jitter?u.jitter:.5),v=!1!==u.constrainToViolin&&"function"==typeof h,_="square"===u.shape,m=u.colorScale,y=m&&Array.isArray(m.colors)&&m.colors.length>0,w=y?Math.max(2,m.steps||24):1,C=null!=(d=null==m?void 0:m.min)?d:e[0],P=(null!=(p=null==m?void 0:m.max)?p:e[1])-C||1,S=y?new Array(w).fill(""):[""];for(let e=0;e<t.length;e+=g){const o=t[e],l=a(o);let d=2*(j(7919*i+100003*n+e)-.5)*b;if(v){const t=h(o);d>t&&(d=t),d<-t&&(d=-t)}c&&(d=Math.abs(d)*c);const p=r?l:s+d,u=r?s+d:l,x=_?O(p,u,f):M(p,u,f);if(y){let t=(o-C)/P;t<0&&(t=0),t>1&&(t=1),S[Math.round(t*(w-1))]+=x}else S[0]+=x}if(!y)return S[0]?[{fill:null,d:S[0]}]:[];const F=[];for(let t=0;t<w;t++)S[t]&&F.push({fill:A(m.colors,t/(w-1)),d:S[t]});return F}({points:null==(d=this.w.violinData.seriesViolinPoints[t])?void 0:d[e],extent:this.jx,seedA:t,seedB:e,center:u,halfExtent:x,alongFn:s,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:p?null:t=>this.halfWidthAtValue(t,o,x,a),sideSign:p?0:this.cloudSign})}halfWidthAtValue(t,e,i,n){const{nodes:s}=e,o=null!=n?n:e.maxWeight;if(!s.length||o<=0)return 0;const a=t=>Math.min(i,t/o*i*this.bandwidthScale);if(t<=s[0].v)return a(s[0].w);if(t>=s[s.length-1].v)return a(s[s.length-1].w);for(let e=1;e<s.length;e++)if(t<=s[e].v){const i=s[e-1],n=s[e],o=n.v===i.v?0:(t-i.v)/(n.v-i.v);return a(i.w+(n.w-i.w)*o)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function I(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function E(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function H(t,e){let i=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"==typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}c.use({violin:W}),t.default=c,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexViolin={})});