@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.28

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 (420) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-5075771a.entry.js +1 -0
  3. package/dist/bn-template-engine/p-5d516435.entry.js +1 -0
  4. package/dist/bn-template-engine/p-5e90e728.entry.js +1 -0
  5. package/dist/bn-template-engine/p-9ef7e132.entry.js +1 -0
  6. package/dist/bn-template-engine/{p-f06c3703.entry.js → p-9f7a1980.entry.js} +1 -1
  7. package/dist/bn-template-engine/p-BeXgxHkW.js +1 -0
  8. package/dist/bn-template-engine/p-CH0bpt_k.js +1 -0
  9. package/dist/bn-template-engine/p-ClruFZD_.js +1 -0
  10. package/dist/bn-template-engine/{p-CTrNbSXN.js → p-DFmSrSnf.js} +1 -1
  11. package/dist/bn-template-engine/{p-BcLsoDrW.js → p-DI3efDSV.js} +1 -1
  12. package/dist/bn-template-engine/p-DXLTTILG.js +1 -0
  13. package/dist/bn-template-engine/p-DtP4jqG5.js +1 -0
  14. package/dist/bn-template-engine/p-a8281b71.entry.js +1 -0
  15. package/dist/bn-template-engine/p-b31277e7.entry.js +1 -0
  16. package/dist/bn-template-engine/p-b396ac84.entry.js +1 -0
  17. package/dist/cjs/{bn-asset_21.cjs.entry.js → bn-asset_28.cjs.entry.js} +21358 -6528
  18. package/dist/cjs/bn-grid.cjs.entry.js +4 -6
  19. package/dist/cjs/bn-image.cjs.entry.js +3 -5
  20. package/dist/cjs/bn-internationalization.cjs.entry.js +17 -6
  21. package/dist/cjs/bn-ruleset.cjs.entry.js +5 -5
  22. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  23. package/dist/cjs/bn-template.cjs.entry.js +2 -2
  24. package/dist/cjs/bn-text.cjs.entry.js +115 -43
  25. package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-C0rKepqu.js} +108 -22
  26. package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-Cq-qDtXq.js} +1 -1
  27. package/dist/cjs/editor-companion.cjs.entry.js +2 -2
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/queryError-BZjnIW_w.js +16 -0
  30. package/dist/cjs/{scaling-Dsb5_NXy.js → sanitizeHtml-Yx1xn6i_.js} +467 -287
  31. package/dist/cjs/{withBodyObserver-DJO98AJ-.js → withBodyObserver-CaPUjuC5.js} +1 -1
  32. package/dist/cjs/withHasError-qGW_yqIv.js +426 -0
  33. package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-vSfogp9J.js} +543 -42
  34. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
  35. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +53 -28
  36. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
  37. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +16 -7
  38. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +67 -30
  39. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
  40. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +49 -29
  41. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
  42. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +17 -7
  43. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +34 -18
  44. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +2 -0
  45. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +1 -1
  46. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
  47. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +52 -27
  48. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
  49. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +16 -7
  50. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +52 -18
  51. package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
  52. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +74 -44
  53. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +60 -19
  54. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +218 -262
  55. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +1 -1
  56. package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +11 -4
  57. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +16 -25
  58. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +3 -2
  59. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +2 -0
  60. package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
  61. package/dist/collection/components/bn-chart-time/bn-chart-time.js +122 -52
  62. package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
  63. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +60 -19
  64. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +245 -250
  65. package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +1 -1
  66. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +1 -1
  67. package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +1 -1
  68. package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +11 -4
  69. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +22 -34
  70. package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +3 -3
  71. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +4 -3
  72. package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -2
  73. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +2 -0
  74. package/dist/collection/components/bn-component-style/bn-component-style.js +14 -2
  75. package/dist/collection/components/bn-context/bn-context.js +92 -22
  76. package/dist/collection/components/bn-dataset/bn-dataset.js +246 -90
  77. package/dist/collection/components/bn-datasource/bn-datasource.js +169 -77
  78. package/dist/collection/components/bn-footer/bn-footer.js +6 -6
  79. package/dist/collection/components/bn-internationalization/bn-internationalization.js +14 -3
  80. package/dist/collection/components/bn-layout-card/bn-layout-card.js +25 -74
  81. package/dist/collection/components/bn-layout-page/bn-layout-page.js +59 -71
  82. package/dist/collection/components/bn-message/bn-message.js +2 -2
  83. package/dist/collection/components/bn-page/bn-page.css +0 -240
  84. package/dist/collection/components/bn-page/bn-page.js +14 -4
  85. package/dist/collection/components/bn-page/pageFormats.js +69 -0
  86. package/dist/collection/components/bn-ruleset/bn-ruleset.js +2 -2
  87. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +7 -7
  88. package/dist/collection/components/bn-table/bn-table.css +38 -1
  89. package/dist/collection/components/bn-table/bn-table.js +96 -59
  90. package/dist/collection/components/bn-table/ibcs-table.css +39 -1
  91. package/dist/collection/components/bn-table/ibcs-table.js +89 -30
  92. package/dist/collection/components/bn-table/utils/Table.js +12 -13
  93. package/dist/collection/components/bn-table/utils/elements/Cell.js +9 -3
  94. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +38 -34
  95. package/dist/collection/components/bn-table/utils/elements/TableRow.js +2 -1
  96. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +4 -4
  97. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +17 -4
  98. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +128 -98
  99. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +6 -20
  100. package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +9 -2
  101. package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
  102. package/dist/collection/components/bn-table/utils/model/TableAttribute.js +2 -2
  103. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +3 -2
  104. package/dist/collection/components/bn-template/bn-template.js +1 -1
  105. package/dist/collection/components/bn-text/bn-text.js +36 -39
  106. package/dist/collection/components/bn-text/utils/template.js +79 -0
  107. package/dist/collection/components/bn-title/bn-title.js +10 -4
  108. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +3 -1
  109. package/dist/collection/components/bn-tree/bn-tree.js +119 -23
  110. package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +59 -51
  111. package/dist/collection/components/bn-tree/utils/TreeLayout.js +30 -5
  112. package/dist/collection/components/bn-tree/utils/TreeParser.js +35 -0
  113. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  114. package/dist/collection/context/context-protocol.js +1 -1
  115. package/dist/collection/context/scopedDb.js +47 -4
  116. package/dist/collection/stores/componentStyles.js +39 -0
  117. package/dist/collection/stores/internationalization.js +15 -13
  118. package/dist/collection/utils/DateStringFactory.js +17 -15
  119. package/dist/collection/utils/autoFit.js +2 -2
  120. package/dist/collection/utils/componentRegister.js +60 -16
  121. package/dist/collection/utils/constants.js +2 -2
  122. package/dist/collection/utils/dataAnalyzer.js +9 -12
  123. package/dist/collection/utils/emptyState.js +21 -0
  124. package/dist/collection/utils/formatter.js +29 -20
  125. package/dist/collection/utils/layoutObserver.js +1 -1
  126. package/dist/collection/utils/layoutState/generic.js +1 -1
  127. package/dist/collection/utils/layoutState/svgChartElements.js +2 -2
  128. package/dist/collection/utils/layoutTemplate.js +81 -0
  129. package/dist/collection/utils/measurementHost.js +2 -2
  130. package/dist/collection/utils/model/Order.js +1 -1
  131. package/dist/collection/utils/model/styles/SVGStyle.js +12 -4
  132. package/dist/collection/utils/parentDimensions.js +35 -3
  133. package/dist/collection/utils/queryError.js +11 -0
  134. package/dist/collection/utils/relativeVariance.js +14 -0
  135. package/dist/collection/utils/sanitizeHtml.js +30 -16
  136. package/dist/collection/utils/scaling.js +2 -2
  137. package/dist/collection/utils/stackColors.js +27 -5
  138. package/dist/collection/utils/stackLayout.js +71 -0
  139. package/dist/collection/utils/styled/attributes.js +16 -3
  140. package/dist/collection/utils/styled/style-sheet.js +1 -1
  141. package/dist/collection/utils/styled/withStyled.js +1 -1
  142. package/dist/collection/utils/testing/fakeGroup.js +21 -0
  143. package/dist/collection/utils/testing/mutationObserver.js +44 -0
  144. package/dist/collection/utils/testing/structureChart.js +26 -0
  145. package/dist/collection/utils/testing/timeChart.js +28 -0
  146. package/dist/collection/utils/validate.js +1 -1
  147. package/dist/collection/utils/withComponentStatus.js +137 -12
  148. package/dist/collection/utils/withInheritedProps.js +113 -64
  149. package/dist/collection/utils/withRuleSet.js +10 -7
  150. package/dist/collection/utils/withTranslation.js +3 -3
  151. package/dist/collection/utils/xy/FacetGrid.js +1 -1
  152. package/dist/collection/utils/xy/IsoCurves.js +1 -1
  153. package/dist/collection/utils/xy/NumericScale.js +46 -15
  154. package/dist/collection/utils/xy/PointLabeler.js +2 -2
  155. package/dist/collection/utils/xy/RadiusScale.js +2 -2
  156. package/dist/collection/utils/xy/SeriesPalette.js +3 -3
  157. package/dist/collection/utils/xy/VarianceMeasure.js +22 -4
  158. package/dist/collection/utils/xy/XYFrame.js +4 -4
  159. package/dist/collection/utils/xy/XYLegend.js +5 -7
  160. package/dist/collection/utils/xy/checkXYOverflow.js +32 -0
  161. package/dist/collection/utils/xy/formatXYValue.js +13 -0
  162. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  163. package/dist/collection/utils/xy/model/XYChartStyle.js +2 -0
  164. package/dist/components/DataFormatDigits.js +1 -1
  165. package/dist/components/DateStringFactory.js +1 -1
  166. package/dist/components/LabelCollisionManager.js +1 -1
  167. package/dist/components/NumericScale.js +1 -1
  168. package/dist/components/Order.js +1 -1
  169. package/dist/components/SVGStyle.js +1 -0
  170. package/dist/components/TableAttribute.js +1 -0
  171. package/dist/components/VarianceMeasure.js +1 -1
  172. package/dist/components/XYChartDataRow.js +1 -1
  173. package/dist/components/bn-asset.js +1 -1
  174. package/dist/components/bn-body2.js +1 -1
  175. package/dist/components/bn-card2.js +1 -1
  176. package/dist/components/bn-chart-bubble.js +1 -1
  177. package/dist/components/bn-chart-bullet.js +1 -1
  178. package/dist/components/bn-chart-scatter.js +1 -1
  179. package/dist/components/bn-chart-structure.js +1 -1
  180. package/dist/components/bn-chart-time.js +1 -1
  181. package/dist/components/bn-component-style.js +1 -1
  182. package/dist/components/bn-context.js +1 -1
  183. package/dist/components/bn-dataset.js +1 -1
  184. package/dist/components/bn-datasource.js +1 -1
  185. package/dist/components/bn-footer2.js +1 -1
  186. package/dist/components/bn-grid.js +1 -1
  187. package/dist/components/bn-image.js +1 -1
  188. package/dist/components/bn-internationalization.js +1 -1
  189. package/dist/components/bn-layout-card.js +1 -1
  190. package/dist/components/bn-layout-page.js +1 -1
  191. package/dist/components/bn-message2.js +1 -1
  192. package/dist/components/bn-page2.js +1 -1
  193. package/dist/components/bn-ruleset.js +1 -1
  194. package/dist/components/bn-scaling-group.js +1 -1
  195. package/dist/components/bn-table.js +1 -1
  196. package/dist/components/bn-template.js +1 -1
  197. package/dist/components/bn-text.js +1 -1
  198. package/dist/components/bn-title2.js +1 -1
  199. package/dist/components/bn-tree.js +1 -1
  200. package/dist/components/checkXYOverflow.js +1 -0
  201. package/dist/components/context-protocol.js +1 -1
  202. package/dist/components/editor-companion.js +1 -1
  203. package/dist/components/emptyState.js +1 -0
  204. package/dist/components/formatter.js +1 -1
  205. package/dist/components/ibcs-chart-bubble2.js +1 -1
  206. package/dist/components/ibcs-chart-bullet2.js +1 -1
  207. package/dist/components/ibcs-chart-scatter2.js +1 -1
  208. package/dist/components/ibcs-chart-structure2.js +1 -1
  209. package/dist/components/ibcs-chart-time2.js +1 -1
  210. package/dist/components/ibcs-table2.js +1 -1
  211. package/dist/components/ibcs-title2.js +1 -1
  212. package/dist/components/layoutTemplate.js +1 -0
  213. package/dist/components/pageFormats.js +1 -0
  214. package/dist/components/parentDimensions.js +1 -0
  215. package/dist/components/queryError.js +1 -0
  216. package/dist/components/relativeVariance.js +1 -0
  217. package/dist/components/sanitizeHtml.js +1 -1
  218. package/dist/components/stackColors.js +1 -1
  219. package/dist/components/stackLayout.js +1 -0
  220. package/dist/components/svg.esm.js +1 -0
  221. package/dist/components/validate.js +1 -1
  222. package/dist/components/withBodyObserver.js +1 -1
  223. package/dist/components/withComponentStatus.js +1 -0
  224. package/dist/components/withComponentStyle.js +1 -1
  225. package/dist/components/withDataset.js +1 -1
  226. package/dist/components/withHasError.js +1 -1
  227. package/dist/components/withRuleSet.js +1 -1
  228. package/dist/components/withScalingGroup.js +1 -1
  229. package/dist/components/withStyled.js +1 -1
  230. package/dist/components/withTranslation.js +1 -1
  231. package/dist/esm/{bn-asset_21.entry.js → bn-asset_28.entry.js} +20948 -6125
  232. package/dist/esm/bn-grid.entry.js +4 -6
  233. package/dist/esm/bn-image.entry.js +3 -5
  234. package/dist/esm/bn-internationalization.entry.js +17 -6
  235. package/dist/esm/bn-ruleset.entry.js +5 -5
  236. package/dist/esm/bn-template-engine.js +1 -1
  237. package/dist/esm/bn-template.entry.js +2 -2
  238. package/dist/esm/bn-text.entry.js +111 -39
  239. package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-CdTp19uA.js} +106 -22
  240. package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-vw6TKMiT.js} +1 -1
  241. package/dist/esm/editor-companion.entry.js +2 -2
  242. package/dist/esm/loader.js +1 -1
  243. package/dist/esm/queryError-ClruFZD_.js +13 -0
  244. package/dist/esm/{scaling-Dggyeqts.js → sanitizeHtml-C5bFtARM.js} +464 -287
  245. package/dist/esm/{withBodyObserver-Cb9ZC5_J.js → withBodyObserver-DD_-r04o.js} +1 -1
  246. package/dist/esm/withHasError-73WV2SP5.js +422 -0
  247. package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-BDEyKd_H.js} +513 -27
  248. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +8 -4
  249. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +2 -1
  250. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +14 -2
  251. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +12 -11
  252. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +2 -1
  253. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +8 -5
  254. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -0
  255. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +1 -1
  256. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +8 -4
  257. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +2 -1
  258. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +11 -1
  259. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +13 -12
  260. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +8 -1
  261. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +29 -6
  262. package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +4 -3
  263. package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -2
  264. package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +2 -1
  265. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +2 -0
  266. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +19 -15
  267. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +8 -1
  268. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +63 -5
  269. package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +1 -1
  270. package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +9 -8
  271. package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -2
  272. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +3 -2
  273. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +2 -0
  274. package/dist/types/components/bn-context/bn-context.d.ts +15 -3
  275. package/dist/types/components/bn-dataset/bn-dataset.d.ts +41 -20
  276. package/dist/types/components/bn-datasource/bn-datasource.d.ts +34 -18
  277. package/dist/types/components/bn-footer/bn-footer.d.ts +2 -2
  278. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +3 -10
  279. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +13 -6
  280. package/dist/types/components/bn-message/bn-message.d.ts +2 -1
  281. package/dist/types/components/bn-page/bn-page.d.ts +2 -1
  282. package/dist/types/components/bn-page/pageFormats.d.ts +40 -0
  283. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +2 -2
  284. package/dist/types/components/bn-table/bn-table.d.ts +11 -10
  285. package/dist/types/components/bn-table/ibcs-table.d.ts +8 -5
  286. package/dist/types/components/bn-table/utils/Table.d.ts +3 -1
  287. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -2
  288. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +6 -4
  289. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +1 -1
  290. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +2 -0
  291. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +14 -5
  292. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +2 -2
  293. package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +6 -1
  294. package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +2 -2
  295. package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +2 -0
  296. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +2 -1
  297. package/dist/types/components/bn-text/bn-text.d.ts +20 -13
  298. package/dist/types/components/bn-text/utils/template.d.ts +10 -0
  299. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +1 -0
  300. package/dist/types/components/bn-tree/bn-tree.d.ts +8 -1
  301. package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +18 -5
  302. package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +5 -0
  303. package/dist/types/components.d.ts +226 -184
  304. package/dist/types/context/scopedDb.d.ts +20 -0
  305. package/dist/types/stores/componentStyles.d.ts +6 -0
  306. package/dist/types/utils/DateStringFactory.d.ts +3 -2
  307. package/dist/types/utils/autoFit.d.ts +2 -2
  308. package/dist/types/utils/componentRegister.d.ts +21 -5
  309. package/dist/types/utils/constants.d.ts +2 -2
  310. package/dist/types/utils/dataAnalyzer.d.ts +1 -1
  311. package/dist/types/utils/emptyState.d.ts +10 -0
  312. package/dist/types/utils/formatter.d.ts +7 -9
  313. package/dist/types/utils/layoutState/generic.d.ts +1 -1
  314. package/dist/types/utils/layoutState/svgChartElements.d.ts +2 -2
  315. package/dist/types/utils/layoutTemplate.d.ts +16 -0
  316. package/dist/types/utils/model/ChartStyles.d.ts +1 -1
  317. package/dist/types/utils/model/DataQueryResultRow.d.ts +2 -2
  318. package/dist/types/utils/model/Order.d.ts +1 -1
  319. package/dist/types/utils/model/styles/SVGStyle.d.ts +5 -1
  320. package/dist/types/utils/parentDimensions.d.ts +9 -0
  321. package/dist/types/utils/queryError.d.ts +5 -0
  322. package/dist/types/utils/relativeVariance.d.ts +9 -0
  323. package/dist/types/utils/sanitizeHtml.d.ts +2 -2
  324. package/dist/types/utils/scaling.d.ts +1 -1
  325. package/dist/types/utils/stackColors.d.ts +3 -2
  326. package/dist/types/utils/stackLayout.d.ts +49 -0
  327. package/dist/types/utils/testing/fakeGroup.d.ts +8 -0
  328. package/dist/types/utils/testing/mutationObserver.d.ts +5 -0
  329. package/dist/types/utils/testing/structureChart.d.ts +5 -0
  330. package/dist/types/utils/testing/timeChart.d.ts +5 -0
  331. package/dist/types/utils/validate.d.ts +1 -1
  332. package/dist/types/utils/withComponentStatus.d.ts +11 -3
  333. package/dist/types/utils/withInheritedProps.d.ts +42 -15
  334. package/dist/types/utils/withRuleSet.d.ts +2 -1
  335. package/dist/types/utils/withTranslation.d.ts +2 -2
  336. package/dist/types/utils/xy/FacetGrid.d.ts +1 -1
  337. package/dist/types/utils/xy/IsoCurves.d.ts +1 -1
  338. package/dist/types/utils/xy/NumericScale.d.ts +9 -4
  339. package/dist/types/utils/xy/PointLabeler.d.ts +2 -2
  340. package/dist/types/utils/xy/RadiusScale.d.ts +2 -2
  341. package/dist/types/utils/xy/SeriesPalette.d.ts +3 -3
  342. package/dist/types/utils/xy/VarianceMeasure.d.ts +10 -2
  343. package/dist/types/utils/xy/XYFrame.d.ts +4 -1
  344. package/dist/types/utils/xy/XYLegend.d.ts +3 -1
  345. package/dist/types/utils/xy/checkXYOverflow.d.ts +8 -0
  346. package/dist/types/utils/xy/formatXYValue.d.ts +7 -0
  347. package/dist/types/utils/xy/model/AxisConfig.d.ts +1 -1
  348. package/dist/types/utils/xy/model/XYChartStyle.d.ts +2 -0
  349. package/package.json +4 -2
  350. package/readme.md +11 -11
  351. package/dist/bn-template-engine/p-03304284.entry.js +0 -1
  352. package/dist/bn-template-engine/p-0fb02c57.entry.js +0 -1
  353. package/dist/bn-template-engine/p-4419db8f.entry.js +0 -1
  354. package/dist/bn-template-engine/p-45508f1b.entry.js +0 -1
  355. package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
  356. package/dist/bn-template-engine/p-5d7a3a77.entry.js +0 -1
  357. package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
  358. package/dist/bn-template-engine/p-686d8e44.entry.js +0 -1
  359. package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
  360. package/dist/bn-template-engine/p-B5Jd_eCX.js +0 -1
  361. package/dist/bn-template-engine/p-BA48JiHe.js +0 -1
  362. package/dist/bn-template-engine/p-BbmobTg0.js +0 -1
  363. package/dist/bn-template-engine/p-BcaI745G.js +0 -1
  364. package/dist/bn-template-engine/p-CG_Bcm6V.js +0 -1
  365. package/dist/bn-template-engine/p-CWWWM-XC.js +0 -1
  366. package/dist/bn-template-engine/p-CsJ84YRk.js +0 -1
  367. package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
  368. package/dist/bn-template-engine/p-DVrDYxlh.js +0 -1
  369. package/dist/bn-template-engine/p-DjPXefnq.js +0 -1
  370. package/dist/bn-template-engine/p-DsTzlzxQ.js +0 -1
  371. package/dist/bn-template-engine/p-DtLI_CzV.js +0 -1
  372. package/dist/bn-template-engine/p-EtT29btN.js +0 -1
  373. package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
  374. package/dist/bn-template-engine/p-a5867a4c.entry.js +0 -1
  375. package/dist/bn-template-engine/p-b27009eb.entry.js +0 -1
  376. package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
  377. package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
  378. package/dist/bn-template-engine/p-fcfbb329.entry.js +0 -1
  379. package/dist/bn-template-engine/p-qRZrT-U3.js +0 -1
  380. package/dist/cjs/AxisConfig-DwiNUyYG.js +0 -233
  381. package/dist/cjs/LabelCollisionManager-Bv-xkeXw.js +0 -415
  382. package/dist/cjs/NumericScale-BAyYXpKL.js +0 -107
  383. package/dist/cjs/Order-2wRydarc.js +0 -87
  384. package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
  385. package/dist/cjs/SVGVariancesStyleGroup-CiI4GeWe.js +0 -50
  386. package/dist/cjs/VarianceMeasure-CQlSRzlp.js +0 -372
  387. package/dist/cjs/XYChartDataRow-C2FdL58s.js +0 -829
  388. package/dist/cjs/bn-chart-bubble.cjs.entry.js +0 -792
  389. package/dist/cjs/bn-chart-bullet.cjs.entry.js +0 -805
  390. package/dist/cjs/bn-chart-scatter.cjs.entry.js +0 -678
  391. package/dist/cjs/bn-tree.cjs.entry.js +0 -1042
  392. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +0 -624
  393. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +0 -673
  394. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +0 -667
  395. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +0 -85
  396. package/dist/cjs/svgChartElements-tDA43aYj.js +0 -400
  397. package/dist/cjs/withHasError-BdDmiOXM.js +0 -258
  398. package/dist/cjs/withScalingGroup-CFIc5-6s.js +0 -73
  399. package/dist/components/autoFit.js +0 -1
  400. package/dist/components/main.js +0 -1
  401. package/dist/components/utils.js +0 -1
  402. package/dist/esm/AxisConfig-KqzWQbML.js +0 -224
  403. package/dist/esm/LabelCollisionManager-585bQMtP.js +0 -407
  404. package/dist/esm/NumericScale-DsTzlzxQ.js +0 -105
  405. package/dist/esm/Order-DZVWjEL_.js +0 -83
  406. package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
  407. package/dist/esm/SVGVariancesStyleGroup-DO5QJfRQ.js +0 -48
  408. package/dist/esm/VarianceMeasure-DDjChp8C.js +0 -364
  409. package/dist/esm/XYChartDataRow-Dn83Tqh9.js +0 -820
  410. package/dist/esm/bn-chart-bubble.entry.js +0 -790
  411. package/dist/esm/bn-chart-bullet.entry.js +0 -803
  412. package/dist/esm/bn-chart-scatter.entry.js +0 -676
  413. package/dist/esm/bn-tree.entry.js +0 -1040
  414. package/dist/esm/ibcs-chart-bubble.entry.js +0 -622
  415. package/dist/esm/ibcs-chart-bullet.entry.js +0 -671
  416. package/dist/esm/ibcs-chart-scatter.entry.js +0 -665
  417. package/dist/esm/sanitizeHtml-BA48JiHe.js +0 -83
  418. package/dist/esm/svgChartElements-B3YClivG.js +0 -395
  419. package/dist/esm/withHasError-Bh1Viz52.js +0 -254
  420. package/dist/esm/withScalingGroup-DNBSqRC0.js +0 -71
