@ntlab/ntjs-assets 2.72.0 → 2.74.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 (838) hide show
  1. package/assets/js/cdn.json +1 -1
  2. package/assets/js/exif-js/exif.min.js +1 -8
  3. package/assets/js/highcharts/css/annotations/popup.css +86 -45
  4. package/assets/js/highcharts/css/highcharts.css +40 -30
  5. package/assets/js/highcharts/css/stocktools/gui.css +28 -11
  6. package/assets/js/highcharts/es-modules/Accessibility/Components/InfoRegionsComponent.js +3 -3
  7. package/assets/js/highcharts/es-modules/Accessibility/Components/LegendComponent.js +10 -1
  8. package/assets/js/highcharts/es-modules/Accessibility/Components/MenuComponent.js +23 -22
  9. package/assets/js/highcharts/es-modules/Accessibility/HighContrastMode.js +0 -5
  10. package/assets/js/highcharts/es-modules/Core/Axis/AxisDefaults.js +5 -0
  11. package/assets/js/highcharts/es-modules/Core/Axis/OrdinalAxis.js +19 -11
  12. package/assets/js/highcharts/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js +14 -1
  13. package/assets/js/highcharts/es-modules/Core/Axis/RadialAxis.js +3 -4
  14. package/assets/js/highcharts/es-modules/Core/Axis/Tick.js +1 -1
  15. package/assets/js/highcharts/es-modules/Core/Axis/WaterfallAxis.js +4 -4
  16. package/assets/js/highcharts/es-modules/Core/Chart/Chart.js +31 -25
  17. package/assets/js/highcharts/es-modules/Core/Chart/ChartDefaults.js +13 -0
  18. package/assets/js/highcharts/es-modules/Core/Chart/GanttChart.js +4 -2
  19. package/assets/js/highcharts/es-modules/Core/Chart/StockChart.js +1 -1
  20. package/assets/js/highcharts/es-modules/Core/Color/Color.js +4 -8
  21. package/assets/js/highcharts/es-modules/Core/Defaults.js +4 -0
  22. package/assets/js/highcharts/es-modules/Core/Globals.js +1 -1
  23. package/assets/js/highcharts/es-modules/Core/HttpUtilities.js +45 -38
  24. package/assets/js/highcharts/es-modules/Core/Pointer.js +3 -4
  25. package/assets/js/highcharts/es-modules/Core/Renderer/HTML/AST.js +14 -14
  26. package/assets/js/highcharts/es-modules/Core/Renderer/HTML/HTMLElement.js +6 -2
  27. package/assets/js/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js +4 -1
  28. package/assets/js/highcharts/es-modules/Core/Series/DataLabel.js +4 -2
  29. package/assets/js/highcharts/es-modules/Core/Series/Series.js +16 -6
  30. package/assets/js/highcharts/es-modules/Core/Series/SeriesDefaults.js +1 -3
  31. package/assets/js/highcharts/es-modules/Core/Templating.js +6 -5
  32. package/assets/js/highcharts/es-modules/Core/Tooltip.js +3 -1
  33. package/assets/js/highcharts/es-modules/Data/Connectors/CSVConnector.js +32 -15
  34. package/assets/js/highcharts/es-modules/Data/Connectors/DataConnector.js +107 -12
  35. package/assets/js/highcharts/es-modules/Data/Connectors/GoogleSheetsConnector.js +29 -17
  36. package/assets/js/highcharts/es-modules/Data/Connectors/HTMLTableConnector.js +3 -3
  37. package/assets/js/highcharts/es-modules/Data/Connectors/JSONConnector.js +37 -16
  38. package/assets/js/highcharts/es-modules/Data/Converters/HTMLTableConverter.js +1 -1
  39. package/assets/js/highcharts/es-modules/Data/DataPool.js +15 -4
  40. package/assets/js/highcharts/es-modules/Extensions/Annotations/Annotation.js +10 -7
  41. package/assets/js/highcharts/es-modules/Extensions/Annotations/AnnotationChart.js +7 -3
  42. package/assets/js/highcharts/es-modules/Extensions/Annotations/AnnotationDefaults.js +38 -12
  43. package/assets/js/highcharts/es-modules/Extensions/Annotations/Controllables/ControllableLabel.js +10 -3
  44. package/assets/js/highcharts/es-modules/Extensions/Annotations/NavigationBindingsDefaults.js +1 -1
  45. package/assets/js/highcharts/es-modules/Extensions/Annotations/Popup/PopupAnnotations.js +10 -4
  46. package/assets/js/highcharts/es-modules/Extensions/Annotations/Popup/PopupComposition.js +1 -1
  47. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/BasicAnnotation.js +0 -3
  48. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/CrookedLine.js +97 -94
  49. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/ElliottWave.js +43 -36
  50. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Fibonacci.js +86 -82
  51. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/FibonacciTimeZones.js +74 -71
  52. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/InfinityLine.js +17 -3
  53. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Measure.js +229 -226
  54. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Pitchfork.js +39 -40
  55. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/TimeCycles.js +56 -52
  56. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/Tunnel.js +80 -76
  57. package/assets/js/highcharts/es-modules/Extensions/Annotations/Types/VerticalLine.js +57 -53
  58. package/assets/js/highcharts/es-modules/Extensions/Boost/BoostSeries.js +22 -3
  59. package/assets/js/highcharts/es-modules/Extensions/DownloadURL.js +41 -8
  60. package/assets/js/highcharts/es-modules/Extensions/ExportData/ExportData.js +876 -780
  61. package/assets/js/highcharts/es-modules/Extensions/ExportData/ExportDataDefaults.js +67 -13
  62. package/assets/js/highcharts/es-modules/Extensions/Exporting/Exporting.js +1091 -546
  63. package/assets/js/highcharts/es-modules/Extensions/Exporting/ExportingDefaults.js +52 -36
  64. package/assets/js/highcharts/es-modules/Extensions/Exporting/Fullscreen.js +2 -2
  65. package/assets/js/highcharts/es-modules/Extensions/NonCartesianSeriesZoom/NonCartesianSeriesZoom.js +311 -0
  66. package/assets/js/highcharts/es-modules/Extensions/OfflineExporting/OfflineExporting.js +254 -575
  67. package/assets/js/highcharts/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js +9 -38
  68. package/assets/js/highcharts/es-modules/Extensions/Pane/Pane.js +1 -1
  69. package/assets/js/highcharts/es-modules/Extensions/Pane/PaneDefaults.js +9 -1
  70. package/assets/js/highcharts/es-modules/Extensions/Themes/Adaptive.js +1009 -0
  71. package/assets/js/highcharts/es-modules/Maps/MapNavigation.js +1 -1
  72. package/assets/js/highcharts/es-modules/Series/Bubble/BubblePoint.js +2 -2
  73. package/assets/js/highcharts/es-modules/Series/Column/ColumnSeriesDefaults.js +1 -2
  74. package/assets/js/highcharts/es-modules/Series/DragNodesComposition.js +4 -0
  75. package/assets/js/highcharts/es-modules/Series/Flags/FlagsSeriesDefaults.js +2 -0
  76. package/assets/js/highcharts/es-modules/Series/GraphLayoutComposition.js +2 -1
  77. package/assets/js/highcharts/es-modules/Series/Heatmap/HeatmapSeriesDefaults.js +1 -2
  78. package/assets/js/highcharts/es-modules/Series/Item/ItemSeries.js +1 -1
  79. package/assets/js/highcharts/es-modules/Series/PackedBubble/PackedBubblePoint.js +5 -0
  80. package/assets/js/highcharts/es-modules/Series/Pie/PieSeriesDefaults.js +1 -2
  81. package/assets/js/highcharts/es-modules/Series/PolarComposition.js +1 -1
  82. package/assets/js/highcharts/es-modules/Series/SolidGauge/SolidGaugeSeries.js +7 -2
  83. package/assets/js/highcharts/es-modules/Series/Treegraph/TreegraphSeries.js +3 -1
  84. package/assets/js/highcharts/es-modules/Series/Variwide/VariwideSeries.js +8 -1
  85. package/assets/js/highcharts/es-modules/Series/Waterfall/WaterfallSeries.js +6 -8
  86. package/assets/js/highcharts/es-modules/Series/Wordcloud/WordcloudSeries.js +87 -10
  87. package/assets/js/highcharts/es-modules/Shared/BaseForm.js +6 -3
  88. package/assets/js/highcharts/es-modules/Shared/TimeBase.js +5 -1
  89. package/assets/js/highcharts/es-modules/Stock/Navigator/NavigatorComposition.js +2 -2
  90. package/assets/js/highcharts/es-modules/Stock/Scrollbar/Scrollbar.js +5 -7
  91. package/assets/js/highcharts/es-modules/Stock/StockTools/StockToolbar.js +1 -1
  92. package/assets/js/highcharts/es-modules/Stock/StockTools/StockToolsBindings.js +34 -113
  93. package/assets/js/highcharts/es-modules/masters/highcharts-3d.src.js +3 -1
  94. package/assets/js/highcharts/es-modules/masters/highcharts-gantt.src.js +1 -1
  95. package/assets/js/highcharts/es-modules/masters/highcharts-more.src.js +1 -1
  96. package/assets/js/highcharts/es-modules/masters/highcharts.src.js +1 -1
  97. package/assets/js/highcharts/es-modules/masters/highmaps.src.js +1 -1
  98. package/assets/js/highcharts/es-modules/masters/highstock.src.js +1 -1
  99. package/assets/js/highcharts/es-modules/masters/i18n/fr-FR.src.js +1 -1
  100. package/assets/js/highcharts/es-modules/masters/i18n/nb-NO.src.js +1 -1
  101. package/assets/js/highcharts/es-modules/masters/i18n/zh-CN.src.js +1 -1
  102. package/assets/js/highcharts/es-modules/masters/indicators/acceleration-bands.src.js +1 -1
  103. package/assets/js/highcharts/es-modules/masters/indicators/accumulation-distribution.src.js +1 -1
  104. package/assets/js/highcharts/es-modules/masters/indicators/ao.src.js +1 -1
  105. package/assets/js/highcharts/es-modules/masters/indicators/apo.src.js +1 -1
  106. package/assets/js/highcharts/es-modules/masters/indicators/aroon-oscillator.src.js +1 -1
  107. package/assets/js/highcharts/es-modules/masters/indicators/aroon.src.js +1 -1
  108. package/assets/js/highcharts/es-modules/masters/indicators/atr.src.js +1 -1
  109. package/assets/js/highcharts/es-modules/masters/indicators/bollinger-bands.src.js +1 -1
  110. package/assets/js/highcharts/es-modules/masters/indicators/cci.src.js +1 -1
  111. package/assets/js/highcharts/es-modules/masters/indicators/chaikin.src.js +1 -1
  112. package/assets/js/highcharts/es-modules/masters/indicators/cmf.src.js +1 -1
  113. package/assets/js/highcharts/es-modules/masters/indicators/cmo.src.js +1 -1
  114. package/assets/js/highcharts/es-modules/masters/indicators/dema.src.js +1 -1
  115. package/assets/js/highcharts/es-modules/masters/indicators/disparity-index.src.js +1 -1
  116. package/assets/js/highcharts/es-modules/masters/indicators/dmi.src.js +1 -1
  117. package/assets/js/highcharts/es-modules/masters/indicators/dpo.src.js +1 -1
  118. package/assets/js/highcharts/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +1 -1
  119. package/assets/js/highcharts/es-modules/masters/indicators/indicators-all.src.js +1 -1
  120. package/assets/js/highcharts/es-modules/masters/indicators/indicators.src.js +1 -1
  121. package/assets/js/highcharts/es-modules/masters/indicators/keltner-channels.src.js +1 -1
  122. package/assets/js/highcharts/es-modules/masters/indicators/klinger.src.js +1 -1
  123. package/assets/js/highcharts/es-modules/masters/indicators/macd.src.js +1 -1
  124. package/assets/js/highcharts/es-modules/masters/indicators/mfi.src.js +1 -1
  125. package/assets/js/highcharts/es-modules/masters/indicators/momentum.src.js +1 -1
  126. package/assets/js/highcharts/es-modules/masters/indicators/natr.src.js +1 -1
  127. package/assets/js/highcharts/es-modules/masters/indicators/obv.src.js +1 -1
  128. package/assets/js/highcharts/es-modules/masters/indicators/pivot-points.src.js +1 -1
  129. package/assets/js/highcharts/es-modules/masters/indicators/ppo.src.js +1 -1
  130. package/assets/js/highcharts/es-modules/masters/indicators/price-channel.src.js +1 -1
  131. package/assets/js/highcharts/es-modules/masters/indicators/price-envelopes.src.js +1 -1
  132. package/assets/js/highcharts/es-modules/masters/indicators/psar.src.js +1 -1
  133. package/assets/js/highcharts/es-modules/masters/indicators/regressions.src.js +1 -1
  134. package/assets/js/highcharts/es-modules/masters/indicators/roc.src.js +1 -1
  135. package/assets/js/highcharts/es-modules/masters/indicators/rsi.src.js +1 -1
  136. package/assets/js/highcharts/es-modules/masters/indicators/slow-stochastic.src.js +1 -1
  137. package/assets/js/highcharts/es-modules/masters/indicators/stochastic.src.js +1 -1
  138. package/assets/js/highcharts/es-modules/masters/indicators/supertrend.src.js +1 -1
  139. package/assets/js/highcharts/es-modules/masters/indicators/tema.src.js +1 -1
  140. package/assets/js/highcharts/es-modules/masters/indicators/trendline.src.js +1 -1
  141. package/assets/js/highcharts/es-modules/masters/indicators/trix.src.js +1 -1
  142. package/assets/js/highcharts/es-modules/masters/indicators/volume-by-price.src.js +1 -1
  143. package/assets/js/highcharts/es-modules/masters/indicators/vwap.src.js +1 -1
  144. package/assets/js/highcharts/es-modules/masters/indicators/williams-r.src.js +1 -1
  145. package/assets/js/highcharts/es-modules/masters/indicators/wma.src.js +1 -1
  146. package/assets/js/highcharts/es-modules/masters/indicators/zigzag.src.js +1 -1
  147. package/assets/js/highcharts/es-modules/masters/modules/accessibility.src.js +1 -1
  148. package/assets/js/highcharts/es-modules/masters/modules/annotations-advanced.src.js +1 -1
  149. package/assets/js/highcharts/es-modules/masters/modules/annotations.src.js +1 -1
  150. package/assets/js/highcharts/es-modules/masters/modules/arc-diagram.src.js +1 -1
  151. package/assets/js/highcharts/es-modules/masters/modules/arrow-symbols.src.js +1 -1
  152. package/assets/js/highcharts/es-modules/masters/modules/boost-canvas.src.js +1 -1
  153. package/assets/js/highcharts/es-modules/masters/modules/boost.src.js +1 -1
  154. package/assets/js/highcharts/es-modules/masters/modules/broken-axis.src.js +1 -1
  155. package/assets/js/highcharts/es-modules/masters/modules/bullet.src.js +1 -1
  156. package/assets/js/highcharts/es-modules/masters/modules/coloraxis.src.js +1 -1
  157. package/assets/js/highcharts/es-modules/masters/modules/current-date-indicator.src.js +1 -1
  158. package/assets/js/highcharts/es-modules/masters/modules/cylinder.src.js +1 -1
  159. package/assets/js/highcharts/es-modules/masters/modules/data-tools.src.js +1 -1
  160. package/assets/js/highcharts/es-modules/masters/modules/data.src.js +1 -1
  161. package/assets/js/highcharts/es-modules/masters/modules/datagrouping.src.js +1 -1
  162. package/assets/js/highcharts/es-modules/masters/modules/debugger.src.js +1 -1
  163. package/assets/js/highcharts/es-modules/masters/modules/dependency-wheel.src.js +1 -1
  164. package/assets/js/highcharts/es-modules/masters/modules/dotplot.src.js +1 -1
  165. package/assets/js/highcharts/es-modules/masters/modules/drag-panes.src.js +1 -1
  166. package/assets/js/highcharts/es-modules/masters/modules/draggable-points.src.js +1 -1
  167. package/assets/js/highcharts/es-modules/masters/modules/drilldown.src.js +3 -1
  168. package/assets/js/highcharts/es-modules/masters/modules/dumbbell.src.js +1 -1
  169. package/assets/js/highcharts/es-modules/masters/modules/export-data.src.js +3 -3
  170. package/assets/js/highcharts/es-modules/masters/modules/exporting.src.js +5 -1
  171. package/assets/js/highcharts/es-modules/masters/modules/flowmap.src.js +1 -1
  172. package/assets/js/highcharts/es-modules/masters/modules/full-screen.src.js +1 -1
  173. package/assets/js/highcharts/es-modules/masters/modules/funnel.src.js +1 -1
  174. package/assets/js/highcharts/es-modules/masters/modules/funnel3d.src.js +1 -1
  175. package/assets/js/highcharts/es-modules/masters/modules/gantt.src.js +1 -1
  176. package/assets/js/highcharts/es-modules/masters/modules/geoheatmap.src.js +1 -1
  177. package/assets/js/highcharts/es-modules/masters/modules/grid-axis.src.js +1 -1
  178. package/assets/js/highcharts/es-modules/masters/modules/heatmap.src.js +1 -1
  179. package/assets/js/highcharts/es-modules/masters/modules/heikinashi.src.js +1 -1
  180. package/assets/js/highcharts/es-modules/masters/modules/histogram-bellcurve.src.js +1 -1
  181. package/assets/js/highcharts/es-modules/masters/modules/hollowcandlestick.src.js +1 -1
  182. package/assets/js/highcharts/es-modules/masters/modules/item-series.src.js +1 -1
  183. package/assets/js/highcharts/es-modules/masters/modules/lollipop.src.js +1 -1
  184. package/assets/js/highcharts/es-modules/masters/modules/map.src.js +1 -1
  185. package/assets/js/highcharts/es-modules/masters/modules/marker-clusters.src.js +1 -1
  186. package/assets/js/highcharts/es-modules/masters/modules/mouse-wheel-zoom.src.js +1 -1
  187. package/assets/js/highcharts/es-modules/masters/modules/navigator.src.js +1 -1
  188. package/assets/js/highcharts/es-modules/masters/modules/networkgraph.src.js +1 -1
  189. package/assets/js/highcharts/es-modules/masters/modules/no-data-to-display.src.js +1 -1
  190. package/assets/js/highcharts/es-modules/masters/modules/non-cartesian-zoom.src.js +18 -0
  191. package/assets/js/highcharts/es-modules/masters/modules/offline-exporting.src.js +2 -2
  192. package/assets/js/highcharts/es-modules/masters/modules/organization.src.js +1 -1
  193. package/assets/js/highcharts/es-modules/masters/modules/parallel-coordinates.src.js +1 -1
  194. package/assets/js/highcharts/es-modules/masters/modules/pareto.src.js +1 -1
  195. package/assets/js/highcharts/es-modules/masters/modules/pathfinder.src.js +1 -1
  196. package/assets/js/highcharts/es-modules/masters/modules/pattern-fill.src.js +1 -1
  197. package/assets/js/highcharts/es-modules/masters/modules/pictorial.src.js +1 -1
  198. package/assets/js/highcharts/es-modules/masters/modules/pointandfigure.src.js +1 -1
  199. package/assets/js/highcharts/es-modules/masters/modules/price-indicator.src.js +1 -1
  200. package/assets/js/highcharts/es-modules/masters/modules/pyramid3d.src.js +1 -1
  201. package/assets/js/highcharts/es-modules/masters/modules/renko.src.js +1 -1
  202. package/assets/js/highcharts/es-modules/masters/modules/sankey.src.js +1 -1
  203. package/assets/js/highcharts/es-modules/masters/modules/series-label.src.js +1 -1
  204. package/assets/js/highcharts/es-modules/masters/modules/series-on-point.src.js +1 -1
  205. package/assets/js/highcharts/es-modules/masters/modules/solid-gauge.src.js +1 -1
  206. package/assets/js/highcharts/es-modules/masters/modules/sonification.src.js +1 -1
  207. package/assets/js/highcharts/es-modules/masters/modules/static-scale.src.js +1 -1
  208. package/assets/js/highcharts/es-modules/masters/modules/stock-tools.src.js +1 -1
  209. package/assets/js/highcharts/es-modules/masters/modules/stock.src.js +1 -1
  210. package/assets/js/highcharts/es-modules/masters/modules/streamgraph.src.js +1 -1
  211. package/assets/js/highcharts/es-modules/masters/modules/sunburst.src.js +1 -1
  212. package/assets/js/highcharts/es-modules/masters/modules/textpath.src.js +1 -1
  213. package/assets/js/highcharts/es-modules/masters/modules/tiledwebmap.src.js +1 -1
  214. package/assets/js/highcharts/es-modules/masters/modules/tilemap.src.js +1 -1
  215. package/assets/js/highcharts/es-modules/masters/modules/timeline.src.js +1 -1
  216. package/assets/js/highcharts/es-modules/masters/modules/treegraph.src.js +1 -1
  217. package/assets/js/highcharts/es-modules/masters/modules/treegrid.src.js +1 -1
  218. package/assets/js/highcharts/es-modules/masters/modules/treemap.src.js +1 -1
  219. package/assets/js/highcharts/es-modules/masters/modules/variable-pie.src.js +1 -1
  220. package/assets/js/highcharts/es-modules/masters/modules/variwide.src.js +1 -1
  221. package/assets/js/highcharts/es-modules/masters/modules/vector.src.js +1 -1
  222. package/assets/js/highcharts/es-modules/masters/modules/venn.src.js +1 -1
  223. package/assets/js/highcharts/es-modules/masters/modules/windbarb.src.js +1 -1
  224. package/assets/js/highcharts/es-modules/masters/modules/wordcloud.src.js +1 -1
  225. package/assets/js/highcharts/es-modules/masters/modules/xrange.src.js +1 -1
  226. package/assets/js/highcharts/es-modules/masters/themes/adaptive.src.js +15 -0
  227. package/assets/js/highcharts/es-modules/masters/themes/avocado.src.js +1 -1
  228. package/assets/js/highcharts/es-modules/masters/themes/brand-dark.src.js +1 -1
  229. package/assets/js/highcharts/es-modules/masters/themes/brand-light.src.js +1 -1
  230. package/assets/js/highcharts/es-modules/masters/themes/dark-blue.src.js +1 -1
  231. package/assets/js/highcharts/es-modules/masters/themes/dark-green.src.js +1 -1
  232. package/assets/js/highcharts/es-modules/masters/themes/dark-unica.src.js +1 -1
  233. package/assets/js/highcharts/es-modules/masters/themes/gray.src.js +1 -1
  234. package/assets/js/highcharts/es-modules/masters/themes/grid-light.src.js +1 -1
  235. package/assets/js/highcharts/es-modules/masters/themes/grid.src.js +1 -1
  236. package/assets/js/highcharts/es-modules/masters/themes/high-contrast-dark.src.js +1 -1
  237. package/assets/js/highcharts/es-modules/masters/themes/high-contrast-light.src.js +1 -1
  238. package/assets/js/highcharts/es-modules/masters/themes/sand-signika.src.js +1 -1
  239. package/assets/js/highcharts/es-modules/masters/themes/skies.src.js +1 -1
  240. package/assets/js/highcharts/es-modules/masters/themes/sunset.src.js +1 -1
  241. package/assets/js/highcharts/esm/highcharts-3d.js +11 -1
  242. package/assets/js/highcharts/esm/highcharts-3d.src.js +3 -1
  243. package/assets/js/highcharts/esm/highcharts-gantt.js +8 -1
  244. package/assets/js/highcharts/esm/highcharts-gantt.src.js +1 -1
  245. package/assets/js/highcharts/esm/highcharts-more.js +9 -1
  246. package/assets/js/highcharts/esm/highcharts-more.src.js +44 -29
  247. package/assets/js/highcharts/esm/highcharts.js +9 -2
  248. package/assets/js/highcharts/esm/highcharts.src.js +138 -80
  249. package/assets/js/highcharts/esm/highmaps.js +8 -1
  250. package/assets/js/highcharts/esm/highmaps.src.js +1 -1
  251. package/assets/js/highcharts/esm/highstock.js +8 -1
  252. package/assets/js/highcharts/esm/highstock.src.js +1 -1
  253. package/assets/js/highcharts/esm/i18n/fr-FR.js +13 -1
  254. package/assets/js/highcharts/esm/i18n/fr-FR.src.js +1 -1
  255. package/assets/js/highcharts/esm/i18n/nb-NO.js +13 -1
  256. package/assets/js/highcharts/esm/i18n/nb-NO.src.js +1 -1
  257. package/assets/js/highcharts/esm/i18n/zh-CN.js +13 -1
  258. package/assets/js/highcharts/esm/i18n/zh-CN.src.js +1 -1
  259. package/assets/js/highcharts/esm/indicators/acceleration-bands.js +12 -1
  260. package/assets/js/highcharts/esm/indicators/acceleration-bands.src.js +1 -1
  261. package/assets/js/highcharts/esm/indicators/accumulation-distribution.js +12 -1
  262. package/assets/js/highcharts/esm/indicators/accumulation-distribution.src.js +1 -1
  263. package/assets/js/highcharts/esm/indicators/ao.js +12 -1
  264. package/assets/js/highcharts/esm/indicators/ao.src.js +1 -1
  265. package/assets/js/highcharts/esm/indicators/apo.js +12 -1
  266. package/assets/js/highcharts/esm/indicators/apo.src.js +1 -1
  267. package/assets/js/highcharts/esm/indicators/aroon-oscillator.js +12 -1
  268. package/assets/js/highcharts/esm/indicators/aroon-oscillator.src.js +1 -1
  269. package/assets/js/highcharts/esm/indicators/aroon.js +12 -1
  270. package/assets/js/highcharts/esm/indicators/aroon.src.js +1 -1
  271. package/assets/js/highcharts/esm/indicators/atr.js +12 -1
  272. package/assets/js/highcharts/esm/indicators/atr.src.js +1 -1
  273. package/assets/js/highcharts/esm/indicators/bollinger-bands.js +12 -1
  274. package/assets/js/highcharts/esm/indicators/bollinger-bands.src.js +1 -1
  275. package/assets/js/highcharts/esm/indicators/cci.js +12 -1
  276. package/assets/js/highcharts/esm/indicators/cci.src.js +1 -1
  277. package/assets/js/highcharts/esm/indicators/chaikin.js +12 -1
  278. package/assets/js/highcharts/esm/indicators/chaikin.src.js +1 -1
  279. package/assets/js/highcharts/esm/indicators/cmf.js +11 -1
  280. package/assets/js/highcharts/esm/indicators/cmf.src.js +1 -1
  281. package/assets/js/highcharts/esm/indicators/cmo.js +12 -1
  282. package/assets/js/highcharts/esm/indicators/cmo.src.js +1 -1
  283. package/assets/js/highcharts/esm/indicators/dema.js +12 -1
  284. package/assets/js/highcharts/esm/indicators/dema.src.js +1 -1
  285. package/assets/js/highcharts/esm/indicators/disparity-index.js +12 -1
  286. package/assets/js/highcharts/esm/indicators/disparity-index.src.js +1 -1
  287. package/assets/js/highcharts/esm/indicators/dmi.js +12 -1
  288. package/assets/js/highcharts/esm/indicators/dmi.src.js +1 -1
  289. package/assets/js/highcharts/esm/indicators/dpo.js +12 -1
  290. package/assets/js/highcharts/esm/indicators/dpo.src.js +1 -1
  291. package/assets/js/highcharts/esm/indicators/ichimoku-kinko-hyo.js +12 -1
  292. package/assets/js/highcharts/esm/indicators/ichimoku-kinko-hyo.src.js +1 -1
  293. package/assets/js/highcharts/esm/indicators/indicators-all.js +12 -1
  294. package/assets/js/highcharts/esm/indicators/indicators-all.src.js +1 -1
  295. package/assets/js/highcharts/esm/indicators/indicators.js +12 -1
  296. package/assets/js/highcharts/esm/indicators/indicators.src.js +1 -1
  297. package/assets/js/highcharts/esm/indicators/keltner-channels.js +12 -1
  298. package/assets/js/highcharts/esm/indicators/keltner-channels.src.js +1 -1
  299. package/assets/js/highcharts/esm/indicators/klinger.js +12 -1
  300. package/assets/js/highcharts/esm/indicators/klinger.src.js +1 -1
  301. package/assets/js/highcharts/esm/indicators/macd.js +12 -1
  302. package/assets/js/highcharts/esm/indicators/macd.src.js +1 -1
  303. package/assets/js/highcharts/esm/indicators/mfi.js +12 -1
  304. package/assets/js/highcharts/esm/indicators/mfi.src.js +1 -1
  305. package/assets/js/highcharts/esm/indicators/momentum.js +12 -1
  306. package/assets/js/highcharts/esm/indicators/momentum.src.js +1 -1
  307. package/assets/js/highcharts/esm/indicators/natr.js +12 -1
  308. package/assets/js/highcharts/esm/indicators/natr.src.js +1 -1
  309. package/assets/js/highcharts/esm/indicators/obv.js +12 -1
  310. package/assets/js/highcharts/esm/indicators/obv.src.js +1 -1
  311. package/assets/js/highcharts/esm/indicators/pivot-points.js +12 -1
  312. package/assets/js/highcharts/esm/indicators/pivot-points.src.js +1 -1
  313. package/assets/js/highcharts/esm/indicators/ppo.js +12 -1
  314. package/assets/js/highcharts/esm/indicators/ppo.src.js +1 -1
  315. package/assets/js/highcharts/esm/indicators/price-channel.js +12 -1
  316. package/assets/js/highcharts/esm/indicators/price-channel.src.js +1 -1
  317. package/assets/js/highcharts/esm/indicators/price-envelopes.js +12 -1
  318. package/assets/js/highcharts/esm/indicators/price-envelopes.src.js +1 -1
  319. package/assets/js/highcharts/esm/indicators/psar.js +12 -1
  320. package/assets/js/highcharts/esm/indicators/psar.src.js +1 -1
  321. package/assets/js/highcharts/esm/indicators/regressions.js +12 -1
  322. package/assets/js/highcharts/esm/indicators/regressions.src.js +1 -1
  323. package/assets/js/highcharts/esm/indicators/roc.js +12 -1
  324. package/assets/js/highcharts/esm/indicators/roc.src.js +1 -1
  325. package/assets/js/highcharts/esm/indicators/rsi.js +12 -1
  326. package/assets/js/highcharts/esm/indicators/rsi.src.js +1 -1
  327. package/assets/js/highcharts/esm/indicators/slow-stochastic.js +12 -1
  328. package/assets/js/highcharts/esm/indicators/slow-stochastic.src.js +1 -1
  329. package/assets/js/highcharts/esm/indicators/stochastic.js +12 -1
  330. package/assets/js/highcharts/esm/indicators/stochastic.src.js +1 -1
  331. package/assets/js/highcharts/esm/indicators/supertrend.js +12 -1
  332. package/assets/js/highcharts/esm/indicators/supertrend.src.js +1 -1
  333. package/assets/js/highcharts/esm/indicators/tema.js +12 -1
  334. package/assets/js/highcharts/esm/indicators/tema.src.js +1 -1
  335. package/assets/js/highcharts/esm/indicators/trendline.js +12 -1
  336. package/assets/js/highcharts/esm/indicators/trendline.src.js +1 -1
  337. package/assets/js/highcharts/esm/indicators/trix.js +12 -1
  338. package/assets/js/highcharts/esm/indicators/trix.src.js +1 -1
  339. package/assets/js/highcharts/esm/indicators/volume-by-price.js +12 -1
  340. package/assets/js/highcharts/esm/indicators/volume-by-price.src.js +1 -1
  341. package/assets/js/highcharts/esm/indicators/vwap.js +12 -1
  342. package/assets/js/highcharts/esm/indicators/vwap.src.js +1 -1
  343. package/assets/js/highcharts/esm/indicators/williams-r.js +12 -1
  344. package/assets/js/highcharts/esm/indicators/williams-r.src.js +1 -1
  345. package/assets/js/highcharts/esm/indicators/wma.js +12 -1
  346. package/assets/js/highcharts/esm/indicators/wma.src.js +1 -1
  347. package/assets/js/highcharts/esm/indicators/zigzag.js +12 -1
  348. package/assets/js/highcharts/esm/indicators/zigzag.src.js +1 -1
  349. package/assets/js/highcharts/esm/modules/accessibility.js +12 -1
  350. package/assets/js/highcharts/esm/modules/accessibility.src.js +46 -43
  351. package/assets/js/highcharts/esm/modules/annotations-advanced.js +11 -1
  352. package/assets/js/highcharts/esm/modules/annotations-advanced.src.js +866 -775
  353. package/assets/js/highcharts/esm/modules/annotations.js +11 -1
  354. package/assets/js/highcharts/esm/modules/annotations.src.js +89 -40
  355. package/assets/js/highcharts/esm/modules/arc-diagram.js +11 -1
  356. package/assets/js/highcharts/esm/modules/arc-diagram.src.js +1 -1
  357. package/assets/js/highcharts/esm/modules/arrow-symbols.js +11 -1
  358. package/assets/js/highcharts/esm/modules/arrow-symbols.src.js +1 -1
  359. package/assets/js/highcharts/esm/modules/boost-canvas.js +12 -1
  360. package/assets/js/highcharts/esm/modules/boost-canvas.src.js +23 -4
  361. package/assets/js/highcharts/esm/modules/boost.js +13 -1
  362. package/assets/js/highcharts/esm/modules/boost.src.js +23 -4
  363. package/assets/js/highcharts/esm/modules/broken-axis.js +9 -1
  364. package/assets/js/highcharts/esm/modules/broken-axis.src.js +1 -1
  365. package/assets/js/highcharts/esm/modules/bullet.js +11 -1
  366. package/assets/js/highcharts/esm/modules/bullet.src.js +1 -1
  367. package/assets/js/highcharts/esm/modules/coloraxis.js +11 -1
  368. package/assets/js/highcharts/esm/modules/coloraxis.src.js +1 -1
  369. package/assets/js/highcharts/esm/modules/current-date-indicator.js +11 -1
  370. package/assets/js/highcharts/esm/modules/current-date-indicator.src.js +1 -1
  371. package/assets/js/highcharts/esm/modules/cylinder.js +12 -1
  372. package/assets/js/highcharts/esm/modules/cylinder.src.js +1 -1
  373. package/assets/js/highcharts/esm/modules/data-tools.js +11 -1
  374. package/assets/js/highcharts/esm/modules/data-tools.src.js +225 -69
  375. package/assets/js/highcharts/esm/modules/data.js +11 -1
  376. package/assets/js/highcharts/esm/modules/data.src.js +46 -39
  377. package/assets/js/highcharts/esm/modules/datagrouping.js +11 -1
  378. package/assets/js/highcharts/esm/modules/datagrouping.src.js +1 -1
  379. package/assets/js/highcharts/esm/modules/debugger.js +11 -1
  380. package/assets/js/highcharts/esm/modules/debugger.src.js +1 -1
  381. package/assets/js/highcharts/esm/modules/dependency-wheel.js +12 -1
  382. package/assets/js/highcharts/esm/modules/dependency-wheel.src.js +1 -1
  383. package/assets/js/highcharts/esm/modules/dotplot.js +11 -1
  384. package/assets/js/highcharts/esm/modules/dotplot.src.js +1 -1
  385. package/assets/js/highcharts/esm/modules/drag-panes.js +13 -1
  386. package/assets/js/highcharts/esm/modules/drag-panes.src.js +1 -1
  387. package/assets/js/highcharts/esm/modules/draggable-points.js +9 -1
  388. package/assets/js/highcharts/esm/modules/draggable-points.src.js +1 -1
  389. package/assets/js/highcharts/esm/modules/drilldown.js +13 -1
  390. package/assets/js/highcharts/esm/modules/drilldown.src.js +3 -1
  391. package/assets/js/highcharts/esm/modules/dumbbell.js +9 -1
  392. package/assets/js/highcharts/esm/modules/dumbbell.src.js +1 -1
  393. package/assets/js/highcharts/esm/modules/export-data.js +12 -1
  394. package/assets/js/highcharts/esm/modules/export-data.src.js +984 -798
  395. package/assets/js/highcharts/esm/modules/exporting.js +11 -1
  396. package/assets/js/highcharts/esm/modules/exporting.src.js +1373 -642
  397. package/assets/js/highcharts/esm/modules/flowmap.js +9 -1
  398. package/assets/js/highcharts/esm/modules/flowmap.src.js +1 -1
  399. package/assets/js/highcharts/esm/modules/full-screen.js +12 -1
  400. package/assets/js/highcharts/esm/modules/full-screen.src.js +3 -3
  401. package/assets/js/highcharts/esm/modules/funnel.js +11 -1
  402. package/assets/js/highcharts/esm/modules/funnel.src.js +1 -1
  403. package/assets/js/highcharts/esm/modules/funnel3d.js +13 -1
  404. package/assets/js/highcharts/esm/modules/funnel3d.src.js +1 -1
  405. package/assets/js/highcharts/esm/modules/gantt.js +11 -1
  406. package/assets/js/highcharts/esm/modules/gantt.src.js +33 -25
  407. package/assets/js/highcharts/esm/modules/geoheatmap.js +9 -1
  408. package/assets/js/highcharts/esm/modules/geoheatmap.src.js +1 -1
  409. package/assets/js/highcharts/esm/modules/grid-axis.js +11 -1
  410. package/assets/js/highcharts/esm/modules/grid-axis.src.js +1 -1
  411. package/assets/js/highcharts/esm/modules/heatmap.js +9 -1
  412. package/assets/js/highcharts/esm/modules/heatmap.src.js +2 -3
  413. package/assets/js/highcharts/esm/modules/heikinashi.js +12 -1
  414. package/assets/js/highcharts/esm/modules/heikinashi.src.js +1 -1
  415. package/assets/js/highcharts/esm/modules/histogram-bellcurve.js +10 -1
  416. package/assets/js/highcharts/esm/modules/histogram-bellcurve.src.js +1 -1
  417. package/assets/js/highcharts/esm/modules/hollowcandlestick.js +12 -1
  418. package/assets/js/highcharts/esm/modules/hollowcandlestick.src.js +1 -1
  419. package/assets/js/highcharts/esm/modules/item-series.js +11 -1
  420. package/assets/js/highcharts/esm/modules/item-series.src.js +3 -5
  421. package/assets/js/highcharts/esm/modules/lollipop.js +9 -1
  422. package/assets/js/highcharts/esm/modules/lollipop.src.js +1 -1
  423. package/assets/js/highcharts/esm/modules/map.js +11 -1
  424. package/assets/js/highcharts/esm/modules/map.src.js +5 -6
  425. package/assets/js/highcharts/esm/modules/marker-clusters.js +11 -1
  426. package/assets/js/highcharts/esm/modules/marker-clusters.src.js +1 -1
  427. package/assets/js/highcharts/esm/modules/mouse-wheel-zoom.js +11 -1
  428. package/assets/js/highcharts/esm/modules/mouse-wheel-zoom.src.js +1 -1
  429. package/assets/js/highcharts/esm/modules/navigator.js +11 -1
  430. package/assets/js/highcharts/esm/modules/navigator.src.js +10 -12
  431. package/assets/js/highcharts/esm/modules/networkgraph.js +11 -1
  432. package/assets/js/highcharts/esm/modules/networkgraph.src.js +7 -2
  433. package/assets/js/highcharts/esm/modules/no-data-to-display.js +12 -1
  434. package/assets/js/highcharts/esm/modules/no-data-to-display.src.js +1 -1
  435. package/assets/js/highcharts/esm/modules/non-cartesian-zoom.js +11 -0
  436. package/assets/js/highcharts/esm/modules/non-cartesian-zoom.src.js +374 -0
  437. package/assets/js/highcharts/esm/modules/offline-exporting.js +12 -1
  438. package/assets/js/highcharts/esm/modules/offline-exporting.src.js +334 -3360
  439. package/assets/js/highcharts/esm/modules/organization.js +11 -1
  440. package/assets/js/highcharts/esm/modules/organization.src.js +1 -1
  441. package/assets/js/highcharts/esm/modules/parallel-coordinates.js +11 -1
  442. package/assets/js/highcharts/esm/modules/parallel-coordinates.src.js +1 -1
  443. package/assets/js/highcharts/esm/modules/pareto.js +11 -1
  444. package/assets/js/highcharts/esm/modules/pareto.src.js +1 -1
  445. package/assets/js/highcharts/esm/modules/pathfinder.js +11 -1
  446. package/assets/js/highcharts/esm/modules/pathfinder.src.js +1 -1
  447. package/assets/js/highcharts/esm/modules/pattern-fill.js +12 -1
  448. package/assets/js/highcharts/esm/modules/pattern-fill.src.js +1 -1
  449. package/assets/js/highcharts/esm/modules/pictorial.js +11 -1
  450. package/assets/js/highcharts/esm/modules/pictorial.src.js +1 -1
  451. package/assets/js/highcharts/esm/modules/pointandfigure.js +12 -1
  452. package/assets/js/highcharts/esm/modules/pointandfigure.src.js +1 -1
  453. package/assets/js/highcharts/esm/modules/price-indicator.js +13 -1
  454. package/assets/js/highcharts/esm/modules/price-indicator.src.js +1 -1
  455. package/assets/js/highcharts/esm/modules/pyramid3d.js +14 -1
  456. package/assets/js/highcharts/esm/modules/pyramid3d.src.js +1 -1
  457. package/assets/js/highcharts/esm/modules/renko.js +12 -1
  458. package/assets/js/highcharts/esm/modules/renko.src.js +1 -1
  459. package/assets/js/highcharts/esm/modules/sankey.js +11 -1
  460. package/assets/js/highcharts/esm/modules/sankey.src.js +1 -1
  461. package/assets/js/highcharts/esm/modules/series-label.js +9 -1
  462. package/assets/js/highcharts/esm/modules/series-label.src.js +1 -1
  463. package/assets/js/highcharts/esm/modules/series-on-point.js +12 -1
  464. package/assets/js/highcharts/esm/modules/series-on-point.src.js +1 -1
  465. package/assets/js/highcharts/esm/modules/solid-gauge.js +12 -1
  466. package/assets/js/highcharts/esm/modules/solid-gauge.src.js +8 -3
  467. package/assets/js/highcharts/esm/modules/sonification.js +12 -1
  468. package/assets/js/highcharts/esm/modules/sonification.src.js +42 -9
  469. package/assets/js/highcharts/esm/modules/static-scale.js +11 -1
  470. package/assets/js/highcharts/esm/modules/static-scale.src.js +1 -1
  471. package/assets/js/highcharts/esm/modules/stock-tools.js +13 -1
  472. package/assets/js/highcharts/esm/modules/stock-tools.src.js +37 -116
  473. package/assets/js/highcharts/esm/modules/stock.js +11 -1
  474. package/assets/js/highcharts/esm/modules/stock.src.js +32 -24
  475. package/assets/js/highcharts/esm/modules/streamgraph.js +11 -1
  476. package/assets/js/highcharts/esm/modules/streamgraph.src.js +1 -1
  477. package/assets/js/highcharts/esm/modules/sunburst.js +10 -1
  478. package/assets/js/highcharts/esm/modules/sunburst.src.js +1 -1
  479. package/assets/js/highcharts/esm/modules/textpath.js +9 -1
  480. package/assets/js/highcharts/esm/modules/textpath.src.js +1 -1
  481. package/assets/js/highcharts/esm/modules/tiledwebmap.js +10 -2
  482. package/assets/js/highcharts/esm/modules/tiledwebmap.src.js +1 -1
  483. package/assets/js/highcharts/esm/modules/tilemap.js +12 -1
  484. package/assets/js/highcharts/esm/modules/tilemap.src.js +1 -1
  485. package/assets/js/highcharts/esm/modules/timeline.js +12 -1
  486. package/assets/js/highcharts/esm/modules/timeline.src.js +1 -1
  487. package/assets/js/highcharts/esm/modules/treegraph.js +11 -1
  488. package/assets/js/highcharts/esm/modules/treegraph.src.js +4 -2
  489. package/assets/js/highcharts/esm/modules/treegrid.js +11 -1
  490. package/assets/js/highcharts/esm/modules/treegrid.src.js +1 -1
  491. package/assets/js/highcharts/esm/modules/treemap.js +10 -1
  492. package/assets/js/highcharts/esm/modules/treemap.src.js +1 -1
  493. package/assets/js/highcharts/esm/modules/variable-pie.js +11 -1
  494. package/assets/js/highcharts/esm/modules/variable-pie.src.js +1 -1
  495. package/assets/js/highcharts/esm/modules/variwide.js +11 -1
  496. package/assets/js/highcharts/esm/modules/variwide.src.js +9 -2
  497. package/assets/js/highcharts/esm/modules/vector.js +11 -1
  498. package/assets/js/highcharts/esm/modules/vector.src.js +1 -1
  499. package/assets/js/highcharts/esm/modules/venn.js +10 -1
  500. package/assets/js/highcharts/esm/modules/venn.src.js +1 -1
  501. package/assets/js/highcharts/esm/modules/windbarb.js +11 -1
  502. package/assets/js/highcharts/esm/modules/windbarb.src.js +1 -1
  503. package/assets/js/highcharts/esm/modules/wordcloud.js +10 -1
  504. package/assets/js/highcharts/esm/modules/wordcloud.src.js +88 -11
  505. package/assets/js/highcharts/esm/modules/xrange.js +11 -1
  506. package/assets/js/highcharts/esm/modules/xrange.src.js +1 -1
  507. package/assets/js/highcharts/esm/standalone-navigator.js +9 -2
  508. package/assets/js/highcharts/esm/standalone-navigator.src.js +146 -90
  509. package/assets/js/highcharts/esm/themes/adaptive.js +130 -0
  510. package/assets/js/highcharts/esm/themes/adaptive.src.js +1069 -0
  511. package/assets/js/highcharts/esm/themes/avocado.js +9 -1
  512. package/assets/js/highcharts/esm/themes/avocado.src.js +1 -1
  513. package/assets/js/highcharts/esm/themes/brand-dark.js +9 -1
  514. package/assets/js/highcharts/esm/themes/brand-dark.src.js +1 -1
  515. package/assets/js/highcharts/esm/themes/brand-light.js +9 -1
  516. package/assets/js/highcharts/esm/themes/brand-light.src.js +1 -1
  517. package/assets/js/highcharts/esm/themes/dark-blue.js +9 -1
  518. package/assets/js/highcharts/esm/themes/dark-blue.src.js +1 -1
  519. package/assets/js/highcharts/esm/themes/dark-green.js +9 -1
  520. package/assets/js/highcharts/esm/themes/dark-green.src.js +1 -1
  521. package/assets/js/highcharts/esm/themes/dark-unica.js +9 -1
  522. package/assets/js/highcharts/esm/themes/dark-unica.src.js +1 -1
  523. package/assets/js/highcharts/esm/themes/gray.js +9 -1
  524. package/assets/js/highcharts/esm/themes/gray.src.js +1 -1
  525. package/assets/js/highcharts/esm/themes/grid-light.js +9 -1
  526. package/assets/js/highcharts/esm/themes/grid-light.src.js +1 -1
  527. package/assets/js/highcharts/esm/themes/grid.js +9 -1
  528. package/assets/js/highcharts/esm/themes/grid.src.js +1 -1
  529. package/assets/js/highcharts/esm/themes/high-contrast-dark.js +9 -1
  530. package/assets/js/highcharts/esm/themes/high-contrast-dark.src.js +1 -1
  531. package/assets/js/highcharts/esm/themes/high-contrast-light.js +9 -1
  532. package/assets/js/highcharts/esm/themes/high-contrast-light.src.js +1 -1
  533. package/assets/js/highcharts/esm/themes/sand-signika.js +9 -1
  534. package/assets/js/highcharts/esm/themes/sand-signika.src.js +1 -1
  535. package/assets/js/highcharts/esm/themes/skies.js +9 -1
  536. package/assets/js/highcharts/esm/themes/skies.src.js +1 -1
  537. package/assets/js/highcharts/esm/themes/sunset.js +9 -1
  538. package/assets/js/highcharts/esm/themes/sunset.src.js +1 -1
  539. package/assets/js/highcharts/highcharts-3d.js +11 -1
  540. package/assets/js/highcharts/highcharts-3d.src.js +3 -1
  541. package/assets/js/highcharts/highcharts-gantt.js +16 -2
  542. package/assets/js/highcharts/highcharts-gantt.src.js +173 -107
  543. package/assets/js/highcharts/highcharts-more.js +9 -1
  544. package/assets/js/highcharts/highcharts-more.src.js +44 -29
  545. package/assets/js/highcharts/highcharts.js +9 -2
  546. package/assets/js/highcharts/highcharts.src.js +138 -80
  547. package/assets/js/highcharts/highmaps.js +16 -2
  548. package/assets/js/highcharts/highmaps.src.js +145 -88
  549. package/assets/js/highcharts/highstock.js +16 -2
  550. package/assets/js/highcharts/highstock.src.js +172 -106
  551. package/assets/js/highcharts/i18n/fr-FR.js +13 -1
  552. package/assets/js/highcharts/i18n/fr-FR.src.js +8 -8
  553. package/assets/js/highcharts/i18n/nb-NO.js +13 -1
  554. package/assets/js/highcharts/i18n/nb-NO.src.js +8 -8
  555. package/assets/js/highcharts/i18n/zh-CN.js +13 -1
  556. package/assets/js/highcharts/i18n/zh-CN.src.js +8 -8
  557. package/assets/js/highcharts/indicators/acceleration-bands.js +12 -1
  558. package/assets/js/highcharts/indicators/acceleration-bands.src.js +1 -1
  559. package/assets/js/highcharts/indicators/accumulation-distribution.js +12 -1
  560. package/assets/js/highcharts/indicators/accumulation-distribution.src.js +1 -1
  561. package/assets/js/highcharts/indicators/ao.js +12 -1
  562. package/assets/js/highcharts/indicators/ao.src.js +1 -1
  563. package/assets/js/highcharts/indicators/apo.js +12 -1
  564. package/assets/js/highcharts/indicators/apo.src.js +1 -1
  565. package/assets/js/highcharts/indicators/aroon-oscillator.js +12 -1
  566. package/assets/js/highcharts/indicators/aroon-oscillator.src.js +1 -1
  567. package/assets/js/highcharts/indicators/aroon.js +12 -1
  568. package/assets/js/highcharts/indicators/aroon.src.js +1 -1
  569. package/assets/js/highcharts/indicators/atr.js +12 -1
  570. package/assets/js/highcharts/indicators/atr.src.js +1 -1
  571. package/assets/js/highcharts/indicators/bollinger-bands.js +12 -1
  572. package/assets/js/highcharts/indicators/bollinger-bands.src.js +1 -1
  573. package/assets/js/highcharts/indicators/cci.js +12 -1
  574. package/assets/js/highcharts/indicators/cci.src.js +1 -1
  575. package/assets/js/highcharts/indicators/chaikin.js +12 -1
  576. package/assets/js/highcharts/indicators/chaikin.src.js +1 -1
  577. package/assets/js/highcharts/indicators/cmf.js +11 -1
  578. package/assets/js/highcharts/indicators/cmf.src.js +1 -1
  579. package/assets/js/highcharts/indicators/cmo.js +12 -1
  580. package/assets/js/highcharts/indicators/cmo.src.js +1 -1
  581. package/assets/js/highcharts/indicators/dema.js +12 -1
  582. package/assets/js/highcharts/indicators/dema.src.js +1 -1
  583. package/assets/js/highcharts/indicators/disparity-index.js +12 -1
  584. package/assets/js/highcharts/indicators/disparity-index.src.js +1 -1
  585. package/assets/js/highcharts/indicators/dmi.js +12 -1
  586. package/assets/js/highcharts/indicators/dmi.src.js +1 -1
  587. package/assets/js/highcharts/indicators/dpo.js +12 -1
  588. package/assets/js/highcharts/indicators/dpo.src.js +1 -1
  589. package/assets/js/highcharts/indicators/ema.src.js +3 -3
  590. package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.js +12 -1
  591. package/assets/js/highcharts/indicators/ichimoku-kinko-hyo.src.js +1 -1
  592. package/assets/js/highcharts/indicators/indicators-all.js +12 -1
  593. package/assets/js/highcharts/indicators/indicators-all.src.js +1 -1
  594. package/assets/js/highcharts/indicators/indicators.js +12 -1
  595. package/assets/js/highcharts/indicators/indicators.src.js +1 -1
  596. package/assets/js/highcharts/indicators/keltner-channels.js +12 -1
  597. package/assets/js/highcharts/indicators/keltner-channels.src.js +1 -1
  598. package/assets/js/highcharts/indicators/klinger.js +12 -1
  599. package/assets/js/highcharts/indicators/klinger.src.js +1 -1
  600. package/assets/js/highcharts/indicators/macd.js +12 -1
  601. package/assets/js/highcharts/indicators/macd.src.js +1 -1
  602. package/assets/js/highcharts/indicators/mfi.js +12 -1
  603. package/assets/js/highcharts/indicators/mfi.src.js +1 -1
  604. package/assets/js/highcharts/indicators/momentum.js +12 -1
  605. package/assets/js/highcharts/indicators/momentum.src.js +1 -1
  606. package/assets/js/highcharts/indicators/natr.js +12 -1
  607. package/assets/js/highcharts/indicators/natr.src.js +1 -1
  608. package/assets/js/highcharts/indicators/obv.js +12 -1
  609. package/assets/js/highcharts/indicators/obv.src.js +1 -1
  610. package/assets/js/highcharts/indicators/pivot-points.js +12 -1
  611. package/assets/js/highcharts/indicators/pivot-points.src.js +1 -1
  612. package/assets/js/highcharts/indicators/ppo.js +12 -1
  613. package/assets/js/highcharts/indicators/ppo.src.js +1 -1
  614. package/assets/js/highcharts/indicators/price-channel.js +12 -1
  615. package/assets/js/highcharts/indicators/price-channel.src.js +1 -1
  616. package/assets/js/highcharts/indicators/price-envelopes.js +12 -1
  617. package/assets/js/highcharts/indicators/price-envelopes.src.js +1 -1
  618. package/assets/js/highcharts/indicators/psar.js +12 -1
  619. package/assets/js/highcharts/indicators/psar.src.js +1 -1
  620. package/assets/js/highcharts/indicators/regressions.js +12 -1
  621. package/assets/js/highcharts/indicators/regressions.src.js +1 -1
  622. package/assets/js/highcharts/indicators/roc.js +12 -1
  623. package/assets/js/highcharts/indicators/roc.src.js +1 -1
  624. package/assets/js/highcharts/indicators/rsi.js +12 -1
  625. package/assets/js/highcharts/indicators/rsi.src.js +1 -1
  626. package/assets/js/highcharts/indicators/slow-stochastic.js +12 -1
  627. package/assets/js/highcharts/indicators/slow-stochastic.src.js +1 -1
  628. package/assets/js/highcharts/indicators/stochastic.js +12 -1
  629. package/assets/js/highcharts/indicators/stochastic.src.js +1 -1
  630. package/assets/js/highcharts/indicators/supertrend.js +12 -1
  631. package/assets/js/highcharts/indicators/supertrend.src.js +1 -1
  632. package/assets/js/highcharts/indicators/tema.js +12 -1
  633. package/assets/js/highcharts/indicators/tema.src.js +1 -1
  634. package/assets/js/highcharts/indicators/trendline.js +12 -1
  635. package/assets/js/highcharts/indicators/trendline.src.js +1 -1
  636. package/assets/js/highcharts/indicators/trix.js +12 -1
  637. package/assets/js/highcharts/indicators/trix.src.js +1 -1
  638. package/assets/js/highcharts/indicators/volume-by-price.js +12 -1
  639. package/assets/js/highcharts/indicators/volume-by-price.src.js +1 -1
  640. package/assets/js/highcharts/indicators/vwap.js +12 -1
  641. package/assets/js/highcharts/indicators/vwap.src.js +1 -1
  642. package/assets/js/highcharts/indicators/williams-r.js +12 -1
  643. package/assets/js/highcharts/indicators/williams-r.src.js +1 -1
  644. package/assets/js/highcharts/indicators/wma.js +12 -1
  645. package/assets/js/highcharts/indicators/wma.src.js +1 -1
  646. package/assets/js/highcharts/indicators/zigzag.js +12 -1
  647. package/assets/js/highcharts/indicators/zigzag.src.js +1 -1
  648. package/assets/js/highcharts/modules/accessibility.js +12 -1
  649. package/assets/js/highcharts/modules/accessibility.src.js +46 -43
  650. package/assets/js/highcharts/modules/annotations-advanced.js +21 -1
  651. package/assets/js/highcharts/modules/annotations-advanced.src.js +879 -788
  652. package/assets/js/highcharts/modules/annotations.js +11 -1
  653. package/assets/js/highcharts/modules/annotations.src.js +89 -40
  654. package/assets/js/highcharts/modules/arc-diagram.js +11 -1
  655. package/assets/js/highcharts/modules/arc-diagram.src.js +1 -1
  656. package/assets/js/highcharts/modules/arrow-symbols.js +11 -1
  657. package/assets/js/highcharts/modules/arrow-symbols.src.js +1 -1
  658. package/assets/js/highcharts/modules/boost-canvas.js +12 -1
  659. package/assets/js/highcharts/modules/boost-canvas.src.js +23 -4
  660. package/assets/js/highcharts/modules/boost.js +13 -1
  661. package/assets/js/highcharts/modules/boost.src.js +23 -4
  662. package/assets/js/highcharts/modules/broken-axis.js +9 -1
  663. package/assets/js/highcharts/modules/broken-axis.src.js +1 -1
  664. package/assets/js/highcharts/modules/bullet.js +11 -1
  665. package/assets/js/highcharts/modules/bullet.src.js +1 -1
  666. package/assets/js/highcharts/modules/coloraxis.js +11 -1
  667. package/assets/js/highcharts/modules/coloraxis.src.js +1 -1
  668. package/assets/js/highcharts/modules/current-date-indicator.js +11 -1
  669. package/assets/js/highcharts/modules/current-date-indicator.src.js +1 -1
  670. package/assets/js/highcharts/modules/cylinder.js +12 -1
  671. package/assets/js/highcharts/modules/cylinder.src.js +1 -1
  672. package/assets/js/highcharts/modules/data-tools.js +11 -1
  673. package/assets/js/highcharts/modules/data-tools.src.js +225 -69
  674. package/assets/js/highcharts/modules/data.js +11 -1
  675. package/assets/js/highcharts/modules/data.src.js +46 -39
  676. package/assets/js/highcharts/modules/datagrouping.js +11 -1
  677. package/assets/js/highcharts/modules/datagrouping.src.js +1 -1
  678. package/assets/js/highcharts/modules/debugger.js +11 -1
  679. package/assets/js/highcharts/modules/debugger.src.js +1 -1
  680. package/assets/js/highcharts/modules/dependency-wheel.js +12 -1
  681. package/assets/js/highcharts/modules/dependency-wheel.src.js +1 -1
  682. package/assets/js/highcharts/modules/dotplot.js +11 -1
  683. package/assets/js/highcharts/modules/dotplot.src.js +1 -1
  684. package/assets/js/highcharts/modules/drag-panes.js +13 -1
  685. package/assets/js/highcharts/modules/drag-panes.src.js +1 -1
  686. package/assets/js/highcharts/modules/draggable-points.js +9 -1
  687. package/assets/js/highcharts/modules/draggable-points.src.js +1 -1
  688. package/assets/js/highcharts/modules/drilldown.js +13 -1
  689. package/assets/js/highcharts/modules/drilldown.src.js +3 -1
  690. package/assets/js/highcharts/modules/dumbbell.js +9 -1
  691. package/assets/js/highcharts/modules/dumbbell.src.js +1 -1
  692. package/assets/js/highcharts/modules/export-data.js +12 -1
  693. package/assets/js/highcharts/modules/export-data.src.js +996 -803
  694. package/assets/js/highcharts/modules/exporting.js +11 -1
  695. package/assets/js/highcharts/modules/exporting.src.js +1372 -636
  696. package/assets/js/highcharts/modules/flowmap.js +9 -1
  697. package/assets/js/highcharts/modules/flowmap.src.js +1 -1
  698. package/assets/js/highcharts/modules/full-screen.js +12 -1
  699. package/assets/js/highcharts/modules/full-screen.src.js +3 -3
  700. package/assets/js/highcharts/modules/funnel.js +11 -1
  701. package/assets/js/highcharts/modules/funnel.src.js +1 -1
  702. package/assets/js/highcharts/modules/funnel3d.js +13 -1
  703. package/assets/js/highcharts/modules/funnel3d.src.js +1 -1
  704. package/assets/js/highcharts/modules/gantt.js +31 -1
  705. package/assets/js/highcharts/modules/gantt.src.js +36 -28
  706. package/assets/js/highcharts/modules/geoheatmap.js +9 -1
  707. package/assets/js/highcharts/modules/geoheatmap.src.js +1 -1
  708. package/assets/js/highcharts/modules/grid-axis.js +11 -1
  709. package/assets/js/highcharts/modules/grid-axis.src.js +1 -1
  710. package/assets/js/highcharts/modules/heatmap.js +19 -1
  711. package/assets/js/highcharts/modules/heatmap.src.js +3 -4
  712. package/assets/js/highcharts/modules/heikinashi.js +12 -1
  713. package/assets/js/highcharts/modules/heikinashi.src.js +1 -1
  714. package/assets/js/highcharts/modules/histogram-bellcurve.js +10 -1
  715. package/assets/js/highcharts/modules/histogram-bellcurve.src.js +1 -1
  716. package/assets/js/highcharts/modules/hollowcandlestick.js +12 -1
  717. package/assets/js/highcharts/modules/hollowcandlestick.src.js +1 -1
  718. package/assets/js/highcharts/modules/item-series.js +11 -1
  719. package/assets/js/highcharts/modules/item-series.src.js +3 -5
  720. package/assets/js/highcharts/modules/lollipop.js +9 -1
  721. package/assets/js/highcharts/modules/lollipop.src.js +1 -1
  722. package/assets/js/highcharts/modules/map.js +21 -1
  723. package/assets/js/highcharts/modules/map.src.js +6 -7
  724. package/assets/js/highcharts/modules/marker-clusters.js +11 -1
  725. package/assets/js/highcharts/modules/marker-clusters.src.js +1 -1
  726. package/assets/js/highcharts/modules/mouse-wheel-zoom.js +11 -1
  727. package/assets/js/highcharts/modules/mouse-wheel-zoom.src.js +1 -1
  728. package/assets/js/highcharts/modules/navigator.js +11 -1
  729. package/assets/js/highcharts/modules/navigator.src.js +10 -12
  730. package/assets/js/highcharts/modules/networkgraph.js +11 -1
  731. package/assets/js/highcharts/modules/networkgraph.src.js +7 -2
  732. package/assets/js/highcharts/modules/no-data-to-display.js +12 -1
  733. package/assets/js/highcharts/modules/no-data-to-display.src.js +1 -1
  734. package/assets/js/highcharts/modules/non-cartesian-zoom.js +11 -0
  735. package/assets/js/highcharts/modules/non-cartesian-zoom.src.js +427 -0
  736. package/assets/js/highcharts/modules/offline-exporting.js +12 -1
  737. package/assets/js/highcharts/modules/offline-exporting.src.js +353 -3380
  738. package/assets/js/highcharts/modules/organization.js +11 -1
  739. package/assets/js/highcharts/modules/organization.src.js +1 -1
  740. package/assets/js/highcharts/modules/parallel-coordinates.js +11 -1
  741. package/assets/js/highcharts/modules/parallel-coordinates.src.js +1 -1
  742. package/assets/js/highcharts/modules/pareto.js +11 -1
  743. package/assets/js/highcharts/modules/pareto.src.js +1 -1
  744. package/assets/js/highcharts/modules/pathfinder.js +11 -1
  745. package/assets/js/highcharts/modules/pathfinder.src.js +1 -1
  746. package/assets/js/highcharts/modules/pattern-fill.js +12 -1
  747. package/assets/js/highcharts/modules/pattern-fill.src.js +1 -1
  748. package/assets/js/highcharts/modules/pictorial.js +11 -1
  749. package/assets/js/highcharts/modules/pictorial.src.js +1 -1
  750. package/assets/js/highcharts/modules/pointandfigure.js +12 -1
  751. package/assets/js/highcharts/modules/pointandfigure.src.js +1 -1
  752. package/assets/js/highcharts/modules/price-indicator.js +13 -1
  753. package/assets/js/highcharts/modules/price-indicator.src.js +1 -1
  754. package/assets/js/highcharts/modules/pyramid3d.js +14 -1
  755. package/assets/js/highcharts/modules/pyramid3d.src.js +1 -1
  756. package/assets/js/highcharts/modules/renko.js +12 -1
  757. package/assets/js/highcharts/modules/renko.src.js +1 -1
  758. package/assets/js/highcharts/modules/sankey.js +11 -1
  759. package/assets/js/highcharts/modules/sankey.src.js +1 -1
  760. package/assets/js/highcharts/modules/series-label.js +9 -1
  761. package/assets/js/highcharts/modules/series-label.src.js +1 -1
  762. package/assets/js/highcharts/modules/series-on-point.js +12 -1
  763. package/assets/js/highcharts/modules/series-on-point.src.js +1 -1
  764. package/assets/js/highcharts/modules/solid-gauge.js +12 -1
  765. package/assets/js/highcharts/modules/solid-gauge.src.js +8 -3
  766. package/assets/js/highcharts/modules/sonification.js +12 -1
  767. package/assets/js/highcharts/modules/sonification.src.js +42 -9
  768. package/assets/js/highcharts/modules/static-scale.js +11 -1
  769. package/assets/js/highcharts/modules/static-scale.src.js +1 -1
  770. package/assets/js/highcharts/modules/stock-tools.js +13 -1
  771. package/assets/js/highcharts/modules/stock-tools.src.js +37 -116
  772. package/assets/js/highcharts/modules/stock.js +29 -1
  773. package/assets/js/highcharts/modules/stock.src.js +35 -27
  774. package/assets/js/highcharts/modules/streamgraph.js +11 -1
  775. package/assets/js/highcharts/modules/streamgraph.src.js +1 -1
  776. package/assets/js/highcharts/modules/sunburst.js +10 -1
  777. package/assets/js/highcharts/modules/sunburst.src.js +1 -1
  778. package/assets/js/highcharts/modules/textpath.js +9 -1
  779. package/assets/js/highcharts/modules/textpath.src.js +1 -1
  780. package/assets/js/highcharts/modules/tiledwebmap.js +10 -2
  781. package/assets/js/highcharts/modules/tiledwebmap.src.js +1 -1
  782. package/assets/js/highcharts/modules/tilemap.js +12 -1
  783. package/assets/js/highcharts/modules/tilemap.src.js +1 -1
  784. package/assets/js/highcharts/modules/timeline.js +12 -1
  785. package/assets/js/highcharts/modules/timeline.src.js +1 -1
  786. package/assets/js/highcharts/modules/treegraph.js +11 -1
  787. package/assets/js/highcharts/modules/treegraph.src.js +4 -2
  788. package/assets/js/highcharts/modules/treegrid.js +11 -1
  789. package/assets/js/highcharts/modules/treegrid.src.js +1 -1
  790. package/assets/js/highcharts/modules/treemap.js +10 -1
  791. package/assets/js/highcharts/modules/treemap.src.js +1 -1
  792. package/assets/js/highcharts/modules/variable-pie.js +11 -1
  793. package/assets/js/highcharts/modules/variable-pie.src.js +1 -1
  794. package/assets/js/highcharts/modules/variwide.js +11 -1
  795. package/assets/js/highcharts/modules/variwide.src.js +9 -2
  796. package/assets/js/highcharts/modules/vector.js +11 -1
  797. package/assets/js/highcharts/modules/vector.src.js +1 -1
  798. package/assets/js/highcharts/modules/venn.js +10 -1
  799. package/assets/js/highcharts/modules/venn.src.js +1 -1
  800. package/assets/js/highcharts/modules/windbarb.js +11 -1
  801. package/assets/js/highcharts/modules/windbarb.src.js +1 -1
  802. package/assets/js/highcharts/modules/wordcloud.js +10 -1
  803. package/assets/js/highcharts/modules/wordcloud.src.js +88 -11
  804. package/assets/js/highcharts/modules/xrange.js +11 -1
  805. package/assets/js/highcharts/modules/xrange.src.js +1 -1
  806. package/assets/js/highcharts/standalone-navigator.js +9 -2
  807. package/assets/js/highcharts/standalone-navigator.src.js +146 -90
  808. package/assets/js/highcharts/themes/adaptive.js +130 -0
  809. package/assets/js/highcharts/themes/adaptive.src.js +1122 -0
  810. package/assets/js/highcharts/themes/avocado.js +9 -1
  811. package/assets/js/highcharts/themes/avocado.src.js +1 -1
  812. package/assets/js/highcharts/themes/brand-dark.js +9 -1
  813. package/assets/js/highcharts/themes/brand-dark.src.js +1 -1
  814. package/assets/js/highcharts/themes/brand-light.js +9 -1
  815. package/assets/js/highcharts/themes/brand-light.src.js +1 -1
  816. package/assets/js/highcharts/themes/dark-blue.js +9 -1
  817. package/assets/js/highcharts/themes/dark-blue.src.js +1 -1
  818. package/assets/js/highcharts/themes/dark-green.js +9 -1
  819. package/assets/js/highcharts/themes/dark-green.src.js +1 -1
  820. package/assets/js/highcharts/themes/dark-unica.js +9 -1
  821. package/assets/js/highcharts/themes/dark-unica.src.js +1 -1
  822. package/assets/js/highcharts/themes/gray.js +9 -1
  823. package/assets/js/highcharts/themes/gray.src.js +1 -1
  824. package/assets/js/highcharts/themes/grid-light.js +9 -1
  825. package/assets/js/highcharts/themes/grid-light.src.js +1 -1
  826. package/assets/js/highcharts/themes/grid.js +9 -1
  827. package/assets/js/highcharts/themes/grid.src.js +1 -1
  828. package/assets/js/highcharts/themes/high-contrast-dark.js +9 -1
  829. package/assets/js/highcharts/themes/high-contrast-dark.src.js +1 -1
  830. package/assets/js/highcharts/themes/high-contrast-light.js +9 -1
  831. package/assets/js/highcharts/themes/high-contrast-light.src.js +1 -1
  832. package/assets/js/highcharts/themes/sand-signika.js +9 -1
  833. package/assets/js/highcharts/themes/sand-signika.src.js +1 -1
  834. package/assets/js/highcharts/themes/skies.js +9 -1
  835. package/assets/js/highcharts/themes/skies.src.js +1 -1
  836. package/assets/js/highcharts/themes/sunset.js +9 -1
  837. package/assets/js/highcharts/themes/sunset.src.js +1 -1
  838. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v12.2.0 (2025-04-07)
