@bino-bi/bn-template-engine 1.0.0-alpha.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 (673) hide show
  1. package/LICENSE +21 -0
  2. package/dist/bn-template-engine/assets/bar.png +0 -0
  3. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +195076 -0
  4. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +142007 -0
  5. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  6. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  7. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  8. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  9. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  10. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  11. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  12. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  13. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  14. package/dist/bn-template-engine/assets/matrix.png +0 -0
  15. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -0
  16. package/dist/bn-template-engine/index.esm.js +0 -0
  17. package/dist/bn-template-engine/p--TeDldm8.js +1 -0
  18. package/dist/bn-template-engine/p-0e7dc113.entry.js +1 -0
  19. package/dist/bn-template-engine/p-1jFf17Vj.js +1 -0
  20. package/dist/bn-template-engine/p-264c6bad.entry.js +1 -0
  21. package/dist/bn-template-engine/p-326a0902.entry.js +1 -0
  22. package/dist/bn-template-engine/p-38a8bde3.entry.js +1 -0
  23. package/dist/bn-template-engine/p-577eafcd.entry.js +1 -0
  24. package/dist/bn-template-engine/p-5905cc43.entry.js +1 -0
  25. package/dist/bn-template-engine/p-5d155a72.entry.js +1 -0
  26. package/dist/bn-template-engine/p-65f8962a.entry.js +1 -0
  27. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +1 -0
  28. package/dist/bn-template-engine/p-7995acb2.entry.js +1 -0
  29. package/dist/bn-template-engine/p-7afe431e.entry.js +1 -0
  30. package/dist/bn-template-engine/p-8014b1ac.entry.js +1 -0
  31. package/dist/bn-template-engine/p-80423fc8.entry.js +1 -0
  32. package/dist/bn-template-engine/p-91e74d42.entry.js +1 -0
  33. package/dist/bn-template-engine/p-930a9e29.entry.js +1 -0
  34. package/dist/bn-template-engine/p-93C9jL8R.js +1 -0
  35. package/dist/bn-template-engine/p-93ff8584.entry.js +1 -0
  36. package/dist/bn-template-engine/p-B0m0U4wJ.js +1 -0
  37. package/dist/bn-template-engine/p-B27Ax6P_.js +2 -0
  38. package/dist/bn-template-engine/p-B79VcHiT.js +1 -0
  39. package/dist/bn-template-engine/p-BBd0ZVLL.js +1 -0
  40. package/dist/bn-template-engine/p-BFTU3MAI.js +1 -0
  41. package/dist/bn-template-engine/p-BFatTBqh.js +1 -0
  42. package/dist/bn-template-engine/p-BQp6ZPYW.js +1 -0
  43. package/dist/bn-template-engine/p-BYmPQYxx.js +1 -0
  44. package/dist/bn-template-engine/p-BhEQy-2D.js +1 -0
  45. package/dist/bn-template-engine/p-BtVfu16B.js +1 -0
  46. package/dist/bn-template-engine/p-CY1RzLjU.js +1 -0
  47. package/dist/bn-template-engine/p-CfWnag33.js +1 -0
  48. package/dist/bn-template-engine/p-CnI71OA9.js +1 -0
  49. package/dist/bn-template-engine/p-Cp4MVxCu.js +1 -0
  50. package/dist/bn-template-engine/p-DQuL1Twl.js +1 -0
  51. package/dist/bn-template-engine/p-DbyXf6dF.js +1 -0
  52. package/dist/bn-template-engine/p-TdL-LRR9.js +1 -0
  53. package/dist/bn-template-engine/p-_LBTIfNN.js +1 -0
  54. package/dist/bn-template-engine/p-a342cd3c.entry.js +1 -0
  55. package/dist/bn-template-engine/p-ad94cf63.entry.js +1 -0
  56. package/dist/bn-template-engine/p-bc37d750.entry.js +1 -0
  57. package/dist/bn-template-engine/p-c9f050bf.entry.js +1 -0
  58. package/dist/bn-template-engine/p-d07a0ca3.entry.js +1 -0
  59. package/dist/bn-template-engine/p-e5f372af.entry.js +1 -0
  60. package/dist/bn-template-engine/p-e620028c.entry.js +1 -0
  61. package/dist/bn-template-engine/p-e81e116a.entry.js +1 -0
  62. package/dist/bn-template-engine/p-eca98070.entry.js +1 -0
  63. package/dist/bn-template-engine/p-ee6de950.entry.js +1 -0
  64. package/dist/bn-template-engine/p-efe0ef1e.entry.js +1 -0
  65. package/dist/bn-template-engine/p-f034f1b8.entry.js +1 -0
  66. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +1 -0
  67. package/dist/bn-template-engine/p-fe573a1a.entry.js +1 -0
  68. package/dist/bn-template-engine/p-kMyLevYy.js +1 -0
  69. package/dist/cjs/DataFormatDigits-DmTbhF8q.js +142 -0
  70. package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +453 -0
  71. package/dist/cjs/Order-B4NIqQWe.js +129 -0
  72. package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +7973 -0
  73. package/dist/cjs/StringAdapter-0EbYMkR0.js +136 -0
  74. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +10 -0
  75. package/dist/cjs/alasql.min-C_nHTuEQ.js +306 -0
  76. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  77. package/dist/cjs/bn-asset.cjs.entry.js +42 -0
  78. package/dist/cjs/bn-body_3.cjs.entry.js +413 -0
  79. package/dist/cjs/bn-card.cjs.entry.js +37 -0
  80. package/dist/cjs/bn-chart-structure.cjs.entry.js +705 -0
  81. package/dist/cjs/bn-chart-time.cjs.entry.js +987 -0
  82. package/dist/cjs/bn-component-style.cjs.entry.js +44 -0
  83. package/dist/cjs/bn-context_5.cjs.entry.js +3380 -0
  84. package/dist/cjs/bn-dataset.cjs.entry.js +278 -0
  85. package/dist/cjs/bn-grid.cjs.entry.js +407 -0
  86. package/dist/cjs/bn-image.cjs.entry.js +57 -0
  87. package/dist/cjs/bn-internationalization.cjs.entry.js +40 -0
  88. package/dist/cjs/bn-layout-card.cjs.entry.js +128 -0
  89. package/dist/cjs/bn-layout-page.cjs.entry.js +142 -0
  90. package/dist/cjs/bn-map.cjs.entry.js +425 -0
  91. package/dist/cjs/bn-message.cjs.entry.js +52 -0
  92. package/dist/cjs/bn-template-engine.cjs.js +52 -0
  93. package/dist/cjs/bn-template.cjs.entry.js +20 -0
  94. package/dist/cjs/bn-text.cjs.entry.js +286 -0
  95. package/dist/cjs/bn-tree.cjs.entry.js +969 -0
  96. package/dist/cjs/componentRegister-C17UFNPh.js +72 -0
  97. package/dist/cjs/constants-DHqQXSSd.js +158 -0
  98. package/dist/cjs/context-protocol-BkYHFkXE.js +661 -0
  99. package/dist/cjs/editor-companion.cjs.entry.js +49 -0
  100. package/dist/cjs/formatter-DIJL_crx.js +215 -0
  101. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +2906 -0
  102. package/dist/cjs/ibcs-chart-time.cjs.entry.js +4140 -0
  103. package/dist/cjs/ibcs-map.cjs.entry.js +1075 -0
  104. package/dist/cjs/ibcs-title.cjs.entry.js +352 -0
  105. package/dist/cjs/index-CScBFiS1.js +4653 -0
  106. package/dist/cjs/index.cjs.js +2 -0
  107. package/dist/cjs/loader.cjs.js +13 -0
  108. package/dist/cjs/luxon-8hyy5YD7.js +8132 -0
  109. package/dist/cjs/scaling-B23eOtsC.js +67 -0
  110. package/dist/cjs/test-runner-card.cjs.entry.js +27 -0
  111. package/dist/cjs/test-runner-chart-time.cjs.entry.js +230 -0
  112. package/dist/cjs/test-runner-chart.cjs.entry.js +326 -0
  113. package/dist/cjs/test-runner-map.cjs.entry.js +1862 -0
  114. package/dist/cjs/test-runner-table.cjs.entry.js +477 -0
  115. package/dist/cjs/test-runner-time.cjs.entry.js +381 -0
  116. package/dist/cjs/test-runner-title.cjs.entry.js +115 -0
  117. package/dist/cjs/withBodyObserver-B0_W1VOf.js +39 -0
  118. package/dist/cjs/withComponentStatus-BrxL7usr.js +39 -0
  119. package/dist/cjs/withComponentStyle-C6KHnZHt.js +128 -0
  120. package/dist/cjs/withDataset-ZdN-RRTx.js +146 -0
  121. package/dist/cjs/withHasError-Dspb3lIV.js +154 -0
  122. package/dist/cjs/withStyled-Bf-stJTR.js +567 -0
  123. package/dist/cjs/withTranslation-Cz0M5maV.js +77 -0
  124. package/dist/collection/collection-manifest.json +48 -0
  125. package/dist/collection/components/bn-asset/bn-asset.css +3 -0
  126. package/dist/collection/components/bn-asset/bn-asset.js +67 -0
  127. package/dist/collection/components/bn-body/bn-body.css +9 -0
  128. package/dist/collection/components/bn-body/bn-body.js +38 -0
  129. package/dist/collection/components/bn-card/bn-card.css +21 -0
  130. package/dist/collection/components/bn-card/bn-card.js +38 -0
  131. package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +105 -0
  132. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +1047 -0
  133. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +594 -0
  134. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +979 -0
  135. package/dist/collection/components/bn-chart-structure/utils/elements/Axis.js +39 -0
  136. package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +293 -0
  137. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +136 -0
  138. package/dist/collection/components/bn-chart-structure/utils/elements/Marker.js +118 -0
  139. package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +151 -0
  140. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +83 -0
  141. package/dist/collection/components/bn-chart-structure/utils/elements/index.js +6 -0
  142. package/dist/collection/components/bn-chart-structure/utils/factories/ScenarioFactory.js +119 -0
  143. package/dist/collection/components/bn-chart-structure/utils/factories/index.js +1 -0
  144. package/dist/collection/components/bn-chart-structure/utils/helper/CustomPattern.js +45 -0
  145. package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +210 -0
  146. package/dist/collection/components/bn-chart-structure/utils/helper/MarkerPattern.js +46 -0
  147. package/dist/collection/components/bn-chart-structure/utils/helper/Padding.js +13 -0
  148. package/dist/collection/components/bn-chart-structure/utils/helper/index.js +15 -0
  149. package/dist/collection/components/bn-chart-structure/utils/model/DataPoint.js +101 -0
  150. package/dist/collection/components/bn-chart-structure/utils/model/OverflowConfig.js +1 -0
  151. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +106 -0
  152. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartDataRow.js +127 -0
  153. package/dist/collection/components/bn-chart-structure/utils/model/index.js +45 -0
  154. package/dist/collection/components/bn-chart-structure/utils/model/styles/ScaleFactorsStructureChart.js +99 -0
  155. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +58 -0
  156. package/dist/collection/components/bn-chart-time/bn-chart-time.css +17 -0
  157. package/dist/collection/components/bn-chart-time/bn-chart-time.js +1510 -0
  158. package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +96 -0
  159. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +829 -0
  160. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +1388 -0
  161. package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +83 -0
  162. package/dist/collection/components/bn-chart-time/utils/elements/Axis.js +42 -0
  163. package/dist/collection/components/bn-chart-time/utils/elements/Column.js +266 -0
  164. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +174 -0
  165. package/dist/collection/components/bn-chart-time/utils/elements/Line.js +150 -0
  166. package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +267 -0
  167. package/dist/collection/components/bn-chart-time/utils/elements/Marker.js +121 -0
  168. package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +148 -0
  169. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +107 -0
  170. package/dist/collection/components/bn-chart-time/utils/elements/index.js +8 -0
  171. package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +146 -0
  172. package/dist/collection/components/bn-chart-time/utils/factories/index.js +1 -0
  173. package/dist/collection/components/bn-chart-time/utils/helper/CustomPattern.js +46 -0
  174. package/dist/collection/components/bn-chart-time/utils/helper/ElementPositions.js +178 -0
  175. package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +199 -0
  176. package/dist/collection/components/bn-chart-time/utils/helper/MarkerPattern.js +84 -0
  177. package/dist/collection/components/bn-chart-time/utils/helper/Padding.js +13 -0
  178. package/dist/collection/components/bn-chart-time/utils/helper/index.js +5 -0
  179. package/dist/collection/components/bn-chart-time/utils/model/DataPoint.js +93 -0
  180. package/dist/collection/components/bn-chart-time/utils/model/OverflowConfig.js +1 -0
  181. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +150 -0
  182. package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +146 -0
  183. package/dist/collection/components/bn-chart-time/utils/model/index.js +45 -0
  184. package/dist/collection/components/bn-chart-time/utils/model/styles/ScaleFactorsTimeChart.js +99 -0
  185. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +54 -0
  186. package/dist/collection/components/bn-component-style/bn-component-style.css +3 -0
  187. package/dist/collection/components/bn-component-style/bn-component-style.js +69 -0
  188. package/dist/collection/components/bn-context/bn-context.css +3 -0
  189. package/dist/collection/components/bn-context/bn-context.js +96 -0
  190. package/dist/collection/components/bn-dataset/bn-dataset.css +3 -0
  191. package/dist/collection/components/bn-dataset/bn-dataset.js +159 -0
  192. package/dist/collection/components/bn-datasource/bn-datasource.css +3 -0
  193. package/dist/collection/components/bn-datasource/bn-datasource.js +70 -0
  194. package/dist/collection/components/bn-footer/assets/bar.png +0 -0
  195. package/dist/collection/components/bn-footer/assets/matrix.png +0 -0
  196. package/dist/collection/components/bn-footer/bn-footer.css +40 -0
  197. package/dist/collection/components/bn-footer/bn-footer.js +146 -0
  198. package/dist/collection/components/bn-grid/bn-grid.css +37 -0
  199. package/dist/collection/components/bn-grid/bn-grid.js +467 -0
  200. package/dist/collection/components/bn-grid/utils/GridConfig.js +114 -0
  201. package/dist/collection/components/bn-image/bn-image.css +10 -0
  202. package/dist/collection/components/bn-image/bn-image.js +78 -0
  203. package/dist/collection/components/bn-internationalization/bn-internationalization.css +3 -0
  204. package/dist/collection/components/bn-internationalization/bn-internationalization.js +84 -0
  205. package/dist/collection/components/bn-layout-card/bn-layout-card.css +25 -0
  206. package/dist/collection/components/bn-layout-card/bn-layout-card.js +534 -0
  207. package/dist/collection/components/bn-layout-page/bn-layout-page.css +10 -0
  208. package/dist/collection/components/bn-layout-page/bn-layout-page.js +624 -0
  209. package/dist/collection/components/bn-map/bn-map.css +4 -0
  210. package/dist/collection/components/bn-map/bn-map.js +725 -0
  211. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +195076 -0
  212. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +142007 -0
  213. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  214. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  215. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  216. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  217. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  218. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  219. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  220. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  221. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  222. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +674 -0
  223. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +744 -0
  224. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +9 -0
  225. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +13 -0
  226. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +11 -0
  227. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +2 -0
  228. package/dist/collection/components/bn-message/assets/bar.png +0 -0
  229. package/dist/collection/components/bn-message/assets/matrix.png +0 -0
  230. package/dist/collection/components/bn-message/bn-message.css +31 -0
  231. package/dist/collection/components/bn-message/bn-message.js +96 -0
  232. package/dist/collection/components/bn-page/bn-page.css +252 -0
  233. package/dist/collection/components/bn-page/bn-page.js +118 -0
  234. package/dist/collection/components/bn-table/bn-table.css +5 -0
  235. package/dist/collection/components/bn-table/bn-table.js +1475 -0
  236. package/dist/collection/components/bn-table/ibcs-table.css +322 -0
  237. package/dist/collection/components/bn-table/ibcs-table.js +757 -0
  238. package/dist/collection/components/bn-table/utils/Table.js +182 -0
  239. package/dist/collection/components/bn-table/utils/elements/Cell.js +66 -0
  240. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +251 -0
  241. package/dist/collection/components/bn-table/utils/elements/TableRow.js +88 -0
  242. package/dist/collection/components/bn-table/utils/elements/index.js +3 -0
  243. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +380 -0
  244. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +62 -0
  245. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +750 -0
  246. package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +38 -0
  247. package/dist/collection/components/bn-table/utils/helper/index.js +1 -0
  248. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +136 -0
  249. package/dist/collection/components/bn-table/utils/model/TableDataRow.js +134 -0
  250. package/dist/collection/components/bn-table/utils/model/TableDrillGroup.js +42 -0
  251. package/dist/collection/components/bn-table/utils/model/index.js +63 -0
  252. package/dist/collection/components/bn-template/bn-template.js +38 -0
  253. package/dist/collection/components/bn-text/bn-text.css +14 -0
  254. package/dist/collection/components/bn-text/bn-text.js +343 -0
  255. package/dist/collection/components/bn-title/bn-title.css +11 -0
  256. package/dist/collection/components/bn-title/bn-title.js +541 -0
  257. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +15 -0
  258. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +321 -0
  259. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +91 -0
  260. package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +86 -0
  261. package/dist/collection/components/bn-title/ibcs-title/utils/factories/index.js +1 -0
  262. package/dist/collection/components/bn-title/ibcs-title/utils/model/MeasureEntriy.js +25 -0
  263. package/dist/collection/components/bn-title/ibcs-title/utils/model/TimePeriod.js +33 -0
  264. package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +48 -0
  265. package/dist/collection/components/bn-title/ibcs-title/utils/model/index.js +6 -0
  266. package/dist/collection/components/bn-tree/bn-tree.css +40 -0
  267. package/dist/collection/components/bn-tree/bn-tree.js +520 -0
  268. package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +196 -0
  269. package/dist/collection/components/bn-tree/utils/TreeLayout.js +225 -0
  270. package/dist/collection/components/bn-tree/utils/TreeParser.js +180 -0
  271. package/dist/collection/components/editor-companion/editor-companion.css +3 -0
  272. package/dist/collection/components/editor-companion/editor-companion.js +130 -0
  273. package/dist/collection/context/context-protocol.js +84 -0
  274. package/dist/collection/declarations.js +1 -0
  275. package/dist/collection/index.js +2 -0
  276. package/dist/collection/stores/assets.js +12 -0
  277. package/dist/collection/stores/componentStyles.js +106 -0
  278. package/dist/collection/stores/context.js +1 -0
  279. package/dist/collection/stores/createScopedStores.js +31 -0
  280. package/dist/collection/stores/datasets.js +14 -0
  281. package/dist/collection/stores/datasetsMeta.js +14 -0
  282. package/dist/collection/stores/datasources.js +14 -0
  283. package/dist/collection/stores/internationalization.js +128 -0
  284. package/dist/collection/test-runner/test-runner-card.js +36 -0
  285. package/dist/collection/test-runner/test-runner-chart-time.js +234 -0
  286. package/dist/collection/test-runner/test-runner-chart.js +364 -0
  287. package/dist/collection/test-runner/test-runner-map.js +1901 -0
  288. package/dist/collection/test-runner/test-runner-table.js +469 -0
  289. package/dist/collection/test-runner/test-runner-time.js +399 -0
  290. package/dist/collection/test-runner/test-runner-title.js +108 -0
  291. package/dist/collection/utils/DataUriUtil.js +19 -0
  292. package/dist/collection/utils/DateStringFactory.js +448 -0
  293. package/dist/collection/utils/componentRegister.js +70 -0
  294. package/dist/collection/utils/constants.js +156 -0
  295. package/dist/collection/utils/dataAnalyzer.js +103 -0
  296. package/dist/collection/utils/datasetMetaCalculator.js +137 -0
  297. package/dist/collection/utils/flattenObject.js +28 -0
  298. package/dist/collection/utils/formatter.js +86 -0
  299. package/dist/collection/utils/helper/AdapterUtils.js +24 -0
  300. package/dist/collection/utils/helper/CompareUtil.js +42 -0
  301. package/dist/collection/utils/helper/IAdapter.js +1 -0
  302. package/dist/collection/utils/helper/StringAdapter.js +9 -0
  303. package/dist/collection/utils/ibcsRuleSet.js +120 -0
  304. package/dist/collection/utils/index.js +2 -0
  305. package/dist/collection/utils/model/ChartStyles.js +1 -0
  306. package/dist/collection/utils/model/DataFormatDigits.js +23 -0
  307. package/dist/collection/utils/model/DataQueryResultRow.js +1 -0
  308. package/dist/collection/utils/model/DatasetMeta.js +1 -0
  309. package/dist/collection/utils/model/DateFormat.js +1 -0
  310. package/dist/collection/utils/model/Order.js +56 -0
  311. package/dist/collection/utils/model/SiPrefix.js +23 -0
  312. package/dist/collection/utils/model/TextStyles.js +1 -0
  313. package/dist/collection/utils/model/VarianceScenario.js +33 -0
  314. package/dist/collection/utils/model/index.js +38 -0
  315. package/dist/collection/utils/model/styles/FontStyle.js +34 -0
  316. package/dist/collection/utils/model/styles/Padding.js +30 -0
  317. package/dist/collection/utils/model/styles/SVGStyle.js +47 -0
  318. package/dist/collection/utils/model/styles/SVGStyleGroup.js +48 -0
  319. package/dist/collection/utils/model/styles/SVGVariancesStyleGroup.js +45 -0
  320. package/dist/collection/utils/parentDimensions.js +44 -0
  321. package/dist/collection/utils/scaling.js +17 -0
  322. package/dist/collection/utils/stackColors.js +31 -0
  323. package/dist/collection/utils/styled/attributes.js +110 -0
  324. package/dist/collection/utils/styled/style-sheet.js +21 -0
  325. package/dist/collection/utils/styled/withStyled.js +71 -0
  326. package/dist/collection/utils/templateId.js +12 -0
  327. package/dist/collection/utils/utils.js +83 -0
  328. package/dist/collection/utils/validate.js +372 -0
  329. package/dist/collection/utils/withBodyObserver.js +35 -0
  330. package/dist/collection/utils/withComponentStatus.js +35 -0
  331. package/dist/collection/utils/withComponentStyle.js +74 -0
  332. package/dist/collection/utils/withDataset.js +142 -0
  333. package/dist/collection/utils/withDatasource.js +59 -0
  334. package/dist/collection/utils/withHasError.js +56 -0
  335. package/dist/collection/utils/withTranslation.js +73 -0
  336. package/dist/components/DataFormatDigits.js +1 -0
  337. package/dist/components/DateStringFactory.js +1 -0
  338. package/dist/components/Order.js +1 -0
  339. package/dist/components/SVGVariancesStyleGroup.js +1 -0
  340. package/dist/components/_commonjsHelpers.js +1 -0
  341. package/dist/components/alasql.min.js +1 -0
  342. package/dist/components/bn-asset.d.ts +11 -0
  343. package/dist/components/bn-asset.js +1 -0
  344. package/dist/components/bn-body.d.ts +11 -0
  345. package/dist/components/bn-body.js +1 -0
  346. package/dist/components/bn-body2.js +1 -0
  347. package/dist/components/bn-card.d.ts +11 -0
  348. package/dist/components/bn-card.js +1 -0
  349. package/dist/components/bn-card2.js +1 -0
  350. package/dist/components/bn-chart-structure.d.ts +11 -0
  351. package/dist/components/bn-chart-structure.js +1 -0
  352. package/dist/components/bn-chart-time.d.ts +11 -0
  353. package/dist/components/bn-chart-time.js +1 -0
  354. package/dist/components/bn-component-style.d.ts +11 -0
  355. package/dist/components/bn-component-style.js +1 -0
  356. package/dist/components/bn-context.d.ts +11 -0
  357. package/dist/components/bn-context.js +1 -0
  358. package/dist/components/bn-dataset.d.ts +11 -0
  359. package/dist/components/bn-dataset.js +1 -0
  360. package/dist/components/bn-datasource.d.ts +11 -0
  361. package/dist/components/bn-datasource.js +1 -0
  362. package/dist/components/bn-footer.d.ts +11 -0
  363. package/dist/components/bn-footer.js +1 -0
  364. package/dist/components/bn-footer2.js +1 -0
  365. package/dist/components/bn-grid.d.ts +11 -0
  366. package/dist/components/bn-grid.js +1 -0
  367. package/dist/components/bn-image.d.ts +11 -0
  368. package/dist/components/bn-image.js +1 -0
  369. package/dist/components/bn-internationalization.d.ts +11 -0
  370. package/dist/components/bn-internationalization.js +1 -0
  371. package/dist/components/bn-layout-card.d.ts +11 -0
  372. package/dist/components/bn-layout-card.js +1 -0
  373. package/dist/components/bn-layout-page.d.ts +11 -0
  374. package/dist/components/bn-layout-page.js +1 -0
  375. package/dist/components/bn-map.d.ts +11 -0
  376. package/dist/components/bn-map.js +1 -0
  377. package/dist/components/bn-message.d.ts +11 -0
  378. package/dist/components/bn-message.js +1 -0
  379. package/dist/components/bn-message2.js +1 -0
  380. package/dist/components/bn-page.d.ts +11 -0
  381. package/dist/components/bn-page.js +1 -0
  382. package/dist/components/bn-page2.js +1 -0
  383. package/dist/components/bn-table.d.ts +11 -0
  384. package/dist/components/bn-table.js +1 -0
  385. package/dist/components/bn-template.d.ts +11 -0
  386. package/dist/components/bn-template.js +1 -0
  387. package/dist/components/bn-text.d.ts +11 -0
  388. package/dist/components/bn-text.js +1 -0
  389. package/dist/components/bn-title.d.ts +11 -0
  390. package/dist/components/bn-title.js +1 -0
  391. package/dist/components/bn-title2.js +1 -0
  392. package/dist/components/bn-tree.d.ts +11 -0
  393. package/dist/components/bn-tree.js +1 -0
  394. package/dist/components/componentRegister.js +1 -0
  395. package/dist/components/context-protocol.js +1 -0
  396. package/dist/components/editor-companion.d.ts +11 -0
  397. package/dist/components/editor-companion.js +1 -0
  398. package/dist/components/ibcs-chart-structure.d.ts +11 -0
  399. package/dist/components/ibcs-chart-structure.js +1 -0
  400. package/dist/components/ibcs-chart-structure2.js +1 -0
  401. package/dist/components/ibcs-chart-time.d.ts +11 -0
  402. package/dist/components/ibcs-chart-time.js +1 -0
  403. package/dist/components/ibcs-chart-time2.js +1 -0
  404. package/dist/components/ibcs-map.d.ts +11 -0
  405. package/dist/components/ibcs-map.js +1 -0
  406. package/dist/components/ibcs-map2.js +1 -0
  407. package/dist/components/ibcs-table.d.ts +11 -0
  408. package/dist/components/ibcs-table.js +1 -0
  409. package/dist/components/ibcs-table2.js +1 -0
  410. package/dist/components/ibcs-title.d.ts +11 -0
  411. package/dist/components/ibcs-title.js +1 -0
  412. package/dist/components/ibcs-title2.js +1 -0
  413. package/dist/components/ibcsRuleSet.js +1 -0
  414. package/dist/components/index.d.ts +35 -0
  415. package/dist/components/index.js +1 -0
  416. package/dist/components/scaling.js +1 -0
  417. package/dist/components/test-runner-card.d.ts +11 -0
  418. package/dist/components/test-runner-card.js +1 -0
  419. package/dist/components/test-runner-chart-time.d.ts +11 -0
  420. package/dist/components/test-runner-chart-time.js +1 -0
  421. package/dist/components/test-runner-chart.d.ts +11 -0
  422. package/dist/components/test-runner-chart.js +1 -0
  423. package/dist/components/test-runner-map.d.ts +11 -0
  424. package/dist/components/test-runner-map.js +1 -0
  425. package/dist/components/test-runner-table.d.ts +11 -0
  426. package/dist/components/test-runner-table.js +1 -0
  427. package/dist/components/test-runner-time.d.ts +11 -0
  428. package/dist/components/test-runner-time.js +1 -0
  429. package/dist/components/test-runner-title.d.ts +11 -0
  430. package/dist/components/test-runner-title.js +1 -0
  431. package/dist/components/utils.js +1 -0
  432. package/dist/components/validate.js +1 -0
  433. package/dist/components/withBodyObserver.js +1 -0
  434. package/dist/components/withComponentStyle.js +1 -0
  435. package/dist/components/withDataset.js +1 -0
  436. package/dist/components/withHasError.js +1 -0
  437. package/dist/components/withStyled.js +1 -0
  438. package/dist/components/withTranslation.js +1 -0
  439. package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +137 -0
  440. package/dist/esm/DateStringFactory-_Qiv0IvF.js +451 -0
  441. package/dist/esm/Order-B4fpLe_f.js +125 -0
  442. package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +7961 -0
  443. package/dist/esm/StringAdapter-BLvo1Krl.js +133 -0
  444. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +7 -0
  445. package/dist/esm/alasql.min-CWu4NkIt.js +304 -0
  446. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  447. package/dist/esm/bn-asset.entry.js +40 -0
  448. package/dist/esm/bn-body_3.entry.js +409 -0
  449. package/dist/esm/bn-card.entry.js +35 -0
  450. package/dist/esm/bn-chart-structure.entry.js +703 -0
  451. package/dist/esm/bn-chart-time.entry.js +985 -0
  452. package/dist/esm/bn-component-style.entry.js +42 -0
  453. package/dist/esm/bn-context_5.entry.js +3374 -0
  454. package/dist/esm/bn-dataset.entry.js +276 -0
  455. package/dist/esm/bn-grid.entry.js +405 -0
  456. package/dist/esm/bn-image.entry.js +55 -0
  457. package/dist/esm/bn-internationalization.entry.js +38 -0
  458. package/dist/esm/bn-layout-card.entry.js +126 -0
  459. package/dist/esm/bn-layout-page.entry.js +140 -0
  460. package/dist/esm/bn-map.entry.js +423 -0
  461. package/dist/esm/bn-message.entry.js +50 -0
  462. package/dist/esm/bn-template-engine.js +48 -0
  463. package/dist/esm/bn-template.entry.js +18 -0
  464. package/dist/esm/bn-text.entry.js +284 -0
  465. package/dist/esm/bn-tree.entry.js +967 -0
  466. package/dist/esm/componentRegister-BtVfu16B.js +72 -0
  467. package/dist/esm/constants-kMyLevYy.js +158 -0
  468. package/dist/esm/context-protocol-DzeqZxg6.js +654 -0
  469. package/dist/esm/editor-companion.entry.js +47 -0
  470. package/dist/esm/formatter-DTMEZ6d8.js +211 -0
  471. package/dist/esm/ibcs-chart-structure.entry.js +2904 -0
  472. package/dist/esm/ibcs-chart-time.entry.js +4138 -0
  473. package/dist/esm/ibcs-map.entry.js +1073 -0
  474. package/dist/esm/ibcs-title.entry.js +350 -0
  475. package/dist/esm/index-B27Ax6P_.js +4635 -0
  476. package/dist/esm/index.js +1 -0
  477. package/dist/esm/loader.js +11 -0
  478. package/dist/esm/luxon-DbyXf6dF.js +8130 -0
  479. package/dist/esm/scaling-BBd0ZVLL.js +64 -0
  480. package/dist/esm/test-runner-card.entry.js +25 -0
  481. package/dist/esm/test-runner-chart-time.entry.js +228 -0
  482. package/dist/esm/test-runner-chart.entry.js +324 -0
  483. package/dist/esm/test-runner-map.entry.js +1860 -0
  484. package/dist/esm/test-runner-table.entry.js +475 -0
  485. package/dist/esm/test-runner-time.entry.js +379 -0
  486. package/dist/esm/test-runner-title.entry.js +113 -0
  487. package/dist/esm/withBodyObserver-gZpZiEIK.js +37 -0
  488. package/dist/esm/withComponentStatus-elELReKt.js +37 -0
  489. package/dist/esm/withComponentStyle-NaxfakAG.js +126 -0
  490. package/dist/esm/withDataset-BT2VQCsG.js +144 -0
  491. package/dist/esm/withHasError-C48fTE2k.js +150 -0
  492. package/dist/esm/withStyled-CpUTv74m.js +539 -0
  493. package/dist/esm/withTranslation-Do4GhleK.js +75 -0
  494. package/dist/index.cjs.js +1 -0
  495. package/dist/index.js +1 -0
  496. package/dist/types/components/bn-asset/bn-asset.d.ts +11 -0
  497. package/dist/types/components/bn-body/bn-body.d.ts +8 -0
  498. package/dist/types/components/bn-card/bn-card.d.ts +8 -0
  499. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +234 -0
  500. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +47 -0
  501. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +137 -0
  502. package/dist/types/components/bn-chart-structure/utils/elements/Axis.d.ts +29 -0
  503. package/dist/types/components/bn-chart-structure/utils/elements/Bar.d.ts +58 -0
  504. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +47 -0
  505. package/dist/types/components/bn-chart-structure/utils/elements/Marker.d.ts +33 -0
  506. package/dist/types/components/bn-chart-structure/utils/elements/Needle.d.ts +37 -0
  507. package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +25 -0
  508. package/dist/types/components/bn-chart-structure/utils/elements/index.d.ts +6 -0
  509. package/dist/types/components/bn-chart-structure/utils/factories/ScenarioFactory.d.ts +46 -0
  510. package/dist/types/components/bn-chart-structure/utils/factories/index.d.ts +1 -0
  511. package/dist/types/components/bn-chart-structure/utils/helper/CustomPattern.d.ts +20 -0
  512. package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +60 -0
  513. package/dist/types/components/bn-chart-structure/utils/helper/MarkerPattern.d.ts +28 -0
  514. package/dist/types/components/bn-chart-structure/utils/helper/Padding.d.ts +14 -0
  515. package/dist/types/components/bn-chart-structure/utils/helper/index.d.ts +13 -0
  516. package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +44 -0
  517. package/dist/types/components/bn-chart-structure/utils/model/OverflowConfig.d.ts +7 -0
  518. package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +60 -0
  519. package/dist/types/components/bn-chart-structure/utils/model/StructureChartDataRow.d.ts +61 -0
  520. package/dist/types/components/bn-chart-structure/utils/model/index.d.ts +108 -0
  521. package/dist/types/components/bn-chart-structure/utils/model/styles/ScaleFactorsStructureChart.d.ts +46 -0
  522. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +29 -0
  523. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +325 -0
  524. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +59 -0
  525. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +154 -0
  526. package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +23 -0
  527. package/dist/types/components/bn-chart-time/utils/elements/Axis.d.ts +28 -0
  528. package/dist/types/components/bn-chart-time/utils/elements/Column.d.ts +68 -0
  529. package/dist/types/components/bn-chart-time/utils/elements/Label.d.ts +55 -0
  530. package/dist/types/components/bn-chart-time/utils/elements/Line.d.ts +48 -0
  531. package/dist/types/components/bn-chart-time/utils/elements/LineSeries.d.ts +74 -0
  532. package/dist/types/components/bn-chart-time/utils/elements/Marker.d.ts +37 -0
  533. package/dist/types/components/bn-chart-time/utils/elements/Needle.d.ts +41 -0
  534. package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +40 -0
  535. package/dist/types/components/bn-chart-time/utils/elements/index.d.ts +8 -0
  536. package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +65 -0
  537. package/dist/types/components/bn-chart-time/utils/factories/index.d.ts +1 -0
  538. package/dist/types/components/bn-chart-time/utils/helper/CustomPattern.d.ts +22 -0
  539. package/dist/types/components/bn-chart-time/utils/helper/ElementPositions.d.ts +60 -0
  540. package/dist/types/components/bn-chart-time/utils/helper/LabelCollisionManager.d.ts +101 -0
  541. package/dist/types/components/bn-chart-time/utils/helper/MarkerPattern.d.ts +42 -0
  542. package/dist/types/components/bn-chart-time/utils/helper/Padding.d.ts +14 -0
  543. package/dist/types/components/bn-chart-time/utils/helper/index.d.ts +5 -0
  544. package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +44 -0
  545. package/dist/types/components/bn-chart-time/utils/model/OverflowConfig.d.ts +7 -0
  546. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +73 -0
  547. package/dist/types/components/bn-chart-time/utils/model/TimeChartDataRow.d.ts +62 -0
  548. package/dist/types/components/bn-chart-time/utils/model/index.d.ts +109 -0
  549. package/dist/types/components/bn-chart-time/utils/model/styles/ScaleFactorsTimeChart.d.ts +46 -0
  550. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +29 -0
  551. package/dist/types/components/bn-component-style/bn-component-style.d.ts +8 -0
  552. package/dist/types/components/bn-context/bn-context.d.ts +19 -0
  553. package/dist/types/components/bn-dataset/bn-dataset.d.ts +38 -0
  554. package/dist/types/components/bn-datasource/bn-datasource.d.ts +18 -0
  555. package/dist/types/components/bn-footer/bn-footer.d.ts +29 -0
  556. package/dist/types/components/bn-grid/bn-grid.d.ts +70 -0
  557. package/dist/types/components/bn-grid/utils/GridConfig.d.ts +47 -0
  558. package/dist/types/components/bn-image/bn-image.d.ts +22 -0
  559. package/dist/types/components/bn-internationalization/bn-internationalization.d.ts +9 -0
  560. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +38 -0
  561. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +40 -0
  562. package/dist/types/components/bn-map/bn-map.d.ts +122 -0
  563. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +73 -0
  564. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +8 -0
  565. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +11 -0
  566. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +9 -0
  567. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +2 -0
  568. package/dist/types/components/bn-message/bn-message.d.ts +27 -0
  569. package/dist/types/components/bn-page/bn-page.d.ts +29 -0
  570. package/dist/types/components/bn-table/bn-table.d.ts +373 -0
  571. package/dist/types/components/bn-table/ibcs-table.d.ts +59 -0
  572. package/dist/types/components/bn-table/utils/Table.d.ts +61 -0
  573. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +36 -0
  574. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +45 -0
  575. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +30 -0
  576. package/dist/types/components/bn-table/utils/elements/index.d.ts +3 -0
  577. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +114 -0
  578. package/dist/types/components/bn-table/utils/helper/ColumnStatistics.d.ts +21 -0
  579. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +139 -0
  580. package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +19 -0
  581. package/dist/types/components/bn-table/utils/helper/index.d.ts +1 -0
  582. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +72 -0
  583. package/dist/types/components/bn-table/utils/model/TableDataRow.d.ts +70 -0
  584. package/dist/types/components/bn-table/utils/model/TableDrillGroup.d.ts +22 -0
  585. package/dist/types/components/bn-table/utils/model/index.d.ts +130 -0
  586. package/dist/types/components/bn-template/bn-template.d.ts +10 -0
  587. package/dist/types/components/bn-text/bn-text.d.ts +63 -0
  588. package/dist/types/components/bn-title/bn-title.d.ts +128 -0
  589. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +23 -0
  590. package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +28 -0
  591. package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +26 -0
  592. package/dist/types/components/bn-title/ibcs-title/utils/factories/index.d.ts +1 -0
  593. package/dist/types/components/bn-title/ibcs-title/utils/model/MeasureEntriy.d.ts +11 -0
  594. package/dist/types/components/bn-title/ibcs-title/utils/model/TimePeriod.d.ts +15 -0
  595. package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +25 -0
  596. package/dist/types/components/bn-title/ibcs-title/utils/model/index.d.ts +35 -0
  597. package/dist/types/components/bn-tree/bn-tree.d.ts +84 -0
  598. package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +57 -0
  599. package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +37 -0
  600. package/dist/types/components/bn-tree/utils/TreeParser.d.ts +42 -0
  601. package/dist/types/components/editor-companion/editor-companion.d.ts +18 -0
  602. package/dist/types/components.d.ts +3311 -0
  603. package/dist/types/context/context-protocol.d.ts +53 -0
  604. package/dist/types/declarations.d.ts +1 -0
  605. package/dist/types/index.d.ts +2 -0
  606. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  607. package/dist/types/stores/assets.d.ts +12 -0
  608. package/dist/types/stores/componentStyles.d.ts +82 -0
  609. package/dist/types/stores/context.d.ts +12 -0
  610. package/dist/types/stores/createScopedStores.d.ts +12 -0
  611. package/dist/types/stores/datasets.d.ts +14 -0
  612. package/dist/types/stores/datasetsMeta.d.ts +14 -0
  613. package/dist/types/stores/datasources.d.ts +14 -0
  614. package/dist/types/stores/internationalization.d.ts +9 -0
  615. package/dist/types/test-runner/test-runner-card.d.ts +3 -0
  616. package/dist/types/test-runner/test-runner-chart-time.d.ts +3 -0
  617. package/dist/types/test-runner/test-runner-chart.d.ts +3 -0
  618. package/dist/types/test-runner/test-runner-map.d.ts +3 -0
  619. package/dist/types/test-runner/test-runner-table.d.ts +3 -0
  620. package/dist/types/test-runner/test-runner-time.d.ts +3 -0
  621. package/dist/types/test-runner/test-runner-title.d.ts +3 -0
  622. package/dist/types/utils/DataUriUtil.d.ts +5 -0
  623. package/dist/types/utils/DateStringFactory.d.ts +123 -0
  624. package/dist/types/utils/componentRegister.d.ts +38 -0
  625. package/dist/types/utils/constants.d.ts +142 -0
  626. package/dist/types/utils/dataAnalyzer.d.ts +56 -0
  627. package/dist/types/utils/datasetMetaCalculator.d.ts +16 -0
  628. package/dist/types/utils/flattenObject.d.ts +13 -0
  629. package/dist/types/utils/formatter.d.ts +34 -0
  630. package/dist/types/utils/helper/AdapterUtils.d.ts +11 -0
  631. package/dist/types/utils/helper/CompareUtil.d.ts +26 -0
  632. package/dist/types/utils/helper/IAdapter.d.ts +16 -0
  633. package/dist/types/utils/helper/StringAdapter.d.ts +5 -0
  634. package/dist/types/utils/ibcsRuleSet.d.ts +47 -0
  635. package/dist/types/utils/index.d.ts +2 -0
  636. package/dist/types/utils/model/ChartStyles.d.ts +58 -0
  637. package/dist/types/utils/model/DataFormatDigits.d.ts +11 -0
  638. package/dist/types/utils/model/DataQueryResultRow.d.ts +29 -0
  639. package/dist/types/utils/model/DatasetMeta.d.ts +43 -0
  640. package/dist/types/utils/model/DateFormat.d.ts +38 -0
  641. package/dist/types/utils/model/Order.d.ts +46 -0
  642. package/dist/types/utils/model/SiPrefix.d.ts +11 -0
  643. package/dist/types/utils/model/TextStyles.d.ts +10 -0
  644. package/dist/types/utils/model/VarianceScenario.d.ts +20 -0
  645. package/dist/types/utils/model/index.d.ts +37 -0
  646. package/dist/types/utils/model/styles/FontStyle.d.ts +13 -0
  647. package/dist/types/utils/model/styles/Padding.d.ts +11 -0
  648. package/dist/types/utils/model/styles/SVGStyle.d.ts +20 -0
  649. package/dist/types/utils/model/styles/SVGStyleGroup.d.ts +16 -0
  650. package/dist/types/utils/model/styles/SVGVariancesStyleGroup.d.ts +16 -0
  651. package/dist/types/utils/parentDimensions.d.ts +13 -0
  652. package/dist/types/utils/scaling.d.ts +22 -0
  653. package/dist/types/utils/stackColors.d.ts +20 -0
  654. package/dist/types/utils/styled/attributes.d.ts +6 -0
  655. package/dist/types/utils/styled/style-sheet.d.ts +10 -0
  656. package/dist/types/utils/styled/withStyled.d.ts +12 -0
  657. package/dist/types/utils/templateId.d.ts +9 -0
  658. package/dist/types/utils/utils.d.ts +36 -0
  659. package/dist/types/utils/validate.d.ts +55 -0
  660. package/dist/types/utils/withBodyObserver.d.ts +14 -0
  661. package/dist/types/utils/withComponentStatus.d.ts +15 -0
  662. package/dist/types/utils/withComponentStyle.d.ts +20 -0
  663. package/dist/types/utils/withDataset.d.ts +18 -0
  664. package/dist/types/utils/withDatasource.d.ts +16 -0
  665. package/dist/types/utils/withHasError.d.ts +35 -0
  666. package/dist/types/utils/withTranslation.d.ts +24 -0
  667. package/loader/cdn.js +1 -0
  668. package/loader/index.cjs.js +1 -0
  669. package/loader/index.d.ts +24 -0
  670. package/loader/index.es2017.js +1 -0
  671. package/loader/index.js +2 -0
  672. package/package.json +68 -0
  673. package/readme.md +164 -0