@@ -0,0 +1 @@
1
+ import{C as t}from"./CompareUtil.js";class n{constructor(){this.font="16px Arial",this.family="Arial",this.size=16,this.color="#000000",this.background="#ffffff",this.leading=1.8}}class r{adapt(r){const i=new n;return t.isString(r.font)&&(i.font=r.font),t.isString(r.family)&&(i.family=r.family),t.isNumber(r.size)&&(i.size=r.size),t.isString(r.color)&&(i.color=r.color),t.isString(r.background)&&(i.background=r.background),t.isNumber(r.leading)&&(i.leading=r.leading),i}default(){return new n}}class i{constructor(){this.top=10,this.left=10,this.right=10,this.bottom=10}}class s{adapt(n){const r=new i;return t.isNumber(n.top)&&(r.top=n.top),t.isNumber(n.left)&&(r.left=n.left),t.isNumber(n.right)&&(r.right=n.right),t.isNumber(n.bottom)&&(r.bottom=n.bottom),r}default(){return new i}}class e{constructor(t,n,r,i){this.ac=t,this.fc=n,this.pp=r,this.pl=i}getSVGStyle(t){return"ac"===t?this.ac:"fc"===t?this.fc:"pp"===t?this.pp:"pl"===t?this.pl:this.ac}}class h{constructor(t){this.svgStyleAdapter=t}adapt(n){const r=new e(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL());return t.isExisting(n.ac)&&(r.ac=this.svgStyleAdapter.adapt(n.ac)),t.isExisting(n.fc)&&(r.fc=this.svgStyleAdapter.adapt(n.fc)),t.isExisting(n.pp)&&(r.pp=this.svgStyleAdapter.adapt(n.pp)),t.isExisting(n.pl)&&(r.pl=this.svgStyleAdapter.adapt(n.pl)),r}default(){return new e(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL())}}var u=Object.create,o=Object.defineProperty,c=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(t,n)=>()=>(n||(t((n={exports:{}}).exports,n),t=null),n.exports),d=t=>{let n={};for(var r in t)o(n,r,{get:t[r],enumerable:!0});return o(n,Symbol.toStringTag,{value:"Module"}),n},w=(t,n,r)=>(r=null!=t?u(l(t)):{},((t,n,r,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(var s,e=a(n),h=0,u=e.length;h<u;h++)f.call(t,s=e[h])||undefined===s||o(t,s,{get:(t=>n[t]).bind(null,s),enumerable:!(i=c(n,s))||i.enumerable});return t})(o(r,"default",{value:t,enumerable:!0}),t));const y={},m=[];function v(t,n){if(Array.isArray(t))for(const r of t)v(r,n);else if("object"!=typeof t)g(Object.getOwnPropertyNames(n)),y[t]=Object.assign(y[t]||{},n);else for(const n in t)v(n,t[n])}function b(t){return y[t]||{}}function g(t){m.push(...t)}var x=p(((t,n)=>{n.exports=function(t){try{return!!t()}catch(t){return!0}}})),M=p(((t,n)=>{var r=x();n.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))})),_=p(((t,n)=>{var r=M(),i=Function.prototype,s=i.call,e=r&&i.bind.bind(s,s);n.exports=r?e:function(t){return function(){return s.apply(t,arguments)}}})),j=p(((t,n)=>{var r=_();n.exports=r({}.isPrototypeOf)})),O=p(((t,n)=>{var r=function(t){return t&&t.Math===Math&&t};n.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()})),k=p(((t,n)=>{var r=M(),i=Function.prototype,s=i.apply,e=i.call;n.exports="object"==typeof Reflect&&Reflect.apply||(r?e.bind(s):function(){return e.apply(s,arguments)})})),A=p(((t,n)=>{var r=_(),i=r({}.toString),s=r("".slice);n.exports=function(t){return s(i(t),8,-1)}})),S=p(((t,n)=>{var r=A(),i=_();n.exports=function(t){if("Function"===r(t))return i(t)}})),T=p(((t,n)=>{var r="object"==typeof document&&document.all;n.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}})),E=p(((t,n)=>{var r=x();n.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))})),C=p(((t,n)=>{var r=M(),i=Function.prototype.call;n.exports=r?i.bind(i):function(){return i.apply(i,arguments)}})),z=p((t=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(t){var n=r(this,t);return!!n&&n.enumerable}:n})),F=p(((t,n)=>{n.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}})),N=p(((t,n)=>{var r=_(),i=x(),s=A(),e=Object,h=r("".split);n.exports=i((function(){return!e("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?h(t,""):e(t)}:e})),D=p(((t,n)=>{n.exports=function(t){return null==t}})),P=p(((t,n)=>{var r=D(),i=TypeError;n.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}})),$=p(((t,n)=>{var r=N(),i=P();n.exports=function(t){return r(i(t))}})),R=p(((t,n)=>{var r=T();n.exports=function(t){return"object"==typeof t?null!==t:r(t)}})),L=p(((t,n)=>{n.exports={}})),I=p(((t,n)=>{var r=L(),i=O(),s=T(),e=function(t){return s(t)?t:void 0};n.exports=function(t,n){return arguments.length<2?e(r[t])||e(i[t]):r[t]&&r[t][n]||i[t]&&i[t][n]}})),G=p(((t,n)=>{var r=O().navigator,i=r&&r.userAgent;n.exports=i?String(i):""})),Y=p(((t,n)=>{var r,i,s=O(),e=G(),h=s.process,u=s.Deno,o=h&&h.versions||u&&u.version,c=o&&o.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&e&&(!(r=e.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=e.match(/Chrome\/(\d+)/))&&(i=+r[1]),n.exports=i})),X=p(((t,n)=>{var r=Y(),i=x(),s=O().String;n.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))})),H=p(((t,n)=>{var r=X();n.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator})),B=p(((t,n)=>{var r=I(),i=T(),s=j(),e=H(),h=Object;n.exports=e?function(t){return"symbol"==typeof t}:function(t){var n=r("Symbol");return i(n)&&s(n.prototype,h(t))}})),V=p(((t,n)=>{var r=String;n.exports=function(t){try{return r(t)}catch(t){return"Object"}}})),Q=p(((t,n)=>{var r=T(),i=V(),s=TypeError;n.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not a function")}})),J=p(((t,n)=>{var r=Q(),i=D();n.exports=function(t,n){var s=t[n];return i(s)?void 0:r(s)}})),U=p(((t,n)=>{var r=C(),i=T(),s=R(),e=TypeError;n.exports=function(t,n){var h,u;if("string"===n&&i(h=t.toString)&&!s(u=r(h,t)))return u;if(i(h=t.valueOf)&&!s(u=r(h,t)))return u;if("string"!==n&&i(h=t.toString)&&!s(u=r(h,t)))return u;throw new e("Can't convert object to primitive value")}})),q=p(((t,n)=>{n.exports=!0})),W=p(((t,n)=>{var r=O(),i=Object.defineProperty;n.exports=function(t,n){try{i(r,t,{value:n,configurable:!0,writable:!0})}catch(i){r[t]=n}return n}})),Z=p(((t,n)=>{var r=q(),i=O(),s=W(),e="__core-js_shared__",h=n.exports=i[e]||s(e,{});(h.versions||(h.versions=[])).push({version:"3.49.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})})),K=p(((t,n)=>{var r=Z();n.exports=function(t,n){return r[t]||(r[t]=n||{})}})),tt=p(((t,n)=>{var r=P(),i=Object;n.exports=function(t){return i(r(t))}})),nt=p(((t,n)=>{var r=_(),i=tt(),s=r({}.hasOwnProperty);n.exports=Object.hasOwn||function(t,n){return s(i(t),n)}})),rt=p(((t,n)=>{var r=_(),i=0,s=Math.random(),e=r(1.1.toString);n.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+e(++i+s,36)}})),it=p(((t,n)=>{var r=O(),i=K(),s=nt(),e=rt(),h=X(),u=H(),o=r.Symbol,c=i("wks"),a=u?o.for||o:o&&o.withoutSetter||e;n.exports=function(t){return s(c,t)||(c[t]=h&&s(o,t)?o[t]:a("Symbol."+t)),c[t]}})),st=p(((t,n)=>{var r=C(),i=R(),s=B(),e=J(),h=U(),u=it(),o=TypeError,c=u("toPrimitive");n.exports=function(t,n){if(!i(t)||s(t))return t;var u,a=e(t,c);if(a){if(void 0===n&&(n="default"),u=r(a,t,n),!i(u)||s(u))return u;throw new o("Can't convert object to primitive value")}return void 0===n&&(n="number"),h(t,n)}})),et=p(((t,n)=>{var r=st(),i=B();n.exports=function(t){var n=r(t,"string");return i(n)?n:n+""}})),ht=p(((t,n)=>{var r=O(),i=R(),s=r.document,e=i(s)&&i(s.createElement);n.exports=function(t){return e?s.createElement(t):{}}})),ut=p(((t,n)=>{var r=E(),i=x(),s=ht();n.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))})),ot=p((t=>{var n=E(),r=C(),i=z(),s=F(),e=$(),h=et(),u=nt(),o=ut(),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(t,n){if(t=e(t),n=h(n),o)try{return c(t,n)}catch(t){}if(u(t,n))return s(!r(i.f,t,n),t[n])}})),ct=p(((t,n)=>{var r=x(),i=T(),s=/#|\.prototype\./,e=function(t,n){var s=u[h(t)];return s===c||s!==o&&(i(n)?r(n):!!n)},h=e.normalize=function(t){return String(t).replace(s,".").toLowerCase()},u=e.data={},o=e.NATIVE="N",c=e.POLYFILL="P";n.exports=e})),at=p(((t,n)=>{var r=S(),i=Q(),s=M(),e=r(r.bind);n.exports=function(t,n){return i(t),void 0===n?t:s?e(t,n):function(){return t.apply(n,arguments)}}})),lt=p(((t,n)=>{var r=E(),i=x();n.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))})),ft=p(((t,n)=>{var r=R(),i=String,s=TypeError;n.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not an object")}})),pt=p((t=>{var n=E(),r=ut(),i=lt(),s=ft(),e=et(),h=TypeError,u=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c="enumerable",a="configurable",l="writable";t.f=n?i?function(t,n,r){if(s(t),n=e(n),s(r),"function"==typeof t&&"prototype"===n&&"value"in r&&l in r&&!r[l]){var i=o(t,n);i&&i[l]&&(t[n]=r.value,r={configurable:a in r?r[a]:i[a],enumerable:c in r?r[c]:i[c],writable:!1})}return u(t,n,r)}:u:function(t,n,i){if(s(t),n=e(n),s(i),r)try{return u(t,n,i)}catch(t){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(t[n]=i.value),t}})),dt=p(((t,n)=>{var r=E(),i=pt(),s=F();n.exports=r?function(t,n,r){return i.f(t,n,s(1,r))}:function(t,n,r){return t[n]=r,t}})),wt=p(((t,n)=>{var r=O(),i=k(),s=S(),e=T(),h=ot().f,u=ct(),o=L(),c=at(),a=dt(),l=nt();Z();var f=function(t){var n=function(r,s,e){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,s)}return new t(r,s,e)}return i(t,this,arguments)};return n.prototype=t.prototype,n};n.exports=function(t,n){var i,p,d,w,y,m,v,b,g,x=t.target,M=t.global,_=t.stat,j=t.proto,O=M?r:_?r[x]:r[x]&&r[x].prototype,k=M?o:o[x]||a(o,x,{})[x],A=k.prototype;for(w in n)p=!(i=u(M?w:x+(_?".":"#")+w,t.forced))&&O&&l(O,w),m=k[w],p&&(v=t.dontCallGetSet?(g=h(O,w))&&g.value:O[w]),y=p&&v?v:n[w],(i||j||typeof m!=typeof y)&&(b=t.bind&&p?c(y,r):t.wrap&&p?f(y):j&&e(y)?s(y):y,(t.sham||y&&y.sham||m&&m.sham)&&a(b,"sham",!0),a(k,w,b),j&&(l(o,d=x+"Prototype")||a(o,d,{}),a(o[d],w,y),t.real&&A&&(i||!A[w])&&a(A,w,y)))}})),yt=p(((t,n)=>{var r=Math.ceil,i=Math.floor;n.exports=Math.trunc||function(t){var n=+t;return(n>0?i:r)(n)}})),mt=p(((t,n)=>{var r=yt();n.exports=function(t){var n=+t;return n!=n||0===n?0:r(n)}})),vt=p(((t,n)=>{var r=mt(),i=Math.max,s=Math.min;n.exports=function(t,n){var e=r(t);return e<0?i(e+n,0):s(e,n)}})),bt=p(((t,n)=>{var r=mt(),i=Math.min;n.exports=function(t){var n=r(t);return n>0?i(n,9007199254740991):0}})),gt=p(((t,n)=>{var r=bt();n.exports=function(t){return r(t.length)}})),xt=p(((t,n)=>{var r=$(),i=vt(),s=gt(),e=function(t){return function(n,e,h){var u=r(n),o=s(u);if(0===o)return!t&&-1;var c,a=i(h,o);if(t&&e!=e){for(;o>a;)if((c=u[a++])!=c)return!0}else for(;o>a;a++)if((t||a in u)&&u[a]===e)return t||a||0;return!t&&-1}};n.exports={includes:e(!0),indexOf:e(!1)}})),Mt=p(((t,n)=>{n.exports=function(){}})),_t=p((()=>{var t=wt(),n=xt().includes,r=x(),i=Mt(),s=r((function(){return!Array(1).includes()})),e=r((function(){return[,1].includes(void 0,1)}));t({target:"Array",proto:!0,forced:s||e},{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")})),jt=p(((t,n)=>{var r=O(),i=L();n.exports=function(t,n){var s=i[t+"Prototype"],e=s&&s[n];if(e)return e;var h=r[t],u=h&&h.prototype;return u&&u[n]}})),Ot=p(((t,n)=>{_t();var r=jt();n.exports=r("Array","includes")})),kt=p(((t,n)=>{var r=R(),i=A(),s=it()("match");n.exports=function(t){var n;return r(t)&&(void 0!==(n=t[s])?!!n:"RegExp"===i(t))}})),At=p(((t,n)=>{var r=kt(),i=TypeError;n.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}})),St=p(((t,n)=>{var r={};r[it()("toStringTag")]="z",n.exports="[object z]"===String(r)})),Tt=p(((t,n)=>{var r=St(),i=T(),s=A(),e=it()("toStringTag"),h=Object,u="Arguments"===s(function(){return arguments}());n.exports=r?s:function(t){var n,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=h(t),e))?r:u?s(n):"Object"===(o=s(n))&&i(n.callee)?"Arguments":o}})),Et=p(((t,n)=>{var r=Tt(),i=String;n.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}})),Ct=p(((t,n)=>{var r=it()("match");n.exports=function(t){var n=/./;try{"/./"[t](n)}catch(i){try{return n[r]=!1,"/./"[t](n)}catch(t){}}return!1}})),zt=p((()=>{var t=wt(),n=_(),r=At(),i=P(),s=Et(),e=Ct(),h=n("".indexOf);t({target:"String",proto:!0,forced:!e("includes")},{includes:function(t){return!!~h(s(i(this)),s(r(t)),arguments.length>1?arguments[1]:void 0)}})})),Ft=p(((t,n)=>{zt();var r=jt();n.exports=r("String","includes")})),Nt=p(((t,n)=>{var r=j(),i=Ot(),s=Ft(),e=Array.prototype,h=String.prototype;n.exports=function(t){var n=t.includes;return t===e||r(e,t)&&n===e.includes?i:"string"==typeof t||t===h||r(h,t)&&n===h.includes?s:n}})),Dt=w(p(((t,n)=>{var r=Nt();n.exports=r}))());function Pt(t,n){let r;const i=t.length,s=[];for(r=0;r<i;r++)s.push(n(t[r]));return s}function $t(t){return t%360*Math.PI/180}function Rt(t){return t.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function It(t,n,r,i){return null!=n&&null!=r||(i=i||t.bbox(),null==n?n=i.width/i.height*r:null==r&&(r=i.height/i.width*n)),{width:n,height:r}}function Gt(t,n){const r=t.origin;let i=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",s=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=r&&([i,s]=Array.isArray(r)?r:"object"==typeof r?[r.x,r.y]:[r,r]);const e="string"==typeof i,h="string"==typeof s;if(e||h){const{height:t,width:r,x:u,y:o}=n.bbox();e&&(i=(0,Dt.default)(i).call(i,"left")?u:(0,Dt.default)(i).call(i,"right")?u+r:u+r/2),h&&(s=(0,Dt.default)(s).call(s,"top")?o:(0,Dt.default)(s).call(s,"bottom")?o+t:o+t/2)}return[i,s]}const Yt=new Set(["desc","metadata","title"]),Xt=t=>Yt.has(t.nodeName),Ht="http://www.w3.org/2000/svg",Bt="http://www.w3.org/2000/xmlns/",Vt="http://www.w3.org/1999/xlink",Qt={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};var Jt=class{};const Ut={},qt="___SYMBOL___ROOT___";function Wt(t,n=Ht){return Qt.document.createElementNS(n,t)}function Zt(t,n=!1){if(t instanceof Jt)return t;if("object"==typeof t)return nn(t);if(null==t)return new Ut[qt];if("string"==typeof t&&"<"!==t.trim().charAt(0))return nn(Qt.document.querySelector(t));const r=n?Qt.document.createElement("div"):Wt("svg");return r.innerHTML=t.trim(),t=nn(r.firstElementChild),r.removeChild(r.firstElementChild),t}function Kt(t,n){return n&&(n instanceof Qt.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:Wt(t)}function tn(t){if(!t)return null;if(t.instance instanceof Jt)return t.instance;if("#document-fragment"===t.nodeName)return new Ut.Fragment(t);let n=Lt(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":Ut[n]||(n="Dom"),new Ut[n](t)}let nn=tn;function rn(t,n=t.name,r=!1){return Ut[n]=t,r&&(Ut[qt]=t),g(Object.getOwnPropertyNames(t.prototype)),t}let sn=1e3;function en(t){return"Svgjs"+Lt(t)+sn++}function hn(t){for(let n=t.children.length-1;n>=0;n--)hn(t.children[n]);return t.id?(t.id=en(t.nodeName),t):t}function un(t,n){let r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in n)t[i].prototype[r]=n[r]}function on(t){return function(...n){const r=n[n.length-1];return!r||r.constructor!==Object||r instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(r)}}v("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Zt(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=Zt(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=Zt(t)).before(this),this},insertAfter:function(t){return(t=Zt(t)).after(this),this}});const cn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,an=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ln=/rgb\((\d+),(\d+),(\d+)\)/,fn=/^(#[^\s]+)$/,pn=/\)\s*,?\s*/,dn=/\s/g,wn=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,yn=/^rgb\(/,mn=/^(\s+)?$/,vn=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,bn=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,gn=/[\s,]+/,xn=/[MLHVCSQTAZ]/i;v("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(gn)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}});const Mn=t=>t.startsWith("--")?t:Rt(t);function _n(t){const n=Math.max(0,Math.min(255,Math.round(t))).toString(16);return 1===n.length?"0"+n:n}function jn(t,n){for(let r=n.length;r--;)if(null==t[n[r]])return!1;return!0}function On(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(n-t)*r:r<.5?n:r<2/3?t+(n-t)*(2/3-r)*6:t}v("Dom",{css:function(t,n){const r={};if(0===arguments.length){const t=this.node.style;for(let n=0;n<t.length;n++){const i=t.item(n),s=t.getPropertyValue(i),e=t.getPropertyPriority(i);r[i]=e?`${s} !${e}`:s}return r}if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=Mn(n);r[n]=this.node.style.getPropertyValue(t)}return r}if("string"==typeof t)return this.node.style.getPropertyValue(Mn(t));if("object"==typeof t)for(const n in t)this.node.style.setProperty(Mn(n),null==t[n]||mn.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(Mn(t),null==n||mn.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),v("Dom",{data:function(t,n,r){if(null==t)return this.data(Pt(function(t){let n;const r=t.length,i=[];for(n=0;n<r;n++)0===t[n].nodeName.indexOf("data-")&&i.push(t[n]);return i}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const r of t)n[r]=this.data(r);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(n){return this.attr("data-"+t)}else this.attr("data-"+t,null===n?null:!0===r||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),v("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var kn=class t{constructor(...t){this.init(...t)}static isColor(n){return n&&(n instanceof t||this.isRgb(n)||this.test(n))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(n="vibrant",r){const{random:i,round:s,sin:e,PI:h}=Math;if("vibrant"===n){const n=24*i()+57,r=38*i()+45,s=360*i();return new t(n,r,s,"lch")}if("sine"===n){const n=s(80*e(2*h*(r=null==r?i():r)/.5+.01)+150),u=s(50*e(2*h*r/.5+4.6)+200),o=s(100*e(2*h*r/.5+2.3)+150);return new t(n,u,o)}if("pastel"===n){const n=8*i()+86,r=17*i()+9,s=360*i();return new t(n,r,s,"lch")}if("dark"===n){const n=10+10*i(),r=50*i()+86,s=360*i();return new t(n,r,s,"lch")}if("rgb"===n){const n=255*i(),r=255*i(),s=255*i();return new t(n,r,s)}if("lab"===n){const n=100*i(),r=256*i()-128,s=256*i()-128;return new t(n,r,s,"lab")}if("grey"===n){const n=255*i();return new t(n,n,n)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(wn.test(t)||yn.test(t))}cmyk(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=Math.min(1-s,1-e,1-h);return 1===u?new t(0,0,0,1,"cmyk"):new t((1-s-u)/(1-u),(1-e-u)/(1-u),(1-h-u)/(1-u),u,"cmyk")}hsl(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=Math.max(s,e,h),o=Math.min(s,e,h),c=(u+o)/2,a=u===o,l=u-o;return new t(360*(a?0:u===s?((e-h)/l+(e<h?6:0))/6:u===e?((h-s)/l+2)/6:u===h?((s-e)/l+4)/6:0),100*(a?0:c>.5?l/(2-u-o):l/(u+o)),100*c,"hsl")}init(t=0,n=0,r=0,i=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof i?i:s,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:n,_c:r,_d:i,space:s});else if(t instanceof Array)this.space=n||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const r=function(t,n){const r=jn(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:jn(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:jn(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:jn(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:jn(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:jn(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=n||r.space,r}(t,n);Object.assign(this,r)}else if("string"==typeof t)if(yn.test(t)){const n=t.replace(dn,""),[r,i,s]=ln.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:r,_b:i,_c:s,_d:0,space:"rgb"})}else{if(!wn.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,r,i,s]=an.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(n);Object.assign(this,{_a:r,_b:i,_c:s,_d:0,space:"rgb"})}}const{_a:e,_b:h,_c:u,_d:o}=this;Object.assign(this,"rgb"===this.space?{r:e,g:h,b:u}:"xyz"===this.space?{x:e,y:h,z:u}:"hsl"===this.space?{h:e,s:h,l:u}:"lab"===this.space?{l:e,a:h,b:u}:"lch"===this.space?{l:e,c:h,h:u}:"cmyk"===this.space?{c:e,m:h,y:u,k:o}:{})}lab(){const{x:n,y:r,z:i}=this.xyz();return new t(116*r-16,500*(n-r),200*(r-i),"lab")}lch(){const{l:n,a:r,b:i}=this.lab(),s=Math.sqrt(r**2+i**2);let e=180*Math.atan2(i,r)/Math.PI;return e<0&&(e*=-1,e=360-e),new t(n,s,e,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(n=this.space)||"xyz"===n||"lch"===n){let{x:n,y:r,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:t,a:s,b:e}=this;if("lch"===this.space){const{c:t,h:n}=this,r=Math.PI/180;s=t*Math.cos(r*n),e=t*Math.sin(r*n)}const h=(t+16)/116,u=s/500+h,o=h-e/200,c=16/116,a=.008856,l=7.787;n=.95047*(u**3>a?u**3:(u-c)/l),r=1*(h**3>a?h**3:(h-c)/l),i=1.08883*(o**3>a?o**3:(o-c)/l)}const s=3.2406*n+-1.5372*r+-.4986*i,e=-.9689*n+1.8758*r+.0415*i,h=.0557*n+-.204*r+1.057*i,u=Math.pow,o=.0031308,c=s>o?1.055*u(s,1/2.4)-.055:12.92*s,a=e>o?1.055*u(e,1/2.4)-.055:12.92*e,l=h>o?1.055*u(h,1/2.4)-.055:12.92*h;return new t(255*c,255*a,255*l)}if("hsl"===this.space){let{h:n,s:r,l:i}=this;if(n/=360,r/=100,i/=100,0===r)return i*=255,new t(i,i,i);const s=i<.5?i*(1+r):i+r-i*r,e=2*i-s,h=255*On(e,s,n+1/3),u=255*On(e,s,n),o=255*On(e,s,n-1/3);return new t(h,u,o)}if("cmyk"===this.space){const{c:n,m:r,y:i,k:s}=this,e=255*(1-Math.min(1,n*(1-s)+s)),h=255*(1-Math.min(1,r*(1-s)+s)),u=255*(1-Math.min(1,i*(1-s)+s));return new t(e,h,u)}return this;var n}toArray(){const{_a:t,_b:n,_c:r,_d:i,space:s}=this;return[t,n,r,i,s]}toHex(){const[t,n,r]=this._clamped().map(_n);return`#${t}${n}${r}`}toRgb(){const[t,n,r]=this._clamped();return`rgb(${t},${n},${r})`}toString(){return this.toHex()}xyz(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,o=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,c=h>.04045?Math.pow((h+.055)/1.055,2.4):h/12.92,a=(.4124*u+.3576*o+.1805*c)/.95047,l=(.2126*u+.7152*o+.0722*c)/1,f=(.0193*u+.1192*o+.9505*c)/1.08883,p=a>.008856?Math.pow(a,1/3):7.787*a+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,w=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new t(p,d,w,"xyz")}_clamped(){const{_a:t,_b:n,_c:r}=this.rgb(),{max:i,min:s,round:e}=Math;return[t,n,r].map((t=>i(0,s(e(t),255))))}},An=class t{constructor(...t){this.init(...t)}clone(){return new t(this)}init(t,n){const r=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:n};return this.x=null==r.x?0:r.x,this.y=null==r.y?0:r.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){Tn.isMatrixLike(t)||(t=new Tn(t));const{x:n,y:r}=this;return this.x=t.a*n+t.c*r+t.e,this.y=t.b*n+t.d*r+t.f,this}};function Sn(t,n){return Math.abs(n-t)<1e-6}var Tn=class t{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,r=t.flip&&(n||"x"===t.flip)?-1:1,i=t.flip&&(n||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,e=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,h=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,u=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,o=t.shear||0,c=t.rotate||t.theta||0,a=new An(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=a.x,f=a.y,p=new An(t.position??t.px??t.positionX??NaN,t.py??t.positionY??NaN),d=p.x,w=p.y,y=new An(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=y.x,v=y.y,b=new An(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:h,scaleY:u,skewX:s,skewY:e,shear:o,theta:c,rx:b.x,ry:b.y,tx:m,ty:v,ox:l,oy:f,px:d,py:w}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,n,r){const i=t.b*n.a+t.d*n.b,s=t.a*n.c+t.c*n.d,e=t.b*n.c+t.d*n.d,h=t.e+t.a*n.e+t.c*n.f,u=t.f+t.b*n.e+t.d*n.f;return r.a=t.a*n.a+t.c*n.b,r.b=i,r.c=s,r.d=e,r.e=h,r.f=u,r}around(t,n,r){return this.clone().aroundO(t,n,r)}aroundO(t,n,r){const i=t||0,s=n||0;return this.translateO(-i,-s).lmultiplyO(r).translateO(i,s)}clone(){return new t(this)}decompose(t=0,n=0){const r=this.a,i=this.b,s=this.c,e=this.d,h=this.e,u=this.f,o=r*e-i*s,c=o>0?1:-1,a=c*Math.sqrt(r*r+i*i),l=Math.atan2(c*i,c*r),f=(r*s+i*e)/o;return{scaleX:a,scaleY:s*a/(f*r-i)||e*a/(f*i+r),shear:f,rotate:180/Math.PI*l,translateX:h-t+t*r+n*s,translateY:u-n+t*i+n*e,originX:t,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(n){if(n===this)return!0;const r=new t(n);return Sn(this.a,r.a)&&Sn(this.b,r.b)&&Sn(this.c,r.c)&&Sn(this.d,r.d)&&Sn(this.e,r.e)&&Sn(this.f,r.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(n){const r=t.fromArray([1,0,0,1,0,0]);return n=n instanceof nr?n.matrixify():"string"==typeof n?t.fromArray(n.split(gn).map(parseFloat)):Array.isArray(n)?t.fromArray(n):"object"==typeof n&&t.isMatrixLike(n)?n:"object"==typeof n?(new t).transform(n):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=n.a?n.a:r.a,this.b=null!=n.b?n.b:r.b,this.c=null!=n.c?n.c:r.c,this.d=null!=n.d?n.d:r.d,this.e=null!=n.e?n.e:r.e,this.f=null!=n.f?n.f:r.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,r=this.c,i=this.d,s=this.e,e=this.f,h=t*i-n*r;if(!h)throw new Error("Cannot invert "+this);const u=i/h,o=-n/h,c=-r/h,a=t/h,l=-(u*s+c*e),f=-(o*s+a*e);return this.a=u,this.b=o,this.c=c,this.d=a,this.e=l,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(n){const r=n instanceof t?n:new t(n);return t.matrixMultiply(r,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(n){const r=n instanceof t?n:new t(n);return t.matrixMultiply(this,r,this)}rotate(t,n,r){return this.clone().rotateO(t,n,r)}rotateO(t,n=0,r=0){t=$t(t);const i=Math.cos(t),s=Math.sin(t),{a:e,b:h,c:u,d:o,e:c,f:a}=this;return this.a=e*i-h*s,this.b=h*i+e*s,this.c=u*i-o*s,this.d=o*i+u*s,this.e=c*i-a*s+r*s-n*i+n,this.f=a*i+c*s-n*s-r*i+r,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,r=0,i=0){3===arguments.length&&(i=r,r=n,n=t);const{a:s,b:e,c:h,d:u,e:o,f:c}=this;return this.a=s*t,this.b=e*n,this.c=h*t,this.d=u*n,this.e=o*t-r*t+r,this.f=c*n-i*n+i,this}shear(t,n,r){return this.clone().shearO(t,n,r)}shearO(t,n=0,r=0){const{a:i,b:s,c:e,d:h,e:u,f:o}=this;return this.a=i+s*t,this.c=e+h*t,this.e=u+o*t-r*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,r=0,i=0){3===arguments.length&&(i=r,r=n,n=t),t=$t(t),n=$t(n);const s=Math.tan(t),e=Math.tan(n),{a:h,b:u,c:o,d:c,e:a,f:l}=this;return this.a=h+u*s,this.b=u+h*e,this.c=o+c*s,this.d=c+o*e,this.e=a+l*s-i*s,this.f=l+a*e-r*e,this}skewX(t,n,r){return this.skew(t,0,n,r)}skewY(t,n,r){return this.skew(0,t,n,r)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(n){if(t.isMatrixLike(n))return new t(n).multiplyO(this);const r=t.formatTransforms(n),{x:i,y:s}=new An(r.ox,r.oy).transform(this),e=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-i,-s).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(i,s);if(isFinite(r.px)||isFinite(r.py)){const t=new An(i,s).transform(e),n=isFinite(r.px)?r.px-t.x:0,h=isFinite(r.py)?r.py-t.y:0;e.translateO(n,h)}return e.translateO(r.tx,r.ty),e}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function En(){if(!En.nodes||En.nodes.svg.node.ownerDocument!==Qt.document){const t=Zt().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true"),En.nodes={svg:t,path:t.path().node}}return En.nodes.svg.node.parentNode||En.nodes.svg.addTo(Qt.document.body||Qt.document.documentElement),En.nodes}function Cn(t){return!(t.width||t.height||t.x||t.y)}rn(Tn,"Matrix");var zn=class t{constructor(...t){this.init(...t)}addOffset(){return this.x+=Qt.window.pageXOffset,this.y+=Qt.window.pageYOffset,new t(this)}init(t){return t="string"==typeof t?t.split(gn).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Cn(this)}merge(n){const r=Math.min(this.x,n.x),i=Math.min(this.y,n.y),s=Math.max(this.x+this.width,n.x+n.width)-r,e=Math.max(this.y+this.height,n.y+n.height)-i;return new t(r,i,s,e)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(n){n instanceof Tn||(n=new Tn(n));let r=1/0,i=-1/0,s=1/0,e=-1/0;return[new An(this.x,this.y),new An(this.x2,this.y),new An(this.x,this.y2),new An(this.x2,this.y2)].forEach((function(t){t=t.transform(n),r=Math.min(r,t.x),i=Math.max(i,t.x),s=Math.min(s,t.y),e=Math.max(e,t.y)})),new t(r,s,i-r,e-s)}};function Fn(t,n,r){let i;try{if(i=n(t.node),Cn(i)&&(s=t.node)!==Qt.document&&!(Qt.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Qt.document}).call(Qt.document.documentElement,s))throw new Error("Element not in the dom")}catch(n){i=r(t)}var s;return i}v({viewbox:{viewbox(t,n,r,i){return null==t?new zn(this.attr("viewBox")):this.attr("viewBox",new zn(t,n,r,i))},zoom(t,n){let{width:r,height:i}=this.attr(["width","height"]);if((r||i)&&"string"!=typeof r&&"string"!=typeof i||(r=this.node.clientWidth,i=this.node.clientHeight),!r||!i)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),e=r/s.width,h=i/s.height,u=Math.min(e,h);if(null==t)return u;let o=u/t;o===1/0&&(o=Number.MAX_SAFE_INTEGER/100),n=n||new An(r/2/e+s.x,i/2/h+s.y);const c=new zn(s).transform(new Tn({scale:o,origin:n}));return this.viewbox(c)}}}),rn(zn,"Box");var Nn=class extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}};un([Nn],{each(t,...n){return this.map("function"==typeof t?(n,r,i)=>t.call(n,n,r,i):r=>r[t](...n))},toArray(){return Array.prototype.concat.apply([],this)}});const Dn=["toArray","constructor","each"];function Pn(t){let n=(t+"").trim();const r=n.match(/^url\((.*)\)$/i);if(r){n=r[1].trim();const t=n[0];if('"'===t||"'"===t){if(n[n.length-1]!==t)return null;n=n.slice(1,-1)}}const i=n.match(fn);return i?i[1].slice(1):null}function $n(t,n){const r=`#${Qt.window.CSS.escape(n)}`;return 1===t.nodeType&&t.matches(r)?t:t.querySelector(r)}function Rn(t,n,r=`[${n}]`){const i=t.getAttribute("id"),s=t.getRootNode();if(!i||$n(s,i)!==t)return new Nn;const e=[];1===s.nodeType&&s.matches(r)&&Pn(s.getAttribute(n))===i&&e.push(tn(s));for(const t of s.querySelectorAll(r))Pn(t.getAttribute(n))===i&&e.push(tn(t));return new Nn(e)}Nn.extend=function(t){t=t.reduce(((t,n)=>((0,Dt.default)(Dn).call(Dn,n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),un([Nn],t)};let Ln=0;const In=new WeakMap,Gn=new WeakMap,Yn=()=>Object.create(null);function Xn(t){const n=t.getEventHolder();let r=In.get(n);return r||(r=Yn(),In.set(n,r)),r}function Hn(t){return t.getEventTarget()}function Bn(t,n,r,i,s){const e=r.bind(i||t),h=s||!1,u=Zt(t),o=Xn(u),c=Hn(u);n=Array.isArray(n)?n:n.split(gn);let a=Gn.get(r);a||(a=++Ln,Gn.set(r,a)),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";o[n]=o[n]||Yn(),o[n][r]=o[n][r]||Yn(),o[n][r][a]=o[n][r][a]||[],o[n][r][a].push({listener:e,options:h}),c.addEventListener(n,e,h)}))}function Vn(t,n,r,i){const s=Zt(t),e=Xn(s),h=Hn(s);("function"!=typeof r||(r=Gn.get(r)))&&(n=Array.isArray(n)?n:(n||"").split(gn)).forEach((function(t){const n=t&&t.split(".")[0],u=t&&t.split(".")[1];let o,c;if(r){if(e[n]&&e[n][u||"*"]){const t=e[n][u||"*"][r];if(!t)return;t.forEach((function(t){h.removeEventListener(n,t.listener,t.options??i??!1)})),delete e[n][u||"*"][r]}}else if(n&&u){if(e[n]&&e[n][u]){for(c in e[n][u])Vn(h,[n,u].join("."),c);delete e[n][u]}}else if(u)for(t in e)for(o in e[t])u===o&&Vn(h,[t,u].join("."));else if(n){if(e[n]){for(o in e[n])Vn(h,[n,o].join("."));delete e[n]}}else{for(t in e)Vn(h,t);!function(t){In.delete(t.getEventHolder())}(s)}}))}var Qn=class extends Jt{addEventListener(){}dispatch(t,n,r){return function(t,n,r,i){const s=Hn(t);return n instanceof Qt.window.Event||(n=new Qt.window.CustomEvent(n,{detail:r,cancelable:!0,...i})),s.dispatchEvent(n),n}(this,t,n,r)}dispatchEvent(t){const n=Xn(this)[t.type];if(!n)return!0;for(const r in n)for(const i in n[r])n[r][i].forEach((function(n){n.listener(t)}));return!t.defaultPrevented}fire(t,n,r){return this.dispatch(t,n,r),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,r){return Vn(this,t,n,r),this}on(t,n,r,i){return Bn(this,t,n,r,i),this}removeEventListener(){}};function Jn(){}rn(Qn,"EventTarget");const Un={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};var qn=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(gn).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}},Wn=class t{constructor(...t){this.init(...t)}convert(n){return new t(this.value,n)}divide(n){return n=new t(n),new t(this/n,this.unit||n.unit)}init(n,r){return r=Array.isArray(n)?n[1]:r,n=Array.isArray(n)?n[0]:n,this.value=0,this.unit=r||"","number"==typeof n?this.value=isNaN(n)?0:isFinite(n)?n:n<0?-34e37:34e37:"string"==typeof n?(r=n.match(cn))&&(this.value=parseFloat(r[1]),"%"===r[5]?this.value/=100:"s"===r[5]&&(this.value*=1e3),this.unit=r[5]):n instanceof t&&(this.value=n.valueOf(),this.unit=n.unit),this}minus(n){return n=new t(n),new t(this-n,this.unit||n.unit)}plus(n){return n=new t(n),new t(this+n,this.unit||n.unit)}times(n){return n=new t(n),new t(this*n,this.unit||n.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};const Zn=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Kn=[];var tr=class t extends Qn{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=Zt(t)).removeNamespace&&this.node instanceof Qt.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return Zt(t).put(this,n)}children(){return new Nn(Pt(this.node.children,(function(t){return tn(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let r=this.node.cloneNode(t);return n&&(r=hn(r)),new this.constructor(r)}each(t,n){const r=this.children();let i,s;for(i=0,s=r.length;i<s;i++)t.apply(r[i],[i,r]),n&&r[i].each(t,n);return this}element(n,r){return this.put(new t(Wt(n),r))}first(){return tn(this.node.firstChild)}get(t){return tn(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=en(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return tn(this.node.lastChild)}matches(t){const n=this.node,r=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return r&&r.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=tn(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=tn(n.node.parentNode));return n}put(t,n){return t=Zt(t),this.add(t,n),t}putIn(t,n){return Zt(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Zt(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const r=10**t,i=this.attr(n);for(const t in i)"number"==typeof i[t]&&(i[t]=Math.round(i[t]*r)/r);return this.attr(i),this}svg(t,n){return this.xml(t,n,Ht)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const r=n.index(this);return n.put(t,r).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,r){if("boolean"==typeof t&&(r=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let r=this;if(null!=t){if(r=tn(r.node.cloneNode(!0)),n){const n=t(r);if(r=n||r,!1===n)return""}r.each((function(){const n=t(this),r=n||this;!1===n?this.remove():n&&this!==r&&this.replace(r)}),!0)}return n?r.node.outerHTML:r.node.innerHTML}n=null!=n&&n;const i=Wt("wrapper",r),s=Qt.document.createDocumentFragment();i.innerHTML=t;for(let t=i.children.length;t--;)s.appendChild(i.firstElementChild);const e=this.parent();return n?this.replace(s)&&e:this.add(s)}};un(tr,{attr:function(t,n,r){if(null==t){t={},n=this.node.attributes;for(const r of n)t[r.nodeName]=vn.test(r.nodeValue)?parseFloat(r.nodeValue):r.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?Un[t]:vn.test(n)?parseFloat(n):n;"number"==typeof(n=Kn.reduce(((n,r)=>r(t,n,this)),n))?n=new Wn(n):Zn.has(t)&&kn.isColor(n)?n=new kn(n):n.constructor===Array&&(n=new qn(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof r?this.node.setAttributeNS(r,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return function(t,n){return new Nn(Pt((n||Qt.document).querySelectorAll(t),(function(t){return tn(t)})))}(t,this.node)},findOne:function(t){return tn(this.node.querySelector(t))}}),rn(tr,"Dom");var nr=class extends tr{constructor(t,n){super(t,n),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,n){return this.cx(t).cy(n)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new Wn(t).plus(this.x()))}dy(t=0){return this.y(new Wn(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t,r=this.root(),i=r&&r.node;n||(t=t&&Zt(t).node);const s=new Nn;let e=this;for(;(e=e.parent())&&e.node!==Qt.document&&"#document-fragment"!==e.node.nodeName&&(s.push(e),n||e.node!==t)&&(!n||!e.matches(t));)if(i&&e.node===i)return null;return s}reference(t){if(!(t=this.attr(t)))return null;const n=function(t,n){const r=Pn(n);return r?$n(t.getRootNode(),r):null}(this.node,t);return n?Zt(n):null}root(){const t=this.parent(Ut[qt]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const r=It(this,t,n);return this.width(new Wn(r.width)).height(new Wn(r.height))}width(t){return this.attr("width",t)}writeDataToDom(t){return((t,n,r={})=>{const i={...this.dom};for(const t in i)i[t].valueOf()===r[t]&&delete i[t];Object.keys(i).length?t.node.setAttribute("data-svgjs",JSON.stringify(i)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))})(this,0,t),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};un(nr,{bbox:function(){const t=Fn(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(En().svg).show(),r=n.node.getBBox();return n.remove(),r}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new zn(t)},rbox:function(t){const n=Fn(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),r=new zn(n);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,n){const r=this.bbox();return t>r.x&&n>r.y&&t<r.x+r.width&&n<r.y+r.height},point:function(t,n){return new An(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new Tn(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new Tn(n)}return new Tn(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Tn}}}),rn(nr,"Element");const rr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let r;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof kn||kn.isRgb(n)||n instanceof nr)this.attr(t,n);else for(r=rr[t].length-1;r>=0;r--)null!=n[rr[t][r]]&&this.attr(rr.prefix(t,rr[t][r]),n[rr[t][r]]);return this},v(["Element","Runner"],n)})),v(["Element","Runner"],{matrix:function(t,n,r,i,s,e){return null==t?new Tn(this):this.attr("transform",new Tn(t,n,r,i,s,e))},rotate:function(t,n,r){return this.transform({rotate:t,ox:n,oy:r},!0)},skew:function(t,n,r,i){return this.transform(1===arguments.length||3===arguments.length?{skew:t,ox:n,oy:r}:{skew:[t,n],ox:r,oy:i},!0)},shear:function(t,n,r){return this.transform({shear:t,ox:n,oy:r},!0)},scale:function(t,n,r,i){return this.transform(1===arguments.length||3===arguments.length?{scale:t,ox:n,oy:r}:{scale:[t,n],ox:r,oy:i},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),v("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Wn(t)):this.rx(t).ry(n)}}),v("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new An(this.node.getPointAtLength(t))}}),v(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):this.attr("anchor"===t?"text-anchor":"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?"font-"+t:t,n)}}),v("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),v("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(pn).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0].trim(),n[1].split(gn).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(Tn.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new Tn)},toParent:function(t,n){if(this===t)return this;if(Xt(this.node))return this.addTo(t,n);const r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new Tn(this).decompose();return null==t?n:n[t]}Tn.isMatrixLike(t)||(t={...t,origin:Gt(t,this)});const r=new Tn(!0===n?this:n||!1).transform(t);return this.attr("transform",r)}});var ir=class t extends nr{flatten(){return this.each((function(){if(this instanceof t)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(r,i){return i[i.length-r-1].toParent(t,n)})),this.remove()}};rn(ir,"Container");var sr=class extends ir{constructor(t,n=t){super(Kt("defs",t),n)}flatten(){return this}ungroup(){return this}};rn(sr,"Defs");var er=class extends nr{};rn(er,"Shape");var hr=d({cx:()=>lr,cy:()=>fr,height:()=>dr,rx:()=>ur,ry:()=>or,width:()=>pr,x:()=>cr,y:()=>ar});function ur(t){return this.attr("rx",t)}function or(t){return this.attr("ry",t)}function cr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ar(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function lr(t){return this.attr("cx",t)}function fr(t){return this.attr("cy",t)}function pr(t){return null==t?2*this.rx():this.rx(new Wn(t).divide(2))}function dr(t){return null==t?2*this.ry():this.ry(new Wn(t).divide(2))}var wr=class extends er{constructor(t,n=t){super(Kt("ellipse",t),n)}size(t,n){const r=It(this,t,n);return this.rx(new Wn(r.width).divide(2)).ry(new Wn(r.height).divide(2))}};un(wr,hr),v("Container",{ellipse:on((function(t=0,n=t){return this.put(new wr).size(t,n).move(0,0)}))}),rn(wr,"Ellipse");var yr=class extends tr{constructor(t=Qt.document.createDocumentFragment()){super(t)}xml(t,n,r){if("boolean"==typeof t&&(r=n,n=t,t=null),null==t||"function"==typeof t){const t=new tr(Wt("wrapper",r));return t.add(this.node.cloneNode(!0)),t.xml(!1,r)}return super.xml(t,!1,r)}};rn(yr,"Fragment");var mr=d({from:()=>vr,to:()=>br});function vr(t,n){return this.attr("radialGradient"===(this._element||this).type?{fx:new Wn(t),fy:new Wn(n)}:{x1:new Wn(t),y1:new Wn(n)})}function br(t,n){return this.attr("radialGradient"===(this._element||this).type?{cx:new Wn(t),cy:new Wn(n)}:{x2:new Wn(t),y2:new Wn(n)})}var gr=class extends ir{constructor(t,n){super(Kt(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,r){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,r)}bbox(){return new zn}targets(){return Rn(this.node,"fill")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};un(gr,mr),v({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:on((function(t,n){return this.put(new gr(t)).update(n)}))}}),rn(gr,"Gradient");var xr=class extends ir{constructor(t,n=t){super(Kt("pattern",t),n)}attr(t,n,r){return"transform"===t&&(t="patternTransform"),super.attr(t,n,r)}bbox(){return new zn}targets(){return Rn(this.node,"fill")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};v({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:on((function(t,n,r){return this.put(new xr).update(r).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),rn(xr,"Pattern");var Mr=class extends er{constructor(t,n=t){super(Kt("image",t),n)}load(t,n){if(!t)return this;const r=new Qt.window.Image;return Bn(r,"load",(function(t){const i=this.parent(xr);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof xr&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),Bn(r,"load error",(function(){Vn(r)})),this.attr("href",r.src=t,Vt)}};Kn.push((function(t,n,r){return"fill"!==t&&"stroke"!==t||bn.test(n)&&(n=r.root().defs().image(n)),n instanceof Mr&&(n=r.root().defs().pattern(0,0,(t=>{t.add(n)}))),n})),v({Container:{image:on((function(t,n){return this.put(new Mr).size(0,0).load(t,n)}))}}),rn(Mr,"Image");var _r=class extends qn{bbox(){let t=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach((function(s){t=Math.max(s[0],t),n=Math.max(s[1],n),r=Math.min(s[0],r),i=Math.min(s[1],i)})),new zn(r,i,t-r,n-i)}move(t,n){const r=this.bbox();if(t-=r.x,n-=r.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(gn).map(parseFloat)).length%2!=0&&t.pop();for(let r=0,i=t.length;r<i;r+=2)n.push([t[r],t[r+1]]);return n}size(t,n){let r;const i=this.bbox();for(r=this.length-1;r>=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*n/i.height+i.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let n=0,r=this.length;n<r;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){Tn.isMatrixLike(t)||(t=new Tn(t));for(let n=this.length;n--;){const[r,i]=this[n];this[n][0]=t.a*r+t.c*i+t.e,this[n][1]=t.b*r+t.d*i+t.f}return this}},jr=d({MorphArray:()=>Or,height:()=>Tr,width:()=>Sr,x:()=>kr,y:()=>Ar});const Or=_r;function kr(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Ar(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Sr(t){const n=this.bbox();return null==t?n.width:this.size(t,n.height)}function Tr(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)}var Er=class extends er{constructor(t,n=t){super(Kt("line",t),n)}array(){return new _r([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,r,i){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:r,y2:i}:new _r(t).toLine(),this.attr(t))}size(t,n){const r=It(this,t,n);return this.attr(this.array().size(r.width,r.height).toLine())}};un(Er,jr),v({Container:{line:on((function(...t){return Er.prototype.plot.apply(this.put(new Er),null!=t[0]?t:[0,0,0,0])}))}}),rn(Er,"Line");var Cr=class extends ir{constructor(t,n=t){super(Kt("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function zr(t,n){return function(r){return null==r?this[t]:(this[t]=r,n&&n.call(this),this)}}v({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:on((function(t,n,r){return this.put(new Cr).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(r)}))},marker:{marker(t,n,r,i){let s=["marker"];return"all"!==t&&s.push(t),s=s.join("-"),t=arguments[1]instanceof Cr?arguments[1]:this.defs().marker(n,r,i),this.attr(s,t)}}}),rn(Cr,"Marker");const Fr={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,n,r,i){return function(s){return s<0?t>0?n/t*s:r>0?i/r*s:0:s>1?r<1?(1-i)/(1-r)*s+(i-r)/(1-r):t<1?(1-n)/(1-t)*s+(n-t)/(1-t):1:3*s*(1-s)**2*n+3*s**2*(1-s)*i+s**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let r=t;return"none"===n?--r:"both"===n&&++r,(i,s=!1)=>{let e=Math.floor(i*t);const h=i*e%1==0;return"start"!==n&&"both"!==n||++e,s&&h&&--e,i>=0&&e<0&&(e=0),i<=1&&e>r&&(e=r),e/r}}};var Nr=class{done(){return!1}},Dr=class extends Nr{constructor(t=">"){super(),this.ease=Fr[t]||t}step(t,n,r){return"number"!=typeof t?r<1?t:n:t+(n-t)*this.ease(r)}},Pr=class extends Nr{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,r,i){return this.stepper(t,n,r,i)}};function $r(){const t=(this._duration||500)/1e3,n=Math.PI,r=Math.log((this._overshoot||0)/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}un(class extends Pr{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return n;if(0===r)return t;r>100&&(r=16);const s=i.velocity||0,e=-this.d*s-this.k*(t-n),h=t+s*(r/=1e3)+e*r*r/2;return i.velocity=s+e*r,i.done=Math.abs(n-h)+Math.abs(s)<.002,i.done?n:h}},{duration:zr("_duration",$r),overshoot:zr("_overshoot",$r)}),un(class extends Pr{constructor(t=.1,n=.01,r=0,i=1e3){super(),this.p(t).i(n).d(r).windup(i)}step(t,n,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return n;if(0===r)return t;const s=n-t;let e=(i.integral||0)+s*r;const h=(s-(i.error||0))/r,u=this._windup;return!1!==u&&(e=Math.max(-u,Math.min(e,u))),i.error=s,i.integral=e,i.done=Math.abs(s)<.001,i.done?n:t+(this.P*s+this.I*e+this.D*h)}},{windup:zr("_windup"),p:zr("P"),i:zr("I"),d:zr("D")});const Rr={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Lr={M:function(t,n,r){return n.x=r.x=t[0],n.y=r.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,r){return n.x=r.x,n.y=r.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ir="mlhvqtcsaz".split("");for(let t=0,n=Ir.length;t<n;++t)Lr[Ir[t]]=function(t){return function(n,r,i){if("H"===t)n[0]=n[0]+r.x;else if("V"===t)n[0]=n[0]+r.y;else if("A"===t)n[5]=n[5]+r.x,n[6]=n[6]+r.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?r.y:r.x);return Lr[t](n,r,i)}}(Ir[t].toUpperCase());function Gr(t){return t.segment.length&&t.segment.length-1===Rr[t.segment[0].toUpperCase()]}function Yr(t,n){t.inNumber&&Xr(t,!1);const r=xn.test(n);if(r)t.segment=[n];else{const n=t.lastCommand,r=n.toLowerCase();t.segment=["m"===r?n===r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],r}function Xr(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,Gr(t)&&Hr(t)}function Hr(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){return Lr[t.segment[0]](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Br(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),r=t.segment.length;return n&&(4===r||5===r)}function Vr(t){return"E"===t.lastToken.toUpperCase()}const Qr=new Set([" ",",","\t","\n","\r","\f"]);var Jr=class extends qn{bbox(){return En().path.setAttribute("d",this.toString()),new zn(En.nodes.path.getBBox())}move(t,n){const r=this.bbox();if(t-=r.x,n-=r.y,!isNaN(t)&&!isNaN(n))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let r=0,i="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new An,p:new An};for(;s.lastToken=i,i=t.charAt(r++);)if(s.inSegment||!Yr(s,i))if("."!==i)if(isNaN(parseInt(i)))if(Qr.has(i))s.inNumber&&Xr(s,!1);else if("-"!==i&&"+"!==i)if("E"!==i.toUpperCase()){if(xn.test(i)){if(s.inNumber)Xr(s,!1);else{if(!Gr(s))throw new Error("parser Error");Hr(s)}--r}}else s.number+=i,s.hasExponent=!0;else{if(s.inNumber&&!Vr(s)){Xr(s,!1),--r;continue}s.number+=i,s.inNumber=!0}else{if("0"===s.number||Br(s)){s.inNumber=!0,s.number=i,Xr(s,!0);continue}s.inNumber=!0,s.number+=i}else{if(s.pointSeen||s.hasExponent){Xr(s,!1),--r;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=i}return s.inNumber&&Xr(s,!1),s.inSegment&&Gr(s)&&Hr(s),s.segments}(t)}size(t,n){const r=this.bbox();let i,s;for(r.width=0===r.width?1:r.width,r.height=0===r.height?1:r.height,i=this.length-1;i>=0;i--)s=this[i][0],"M"===s||"L"===s||"T"===s?(this[i][1]=(this[i][1]-r.x)*t/r.width+r.x,this[i][2]=(this[i][2]-r.y)*n/r.height+r.y):"H"===s?this[i][1]=(this[i][1]-r.x)*t/r.width+r.x:"V"===s?this[i][1]=(this[i][1]-r.y)*n/r.height+r.y:"C"===s||"S"===s||"Q"===s?(this[i][1]=(this[i][1]-r.x)*t/r.width+r.x,this[i][2]=(this[i][2]-r.y)*n/r.height+r.y,this[i][3]=(this[i][3]-r.x)*t/r.width+r.x,this[i][4]=(this[i][4]-r.y)*n/r.height+r.y,"C"===s&&(this[i][5]=(this[i][5]-r.x)*t/r.width+r.x,this[i][6]=(this[i][6]-r.y)*n/r.height+r.y)):"A"===s&&(this[i][1]=this[i][1]*t/r.width,this[i][2]=this[i][2]*n/r.height,this[i][6]=(this[i][6]-r.x)*t/r.width+r.x,this[i][7]=(this[i][7]-r.y)*n/r.height+r.y);return this}toString(){return function(t){let n="";for(let r=0,i=t.length;r<i;r++)n+=t[r][0],null!=t[r][1]&&(n+=t[r][1],null!=t[r][2]&&(n+=" ",n+=t[r][2],null!=t[r][3]&&(n+=" ",n+=t[r][3],n+=" ",n+=t[r][4],null!=t[r][5]&&(n+=" ",n+=t[r][5],n+=" ",n+=t[r][6],null!=t[r][7]&&(n+=" ",n+=t[r][7])))));return n+" "}(this)}};const Ur=t=>{const n=typeof t;return"number"===n?Wn:"string"===n?kn.isColor(t)?kn:gn.test(t)?xn.test(t)?Jr:qn:cn.test(t)?Wn:Wr:ni.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?qn:"object"===n?ti:Wr};var qr=class{constructor(t){this._stepper=t||new Dr("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,n){return t&&n}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ur(t));let n=new this._type(t);return this._type===kn&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===ti&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}},Wr=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},Zr=class t{constructor(...t){this.init(...t)}init(n){return Array.isArray(n)&&(n={scaleX:n[0],scaleY:n[1],shear:n[2],rotate:n[3],translateX:n[4],translateY:n[5],originX:n[6],originY:n[7]}),Object.assign(this,t.defaults,n),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}};Zr.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Kr=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;var ti=class{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let r=0,i=n.length;r<i;++r){if(n[r+1]===t[r+1]){if(n[r+1]===kn&&t[r+7]!==n[r+7]){const n=t[r+7],i=new kn(this.values.splice(r+3,5))[n]().toArray();this.values.splice(r+3,0,...i)}r+=n[r+2]+2;continue}if(!t[r+1])return this;const i=(new t[r+1]).toArray();n.splice(r,n[r+2]+3,t[r],t[r+1],t[r+2],...i),r+=n[r+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const r in t){const i=Ur(t[r]),s=new i(t[r]).toArray();n.push([r,i,s.length,...s])}return n.sort(Kr),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const r=n.shift(),i=n.shift(),s=n.shift();t[r]=new i(n.splice(0,s))}return t}};const ni=[Wr,Zr,ti];var ri=class extends er{constructor(t,n=t){super(Kt("path",t),n)}array(){return this._array||(this._array=new Jr(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Jr(t))}size(t,n){const r=It(this,t,n);return this.attr("d",this.array().size(r.width,r.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}};ri.prototype.MorphArray=Jr,v({Container:{path:on((function(t){return this.put(new ri).plot(t||new Jr)}))}}),rn(ri,"Path");var ii=d({array:()=>si,clear:()=>ei,move:()=>hi,plot:()=>ui,size:()=>oi});function si(){return this._array||(this._array=new _r(this.attr("points")))}function ei(){return delete this._array,this}function hi(t,n){return this.attr("points",this.array().move(t,n))}function ui(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new _r(t))}function oi(t,n){const r=It(this,t,n);return this.attr("points",this.array().size(r.width,r.height))}var ci=class extends er{constructor(t,n=t){super(Kt("polygon",t),n)}};v({Container:{polygon:on((function(t){return this.put(new ci).plot(t||new _r)}))}}),un(ci,jr),un(ci,ii),rn(ci,"Polygon");var ai=class extends er{constructor(t,n=t){super(Kt("polyline",t),n)}};v({Container:{polyline:on((function(t){return this.put(new ai).plot(t||new _r)}))}}),un(ai,jr),un(ai,ii),rn(ai,"Polyline");var li=class extends er{constructor(t,n=t){super(Kt("rect",t),n)}};un(li,{rx:ur,ry:or}),v({Container:{rect:on((function(t,n){return this.put(new li).size(t,n)}))}}),rn(li,"Rect");var fi=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};const pi={nextDraw:null,frames:new fi,timeouts:new fi,immediates:new fi,timer:()=>Qt.window.performance||Qt.window.Date,transforms:[],frame(t){const n=pi.frames.push({run:t});return null===pi.nextDraw&&(pi.nextDraw=Qt.window.requestAnimationFrame(pi._draw)),n},timeout(t,n){n=n||0;const r=pi.timer().now()+n,i=pi.timeouts.push({run:t,time:r});return null===pi.nextDraw&&(pi.nextDraw=Qt.window.requestAnimationFrame(pi._draw)),i},immediate(t){const n=pi.immediates.push(t);return null===pi.nextDraw&&(pi.nextDraw=Qt.window.requestAnimationFrame(pi._draw)),n},cancelFrame(t){null!=t&&pi.frames.remove(t)},clearTimeout(t){null!=t&&pi.timeouts.remove(t)},cancelImmediate(t){null!=t&&pi.immediates.remove(t)},_draw(t){try{let n=null;const r=pi.timeouts.last();for(;(n=pi.timeouts.shift())&&(t>=n.time?n.run():pi.timeouts.push(n),n!==r););let i=null;const s=pi.frames.last();for(;i!==s&&(i=pi.frames.shift());)i.run(t);let e=null;for(;e=pi.immediates.shift();)e()}finally{const t=pi.timeouts.first()||pi.frames.first()||pi.immediates.first();pi.nextDraw=t?Qt.window.requestAnimationFrame(pi._draw):null}}},di=function(t){const n=t.start,r=t.runner.duration();return{start:n,duration:r,end:n+r,runner:t.runner}},wi=function(){const t=Qt.window;return(t.performance||t.Date).now()};var yi=class extends Qn{constructor(t=wi){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const n=this.speed();if(null==t)return this.speed(-n);const r=Math.abs(n);return this.speed(t?-r:r)}schedule(t,n,r){if(null==t)return this._runners.map(di);let i=0;const s=this.getEndTime();if(n=n||0,null==r||"last"===r||"after"===r)i=s;else if("absolute"===r||"start"===r)i=n,n=0;else if("now"===r)i=this._time;else if("relative"===r){const r=this.getRunnerInfoById(t.id);r&&(i=r.start+n,n=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();i=t?t.start:this._time}}t.unschedule(),t.timeline(this);const e=t.persist(),h={persist:null===e?this._persist:e,start:i+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(h),this._runners.sort(((t,n)=>t.start-n.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return pi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=pi.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let r=n-this._lastSourceTime;t&&(r=0);const i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const n=this._runners[t];this._time-n.start<=0&&n.runner.reset()}let s=!1;for(let t=0,n=this._runners.length;t<n;t++){const r=this._runners[t],e=r.runner;let h=i;const u=this._time-r.start;u<=0?s=!0:(u<h&&(h=u),e.active()&&(e.step(h).done?!0!==r.persist&&e.duration()-e.time()+this._time+r.persist<this._time&&(e.unschedule(),--t,--n):s=!0))}return s&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};v({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new yi,this._timeline):(this._timeline=t,this)}}});var mi=class t extends Qn{constructor(n){super(),this.id=t.id++,n="function"==typeof(n=null==n?400:n)?new Pr(n):n,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof n&&n,this._isDeclarative=n instanceof Pr,this._stepper=this._isDeclarative?n:new Dr,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Tn,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,n,r){let i=1,s=!1,e=0;return n=n??0,r=r||"last","object"!=typeof(t=t??400)||t instanceof Nr||(n=t.delay??n,r=t.when??r,s=t.swing||s,i=t.times??i,e=t.wait??e,t=t.duration??400),{duration:t,delay:n,swing:s,times:i,wait:e,when:r}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(n,r,i){const s=t.sanitise(n,r,i),e=new t(s.duration);return this._timeline&&e.timeline(this._timeline),this._element&&e.element(this._element),e.loop(s).schedule(s.delay,s.when)}clearTransform(){return this.transforms=new Tn,this}clearTransformsFromQueue(){var t;this.done&&this._timeline&&(0,Dt.default)(t=this._timeline._runnerIds).call(t,this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Dr(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,r){return"object"==typeof t&&(n=t.swing,r=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=r||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n);return Math.min(t+(this._time-t*n)/this._duration,this._times)}const r=Math.floor(t);return this.time(n*r+this._duration*(t%1))}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,r=this._duration,i=this._wait,s=this._swing,e=this._reverse;let h;if(null==t){const t=function(t){const n=s*Math.floor(t%(2*(i+r))/(i+r)),h=n&&!e||!n&&e,u=Math.pow(-1,h)*(t%(i+r))/r+h;return Math.max(Math.min(u,1),0)},u=this._times*(i+r)-i;return h=n<=0?Math.round(t(1e-5)):n<u?t(n):Math.round(t(u-1e-5)),h}const u=Math.floor(this.loops()),o=s&&u%2==0;return h=u+(o&&!e||e&&o?t:1-t),this.loops(h)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,r,i){return this._queue.push({initialiser:t||Jn,runner:n||Jn,retarget:r,isTransform:i,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,n,r){if(t instanceof yi||(r=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,r),this}step(t){if(!this.enabled)return this;this._time+=t=null==t?16:t;const n=this.position(),r=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const i=this.duration(),s=this._lastTime<=0&&this._time>0,e=this._lastTime<i&&this._time>=i;this._lastTime=this._time,s&&this.fire("start",this);const h=this._isDeclarative;this.done=!h&&!e&&this._time>=i,this._reseted=!1;let u=!1;return(r||h)&&(this._initialise(r),this.transforms=new Tn,u=this._run(h?t:n),this.fire("step",this)),this.done=this.done||u&&h,e&&this.fire("finished",this),this}time(t){return null==t?this._time:(this.step(t-this._time),this)}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let r=0,i=this._queue.length;r<i;++r){const i=this._queue[r],s=i.runner.call(this,t);i.finished=i.finished||!0===s,n=n&&i.finished}return n}_tryRetarget(t,n,r){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,r):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const i=this.timeline();return i&&i.play(),!0}return!1}};mi.id=0;var vi=class{constructor(t=new Tn,n=-1,r=!0){this.transforms=t,this.id=n,this.done=r}clearTransformsFromQueue(){}};un([mi,vi],{mergeWith(t){return new vi(t.transforms.lmultiply(this.transforms),t.id)}});const bi=(t,n)=>t.lmultiplyO(n),gi=t=>t.transforms;function xi(){const t=this._transformationRunners.runners.map(gi).reduce(bi,new Tn);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Mi=class{constructor(){this.runners=[],this.ids=[]}add(t){var n;if((0,Dt.default)(n=this.runners).call(n,t))return;const r=t.id+1;return this.runners.push(t),this.ids.push(r),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new vi).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let i=0;i<this.runners.length;++i){var n,r;const s=this.runners[i];if(!(t&&s.done&&t.done)||s._timeline&&(0,Dt.default)(n=s._timeline._runnerIds).call(n,s.id)||t._timeline&&(0,Dt.default)(r=t._timeline._runnerIds).call(r,t.id))t=s;else{this.remove(s.id);const n=s.mergeWith(t);this.edit(t.id,n),t=n,--i}}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}};v({Element:{animate(t,n,r){const i=mi.sanitise(t,n,r),s=this.timeline();return new mi(i.duration).loop(i).element(this).timeline(s.play()).schedule(i.delay,i.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(gi).reduce(bi,new Tn)},_addRunner(t){this._transformationRunners.add(t),pi.cancelImmediate(this._frameId),this._frameId=pi.immediate(xi.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Mi).add(new vi(new Tn(this))))}}}),un(mi,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,r){if("string"==typeof n)return this.styleAttr(t,{[n]:r});const i=n,s=this._history[t];if(s&&!s.caller.initialised&&s.caller.retarget)return s.caller.retarget.call(this,i),this;if(this._tryRetarget(t,i))return this;let e=new qr(this._stepper).to(i),h=Object.keys(i);return this.queue((function(){e=e.from(this.element()[t](h))}),(function(n){return this.element()[t](e.at(n).valueOf()),e.done()}),(function(n){const r=(i=Object.keys(n),s=h,i.filter((t=>!(0,Dt.default)(s).call(s,t))));var i,s;if(r.length&&null!=e.from()){const n=this.element()[t](r),i=new ti(e.from()).valueOf();Object.assign(i,n),e.from(i)}const u=new ti(e.to()).valueOf();Object.assign(u,n),e.to(u),h=Object.keys(u)})),this._rememberMorpher(t,e),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let r=new qr(this._stepper).to(new Wn(t));return this.queue((function(){r=r.from(this.element().zoom())}),(function(t){return this.element().zoom(r.at(t),n),r.done()}),(function(t,i){n=i,r.to(t)})),this._rememberMorpher("zoom",r),this},transform(t,n,r){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const i=Tn.isMatrixLike(t);r=null!=t.affine?t.affine:null!=r?r:!i;const s=new qr(this._stepper).type(r?Zr:Tn);let e,h,u,o,c;return this.queue((function(){h=h||this.element(),e=e||Gt(t,h),c=new Tn(n?void 0:h),h._addRunner(this),n||h._clearTransformRunnersBefore(this)}),(function(a){n||this.clearTransform();const{x:l,y:f}=new An(e).transform(h._currentTransform(this)),p={...t,origin:[l,f]};!0===p.relative&&delete p.relative;let d=new Tn(p),w=this._isDeclarative&&u?u:c;if(r){d=d.decompose(l,f),w=w.decompose(l,f);const t=d.rotate,n=w.rotate,r=[t-360,t,t+360],i=r.map((t=>Math.abs(t-n))),s=Math.min(...i),e=i.indexOf(s);d.rotate=r[e]}n&&(i||(d.rotate=t.rotate||0),this._isDeclarative&&o&&(w.rotate=o)),s.from(w),s.to(d);const y=s.at(a);return o=y.rotate,u=new Tn(y),this.addTransform(u),h._addRunner(this),s.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(e=Gt(n,h)),t={...n,origin:e}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new Wn(n),this._tryRetarget(t,n))return this;const r=new qr(this._stepper).to(n);let i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+n)}),(function(n){return this.element()[t](r.at(n)),r.done()}),(function(t){r.to(i+new Wn(t))})),this._rememberMorpher(t,r),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const r=new qr(this._stepper).to(n);return this.queue((function(){r.from(this.element()[t]())}),(function(n){return this.element()[t](r.at(n)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber(t,n){return this._queueObject(t,new Wn(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){const r=It(this._element,t,n);return this.width(r.width).height(r.height)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,r,i){if(4===arguments.length)return this.plot([t,n,r,i]);if(this._tryRetarget("plot",t))return this;const s=new qr(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,n,r,i){return this._queueObject("viewbox",new zn(t,n,r,i))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),un(mi,{rx:ur,ry:or,from:vr,to:br}),rn(mi,"Runner");var _i=class extends ir{constructor(t,n=t){super(Kt("svg",t),n),this.namespace()}defs(){return this.isRoot()?tn(this.node.querySelector("defs"))||this.put(new sr):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Qt.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Ht,version:"1.1"}).attr("xmlns:xlink",Vt,Bt):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Bt).attr("xmlns:svgjs",null,Bt)}root(){return this.isRoot()?this:super.root()}};v({Container:{nested:on((function(){return this.put(new _i)}))}}),rn(_i,"Svg",!0);var ji=class extends ir{constructor(t,n=t){super(Kt("symbol",t),n)}};v({Container:{symbol:on((function(){return this.put(new ji)}))}}),rn(ji,"Symbol");var Oi=d({amove:()=>Pi,ax:()=>Ni,ay:()=>Di,build:()=>$i,center:()=>Fi,cx:()=>Ci,cy:()=>zi,length:()=>Ai,move:()=>Ei,plain:()=>ki,x:()=>Si,y:()=>Ti});function ki(t){return!1===this._build&&this.clear(),this.node.appendChild(Qt.document.createTextNode(t)),this}function Ai(){return this.node.getComputedTextLength()}function Si(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)}function Ti(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}function Ei(t,n,r=this.bbox()){return this.x(t,r).y(n,r)}function Ci(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)}function zi(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)}function Fi(t,n,r=this.bbox()){return this.cx(t,r).cy(n,r)}function Ni(t){return this.attr("x",t)}function Di(t){return this.attr("y",t)}function Pi(t,n){return this.ax(t).ay(n)}function $i(t){return this._build=!!t,this}var Ri=class extends er{constructor(t,n=t){super(Kt("text",t),n),this.dom.leading=this.dom.leading??new Wn(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Wn(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const r=this.dom.leading;this.each((function(i){if(Xt(this.node))return;const s=Qt.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=r*new Wn(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=e:(this.attr("dy",i?e+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Wn(t.leading||1.3),this}writeDataToDom(){return super.writeDataToDom({leading:1.3})}text(t){if(void 0===t){const n=this.node.childNodes;let r=0;t="";for(let i=0,s=n.length;i<s;++i)"textPath"===n[i].nodeName||Xt(n[i])?0===i&&(r=i+1):(i!==r&&3!==n[i].nodeType&&!0===tn(n[i]).dom.newLined&&(t+="\n"),t+=n[i].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,r=(t=(t+"").split("\n")).length;n<r;n++)this.newLine(t[n]);return this.build(!1).rebuild()}};un(Ri,Oi),v({Container:{text:on((function(t=""){return this.put(new Ri).text(t)})),plain:on((function(t=""){return this.put(new Ri).plain(t)}))}}),rn(Ri,"Text");var Li=class extends er{constructor(t,n=t){super(Kt("tspan",t),n),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Ri))return this;const n=t.index(this),r=Qt.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new Wn(r);return this.dy(n?i:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};un(Li,Oi),v({Tspan:{tspan:on((function(t=""){const n=new Li;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),rn(Li,"Tspan");var Ii=class extends er{constructor(t,n=t){super(Kt("circle",t),n)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Wn(t).divide(2))}};un(Ii,{x:cr,y:ar,cx:lr,cy:fr,width:pr,height:dr}),v({Container:{circle:on((function(t=0){return this.put(new Ii).size(t).move(0,0)}))}}),rn(Ii,"Circle");var Gi=class extends ir{constructor(t,n=t){super(Kt("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Rn(this.node,"clip-path")}};v({Container:{clip:on((function(){return this.defs().put(new Gi)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Gi?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),rn(Gi,"ClipPath");var Yi=class extends nr{constructor(t,n=t){super(Kt("foreignObject",t),n)}};v({Container:{foreignObject:on((function(t,n){return this.put(new Yi).size(t,n)}))}}),rn(Yi,"ForeignObject");var Xi=d({dmove:()=>Hi,dx:()=>Bi,dy:()=>Vi,height:()=>Qi,move:()=>Ji,size:()=>Ui,width:()=>qi,x:()=>Wi,y:()=>Zi});function Hi(t,n){return this.children().forEach((r=>{let i;try{i=r.node instanceof Qt.window.SVGSVGElement?new zn(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}const s=new Tn(r),e=s.translate(t,n).transform(s.inverse()),h=new An(i.x,i.y).transform(e);r.dmove(h.x-i.x,h.y-i.y)})),this}function Bi(t){return this.dmove(t,0)}function Vi(t){return this.dmove(0,t)}function Qi(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)}function Ji(t=0,n=0,r=this.bbox()){return this.dmove(t-r.x,n-r.y)}function Ui(t,n,r=this.bbox()){const i=It(this,t,n,r),s=i.width/r.width,e=i.height/r.height;return this.children().forEach((t=>{const n=new An(r).transform(new Tn(t).inverse());t.scale(s,e,n.x,n.y)})),this}function qi(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)}function Wi(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)}function Zi(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}var Ki=class extends ir{constructor(t,n=t){super(Kt("g",t),n)}};un(Ki,Xi),v({Container:{group:on((function(){return this.put(new Ki)}))}}),rn(Ki,"G");var ts=class extends ir{constructor(t,n=t){super(Kt("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,Vt)}};un(ts,Xi),v({Container:{link:on((function(t){return this.put(new ts).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const r=n.index(t);return n.add(this,r),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new ts,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),rn(ts,"A");var ns=class extends ir{constructor(t,n=t){super(Kt("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Rn(this.node,"mask")}};v({Container:{mask:on((function(){return this.defs().put(new ns)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof ns?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),rn(ns,"Mask");var rs=class extends nr{constructor(t,n=t){super(Kt("stop",t),n)}update(t){return("number"==typeof t||t instanceof Wn)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Wn(t.offset)),this}};v({Gradient:{stop:function(t,n,r){return this.put(new rs).update(t,n,r)}}}),rn(rs,"Stop");var is=class extends nr{constructor(t,n=t){super(Kt("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,r={}){return this.rule("@font-face",{fontFamily:t,src:n,...r})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let r=t+"{";for(const t in n)r+=Rt(t)+":"+n[t]+";";return r+="}",r}(t,n))}};v("Dom",{style(t,n){return this.put(new is).rule(t,n)},fontface(t,n,r){return this.put(new is).font(t,n,r)}}),rn(is,"Style");var ss=class extends Ri{constructor(t,n=t){super(Kt("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let r=null;return n&&(r=n.plot(t)),null==t?r:this}track(){return this.reference("href")}};v({Container:{textPath:on((function(t,n){return t instanceof Ri||(t=this.text(t)),t.path(n)}))},Text:{path:on((function(t,n=!0){const r=new ss;let i;if(t instanceof ri||(t=this.defs().path(t)),r.attr("href","#"+t,Vt),n)for(;i=this.node.firstChild;)r.node.appendChild(i);return this.put(r)})),textPath(){return this.findOne("textPath")}},Path:{text:on((function(t){return t instanceof Ri||(t=(new Ri).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Rn(this.node,"href","textPath")}}}),ss.prototype.MorphArray=Jr,rn(ss,"TextPath");var es=class extends er{constructor(t,n=t){super(Kt("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,Vt)}};v({Container:{use:on((function(t,n){return this.put(new es).use(t,n)}))}}),rn(es,"Use"),un([_i,ji,Mr,xr,Cr],b("viewbox")),un([Er,ai,ci,ri],b("marker")),un(Ri,b("Text")),un(ri,b("Path")),un(sr,b("Defs")),un([Ri,Li],b("Tspan")),un([li,wr,gr,mi],b("radius")),un(Qn,b("EventTarget")),un(tr,b("Dom")),un(nr,b("Element")),un(er,b("Shape")),un([ir,yr],b("Container")),un(gr,b("Gradient")),un(mi,b("Runner")),Nn.extend([...new Set(m)]),function(t=[]){ni.push(...[].concat(t))}([Wn,kn,zn,Tn,qn,_r,Jr,An]),un(ni,{to(t){return(new qr).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,r,i,s){return this.fromArray(t.map((function(t,e){return i.step(t,n[e],r,s[e],s)})))}});export{r as F,s as P,_i as S,h as a}
@@ -1 +1 @@
1
- import{S as n,a as t,A as r,b as e,T as u,D as i,c as o,M as s,d as a}from"./CompareUtil.js";import{a as c,D as l}from"./DateStringFactory.js";import{a as f,O as d}from"./Order.js";import{r as v}from"./VarianceMeasure.js";const m=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,S=/^[A-Za-z_][A-Za-z0-9_]*$/,y=["min","max","avg","sum"];class N{constructor(n,t,r,e){this.label=n,this.alias=t,this.fn=r,this.arg=e}get isNumeric(){return y.includes(this.fn)}}function O(n){if("string"!=typeof n)return!1;const t=m.exec(n);if(!t)return!1;const[,r,e]=t;return"lit"===r?e.length>0:S.test(e)}function b(n,t,r){if(!O(r))return null;const[,e,u]=m.exec(r);return new N(n,t,e,u)}function J(n){return null==n||""===n||"null"===n}function p(t){return J(t)||"auto"===t.trim().toLowerCase()?[]:h((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in n)))).toString())}function h(r){return J(r)?[]:r.replace(";",",").split(",").filter((r=>{var e,u,i;const o=r.split("_"),s=null===(e=o[0])||void 0===e?void 0:e.replace(/^dr|^d/,"").toUpperCase().trim(),a=null===(u=o[1])||void 0===u?void 0:u.toUpperCase().trim(),c=null===(i=o[2])||void 0===i?void 0:i.toUpperCase().trim();return 3!==o.length||!(s in n)||!(a in n)||!(c in t)}))}function A(t){return J(t)?[]:h(t.split(",").filter((t=>!(t.toUpperCase().trim()in n))).toString())}function g(n){return J(n)||"auto"===n.trim().toLowerCase()?[]:h(n.split(",").filter((n=>!(n.toUpperCase()in f))).toString())}function j(n){return!J(n)&&Number.isInteger(Number(n))}function k(n){return!J(n)&&!Number.isNaN(Number(n))}function T(n){return!J(n)&&(null==n?void 0:n.toUpperCase())in d}function $(n){return"auto"===(null==n?void 0:n.toLowerCase())||(null==n?void 0:n.toUpperCase())in r}function G(n){if(J(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("name")&&n.hasOwnProperty("unit"))))}catch(n){console.error("validateMeasureList: failed to parse JSON",n)}return["Invalid JSON structure"]}function I(n){const t=Date.parse(n);return Number.isInteger(t)}function w(n){return(null==n?void 0:n.toUpperCase())in l}function x(n){return(null==n?void 0:n.toUpperCase())in c}function z(n){return(null==n?void 0:n.toUpperCase())in e}function D(n){return!J(n)&&(null==n?void 0:n.toUpperCase())in i}function E(n){return!J(n)&&["true","false",!0,!1].some((t=>t===n))}function M(n){return!J(n)&&(null==n?void 0:n.toUpperCase())in o}function _(n){if(J(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category")&&n.hasOwnProperty("subCategory"))))}catch(n){console.error("validateThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function C(n){if(J(n))return[];try{const t=JSON.parse(n);if(null!==t&&"object"==typeof t&&!(t instanceof Array))return Object.entries(t).filter((([,n])=>"string"!=typeof n||!O(n))).map((([n,t])=>`${n}: ${t}`))}catch(n){console.error("validateAttributesJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function Z(n){if(J(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category"))))}catch(n){console.error("validatePartOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function q(n){return(null==n?void 0:n.trim().toUpperCase())in s}function L(n){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==n?void 0:n.trim())||["GREATEST","LEAST"].includes(null==n?void 0:n.trim().toUpperCase())}function P(n){return(null==n?void 0:n.toUpperCase().trim())in a}function B(n){return(null==n?void 0:n.toUpperCase().trim())in u}function F(n){if(J(n))return[];try{return JSON.parse(n).filter((n=>!(n.hasOwnProperty("scenario")&&n.hasOwnProperty("name")&&n.hasOwnProperty("subGroups"))))}catch(n){console.error("validateColumnThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function R(n){if(J(n))return[];try{const t=JSON.parse(n);if("object"!=typeof t||null===t||Array.isArray(t))return["stack: must be a JSON object"];const r=[];if(t.hasOwnProperty("by")){const n=["scenarios","dimensions"];n.includes(t.by)||r.push(`stack: 'by' must be one of: ${n.join(", ")}`)}else r.push("stack: 'by' is required");if(t.hasOwnProperty("mode")){const n=["absolute","relative","absolute-relative"];n.includes(t.mode)||r.push(`stack: 'mode' must be one of: ${n.join(", ")}`)}if(t.hasOwnProperty("order")){const n=["asc","desc","dataset"];n.includes(t.order)||r.push(`stack: 'order' must be one of: ${n.join(", ")}`)}return r}catch(n){return["stack: invalid JSON"]}}function U(n){return!J(n)&&null!==v(n)}export{C as A,b as B,h as a,g as b,T as c,G as d,I as e,x as f,w as g,j as h,J as i,U as j,$ as k,E as l,L as m,R as n,k as o,z as p,A as q,B as r,D as s,M as t,_ as u,p as v,Z as w,q as x,P as y,F as z}
1
+ import{S as n,a as t,A as r,b as e,T as o,D as u,c as a,M as i,d as s}from"./CompareUtil.js";import{i as c}from"./TableAttribute.js";import{D as l,a as f}from"./DateStringFactory.js";import{O as d,a as v}from"./Order.js";import{r as m}from"./VarianceMeasure.js";function S(n){return null==n||""===n||"null"===n}function b(t){return S(t)||"auto"===t.trim().toLowerCase()?[]:y((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in n)))).toString())}function y(r){return S(r)?[]:r.replace(";",",").split(",").filter((r=>{var e,o,u;const a=r.split("_"),i=null===(e=a[0])||void 0===e?void 0:e.replace(/^dr|^d/,"").toUpperCase().trim(),s=null===(o=a[1])||void 0===o?void 0:o.toUpperCase().trim(),c=null===(u=a[2])||void 0===u?void 0:u.toUpperCase().trim();return 3!==a.length||!(i in n)||!(s in n)||!(c in t)}))}function O(t){return S(t)?[]:y(t.split(",").filter((t=>!(t.toUpperCase().trim()in n))).toString())}function N(n){return S(n)||"auto"===n.trim().toLowerCase()?[]:y(n.split(",").filter((n=>!(n.toUpperCase()in d))).toString())}function J(n){return!S(n)&&Number.isInteger(Number(n))}function p(n){return!S(n)&&!Number.isNaN(Number(n))}function A(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in v}function j(n){return"auto"===(null==n?void 0:n.toLowerCase())||(null==n?void 0:n.toUpperCase())in r}function h(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("name")&&n.hasOwnProperty("unit"))))}catch(n){console.error("validateMeasureList: failed to parse JSON",n)}return["Invalid JSON structure"]}function k(n){const t=Date.parse(n);return Number.isInteger(t)}function T(n){return(null==n?void 0:n.toUpperCase())in f}function g(n){return(null==n?void 0:n.toUpperCase())in l}function G(n){return(null==n?void 0:n.toUpperCase())in e}function I(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in u}function $(n){return!S(n)&&["true","false",!0,!1].some((t=>t===n))}function D(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in a}function E(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category")&&n.hasOwnProperty("subCategory"))))}catch(n){console.error("validateThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function M(n){if(S(n))return[];try{const t=JSON.parse(n);if(null!==t&&"object"==typeof t&&!(t instanceof Array))return Object.entries(t).filter((([,n])=>"string"!=typeof n||!c(n))).map((([n,t])=>`${n}: ${t}`))}catch(n){console.error("validateAttributesJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function w(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category"))))}catch(n){console.error("validatePartOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function C(n){return(null==n?void 0:n.trim().toUpperCase())in i}function q(n){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==n?void 0:n.trim())||["GREATEST","LEAST"].includes(null==n?void 0:n.trim().toUpperCase())}function x(n){return(null==n?void 0:n.toUpperCase().trim())in s}function z(n){return(null==n?void 0:n.toUpperCase().trim())in o}function L(n){if(S(n))return[];try{return JSON.parse(n).filter((n=>!(n.hasOwnProperty("scenario")&&n.hasOwnProperty("name")&&n.hasOwnProperty("subGroups"))))}catch(n){console.error("validateColumnThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function P(n){if(S(n))return[];try{const t=JSON.parse(n);if("object"!=typeof t||null===t||Array.isArray(t))return["stack: must be a JSON object"];const r=[];if(t.hasOwnProperty("by")){const n=["scenarios","dimensions"];n.includes(t.by)||r.push(`stack: 'by' must be one of: ${n.join(", ")}`)}else r.push("stack: 'by' is required");if(t.hasOwnProperty("mode")){const n=["absolute","relative","absolute-relative"];n.includes(t.mode)||r.push(`stack: 'mode' must be one of: ${n.join(", ")}`)}if(t.hasOwnProperty("order")){const n=["asc","desc","dataset"];n.includes(t.order)||r.push(`stack: 'order' must be one of: ${n.join(", ")}`)}return r}catch(n){return["stack: invalid JSON"]}}function _(n){return!S(n)&&null!==m(n)}export{M as A,y as a,N as b,A as c,h as d,k as e,g as f,T as g,J as h,S as i,_ as j,j as k,$ as l,q as m,P as n,p as o,G as p,O as q,z as r,I as s,D as t,E as u,b as v,w,C as x,x as y,L as z}
@@ -1 +1 @@
1
- import{getElement as t}from"@stencil/core/internal/client";import{r}from"./utils.js";const e=(e,o)=>{let i;const n=new MutationObserver((()=>{var t;i&&o(null!==(t=i.textContent)&&void 0!==t?t:"")})),s=e.connectedCallback;e.connectedCallback=()=>{var a;i=t(e),n.observe(i,{childList:!0,subtree:!0,characterData:!0}),o(null!==(a=i.textContent)&&void 0!==a?a:""),r(s,e)};const a=e.disconnectedCallback;e.disconnectedCallback=()=>{n.disconnect(),r(a,e)}};export{e as w}
1
+ import{getElement as t}from"@stencil/core/internal/client";import{r}from"./withComponentStatus.js";const o=(o,e)=>{let n;const a=new MutationObserver((()=>{var t;n&&e(null!==(t=n.textContent)&&void 0!==t?t:"")})),i=o.connectedCallback;o.connectedCallback=()=>{var s;n=t(o),a.observe(n,{childList:!0,subtree:!0,characterData:!0}),e(null!==(s=n.textContent)&&void 0!==s?s:""),r(i,o)};const s=o.disconnectedCallback;o.disconnectedCallback=()=>{a.disconnect(),r(s,o)}};export{o as w}
@@ -0,0 +1 @@
1
+ import{getElement as n}from"@stencil/core/internal/client";const o=(n,o)=>{"function"==typeof n&&(o?n.bind(o)():n())},t=(n,o)=>{let t=n;const e=()=>t,r=n=>{const e=t;t=n,e!==n&&o(t)};return{get:e,set:r,setAndGet:n=>{r(n)},getAndSet:n=>{const o=e();return r(n),o},modify:n=>{r(n(e()))}}};var e,r;!function(n){n[n.RUNNING=0]="RUNNING",n[n.SUCCESSFUL=1]="SUCCESSFUL",n[n.ERROR=2]="ERROR"}(e||(e={})),function(n){let o;const t=new Map,r=new Map,c={running:0,successful:0,error:0},i=n=>{switch(n){case e.RUNNING:return"running";case e.SUCCESSFUL:return"successful";default:return"error"}},l=()=>{o&&window.clearTimeout(o),o=window.setTimeout((()=>{const o=document.fonts;"loading"!==(null==o?void 0:o.status)?(window.componentRegisterFailures=n.componentRegisterFailures(),window.componentRegisterIsRenderedResult=n.componentRegisterIsRendered(),console.log("componentRegisterIsRendered:",window.componentRegisterIsRenderedResult)):o.ready.then(l)}),500)};n.updateStatus=(n,o,d)=>{const s=t.get(n);void 0!==s&&c[i(s)]--,c[i(o)]++,t.set(n,o),o===e.ERROR&&d?r.set(n,d):r.delete(n),l()},n.remove=n=>{const o=t.get(n);void 0!==o&&(c[i(o)]--,t.delete(n),r.delete(n),l())},n.componentRegisterIsRendered=()=>0===c.running&&0===c.error,n.componentRegisterFailures=()=>0===c.running?[...r.values()]:[],n.componentRegisterStatus=()=>Object.assign({},c)}(r||(r={}));const c=["componentWillLoad","componentDidLoad"],i=["componentWillUpdate","componentWillRender","render","componentDidRender","componentDidUpdate"],l=["componentWillLoad","componentWillUpdate","componentWillRender"],d=t=>{const d=function(){let n=(new Date).getTime(),o=performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{let e=16*Math.random();return n>0?(e=(n+e)%16|0,n=Math.floor(n/16)):(e=(o+e)%16|0,o=Math.floor(o/16)),("x"===t?e:7&e|8).toString(16)}))}();let s,a,u,x=0,p=!1,f=!1;const v=()=>{var o;const c=n(t);if(c&&!c.isConnected)return;const i=null!==(o=null!=u?u:s)&&void 0!==o?o:a;f||x>0?r.updateStatus(d,e.RUNNING):void 0!==i?r.updateStatus(d,e.ERROR,((n,o)=>{var t,e,r,c;return{tag:null!==(t=null==n?void 0:n.localName)&&void 0!==t?t:"",id:(null==n?void 0:n.id)||(null===(c=null===(r=null===(e=null==n?void 0:n.getRootNode)||void 0===e?void 0:e.call(n))||void 0===r?void 0:r.host)||void 0===c?void 0:c.id)||"",message:o}})(c,i)):r.updateStatus(d,e.SUCCESSFUL)},m=(n,o)=>{const t=o instanceof Error?o.message:String(o);c.includes(n)?s=t:a=t,v()},w=t.connectedCallback;let g=()=>{p||(f=!0),v(),o(w,t)};Object.defineProperty(t,"connectedCallback",{configurable:!0,enumerable:!0,get:()=>{return n=g,()=>{u=void 0;try{n()}catch(n){throw u=n instanceof Error?n.message:String(n),v(),n}};var n},set:n=>{g=n}});const R=t.disconnectedCallback;t.disconnectedCallback=()=>{r.remove(d),o(R,t)};for(const n of[...c,...i]){const o=t[n];t[n]=(...e)=>{"componentWillUpdate"===n&&(a=void 0),l.includes(n)&&(f=!0,v());try{const r="function"==typeof o?o.apply(t,e):void 0;return"function"==typeof(null==r?void 0:r.then)?r.then((n=>n),(o=>{throw m(n,o),o})):r}catch(o){throw m(n,o),o}finally{"componentDidRender"===n&&(p=!0,f=!1,v())}}}return n=>{x++,v();const o=()=>{x--,v()};n.then(o,o)}};export{t as a,o as r,d as w}
@@ -1 +1 @@
1
- import{getElement as e,forceUpdate as t}from"@stencil/core/internal/client";import{g as s,c as r}from"./context-protocol.js";import{r as o}from"./utils.js";import{m as l}from"./merge.js";const c=c=>{let i,n,a,m;const p=()=>{const e=n.componentStyles.state;m=l([e._system||{},e._default||{},e[a]||{}],{arrayMergeType:"overwrite"})},y=new MutationObserver((s=>{s.forEach((s=>{"selected-style"===s.attributeName&&(a=e(c).getAttribute("selected-style"),p(),t(c))}))})),d=c.connectedCallback;c.connectedCallback=()=>{const r=e(c);n=s(r),m=n.componentStyles.state._system,y.observe(r,{attributes:!0,attributeFilter:["selected-style"]}),a=e(c).getAttribute("selected-style"),p(),i=n.componentStyles.on("set",(s=>{s===a&&(a=e(c).getAttribute("selected-style"),p(),t(e(c)))})),o(d,c)};const u=c.disconnectedCallback;return c.disconnectedCallback=()=>{y.disconnect(),o(i),r(e(c)),o(u,c)},e=>e(m)};export{c as w}
1
+ import{getElement as e,forceUpdate as t}from"@stencil/core/internal/client";import{g as s,c as r}from"./context-protocol.js";import{r as o}from"./withComponentStatus.js";import{m as c}from"./merge.js";const l=l=>{let n,i,a,m;const p=()=>{const e=i.componentStyles.state;m=c([e._system||{},e._default||{},e[a]||{}],{arrayMergeType:"overwrite"})},y=new MutationObserver((s=>{s.forEach((s=>{"selected-style"===s.attributeName&&(a=e(l).getAttribute("selected-style"),p(),t(l))}))})),d=l.connectedCallback;l.connectedCallback=()=>{const r=e(l);i=s(r),m=i.componentStyles.state._system,y.observe(r,{attributes:!0,attributeFilter:["selected-style"]}),a=e(l).getAttribute("selected-style"),p(),n=i.componentStyles.on("set",(s=>{s===a&&(a=e(l).getAttribute("selected-style"),p(),t(e(l)))})),o(d,l)};const u=l.disconnectedCallback;return l.disconnectedCallback=()=>{y.disconnect(),o(n),r(e(l)),o(u,l)},e=>e(m)};export{l as w}
@@ -1 +1 @@
1
- import{g as t,c as n}from"./context-protocol.js";import{r as e}from"./utils.js";import{getElement as o}from"@stencil/core/internal/client";function a(t,n=!1){const e=s(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),a=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=s(t),o=0,a=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),a=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=r(e),o++;continue}const t=getComputedStyle(e),s=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${s} clientH=${e.clientHeight} h=${t.height}`),null===a)if("hidden"===s||"scroll"===s||"auto"===s)a=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(a)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(a=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=r(e),o++}return null!==a?a/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(a)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,a),height:Math.max(0,i)}}function s(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function r(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}const i=(t,n)=>{const e=[],o=[];for(const a of n)(t(a)?e:o).push(a);return[e,o]},l="WARN_use_dataset",c=(t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:l,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(l)},d=(a,s,r)=>{let l,d,u=[],f=[],h=[];const p=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=d.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}s(t,o)},g=()=>{u.forEach((t=>t())),u=[],f.forEach((t=>{t&&(u.push(d.db.subscribe(t,(()=>p(t,!1)))),p(t,!1),(t=>{if(r){const n=d.datasetsMeta.get(t);n&&r(t,n)}})(t))})),h.forEach((t=>{t&&(u.push(d.db.subscribe(t.substring(1),(()=>p(t,!0)))),p(t,!0))}))},w=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([h,f]=i((t=>t.startsWith("$")),o(a).getAttribute("datasets").split(",")),c(a,h),g())}))})),$=a.connectedCallback;a.connectedCallback=()=>{const n=o(a);d=t(n),[h,f]=i((t=>t.startsWith("$")),(n.getAttribute("datasets")||"").split(",")),c(a,h),g(),w.observe(n,{attributes:!0,attributeFilter:["datasets"]}),r&&(l=d.datasetsMeta.on("set",((t,n)=>{f.includes(t)&&r(t,n)}))),e($,a)};const m=a.disconnectedCallback;return a.disconnectedCallback=()=>{w.disconnect(),u.forEach((t=>t())),u=[],e(l),n(o(a)),e(m,a)},t=>{f=t,g()}};export{a as g,d as w}
1
+ import{g as t,c as s}from"./context-protocol.js";import{r as e}from"./withComponentStatus.js";import{getElement as a}from"@stencil/core/internal/client";const o=(t,s)=>{const e=[],a=[];for(const o of s)(t(o)?e:a).push(o);return[e,a]},r="WARN_use_dataset",n=(t,s)=>{const e=t.errors;if(e)if(s.length>0){const t=s.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:r,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(r)},c=(r,c,i)=>{let d,u,f=[],l=[],m=[];const p=(t,s)=>{const e=s?t.substring(1):t;let a;try{a=u.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){a=[]}c(t,a)},g=()=>{f.forEach((t=>t())),f=[],l.forEach((t=>{t&&(f.push(u.db.subscribe(t,(()=>p(t,!1)))),p(t,!1),(t=>{if(i){const s=u.datasetsMeta.get(t);s&&i(t,s)}})(t))})),m.forEach((t=>{t&&(f.push(u.db.subscribe(t.substring(1),(()=>p(t,!0)))),p(t,!0))}))},b=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,l]=o((t=>t.startsWith("$")),a(r).getAttribute("datasets").split(",")),n(r,m),g())}))})),w=r.connectedCallback;r.connectedCallback=()=>{const s=a(r);u=t(s),[m,l]=o((t=>t.startsWith("$")),(s.getAttribute("datasets")||"").split(",")),n(r,m),g(),b.observe(s,{attributes:!0,attributeFilter:["datasets"]}),i&&(d=u.datasetsMeta.on("set",((t,s)=>{l.includes(t)&&i(t,s)}))),e(w,r)};const y=r.disconnectedCallback;return r.disconnectedCallback=()=>{b.disconnect(),f.forEach((t=>t())),f=[],e(d),s(a(r)),e(y,r)},t=>{l=t,g()}};export{c as w}
@@ -1 +1 @@
1
- import{g as r,r as e,a as n}from"./utils.js";import{getElement as t}from"@stencil/core/internal/client";var o,s;!function(r){r[r.RUNNING=0]="RUNNING",r[r.SUCCESSFUL=1]="SUCCESSFUL",r[r.ERROR=2]="ERROR"}(o||(o={})),function(r){let e;const n=new Map,t={running:0,successful:0,error:0},s=r=>{switch(r){case o.RUNNING:return"running";case o.SUCCESSFUL:return"successful";default:return"error"}};r.updateStatus=(o,c)=>{e&&clearTimeout(e);const i=n.get(o);void 0!==i&&t[s(i)]--,t[s(c)]++,n.set(o,c),e=setTimeout((()=>{window.componentRegisterIsRenderedResult=r.componentRegisterIsRendered(),console.log("componentRegisterIsRendered:",window.componentRegisterIsRenderedResult)}),500)},r.componentRegisterIsRendered=()=>0===t.running,r.componentRegisterStatus=()=>Object.assign({},t)}(s||(s={}));const c=n=>{const t=r(),c=n.connectedCallback;n.connectedCallback=()=>{s.updateStatus(t,o.RUNNING),e(c,n)};const i=n.componentWillRender;n.componentWillRender=()=>{s.updateStatus(t,o.RUNNING),e(i,n)};const a=n.componentDidRender;n.componentDidRender=()=>{s.updateStatus(t,o.SUCCESSFUL),e(a,n)}};let i=(r=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[r]];return e};const a=r=>{const{set:e,modify:o}=n([],(e=>{const n=t(r);0===e.length?n.removeAttribute("has-error"):n.setAttribute("has-error",JSON.stringify(e))}));return{clear:()=>{e([])},replace:r=>{e(r.map((r=>(r.id||(r.id=i()),r))))},add:r=>(r.id||(r.id=i()),o((e=>[...e,r])),r.id),addOrReplace:r=>{if(void 0===r.id)throw"missing";return o((e=>[...e.filter((e=>e.id!==r.id)),r])),r.id},remove:r=>{o((e=>e.filter((e=>e.id!==r))))}}};export{a,c as w}
1
+ import{getElement as r}from"@stencil/core/internal/client";import{a as e}from"./withComponentStatus.js";let t=(r=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&t[r]];return e};const o=o=>{const{set:n,modify:a}=e([],(e=>{const t=r(o);0===e.length?t.removeAttribute("has-error"):t.setAttribute("has-error",JSON.stringify(e))}));return{clear:()=>{n([])},replace:r=>{n(r.map((r=>(r.id||(r.id=t()),r))))},add:r=>(r.id||(r.id=t()),a((e=>[...e,r])),r.id),addOrReplace:r=>{if(void 0===r.id)throw"missing";return a((e=>[...e.filter((e=>e.id!==r.id)),r])),r.id},remove:r=>{a((e=>e.filter((e=>e.id!==r))))}}};export{o as w}
@@ -1 +1 @@
1
- import{forceUpdate as t,getElement as e}from"@stencil/core/internal/client";import{g as r,c as s}from"./context-protocol.js";import{r as o}from"./utils.js";import{i as l,f as n}from"./withTranslation.js";import{m as i}from"./merge.js";const u=u=>{let a,c,m,f,p=null;const b=()=>{const t=c.ruleSets.state;f=i([t._system||{},t._default||{},t[m]||{}])},j=()=>{const r=e(u),s=r.getAttribute("ruleset");if(p&&(p.disconnect(),p=null),s&&l(s)){const e=n(r,s);m=null==e?void 0:e.getAttribute("ruleset"),e&&(p=new MutationObserver((()=>{m=e.getAttribute("ruleset"),b(),t(u)})),p.observe(e,{attributes:!0,attributeFilter:["ruleset"]}))}else m=s},w=new MutationObserver((e=>{e.forEach((e=>{"ruleset"===e.attributeName&&(j(),b(),t(u))}))})),v=u.connectedCallback;u.connectedCallback=()=>{const s=e(u);c=r(s),f=c.ruleSets.state._system,w.observe(s,{attributes:!0,attributeFilter:["ruleset"]}),j(),b(),a=c.ruleSets.on("set",(r=>{r!==m&&"_default"!==r||(j(),b(),t(e(u)))})),o(v,u)};const d=u.disconnectedCallback;return u.disconnectedCallback=()=>{w.disconnect(),p&&(p.disconnect(),p=null),o(a),s(e(u)),o(d,u)},()=>f};export{u as w}
1
+ import{forceUpdate as t,getElement as e}from"@stencil/core/internal/client";import{g as r,c as s}from"./context-protocol.js";import{r as o}from"./withComponentStatus.js";import{i as n,f as i,r as l}from"./withTranslation.js";import{m as a}from"./merge.js";const u=u=>{let c,m,f,p,b=null;const w=()=>{const t=m.ruleSets.state;p=a([t._system||{},t._default||{},t[f]||{}])},j=()=>{const r=e(u),s=r.getAttribute("ruleset");if(b&&(b.disconnect(),b=null),s&&n(s)){const e=i(r,s);if(f=l(e,"ruleset"),e.length>0){b=new MutationObserver((()=>{f=l(e,"ruleset"),w(),t(u)}));for(const t of e)b.observe(t,{attributes:!0,attributeFilter:["ruleset"]})}}else f=s},g=new MutationObserver((e=>{e.forEach((e=>{"ruleset"===e.attributeName&&(j(),w(),t(u))}))})),h=u.connectedCallback;u.connectedCallback=()=>{const s=e(u);m=r(s),p=m.ruleSets.state._system,g.observe(s,{attributes:!0,attributeFilter:["ruleset"]}),j(),w(),c=m.ruleSets.on("set",(r=>{r!==f&&"_default"!==r||(j(),w(),t(e(u)))})),o(h,u)};const v=u.disconnectedCallback;return u.disconnectedCallback=()=>{g.disconnect(),b&&(b.disconnect(),b=null),o(c),s(e(u)),o(v,u)},()=>p};export{u as w}
@@ -1 +1 @@
1
- import{getElement as o,forceUpdate as t}from"@stencil/core/internal/client";import{g as n,c}from"./context-protocol.js";import{r as s}from"./utils.js";const e=e=>{let i,r;const f=()=>{"function"==typeof e.validateUnitScaling&&e.validateUnitScaling(e.unitScaling),"function"==typeof e.validatePercentageScaling&&e.validatePercentageScaling(e.percentageScaling),"function"==typeof e.validateSizeScaling&&e.validateSizeScaling()},p=e.connectedCallback;e.connectedCallback=()=>{const c=o(e);r=n(c),(()=>{const o=r.scalingGroups.state;for(const t of Object.keys(o))void 0!==o[t]?e.pixelPerUnitGroupMap.set(t,o[t]):e.pixelPerUnitGroupMap.delete(t)})(),f(),i=r.scalingGroups.on("set",((n,c)=>{void 0!==c?e.pixelPerUnitGroupMap.set(n,c):e.pixelPerUnitGroupMap.delete(n),f(),t(o(e))})),s(p,e)};const l=e.disconnectedCallback;e.disconnectedCallback=()=>{s(i),c(o(e)),s(l,e)}};export{e as w}
1
+ import{getElement as o,forceUpdate as t}from"@stencil/core/internal/client";import{g as n,c}from"./context-protocol.js";import{r as s}from"./withComponentStatus.js";const e=e=>{let i,r;const f=()=>{"function"==typeof e.validateUnitScaling&&e.validateUnitScaling(e.unitScaling),"function"==typeof e.validatePercentageScaling&&e.validatePercentageScaling(e.percentageScaling),"function"==typeof e.validateSizeScaling&&e.validateSizeScaling()},p=e.connectedCallback;e.connectedCallback=()=>{const c=o(e);r=n(c),(()=>{const o=r.scalingGroups.state;for(const t of Object.keys(o))void 0!==o[t]?e.pixelPerUnitGroupMap.set(t,o[t]):e.pixelPerUnitGroupMap.delete(t)})(),f(),i=r.scalingGroups.on("set",((n,c)=>{void 0!==c?e.pixelPerUnitGroupMap.set(n,c):e.pixelPerUnitGroupMap.delete(n),f(),t(o(e))})),s(p,e)};const m=e.disconnectedCallback;e.disconnectedCallback=()=>{s(i),c(o(e)),s(m,e)}};export{e as w}
@@ -1 +1 @@
1
- import{m as t}from"./emotion-hash.esm.js";import{o as s}from"./validate.js";import{forceUpdate as e,getElement as a}from"@stencil/core/internal/client";import{r as o}from"./utils.js";class r{constructor(){this.cache=new Map,this.tag=r.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.innerHTML=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const n=new r,m=t=>s(t)?`${t}px`:t,c={width:{className:"w",cssName:"width",attrName:"width",transform:m},height:{className:"h",cssName:"height",attrName:"height",transform:m},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:m},right:{className:"rgt",cssName:"right",attrName:"right",transform:m},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:m},left:{className:"lft",cssName:"left",attrName:"left",transform:m},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:m},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},i=Object.keys(c);function l(s,e){const a=function(s,e){const a=t(e);return`bn-c-${s.className}_${a}`}(s,e),o=function(t,s,e){return`.${s} {${t.cssName}: ${e};}`}(s,a,e);return{className:a,style:o}}const N=t=>{const s=new Map;return i.forEach((e=>{const a=t.getAttribute(e);a&&(["top","left","right","bottom"].includes(e)&&s.set("position",l(c.position,"absolute")),s.set(e,l(c[e],(c[e].transform||function(t){return t})(a))))})),s},f=new MutationObserver((t=>{for(const s of t){const t=s.target,a=N(t);n.apply(a);const o=Array.from(a.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...o).join(" "),e(t)}})),u=t=>{const s=t.connectedCallback,e=t.disconnectedCallback;t.connectedCallback=()=>{const e=a(t);if(!e)throw new Error("Can't find element field in component undefined");(t=>{const s=N(t);n.apply(s);const e=Array.from(s.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...e).join(" "),f.observe(t,{attributes:!0,attributeFilter:i,childList:!1,subtree:!1})})(e),o(s,t)},t.disconnectedCallback=()=>{o(e,t)}};export{u as w}
1
+ import{m as t}from"./emotion-hash.esm.js";import{o as s}from"./validate.js";import{forceUpdate as e,getElement as o}from"@stencil/core/internal/client";import{r as a}from"./withComponentStatus.js";class n{constructor(){this.cache=new Map,this.tag=n.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.textContent=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const r=new n,m=t=>s(t)?`${t}px`:t,c={width:{className:"w",cssName:"width",attrName:"width",transform:m},height:{className:"h",cssName:"height",attrName:"height",transform:m},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:m},right:{className:"rgt",cssName:"right",attrName:"right",transform:m},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:m},left:{className:"lft",cssName:"left",attrName:"left",transform:m},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:m},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},i=Object.keys(c);function l(t,s,e){return`.${s} {${t.cssName}: ${e};}`}function f(s,e){const o=document.createElement("div").style;o.setProperty(s.cssName,e);const a=o.getPropertyValue(s.cssName);if(o.cssText=`${s.cssName}:${a};--bn-end:1`,!a||a.includes("<")||"1"!==o.getPropertyValue("--bn-end"))return;const n=function(s,e){const o=t(e);return`bn-c-${s.className}_${o}`}(s,e);return{className:n,style:l(s,n,a)}}const N=t=>{const s=new Map;return i.forEach((e=>{const o=t.getAttribute(e);if(o){["top","left","right","bottom"].includes(e)&&s.set("position",f(c.position,"absolute"));const t=f(c[e],(c[e].transform||function(t){return t})(o));t&&s.set(e,t)}})),s},d=new MutationObserver((t=>{for(const s of t){const t=s.target,o=N(t);r.apply(o);const a=Array.from(o.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...a).join(" "),e(t)}})),u=t=>{const s=t.connectedCallback,e=t.disconnectedCallback;t.connectedCallback=()=>{const e=o(t);if(!e)throw new Error("Can't find element field in component undefined");(t=>{const s=N(t);r.apply(s);const e=Array.from(s.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...e).join(" "),d.observe(t,{attributes:!0,attributeFilter:i,childList:!1,subtree:!1})})(e),a(s,t)},t.disconnectedCallback=()=>{a(e,t)}};export{u as w}
@@ -1 +1 @@
1
- import{g as n,c as t}from"./context-protocol.js";import{getElement as e,forceUpdate as o}from"@stencil/core/internal/client";import{r as i}from"./utils.js";const r="inherited-page",s="bn-layout-page";function l(n){return"inherited-closest"===n||n===r}function a(n,t){let e=n.parentNode;for(;e;){if(e instanceof HTMLElement){const n=e.nodeName.toLowerCase();if(t===r){if(n===s)return e}else if("bn-layout-card"===n||n===s)return e}if(e.parentNode)e=e.parentNode;else{if(!(e instanceof ShadowRoot))break;e=e.host}}}const c=(n,t)=>{const r=new Map;let s,c=null;const u=n.connectedCallback;n.connectedCallback=()=>{(()=>{const i=e(n);r.clear();const u=[];for(const e of t){const t=n[e.propName];if("string"!=typeof t||!l(t))continue;if(s||(s=a(i,t)),!s)continue;const o=s.getAttribute(e.ancestorAttr);null!=o&&r.set(e.propName,o),u.push(e.ancestorAttr)}s&&u.length>0&&(c=new MutationObserver((()=>{for(const e of t){if(!l(n[e.propName]))continue;const t=s.getAttribute(e.ancestorAttr);null!=t?r.set(e.propName,t):r.delete(e.propName)}o(n)})),c.observe(s,{attributes:!0,attributeFilter:u}))})(),i(u,n)};const f=n.disconnectedCallback;return n.disconnectedCallback=()=>{c&&(c.disconnect(),c=null),s=void 0,r.clear(),i(f,n)},(n,t)=>{if(l(t))return r.get(n)}},u=r=>{let s,l,a,c=null;const u=()=>{var n;const t=e(r);if(c&&(c.disconnect(),c=null),l=null!==(n=t.getAttribute("i18n-namespace"))&&void 0!==n?n:t.getAttribute("namespace"),null!=l)return;const i=function(n){let t=n.parentNode;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("i18n-namespace"))return t;if(t.parentNode)t=t.parentNode;else{if(!(t instanceof ShadowRoot))break;t=t.host}}}(t);i&&(l=i.getAttribute("i18n-namespace"),c=new MutationObserver((()=>{u(),o(r)})),c.observe(i,{attributes:!0,attributeFilter:["i18n-namespace"]}))},f=new MutationObserver((n=>{n.forEach((n=>{"i18n-namespace"!==n.attributeName&&"namespace"!==n.attributeName||(u(),o(r))}))})),v=r.connectedCallback;r.connectedCallback=()=>{const t=e(r);a=n(t),f.observe(t,{attributes:!0,attributeFilter:["i18n-namespace","namespace"]}),u(),s=a.internationalization.on("set",(n=>{n!==l&&"_system"!==n||o(r)})),i(v,r)};const d=r.disconnectedCallback;return r.disconnectedCallback=()=>{f.disconnect(),c&&(c.disconnect(),c=null),i(s),t(e(r)),i(d,r)},{t:(n,t)=>{var o,i,s,c,u;n.startsWith(".")&&(n=e(r).localName+n);const f=a.internationalization.state,v=a.context.state.locale,d=null!==(s=null===(i=null===(o=f[l])||void 0===o?void 0:o[v])||void 0===i?void 0:i[n])&&void 0!==s?s:null===(u=null===(c=f._system)||void 0===c?void 0:c[v])||void 0===u?void 0:u[n];return null==d?n:d.replace(/{{([\s\S]+?)}}/g,((n,e)=>{var o;return null!==(o=null==t?void 0:t[e.trim()])&&void 0!==o?o:""}))}}};export{c as a,a as f,l as i,u as w}
1
+ import{g as n,c as t}from"./context-protocol.js";import{getElement as e,forceUpdate as o}from"@stencil/core/internal/client";import{r as i}from"./withComponentStatus.js";import{i as r}from"./validate.js";const s="inherited-page",a="bn-layout-page";function l(n){return"inherited-closest"===n||n===s}function u(n,t){const e=[];let o=n.parentNode;for(;o;){const n=o.nodeName.toLowerCase();if(n===a){e.push(o);break}if("bn-layout-card"===n&&t!==s&&e.push(o),o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}return e}function c(n,t){var e;const o=n=>{const e=n.getAttribute(t),o=null==e?void 0:e.trim();return r(o)||l(o)?void 0:e};for(const i of n){if((null===(e=i.getAttribute(t))||void 0===e?void 0:e.trim())===s){const t=n.find((n=>n.nodeName.toLowerCase()===a)),e=t&&o(t);if(void 0!==e)return e;continue}const r=o(i);if(void 0!==r)return r}}const d=(n,t,r)=>{const a=new Map,d=new Map;let v=null;const f=()=>{var i;const r=e(n);a.clear(),d.clear(),v&&(v.disconnect(),v=null);const s=new Map;for(const e of t){const t=n[e.propName];if("string"!=typeof t||!l(t))continue;d.set(e.propName,t);const o=u(r,t),v=c(o,e.ancestorAttr);void 0!==v&&a.set(e.propName,v);for(const n of o)s.set(n,[...null!==(i=s.get(n))&&void 0!==i?i:[],e.ancestorAttr])}if(s.size>0){v=new MutationObserver((()=>{f(),o(n)}));for(const[n,t]of s)v.observe(n,{attributes:!0,attributeFilter:t})}},p=n.connectedCallback;n.connectedCallback=()=>{f(),i(p,n)};const m=n.disconnectedCallback;n.disconnectedCallback=()=>{v&&(v.disconnect(),v=null),a.clear(),d.clear(),i(m,n)};const b=n=>{var e;return null===(e=t.find((t=>t.propName===n)))||void 0===e?void 0:e.ancestorAttr.replace(/-(\w)/g,((n,t)=>t.toUpperCase()))};return(n,t,e)=>{const o=`WARN_inherited_${n}`,i=l(t);i&&d.get(n)!==t&&f();const u=i?a.get(n):void 0;return i&&void 0===u?(null==r||r.addOrReplace({id:o,type:"warning",message:`${n}: '${t}' could not be resolved, no surrounding ${t===s?"page":"card or page"} sets ${b(n)}`}),{value:e,inherited:!1,unresolved:!0}):(null==r||r.remove(o),{value:null!=u?u:t,inherited:void 0!==u,unresolved:!1})}},v=r=>{let s,a,l,u=null;const c=()=>{var n;const t=e(r);if(u&&(u.disconnect(),u=null),a=null!==(n=t.getAttribute("i18n-namespace"))&&void 0!==n?n:t.getAttribute("namespace"),null!=a)return;const i=function(n){let t=n.parentNode;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("i18n-namespace"))return t;if(t.parentNode)t=t.parentNode;else{if(!(t instanceof ShadowRoot))break;t=t.host}}}(t);i&&(a=i.getAttribute("i18n-namespace"),u=new MutationObserver((()=>{c(),o(r)})),u.observe(i,{attributes:!0,attributeFilter:["i18n-namespace"]}))},d=new MutationObserver((n=>{n.forEach((n=>{"i18n-namespace"!==n.attributeName&&"namespace"!==n.attributeName||(c(),o(r))}))})),v=r.connectedCallback;r.connectedCallback=()=>{const t=e(r);l=n(t),d.observe(t,{attributes:!0,attributeFilter:["i18n-namespace","namespace"]}),c(),s=l.internationalization.on("set",(n=>{n!==a&&"_system"!==n||o(r)})),i(v,r)};const f=r.disconnectedCallback;return r.disconnectedCallback=()=>{d.disconnect(),u&&(u.disconnect(),u=null),i(s),t(e(r)),i(f,r)},{t:(n,t)=>{var o,i,s,u,c;n.startsWith(".")&&(n=e(r).localName+n);const d=l.internationalization.state,v=l.context.state.locale,f=null!==(s=null===(i=null===(o=d[a])||void 0===o?void 0:o[v])||void 0===i?void 0:i[n])&&void 0!==s?s:null===(c=null===(u=d._system)||void 0===u?void 0:u[v])||void 0===c?void 0:c[n];return null==f?n:f.replace(/{{([\s\S]+?)}}/g,((n,e)=>{var o;return null!==(o=null==t?void 0:t[e.trim()])&&void 0!==o?o:""}))}}};export{d as a,u as f,l as i,c as r,v as w}