2
+ * @license Highcharts JS v12.3.0 (2025-06-21)
3
3
  * @module highcharts/modules/offline-exporting
4
4
  * @requires highcharts
5
5
  * @requires highcharts/modules/exporting
@@ -12,25 +12,18 @@
12
12
  */
13
13
  (function webpackUniversalModuleDefinition(root, factory) {
14
14
  if(typeof exports === 'object' && typeof module === 'object')
15
- module.exports = factory(root["_Highcharts"], root["_Highcharts"]["AST"], root["_Highcharts"]["Chart"], root["_Highcharts"]["HttpUtilities"]);
15
+ module.exports = factory(root["_Highcharts"], root["_Highcharts"]["AST"], root["_Highcharts"]["Chart"]);
16
16
  else if(typeof define === 'function' && define.amd)
17
- define("highcharts/modules/offline-exporting", ["highcharts/highcharts"], function (amd1) {return factory(amd1,amd1["AST"],amd1["Chart"],amd1["HttpUtilities"]);});
17
+ define("highcharts/modules/offline-exporting", ["highcharts/highcharts"], function (amd1) {return factory(amd1,amd1["AST"],amd1["Chart"]);});
18
18
  else if(typeof exports === 'object')
19
- exports["highcharts/modules/offline-exporting"] = factory(root["_Highcharts"], root["_Highcharts"]["AST"], root["_Highcharts"]["Chart"], root["_Highcharts"]["HttpUtilities"]);
19
+ exports["highcharts/modules/offline-exporting"] = factory(root["_Highcharts"], root["_Highcharts"]["AST"], root["_Highcharts"]["Chart"]);
20
20
  else
21
- root["Highcharts"] = factory(root["Highcharts"], root["Highcharts"]["AST"], root["Highcharts"]["Chart"], root["Highcharts"]["HttpUtilities"]);
22
- })(typeof window === 'undefined' ? this : window, (__WEBPACK_EXTERNAL_MODULE__944__, __WEBPACK_EXTERNAL_MODULE__660__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__156__) => {
21
+ root["Highcharts"] = factory(root["Highcharts"], root["Highcharts"]["AST"], root["Highcharts"]["Chart"]);
22
+ })(typeof window === 'undefined' ? this : window, (__WEBPACK_EXTERNAL_MODULE__944__, __WEBPACK_EXTERNAL_MODULE__660__, __WEBPACK_EXTERNAL_MODULE__960__) => {
23
23
  return /******/ (() => { // webpackBootstrap
24
24
  /******/ "use strict";
25
25
  /******/ var __webpack_modules__ = ({
26
26
 
27
- /***/ 156:
28
- /***/ ((module) => {
29
-
30
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
31
-
32
- /***/ }),
33
-
34
27
  /***/ 660:
35
28
  /***/ ((module) => {
36
29
 
@@ -139,6 +132,8 @@ var highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default
139
132
  * */
140
133
 
141
134
  const { isSafari, win, win: { document: doc } } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
135
+
136
+ const { error } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
142
137
  /* *
143
138
  *
144
139
  * Constants
@@ -152,12 +147,15 @@ const domurl = win.URL || win.webkitURL || win;
152
147
  * */
153
148
  /**
154
149
  * Convert base64 dataURL to Blob if supported, otherwise returns undefined.
150
+ *
155
151
  * @private
156
152
  * @function Highcharts.dataURLtoBlob
153
+ *
157
154
  * @param {string} dataURL
158
- * URL to convert
159
- * @return {string|undefined}
160
- * Blob
155
+ * URL to convert.
156
+ *
157
+ * @return {string | undefined}
158
+ * Blob.
161
159
  */
162
160
  function dataURLtoBlob(dataURL) {
163
161
  const parts = dataURL
@@ -184,11 +182,11 @@ function dataURLtoBlob(dataURL) {
184
182
  *
185
183
  * @private
186
184
  * @function Highcharts.downloadURL
187
- * @param {string|global.URL} dataURL
188
- * The dataURL/Blob to download
185
+ *
186
+ * @param {string | global.URL} dataURL
187
+ * The dataURL/Blob to download.
189
188
  * @param {string} filename
190
- * The name of the resulting file (w/extension)
191
- * @return {void}
189
+ * The name of the resulting file (w/extension).
192
190
  */
193
191
  function downloadURL(dataURL, filename) {
194
192
  const nav = win.navigator, a = doc.createElement('a');
@@ -238,6 +236,33 @@ function downloadURL(dataURL, filename) {
238
236
  }
239
237
  }
240
238
  }
239
+ /**
240
+ * Asynchronously downloads a script from a provided location.
241
+ *
242
+ * @private
243
+ * @function Highcharts.getScript
244
+ *
245
+ * @param {string} scriptLocation
246
+ * The location for the script to fetch.
247
+ */
248
+ function getScript(scriptLocation) {
249
+ return new Promise((resolve, reject) => {
250
+ const head = doc.getElementsByTagName('head')[0], script = doc.createElement('script');
251
+ // Set type and location for the script
252
+ script.type = 'text/javascript';
253
+ script.src = scriptLocation;
254
+ // Resolve in case of a succesful script fetching
255
+ script.onload = () => {
256
+ resolve();
257
+ };
258
+ // Reject in case of fail
259
+ script.onerror = () => {
260
+ reject(error(`Error loading script ${scriptLocation}`));
261
+ };
262
+ // Append the newly created script
263
+ head.appendChild(script);
264
+ });
265
+ }
241
266
  /* *
242
267
  *
243
268
  * Default Export
@@ -245,7 +270,8 @@ function downloadURL(dataURL, filename) {
245
270
  * */
246
271
  const DownloadURL = {
247
272
  dataURLtoBlob,
248
- downloadURL
273
+ downloadURL,
274
+ getScript
249
275
  };
250
276
  /* harmony default export */ const Extensions_DownloadURL = (DownloadURL);
251
277
 
@@ -254,10 +280,11 @@ var highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcha
254
280
  var highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default = /*#__PURE__*/__webpack_require__.n(highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_);
255
281
  // EXTERNAL MODULE: external {"amd":["highcharts/highcharts","Chart"],"commonjs":["highcharts","Chart"],"commonjs2":["highcharts","Chart"],"root":["Highcharts","Chart"]}
256
282
  var highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_ = __webpack_require__(960);
257
- ;// ./code/es-modules/Core/Chart/ChartNavigationComposition.js
258
- /**
283
+ var highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_default = /*#__PURE__*/__webpack_require__.n(highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_);
284
+ ;// ./code/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js
285
+ /* *
259
286
  *
260
- * (c) 2010-2025 Paweł Fus
287
+ * (c) 2010-2025 Torstein Honsi
261
288
  *
262
289
  * License: www.highcharts.com/license
263
290
  *
@@ -267,89 +294,30 @@ var highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_H
267
294
 
268
295
  /* *
269
296
  *
270
- * Composition
297
+ * API Options
271
298
  *
272
299
  * */
273
- var ChartNavigationComposition;
274
- (function (ChartNavigationComposition) {
275
- /* *
276
- *
277
- * Declarations
278
- *
279
- * */
280
- /* *
281
- *
282
- * Functions
283
- *
284
- * */
285
- /* eslint-disable valid-jsdoc */
286
- /**
287
- * @private
288
- */
289
- function compose(chart) {
290
- if (!chart.navigation) {
291
- chart.navigation = new Additions(chart);
292
- }
293
- return chart;
294
- }
295
- ChartNavigationComposition.compose = compose;
296
- /* *
297
- *
298
- * Class
299
- *
300
- * */
301
- /**
302
- * Initializes `chart.navigation` object which delegates `update()` methods
303
- * to all other common classes (used in exporting and navigationBindings).
304
- * @private
305
- */
306
- class Additions {
307
- /* *
308
- *
309
- * Constructor
310
- *
311
- * */
312
- constructor(chart) {
313
- this.updates = [];
314
- this.chart = chart;
315
- }
316
- /* *
317
- *
318
- * Functions
319
- *
320
- * */
321
- /**
322
- * Registers an `update()` method in the `chart.navigation` object.
323
- *
324
- * @private
325
- * @param {UpdateFunction} updateFn
326
- * The `update()` method that will be called in `chart.update()`.
327
- */
328
- addUpdate(updateFn) {
329
- this.chart.navigation.updates.push(updateFn);
330
- }
331
- /**
332
- * @private
333
- */
334
- update(options, redraw) {
335
- this.updates.forEach((updateFn) => {
336
- updateFn.call(this.chart, options, redraw);
337
- });
338
- }
339
- }
340
- ChartNavigationComposition.Additions = Additions;
341
- })(ChartNavigationComposition || (ChartNavigationComposition = {}));
300
+ /**
301
+ * @optionparent exporting
302
+ * @private
303
+ */
304
+ const exporting = {};
342
305
  /* *
343
306
  *
344
307
  * Default Export
345
308
  *
346
309
  * */
347
- /* harmony default export */ const Chart_ChartNavigationComposition = (ChartNavigationComposition);
310
+ const OfflineExportingDefaults = {
311
+ exporting
312
+ };
313
+ /* harmony default export */ const OfflineExporting_OfflineExportingDefaults = (OfflineExportingDefaults);
348
314
 
349
- ;// ./code/es-modules/Extensions/Exporting/ExportingDefaults.js
315
+ ;// ./code/es-modules/Extensions/OfflineExporting/OfflineExporting.js
350
316
  /* *
351
317
  *
352
- * (c) 2010-2025 Torstein Honsi
318
+ * Client side exporting module
319
+ *
320
+ * (c) 2015 Torstein Honsi / Oystein Moseng
353
321
  *
354
322
  * License: www.highcharts.com/license
355
323
  *
@@ -358,3339 +326,342 @@ var ChartNavigationComposition;
358
326
  * */
359
327
 
360
328
 
361
- const { isTouchDevice } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
329
+
330
+
331
+ const { getOptions, setOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
332
+
333
+ const { downloadURL: OfflineExporting_downloadURL, getScript: OfflineExporting_getScript } = Extensions_DownloadURL;
334
+
335
+ const { composed, doc: OfflineExporting_doc, win: OfflineExporting_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
336
+
337
+
338
+ const { addEvent, extend, pushUnique } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
362
339
  /* *
363
340
  *
364
- * API Options
341
+ * Composition
365
342
  *
366
343
  * */
367
- // Add the export related options
368
- /**
369
- * Options for the exporting module. For an overview on the matter, see
370
- * [the docs](https://www.highcharts.com/docs/export-module/export-module-overview) and
371
- * read our [Fair Usage Policy](https://www.highcharts.com/docs/export-module/privacy-disclaimer-export).
372
- *
373
- * @requires modules/exporting
374
- * @optionparent exporting
375
- */
376
- const exporting = {
377
- /**
378
- * Experimental setting to allow HTML inside the chart (added through
379
- * the `useHTML` options), directly in the exported image. This allows
380
- * you to preserve complicated HTML structures like tables or bi-directional
381
- * text in exported charts.
382
- *
383
- * Disclaimer: The HTML is rendered in a `foreignObject` tag in the
384
- * generated SVG. The official export server is based on PhantomJS,
385
- * which supports this, but other SVG clients, like Batik, does not
386
- * support it. This also applies to downloaded SVG that you want to
387
- * open in a desktop client.
388
- *
389
- * @type {boolean}
390
- * @default false
391
- * @since 4.1.8
392
- * @apioption exporting.allowHTML
393
- */
394
- /**
395
- * Allows the end user to sort the data table by clicking on column headers.
396
- *
397
- * @since 10.3.3
398
- * @apioption exporting.allowTableSorting
399
- */
400
- allowTableSorting: true,
401
- /**
402
- * Allow exporting a chart retaining any user-applied CSS.
403
- *
404
- * Note that this is is default behavior in [styledMode](#chart.styledMode).
405
- *
406
- * @see [styledMode](#chart.styledMode)
407
- *
408
- * @sample {highcharts} highcharts/exporting/apply-stylesheets/
409
- *
410
- * @type {boolean}
411
- * @default false
412
- * @since 12.0.0
413
- * @apioption exporting.applyStyleSheets
414
- */
415
- /**
416
- * Additional chart options to be merged into the chart before exporting to
417
- * an image format. This does not apply to printing the chart via the export
418
- * menu.
419
- *
420
- * For example, a common use case is to add data labels to improve
421
- * readability of the exported chart, or to add a printer-friendly color
422
- * scheme to exported PDFs.
423
- *
424
- * @sample {highcharts} highcharts/exporting/chartoptions-data-labels/
425
- * Added data labels
426
- * @sample {highstock} highcharts/exporting/chartoptions-data-labels/
427
- * Added data labels
428
- *
429
- * @type {Highcharts.Options}
430
- * @apioption exporting.chartOptions
431
- */
432
- /**
433
- * Whether to enable the exporting module. Disabling the module will
434
- * hide the context button, but API methods will still be available.
344
+ var OfflineExporting;
345
+ (function (OfflineExporting) {
346
+ /* *
435
347
  *
436
- * @sample {highcharts} highcharts/exporting/enabled-false/
437
- * Exporting module is loaded but disabled
438
- * @sample {highstock} highcharts/exporting/enabled-false/
439
- * Exporting module is loaded but disabled
348
+ * Functions
440
349
  *
441
- * @type {boolean}
442
- * @default true
443
- * @since 2.0
444
- * @apioption exporting.enabled
445
- */
350
+ * */
446
351
  /**
447
- * Function to call if the offline-exporting module fails to export
448
- * a chart on the client side, and [fallbackToExportServer](
449
- * #exporting.fallbackToExportServer) is disabled. If left undefined, an
450
- * exception is thrown instead. Receives two parameters, the exporting
451
- * options, and the error from the module.
352
+ * Composition function.
452
353
  *
453
- * @see [fallbackToExportServer](#exporting.fallbackToExportServer)
354
+ * @private
355
+ * @function compose
454
356
  *
455
- * @type {Highcharts.ExportingErrorCallbackFunction}
456
- * @since 5.0.0
457
- * @requires modules/exporting
458
- * @requires modules/offline-exporting
459
- * @apioption exporting.error
460
- */
461
- /**
462
- * Whether or not to fall back to the export server if the offline-exporting
463
- * module is unable to export the chart on the client side. This happens for
464
- * certain browsers, and certain features (e.g.
465
- * [allowHTML](#exporting.allowHTML)), depending on the image type exporting
466
- * to. For very complex charts, it is possible that export can fail in
467
- * browsers that don't support Blob objects, due to data URL length limits.
468
- * It is recommended to define the [exporting.error](#exporting.error)
469
- * handler if disabling fallback, in order to notify users in case export
470
- * fails.
357
+ * @param {ExportingClass} ExportingClass
358
+ * Exporting class.
471
359
  *
472
- * @type {boolean}
473
- * @default true
474
- * @since 4.1.8
475
- * @requires modules/exporting
476
- * @requires modules/offline-exporting
477
- * @apioption exporting.fallbackToExportServer
360
+ * @requires modules/exporting
361
+ * @requires modules/offline-exporting
478
362
  */
363
+ function compose(ExportingClass) {
364
+ // Add the downloadSVG event to the Exporting class for local PDF export
365
+ addEvent(ExportingClass, 'downloadSVG', async function (e) {
366
+ const { svg, exportingOptions, exporting, preventDefault } = e;
367
+ // Check if PDF export is requested
368
+ if (exportingOptions?.type === 'application/pdf') {
369
+ // Prevent the default export behavior
370
+ preventDefault?.();
371
+ // Run the PDF local export
372
+ try {
373
+ // Get the final image options
374
+ const { type, filename, scale, libURL } = highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().Exporting.prepareImageOptions(exportingOptions);
375
+ // Local PDF download
376
+ if (type === 'application/pdf') {
377
+ // Must load pdf libraries first if not found. Don't
378
+ // destroy the object URL yet since we are doing
379
+ // things asynchronously
380
+ if (!OfflineExporting_win.jspdf?.jsPDF) {
381
+ // Get jspdf
382
+ await OfflineExporting_getScript(`${libURL}jspdf.js`);
383
+ // Get svg2pdf
384
+ await OfflineExporting_getScript(`${libURL}svg2pdf.js`);
385
+ }
386
+ // Call the PDF download if SVG element found
387
+ await downloadPDF(svg, scale, filename, exportingOptions?.pdfFont);
388
+ }
389
+ }
390
+ catch (error) {
391
+ // Try to fallback to the server
392
+ await exporting?.fallbackToServer(exportingOptions, error);
393
+ }
394
+ }
395
+ });
396
+ // Check the composition registry for the OfflineExporting
397
+ if (!pushUnique(composed, 'OfflineExporting')) {
398
+ return;
399
+ }
400
+ // Adding wrappers for the deprecated functions
401
+ extend((highcharts_Chart_commonjs_highcharts_Chart_commonjs2_highcharts_Chart_root_Highcharts_Chart_default()).prototype, {
402
+ exportChartLocal: async function (exportingOptions, chartOptions) {
403
+ await this.exporting?.exportChart(exportingOptions, chartOptions);
404
+ return;
405
+ }
406
+ });
407
+ // Update with defaults of the offline exporting module
408
+ setOptions(OfflineExporting_OfflineExportingDefaults);
409
+ // Additionaly, extend the menuItems with the offline exporting variants
410
+ const menuItems = getOptions().exporting?.buttons?.contextButton?.menuItems;
411
+ menuItems && menuItems.push('downloadPDF');
412
+ }
413
+ OfflineExporting.compose = compose;
479
414
  /**
480
- * The filename, without extension, to use for the exported chart.
481
- *
482
- * @sample {highcharts} highcharts/exporting/filename/
483
- * Custom file name
484
- * @sample {highstock} highcharts/exporting/filename/
485
- * Custom file name
415
+ * Get data URL to an image of an SVG and call download on it options
416
+ * object:
417
+ * - **filename:** Name of resulting downloaded file without extension.
418
+ * Default is `chart`.
486
419
  *
487
- * @type {string}
488
- * @default chart
489
- * @since 2.0
490
- * @apioption exporting.filename
491
- */
492
- /**
493
- * Highcharts v11.2.0 and older. An object containing additional key value
494
- * data for the POST form that sends the SVG to the export server. For
495
- * example, a `target` can be set to make sure the generated image is
496
- * received in another frame, or a custom `enctype` or `encoding` can be
497
- * set.
420
+ * - **type:** File type of resulting download. Default is `image/png`.
498
421
  *
499
- * With Highcharts v11.3.0, the `fetch` API replaced the old HTML form. To
500
- * modify the request, now use [fetchOptions](#exporting.fetchOptions)
501
- * instead.
422
+ * - **scale:** Scaling factor of downloaded image compared to source.
423
+ * Default is `1`.
424
+ * - **libURL:** URL pointing to location of dependency scripts to download
425
+ * on demand. Default is the exporting.libURL option of the global
426
+ * Highcharts options pointing to our server.
502
427
  *
428
+ * @function Highcharts.downloadSVGLocal
503
429
  * @deprecated
504
- * @type {Highcharts.HTMLAttributes}
505
- * @since 3.0.8
506
- * @apioption exporting.formAttributes
507
- */
508
- /**
509
- * Options for the fetch request used when sending the SVG to the export
510
- * server.
511
- *
512
- * See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch)
513
- * for more information
514
- *
515
- * @type {Object}
516
- * @since 11.3.0
517
- * @apioption exporting.fetchOptions
518
- */
519
- /**
520
- * Path where Highcharts will look for export module dependencies to
521
- * load on demand if they don't already exist on `window`. Should currently
522
- * point to location of [CanVG](https://github.com/canvg/canvg) library,
523
- * [jsPDF](https://github.com/parallax/jsPDF) and
524
- * [svg2pdf.js](https://github.com/yWorks/svg2pdf.js), required for client
525
- * side export in certain browsers.
526
- *
527
- * @type {string}
528
- * @default https://code.highcharts.com/{version}/lib
529
- * @since 5.0.0
530
- * @apioption exporting.libURL
531
- */
532
- /**
533
- * Analogous to [sourceWidth](#exporting.sourceWidth).
534
- *
535
- * @type {number}
536
- * @since 3.0
537
- * @apioption exporting.sourceHeight
538
- */
539
- /**
540
- * The width of the original chart when exported, unless an explicit
541
- * [chart.width](#chart.width) is set, or a pixel width is set on the
542
- * container. The width exported raster image is then multiplied by
543
- * [scale](#exporting.scale).
544
- *
545
- * @sample {highcharts} highcharts/exporting/sourcewidth/
546
- * Source size demo
547
- * @sample {highstock} highcharts/exporting/sourcewidth/
548
- * Source size demo
549
- * @sample {highmaps} maps/exporting/sourcewidth/
550
- * Source size demo
551
- *
552
- * @type {number}
553
- * @since 3.0
554
- * @apioption exporting.sourceWidth
555
- */
556
- /**
557
- * The pixel width of charts exported to PNG or JPG. As of Highcharts
558
- * 3.0, the default pixel width is a function of the [chart.width](
559
- * #chart.width) or [exporting.sourceWidth](#exporting.sourceWidth) and the
560
- * [exporting.scale](#exporting.scale).
561
- *
562
- * @sample {highcharts} highcharts/exporting/width/
563
- * Export to 200px wide images
564
- * @sample {highstock} highcharts/exporting/width/
565
- * Export to 200px wide images
566
- *
567
- * @type {number}
568
- * @since 2.0
569
- * @apioption exporting.width
570
- */
571
- /**
572
- * Default MIME type for exporting if `chart.exportChart()` is called
573
- * without specifying a `type` option. Possible values are `image/png`,
574
- * `image/jpeg`, `application/pdf` and `image/svg+xml`.
575
- *
576
- * @type {Highcharts.ExportingMimeTypeValue}
577
- * @since 2.0
578
- */
579
- type: 'image/png',
580
- /**
581
- * The URL for the server module converting the SVG string to an image
582
- * format. By default this points to Highchart's free web service.
583
- *
584
- * @since 2.0
585
- */
586
- url: `https://export-svg.highcharts.com?v=${(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).version}`,
587
- /**
588
- * Settings for a custom font for the exported PDF, when using the
589
- * `offline-exporting` module. This is used for languages containing
590
- * non-ASCII characters, like Chinese, Russian, Japanese etc.
591
- *
592
- * As described in the [jsPDF
593
- * docs](https://github.com/parallax/jsPDF#use-of-unicode-characters--utf-8),
594
- * the 14 standard fonts in PDF are limited to the ASCII-codepage.
595
- * Therefore, in order to support other text in the exported PDF, one or
596
- * more TTF font files have to be passed on to the exporting module.
597
430
  *
598
- * See more in [the
599
- * docs](https://www.highcharts.com/docs/export-module/client-side-export).
600
- *
601
- * @sample {highcharts} highcharts/exporting/offline-download-pdffont/
602
- * Download PDF in a language containing non-Latin characters.
431
+ * @param {string} svg
432
+ * The generated SVG
603
433
  *
604
- * @since 10.0.0
605
- * @requires modules/offline-exporting
606
- */
607
- pdfFont: {
608
- /**
609
- * The TTF font file for normal `font-style`. If font variations like
610
- * `bold` or `italic` are not defined, the `normal` font will be used
611
- * for those too.
612
- *
613
- * @type string|undefined
614
- */
615
- normal: void 0,
616
- /**
617
- * The TTF font file for bold text.
618
- *
619
- * @type string|undefined
620
- */
621
- bold: void 0,
622
- /**
623
- * The TTF font file for bold and italic text.
624
- *
625
- * @type string|undefined
626
- */
627
- bolditalic: void 0,
628
- /**
629
- * The TTF font file for italic text.
630
- *
631
- * @type string|undefined
632
- */
633
- italic: void 0
634
- },
635
- /**
636
- * When printing the chart from the menu item in the burger menu, if
637
- * the on-screen chart exceeds this width, it is resized. After printing
638
- * or cancelled, it is restored. The default width makes the chart
639
- * fit into typical paper format. Note that this does not affect the
640
- * chart when printing the web page as a whole.
434
+ * @param {Highcharts.ExportingOptions} options
435
+ * The exporting options
641
436
  *
642
- * @since 4.2.5
643
437
  */
644
- printMaxWidth: 780,
438
+ async function downloadSVGLocal(svg, options) {
439
+ await highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().Exporting.prototype.downloadSVG.call(void 0, svg, options);
440
+ }
441
+ OfflineExporting.downloadSVGLocal = downloadSVGLocal;
645
442
  /**
646
- * Defines the scale or zoom factor for the exported image compared
647
- * to the on-screen display. While for instance a 600px wide chart
648
- * may look good on a website, it will look bad in print. The default
649
- * scale of 2 makes this chart export to a 1200px PNG or JPG.
443
+ * Converts an SVG string into a PDF file and triggers its download. This
444
+ * function processes the SVG, applies necessary font adjustments, converts
445
+ * it to a PDF, and initiates the file download.
650
446
  *
651
- * @see [chart.width](#chart.width)
652
- * @see [exporting.sourceWidth](#exporting.sourceWidth)
447
+ * @private
448
+ * @async
449
+ * @function downloadPDF
653
450
  *
654
- * @sample {highcharts} highcharts/exporting/scale/
655
- * Scale demonstrated
656
- * @sample {highstock} highcharts/exporting/scale/
657
- * Scale demonstrated
658
- * @sample {highmaps} maps/exporting/scale/
659
- * Scale demonstrated
451
+ * @param {string} svg
452
+ * A string representation of the SVG markup to be converted into a PDF.
453
+ * @param {number} scale
454
+ * The scaling factor for the PDF output.
455
+ * @param {string} filename
456
+ * The name of the downloaded PDF file.
457
+ * @param {Highcharts.PdfFontOptions} [pdfFont]
458
+ * An optional object specifying URLs for different font variants (normal,
459
+ * bold, italic, bolditalic).
660
460
  *
661
- * @since 3.0
662
- */
663
- scale: 2,
664
- /**
665
- * Options for the export related buttons, print and export. In addition
666
- * to the default buttons listed here, custom buttons can be added.
667
- * See [navigation.buttonOptions](#navigation.buttonOptions) for general
668
- * options.
461
+ * @return {Promise<void>}
462
+ * A promise that resolves when the PDF has been successfully generated and
463
+ * downloaded.
669
464
  *
670
- * @type {Highcharts.Dictionary<*>}
671
465
  * @requires modules/exporting
466
+ * @requires modules/offline-exporting
672
467
  */
673
- buttons: {
674
- /**
675
- * Options for the export button.
676
- *
677
- * In styled mode, export button styles can be applied with the
678
- * `.highcharts-contextbutton` class.
679
- *
680
- * @declare Highcharts.ExportingButtonsOptionsObject
681
- * @extends navigation.buttonOptions
682
- * @requires modules/exporting
683
- */
684
- contextButton: {
685
- /**
686
- * A click handler callback to use on the button directly instead of
687
- * the popup menu.
688
- *
689
- * @sample highcharts/exporting/buttons-contextbutton-onclick/
690
- * Skip the menu and export the chart directly
691
- *
692
- * @type {Function}
693
- * @since 2.0
694
- * @apioption exporting.buttons.contextButton.onclick
695
- */
696
- /**
697
- * See [navigation.buttonOptions.symbolFill](
698
- * #navigation.buttonOptions.symbolFill).
699
- *
700
- * @type {Highcharts.ColorString}
701
- * @default #666666
702
- * @since 2.0
703
- * @apioption exporting.buttons.contextButton.symbolFill
704
- */
705
- /**
706
- * The horizontal position of the button relative to the `align`
707
- * option.
708
- *
709
- * @type {number}
710
- * @default -10
711
- * @since 2.0
712
- * @apioption exporting.buttons.contextButton.x
713
- */
714
- /**
715
- * The class name of the context button.
716
- */
717
- className: 'highcharts-contextbutton',
718
- /**
719
- * The class name of the menu appearing from the button.
720
- */
721
- menuClassName: 'highcharts-contextmenu',
722
- /**
723
- * The symbol for the button. Points to a definition function in
724
- * the `Highcharts.Renderer.symbols` collection. The default
725
- * `menu` function is part of the exporting module. Possible
726
- * values are "circle", "square", "diamond", "triangle",
727
- * "triangle-down", "menu", "menuball" or custom shape.
728
- *
729
- * @sample highcharts/exporting/buttons-contextbutton-symbol/
730
- * Use a circle for symbol
731
- * @sample highcharts/exporting/buttons-contextbutton-symbol-custom/
732
- * Custom shape as symbol
733
- *
734
- * @type {Highcharts.SymbolKeyValue|"menu"|"menuball"|string}
735
- * @since 2.0
736
- */
737
- symbol: 'menu',
738
- /**
739
- * The key to a [lang](#lang) option setting that is used for the
740
- * button's title tooltip. When the key is `contextButtonTitle`, it
741
- * refers to [lang.contextButtonTitle](#lang.contextButtonTitle)
742
- * that defaults to "Chart context menu".
743
- *
744
- * @since 6.1.4
745
- */
746
- titleKey: 'contextButtonTitle',
747
- /**
748
- * A collection of strings pointing to config options for the menu
749
- * items. The config options are defined in the
750
- * `menuItemDefinitions` option.
751
- *
752
- * By default, there is the "View in full screen" and "Print" menu
753
- * items, plus one menu item for each of the available export types.
754
- *
755
- * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
756
- * Menu item definitions
757
- * @sample {highstock} highcharts/exporting/menuitemdefinitions/
758
- * Menu item definitions
759
- * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
760
- * Menu item definitions
761
- *
762
- * @type {Array<string>}
763
- * @default ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"]
764
- * @since 2.0
765
- */
766
- menuItems: [
767
- 'viewFullscreen',
768
- 'printChart',
769
- 'separator',
770
- 'downloadPNG',
771
- 'downloadJPEG',
772
- 'downloadSVG'
773
- ]
468
+ async function downloadPDF(svg, scale, filename, pdfFont) {
469
+ const svgNode = preparePDF(svg, pdfFont);
470
+ if (svgNode) {
471
+ // Loads all required fonts
472
+ await loadPdfFonts(svgNode, pdfFont);
473
+ // Transform SVG to PDF
474
+ const pdfData = await svgToPdf(svgNode, 0, scale);
475
+ // Download the PDF
476
+ OfflineExporting_downloadURL(pdfData, filename);
774
477
  }
775
- },
478
+ }
776
479
  /**
777
- * An object consisting of definitions for the menu items in the context
778
- * menu. Each key value pair has a `key` that is referenced in the
779
- * [menuItems](#exporting.buttons.contextButton.menuItems) setting,
780
- * and a `value`, which is an object with the following properties:
781
- *
782
- * - **onclick:** The click handler for the menu item
480
+ * Loads and registers custom fonts for PDF export if non-ASCII characters
481
+ * are detected in the given SVG element. This function ensures that text
482
+ * content with special characters is properly rendered in the exported PDF.
783
483
  *
784
- * - **text:** The text for the menu item
484
+ * It fetches font files (if provided in `pdfFont`), converts them to
485
+ * base64, and registers them with jsPDF.
785
486
  *
786
- * - **textKey:** If internationalization is required, the key to a language
787
- * string
788
- *
789
- * Custom text for the "exitFullScreen" can be set only in lang options
790
- * (it is not a separate button).
791
- *
792
- * @sample {highcharts} highcharts/exporting/menuitemdefinitions/
793
- * Menu item definitions
794
- * @sample {highstock} highcharts/exporting/menuitemdefinitions/
795
- * Menu item definitions
796
- * @sample {highmaps} highcharts/exporting/menuitemdefinitions/
797
- * Menu item definitions
487
+ * @private
488
+ * @function loadPdfFonts
798
489
  *
490
+ * @param {SVGElement} svgElement
491
+ * The generated SVG element containing the text content to be exported.
492
+ * @param {Highcharts.PdfFontOptions} [pdfFont]
493
+ * An optional object specifying URLs for different font variants (normal,
494
+ * bold, italic, bolditalic). If non-ASCII characters are not detected,
495
+ * fonts are not loaded.
799
496
  *
800
- * @type {Highcharts.Dictionary<Highcharts.ExportingMenuObject>}
801
- * @default {"viewFullscreen": {}, "printChart": {}, "separator": {}, "downloadPNG": {}, "downloadJPEG": {}, "downloadPDF": {}, "downloadSVG": {}}
802
- * @since 5.0.13
497
+ * @requires modules/exporting
498
+ * @requires modules/offline-exporting
803
499
  */
804
- menuItemDefinitions: {
805
- /**
806
- * @ignore
807
- */
808
- viewFullscreen: {
809
- textKey: 'viewFullscreen',
810
- onclick: function () {
811
- if (this.fullscreen) {
812
- this.fullscreen.toggle();
500
+ async function loadPdfFonts(svgElement, pdfFont) {
501
+ const hasNonASCII = (s) => (
502
+ // eslint-disable-next-line no-control-regex
503
+ /[^\u0000-\u007F\u200B]+/.test(s));
504
+ // Register an event in order to add the font once jsPDF is initialized
505
+ const addFont = (variant, base64) => {
506
+ OfflineExporting_win.jspdf.jsPDF.API.events.push([
507
+ 'initialized',
508
+ function () {
509
+ this.addFileToVFS(variant, base64);
510
+ this.addFont(variant, 'HighchartsFont', variant);
511
+ if (!this.getFontList()?.HighchartsFont) {
512
+ this.setFont('HighchartsFont');
513
+ }
514
+ }
515
+ ]);
516
+ };
517
+ // If there are no non-ASCII characters in the SVG, do not use bother
518
+ // downloading the font files
519
+ if (pdfFont && !hasNonASCII(svgElement.textContent || '')) {
520
+ pdfFont = void 0;
521
+ }
522
+ // Add new font if the URL is declared, #6417
523
+ const variants = ['normal', 'italic', 'bold', 'bolditalic'];
524
+ // Shift the first element off the variants and add as a font.
525
+ // Then asynchronously trigger the next variant until variants are empty
526
+ let normalBase64;
527
+ for (const variant of variants) {
528
+ const url = pdfFont?.[variant];
529
+ if (url) {
530
+ try {
531
+ const response = await OfflineExporting_win.fetch(url);
532
+ if (!response.ok) {
533
+ throw new Error(`Failed to fetch font: ${url}`);
534
+ }
535
+ const blob = await response.blob(), reader = new FileReader();
536
+ const base64 = await new Promise((resolve, reject) => {
537
+ reader.onloadend = () => {
538
+ if (typeof reader.result === 'string') {
539
+ resolve(reader.result.split(',')[1]);
540
+ }
541
+ else {
542
+ reject(new Error('Failed to read font as base64'));
543
+ }
544
+ };
545
+ reader.onerror = reject;
546
+ reader.readAsDataURL(blob);
547
+ });
548
+ addFont(variant, base64);
549
+ if (variant === 'normal') {
550
+ normalBase64 = base64;
551
+ }
552
+ }
553
+ catch (e) {
554
+ // If fetch or reading fails, fallback to next variant
813
555
  }
814
556
  }
815
- },
816
- /**
817
- * @ignore
818
- */
819
- printChart: {
820
- textKey: 'printChart',
821
- onclick: function () {
822
- this.print();
823
- }
824
- },
825
- /**
826
- * @ignore
827
- */
828
- separator: {
829
- separator: true
830
- },
831
- /**
832
- * @ignore
833
- */
834
- downloadPNG: {
835
- textKey: 'downloadPNG',
836
- onclick: function () {
837
- this.exportChart();
838
- }
839
- },
840
- /**
841
- * @ignore
842
- */
843
- downloadJPEG: {
844
- textKey: 'downloadJPEG',
845
- onclick: function () {
846
- this.exportChart({
847
- type: 'image/jpeg'
848
- });
849
- }
850
- },
851
- /**
852
- * @ignore
853
- */
854
- downloadPDF: {
855
- textKey: 'downloadPDF',
856
- onclick: function () {
857
- this.exportChart({
858
- type: 'application/pdf'
859
- });
860
- }
861
- },
862
- /**
863
- * @ignore
864
- */
865
- downloadSVG: {
866
- textKey: 'downloadSVG',
867
- onclick: function () {
868
- this.exportChart({
869
- type: 'image/svg+xml'
870
- });
557
+ else {
558
+ // For other variants, fall back to normal text weight/style
559
+ if (normalBase64) {
560
+ addFont(variant, normalBase64);
561
+ }
871
562
  }
872
563
  }
873
564
  }
874
- };
875
- // Add language
876
- /**
877
- * @optionparent lang
878
- */
879
- const lang = {
880
- /**
881
- * Exporting module only. The text for the menu item to view the chart
882
- * in full screen.
883
- *
884
- * @since 8.0.1
885
- */
886
- viewFullscreen: 'View in full screen',
887
565
  /**
888
- * Exporting module only. The text for the menu item to exit the chart
889
- * from full screen.
566
+ * Prepares an SVG for PDF export by ensuring proper text styling and
567
+ * removing unnecessary elements. This function extracts an SVG element from
568
+ * a given SVG string, applies font styles inherited from parent elements,
569
+ * and removes text outlines and title elements to improve PDF rendering.
890
570
  *
891
- * @since 8.0.1
892
- */
893
- exitFullscreen: 'Exit from full screen',
894
- /**
895
- * Exporting module only. The text for the menu item to print the chart.
896
- *
897
- * @since 3.0.1
898
- * @requires modules/exporting
899
- */
900
- printChart: 'Print chart',
901
- /**
902
- * Exporting module only. The text for the PNG download menu item.
903
- *
904
- * @since 2.0
905
- * @requires modules/exporting
906
- */
907
- downloadPNG: 'Download PNG image',
908
- /**
909
- * Exporting module only. The text for the JPEG download menu item.
571
+ * @private
572
+ * @function preparePDF
910
573
  *
911
- * @since 2.0
912
- * @requires modules/exporting
913
- */
914
- downloadJPEG: 'Download JPEG image',
915
- /**
916
- * Exporting module only. The text for the PDF download menu item.
574
+ * @param {string} svg
575
+ * A string representation of the SVG markup.
576
+ * @param {Highcharts.PdfFontOptions} [pdfFont]
577
+ * An optional object specifying URLs for different font variants (normal,
578
+ * bold, italic, bolditalic). If provided, the text elements are assigned a
579
+ * custom PDF font.
917
580
  *
918
- * @since 2.0
919
- * @requires modules/exporting
920
- */
921
- downloadPDF: 'Download PDF document',
922
- /**
923
- * Exporting module only. The text for the SVG download menu item.
581
+ * @return {SVGSVGElement | null}
582
+ * Returns the parsed SVG element from the container or `null` if the SVG is
583
+ * not found.
924
584
  *
925
- * @since 2.0
926
585
  * @requires modules/exporting
586
+ * @requires modules/offline-exporting
927
587
  */
928
- downloadSVG: 'Download SVG vector image',
588
+ function preparePDF(svg, pdfFont) {
589
+ const dummySVGContainer = OfflineExporting_doc.createElement('div');
590
+ highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(dummySVGContainer, svg);
591
+ const textElements = dummySVGContainer.getElementsByTagName('text'),
592
+ // Copy style property to element from parents if it's not there.
593
+ // Searches up hierarchy until it finds prop, or hits the chart
594
+ // container
595
+ setStylePropertyFromParents = function (el, propName) {
596
+ let curParent = el;
597
+ while (curParent && curParent !== dummySVGContainer) {
598
+ if (curParent.style[propName]) {
599
+ let value = curParent.style[propName];
600
+ if (propName === 'fontSize' && /em$/.test(value)) {
601
+ value = Math.round(parseFloat(value) * 16) + 'px';
602
+ }
603
+ el.style[propName] = value;
604
+ break;
605
+ }
606
+ curParent = curParent.parentNode;
607
+ }
608
+ };
609
+ let titleElements, outlineElements;
610
+ // Workaround for the text styling. Making sure it does pick up
611
+ // settings for parent elements.
612
+ [].forEach.call(textElements, function (el) {
613
+ // Workaround for the text styling. making sure it does pick up
614
+ // the root element
615
+ ['fontFamily', 'fontSize']
616
+ .forEach((property) => {
617
+ setStylePropertyFromParents(el, property);
618
+ });
619
+ el.style.fontFamily = pdfFont?.normal ?
620
+ // Custom PDF font
621
+ 'HighchartsFont' :
622
+ // Generic font (serif, sans-serif etc)
623
+ String(el.style.fontFamily &&
624
+ el.style.fontFamily.split(' ').splice(-1));
625
+ // Workaround for plotband with width, removing title from text
626
+ // nodes
627
+ titleElements = el.getElementsByTagName('title');
628
+ [].forEach.call(titleElements, function (titleElement) {
629
+ el.removeChild(titleElement);
630
+ });
631
+ // Remove all .highcharts-text-outline elements, #17170
632
+ outlineElements =
633
+ el.getElementsByClassName('highcharts-text-outline');
634
+ while (outlineElements.length > 0) {
635
+ const outline = outlineElements[0];
636
+ if (outline.parentNode) {
637
+ outline.parentNode.removeChild(outline);
638
+ }
639
+ }
640
+ });
641
+ return dummySVGContainer.querySelector('svg');
642
+ }
929
643
  /**
930
- * Exporting module menu. The tooltip title for the context menu holding
931
- * print and export menu items.
644
+ * Transform from PDF to SVG.
932
645
  *
933
- * @since 3.0
934
- * @requires modules/exporting
935
- */
936
- contextButtonTitle: 'Chart context menu'
937
- };
938
- /**
939
- * A collection of options for buttons and menus appearing in the exporting
940
- * module or in Stock Tools.
941
- *
942
- * @requires modules/exporting
943
- * @optionparent navigation
944
- */
945
- const navigation = {
946
- /**
947
- * A collection of options for buttons appearing in the exporting
948
- * module.
646
+ * @async
647
+ * @private
648
+ * @function svgToPdf
949
649
  *
950
- * In styled mode, the buttons are styled with the
951
- * `.highcharts-contextbutton` and `.highcharts-button-symbol` classes.
650
+ * @param {Highcharts.SVGElement} svgElement
651
+ * The SVG element to convert.
652
+ * @param {number} margin
653
+ * The margin to apply.
654
+ * @param {number} scale
655
+ * The scale of the SVG.
952
656
  *
953
657
  * @requires modules/exporting
658
+ * @requires modules/offline-exporting
954
659
  */
955
- buttonOptions: {
956
- /**
957
- * Whether to enable buttons.
958
- *
959
- * @sample highcharts/navigation/buttonoptions-enabled/
960
- * Exporting module loaded but buttons disabled
961
- *
962
- * @type {boolean}
963
- * @default true
964
- * @since 2.0
965
- * @apioption navigation.buttonOptions.enabled
966
- */
967
- /**
968
- * The pixel size of the symbol on the button.
969
- *
970
- * @sample highcharts/navigation/buttonoptions-height/
971
- * Bigger buttons
972
- *
973
- * @since 2.0
974
- */
975
- symbolSize: 14,
976
- /**
977
- * The x position of the center of the symbol inside the button.
978
- *
979
- * @sample highcharts/navigation/buttonoptions-height/
980
- * Bigger buttons
981
- *
982
- * @since 2.0
983
- */
984
- symbolX: 14.5,
985
- /**
986
- * The y position of the center of the symbol inside the button.
987
- *
988
- * @sample highcharts/navigation/buttonoptions-height/
989
- * Bigger buttons
990
- *
991
- * @since 2.0
992
- */
993
- symbolY: 13.5,
994
- /**
995
- * Alignment for the buttons.
996
- *
997
- * @sample highcharts/navigation/buttonoptions-align/
998
- * Center aligned
999
- *
1000
- * @type {Highcharts.AlignValue}
1001
- * @since 2.0
1002
- */
1003
- align: 'right',
1004
- /**
1005
- * The pixel spacing between buttons, and between the context button and
1006
- * the title.
1007
- *
1008
- * @sample highcharts/title/widthadjust
1009
- * Adjust the spacing when using text button
1010
- * @since 2.0
1011
- */
1012
- buttonSpacing: 5,
1013
- /**
1014
- * Pixel height of the buttons.
1015
- *
1016
- * @sample highcharts/navigation/buttonoptions-height/
1017
- * Bigger buttons
1018
- *
1019
- * @since 2.0
1020
- */
1021
- height: 28,
1022
- /**
1023
- * A text string to add to the individual button.
1024
- *
1025
- * @sample highcharts/exporting/buttons-text/
1026
- * Full text button
1027
- * @sample highcharts/exporting/buttons-text-usehtml/
1028
- * Icon using CSS font in text
1029
- * @sample highcharts/exporting/buttons-text-symbol/
1030
- * Combined symbol and text
1031
- *
1032
- * @type {string}
1033
- * @default null
1034
- * @since 3.0
1035
- * @apioption navigation.buttonOptions.text
1036
- */
1037
- /**
1038
- * Whether to use HTML for rendering the button. HTML allows for things
1039
- * like inline CSS or image-based icons.
1040
- *
1041
- * @sample highcharts/exporting/buttons-text-usehtml/
1042
- * Icon using CSS font in text
1043
- *
1044
- * @type boolean
1045
- * @default false
1046
- * @since 10.3.0
1047
- * @apioption navigation.buttonOptions.useHTML
1048
- */
1049
- /**
1050
- * The vertical offset of the button's position relative to its
1051
- * `verticalAlign`. By default adjusted for the chart title alignment.
1052
- *
1053
- * @sample highcharts/navigation/buttonoptions-verticalalign/
1054
- * Buttons at lower right
1055
- *
1056
- * @since 2.0
1057
- * @apioption navigation.buttonOptions.y
1058
- */
1059
- y: -5,
1060
- /**
1061
- * The vertical alignment of the buttons. Can be one of `"top"`,
1062
- * `"middle"` or `"bottom"`.
1063
- *
1064
- * @sample highcharts/navigation/buttonoptions-verticalalign/
1065
- * Buttons at lower right
1066
- *
1067
- * @type {Highcharts.VerticalAlignValue}
1068
- * @since 2.0
1069
- */
1070
- verticalAlign: 'top',
1071
- /**
1072
- * The pixel width of the button.
1073
- *
1074
- * @sample highcharts/navigation/buttonoptions-height/
1075
- * Bigger buttons
1076
- *
1077
- * @since 2.0
1078
- */
1079
- width: 28,
1080
- /**
1081
- * Fill color for the symbol within the button.
1082
- *
1083
- * @sample highcharts/navigation/buttonoptions-symbolfill/
1084
- * Blue symbol stroke for one of the buttons
1085
- *
1086
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
1087
- * @since 2.0
1088
- */
1089
- symbolFill: "#666666" /* Palette.neutralColor60 */,
1090
- /**
1091
- * The color of the symbol's stroke or line.
1092
- *
1093
- * @sample highcharts/navigation/buttonoptions-symbolstroke/
1094
- * Blue symbol stroke
1095
- *
1096
- * @type {Highcharts.ColorString}
1097
- * @since 2.0
1098
- */
1099
- symbolStroke: "#666666" /* Palette.neutralColor60 */,
1100
- /**
1101
- * The pixel stroke width of the symbol on the button.
1102
- *
1103
- * @sample highcharts/navigation/buttonoptions-height/
1104
- * Bigger buttons
1105
- *
1106
- * @since 2.0
1107
- */
1108
- symbolStrokeWidth: 3,
1109
- /**
1110
- * A configuration object for the button theme. The object accepts
1111
- * SVG properties like `stroke-width`, `stroke` and `fill`.
1112
- * Tri-state button styles are supported by the `states.hover` and
1113
- * `states.select` objects.
1114
- *
1115
- * @sample highcharts/navigation/buttonoptions-theme/
1116
- * Theming the buttons
1117
- *
1118
- * @requires modules/exporting
1119
- *
1120
- * @since 3.0
1121
- */
1122
- theme: {
1123
- /**
1124
- * The default fill exists only to capture hover events.
1125
- *
1126
- * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
1127
- */
1128
- fill: "#ffffff" /* Palette.backgroundColor */,
1129
- /**
1130
- * Padding for the button.
1131
- */
1132
- padding: 5,
1133
- /**
1134
- * Default stroke for the buttons.
1135
- *
1136
- * @type {Highcharts.ColorString}
1137
- */
1138
- stroke: 'none',
1139
- /**
1140
- * Default stroke linecap for the buttons.
1141
- */
1142
- 'stroke-linecap': 'round'
1143
- }
1144
- },
1145
- /**
1146
- * CSS styles for the popup menu appearing by default when the export
1147
- * icon is clicked. This menu is rendered in HTML.
1148
- *
1149
- * @see In styled mode, the menu is styled with the `.highcharts-menu`
1150
- * class.
1151
- *
1152
- * @sample highcharts/navigation/menustyle/
1153
- * Light gray menu background
1154
- *
1155
- * @type {Highcharts.CSSObject}
1156
- * @default {"background": "#ffffff", "borderRadius": "3px", "padding": "0.5em"}
1157
- * @since 2.0
1158
- */
1159
- menuStyle: {
1160
- /** @ignore-option */
1161
- border: 'none',
1162
- /** @ignore-option */
1163
- borderRadius: '3px',
1164
- /** @ignore-option */
1165
- background: "#ffffff" /* Palette.backgroundColor */,
1166
- /** @ignore-option */
1167
- padding: '0.5em'
1168
- },
1169
- /**
1170
- * CSS styles for the individual items within the popup menu appearing
1171
- * by default when the export icon is clicked. The menu items are
1172
- * rendered in HTML. Font size defaults to `11px` on desktop and `14px`
1173
- * on touch devices.
1174
- *
1175
- * @see In styled mode, the menu items are styled with the
1176
- * `.highcharts-menu-item` class.
1177
- *
1178
- * @sample {highcharts} highcharts/navigation/menuitemstyle/
1179
- * Add a grey stripe to the left
1180
- *
1181
- * @type {Highcharts.CSSObject}
1182
- * @default {"padding": "0.5em", "color": "#333333", "background": "none", "borderRadius": "3px", "fontSize": "0.8em", "transition": "background 250ms, color 250ms"}
1183
- * @since 2.0
1184
- */
1185
- menuItemStyle: {
1186
- /** @ignore-option */
1187
- background: 'none',
1188
- /** @ignore-option */
1189
- borderRadius: '3px',
1190
- /** @ignore-option */
1191
- color: "#333333" /* Palette.neutralColor80 */,
1192
- /** @ignore-option */
1193
- padding: '0.5em',
1194
- /** @ignore-option */
1195
- fontSize: isTouchDevice ? '0.9em' : '0.8em',
1196
- /** @ignore-option */
1197
- transition: 'background 250ms, color 250ms'
1198
- },
1199
- /**
1200
- * CSS styles for the hover state of the individual items within the
1201
- * popup menu appearing by default when the export icon is clicked. The
1202
- * menu items are rendered in HTML.
1203
- *
1204
- * @see In styled mode, the menu items are styled with the
1205
- * `.highcharts-menu-item` class.
1206
- *
1207
- * @sample highcharts/navigation/menuitemhoverstyle/
1208
- * Bold text on hover
1209
- *
1210
- * @type {Highcharts.CSSObject}
1211
- * @default {"background": "#f2f2f2" }
1212
- * @since 2.0
1213
- */
1214
- menuItemHoverStyle: {
1215
- /** @ignore-option */
1216
- background: "#f2f2f2" /* Palette.neutralColor5 */
1217
- }
1218
- };
1219
- /* *
1220
- *
1221
- * Default Export
1222
- *
1223
- * */
1224
- const ExportingDefaults = {
1225
- exporting,
1226
- lang,
1227
- navigation
1228
- };
1229
- /* harmony default export */ const Exporting_ExportingDefaults = (ExportingDefaults);
1230
-
1231
- ;// ./code/es-modules/Extensions/Exporting/ExportingSymbols.js
1232
- /* *
1233
- *
1234
- * Exporting module
1235
- *
1236
- * (c) 2010-2025 Torstein Honsi
1237
- *
1238
- * License: www.highcharts.com/license
1239
- *
1240
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1241
- *
1242
- * */
1243
-
1244
- /* *
1245
- *
1246
- * Composition
1247
- *
1248
- * */
1249
- var ExportingSymbols;
1250
- (function (ExportingSymbols) {
1251
- /* *
1252
- *
1253
- * Constants
1254
- *
1255
- * */
1256
- const modifiedClasses = [];
1257
- /* *
1258
- *
1259
- * Functions
1260
- *
1261
- * */
1262
- /* eslint-disable valid-jsdoc */
1263
- /**
1264
- * @private
1265
- */
1266
- function compose(SVGRendererClass) {
1267
- if (modifiedClasses.indexOf(SVGRendererClass) === -1) {
1268
- modifiedClasses.push(SVGRendererClass);
1269
- const symbols = SVGRendererClass.prototype.symbols;
1270
- symbols.menu = menu;
1271
- symbols.menuball = menuball.bind(symbols);
1272
- }
1273
- }
1274
- ExportingSymbols.compose = compose;
1275
- /**
1276
- * @private
1277
- */
1278
- function menu(x, y, width, height) {
1279
- const arr = [
1280
- ['M', x, y + 2.5],
1281
- ['L', x + width, y + 2.5],
1282
- ['M', x, y + height / 2 + 0.5],
1283
- ['L', x + width, y + height / 2 + 0.5],
1284
- ['M', x, y + height - 1.5],
1285
- ['L', x + width, y + height - 1.5]
1286
- ];
1287
- return arr;
1288
- }
1289
- /**
1290
- * @private
1291
- */
1292
- function menuball(x, y, width, height) {
1293
- const h = (height / 3) - 2;
1294
- let path = [];
1295
- path = path.concat(this.circle(width - h, y, h, h), this.circle(width - h, y + h + 4, h, h), this.circle(width - h, y + 2 * (h + 4), h, h));
1296
- return path;
1297
- }
1298
- })(ExportingSymbols || (ExportingSymbols = {}));
1299
- /* *
1300
- *
1301
- * Default Export
1302
- *
1303
- * */
1304
- /* harmony default export */ const Exporting_ExportingSymbols = (ExportingSymbols);
1305
-
1306
- ;// ./code/es-modules/Extensions/Exporting/Fullscreen.js
1307
- /* *
1308
- *
1309
- * (c) 2009-2025 Rafal Sebestjanski
1310
- *
1311
- * Full screen for Highcharts
1312
- *
1313
- * License: www.highcharts.com/license
1314
- *
1315
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1316
- *
1317
- * */
1318
- /**
1319
- * The module allows user to enable display chart in full screen mode.
1320
- * Used in StockTools too.
1321
- * Based on default solutions in browsers.
1322
- */
1323
-
1324
-
1325
-
1326
- const { composed } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1327
-
1328
- const { addEvent, fireEvent, pushUnique } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1329
- /* *
1330
- *
1331
- * Functions
1332
- *
1333
- * */
1334
- /**
1335
- * @private
1336
- */
1337
- function onChartBeforeRender() {
1338
- /**
1339
- * @name Highcharts.Chart#fullscreen
1340
- * @type {Highcharts.Fullscreen}
1341
- * @requires modules/full-screen
1342
- */
1343
- this.fullscreen = new Fullscreen(this);
1344
- }
1345
- /* *
1346
- *
1347
- * Class
1348
- *
1349
- * */
1350
- /**
1351
- * Handles displaying chart's container in the fullscreen mode.
1352
- *
1353
- * **Note**: Fullscreen is not supported on iPhone due to iOS limitations.
1354
- *
1355
- * @class
1356
- * @name Highcharts.Fullscreen
1357
- *
1358
- * @requires modules/exporting
1359
- */
1360
- class Fullscreen {
1361
- /* *
1362
- *
1363
- * Static Functions
1364
- *
1365
- * */
1366
- /**
1367
- * Prepares the chart class to support fullscreen.
1368
- *
1369
- * @param {typeof_Highcharts.Chart} ChartClass
1370
- * The chart class to decorate with fullscreen support.
1371
- */
1372
- static compose(ChartClass) {
1373
- if (pushUnique(composed, 'Fullscreen')) {
1374
- // Initialize fullscreen
1375
- addEvent(ChartClass, 'beforeRender', onChartBeforeRender);
1376
- }
1377
- }
1378
- /* *
1379
- *
1380
- * Constructors
1381
- *
1382
- * */
1383
- constructor(chart) {
1384
- /**
1385
- * Chart managed by the fullscreen controller.
1386
- * @name Highcharts.Fullscreen#chart
1387
- * @type {Highcharts.Chart}
1388
- */
1389
- this.chart = chart;
1390
- /**
1391
- * The flag is set to `true` when the chart is displayed in
1392
- * the fullscreen mode.
1393
- *
1394
- * @name Highcharts.Fullscreen#isOpen
1395
- * @type {boolean|undefined}
1396
- * @since 8.0.1
1397
- */
1398
- this.isOpen = false;
1399
- const container = chart.renderTo;
1400
- // Hold event and methods available only for a current browser.
1401
- if (!this.browserProps) {
1402
- if (typeof container.requestFullscreen === 'function') {
1403
- this.browserProps = {
1404
- fullscreenChange: 'fullscreenchange',
1405
- requestFullscreen: 'requestFullscreen',
1406
- exitFullscreen: 'exitFullscreen'
1407
- };
1408
- }
1409
- else if (container.mozRequestFullScreen) {
1410
- this.browserProps = {
1411
- fullscreenChange: 'mozfullscreenchange',
1412
- requestFullscreen: 'mozRequestFullScreen',
1413
- exitFullscreen: 'mozCancelFullScreen'
1414
- };
1415
- }
1416
- else if (container.webkitRequestFullScreen) {
1417
- this.browserProps = {
1418
- fullscreenChange: 'webkitfullscreenchange',
1419
- requestFullscreen: 'webkitRequestFullScreen',
1420
- exitFullscreen: 'webkitExitFullscreen'
1421
- };
1422
- }
1423
- else if (container.msRequestFullscreen) {
1424
- this.browserProps = {
1425
- fullscreenChange: 'MSFullscreenChange',
1426
- requestFullscreen: 'msRequestFullscreen',
1427
- exitFullscreen: 'msExitFullscreen'
1428
- };
1429
- }
1430
- }
1431
- }
1432
- /* *
1433
- *
1434
- * Functions
1435
- *
1436
- * */
1437
- /**
1438
- * Stops displaying the chart in fullscreen mode.
1439
- * Exporting module required.
1440
- *
1441
- * @since 8.0.1
1442
- *
1443
- * @function Highcharts.Fullscreen#close
1444
- * @return {void}
1445
- * @requires modules/full-screen
1446
- */
1447
- close() {
1448
- const fullscreen = this, chart = fullscreen.chart, optionsChart = chart.options.chart;
1449
- fireEvent(chart, 'fullscreenClose', null, function () {
1450
- // Don't fire exitFullscreen() when user exited
1451
- // using 'Escape' button.
1452
- if (fullscreen.isOpen &&
1453
- fullscreen.browserProps &&
1454
- chart.container.ownerDocument instanceof Document) {
1455
- chart.container.ownerDocument[fullscreen.browserProps.exitFullscreen]();
1456
- }
1457
- // Unbind event as it's necessary only before exiting
1458
- // from fullscreen.
1459
- if (fullscreen.unbindFullscreenEvent) {
1460
- fullscreen.unbindFullscreenEvent = fullscreen
1461
- .unbindFullscreenEvent();
1462
- }
1463
- chart.setSize(fullscreen.origWidth, fullscreen.origHeight, false);
1464
- fullscreen.origWidth = void 0;
1465
- fullscreen.origHeight = void 0;
1466
- optionsChart.width = fullscreen.origWidthOption;
1467
- optionsChart.height = fullscreen.origHeightOption;
1468
- fullscreen.origWidthOption = void 0;
1469
- fullscreen.origHeightOption = void 0;
1470
- fullscreen.isOpen = false;
1471
- fullscreen.setButtonText();
1472
- });
1473
- }
1474
- /**
1475
- * Displays the chart in fullscreen mode.
1476
- * When fired customly by user before exporting context button is created,
1477
- * button's text will not be replaced - it's on the user side.
1478
- * Exporting module required.
1479
- *
1480
- * @since 8.0.1
1481
- *
1482
- * @function Highcharts.Fullscreen#open
1483
- * @return {void}
1484
- * @requires modules/full-screen
1485
- */
1486
- open() {
1487
- const fullscreen = this, chart = fullscreen.chart, optionsChart = chart.options.chart;
1488
- fireEvent(chart, 'fullscreenOpen', null, function () {
1489
- if (optionsChart) {
1490
- fullscreen.origWidthOption = optionsChart.width;
1491
- fullscreen.origHeightOption = optionsChart.height;
1492
- }
1493
- fullscreen.origWidth = chart.chartWidth;
1494
- fullscreen.origHeight = chart.chartHeight;
1495
- // Handle exitFullscreen() method when user clicks 'Escape' button.
1496
- if (fullscreen.browserProps) {
1497
- const unbindChange = addEvent(chart.container.ownerDocument, // Chart's document
1498
- fullscreen.browserProps.fullscreenChange, function () {
1499
- // Handle lack of async of browser's
1500
- // fullScreenChange event.
1501
- if (fullscreen.isOpen) {
1502
- fullscreen.isOpen = false;
1503
- fullscreen.close();
1504
- }
1505
- else {
1506
- chart.setSize(null, null, false);
1507
- fullscreen.isOpen = true;
1508
- fullscreen.setButtonText();
1509
- }
1510
- });
1511
- const unbindDestroy = addEvent(chart, 'destroy', unbindChange);
1512
- fullscreen.unbindFullscreenEvent = () => {
1513
- unbindChange();
1514
- unbindDestroy();
1515
- };
1516
- const promise = chart.renderTo[fullscreen.browserProps.requestFullscreen]();
1517
- if (promise) {
1518
- promise['catch'](function () {
1519
- alert(// eslint-disable-line no-alert
1520
- 'Full screen is not supported inside a frame.');
1521
- });
1522
- }
1523
- }
1524
- });
1525
- }
1526
- /**
1527
- * Replaces the exporting context button's text when toogling the
1528
- * fullscreen mode.
1529
- *
1530
- * @private
1531
- *
1532
- * @since 8.0.1
1533
- *
1534
- * @requires modules/full-screen
1535
- */
1536
- setButtonText() {
1537
- const chart = this.chart, exportDivElements = chart.exportDivElements, exportingOptions = chart.options.exporting, menuItems = (exportingOptions &&
1538
- exportingOptions.buttons &&
1539
- exportingOptions.buttons.contextButton.menuItems), lang = chart.options.lang;
1540
- if (exportingOptions &&
1541
- exportingOptions.menuItemDefinitions &&
1542
- lang &&
1543
- lang.exitFullscreen &&
1544
- lang.viewFullscreen &&
1545
- menuItems &&
1546
- exportDivElements) {
1547
- const exportDivElement = exportDivElements[menuItems.indexOf('viewFullscreen')];
1548
- if (exportDivElement) {
1549
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(exportDivElement, !this.isOpen ?
1550
- (exportingOptions.menuItemDefinitions.viewFullscreen
1551
- .text ||
1552
- lang.viewFullscreen) : lang.exitFullscreen);
1553
- }
1554
- }
1555
- }
1556
- /**
1557
- * Toggles displaying the chart in fullscreen mode.
1558
- * By default, when the exporting module is enabled, a context button with
1559
- * a drop down menu in the upper right corner accesses this function.
1560
- * Exporting module required.
1561
- *
1562
- * @since 8.0.1
1563
- *
1564
- * @sample highcharts/members/chart-togglefullscreen/
1565
- * Toggle fullscreen mode from a HTML button
1566
- *
1567
- * @function Highcharts.Fullscreen#toggle
1568
- * @requires modules/full-screen
1569
- */
1570
- toggle() {
1571
- const fullscreen = this;
1572
- if (!fullscreen.isOpen) {
1573
- fullscreen.open();
1574
- }
1575
- else {
1576
- fullscreen.close();
1577
- }
1578
- }
1579
- }
1580
- /* *
1581
- *
1582
- * Default Export
1583
- *
1584
- * */
1585
- /* harmony default export */ const Exporting_Fullscreen = (Fullscreen);
1586
- /* *
1587
- *
1588
- * API Declarations
1589
- *
1590
- * */
1591
- /**
1592
- * Gets fired when closing the fullscreen
1593
- *
1594
- * @callback Highcharts.FullScreenfullscreenCloseCallbackFunction
1595
- *
1596
- * @param {Highcharts.Chart} chart
1597
- * The chart on which the event occurred.
1598
- *
1599
- * @param {global.Event} event
1600
- * The event that occurred.
1601
- */
1602
- /**
1603
- * Gets fired when opening the fullscreen
1604
- *
1605
- * @callback Highcharts.FullScreenfullscreenOpenCallbackFunction
1606
- *
1607
- * @param {Highcharts.Chart} chart
1608
- * The chart on which the event occurred.
1609
- *
1610
- * @param {global.Event} event
1611
- * The event that occurred.
1612
- */
1613
- (''); // Keeps doclets above separated from following code
1614
- /* *
1615
- *
1616
- * API Options
1617
- *
1618
- * */
1619
- /**
1620
- * Fires when a fullscreen is closed through the context menu item,
1621
- * or a fullscreen is closed on the `Escape` button click,
1622
- * or the `Chart.fullscreen.close` method.
1623
- *
1624
- * @sample highcharts/chart/events-fullscreen
1625
- * Title size change on fullscreen open
1626
- *
1627
- * @type {Highcharts.FullScreenfullscreenCloseCallbackFunction}
1628
- * @since 10.1.0
1629
- * @context Highcharts.Chart
1630
- * @requires modules/full-screen
1631
- * @apioption chart.events.fullscreenClose
1632
- */
1633
- /**
1634
- * Fires when a fullscreen is opened through the context menu item,
1635
- * or the `Chart.fullscreen.open` method.
1636
- *
1637
- * @sample highcharts/chart/events-fullscreen
1638
- * Title size change on fullscreen open
1639
- *
1640
- * @type {Highcharts.FullScreenfullscreenOpenCallbackFunction}
1641
- * @since 10.1.0
1642
- * @context Highcharts.Chart
1643
- * @requires modules/full-screen
1644
- * @apioption chart.events.fullscreenOpen
1645
- */
1646
- (''); // Keeps doclets above in transpiled file
1647
-
1648
- // EXTERNAL MODULE: external {"amd":["highcharts/highcharts","HttpUtilities"],"commonjs":["highcharts","HttpUtilities"],"commonjs2":["highcharts","HttpUtilities"],"root":["Highcharts","HttpUtilities"]}
1649
- var highcharts_HttpUtilities_commonjs_highcharts_HttpUtilities_commonjs2_highcharts_HttpUtilities_root_Highcharts_HttpUtilities_ = __webpack_require__(156);
1650
- var highcharts_HttpUtilities_commonjs_highcharts_HttpUtilities_commonjs2_highcharts_HttpUtilities_root_Highcharts_HttpUtilities_default = /*#__PURE__*/__webpack_require__.n(highcharts_HttpUtilities_commonjs_highcharts_HttpUtilities_commonjs2_highcharts_HttpUtilities_root_Highcharts_HttpUtilities_);
1651
- ;// ./code/es-modules/Extensions/Exporting/Exporting.js
1652
- /* *
1653
- *
1654
- * Exporting module
1655
- *
1656
- * (c) 2010-2025 Torstein Honsi
1657
- *
1658
- * License: www.highcharts.com/license
1659
- *
1660
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
1661
- *
1662
- * */
1663
-
1664
-
1665
-
1666
-
1667
-
1668
- const { defaultOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1669
-
1670
-
1671
-
1672
-
1673
- const { doc: Exporting_doc, SVG_NS, win: Exporting_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1674
-
1675
-
1676
- const { addEvent: Exporting_addEvent, css, createElement, discardElement, extend, find, fireEvent: Exporting_fireEvent, isObject, merge, objectEach, pick, removeEvent, splat, uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
1677
- /* *
1678
- *
1679
- * Composition
1680
- *
1681
- * */
1682
- var Exporting;
1683
- (function (Exporting) {
1684
- /* *
1685
- *
1686
- * Declarations
1687
- *
1688
- * */
1689
- /* *
1690
- *
1691
- * Constants
1692
- *
1693
- * */
1694
- // These CSS properties are not inlined. Remember camelCase.
1695
- const inlineDenylist = [
1696
- /-/, // In Firefox, both hyphened and camelCased names are listed
1697
- /^(clipPath|cssText|d|height|width)$/, // Full words
1698
- /^font$/, // More specific props are set
1699
- /[lL]ogical(Width|Height)$/,
1700
- /^parentRule$/,
1701
- /^(cssRules|ownerRules)$/, // #19516 read-only properties
1702
- /perspective/,
1703
- /TapHighlightColor/,
1704
- /^transition/,
1705
- /^length$/, // #7700
1706
- /^\d+$/ // #17538
1707
- ];
1708
- // These ones are translated to attributes rather than styles
1709
- const inlineToAttributes = [
1710
- 'fill',
1711
- 'stroke',
1712
- 'strokeLinecap',
1713
- 'strokeLinejoin',
1714
- 'strokeWidth',
1715
- 'textAnchor',
1716
- 'x',
1717
- 'y'
1718
- ];
1719
- Exporting.inlineAllowlist = [];
1720
- const unstyledElements = [
1721
- 'clipPath',
1722
- 'defs',
1723
- 'desc'
1724
- ];
1725
- /* *
1726
- *
1727
- * Variables
1728
- *
1729
- * */
1730
- let printingChart;
1731
- /* *
1732
- *
1733
- * Functions
1734
- *
1735
- * */
1736
- /**
1737
- * Add the export button to the chart, with options.
1738
- *
1739
- * @private
1740
- * @function Highcharts.Chart#addButton
1741
- * @param {Highcharts.NavigationButtonOptions} options
1742
- * @requires modules/exporting
1743
- */
1744
- function addButton(options) {
1745
- const chart = this, renderer = chart.renderer, btnOptions = merge(chart.options.navigation.buttonOptions, options), onclick = btnOptions.onclick, menuItems = btnOptions.menuItems, symbolSize = btnOptions.symbolSize || 12;
1746
- let symbol;
1747
- if (!chart.btnCount) {
1748
- chart.btnCount = 0;
1749
- }
1750
- // Keeps references to the button elements
1751
- if (!chart.exportDivElements) {
1752
- chart.exportDivElements = [];
1753
- chart.exportSVGElements = [];
1754
- }
1755
- if (btnOptions.enabled === false || !btnOptions.theme) {
1756
- return;
1757
- }
1758
- const theme = chart.styledMode ? {} : btnOptions.theme;
1759
- let callback;
1760
- if (onclick) {
1761
- callback = function (e) {
1762
- if (e) {
1763
- e.stopPropagation();
1764
- }
1765
- onclick.call(chart, e);
1766
- };
1767
- }
1768
- else if (menuItems) {
1769
- callback = function (e) {
1770
- // Consistent with onclick call (#3495)
1771
- if (e) {
1772
- e.stopPropagation();
1773
- }
1774
- chart.contextMenu(button.menuClassName, menuItems, button.translateX || 0, button.translateY || 0, button.width || 0, button.height || 0, button);
1775
- button.setState(2);
1776
- };
1777
- }
1778
- if (btnOptions.text && btnOptions.symbol) {
1779
- theme.paddingLeft = pick(theme.paddingLeft, 30);
1780
- }
1781
- else if (!btnOptions.text) {
1782
- extend(theme, {
1783
- width: btnOptions.width,
1784
- height: btnOptions.height,
1785
- padding: 0
1786
- });
1787
- }
1788
- const button = renderer
1789
- .button(btnOptions.text, 0, 0, callback, theme, void 0, void 0, void 0, void 0, btnOptions.useHTML)
1790
- .addClass(options.className)
1791
- .attr({
1792
- title: pick(chart.options.lang[btnOptions._titleKey || btnOptions.titleKey], '')
1793
- });
1794
- button.menuClassName = (options.menuClassName ||
1795
- 'highcharts-menu-' + chart.btnCount++);
1796
- if (btnOptions.symbol) {
1797
- symbol = renderer
1798
- .symbol(btnOptions.symbol, Math.round((btnOptions.symbolX || 0) - (symbolSize / 2)), Math.round((btnOptions.symbolY || 0) - (symbolSize / 2)), symbolSize, symbolSize
1799
- // If symbol is an image, scale it (#7957)
1800
- , {
1801
- width: symbolSize,
1802
- height: symbolSize
1803
- })
1804
- .addClass('highcharts-button-symbol')
1805
- .attr({
1806
- zIndex: 1
1807
- })
1808
- .add(button);
1809
- if (!chart.styledMode) {
1810
- symbol.attr({
1811
- stroke: btnOptions.symbolStroke,
1812
- fill: btnOptions.symbolFill,
1813
- 'stroke-width': btnOptions.symbolStrokeWidth || 1
1814
- });
1815
- }
1816
- }
1817
- button
1818
- .add(chart.exportingGroup)
1819
- .align(extend(btnOptions, {
1820
- width: button.width,
1821
- x: pick(btnOptions.x, chart.buttonOffset) // #1654
1822
- }), true, 'spacingBox');
1823
- chart.buttonOffset += (((button.width || 0) + btnOptions.buttonSpacing) *
1824
- (btnOptions.align === 'right' ? -1 : 1));
1825
- chart.exportSVGElements.push(button, symbol);
1826
- }
1827
- /**
1828
- * Clean up after printing a chart.
1829
- *
1830
- * @function Highcharts#afterPrint
1831
- *
1832
- * @private
1833
- *
1834
- * @param {Highcharts.Chart} chart
1835
- * Chart that was (or suppose to be) printed
1836
- *
1837
- * @emits Highcharts.Chart#event:afterPrint
1838
- */
1839
- function afterPrint() {
1840
- const chart = this;
1841
- if (!chart.printReverseInfo) {
1842
- return void 0;
1843
- }
1844
- const { childNodes, origDisplay, resetParams } = chart.printReverseInfo;
1845
- // Put the chart back in
1846
- chart.moveContainers(chart.renderTo);
1847
- // Restore all body content
1848
- [].forEach.call(childNodes, function (node, i) {
1849
- if (node.nodeType === 1) {
1850
- node.style.display = (origDisplay[i] || '');
1851
- }
1852
- });
1853
- chart.isPrinting = false;
1854
- // Reset printMaxWidth
1855
- if (resetParams) {
1856
- chart.setSize.apply(chart, resetParams);
1857
- }
1858
- delete chart.printReverseInfo;
1859
- printingChart = void 0;
1860
- Exporting_fireEvent(chart, 'afterPrint');
1861
- }
1862
- /**
1863
- * Prepare chart and document before printing a chart.
1864
- *
1865
- * @function Highcharts#beforePrint
1866
- *
1867
- * @private
1868
- *
1869
- *
1870
- * @emits Highcharts.Chart#event:beforePrint
1871
- */
1872
- function beforePrint() {
1873
- const chart = this, body = Exporting_doc.body, printMaxWidth = chart.options.exporting.printMaxWidth, printReverseInfo = {
1874
- childNodes: body.childNodes,
1875
- origDisplay: [],
1876
- resetParams: void 0
1877
- };
1878
- chart.isPrinting = true;
1879
- chart.pointer?.reset(void 0, 0);
1880
- Exporting_fireEvent(chart, 'beforePrint');
1881
- // Handle printMaxWidth
1882
- const handleMaxWidth = printMaxWidth &&
1883
- chart.chartWidth > printMaxWidth;
1884
- if (handleMaxWidth) {
1885
- printReverseInfo.resetParams = [
1886
- chart.options.chart.width,
1887
- void 0,
1888
- false
1889
- ];
1890
- chart.setSize(printMaxWidth, void 0, false);
1891
- }
1892
- // Hide all body content
1893
- [].forEach.call(printReverseInfo.childNodes, function (node, i) {
1894
- if (node.nodeType === 1) {
1895
- printReverseInfo.origDisplay[i] = node.style.display;
1896
- node.style.display = 'none';
1897
- }
1898
- });
1899
- // Pull out the chart
1900
- chart.moveContainers(body);
1901
- // Storage details for undo action after printing
1902
- chart.printReverseInfo = printReverseInfo;
1903
- }
1904
- /**
1905
- * @private
1906
- */
1907
- function chartCallback(chart) {
1908
- const composition = chart;
1909
- composition.renderExporting();
1910
- Exporting_addEvent(chart, 'redraw', composition.renderExporting);
1911
- // Destroy the export elements at chart destroy
1912
- Exporting_addEvent(chart, 'destroy', composition.destroyExport);
1913
- // Uncomment this to see a button directly below the chart, for quick
1914
- // testing of export
1915
- /*
1916
- let button, viewImage, viewSource;
1917
- if (!chart.renderer.forExport) {
1918
- viewImage = function () {
1919
- let div = doc.createElement('div');
1920
- div.innerHTML = chart.getSVGForExport();
1921
- chart.renderTo.parentNode.appendChild(div);
1922
- };
1923
-
1924
- viewSource = function () {
1925
- let pre = doc.createElement('pre');
1926
- pre.innerHTML = chart.getSVGForExport()
1927
- .replace(/</g, '\n&lt;')
1928
- .replace(/>/g, '&gt;');
1929
- chart.renderTo.parentNode.appendChild(pre);
1930
- };
1931
-
1932
- viewImage();
1933
-
1934
- // View SVG Image
1935
- button = doc.createElement('button');
1936
- button.innerHTML = 'View SVG Image';
1937
- chart.renderTo.parentNode.appendChild(button);
1938
- button.onclick = viewImage;
1939
-
1940
- // View SVG Source
1941
- button = doc.createElement('button');
1942
- button.innerHTML = 'View SVG Source';
1943
- chart.renderTo.parentNode.appendChild(button);
1944
- button.onclick = viewSource;
1945
- }
1946
- //*/
1947
- }
1948
- /**
1949
- * @private
1950
- */
1951
- function compose(ChartClass, SVGRendererClass) {
1952
- Exporting_ExportingSymbols.compose(SVGRendererClass);
1953
- Exporting_Fullscreen.compose(ChartClass);
1954
- const chartProto = ChartClass.prototype;
1955
- if (!chartProto.exportChart) {
1956
- chartProto.afterPrint = afterPrint;
1957
- chartProto.exportChart = exportChart;
1958
- chartProto.inlineStyles = inlineStyles;
1959
- chartProto.print = print;
1960
- chartProto.sanitizeSVG = sanitizeSVG;
1961
- chartProto.getChartHTML = getChartHTML;
1962
- chartProto.getSVG = getSVG;
1963
- chartProto.getSVGForExport = getSVGForExport;
1964
- chartProto.getFilename = getFilename;
1965
- chartProto.moveContainers = moveContainers;
1966
- chartProto.beforePrint = beforePrint;
1967
- chartProto.contextMenu = contextMenu;
1968
- chartProto.addButton = addButton;
1969
- chartProto.destroyExport = destroyExport;
1970
- chartProto.renderExporting = renderExporting;
1971
- chartProto.resolveCSSVariables = resolveCSSVariables;
1972
- chartProto.callbacks.push(chartCallback);
1973
- Exporting_addEvent(ChartClass, 'init', onChartInit);
1974
- Exporting_addEvent(ChartClass, 'layOutTitle', onChartLayOutTitle);
1975
- if ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
1976
- Exporting_win.matchMedia('print').addListener(function (mqlEvent) {
1977
- if (!printingChart) {
1978
- return void 0;
1979
- }
1980
- if (mqlEvent.matches) {
1981
- printingChart.beforePrint();
1982
- }
1983
- else {
1984
- printingChart.afterPrint();
1985
- }
1986
- });
1987
- }
1988
- defaultOptions.exporting = merge(Exporting_ExportingDefaults.exporting, defaultOptions.exporting);
1989
- defaultOptions.lang = merge(Exporting_ExportingDefaults.lang, defaultOptions.lang);
1990
- // Buttons and menus are collected in a separate config option set
1991
- // called 'navigation'. This can be extended later to add control
1992
- // buttons like zoom and pan right click menus.
1993
- defaultOptions.navigation = merge(Exporting_ExportingDefaults.navigation, defaultOptions.navigation);
1994
- }
1995
- }
1996
- Exporting.compose = compose;
1997
- /**
1998
- * Display a popup menu for choosing the export type.
1999
- *
2000
- * @private
2001
- * @function Highcharts.Chart#contextMenu
2002
- * @param {string} className
2003
- * An identifier for the menu.
2004
- * @param {Array<string|Highcharts.ExportingMenuObject>} items
2005
- * A collection with text and onclicks for the items.
2006
- * @param {number} x
2007
- * The x position of the opener button
2008
- * @param {number} y
2009
- * The y position of the opener button
2010
- * @param {number} width
2011
- * The width of the opener button
2012
- * @param {number} height
2013
- * The height of the opener button
2014
- * @requires modules/exporting
2015
- */
2016
- function contextMenu(className, items, x, y, width, height, button) {
2017
- const chart = this, navOptions = chart.options.navigation, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, cacheName = 'cache-' + className,
2018
- // For mouse leave detection
2019
- menuPadding = Math.max(width, height);
2020
- let innerMenu, menu = chart[cacheName];
2021
- // Create the menu only the first time
2022
- if (!menu) {
2023
- // Create a HTML element above the SVG
2024
- chart.exportContextMenu = chart[cacheName] = menu =
2025
- createElement('div', {
2026
- className: className
2027
- }, {
2028
- position: 'absolute',
2029
- zIndex: 1000,
2030
- padding: menuPadding + 'px',
2031
- pointerEvents: 'auto',
2032
- ...chart.renderer.style
2033
- }, chart.scrollablePlotArea?.fixedDiv || chart.container);
2034
- innerMenu = createElement('ul', { className: 'highcharts-menu' }, chart.styledMode ? {} : {
2035
- listStyle: 'none',
2036
- margin: 0,
2037
- padding: 0
2038
- }, menu);
2039
- // Presentational CSS
2040
- if (!chart.styledMode) {
2041
- css(innerMenu, extend({
2042
- MozBoxShadow: '3px 3px 10px #888',
2043
- WebkitBoxShadow: '3px 3px 10px #888',
2044
- boxShadow: '3px 3px 10px #888'
2045
- }, navOptions.menuStyle));
2046
- }
2047
- // Hide on mouse out
2048
- menu.hideMenu = function () {
2049
- css(menu, { display: 'none' });
2050
- if (button) {
2051
- button.setState(0);
2052
- }
2053
- chart.openMenu = false;
2054
- // #10361, #9998
2055
- css(chart.renderTo, { overflow: 'hidden' });
2056
- css(chart.container, { overflow: 'hidden' });
2057
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(menu.hideTimer);
2058
- Exporting_fireEvent(chart, 'exportMenuHidden');
2059
- };
2060
- // Hide the menu some time after mouse leave (#1357)
2061
- chart.exportEvents.push(Exporting_addEvent(menu, 'mouseleave', function () {
2062
- menu.hideTimer = Exporting_win.setTimeout(menu.hideMenu, 500);
2063
- }), Exporting_addEvent(menu, 'mouseenter', function () {
2064
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(menu.hideTimer);
2065
- }),
2066
- // Hide it on clicking or touching outside the menu (#2258,
2067
- // #2335, #2407)
2068
- Exporting_addEvent(Exporting_doc, 'mouseup', function (e) {
2069
- if (!chart.pointer?.inClass(e.target, className)) {
2070
- menu.hideMenu();
2071
- }
2072
- }), Exporting_addEvent(menu, 'click', function () {
2073
- if (chart.openMenu) {
2074
- menu.hideMenu();
2075
- }
2076
- }));
2077
- // Create the items
2078
- items.forEach(function (item) {
2079
- if (typeof item === 'string') {
2080
- item = chart.options.exporting
2081
- .menuItemDefinitions[item];
2082
- }
2083
- if (isObject(item, true)) {
2084
- let element;
2085
- if (item.separator) {
2086
- element = createElement('hr', void 0, void 0, innerMenu);
2087
- }
2088
- else {
2089
- // When chart initialized with the table, wrong button
2090
- // text displayed, #14352.
2091
- if (item.textKey === 'viewData' &&
2092
- chart.isDataTableVisible) {
2093
- item.textKey = 'hideData';
2094
- }
2095
- element = createElement('li', {
2096
- className: 'highcharts-menu-item',
2097
- onclick: function (e) {
2098
- if (e) { // IE7
2099
- e.stopPropagation();
2100
- }
2101
- menu.hideMenu();
2102
- if (typeof item !== 'string' && item.onclick) {
2103
- item.onclick.apply(chart, arguments);
2104
- }
2105
- }
2106
- }, void 0, innerMenu);
2107
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(element, item.text ||
2108
- chart.options.lang[item.textKey]);
2109
- if (!chart.styledMode) {
2110
- element.onmouseover = function () {
2111
- css(this, navOptions.menuItemHoverStyle);
2112
- };
2113
- element.onmouseout = function () {
2114
- css(this, navOptions.menuItemStyle);
2115
- };
2116
- css(element, extend({
2117
- cursor: 'pointer'
2118
- }, navOptions.menuItemStyle || {}));
2119
- }
2120
- }
2121
- // Keep references to menu divs to be able to destroy them
2122
- chart.exportDivElements.push(element);
2123
- }
2124
- });
2125
- // Keep references to menu and innerMenu div to be able to destroy
2126
- // them
2127
- chart.exportDivElements.push(innerMenu, menu);
2128
- chart.exportMenuWidth = menu.offsetWidth;
2129
- chart.exportMenuHeight = menu.offsetHeight;
2130
- }
2131
- const menuStyle = { display: 'block' };
2132
- // If outside right, right align it
2133
- if (x + (chart.exportMenuWidth || 0) > chartWidth) {
2134
- menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
2135
- }
2136
- else {
2137
- menuStyle.left = (x - menuPadding) + 'px';
2138
- }
2139
- // If outside bottom, bottom align it
2140
- if (y + height + (chart.exportMenuHeight || 0) > chartHeight &&
2141
- button.alignOptions?.verticalAlign !== 'top') {
2142
- menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
2143
- }
2144
- else {
2145
- menuStyle.top = (y + height - menuPadding) + 'px';
2146
- }
2147
- css(menu, menuStyle);
2148
- // #10361, #9998
2149
- css(chart.renderTo, { overflow: '' });
2150
- css(chart.container, { overflow: '' });
2151
- chart.openMenu = true;
2152
- Exporting_fireEvent(chart, 'exportMenuShown');
2153
- }
2154
- /**
2155
- * Destroy the export buttons.
2156
- * @private
2157
- * @function Highcharts.Chart#destroyExport
2158
- * @param {global.Event} [e]
2159
- * @requires modules/exporting
2160
- */
2161
- function destroyExport(e) {
2162
- const chart = e ? e.target : this, exportSVGElements = chart.exportSVGElements, exportDivElements = chart.exportDivElements, exportEvents = chart.exportEvents;
2163
- let cacheName;
2164
- // Destroy the extra buttons added
2165
- if (exportSVGElements) {
2166
- exportSVGElements.forEach((elem, i) => {
2167
- // Destroy and null the svg elements
2168
- if (elem) { // #1822
2169
- elem.onclick = elem.ontouchstart = null;
2170
- cacheName = 'cache-' + elem.menuClassName;
2171
- if (chart[cacheName]) {
2172
- delete chart[cacheName];
2173
- }
2174
- exportSVGElements[i] = elem.destroy();
2175
- }
2176
- });
2177
- exportSVGElements.length = 0;
2178
- }
2179
- // Destroy the exporting group
2180
- if (chart.exportingGroup) {
2181
- chart.exportingGroup.destroy();
2182
- delete chart.exportingGroup;
2183
- }
2184
- // Destroy the divs for the menu
2185
- if (exportDivElements) {
2186
- exportDivElements.forEach(function (elem, i) {
2187
- if (elem) {
2188
- // Remove the event handler
2189
- highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().clearTimeout(elem.hideTimer); // #5427
2190
- removeEvent(elem, 'mouseleave');
2191
- // Remove inline events
2192
- // (chart.exportDivElements as any)[i] =
2193
- exportDivElements[i] =
2194
- elem.onmouseout =
2195
- elem.onmouseover =
2196
- elem.ontouchstart =
2197
- elem.onclick = null;
2198
- // Destroy the div by moving to garbage bin
2199
- discardElement(elem);
2200
- }
2201
- });
2202
- exportDivElements.length = 0;
2203
- }
2204
- if (exportEvents) {
2205
- exportEvents.forEach(function (unbind) {
2206
- unbind();
2207
- });
2208
- exportEvents.length = 0;
2209
- }
2210
- }
2211
- /**
2212
- * Exporting module required. Submit an SVG version of the chart to a server
2213
- * along with some parameters for conversion.
2214
- *
2215
- * @sample highcharts/members/chart-exportchart/
2216
- * Export with no options
2217
- * @sample highcharts/members/chart-exportchart-filename/
2218
- * PDF type and custom filename
2219
- * @sample highcharts/members/chart-exportchart-custom-background/
2220
- * Different chart background in export
2221
- * @sample stock/members/chart-exportchart/
2222
- * Export with Highcharts Stock
2223
- *
2224
- * @function Highcharts.Chart#exportChart
2225
- *
2226
- * @param {Highcharts.ExportingOptions} exportingOptions
2227
- * Exporting options in addition to those defined in
2228
- * [exporting](https://api.highcharts.com/highcharts/exporting).
2229
- *
2230
- * @param {Highcharts.Options} chartOptions
2231
- * Additional chart options for the exported chart. For example a
2232
- * different background color can be added here, or `dataLabels` for
2233
- * export only.
2234
- *
2235
- * @requires modules/exporting
2236
- */
2237
- function exportChart(exportingOptions, chartOptions) {
2238
- const svg = this.getSVGForExport(exportingOptions, chartOptions);
2239
- // Merge the options
2240
- exportingOptions = merge(this.options.exporting, exportingOptions);
2241
- // Do the post
2242
- highcharts_HttpUtilities_commonjs_highcharts_HttpUtilities_commonjs2_highcharts_HttpUtilities_root_Highcharts_HttpUtilities_default().post(exportingOptions.url, {
2243
- filename: exportingOptions.filename ?
2244
- exportingOptions.filename.replace(/\//g, '-') :
2245
- this.getFilename(),
2246
- type: exportingOptions.type,
2247
- width: exportingOptions.width,
2248
- scale: exportingOptions.scale,
2249
- svg: svg
2250
- }, exportingOptions.fetchOptions);
2251
- }
2252
- /**
2253
- * Return the unfiltered innerHTML of the chart container. Used as hook for
2254
- * plugins. In styled mode, it also takes care of inlining CSS style rules.
2255
- *
2256
- * @see Chart#getSVG
2257
- *
2258
- * @function Highcharts.Chart#getChartHTML
2259
- *
2260
- * @return {string}
2261
- * The unfiltered SVG of the chart.
2262
- *
2263
- * @requires modules/exporting
2264
- */
2265
- function getChartHTML(applyStyleSheets) {
2266
- if (applyStyleSheets) {
2267
- this.inlineStyles();
2268
- }
2269
- this.resolveCSSVariables();
2270
- return this.container.innerHTML;
2271
- }
2272
- /**
2273
- * Get the default file name used for exported charts. By default it creates
2274
- * a file name based on the chart title.
2275
- *
2276
- * @function Highcharts.Chart#getFilename
2277
- *
2278
- * @return {string} A file name without extension.
2279
- *
2280
- * @requires modules/exporting
2281
- */
2282
- function getFilename() {
2283
- const s = this.userOptions.title && this.userOptions.title.text;
2284
- let filename = this.options.exporting.filename;
2285
- if (filename) {
2286
- return filename.replace(/\//g, '-');
2287
- }
2288
- if (typeof s === 'string') {
2289
- filename = s
2290
- .toLowerCase()
2291
- .replace(/<\/?[^>]+(>|$)/g, '') // Strip HTML tags
2292
- .replace(/[\s_]+/g, '-')
2293
- .replace(/[^a-z\d\-]/g, '') // Preserve only latin
2294
- .replace(/^[\-]+/g, '') // Dashes in the start
2295
- .replace(/[\-]+/g, '-') // Dashes in a row
2296
- .substr(0, 24)
2297
- .replace(/[\-]+$/g, ''); // Dashes in the end;
2298
- }
2299
- if (!filename || filename.length < 5) {
2300
- filename = 'chart';
2301
- }
2302
- return filename;
2303
- }
2304
- /**
2305
- * Return an SVG representation of the chart.
2306
- *
2307
- * @sample highcharts/members/chart-getsvg/
2308
- * View the SVG from a button
2309
- *
2310
- * @function Highcharts.Chart#getSVG
2311
- *
2312
- * @param {Highcharts.Options} [chartOptions]
2313
- * Additional chart options for the generated SVG representation. For
2314
- * collections like `xAxis`, `yAxis` or `series`, the additional
2315
- * options is either merged in to the original item of the same
2316
- * `id`, or to the first item if a common id is not found.
2317
- *
2318
- * @return {string}
2319
- * The SVG representation of the rendered chart.
2320
- *
2321
- * @emits Highcharts.Chart#event:getSVG
2322
- *
2323
- * @requires modules/exporting
2324
- */
2325
- function getSVG(chartOptions) {
2326
- const chart = this;
2327
- let svg, seriesOptions,
2328
- // Copy the options and add extra options
2329
- options = merge(chart.options, chartOptions);
2330
- // Use userOptions to make the options chain in series right (#3881)
2331
- options.plotOptions = merge(chart.userOptions.plotOptions, chartOptions && chartOptions.plotOptions);
2332
- // ... and likewise with time, avoid that undefined time properties are
2333
- // merged over legacy global time options
2334
- options.time = merge(chart.userOptions.time, chartOptions && chartOptions.time);
2335
- // Create a sandbox where a new chart will be generated
2336
- const sandbox = createElement('div', null, {
2337
- position: 'absolute',
2338
- top: '-9999em',
2339
- width: chart.chartWidth + 'px',
2340
- height: chart.chartHeight + 'px'
2341
- }, Exporting_doc.body);
2342
- // Get the source size
2343
- const cssWidth = chart.renderTo.style.width, cssHeight = chart.renderTo.style.height, sourceWidth = options.exporting.sourceWidth ||
2344
- options.chart.width ||
2345
- (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
2346
- (options.isGantt ? 800 : 600), sourceHeight = options.exporting.sourceHeight ||
2347
- options.chart.height ||
2348
- (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
2349
- 400;
2350
- // Override some options
2351
- extend(options.chart, {
2352
- animation: false,
2353
- renderTo: sandbox,
2354
- forExport: true,
2355
- renderer: 'SVGRenderer',
2356
- width: sourceWidth,
2357
- height: sourceHeight
2358
- });
2359
- options.exporting.enabled = false; // Hide buttons in print
2360
- delete options.data; // #3004
2361
- // prepare for replicating the chart
2362
- options.series = [];
2363
- chart.series.forEach(function (serie) {
2364
- seriesOptions = merge(serie.userOptions, {
2365
- animation: false, // Turn off animation
2366
- enableMouseTracking: false,
2367
- showCheckbox: false,
2368
- visible: serie.visible
2369
- });
2370
- // Used for the navigator series that has its own option set
2371
- if (!seriesOptions.isInternal) {
2372
- options.series.push(seriesOptions);
2373
- }
2374
- });
2375
- const colls = {};
2376
- chart.axes.forEach(function (axis) {
2377
- // Assign an internal key to ensure a one-to-one mapping (#5924)
2378
- if (!axis.userOptions.internalKey) { // #6444
2379
- axis.userOptions.internalKey = uniqueKey();
2380
- }
2381
- if (!axis.options.isInternal) {
2382
- if (!colls[axis.coll]) {
2383
- colls[axis.coll] = true;
2384
- options[axis.coll] = [];
2385
- }
2386
- options[axis.coll].push(merge(axis.userOptions, {
2387
- visible: axis.visible,
2388
- // Force some options that could have be set directly on
2389
- // the axis while missing in the userOptions or options.
2390
- type: axis.type,
2391
- uniqueNames: axis.uniqueNames
2392
- }));
2393
- }
2394
- });
2395
- // Make sure the `colorAxis` object of the `defaultOptions` isn't used
2396
- // in the chart copy's user options, because a color axis should only be
2397
- // added when the user actually applies it.
2398
- options.colorAxis = chart.userOptions.colorAxis;
2399
- // Generate the chart copy
2400
- const chartCopy = new chart.constructor(options, chart.callback);
2401
- // Axis options and series options (#2022, #3900, #5982)
2402
- if (chartOptions) {
2403
- ['xAxis', 'yAxis', 'series'].forEach(function (coll) {
2404
- const collOptions = {};
2405
- if (chartOptions[coll]) {
2406
- collOptions[coll] = chartOptions[coll];
2407
- chartCopy.update(collOptions);
2408
- }
2409
- });
2410
- }
2411
- // Reflect axis extremes in the export (#5924)
2412
- chart.axes.forEach(function (axis) {
2413
- const axisCopy = find(chartCopy.axes, (copy) => copy.options.internalKey === axis.userOptions.internalKey);
2414
- if (axisCopy) {
2415
- const extremes = axis.getExtremes(),
2416
- // Make sure min and max overrides in the
2417
- // `exporting.chartOptions.xAxis` settings are reflected.
2418
- // These should override user-set extremes via zooming,
2419
- // scrollbar etc (#7873).
2420
- exportOverride = splat(chartOptions?.[axis.coll] || {})[0], userMin = 'min' in exportOverride ?
2421
- exportOverride.min :
2422
- extremes.userMin, userMax = 'max' in exportOverride ?
2423
- exportOverride.max :
2424
- extremes.userMax;
2425
- if (((typeof userMin !== 'undefined' &&
2426
- userMin !== axisCopy.min) || (typeof userMax !== 'undefined' &&
2427
- userMax !== axisCopy.max))) {
2428
- axisCopy.setExtremes(userMin ?? void 0, userMax ?? void 0, true, false);
2429
- }
2430
- }
2431
- });
2432
- // Get the SVG from the container's innerHTML
2433
- svg = chartCopy.getChartHTML(chart.styledMode ||
2434
- options.exporting?.applyStyleSheets);
2435
- Exporting_fireEvent(this, 'getSVG', { chartCopy: chartCopy });
2436
- svg = chart.sanitizeSVG(svg, options);
2437
- // Free up memory
2438
- options = null;
2439
- chartCopy.destroy();
2440
- discardElement(sandbox);
2441
- return svg;
2442
- }
2443
- /**
2444
- * @private
2445
- * @function Highcharts.Chart#getSVGForExport
2446
- */
2447
- function getSVGForExport(options, chartOptions) {
2448
- const chartExportingOptions = this.options.exporting;
2449
- return this.getSVG(merge({ chart: { borderRadius: 0 } }, chartExportingOptions.chartOptions, chartOptions, {
2450
- exporting: {
2451
- sourceWidth: ((options && options.sourceWidth) ||
2452
- chartExportingOptions.sourceWidth),
2453
- sourceHeight: ((options && options.sourceHeight) ||
2454
- chartExportingOptions.sourceHeight)
2455
- }
2456
- }));
2457
- }
2458
- /**
2459
- * Make hyphenated property names out of camelCase
2460
- * @private
2461
- * @param {string} prop
2462
- * Property name in camelCase
2463
- * @return {string}
2464
- * Hyphenated property name
2465
- */
2466
- function hyphenate(prop) {
2467
- return prop.replace(/[A-Z]/g, function (match) {
2468
- return '-' + match.toLowerCase();
2469
- });
2470
- }
2471
- /**
2472
- * Analyze inherited styles from stylesheets and add them inline
2473
- *
2474
- * @private
2475
- * @function Highcharts.Chart#inlineStyles
2476
- *
2477
- * @todo What are the border styles for text about? In general, text has a
2478
- * lot of properties.
2479
- *
2480
- * @todo Make it work with IE9 and IE10.
2481
- *
2482
- * @requires modules/exporting
2483
- */
2484
- function inlineStyles() {
2485
- const denylist = inlineDenylist, allowlist = Exporting.inlineAllowlist, // For IE
2486
- defaultStyles = {};
2487
- let dummySVG;
2488
- // Create an iframe where we read default styles without pollution from
2489
- // this body
2490
- const iframe = Exporting_doc.createElement('iframe');
2491
- css(iframe, {
2492
- width: '1px',
2493
- height: '1px',
2494
- visibility: 'hidden'
2495
- });
2496
- Exporting_doc.body.appendChild(iframe);
2497
- const iframeDoc = (iframe.contentWindow && iframe.contentWindow.document);
2498
- if (iframeDoc) {
2499
- iframeDoc.body.appendChild(iframeDoc.createElementNS(SVG_NS, 'svg'));
2500
- }
2501
- /**
2502
- * Call this on all elements and recurse to children
2503
- * @private
2504
- * @param {Highcharts.HTMLDOMElement} node
2505
- * Element child
2506
- */
2507
- function recurse(node) {
2508
- const filteredStyles = {};
2509
- let styles, parentStyles, dummy, denylisted, allowlisted, i;
2510
- /**
2511
- * Check computed styles and whether they are in the allow/denylist
2512
- * for styles or attributes.
2513
- * @private
2514
- * @param {string} val
2515
- * Style value
2516
- * @param {string} prop
2517
- * Style property name
2518
- */
2519
- function filterStyles(val, prop) {
2520
- // Check against allowlist & denylist
2521
- denylisted = allowlisted = false;
2522
- if (allowlist.length) {
2523
- // Styled mode in IE has a allowlist instead. Exclude all
2524
- // props not in this list.
2525
- i = allowlist.length;
2526
- while (i-- && !allowlisted) {
2527
- allowlisted = allowlist[i].test(prop);
2528
- }
2529
- denylisted = !allowlisted;
2530
- }
2531
- // Explicitly remove empty transforms
2532
- if (prop === 'transform' && val === 'none') {
2533
- denylisted = true;
2534
- }
2535
- i = denylist.length;
2536
- while (i-- && !denylisted) {
2537
- if (prop.length > 1000 /* RegexLimits.shortLimit */) {
2538
- throw new Error('Input too long');
2539
- }
2540
- denylisted = (denylist[i].test(prop) ||
2541
- typeof val === 'function');
2542
- }
2543
- if (!denylisted) {
2544
- // If parent node has the same style, it gets inherited, no
2545
- // need to inline it. Top-level props should be diffed
2546
- // against parent (#7687).
2547
- if ((parentStyles[prop] !== val ||
2548
- node.nodeName === 'svg') &&
2549
- defaultStyles[node.nodeName][prop] !== val) {
2550
- // Attributes
2551
- if (!inlineToAttributes ||
2552
- inlineToAttributes.indexOf(prop) !== -1) {
2553
- if (val) {
2554
- node.setAttribute(hyphenate(prop), val);
2555
- }
2556
- // Styles
2557
- }
2558
- else {
2559
- filteredStyles[prop] = val;
2560
- }
2561
- }
2562
- }
2563
- }
2564
- if (iframeDoc &&
2565
- node.nodeType === 1 &&
2566
- unstyledElements.indexOf(node.nodeName) === -1) {
2567
- styles = Exporting_win.getComputedStyle(node, null);
2568
- parentStyles = node.nodeName === 'svg' ?
2569
- {} :
2570
- Exporting_win.getComputedStyle(node.parentNode, null);
2571
- // Get default styles from the browser so that we don't have to
2572
- // add these
2573
- if (!defaultStyles[node.nodeName]) {
2574
- /*
2575
- If (!dummySVG) {
2576
- dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
2577
- dummySVG.setAttribute('version', '1.1');
2578
- doc.body.appendChild(dummySVG);
2579
- }
2580
- */
2581
- dummySVG = iframeDoc.getElementsByTagName('svg')[0];
2582
- dummy = iframeDoc.createElementNS(node.namespaceURI, node.nodeName);
2583
- dummySVG.appendChild(dummy);
2584
- // Get the defaults into a standard object (simple merge
2585
- // won't do)
2586
- const s = Exporting_win.getComputedStyle(dummy, null), defaults = {};
2587
- for (const key in s) {
2588
- if (key.length < 1000 /* RegexLimits.shortLimit */ &&
2589
- typeof s[key] === 'string' &&
2590
- !/^\d+$/.test(key)) {
2591
- defaults[key] = s[key];
2592
- }
2593
- }
2594
- defaultStyles[node.nodeName] = defaults;
2595
- // Remove default fill, otherwise text disappears when
2596
- // exported
2597
- if (node.nodeName === 'text') {
2598
- delete defaultStyles.text.fill;
2599
- }
2600
- dummySVG.removeChild(dummy);
2601
- }
2602
- // Loop through all styles and add them inline if they are ok
2603
- for (const p in styles) {
2604
- if (
2605
- // Some browsers put lots of styles on the prototype...
2606
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isFirefox ||
2607
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS ||
2608
- (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari || // #16902
2609
- // ... Chrome puts them on the instance
2610
- Object.hasOwnProperty.call(styles, p)) {
2611
- filterStyles(styles[p], p);
2612
- }
2613
- }
2614
- // Apply styles
2615
- css(node, filteredStyles);
2616
- // Set default stroke width (needed at least for IE)
2617
- if (node.nodeName === 'svg') {
2618
- node.setAttribute('stroke-width', '1px');
2619
- }
2620
- if (node.nodeName === 'text') {
2621
- return;
2622
- }
2623
- // Recurse
2624
- [].forEach.call(node.children || node.childNodes, recurse);
2625
- }
2626
- }
2627
- /**
2628
- * Remove the dummy objects used to get defaults
2629
- * @private
2630
- */
2631
- function tearDown() {
2632
- dummySVG.parentNode.removeChild(dummySVG);
2633
- // Remove trash from DOM that stayed after each exporting
2634
- iframe.parentNode.removeChild(iframe);
2635
- }
2636
- recurse(this.container.querySelector('svg'));
2637
- tearDown();
2638
- }
2639
- /**
2640
- * Resolve CSS variables into hex colors
2641
- */
2642
- function resolveCSSVariables() {
2643
- const svgElements = this.container.querySelectorAll('*'), colorAttributes = ['color', 'fill', 'stop-color', 'stroke'];
2644
- Array.from(svgElements).forEach((element) => {
2645
- colorAttributes.forEach((attr) => {
2646
- const attrValue = element.getAttribute(attr);
2647
- if (attrValue?.includes('var(')) {
2648
- element.setAttribute(attr, getComputedStyle(element).getPropertyValue(attr));
2649
- }
2650
- });
2651
- });
2652
- }
2653
- /**
2654
- * Move the chart container(s) to another div.
2655
- *
2656
- * @function Highcharts#moveContainers
2657
- *
2658
- * @private
2659
- *
2660
- * @param {Highcharts.HTMLDOMElement} moveTo
2661
- * Move target
2662
- */
2663
- function moveContainers(moveTo) {
2664
- const { scrollablePlotArea } = this;
2665
- (
2666
- // When scrollablePlotArea is active (#9533)
2667
- scrollablePlotArea ?
2668
- [
2669
- scrollablePlotArea.fixedDiv,
2670
- scrollablePlotArea.scrollingContainer
2671
- ] :
2672
- [this.container]).forEach(function (div) {
2673
- moveTo.appendChild(div);
2674
- });
2675
- }
2676
- /**
2677
- * Add update methods to handle chart.update and chart.exporting.update and
2678
- * chart.navigation.update. These must be added to the chart instance rather
2679
- * than the Chart prototype in order to use the chart instance inside the
2680
- * update function.
2681
- * @private
2682
- */
2683
- function onChartInit() {
2684
- const chart = this,
2685
- /**
2686
- * @private
2687
- * @param {"exporting"|"navigation"} prop
2688
- * Property name in option root
2689
- * @param {Highcharts.ExportingOptions|Highcharts.NavigationOptions} options
2690
- * Options to update
2691
- * @param {boolean} [redraw=true]
2692
- * Whether to redraw
2693
- */
2694
- update = (prop, options, redraw) => {
2695
- chart.isDirtyExporting = true;
2696
- merge(true, chart.options[prop], options);
2697
- if (pick(redraw, true)) {
2698
- chart.redraw();
2699
- }
2700
- };
2701
- chart.exporting = {
2702
- update: function (options, redraw) {
2703
- update('exporting', options, redraw);
2704
- }
2705
- };
2706
- // Register update() method for navigation. Cannot be set the same way
2707
- // as for exporting, because navigation options are shared with bindings
2708
- // which has separate update() logic.
2709
- Chart_ChartNavigationComposition
2710
- .compose(chart).navigation
2711
- .addUpdate((options, redraw) => {
2712
- update('navigation', options, redraw);
2713
- });
2714
- }
2715
- /**
2716
- * On layout of titles (title, subtitle and caption), adjust the `alignTo``
2717
- * box to avoid the context menu button.
2718
- * @private
2719
- */
2720
- function onChartLayOutTitle({ alignTo, key, textPxLength }) {
2721
- const exportingOptions = this.options.exporting, { align, buttonSpacing = 0, verticalAlign, width = 0 } = merge(this.options.navigation?.buttonOptions, exportingOptions?.buttons?.contextButton), space = alignTo.width - textPxLength, widthAdjust = width + buttonSpacing;
2722
- if ((exportingOptions?.enabled ?? true) &&
2723
- key === 'title' &&
2724
- align === 'right' &&
2725
- verticalAlign === 'top') {
2726
- if (space < 2 * widthAdjust) {
2727
- if (space < widthAdjust) {
2728
- alignTo.width -= widthAdjust;
2729
- }
2730
- else if (this.title?.alignValue !== 'left') {
2731
- alignTo.x -= widthAdjust - space / 2;
2732
- }
2733
- }
2734
- }
2735
- }
2736
- /**
2737
- * Exporting module required. Clears away other elements in the page and
2738
- * prints the chart as it is displayed. By default, when the exporting
2739
- * module is enabled, a context button with a drop down menu in the upper
2740
- * right corner accesses this function.
2741
- *
2742
- * @sample highcharts/members/chart-print/
2743
- * Print from a HTML button
2744
- *
2745
- * @function Highcharts.Chart#print
2746
- *
2747
- *
2748
- * @emits Highcharts.Chart#event:beforePrint
2749
- * @emits Highcharts.Chart#event:afterPrint
2750
- *
2751
- * @requires modules/exporting
2752
- */
2753
- function print() {
2754
- const chart = this;
2755
- if (chart.isPrinting) { // Block the button while in printing mode
2756
- return;
2757
- }
2758
- printingChart = chart;
2759
- if (!(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
2760
- chart.beforePrint();
2761
- }
2762
- // Give the browser time to draw WebGL content, an issue that randomly
2763
- // appears (at least) in Chrome ~67 on the Mac (#8708).
2764
- setTimeout(() => {
2765
- Exporting_win.focus(); // #1510
2766
- Exporting_win.print();
2767
- // Allow the browser to prepare before reverting
2768
- if (!(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isSafari) {
2769
- setTimeout(() => {
2770
- chart.afterPrint();
2771
- }, 1000);
2772
- }
2773
- }, 1);
2774
- }
2775
- /**
2776
- * Add the buttons on chart load
2777
- * @private
2778
- * @function Highcharts.Chart#renderExporting
2779
- * @requires modules/exporting
2780
- */
2781
- function renderExporting() {
2782
- const chart = this, exportingOptions = chart.options.exporting, buttons = exportingOptions.buttons, isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
2783
- chart.buttonOffset = 0;
2784
- if (chart.isDirtyExporting) {
2785
- chart.destroyExport();
2786
- }
2787
- if (isDirty && exportingOptions.enabled !== false) {
2788
- chart.exportEvents = [];
2789
- chart.exportingGroup = chart.exportingGroup ||
2790
- chart.renderer.g('exporting-group').attr({
2791
- zIndex: 3 // #4955, // #8392
2792
- }).add();
2793
- objectEach(buttons, function (button) {
2794
- chart.addButton(button);
2795
- });
2796
- chart.isDirtyExporting = false;
2797
- }
2798
- }
2799
- /**
2800
- * Exporting module only. A collection of fixes on the produced SVG to
2801
- * account for expand properties, browser bugs.
2802
- * Returns a cleaned SVG.
2803
- *
2804
- * @private
2805
- * @function Highcharts.Chart#sanitizeSVG
2806
- * @param {string} svg
2807
- * SVG code to sanitize
2808
- * @param {Highcharts.Options} options
2809
- * Chart options to apply
2810
- * @return {string}
2811
- * Sanitized SVG code
2812
- * @requires modules/exporting
2813
- */
2814
- function sanitizeSVG(svg, options) {
2815
- const split = svg.indexOf('</svg>') + 6, useForeignObject = svg.indexOf('<foreignObject') > -1;
2816
- let html = svg.substr(split);
2817
- // Remove any HTML added to the container after the SVG (#894, #9087)
2818
- svg = svg.substr(0, split);
2819
- if (useForeignObject) {
2820
- // Some tags needs to be closed in xhtml (#13726)
2821
- svg = svg.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />');
2822
- // Move HTML into a foreignObject
2823
- }
2824
- else if (html && options?.exporting?.allowHTML) {
2825
- html = '<foreignObject x="0" y="0" ' +
2826
- 'width="' + options.chart.width + '" ' +
2827
- 'height="' + options.chart.height + '">' +
2828
- '<body xmlns="http://www.w3.org/1999/xhtml">' +
2829
- // Some tags needs to be closed in xhtml (#13726)
2830
- html.replace(/(<(?:img|br).*?(?=\>))>/g, '$1 />') +
2831
- '</body>' +
2832
- '</foreignObject>';
2833
- svg = svg.replace('</svg>', html + '</svg>');
2834
- }
2835
- svg = svg
2836
- .replace(/zIndex="[^"]+"/g, '')
2837
- .replace(/symbolName="[^"]+"/g, '')
2838
- .replace(/jQuery\d+="[^"]+"/g, '')
2839
- .replace(/url\(("|&quot;)(.*?)("|&quot;)\;?\)/g, 'url($2)')
2840
- .replace(/url\([^#]+#/g, 'url(#')
2841
- .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
2842
- .replace(/ (NS\d+\:)?href=/g, ' xlink:href=') // #3567
2843
- .replace(/\n+/g, ' ')
2844
- // Replace HTML entities, issue #347
2845
- .replace(/&nbsp;/g, '\u00A0') // No-break space
2846
- .replace(/&shy;/g, '\u00AD'); // Soft hyphen
2847
- return svg;
2848
- }
2849
- })(Exporting || (Exporting = {}));
2850
- /* *
2851
- *
2852
- * Default Export
2853
- *
2854
- * */
2855
- /* harmony default export */ const Exporting_Exporting = (Exporting);
2856
- /* *
2857
- *
2858
- * API Declarations
2859
- *
2860
- * */
2861
- /**
2862
- * Gets fired after a chart is printed through the context menu item or the
2863
- * Chart.print method.
2864
- *
2865
- * @callback Highcharts.ExportingAfterPrintCallbackFunction
2866
- *
2867
- * @param {Highcharts.Chart} this
2868
- * The chart on which the event occurred.
2869
- *
2870
- * @param {global.Event} event
2871
- * The event that occurred.
2872
- */
2873
- /**
2874
- * Gets fired before a chart is printed through the context menu item or the
2875
- * Chart.print method.
2876
- *
2877
- * @callback Highcharts.ExportingBeforePrintCallbackFunction
2878
- *
2879
- * @param {Highcharts.Chart} this
2880
- * The chart on which the event occurred.
2881
- *
2882
- * @param {global.Event} event
2883
- * The event that occurred.
2884
- */
2885
- /**
2886
- * Function to call if the offline-exporting module fails to export a chart on
2887
- * the client side.
2888
- *
2889
- * @callback Highcharts.ExportingErrorCallbackFunction
2890
- *
2891
- * @param {Highcharts.ExportingOptions} options
2892
- * The exporting options.
2893
- *
2894
- * @param {global.Error} err
2895
- * The error from the module.
2896
- */
2897
- /**
2898
- * Definition for a menu item in the context menu.
2899
- *
2900
- * @interface Highcharts.ExportingMenuObject
2901
- */ /**
2902
- * The text for the menu item.
2903
- *
2904
- * @name Highcharts.ExportingMenuObject#text
2905
- * @type {string|undefined}
2906
- */ /**
2907
- * If internationalization is required, the key to a language string.
2908
- *
2909
- * @name Highcharts.ExportingMenuObject#textKey
2910
- * @type {string|undefined}
2911
- */ /**
2912
- * The click handler for the menu item.
2913
- *
2914
- * @name Highcharts.ExportingMenuObject#onclick
2915
- * @type {Highcharts.EventCallbackFunction<Highcharts.Chart>|undefined}
2916
- */ /**
2917
- * Indicates a separator line instead of an item.
2918
- *
2919
- * @name Highcharts.ExportingMenuObject#separator
2920
- * @type {boolean|undefined}
2921
- */
2922
- /**
2923
- * Possible MIME types for exporting.
2924
- *
2925
- * @typedef {"image/png"|"image/jpeg"|"application/pdf"|"image/svg+xml"} Highcharts.ExportingMimeTypeValue
2926
- */
2927
- (''); // Keeps doclets above in transpiled file
2928
- /* *
2929
- *
2930
- * API Options
2931
- *
2932
- * */
2933
- /**
2934
- * Fires after a chart is printed through the context menu item or the
2935
- * `Chart.print` method.
2936
- *
2937
- * @sample highcharts/chart/events-beforeprint-afterprint/
2938
- * Rescale the chart to print
2939
- *
2940
- * @type {Highcharts.ExportingAfterPrintCallbackFunction}
2941
- * @since 4.1.0
2942
- * @context Highcharts.Chart
2943
- * @requires modules/exporting
2944
- * @apioption chart.events.afterPrint
2945
- */
2946
- /**
2947
- * Fires before a chart is printed through the context menu item or
2948
- * the `Chart.print` method.
2949
- *
2950
- * @sample highcharts/chart/events-beforeprint-afterprint/
2951
- * Rescale the chart to print
2952
- *
2953
- * @type {Highcharts.ExportingBeforePrintCallbackFunction}
2954
- * @since 4.1.0
2955
- * @context Highcharts.Chart
2956
- * @requires modules/exporting
2957
- * @apioption chart.events.beforePrint
2958
- */
2959
- (''); // Keeps doclets above in transpiled file
2960
-
2961
- ;// ./code/es-modules/Extensions/OfflineExporting/OfflineExportingDefaults.js
2962
- /* *
2963
- *
2964
- * (c) 2010-2025 Torstein Honsi
2965
- *
2966
- * License: www.highcharts.com/license
2967
- *
2968
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
2969
- *
2970
- * */
2971
-
2972
- /* *
2973
- *
2974
- * Declarations
2975
- *
2976
- * */
2977
- const OfflineExportingDefaults = {
2978
- libURL: 'https://code.highcharts.com/12.2.0/lib/',
2979
- // When offline-exporting is loaded, redefine the menu item definitions
2980
- // related to download.
2981
- menuItemDefinitions: {
2982
- downloadPNG: {
2983
- textKey: 'downloadPNG',
2984
- onclick: function () {
2985
- this.exportChartLocal();
2986
- }
2987
- },
2988
- downloadJPEG: {
2989
- textKey: 'downloadJPEG',
2990
- onclick: function () {
2991
- this.exportChartLocal({
2992
- type: 'image/jpeg'
2993
- });
2994
- }
2995
- },
2996
- downloadSVG: {
2997
- textKey: 'downloadSVG',
2998
- onclick: function () {
2999
- this.exportChartLocal({
3000
- type: 'image/svg+xml'
3001
- });
3002
- }
3003
- },
3004
- downloadPDF: {
3005
- textKey: 'downloadPDF',
3006
- onclick: function () {
3007
- this.exportChartLocal({
3008
- type: 'application/pdf'
3009
- });
3010
- }
3011
- }
3012
- }
3013
- };
3014
- /* *
3015
- *
3016
- * Default Export
3017
- *
3018
- * */
3019
- /* harmony default export */ const OfflineExporting_OfflineExportingDefaults = (OfflineExportingDefaults);
3020
-
3021
- ;// ./code/es-modules/Extensions/OfflineExporting/OfflineExporting.js
3022
- /* *
3023
- *
3024
- * Client side exporting module
3025
- *
3026
- * (c) 2015 Torstein Honsi / Oystein Moseng
3027
- *
3028
- * License: www.highcharts.com/license
3029
- *
3030
- * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
3031
- *
3032
- * */
3033
-
3034
-
3035
-
3036
-
3037
- const { defaultOptions: OfflineExporting_defaultOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
3038
-
3039
- const { downloadURL: OfflineExporting_downloadURL } = Extensions_DownloadURL;
3040
-
3041
-
3042
- const { doc: OfflineExporting_doc, win: OfflineExporting_win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
3043
-
3044
- const { ajax } = (highcharts_HttpUtilities_commonjs_highcharts_HttpUtilities_commonjs2_highcharts_HttpUtilities_root_Highcharts_HttpUtilities_default());
3045
-
3046
-
3047
- const { addEvent: OfflineExporting_addEvent, error, extend: OfflineExporting_extend, fireEvent: OfflineExporting_fireEvent, merge: OfflineExporting_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
3048
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().allowedAttributes.push('data-z-index', 'fill-opacity', 'filter', 'rx', 'ry', 'stroke-dasharray', 'stroke-linejoin', 'stroke-opacity', 'text-anchor', 'transform', 'version', 'viewBox', 'visibility', 'xmlns', 'xmlns:xlink');
3049
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().allowedTags.push('desc', 'clippath', 'g');
3050
- /* *
3051
- *
3052
- * Composition
3053
- *
3054
- * */
3055
- var OfflineExporting;
3056
- (function (OfflineExporting) {
3057
- /* *
3058
- *
3059
- * Declarations
3060
- *
3061
- * */
3062
- /* *
3063
- *
3064
- * Constants
3065
- *
3066
- * */
3067
- // Dummy object so we can reuse our canvas-tools.js without errors
3068
- OfflineExporting.CanVGRenderer = {}, OfflineExporting.domurl = OfflineExporting_win.URL || OfflineExporting_win.webkitURL || OfflineExporting_win,
3069
- // Milliseconds to defer image load event handlers to offset IE bug
3070
- OfflineExporting.loadEventDeferDelay = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS ? 150 : 0;
3071
- /* *
3072
- *
3073
- * Functions
3074
- *
3075
- * */
3076
- /* eslint-disable valid-jsdoc */
3077
- /**
3078
- * Extends OfflineExporting with Chart.
3079
- * @private
3080
- */
3081
- function compose(ChartClass) {
3082
- const chartProto = ChartClass.prototype;
3083
- if (!chartProto.exportChartLocal) {
3084
- chartProto.getSVGForLocalExport = getSVGForLocalExport;
3085
- chartProto.exportChartLocal = exportChartLocal;
3086
- // Extend the default options to use the local exporter logic
3087
- OfflineExporting_merge(true, OfflineExporting_defaultOptions.exporting, OfflineExporting_OfflineExportingDefaults);
3088
- }
3089
- return ChartClass;
3090
- }
3091
- OfflineExporting.compose = compose;
3092
- /**
3093
- * Get data URL to an image of an SVG and call download on it options
3094
- * object:
3095
- * - **filename:** Name of resulting downloaded file without extension.
3096
- * Default is `chart`.
3097
- *
3098
- * - **type:** File type of resulting download. Default is `image/png`.
3099
- *
3100
- * - **scale:** Scaling factor of downloaded image compared to source.
3101
- * Default is `1`.
3102
- * - **libURL:** URL pointing to location of dependency scripts to download
3103
- * on demand. Default is the exporting.libURL option of the global
3104
- * Highcharts options pointing to our server.
3105
- *
3106
- * @function Highcharts.downloadSVGLocal
3107
- *
3108
- * @param {string} svg
3109
- * The generated SVG
3110
- *
3111
- * @param {Highcharts.ExportingOptions} options
3112
- * The exporting options
3113
- *
3114
- * @param {Function} failCallback
3115
- * The callback function in case of errors
3116
- *
3117
- * @param {Function} [successCallback]
3118
- * The callback function in case of success
3119
- *
3120
- */
3121
- function downloadSVGLocal(svg, options, failCallback, successCallback) {
3122
- const dummySVGContainer = OfflineExporting_doc.createElement('div'), imageType = options.type || 'image/png', filename = ((options.filename || 'chart') +
3123
- '.' +
3124
- (imageType === 'image/svg+xml' ?
3125
- 'svg' : imageType.split('/')[1])), scale = options.scale || 1;
3126
- let svgurl, blob, finallyHandler, libURL = (options.libURL || OfflineExporting_defaultOptions.exporting.libURL), objectURLRevoke = true, pdfFont = options.pdfFont;
3127
- // Allow libURL to end with or without fordward slash
3128
- libURL = libURL.slice(-1) !== '/' ? libURL + '/' : libURL;
3129
- /*
3130
- * Detect if we need to load TTF fonts for the PDF, then load them and
3131
- * proceed.
3132
- *
3133
- * @private
3134
- */
3135
- const loadPdfFonts = (svgElement, callback) => {
3136
- const hasNonASCII = (s) => (
3137
- // eslint-disable-next-line no-control-regex
3138
- /[^\u0000-\u007F\u200B]+/.test(s));
3139
- // Register an event in order to add the font once jsPDF is
3140
- // initialized
3141
- const addFont = (variant, base64) => {
3142
- OfflineExporting_win.jspdf.jsPDF.API.events.push([
3143
- 'initialized',
3144
- function () {
3145
- this.addFileToVFS(variant, base64);
3146
- this.addFont(variant, 'HighchartsFont', variant);
3147
- if (!this.getFontList().HighchartsFont) {
3148
- this.setFont('HighchartsFont');
3149
- }
3150
- }
3151
- ]);
3152
- };
3153
- // If there are no non-ASCII characters in the SVG, do not use
3154
- // bother downloading the font files
3155
- if (pdfFont && !hasNonASCII(svgElement.textContent || '')) {
3156
- pdfFont = void 0;
3157
- }
3158
- // Add new font if the URL is declared, #6417.
3159
- const variants = ['normal', 'italic', 'bold', 'bolditalic'];
3160
- // Shift the first element off the variants and add as a font.
3161
- // Then asynchronously trigger the next variant until calling the
3162
- // callback when the variants are empty.
3163
- let normalBase64;
3164
- const shiftAndLoadVariant = () => {
3165
- const variant = variants.shift();
3166
- // All variants shifted and possibly loaded, proceed
3167
- if (!variant) {
3168
- return callback();
3169
- }
3170
- const url = pdfFont && pdfFont[variant];
3171
- if (url) {
3172
- ajax({
3173
- url,
3174
- responseType: 'blob',
3175
- success: (data, xhr) => {
3176
- const reader = new FileReader();
3177
- reader.onloadend = function () {
3178
- if (typeof this.result === 'string') {
3179
- const base64 = this.result.split(',')[1];
3180
- addFont(variant, base64);
3181
- if (variant === 'normal') {
3182
- normalBase64 = base64;
3183
- }
3184
- }
3185
- shiftAndLoadVariant();
3186
- };
3187
- reader.readAsDataURL(xhr.response);
3188
- },
3189
- error: shiftAndLoadVariant
3190
- });
3191
- }
3192
- else {
3193
- // For other variants, fall back to normal text weight/style
3194
- if (normalBase64) {
3195
- addFont(variant, normalBase64);
3196
- }
3197
- shiftAndLoadVariant();
3198
- }
3199
- };
3200
- shiftAndLoadVariant();
3201
- };
3202
- /*
3203
- * @private
3204
- */
3205
- const downloadPDF = () => {
3206
- highcharts_AST_commonjs_highcharts_AST_commonjs2_highcharts_AST_root_Highcharts_AST_default().setElementHTML(dummySVGContainer, svg);
3207
- const textElements = dummySVGContainer.getElementsByTagName('text'),
3208
- // Copy style property to element from parents if it's not
3209
- // there. Searches up hierarchy until it finds prop, or hits the
3210
- // chart container.
3211
- setStylePropertyFromParents = function (el, propName) {
3212
- let curParent = el;
3213
- while (curParent && curParent !== dummySVGContainer) {
3214
- if (curParent.style[propName]) {
3215
- let value = curParent.style[propName];
3216
- if (propName === 'fontSize' && /em$/.test(value)) {
3217
- value = Math.round(parseFloat(value) * 16) + 'px';
3218
- }
3219
- el.style[propName] = value;
3220
- break;
3221
- }
3222
- curParent = curParent.parentNode;
3223
- }
3224
- };
3225
- let titleElements, outlineElements;
3226
- // Workaround for the text styling. Making sure it does pick up
3227
- // settings for parent elements.
3228
- [].forEach.call(textElements, function (el) {
3229
- // Workaround for the text styling. making sure it does pick up
3230
- // the root element
3231
- ['fontFamily', 'fontSize']
3232
- .forEach((property) => {
3233
- setStylePropertyFromParents(el, property);
3234
- });
3235
- el.style.fontFamily = pdfFont && pdfFont.normal ?
3236
- // Custom PDF font
3237
- 'HighchartsFont' :
3238
- // Generic font (serif, sans-serif etc)
3239
- String(el.style.fontFamily &&
3240
- el.style.fontFamily.split(' ').splice(-1));
3241
- // Workaround for plotband with width, removing title from text
3242
- // nodes
3243
- titleElements = el.getElementsByTagName('title');
3244
- [].forEach.call(titleElements, function (titleElement) {
3245
- el.removeChild(titleElement);
3246
- });
3247
- // Remove all .highcharts-text-outline elements, #17170
3248
- outlineElements =
3249
- el.getElementsByClassName('highcharts-text-outline');
3250
- while (outlineElements.length > 0) {
3251
- const outline = outlineElements[0];
3252
- if (outline.parentNode) {
3253
- outline.parentNode.removeChild(outline);
3254
- }
3255
- }
3256
- });
3257
- const svgNode = dummySVGContainer.querySelector('svg');
3258
- if (svgNode) {
3259
- loadPdfFonts(svgNode, () => {
3260
- svgToPdf(svgNode, 0, scale, (pdfData) => {
3261
- try {
3262
- OfflineExporting_downloadURL(pdfData, filename);
3263
- if (successCallback) {
3264
- successCallback();
3265
- }
3266
- }
3267
- catch (e) {
3268
- failCallback(e);
3269
- }
3270
- });
3271
- });
3272
- }
3273
- };
3274
- // Initiate download depending on file type
3275
- if (imageType === 'image/svg+xml') {
3276
- // SVG download. In this case, we want to use Microsoft specific
3277
- // Blob if available
3278
- try {
3279
- if (typeof OfflineExporting_win.MSBlobBuilder !== 'undefined') {
3280
- blob = new OfflineExporting_win.MSBlobBuilder();
3281
- blob.append(svg);
3282
- svgurl = blob.getBlob('image/svg+xml');
3283
- }
3284
- else {
3285
- svgurl = svgToDataUrl(svg);
3286
- }
3287
- OfflineExporting_downloadURL(svgurl, filename);
3288
- if (successCallback) {
3289
- successCallback();
3290
- }
3291
- }
3292
- catch (e) {
3293
- failCallback(e);
3294
- }
3295
- }
3296
- else if (imageType === 'application/pdf') {
3297
- if (OfflineExporting_win.jspdf && OfflineExporting_win.jspdf.jsPDF) {
3298
- downloadPDF();
3299
- }
3300
- else {
3301
- // Must load pdf libraries first. // Don't destroy the object
3302
- // URL yet since we are doing things asynchronously. A cleaner
3303
- // solution would be nice, but this will do for now.
3304
- objectURLRevoke = true;
3305
- getScript(libURL + 'jspdf.js', function () {
3306
- getScript(libURL + 'svg2pdf.js', downloadPDF);
3307
- });
3308
- }
3309
- }
3310
- else {
3311
- // PNG/JPEG download - create bitmap from SVG
3312
- svgurl = svgToDataUrl(svg);
3313
- finallyHandler = function () {
3314
- try {
3315
- OfflineExporting.domurl.revokeObjectURL(svgurl);
3316
- }
3317
- catch (e) {
3318
- // Ignore
3319
- }
3320
- };
3321
- // First, try to get PNG by rendering on canvas
3322
- imageToDataUrl(svgurl, imageType, {}, scale, function (imageURL) {
3323
- // Success
3324
- try {
3325
- OfflineExporting_downloadURL(imageURL, filename);
3326
- if (successCallback) {
3327
- successCallback();
3328
- }
3329
- }
3330
- catch (e) {
3331
- failCallback(e);
3332
- }
3333
- }, function () {
3334
- if (svg.length > 100000000 /* RegexLimits.svgLimit */) {
3335
- throw new Error('Input too long');
3336
- }
3337
- // Failed due to tainted canvas
3338
- // Create new and untainted canvas
3339
- const canvas = OfflineExporting_doc.createElement('canvas'), ctx = canvas.getContext('2d'), matchedImageWidth = svg.match(
3340
- // eslint-disable-next-line max-len
3341
- /^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), matchedImageHeight = svg.match(
3342
- // eslint-disable-next-line max-len
3343
- /^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
3344
- if (ctx && matchedImageWidth && matchedImageHeight) {
3345
- const imageWidth = +matchedImageWidth[1] * scale, imageHeight = +matchedImageHeight[1] * scale, downloadWithCanVG = () => {
3346
- const v = OfflineExporting_win.canvg.Canvg.fromString(ctx, svg);
3347
- v.start();
3348
- try {
3349
- OfflineExporting_downloadURL(OfflineExporting_win.navigator.msSaveOrOpenBlob ?
3350
- canvas.msToBlob() :
3351
- canvas.toDataURL(imageType), filename);
3352
- if (successCallback) {
3353
- successCallback();
3354
- }
3355
- }
3356
- catch (e) {
3357
- failCallback(e);
3358
- }
3359
- finally {
3360
- finallyHandler();
3361
- }
3362
- };
3363
- canvas.width = imageWidth;
3364
- canvas.height = imageHeight;
3365
- if (OfflineExporting_win.canvg) {
3366
- // Use preloaded canvg
3367
- downloadWithCanVG();
3368
- }
3369
- else {
3370
- // Must load canVG first.
3371
- // Don't destroy the object URL yet since we are
3372
- // doing things asynchronously. A cleaner solution
3373
- // would be nice, but this will do for now.
3374
- objectURLRevoke = true;
3375
- getScript(libURL + 'canvg.js', downloadWithCanVG);
3376
- }
3377
- }
3378
- },
3379
- // No canvas support
3380
- failCallback,
3381
- // Failed to load image
3382
- failCallback,
3383
- // Finally
3384
- function () {
3385
- if (objectURLRevoke) {
3386
- finallyHandler();
3387
- }
3388
- });
3389
- }
3390
- }
3391
- OfflineExporting.downloadSVGLocal = downloadSVGLocal;
3392
- /* eslint-disable valid-jsdoc */
3393
- /**
3394
- * Exporting and offline-exporting modules required. Export a chart to
3395
- * an image locally in the user's browser.
3396
- *
3397
- * @function Highcharts.Chart#exportChartLocal
3398
- *
3399
- * @param {Highcharts.ExportingOptions} [exportingOptions]
3400
- * Exporting options, the same as in
3401
- * {@link Highcharts.Chart#exportChart}.
3402
- *
3403
- * @param {Highcharts.Options} [chartOptions]
3404
- * Additional chart options for the exported chart. For example
3405
- * a different background color can be added here, or
3406
- * `dataLabels` for export only.
3407
- *
3408
- *
3409
- * @requires modules/exporting
3410
- * @requires modules/offline-exporting
3411
- */
3412
- function exportChartLocal(exportingOptions, chartOptions) {
3413
- const chart = this, options = OfflineExporting_merge(chart.options.exporting, exportingOptions), fallbackToExportServer = function (err) {
3414
- if (options.fallbackToExportServer === false) {
3415
- if (options.error) {
3416
- options.error(options, err);
3417
- }
3418
- else {
3419
- error(28, true); // Fallback disabled
3420
- }
3421
- }
3422
- else {
3423
- chart.exportChart(options);
3424
- }
3425
- }, svgSuccess = function (svg) {
3426
- // If SVG contains foreignObjects PDF fails in all browsers
3427
- // and all exports except SVG will fail in IE, as both CanVG
3428
- // and svg2pdf choke on this. Gracefully fall back.
3429
- if (svg.indexOf('<foreignObject') > -1 &&
3430
- options.type !== 'image/svg+xml' &&
3431
- ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS || options.type === 'application/pdf')) {
3432
- fallbackToExportServer(new Error('Image type not supported for charts with embedded HTML'));
3433
- }
3434
- else {
3435
- OfflineExporting.downloadSVGLocal(svg, OfflineExporting_extend({ filename: chart.getFilename() }, options), fallbackToExportServer, () => OfflineExporting_fireEvent(chart, 'exportChartLocalSuccess'));
3436
- }
3437
- },
3438
- // Return true if the SVG contains images with external data. With
3439
- // the boost module there are `image` elements with encoded PNGs,
3440
- // these are supported by svg2pdf and should pass (#10243).
3441
- hasExternalImages = function () {
3442
- return [].some.call(chart.container.getElementsByTagName('image'), function (image) {
3443
- const href = image.getAttribute('href');
3444
- return (href !== '' &&
3445
- typeof href === 'string' &&
3446
- href.indexOf('data:') !== 0);
3447
- });
3448
- };
3449
- // If we are on IE and in styled mode, add an allowlist to the renderer
3450
- // for inline styles that we want to pass through. There are so many
3451
- // styles by default in IE that we don't want to denylist them all.
3452
- if ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS && chart.styledMode && !Exporting_Exporting.inlineAllowlist.length) {
3453
- Exporting_Exporting.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/);
3454
- }
3455
- // Always fall back on:
3456
- // - MS browsers: Embedded images JPEG/PNG, or any PDF
3457
- // - Embedded images and PDF
3458
- if (((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()).isMS &&
3459
- (options.type === 'application/pdf' ||
3460
- chart.container.getElementsByTagName('image').length &&
3461
- options.type !== 'image/svg+xml')) || (options.type === 'application/pdf' &&
3462
- hasExternalImages())) {
3463
- fallbackToExportServer(new Error('Image type not supported for this chart/browser.'));
3464
- return;
3465
- }
3466
- chart.getSVGForLocalExport(options, chartOptions || {}, fallbackToExportServer, svgSuccess);
3467
- }
3468
- /**
3469
- * Downloads a script and executes a callback when done.
3470
- *
3471
- * @private
3472
- * @function getScript
3473
- * @param {string} scriptLocation
3474
- * @param {Function} callback
3475
- */
3476
- function getScript(scriptLocation, callback) {
3477
- const head = OfflineExporting_doc.getElementsByTagName('head')[0], script = OfflineExporting_doc.createElement('script');
3478
- script.type = 'text/javascript';
3479
- script.src = scriptLocation;
3480
- script.onload = callback;
3481
- script.onerror = function () {
3482
- error('Error loading script ' + scriptLocation);
3483
- };
3484
- head.appendChild(script);
3485
- }
3486
- OfflineExporting.getScript = getScript;
3487
- /**
3488
- * Get SVG of chart prepared for client side export. This converts
3489
- * embedded images in the SVG to data URIs. It requires the regular
3490
- * exporting module. The options and chartOptions arguments are passed
3491
- * to the getSVGForExport function.
3492
- *
3493
- * @private
3494
- * @function Highcharts.Chart#getSVGForLocalExport
3495
- * @param {Highcharts.ExportingOptions} options
3496
- * @param {Highcharts.Options} chartOptions
3497
- * @param {Function} failCallback
3498
- * @param {Function} successCallback
3499
- */
3500
- function getSVGForLocalExport(options, chartOptions, failCallback, successCallback) {
3501
- const chart = this,
3502
- // After grabbing the SVG of the chart's copy container we need
3503
- // to do sanitation on the SVG
3504
- sanitize = (svg) => chart.sanitizeSVG(svg, chartCopyOptions),
3505
- // When done with last image we have our SVG
3506
- checkDone = () => {
3507
- if (images && imagesEmbedded === imagesLength) {
3508
- successCallback(sanitize(chartCopyContainer.innerHTML));
3509
- }
3510
- },
3511
- // Success handler, we converted image to base64!
3512
- embeddedSuccess = (imageURL, imageType, callbackArgs) => {
3513
- ++imagesEmbedded;
3514
- // Change image href in chart copy
3515
- callbackArgs.imageElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', imageURL);
3516
- checkDone();
3517
- };
3518
- let el, chartCopyContainer, chartCopyOptions, href = null, images, imagesLength = 0, imagesEmbedded = 0;
3519
- // Hook into getSVG to get a copy of the chart copy's
3520
- // container (#8273)
3521
- chart.unbindGetSVG = OfflineExporting_addEvent(chart, 'getSVG', (e) => {
3522
- chartCopyOptions = e.chartCopy.options;
3523
- chartCopyContainer = e.chartCopy.container.cloneNode(true);
3524
- images = chartCopyContainer && chartCopyContainer
3525
- .getElementsByTagName('image') || [];
3526
- imagesLength = images.length;
3527
- });
3528
- // Trigger hook to get chart copy
3529
- chart.getSVGForExport(options, chartOptions);
3530
- try {
3531
- // If there are no images to embed, the SVG is okay now.
3532
- if (!images || !images.length) {
3533
- // Use SVG of chart copy
3534
- successCallback(sanitize(chartCopyContainer.innerHTML));
3535
- return;
3536
- }
3537
- // Go through the images we want to embed
3538
- for (let i = 0; i < images.length; i++) {
3539
- el = images[i];
3540
- href = el.getAttributeNS('http://www.w3.org/1999/xlink', 'href');
3541
- if (href) {
3542
- OfflineExporting.imageToDataUrl(href, 'image/png', { imageElement: el }, options.scale, embeddedSuccess,
3543
- // Tainted canvas
3544
- failCallback,
3545
- // No canvas support
3546
- failCallback,
3547
- // Failed to load source
3548
- failCallback);
3549
- // Hidden, boosted series have blank href (#10243)
3550
- }
3551
- else {
3552
- imagesEmbedded++;
3553
- el.parentNode.removeChild(el);
3554
- i--;
3555
- checkDone();
3556
- }
3557
- }
3558
- }
3559
- catch (e) {
3560
- failCallback(e);
3561
- }
3562
- // Clean up
3563
- chart.unbindGetSVG();
3564
- }
3565
- /**
3566
- * Get data:URL from image URL. Pass in callbacks to handle results.
3567
- *
3568
- * @private
3569
- * @function Highcharts.imageToDataUrl
3570
- *
3571
- * @param {string} imageURL
3572
- *
3573
- * @param {string} imageType
3574
- *
3575
- * @param {*} callbackArgs
3576
- * callbackArgs is used only by callbacks.
3577
- *
3578
- * @param {number} scale
3579
- *
3580
- * @param {Function} successCallback
3581
- * Receives four arguments: imageURL, imageType, callbackArgs,
3582
- * and scale.
3583
- *
3584
- * @param {Function} taintedCallback
3585
- * Receives four arguments: imageURL, imageType, callbackArgs,
3586
- * and scale.
3587
- *
3588
- * @param {Function} noCanvasSupportCallback
3589
- * Receives four arguments: imageURL, imageType, callbackArgs,
3590
- * and scale.
3591
- *
3592
- * @param {Function} failedLoadCallback
3593
- * Receives four arguments: imageURL, imageType, callbackArgs,
3594
- * and scale.
3595
- *
3596
- * @param {Function} [finallyCallback]
3597
- * finallyCallback is always called at the end of the process. All
3598
- * callbacks receive four arguments: imageURL, imageType,
3599
- * callbackArgs, and scale.
3600
- */
3601
- function imageToDataUrl(imageURL, imageType, callbackArgs, scale, successCallback, taintedCallback, noCanvasSupportCallback, failedLoadCallback, finallyCallback) {
3602
- let img = new OfflineExporting_win.Image(), taintedHandler;
3603
- const loadHandler = () => {
3604
- setTimeout(function () {
3605
- const canvas = OfflineExporting_doc.createElement('canvas'), ctx = canvas.getContext && canvas.getContext('2d');
3606
- let dataURL;
3607
- try {
3608
- if (!ctx) {
3609
- noCanvasSupportCallback(imageURL, imageType, callbackArgs, scale);
3610
- }
3611
- else {
3612
- canvas.height = img.height * scale;
3613
- canvas.width = img.width * scale;
3614
- ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
3615
- // Now we try to get the contents of the canvas.
3616
- try {
3617
- dataURL = canvas.toDataURL(imageType);
3618
- successCallback(dataURL, imageType, callbackArgs, scale);
3619
- }
3620
- catch (e) {
3621
- taintedHandler(imageURL, imageType, callbackArgs, scale);
3622
- }
3623
- }
3624
- }
3625
- finally {
3626
- if (finallyCallback) {
3627
- finallyCallback(imageURL, imageType, callbackArgs, scale);
3628
- }
3629
- }
3630
- // IE bug where image is not always ready despite calling load
3631
- // event.
3632
- }, OfflineExporting.loadEventDeferDelay);
3633
- },
3634
- // Image load failed (e.g. invalid URL)
3635
- errorHandler = () => {
3636
- failedLoadCallback(imageURL, imageType, callbackArgs, scale);
3637
- if (finallyCallback) {
3638
- finallyCallback(imageURL, imageType, callbackArgs, scale);
3639
- }
3640
- };
3641
- // This is called on load if the image drawing to canvas failed with a
3642
- // security error. We retry the drawing with crossOrigin set to
3643
- // Anonymous.
3644
- taintedHandler = () => {
3645
- img = new OfflineExporting_win.Image();
3646
- taintedHandler = taintedCallback;
3647
- // Must be set prior to loading image source
3648
- img.crossOrigin = 'Anonymous';
3649
- img.onload = loadHandler;
3650
- img.onerror = errorHandler;
3651
- img.src = imageURL;
3652
- };
3653
- img.onload = loadHandler;
3654
- img.onerror = errorHandler;
3655
- img.src = imageURL;
3656
- }
3657
- OfflineExporting.imageToDataUrl = imageToDataUrl;
3658
- /**
3659
- * Get blob URL from SVG code. Falls back to normal data URI.
3660
- *
3661
- * @private
3662
- * @function Highcharts.svgToDataURL
3663
- */
3664
- function svgToDataUrl(svg) {
3665
- // Webkit and not chrome
3666
- const userAgent = OfflineExporting_win.navigator.userAgent;
3667
- const webKit = (userAgent.indexOf('WebKit') > -1 &&
3668
- userAgent.indexOf('Chrome') < 0);
3669
- try {
3670
- // Safari requires data URI since it doesn't allow navigation to
3671
- // blob URLs. ForeignObjects also don't work well in Blobs in Chrome
3672
- // (#14780).
3673
- if (!webKit && svg.indexOf('<foreignObject') === -1) {
3674
- return OfflineExporting.domurl.createObjectURL(new OfflineExporting_win.Blob([svg], {
3675
- type: 'image/svg+xml;charset-utf-16'
3676
- }));
3677
- }
3678
- }
3679
- catch (e) {
3680
- // Ignore
3681
- }
3682
- return 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(svg);
3683
- }
3684
- OfflineExporting.svgToDataUrl = svgToDataUrl;
3685
- /* eslint-disable valid-jsdoc */
3686
- /**
3687
- * @private
3688
- */
3689
- function svgToPdf(svgElement, margin, scale, callback) {
660
+ async function svgToPdf(svgElement, margin, scale) {
3690
661
  const width = (Number(svgElement.getAttribute('width')) + 2 * margin) *
3691
662
  scale, height = (Number(svgElement.getAttribute('height')) + 2 * margin) *
3692
663
  scale, pdfDoc = new OfflineExporting_win.jspdf.jsPDF(// eslint-disable-line new-cap
3693
- // setting orientation to portrait if height exceeds width
664
+ // Setting orientation to portrait if height exceeds width
3694
665
  height > width ? 'p' : 'l', 'pt', [width, height]);
3695
666
  // Workaround for #7090, hidden elements were drawn anyway. It comes
3696
667
  // down to https://github.com/yWorks/svg2pdf.js/issues/28. Check this
@@ -3721,19 +692,21 @@ var OfflineExporting;
3721
692
  tspan.setAttribute('dx', -5);
3722
693
  }
3723
694
  });
3724
- pdfDoc.svg(svgElement, {
695
+ // Transform from PDF to SVG
696
+ await pdfDoc.svg(svgElement, {
3725
697
  x: 0,
3726
698
  y: 0,
3727
699
  width,
3728
700
  height,
3729
701
  removeInvalid: true
3730
- }).then(() => callback(pdfDoc.output('datauristring')));
702
+ });
703
+ // Return the output
704
+ return pdfDoc.output('datauristring');
3731
705
  }
3732
- OfflineExporting.svgToPdf = svgToPdf;
3733
706
  })(OfflineExporting || (OfflineExporting = {}));
3734
707
  /* *
3735
708
  *
3736
- * Default Export
709
+ * Default Export
3737
710
  *
3738
711
  * */
3739
712
  /* harmony default export */ const OfflineExporting_OfflineExporting = (OfflineExporting);
@@ -3750,7 +723,7 @@ G.dataURLtoBlob = G.dataURLtoBlob || Extensions_DownloadURL.dataURLtoBlob;
3750
723
  G.downloadSVGLocal = OfflineExporting_OfflineExporting.downloadSVGLocal;
3751
724
  G.downloadURL = G.downloadURL || Extensions_DownloadURL.downloadURL;
3752
725
  // Compose
3753
- OfflineExporting_OfflineExporting.compose(G.Chart);
726
+ OfflineExporting_OfflineExporting.compose(G.Exporting);
3754
727
  /* harmony default export */ const offline_exporting_src = ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()));
3755
728
 
3756
729
  __webpack_exports__ = __webpack_exports__["default"];