@@ -0,0 +1,1073 @@
1
+ import { r as registerInstance, d as createEvent, h, H as Host } from './index-B27Ax6P_.js';
2
+ import { a as ComponentStatus } from './componentRegister-BtVfu16B.js';
3
+
4
+ /**
5
+ * Copyright (C) 2011-2012 Pavel Shramov
6
+ * Copyright (C) 2013-2017 Maxime Petazzoni <maxime.petazzoni@bulix.org>
7
+ * All Rights Reserved.
8
+ *
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions are met:
11
+ *
12
+ * - Redistributions of source code must retain the above copyright notice,
13
+ * this list of conditions and the following disclaimer.
14
+ *
15
+ * - Redistributions in binary form must reproduce the above copyright notice,
16
+ * this list of conditions and the following disclaimer in the documentation
17
+ * and/or other materials provided with the distribution.
18
+ *
19
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ */
31
+
32
+
33
+ var _MAX_POINT_INTERVAL_MS = 15000;
34
+ var _SECOND_IN_MILLIS = 1000;
35
+ var _MINUTE_IN_MILLIS = 60 * _SECOND_IN_MILLIS;
36
+ var _HOUR_IN_MILLIS = 60 * _MINUTE_IN_MILLIS;
37
+ var _DAY_IN_MILLIS = 24 * _HOUR_IN_MILLIS;
38
+
39
+ var _GPX_STYLE_NS = 'http://www.topografix.com/GPX/gpx_style/0/2';
40
+ var _DEFAULT_ICON = new L.Icon.Default;
41
+
42
+ var _DEFAULT_MARKERS = {
43
+ startIcon: _DEFAULT_ICON,
44
+ endIcon: _DEFAULT_ICON,
45
+
46
+ // Based on 'sym' waypoint key
47
+ wptIcons: {
48
+ '': _DEFAULT_ICON,
49
+ },
50
+
51
+ // Based on 'type' waypoint key
52
+ wptTypeIcons: {
53
+ '': _DEFAULT_ICON
54
+ },
55
+
56
+ // Based on a regex over the waypoint's name
57
+ pointMatchers: [],
58
+ };
59
+
60
+ var _DEFAULT_MARKER_OPTS = {
61
+ iconSize: [33, 45],
62
+ iconAnchor: [16, 45],
63
+ clickable: false
64
+ };
65
+
66
+ var _DEFAULT_POLYLINE_OPTS = {
67
+ color: 'blue'
68
+ };
69
+
70
+ var _DEFAULT_GPX_OPTS = {
71
+ parseElements: ['track', 'route', 'waypoint'],
72
+ joinTrackSegments: true
73
+ };
74
+
75
+ L.GPX = L.FeatureGroup.extend({
76
+ initialize: function(gpx, options) {
77
+ options.max_point_interval = options.max_point_interval || _MAX_POINT_INTERVAL_MS;
78
+ options.markers = this._merge_objs(
79
+ _DEFAULT_MARKERS,
80
+ options.markers || {});
81
+ options.marker_options = this._merge_objs(
82
+ _DEFAULT_MARKER_OPTS,
83
+ options.marker_options || {});
84
+ options.polyline_options = options.polyline_options || [];
85
+ options.gpx_options = this._merge_objs(
86
+ _DEFAULT_GPX_OPTS,
87
+ options.gpx_options || {});
88
+
89
+ L.Util.setOptions(this, options);
90
+
91
+ // Base icon class for track pins.
92
+ L.GPXTrackIcon = L.Icon.extend({ options: options.marker_options });
93
+
94
+ this._gpx = gpx;
95
+ this._layers = {};
96
+ this._prepare_markers(options.markers);
97
+ this._init_info();
98
+
99
+ if (gpx) {
100
+ this._parse(gpx, options, this.options.async);
101
+ }
102
+ },
103
+
104
+ get_duration_string: function(duration, hidems) {
105
+ var s = '';
106
+
107
+ if (duration >= _DAY_IN_MILLIS) {
108
+ s += Math.floor(duration / _DAY_IN_MILLIS) + 'd ';
109
+ duration = duration % _DAY_IN_MILLIS;
110
+ }
111
+
112
+ if (duration >= _HOUR_IN_MILLIS) {
113
+ s += Math.floor(duration / _HOUR_IN_MILLIS) + ':';
114
+ duration = duration % _HOUR_IN_MILLIS;
115
+ }
116
+
117
+ var mins = Math.floor(duration / _MINUTE_IN_MILLIS);
118
+ duration = duration % _MINUTE_IN_MILLIS;
119
+ if (mins < 10) s += '0';
120
+ s += mins + '\'';
121
+
122
+ var secs = Math.floor(duration / _SECOND_IN_MILLIS);
123
+ duration = duration % _SECOND_IN_MILLIS;
124
+ if (secs < 10) s += '0';
125
+ s += secs;
126
+
127
+ if (!hidems && duration > 0) s += '.' + Math.round(Math.floor(duration)*1000)/1000;
128
+ else s += '"';
129
+
130
+ return s;
131
+ },
132
+
133
+ get_duration_string_iso: function(duration, hidems) {
134
+ var s = this.get_duration_string(duration, hidems);
135
+ return s.replace("'",':').replace('"','');
136
+ },
137
+ _toFixed_helper: function(v, unit = 0) {
138
+ if (typeof(v) == 'number'){
139
+ return v.toFixed(unit);
140
+ }
141
+ return "?";
142
+ },
143
+ // Public methods
144
+ to_miles: function(v) { return v / 1.60934; },
145
+ to_ft: function(v) { return v * 3.28084; },
146
+ m_to_km: function(v) { return v / 1000; },
147
+ m_to_mi: function(v) { return v / 1609.34; },
148
+ ms_to_kmh: function(v) { return v * 3.6; },
149
+ ms_to_mih: function(v) { return v / 1609.34 * 3600; },
150
+
151
+ get_name: function() { return this._info.name; },
152
+ get_desc: function() { return this._info.desc; },
153
+ get_author: function() { return this._info.author; },
154
+ get_copyright: function() { return this._info.copyright; },
155
+ get_distance: function() { return this._info.length; },
156
+ get_distance_imp: function() { return this.to_miles(this.m_to_km(this.get_distance())); },
157
+
158
+ get_start_time: function() { return this._info.duration.start; },
159
+ get_end_time: function() { return this._info.duration.end; },
160
+ get_moving_time: function() { return this._info.duration.moving; },
161
+ get_total_time: function() { return this._info.duration.total; },
162
+
163
+ get_moving_pace: function() { return this.get_moving_time() / this.m_to_km(this.get_distance()); },
164
+ get_moving_pace_imp: function() { return this.get_moving_time() / this.get_distance_imp(); },
165
+
166
+ get_moving_speed: function() { return this.m_to_km(this.get_distance()) / (this.get_moving_time() / (3600 * 1000)) ; },
167
+ get_moving_speed_imp:function() { return this.to_miles(this.m_to_km(this.get_distance())) / (this.get_moving_time() / (3600 * 1000)) ; },
168
+
169
+ get_total_speed: function() { return this.m_to_km(this.get_distance()) / (this.get_total_time() / (3600 * 1000)); },
170
+ get_total_speed_imp: function() { return this.to_miles(this.m_to_km(this.get_distance())) / (this.get_total_time() / (3600 * 1000)); },
171
+
172
+ get_elevation_gain: function() { return this._info.elevation.gain; },
173
+ get_elevation_loss: function() { return this._info.elevation.loss; },
174
+ get_elevation_gain_imp: function() { return this.to_ft(this.get_elevation_gain()); },
175
+ get_elevation_loss_imp: function() { return this.to_ft(this.get_elevation_loss()); },
176
+ get_elevation_data: function() {
177
+ var _this = this;
178
+ return this._info.elevation._points.map(
179
+ function(p) { return _this._prepare_data_point(p, _this.m_to_km, null,
180
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' km, ' + _this._toFixed_helper(b, 0) + ' m'; });
181
+ });
182
+ },
183
+ get_elevation_data_imp: function() {
184
+ var _this = this;
185
+ return this._info.elevation._points.map(
186
+ function(p) { return _this._prepare_data_point(p, _this.m_to_mi, _this.to_ft,
187
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' mi, ' + _this._toFixed_helper(b, 0) + ' ft'; });
188
+ });
189
+ },
190
+ get_elevation_max: function() { return this._info.elevation.max; },
191
+ get_elevation_min: function() { return this._info.elevation.min; },
192
+ get_elevation_max_imp: function() { return this.to_ft(this.get_elevation_max()); },
193
+ get_elevation_min_imp: function() { return this.to_ft(this.get_elevation_min()); },
194
+
195
+ get_speed_data: function() {
196
+ var _this = this;
197
+ return this._info.speed._points.map(
198
+ function(p) { return _this._prepare_data_point(p, _this.m_to_km, _this.ms_to_kmh,
199
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' km, ' + _this._toFixed_helper(b, 2) + ' km/h'; });
200
+ });
201
+ },
202
+ get_speed_data_imp: function() {
203
+ var _this = this;
204
+ return this._info.speed._points.map(
205
+ function(p) { return _this._prepare_data_point(p, _this.m_to_mi, _this.ms_to_mih,
206
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' mi, ' + _this._toFixed_helper(b, 2) + ' mi/h'; });
207
+ });
208
+ },
209
+ get_speed_max: function() { return this.m_to_km(this._info.speed.max) * 3600; },
210
+ get_speed_max_imp: function() { return this.to_miles(this.get_speed_max()); },
211
+
212
+ get_average_hr: function() { return this._info.hr.avg; },
213
+ get_average_temp: function() { return this._info.atemp.avg; },
214
+ get_average_cadence: function() { return this._info.cad.avg; },
215
+ get_heartrate_data: function() {
216
+ var _this = this;
217
+ return this._info.hr._points.map(
218
+ function(p) { return _this._prepare_data_point(p, _this.m_to_km, null,
219
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' km, ' + _this._toFixed_helper(b, 0) + ' bpm'; });
220
+ });
221
+ },
222
+ get_heartrate_data_imp: function() {
223
+ var _this = this;
224
+ return this._info.hr._points.map(
225
+ function(p) { return _this._prepare_data_point(p, _this.m_to_mi, null,
226
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' mi, ' + _this._toFixed_helper(b, 0) + ' bpm'; });
227
+ });
228
+ },
229
+ get_cadence_data: function() {
230
+ var _this = this;
231
+ return this._info.cad._points.map(
232
+ function(p) { return _this._prepare_data_point(p, _this.m_to_km, null,
233
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' km, ' + _this._toFixed_helper(b, 0) + ' rpm'; });
234
+ });
235
+ },
236
+ get_temp_data: function() {
237
+ var _this = this;
238
+ return this._info.atemp._points.map(
239
+ function(p) { return _this._prepare_data_point(p, _this.m_to_km, null,
240
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' km, ' + _this._toFixed_helper(b, 0) + ' degrees'; });
241
+ });
242
+ },
243
+ get_cadence_data_imp: function() {
244
+ var _this = this;
245
+ return this._info.cad._points.map(
246
+ function(p) { return _this._prepare_data_point(p, _this.m_to_mi, null,
247
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' mi, ' + _this._toFixed_helper(b, 0) + ' rpm'; });
248
+ });
249
+ },
250
+ get_temp_data_imp: function() {
251
+ var _this = this;
252
+ return this._info.atemp._points.map(
253
+ function(p) { return _this._prepare_data_point(p, _this.m_to_mi, null,
254
+ function(a, b) { return _this._toFixed_helper(a, 2) + ' mi, ' + _this._toFixed_helper(b, 0) + ' degrees'; });
255
+ });
256
+ },
257
+
258
+ reload: function() {
259
+ this._init_info();
260
+ this.clearLayers();
261
+ this._parse(this._gpx, this.options, this.options.async);
262
+ },
263
+
264
+ // Private methods
265
+ _merge_objs: function(a, b) {
266
+ var _ = {};
267
+ for (var attr in a) { _[attr] = a[attr]; }
268
+ for (var attr in b) { _[attr] = b[attr]; }
269
+ return _;
270
+ },
271
+
272
+ _prepare_data_point: function(p, trans1, trans2, trans_tooltip) {
273
+ var r = [trans1 && trans1(p[0]) || p[0], trans2 && trans2(p[1]) || p[1]];
274
+ r.push(trans_tooltip && trans_tooltip(r[0], r[1]) || (r[0] + ': ' + r[1]));
275
+ return r;
276
+ },
277
+
278
+ _prepare_markers: function(markers) {
279
+ function iconize(url) {
280
+ return new L.GPXTrackIcon({iconUrl: url});
281
+ }
282
+
283
+ Object.entries(markers).forEach(([key, value]) => {
284
+ if (key === 'wptIcons' || key === 'wptTypeIcons') {
285
+ markers[key] = this._prepare_markers(value);
286
+ } else if (key === 'pointMatchers') {
287
+ markers[key] = value.map(e => {
288
+ if (typeof(e.icon) === 'string') {
289
+ e.icon = iconize(e.icon);
290
+ }
291
+ return e;
292
+ });
293
+ } else if (typeof(value) === 'string') {
294
+ markers[key] = iconize(value);
295
+ } else if (typeof(value) === 'object' && value !== null) {
296
+ markers[key] = value;
297
+ }
298
+ });
299
+
300
+ return markers;
301
+ },
302
+
303
+ _init_info: function() {
304
+ this._info = {
305
+ name: null,
306
+ length: 0.0,
307
+ elevation: {gain: 0.0, loss: 0.0, max: 0.0, min: Infinity, _points: []},
308
+ speed : {max: 0.0, _points: []},
309
+ hr: {avg: 0, _total: 0, _points: []},
310
+ duration: {start: null, end: null, moving: 0, total: 0},
311
+ atemp: {avg: 0, _total: 0, _points: []},
312
+ cad: {avg: 0, _total: 0, _points: []}
313
+ };
314
+ },
315
+
316
+ _load_xml: function(url, cb, options, async) {
317
+ if (async == undefined) async = this.options.async;
318
+ if (options == undefined) options = this.options;
319
+
320
+ var _this = this;
321
+ var req = new window.XMLHttpRequest();
322
+ req.open('GET', url, async);
323
+ try {
324
+ req.overrideMimeType('text/xml'); // unsupported by IE
325
+ } catch(e) {}
326
+ req.onloadend = function() {
327
+ if (req.status == 200) {
328
+ cb(req.responseXML, options);
329
+ } else {
330
+ _this.fire('error', { err: 'Error fetching resource: ' + url });
331
+ }
332
+ };
333
+ req.send(null);
334
+ },
335
+
336
+ _parse: function(input, options, async) {
337
+ var _this = this;
338
+ var cb = function(gpx, options) {
339
+ var layers = _this._parse_gpx_data(gpx, options);
340
+ if (!layers) {
341
+ _this.fire('error', { err: 'No parseable layers of type(s) ' + JSON.stringify(options.gpx_options.parseElements) });
342
+ return;
343
+ }
344
+ _this.addLayer(layers);
345
+ _this.fire('loaded', { layers: layers, element: gpx });
346
+ };
347
+ if (input.substr(0,1)==='<') { // direct XML has to start with a <
348
+ var parser = new DOMParser();
349
+ if (async) {
350
+ setTimeout(function() {
351
+ cb(parser.parseFromString(input, "text/xml"), options);
352
+ });
353
+ } else {
354
+ cb(parser.parseFromString(input, "text/xml"), options);
355
+ }
356
+ } else {
357
+ this._load_xml(input, cb, options, async);
358
+ }
359
+ },
360
+
361
+ _parse_gpx_data: function(xml, options) {
362
+ var i, el, layers = [];
363
+
364
+ var name = xml.getElementsByTagName('name');
365
+ if (name.length > 0) {
366
+ this._info.name = name[0].textContent;
367
+ }
368
+ var desc = xml.getElementsByTagName('desc');
369
+ if (desc.length > 0) {
370
+ this._info.desc = desc[0].textContent;
371
+ }
372
+ var author = xml.getElementsByTagName('author');
373
+ if (author.length > 0) {
374
+ this._info.author = author[0].textContent;
375
+ }
376
+ var copyright = xml.getElementsByTagName('copyright');
377
+ if (copyright.length > 0) {
378
+ this._info.copyright = copyright[0].textContent;
379
+ }
380
+
381
+ var parseElements = options.gpx_options.parseElements;
382
+ if (parseElements.indexOf('route') > -1) {
383
+ // routes are <rtept> tags inside <rte> sections
384
+ var routes = xml.getElementsByTagName('rte');
385
+ for (i = 0; i < routes.length; i++) {
386
+ var route = routes[i];
387
+ var base_style = this._extract_styling(route);
388
+ var polyline_options = this._get_polyline_options(options.polyline_options, i);
389
+ layers = layers.concat(this._parse_segment(routes[i], options, base_style, polyline_options, 'rtept'));
390
+ }
391
+ }
392
+
393
+ if (parseElements.indexOf('track') > -1) {
394
+ // tracks are <trkpt> tags in one or more <trkseg> sections in each <trk>
395
+ var tracks = xml.getElementsByTagName('trk');
396
+ for (i = 0; i < tracks.length; i++) {
397
+ var track = tracks[i];
398
+ var base_style = this._extract_styling(track);
399
+ var polyline_options = this._get_polyline_options(options.polyline_options, i);
400
+
401
+ if (options.gpx_options.joinTrackSegments) {
402
+ layers = layers.concat(this._parse_segment(track, options, base_style, polyline_options, 'trkpt'));
403
+ } else {
404
+ var segments = track.getElementsByTagName('trkseg');
405
+ for (j = 0; j < segments.length; j++) {
406
+ layers = layers.concat(this._parse_segment(segments[j], options, base_style, polyline_options, 'trkpt'));
407
+ }
408
+ }
409
+ }
410
+ }
411
+
412
+ this._info.hr.avg = Math.round(this._info.hr._total / this._info.hr._points.length);
413
+ this._info.cad.avg = Math.round(this._info.cad._total / this._info.cad._points.length);
414
+ this._info.atemp.avg = Math.round(this._info.atemp._total / this._info.atemp._points.length);
415
+
416
+ // parse waypoints and add markers for each of them
417
+ if (parseElements.indexOf('waypoint') > -1) {
418
+ el = xml.getElementsByTagName('wpt');
419
+ for (i = 0; i < el.length; i++) {
420
+ var ll = new L.LatLng(
421
+ el[i].getAttribute('lat'),
422
+ el[i].getAttribute('lon'));
423
+
424
+ var nameEl = el[i].getElementsByTagName('name');
425
+ var name = nameEl.length > 0 ? nameEl[0].textContent : '';
426
+
427
+ var descEl = el[i].getElementsByTagName('desc');
428
+ var desc = descEl.length > 0 ? descEl[0].textContent : '';
429
+
430
+ var symEl = el[i].getElementsByTagName('sym');
431
+ var symKey = symEl.length > 0 ? symEl[0].textContent : null;
432
+
433
+ var typeEl = el[i].getElementsByTagName('type');
434
+ var typeKey = typeEl.length > 0 ? typeEl[0].textContent : null;
435
+
436
+ /*
437
+ * Add waypoint marker based on the waypoint symbol key.
438
+ *
439
+ * First look for a configured icon for that symKey. If not found, look
440
+ * for a configured icon URL for that symKey and build an icon from it.
441
+ * If none of those match, look through the point matchers for a match
442
+ * on the waypoint's name.
443
+ *
444
+ * Otherwise, fall back to the default icon if one was configured, or
445
+ * finally to the default icon URL, if one was configured.
446
+ */
447
+ var wptIcons = options.markers.wptIcons;
448
+ var wptTypeIcons = options.markers.wptTypeIcons;
449
+ var ptMatchers = options.markers.pointMatchers || [];
450
+ var symIcon;
451
+ if (wptIcons && symKey && wptIcons[symKey]) {
452
+ symIcon = wptIcons[symKey];
453
+ } else if (wptTypeIcons && typeKey && wptTypeIcons[typeKey]) {
454
+ symIcon = wptTypeIcons[typeKey];
455
+ } else if (ptMatchers.length > 0) {
456
+ for (var j = 0; j < ptMatchers.length; j++) {
457
+ if (ptMatchers[j].regex.test(name)) {
458
+ symIcon = ptMatchers[j].icon;
459
+ break;
460
+ }
461
+ }
462
+ } else if (wptIcons && wptIcons['']) {
463
+ symIcon = wptIcons[''];
464
+ }
465
+
466
+ if (!symIcon) {
467
+ console.log(
468
+ 'No waypoint icon could be matched for symKey=%s,typeKey=%s,name=%s on waypoint %o',
469
+ symKey, typeKey, name, el[i]);
470
+ continue;
471
+ }
472
+
473
+ var marker = new L.Marker(ll, {
474
+ clickable: options.marker_options.clickable,
475
+ title: name,
476
+ icon: symIcon,
477
+ type: 'waypoint'
478
+ });
479
+ marker.bindPopup("<b>" + name + "</b>" + (desc.length > 0 ? '<br>' + desc : '')).openPopup();
480
+ this.fire('addpoint', { point: marker, point_type: 'waypoint', element: el[i] });
481
+ layers.push(marker);
482
+ }
483
+ }
484
+
485
+ if (layers.length > 1) {
486
+ return new L.FeatureGroup(layers);
487
+ } else if (layers.length == 1) {
488
+ return layers[0];
489
+ }
490
+ },
491
+
492
+ _parse_segment: function(line, options, base_style, polyline_options, tag) {
493
+ var el = line.getElementsByTagName(tag);
494
+ if (!el.length) return [];
495
+
496
+ var coords = [];
497
+ var markers = [];
498
+ var layers = [];
499
+ var last = null;
500
+
501
+ for (var i = 0; i < el.length; i++) {
502
+ var _, ll = new L.LatLng(
503
+ el[i].getAttribute('lat'),
504
+ el[i].getAttribute('lon'));
505
+ ll.meta = { time: null, ele: null, hr: null, cad: null, atemp: null, speed: null };
506
+
507
+ _ = el[i].getElementsByTagName('time');
508
+ if (_.length > 0) {
509
+ ll.meta.time = new Date(Date.parse(_[0].textContent));
510
+ } else {
511
+ ll.meta.time = new Date('1970-01-01T00:00:00');
512
+ }
513
+ var time_diff = last != null ? Math.abs(ll.meta.time - last.meta.time) : 0;
514
+
515
+ _ = el[i].getElementsByTagName('ele');
516
+ if (_.length > 0) {
517
+ ll.meta.ele = parseFloat(_[0].textContent);
518
+ } else {
519
+ // If the point doesn't have an <ele> tag, assume it has the same
520
+ // elevation as the point before it (if it had one).
521
+ ll.meta.ele = last != null ? last.meta.ele : null;
522
+ }
523
+ var ele_diff = last != null ? ll.meta.ele - last.meta.ele : 0;
524
+ var dist_3d = last != null ? this._dist3d(last, ll) : 0;
525
+
526
+ _ = el[i].getElementsByTagName('speed');
527
+ if (_.length > 0) {
528
+ ll.meta.speed = parseFloat(_[0].textContent);
529
+ } else {
530
+ // speed in meter per second
531
+ ll.meta.speed = time_diff > 0 ? 1000.0 * dist_3d / time_diff : 0;
532
+ }
533
+
534
+ _ = el[i].getElementsByTagName('name');
535
+ if (_.length > 0) {
536
+ var name = _[0].textContent;
537
+ var ptMatchers = options.markers.pointMatchers || [];
538
+
539
+ for (var j = 0; j < ptMatchers.length; j++) {
540
+ if (ptMatchers[j].regex.test(name)) {
541
+ markers.push({ label: name, coords: ll, icon: ptMatchers[j].icon, element: el[i] });
542
+ break;
543
+ }
544
+ }
545
+ }
546
+
547
+ this._info.length += dist_3d;
548
+
549
+ _ = el[i].getElementsByTagNameNS('*', 'hr');
550
+ if (_.length > 0) {
551
+ ll.meta.hr = parseInt(_[0].textContent);
552
+ this._info.hr._points.push([this._info.length, ll.meta.hr]);
553
+ this._info.hr._total += ll.meta.hr;
554
+ }
555
+
556
+ _ = el[i].getElementsByTagNameNS('*', 'cad');
557
+ if (_.length > 0) {
558
+ ll.meta.cad = parseInt(_[0].textContent);
559
+ this._info.cad._points.push([this._info.length, ll.meta.cad]);
560
+ this._info.cad._total += ll.meta.cad;
561
+ }
562
+
563
+ _ = el[i].getElementsByTagNameNS('*', 'atemp');
564
+ if (_.length > 0) {
565
+ ll.meta.atemp = parseInt(_[0].textContent);
566
+ this._info.atemp._points.push([this._info.length, ll.meta.atemp]);
567
+ this._info.atemp._total += ll.meta.atemp;
568
+ }
569
+
570
+ if (ll.meta.ele > this._info.elevation.max) {
571
+ this._info.elevation.max = ll.meta.ele;
572
+ }
573
+ if (ll.meta.ele < this._info.elevation.min) {
574
+ this._info.elevation.min = ll.meta.ele;
575
+ }
576
+ this._info.elevation._points.push([this._info.length, ll.meta.ele]);
577
+
578
+ if (ll.meta.speed > this._info.speed.max) {
579
+ this._info.speed.max = ll.meta.speed;
580
+ }
581
+ this._info.speed._points.push([this._info.length, ll.meta.speed]);
582
+
583
+ if ((last == null) && (this._info.duration.start == null)) {
584
+ this._info.duration.start = ll.meta.time;
585
+ }
586
+ this._info.duration.end = ll.meta.time;
587
+ this._info.duration.total += time_diff;
588
+ if (time_diff < options.max_point_interval) {
589
+ this._info.duration.moving += time_diff;
590
+ }
591
+
592
+ if (ele_diff > 0) {
593
+ this._info.elevation.gain += ele_diff;
594
+ } else {
595
+ this._info.elevation.loss += Math.abs(ele_diff);
596
+ }
597
+
598
+ last = ll;
599
+ coords.push(ll);
600
+ }
601
+
602
+ // add track
603
+ var l = new L.Polyline(coords, this._extract_styling(line, base_style, polyline_options));
604
+ this.fire('addline', { line: l, element: line });
605
+ layers.push(l);
606
+
607
+ if (options.markers.startIcon) {
608
+ // add start pin
609
+ var marker = new L.Marker(coords[0], {
610
+ clickable: options.marker_options.clickable,
611
+ icon: options.markers.startIcon,
612
+ });
613
+ this.fire('addpoint', { point: marker, point_type: 'start', element: el[0], line: line });
614
+ layers.push(marker);
615
+ }
616
+
617
+ if (options.markers.endIcon) {
618
+ // add end pin
619
+ var marker = new L.Marker(coords[coords.length-1], {
620
+ clickable: options.marker_options.clickable,
621
+ icon: options.markers.endIcon,
622
+ });
623
+ this.fire('addpoint', { point: marker, point_type: 'end', element: el[el.length-1], line: line });
624
+ layers.push(marker);
625
+ }
626
+
627
+ // add named markers
628
+ for (var i = 0; i < markers.length; i++) {
629
+ var marker = new L.Marker(markers[i].coords, {
630
+ clickable: options.marker_options.clickable,
631
+ title: markers[i].label,
632
+ icon: markers[i].icon
633
+ });
634
+ this.fire('addpoint', { point: marker, point_type: 'label', element: markers[i].element });
635
+ layers.push(marker);
636
+ }
637
+
638
+ return layers;
639
+ },
640
+
641
+ _get_polyline_options: function(polyline_options, i) {
642
+ /*
643
+ * Handle backwards compatibility with polyline_options being provided as a single object.
644
+ * In this situation, the provided style is expected to apply to all routes and tracks in the file.
645
+ */
646
+ if (! Array.isArray(polyline_options)) {
647
+ return polyline_options;
648
+ }
649
+ return polyline_options[i] || {};
650
+ },
651
+
652
+ _extract_styling: function(el, base, overrides) {
653
+ var style = this._merge_objs(_DEFAULT_POLYLINE_OPTS, base);
654
+ var e = el.getElementsByTagNameNS(_GPX_STYLE_NS, 'line');
655
+ if (e.length > 0) {
656
+ var _ = e[0].getElementsByTagName('color');
657
+ if (_.length > 0) style.color = '#' + _[0].textContent;
658
+ var _ = e[0].getElementsByTagName('opacity');
659
+ if (_.length > 0) style.opacity = _[0].textContent;
660
+ var _ = e[0].getElementsByTagName('weight');
661
+ if (_.length > 0) style.weight = _[0].textContent;
662
+ var _ = e[0].getElementsByTagName('linecap');
663
+ if (_.length > 0) style.lineCap = _[0].textContent;
664
+ var _ = e[0].getElementsByTagName('linejoin');
665
+ if (_.length > 0) style.lineJoin = _[0].textContent;
666
+ var _ = e[0].getElementsByTagName('dasharray');
667
+ if (_.length > 0) style.dashArray = _[0].textContent;
668
+ var _ = e[0].getElementsByTagName('dashoffset');
669
+ if (_.length > 0) style.dashOffset = _[0].textContent;
670
+ }
671
+ return this._merge_objs(style, overrides)
672
+ },
673
+
674
+ _dist2d: function(a, b) {
675
+ var R = 6371000;
676
+ var dLat = this._deg2rad(b.lat - a.lat);
677
+ var dLon = this._deg2rad(b.lng - a.lng);
678
+ var r = Math.sin(dLat/2) *
679
+ Math.sin(dLat/2) +
680
+ Math.cos(this._deg2rad(a.lat)) *
681
+ Math.cos(this._deg2rad(b.lat)) *
682
+ Math.sin(dLon/2) *
683
+ Math.sin(dLon/2);
684
+ var c = 2 * Math.atan2(Math.sqrt(r), Math.sqrt(1-r));
685
+ var d = R * c;
686
+ return d;
687
+ },
688
+
689
+ _dist3d: function(a, b) {
690
+ var planar = this._dist2d(a, b);
691
+ var height = Math.abs(b.meta.ele - a.meta.ele);
692
+ return Math.sqrt(Math.pow(planar, 2) + Math.pow(height, 2));
693
+ },
694
+
695
+ _deg2rad: function(deg) {
696
+ return deg * Math.PI / 180;
697
+ }
698
+ });
699
+
700
+ const ibcsMapCss = () => `.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(255, 255, 255, 0.8);text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}:host{position:relative;display:block}.map{display:block;width:100%;height:100%;min-width:100px;min-height:100px}`;
701
+
702
+ const IbcsMap = class {
703
+ constructor(hostRef) {
704
+ registerInstance(this, hostRef);
705
+ this.stateUpdated = createEvent(this, "stateUpdated", 7);
706
+ this.dragZoomEnded = createEvent(this, "dragZoomEnded", 7);
707
+ //@Prop() tileLayer: string = 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.png';
708
+ this._tileLayer = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
709
+ this.tileLayer = this._tileLayer;
710
+ this._manualPosOverride = true;
711
+ this.manualPosOverride = this._manualPosOverride;
712
+ this._latitude = 50.137634;
713
+ this.latitude = this._latitude;
714
+ this._longitude = 8.679129;
715
+ this.longitude = this._longitude;
716
+ this._scale = 11;
717
+ this.scale = this._scale;
718
+ this._customView = false;
719
+ this.customView = this._customView;
720
+ this._showScale = false;
721
+ this.showScale = this._showScale;
722
+ this._showZoom = false;
723
+ this.showZoom = this._showZoom;
724
+ this._attribution = "";
725
+ this.attribution = this._attribution;
726
+ this._gpxs = [];
727
+ this.gpxs = this._gpxs;
728
+ this._markers = [];
729
+ this.markers = this._markers;
730
+ this._geojsons = [];
731
+ this.geojsons = this._geojsons;
732
+ this.lmap = null;
733
+ this.gpxLayer = [];
734
+ this.mapMarker = [];
735
+ this.geoJsonLayer = [];
736
+ // @ts-ignore
737
+ this.scaleControl = undefined.scale();
738
+ // @ts-ignore
739
+ this.zoomControl = undefined.zoom();
740
+ // @ts-ignore
741
+ this.tileLayerControl = undefined(this._tileLayer);
742
+ this.cumlatedBounds = {
743
+ northEast: null,
744
+ southWest: null,
745
+ };
746
+ }
747
+ async setProps(data) {
748
+ Object.keys(data).forEach((key) => {
749
+ //@ts-ignore
750
+ this[key] = data[key];
751
+ });
752
+ }
753
+ async unSetProps(data) {
754
+ Object.keys(data).forEach((key) => {
755
+ //@ts-ignore
756
+ this[key] = undefined;
757
+ });
758
+ }
759
+ parseTileLayer(tileLayer) {
760
+ this._tileLayer = tileLayer;
761
+ }
762
+ parseManualPosOverride(manualPosOverride) {
763
+ this._manualPosOverride = JSON.parse(manualPosOverride);
764
+ }
765
+ parseLatitude(latitude) {
766
+ this._latitude = Number(latitude);
767
+ }
768
+ parseLongitude(longitude) {
769
+ this._longitude = Number(longitude);
770
+ }
771
+ parseScale(scale) {
772
+ this._scale = Number(scale);
773
+ }
774
+ parseCustomView(customView) {
775
+ this._customView = JSON.parse(customView);
776
+ }
777
+ parseShowScale(showScale) {
778
+ this._showScale = JSON.parse(showScale);
779
+ }
780
+ parseShowZoom(showZoom) {
781
+ this._showZoom = JSON.parse(showZoom);
782
+ }
783
+ parseAttribution(attribution) {
784
+ this._attribution = attribution;
785
+ }
786
+ parseGpxLayers(gpxs) {
787
+ if (typeof gpxs === "string") {
788
+ this._gpxs = JSON.parse(gpxs);
789
+ }
790
+ else {
791
+ this._gpxs = gpxs;
792
+ }
793
+ this.gpxLayerUpdate(this._gpxs);
794
+ }
795
+ parseMarkers(markers) {
796
+ if (typeof markers === "string") {
797
+ this._markers = JSON.parse(markers);
798
+ }
799
+ else {
800
+ this._markers = markers;
801
+ }
802
+ this.mapMarkerUpdate(this._markers);
803
+ }
804
+ parseGeoJson(geojsons) {
805
+ if (typeof geojsons === "string") {
806
+ this._geojsons = JSON.parse(geojsons);
807
+ }
808
+ else {
809
+ this._geojsons = geojsons;
810
+ }
811
+ this.geoJsonUpdate(this._geojsons);
812
+ }
813
+ render() {
814
+ return (h(Host, { key: '955a4572190c7e73f4dd654e42814a260f6e4062' }, h("div", { key: 'ca831888a3202fe8877dd98a00042be6ae58903f', ref: (el) => (this.drawElement = el), id: "map", class: "map" })));
815
+ }
816
+ gpxLayerUpdate(gpxOptionsLayers) {
817
+ this.gpxLayer.forEach((layer) => {
818
+ layer.remove();
819
+ });
820
+ this.gpxLayer = [];
821
+ for (const gpxOptions of gpxOptionsLayers) {
822
+ if (gpxOptions === undefined) {
823
+ continue;
824
+ }
825
+ const regex = /^data:application\/octet-stream;/;
826
+ let decodedData = gpxOptions.file;
827
+ if (regex.test(gpxOptions.file)) {
828
+ const dataPart = gpxOptions.file.split(",")[1];
829
+ decodedData = atob(dataPart);
830
+ }
831
+ // @ts-ignore
832
+ this.gpxLayer.push(new undefined(decodedData, {
833
+ async: true,
834
+ marker_options: {
835
+ startIconUrl: gpxOptions.startIconUrl,
836
+ endIconUrl: gpxOptions.endIconUrl,
837
+ shadowUrl: gpxOptions.shadowUrl,
838
+ },
839
+ polyline_options: {
840
+ color: gpxOptions.color,
841
+ opacity: gpxOptions.opacity,
842
+ lineCap: gpxOptions.lineCap,
843
+ weight: gpxOptions.weight,
844
+ },
845
+ }).on("loaded", (e) => {
846
+ this.updateCumulatedBounds(e);
847
+ if (this._manualPosOverride === false) {
848
+ this.lmap.fitBounds([this.cumlatedBounds.northEast, this.cumlatedBounds.southWest]);
849
+ }
850
+ this.stateUpdated.emit(ComponentStatus.SUCCESSFUL);
851
+ }));
852
+ }
853
+ }
854
+ updateCumulatedBounds(e) {
855
+ if (this.cumlatedBounds.northEast == null) {
856
+ this.cumlatedBounds.northEast = {
857
+ lat: e.target.getBounds().getNorthEast().lat,
858
+ lng: e.target.getBounds().getNorthEast().lng,
859
+ };
860
+ }
861
+ if (this.cumlatedBounds.southWest == null) {
862
+ this.cumlatedBounds.southWest = {
863
+ lat: e.target.getBounds().getSouthWest().lat,
864
+ lng: e.target.getBounds().getSouthWest().lng,
865
+ };
866
+ }
867
+ if (e.target.getBounds().getNorthEast().lat > this.cumlatedBounds.northEast.lat) {
868
+ this.cumlatedBounds.northEast.lat = e.target.getBounds().getNorthEast().lat;
869
+ }
870
+ if (e.target.getBounds().getNorthEast().lng > this.cumlatedBounds.northEast.lng) {
871
+ this.cumlatedBounds.northEast.lng = e.target.getBounds().getNorthEast().lng;
872
+ }
873
+ if (e.target.getBounds().getSouthWest().lat < this.cumlatedBounds.southWest.lat) {
874
+ this.cumlatedBounds.southWest.lat = e.target.getBounds().getSouthWest().lat;
875
+ }
876
+ if (e.target.getBounds().getSouthWest().lng < this.cumlatedBounds.southWest.lng) {
877
+ this.cumlatedBounds.southWest.lng = e.target.getBounds().getSouthWest().lng;
878
+ }
879
+ }
880
+ mapMarkerUpdate(markes) {
881
+ this.mapMarker.forEach((layer) => {
882
+ layer.remove();
883
+ });
884
+ this.mapMarker = [];
885
+ for (const markerOptions of markes) {
886
+ // Icon options
887
+ const iconOptions = {
888
+ iconUrl: markerOptions.iconUrl,
889
+ iconSize: [markerOptions.iconWidth, markerOptions.iconHeight],
890
+ };
891
+ // @ts-ignore
892
+ const customIcon = undefined(iconOptions);
893
+ const options = {
894
+ title: markerOptions.title,
895
+ icon: customIcon,
896
+ };
897
+ // @ts-ignore
898
+ this.mapMarker.push(undefined([markerOptions.latitude, markerOptions.longitude], options));
899
+ }
900
+ }
901
+ geoJsonUpdate(geojsons) {
902
+ this.geoJsonLayer.forEach((layer) => {
903
+ layer.remove();
904
+ });
905
+ this.geoJsonLayer = [];
906
+ for (const geoJson of geojsons) {
907
+ const jsonStyle = {
908
+ color: geoJson.color,
909
+ weight: geoJson.weight,
910
+ opacity: geoJson.opacity,
911
+ lineCap: geoJson.lineCap,
912
+ };
913
+ const options = {
914
+ style: jsonStyle,
915
+ };
916
+ // @ts-ignore
917
+ this.geoJsonLayer.push(undefined(DataUriUtil.dataURItoObject(geoJson.file), options));
918
+ }
919
+ }
920
+ componentWillLoad() {
921
+ this.stateUpdated.emit(ComponentStatus.RUNNING);
922
+ this.parseMarkers(this.markers);
923
+ this.parseGeoJson(this.geojsons);
924
+ this.parseGpxLayers(this.gpxs);
925
+ this.parseAttribution(this.attribution);
926
+ this.parseShowZoom(this.showZoom);
927
+ this.parseShowScale(this.showScale);
928
+ this.parseScale(this.scale);
929
+ this.parseLongitude(this.longitude);
930
+ this.parseLatitude(this.latitude);
931
+ this.parseTileLayer(this.tileLayer);
932
+ }
933
+ componentDidLoad() {
934
+ if (this.drawElement == null) {
935
+ return;
936
+ }
937
+ // @ts-ignore
938
+ this.lmap = undefined(this.drawElement, { zoomControl: false });
939
+ this.setView();
940
+ this.setTileLayer();
941
+ this.setGeoJsonLayer();
942
+ this.setGPXLayer();
943
+ this.setMarker();
944
+ this.setShowScale();
945
+ this.setShowZoom();
946
+ this.setAttribution();
947
+ this.lmap.addEventListener("dragend", this.dragZoomEnd.bind(this));
948
+ this.lmap.addEventListener("zoomend", this.dragZoomEnd.bind(this));
949
+ }
950
+ disconnectedCallback() {
951
+ this.lmap.removeEventListener("dragend", this.dragZoomEnd.bind(this));
952
+ this.lmap.removeEventListener("zoomend", this.dragZoomEnd.bind(this));
953
+ }
954
+ componentDidUpdate() {
955
+ if (this.drawElement == null) {
956
+ return;
957
+ }
958
+ this.setView();
959
+ this.setTileLayer();
960
+ this.setGeoJsonLayer();
961
+ this.setGPXLayer();
962
+ this.setMarker();
963
+ this.setShowScale();
964
+ this.setShowZoom();
965
+ this.setAttribution();
966
+ }
967
+ dragZoomEnd() {
968
+ const { lat, lng } = this.lmap.getCenter();
969
+ const zoom = this.lmap.getZoom();
970
+ this.dragZoomEnded.emit({
971
+ longitude: lng,
972
+ latitude: lat,
973
+ scale: zoom,
974
+ });
975
+ }
976
+ setView() {
977
+ //if(this._customView == false) {
978
+ // return;
979
+ //}
980
+ this.lmap.setView([this._latitude, this._longitude], this._scale);
981
+ }
982
+ setTileLayer() {
983
+ this.tileLayerControl.setUrl(this._tileLayer, true);
984
+ this.tileLayerControl.addTo(this.lmap);
985
+ }
986
+ setAttribution() {
987
+ this.lmap.attributionControl.setPrefix(this._attribution);
988
+ }
989
+ setShowScale() {
990
+ this.scaleControl.remove();
991
+ if (this._showScale === true) {
992
+ this.scaleControl.addTo(this.lmap);
993
+ }
994
+ }
995
+ setShowZoom() {
996
+ this.zoomControl.remove();
997
+ if (this._showZoom === true) {
998
+ this.zoomControl.addTo(this.lmap);
999
+ }
1000
+ }
1001
+ setGPXLayer() {
1002
+ this.gpxLayer.forEach((layer) => {
1003
+ try {
1004
+ layer.addTo(this.lmap);
1005
+ }
1006
+ catch (e) {
1007
+ console.error("gpxLayer", e);
1008
+ }
1009
+ });
1010
+ }
1011
+ setMarker() {
1012
+ this.mapMarker.forEach((layer) => {
1013
+ try {
1014
+ layer.addTo(this.lmap);
1015
+ }
1016
+ catch (e) {
1017
+ console.error("markerLayer", e);
1018
+ }
1019
+ });
1020
+ }
1021
+ setGeoJsonLayer() {
1022
+ this.geoJsonLayer.forEach((layer) => {
1023
+ try {
1024
+ layer.addTo(this.lmap);
1025
+ }
1026
+ catch (e) {
1027
+ console.error("gpxLayer", e);
1028
+ }
1029
+ });
1030
+ }
1031
+ static get assetsDirs() { return ["assets"]; }
1032
+ static get watchers() { return {
1033
+ "tileLayer": [{
1034
+ "parseTileLayer": 0
1035
+ }],
1036
+ "manualPosOverride": [{
1037
+ "parseManualPosOverride": 0
1038
+ }],
1039
+ "latitude": [{
1040
+ "parseLatitude": 0
1041
+ }],
1042
+ "longitude": [{
1043
+ "parseLongitude": 0
1044
+ }],
1045
+ "scale": [{
1046
+ "parseScale": 0
1047
+ }],
1048
+ "customView": [{
1049
+ "parseCustomView": 0
1050
+ }],
1051
+ "showScale": [{
1052
+ "parseShowScale": 0
1053
+ }],
1054
+ "showZoom": [{
1055
+ "parseShowZoom": 0
1056
+ }],
1057
+ "attribution": [{
1058
+ "parseAttribution": 0
1059
+ }],
1060
+ "gpxs": [{
1061
+ "parseGpxLayers": 0
1062
+ }],
1063
+ "markers": [{
1064
+ "parseMarkers": 0
1065
+ }],
1066
+ "geojsons": [{
1067
+ "parseGeoJson": 0
1068
+ }]
1069
+ }; }
1070
+ };
1071
+ IbcsMap.style = ibcsMapCss();
1072
+
1073
+ export { IbcsMap as ibcs_map };