@antv/g2 5.0.0-rc.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (648) hide show
  1. package/README.en-US.md +8 -5
  2. package/README.md +5 -6
  3. package/dist/g2-lite.min.js +4 -4
  4. package/dist/g2.min.js +4 -4
  5. package/esm/animation/fadeIn.js +1 -1
  6. package/esm/animation/fadeIn.js.map +1 -1
  7. package/esm/animation/fadeOut.js +1 -1
  8. package/esm/animation/fadeOut.js.map +1 -1
  9. package/esm/animation/morphing.js +1 -1
  10. package/esm/animation/morphing.js.map +1 -1
  11. package/esm/animation/scaleInX.js +1 -1
  12. package/esm/animation/scaleInX.js.map +1 -1
  13. package/esm/animation/scaleInY.js +1 -1
  14. package/esm/animation/scaleInY.js.map +1 -1
  15. package/esm/animation/scaleOutX.js +1 -1
  16. package/esm/animation/scaleOutX.js.map +1 -1
  17. package/esm/animation/scaleOutY.js +1 -1
  18. package/esm/animation/scaleOutY.js.map +1 -1
  19. package/esm/animation/waveIn.js +2 -2
  20. package/esm/animation/waveIn.js.map +1 -1
  21. package/esm/animation/zoomIn.js +1 -1
  22. package/esm/animation/zoomIn.js.map +1 -1
  23. package/esm/animation/zoomOut.js +1 -1
  24. package/esm/animation/zoomOut.js.map +1 -1
  25. package/esm/api/chart.d.ts +5 -2
  26. package/esm/api/chart.js +28 -20
  27. package/esm/api/chart.js.map +1 -1
  28. package/esm/api/composition/base.d.ts +8 -2
  29. package/esm/api/composition/base.js +29 -2
  30. package/esm/api/composition/base.js.map +1 -1
  31. package/esm/component/axis.js +46 -30
  32. package/esm/component/axis.js.map +1 -1
  33. package/esm/component/axisRadar.js +4 -3
  34. package/esm/component/axisRadar.js.map +1 -1
  35. package/esm/component/axisX.js.map +1 -1
  36. package/esm/component/legendCategory.js +63 -23
  37. package/esm/component/legendCategory.js.map +1 -1
  38. package/esm/component/legendContinuous.js +10 -8
  39. package/esm/component/legendContinuous.js.map +1 -1
  40. package/esm/component/legendContinuousBlockSize.js +1 -1
  41. package/esm/component/legendContinuousBlockSize.js.map +1 -1
  42. package/esm/component/legendContinuousSize.js +1 -1
  43. package/esm/component/legendContinuousSize.js.map +1 -1
  44. package/esm/component/scrollbar.d.ts +1 -1
  45. package/esm/component/scrollbar.js +4 -4
  46. package/esm/component/scrollbar.js.map +1 -1
  47. package/esm/component/scrollbarX.js +1 -1
  48. package/esm/component/scrollbarX.js.map +1 -1
  49. package/esm/component/scrollbarY.js +1 -1
  50. package/esm/component/scrollbarY.js.map +1 -1
  51. package/esm/component/slider.d.ts +1 -1
  52. package/esm/component/slider.js +4 -4
  53. package/esm/component/slider.js.map +1 -1
  54. package/esm/component/sliderX.js +1 -1
  55. package/esm/component/sliderX.js.map +1 -1
  56. package/esm/component/sliderY.js +1 -1
  57. package/esm/component/sliderY.js.map +1 -1
  58. package/esm/component/title.js +13 -2
  59. package/esm/component/title.js.map +1 -1
  60. package/esm/component/utils.d.ts +2 -1
  61. package/esm/component/utils.js +27 -3
  62. package/esm/component/utils.js.map +1 -1
  63. package/esm/coordinate/fisheye.js +1 -1
  64. package/esm/coordinate/fisheye.js.map +1 -1
  65. package/esm/geo/geoView.js +1 -1
  66. package/esm/geo/geoView.js.map +1 -1
  67. package/esm/index.d.ts +1 -0
  68. package/esm/index.js +1 -0
  69. package/esm/index.js.map +1 -1
  70. package/esm/interaction/brushFilter.js +1 -1
  71. package/esm/interaction/brushFilter.js.map +1 -1
  72. package/esm/interaction/brushHighlight.js +6 -3
  73. package/esm/interaction/brushHighlight.js.map +1 -1
  74. package/esm/interaction/elementHighlight.js +1 -1
  75. package/esm/interaction/elementHighlight.js.map +1 -1
  76. package/esm/interaction/event.js +20 -20
  77. package/esm/interaction/event.js.map +1 -1
  78. package/esm/interaction/fisheye.js +1 -1
  79. package/esm/interaction/fisheye.js.map +1 -1
  80. package/esm/interaction/legendFilter.d.ts +1 -4
  81. package/esm/interaction/legendFilter.js +52 -74
  82. package/esm/interaction/legendFilter.js.map +1 -1
  83. package/esm/interaction/sliderFilter.js +6 -6
  84. package/esm/interaction/sliderFilter.js.map +1 -1
  85. package/esm/interaction/tooltip.d.ts +2 -2
  86. package/esm/interaction/tooltip.js +40 -18
  87. package/esm/interaction/tooltip.js.map +1 -1
  88. package/esm/interaction/utils.js +7 -5
  89. package/esm/interaction/utils.js.map +1 -1
  90. package/esm/label-transform/overflowHide.js +3 -2
  91. package/esm/label-transform/overflowHide.js.map +1 -1
  92. package/esm/label-transform/overlapHide.js +3 -2
  93. package/esm/label-transform/overlapHide.js.map +1 -1
  94. package/esm/mark/boxplot.js +2 -2
  95. package/esm/mark/boxplot.js.map +1 -1
  96. package/esm/mark/gauge.js +2 -2
  97. package/esm/mark/gauge.js.map +1 -1
  98. package/esm/mark/sankey.js +2 -2
  99. package/esm/mark/sankey.js.map +1 -1
  100. package/esm/mark/utils.d.ts +2 -2
  101. package/esm/mark/utils.js +2 -2
  102. package/esm/mark/utils.js.map +1 -1
  103. package/esm/runtime/component.d.ts +3 -3
  104. package/esm/runtime/component.js +22 -7
  105. package/esm/runtime/component.js.map +1 -1
  106. package/esm/runtime/plot.js +58 -24
  107. package/esm/runtime/plot.js.map +1 -1
  108. package/esm/runtime/render.d.ts +2 -2
  109. package/esm/runtime/render.js +33 -10
  110. package/esm/runtime/render.js.map +1 -1
  111. package/esm/runtime/types/common.d.ts +12 -9
  112. package/esm/runtime/types/component.d.ts +13 -4
  113. package/esm/shape/area/area.js +1 -1
  114. package/esm/shape/area/area.js.map +1 -1
  115. package/esm/shape/area/curve.js +2 -1
  116. package/esm/shape/area/curve.js.map +1 -1
  117. package/esm/shape/area/hv.js +1 -1
  118. package/esm/shape/area/hv.js.map +1 -1
  119. package/esm/shape/area/hvh.js +1 -1
  120. package/esm/shape/area/hvh.js.map +1 -1
  121. package/esm/shape/area/smooth.js +1 -1
  122. package/esm/shape/area/smooth.js.map +1 -1
  123. package/esm/shape/area/vh.js +1 -1
  124. package/esm/shape/area/vh.js.map +1 -1
  125. package/esm/shape/box/box.js +1 -0
  126. package/esm/shape/box/box.js.map +1 -1
  127. package/esm/shape/connector/connector.d.ts +2 -2
  128. package/esm/shape/connector/connector.js +3 -2
  129. package/esm/shape/connector/connector.js.map +1 -1
  130. package/esm/shape/interval/color.js +18 -9
  131. package/esm/shape/interval/color.js.map +1 -1
  132. package/esm/shape/interval/funnel.js +1 -1
  133. package/esm/shape/interval/funnel.js.map +1 -1
  134. package/esm/shape/interval/hollow.js +1 -1
  135. package/esm/shape/interval/hollow.js.map +1 -1
  136. package/esm/shape/interval/pyramid.js +1 -1
  137. package/esm/shape/interval/pyramid.js.map +1 -1
  138. package/esm/shape/interval/rect.js +1 -1
  139. package/esm/shape/interval/rect.js.map +1 -1
  140. package/esm/shape/label/label.js +4 -2
  141. package/esm/shape/label/label.js.map +1 -1
  142. package/esm/shape/label/position/area.js +1 -1
  143. package/esm/shape/label/position/area.js.map +1 -1
  144. package/esm/shape/line/curve.js +3 -2
  145. package/esm/shape/line/curve.js.map +1 -1
  146. package/esm/shape/line/hv.js +1 -1
  147. package/esm/shape/line/hv.js.map +1 -1
  148. package/esm/shape/line/hvh.js +1 -1
  149. package/esm/shape/line/hvh.js.map +1 -1
  150. package/esm/shape/line/line.js +1 -1
  151. package/esm/shape/line/line.js.map +1 -1
  152. package/esm/shape/line/smooth.js +1 -1
  153. package/esm/shape/line/smooth.js.map +1 -1
  154. package/esm/shape/line/vh.js +1 -1
  155. package/esm/shape/line/vh.js.map +1 -1
  156. package/esm/shape/lineXY/line.js +1 -0
  157. package/esm/shape/lineXY/line.js.map +1 -1
  158. package/esm/shape/link/arc.js +1 -0
  159. package/esm/shape/link/arc.js.map +1 -1
  160. package/esm/shape/link/link.js +1 -0
  161. package/esm/shape/link/link.js.map +1 -1
  162. package/esm/shape/link/smooth.js +1 -0
  163. package/esm/shape/link/smooth.js.map +1 -1
  164. package/esm/shape/link/vhv.js +1 -0
  165. package/esm/shape/link/vhv.js.map +1 -1
  166. package/esm/shape/path/hollow.js +1 -0
  167. package/esm/shape/path/hollow.js.map +1 -1
  168. package/esm/shape/path/path.js +1 -0
  169. package/esm/shape/path/path.js.map +1 -1
  170. package/esm/shape/point/bowtie.js +1 -1
  171. package/esm/shape/point/bowtie.js.map +1 -1
  172. package/esm/shape/point/color.js +2 -2
  173. package/esm/shape/point/color.js.map +1 -1
  174. package/esm/shape/point/cross.js +1 -1
  175. package/esm/shape/point/cross.js.map +1 -1
  176. package/esm/shape/point/diamond.js +1 -1
  177. package/esm/shape/point/diamond.js.map +1 -1
  178. package/esm/shape/point/hexagon.js +1 -1
  179. package/esm/shape/point/hexagon.js.map +1 -1
  180. package/esm/shape/point/hollow.js +1 -1
  181. package/esm/shape/point/hollow.js.map +1 -1
  182. package/esm/shape/point/hollowBowtie.js +1 -1
  183. package/esm/shape/point/hollowBowtie.js.map +1 -1
  184. package/esm/shape/point/hollowDiamond.js +1 -1
  185. package/esm/shape/point/hollowDiamond.js.map +1 -1
  186. package/esm/shape/point/hollowHexagon.js +1 -1
  187. package/esm/shape/point/hollowHexagon.js.map +1 -1
  188. package/esm/shape/point/hollowSquare.js +1 -1
  189. package/esm/shape/point/hollowSquare.js.map +1 -1
  190. package/esm/shape/point/hollowTriangle.js +1 -1
  191. package/esm/shape/point/hollowTriangle.js.map +1 -1
  192. package/esm/shape/point/hollowTriangleDown.js +1 -1
  193. package/esm/shape/point/hollowTriangleDown.js.map +1 -1
  194. package/esm/shape/point/hyphen.js +1 -1
  195. package/esm/shape/point/hyphen.js.map +1 -1
  196. package/esm/shape/point/line.js +1 -1
  197. package/esm/shape/point/line.js.map +1 -1
  198. package/esm/shape/point/plus.js +1 -1
  199. package/esm/shape/point/plus.js.map +1 -1
  200. package/esm/shape/point/point.js +1 -1
  201. package/esm/shape/point/point.js.map +1 -1
  202. package/esm/shape/point/square.js +1 -1
  203. package/esm/shape/point/square.js.map +1 -1
  204. package/esm/shape/point/tick.js +1 -1
  205. package/esm/shape/point/tick.js.map +1 -1
  206. package/esm/shape/point/triangle.js +1 -1
  207. package/esm/shape/point/triangle.js.map +1 -1
  208. package/esm/shape/point/triangleDown.js +1 -1
  209. package/esm/shape/point/triangleDown.js.map +1 -1
  210. package/esm/shape/polygon/polygon.js +1 -0
  211. package/esm/shape/polygon/polygon.js.map +1 -1
  212. package/esm/shape/polygon/ribbon.js +1 -0
  213. package/esm/shape/polygon/ribbon.js.map +1 -1
  214. package/esm/shape/shape/shape.js +1 -0
  215. package/esm/shape/shape/shape.js.map +1 -1
  216. package/esm/shape/text/advance.js +3 -1
  217. package/esm/shape/text/advance.js.map +1 -1
  218. package/esm/shape/text/badge.js +1 -0
  219. package/esm/shape/text/badge.js.map +1 -1
  220. package/esm/shape/text/text.js +2 -1
  221. package/esm/shape/text/text.js.map +1 -1
  222. package/esm/shape/utils.d.ts +1 -16
  223. package/esm/shape/utils.js +2 -2
  224. package/esm/shape/utils.js.map +1 -1
  225. package/esm/shape/vector/vector.js +1 -0
  226. package/esm/shape/vector/vector.js.map +1 -1
  227. package/esm/spec/component.d.ts +10 -9
  228. package/esm/spec/coordinateTransform.d.ts +1 -1
  229. package/esm/spec/interaction.d.ts +2 -0
  230. package/esm/spec/scale.d.ts +3 -2
  231. package/esm/spec/theme.d.ts +8 -2
  232. package/esm/stdlib/index.js +2 -2
  233. package/esm/stdlib/index.js.map +1 -1
  234. package/esm/theme/academy.js +77 -78
  235. package/esm/theme/academy.js.map +1 -1
  236. package/esm/theme/classic.d.ts +6 -0
  237. package/esm/theme/{light.js → classic.js} +80 -90
  238. package/esm/theme/classic.js.map +1 -0
  239. package/esm/theme/classicDark.d.ts +6 -0
  240. package/esm/theme/{dark.js → classicDark.js} +78 -87
  241. package/esm/theme/classicDark.js.map +1 -0
  242. package/esm/theme/index.d.ts +2 -2
  243. package/esm/theme/index.js +2 -2
  244. package/esm/theme/index.js.map +1 -1
  245. package/esm/transform/filter.js +4 -1
  246. package/esm/transform/filter.js.map +1 -1
  247. package/esm/utils/event.d.ts +33 -14
  248. package/esm/utils/event.js +43 -16
  249. package/esm/utils/event.js.map +1 -1
  250. package/esm/utils/helper.js +2 -1
  251. package/esm/utils/helper.js.map +1 -1
  252. package/esm/utils/marker.d.ts +10 -0
  253. package/esm/utils/marker.js +250 -0
  254. package/esm/utils/marker.js.map +1 -0
  255. package/esm/utils/style.d.ts +5 -0
  256. package/esm/utils/style.js +23 -0
  257. package/esm/utils/style.js.map +1 -0
  258. package/lib/animation/fadeIn.js +1 -1
  259. package/lib/animation/fadeIn.js.map +1 -1
  260. package/lib/animation/fadeOut.js +1 -1
  261. package/lib/animation/fadeOut.js.map +1 -1
  262. package/lib/animation/morphing.js +1 -1
  263. package/lib/animation/morphing.js.map +1 -1
  264. package/lib/animation/scaleInX.js +1 -1
  265. package/lib/animation/scaleInX.js.map +1 -1
  266. package/lib/animation/scaleInY.js +1 -1
  267. package/lib/animation/scaleInY.js.map +1 -1
  268. package/lib/animation/scaleOutX.js +1 -1
  269. package/lib/animation/scaleOutX.js.map +1 -1
  270. package/lib/animation/scaleOutY.js +1 -1
  271. package/lib/animation/scaleOutY.js.map +1 -1
  272. package/lib/animation/waveIn.js +2 -2
  273. package/lib/animation/waveIn.js.map +1 -1
  274. package/lib/animation/zoomIn.js +1 -1
  275. package/lib/animation/zoomIn.js.map +1 -1
  276. package/lib/animation/zoomOut.js +1 -1
  277. package/lib/animation/zoomOut.js.map +1 -1
  278. package/lib/api/chart.d.ts +5 -2
  279. package/lib/api/chart.js +28 -20
  280. package/lib/api/chart.js.map +1 -1
  281. package/lib/api/composition/base.d.ts +8 -2
  282. package/lib/api/composition/base.js +29 -2
  283. package/lib/api/composition/base.js.map +1 -1
  284. package/lib/component/axis.js +45 -29
  285. package/lib/component/axis.js.map +1 -1
  286. package/lib/component/axisRadar.js +4 -3
  287. package/lib/component/axisRadar.js.map +1 -1
  288. package/lib/component/axisX.js.map +1 -1
  289. package/lib/component/legendCategory.js +62 -22
  290. package/lib/component/legendCategory.js.map +1 -1
  291. package/lib/component/legendContinuous.js +9 -7
  292. package/lib/component/legendContinuous.js.map +1 -1
  293. package/lib/component/legendContinuousBlockSize.js +1 -1
  294. package/lib/component/legendContinuousBlockSize.js.map +1 -1
  295. package/lib/component/legendContinuousSize.js +1 -1
  296. package/lib/component/legendContinuousSize.js.map +1 -1
  297. package/lib/component/scrollbar.d.ts +1 -1
  298. package/lib/component/scrollbar.js +4 -4
  299. package/lib/component/scrollbar.js.map +1 -1
  300. package/lib/component/scrollbarX.js +1 -1
  301. package/lib/component/scrollbarX.js.map +1 -1
  302. package/lib/component/scrollbarY.js +1 -1
  303. package/lib/component/scrollbarY.js.map +1 -1
  304. package/lib/component/slider.d.ts +1 -1
  305. package/lib/component/slider.js +4 -4
  306. package/lib/component/slider.js.map +1 -1
  307. package/lib/component/sliderX.js +1 -1
  308. package/lib/component/sliderX.js.map +1 -1
  309. package/lib/component/sliderY.js +1 -1
  310. package/lib/component/sliderY.js.map +1 -1
  311. package/lib/component/title.js +13 -2
  312. package/lib/component/title.js.map +1 -1
  313. package/lib/component/utils.d.ts +2 -1
  314. package/lib/component/utils.js +28 -3
  315. package/lib/component/utils.js.map +1 -1
  316. package/lib/coordinate/fisheye.js +1 -1
  317. package/lib/coordinate/fisheye.js.map +1 -1
  318. package/lib/geo/geoView.js +1 -1
  319. package/lib/geo/geoView.js.map +1 -1
  320. package/lib/index.d.ts +1 -0
  321. package/lib/index.js +3 -1
  322. package/lib/index.js.map +1 -1
  323. package/lib/interaction/brushFilter.js +1 -1
  324. package/lib/interaction/brushFilter.js.map +1 -1
  325. package/lib/interaction/brushHighlight.js +6 -3
  326. package/lib/interaction/brushHighlight.js.map +1 -1
  327. package/lib/interaction/event.js +20 -20
  328. package/lib/interaction/event.js.map +1 -1
  329. package/lib/interaction/fisheye.js +1 -1
  330. package/lib/interaction/fisheye.js.map +1 -1
  331. package/lib/interaction/legendFilter.d.ts +1 -4
  332. package/lib/interaction/legendFilter.js +52 -74
  333. package/lib/interaction/legendFilter.js.map +1 -1
  334. package/lib/interaction/sliderFilter.js +6 -6
  335. package/lib/interaction/sliderFilter.js.map +1 -1
  336. package/lib/interaction/tooltip.d.ts +2 -2
  337. package/lib/interaction/tooltip.js +40 -18
  338. package/lib/interaction/tooltip.js.map +1 -1
  339. package/lib/interaction/utils.js +7 -5
  340. package/lib/interaction/utils.js.map +1 -1
  341. package/lib/label-transform/overflowHide.js +3 -2
  342. package/lib/label-transform/overflowHide.js.map +1 -1
  343. package/lib/label-transform/overlapHide.js +3 -2
  344. package/lib/label-transform/overlapHide.js.map +1 -1
  345. package/lib/mark/boxplot.js +2 -2
  346. package/lib/mark/boxplot.js.map +1 -1
  347. package/lib/mark/gauge.js +2 -2
  348. package/lib/mark/gauge.js.map +1 -1
  349. package/lib/mark/sankey.js +2 -2
  350. package/lib/mark/sankey.js.map +1 -1
  351. package/lib/mark/utils.d.ts +2 -2
  352. package/lib/mark/utils.js +2 -2
  353. package/lib/mark/utils.js.map +1 -1
  354. package/lib/runtime/component.d.ts +3 -3
  355. package/lib/runtime/component.js +22 -7
  356. package/lib/runtime/component.js.map +1 -1
  357. package/lib/runtime/plot.js +57 -23
  358. package/lib/runtime/plot.js.map +1 -1
  359. package/lib/runtime/render.d.ts +2 -2
  360. package/lib/runtime/render.js +32 -9
  361. package/lib/runtime/render.js.map +1 -1
  362. package/lib/runtime/types/common.d.ts +12 -9
  363. package/lib/runtime/types/component.d.ts +13 -4
  364. package/lib/shape/area/area.js +1 -1
  365. package/lib/shape/area/area.js.map +1 -1
  366. package/lib/shape/area/curve.js +2 -1
  367. package/lib/shape/area/curve.js.map +1 -1
  368. package/lib/shape/area/hv.js +1 -1
  369. package/lib/shape/area/hv.js.map +1 -1
  370. package/lib/shape/area/hvh.js +1 -1
  371. package/lib/shape/area/hvh.js.map +1 -1
  372. package/lib/shape/area/smooth.js +1 -1
  373. package/lib/shape/area/smooth.js.map +1 -1
  374. package/lib/shape/area/vh.js +1 -1
  375. package/lib/shape/area/vh.js.map +1 -1
  376. package/lib/shape/box/box.js +1 -0
  377. package/lib/shape/box/box.js.map +1 -1
  378. package/lib/shape/connector/connector.d.ts +2 -2
  379. package/lib/shape/connector/connector.js +3 -2
  380. package/lib/shape/connector/connector.js.map +1 -1
  381. package/lib/shape/interval/color.js +18 -9
  382. package/lib/shape/interval/color.js.map +1 -1
  383. package/lib/shape/interval/funnel.js +1 -1
  384. package/lib/shape/interval/funnel.js.map +1 -1
  385. package/lib/shape/interval/hollow.js +1 -1
  386. package/lib/shape/interval/hollow.js.map +1 -1
  387. package/lib/shape/interval/pyramid.js +1 -1
  388. package/lib/shape/interval/pyramid.js.map +1 -1
  389. package/lib/shape/interval/rect.js +1 -1
  390. package/lib/shape/interval/rect.js.map +1 -1
  391. package/lib/shape/label/label.js +4 -2
  392. package/lib/shape/label/label.js.map +1 -1
  393. package/lib/shape/label/position/area.js +1 -1
  394. package/lib/shape/label/position/area.js.map +1 -1
  395. package/lib/shape/line/curve.js +3 -2
  396. package/lib/shape/line/curve.js.map +1 -1
  397. package/lib/shape/line/hv.js +1 -1
  398. package/lib/shape/line/hv.js.map +1 -1
  399. package/lib/shape/line/hvh.js +1 -1
  400. package/lib/shape/line/hvh.js.map +1 -1
  401. package/lib/shape/line/line.js +1 -1
  402. package/lib/shape/line/line.js.map +1 -1
  403. package/lib/shape/line/smooth.js +1 -1
  404. package/lib/shape/line/smooth.js.map +1 -1
  405. package/lib/shape/line/vh.js +1 -1
  406. package/lib/shape/line/vh.js.map +1 -1
  407. package/lib/shape/lineXY/line.js +1 -0
  408. package/lib/shape/lineXY/line.js.map +1 -1
  409. package/lib/shape/link/arc.js +1 -0
  410. package/lib/shape/link/arc.js.map +1 -1
  411. package/lib/shape/link/link.js +1 -0
  412. package/lib/shape/link/link.js.map +1 -1
  413. package/lib/shape/link/smooth.js +1 -0
  414. package/lib/shape/link/smooth.js.map +1 -1
  415. package/lib/shape/link/vhv.js +1 -0
  416. package/lib/shape/link/vhv.js.map +1 -1
  417. package/lib/shape/path/hollow.js +1 -0
  418. package/lib/shape/path/hollow.js.map +1 -1
  419. package/lib/shape/path/path.js +1 -0
  420. package/lib/shape/path/path.js.map +1 -1
  421. package/lib/shape/point/bowtie.js +1 -1
  422. package/lib/shape/point/bowtie.js.map +1 -1
  423. package/lib/shape/point/color.js +2 -25
  424. package/lib/shape/point/color.js.map +1 -1
  425. package/lib/shape/point/cross.js +1 -1
  426. package/lib/shape/point/cross.js.map +1 -1
  427. package/lib/shape/point/diamond.js +1 -1
  428. package/lib/shape/point/diamond.js.map +1 -1
  429. package/lib/shape/point/hexagon.js +1 -1
  430. package/lib/shape/point/hexagon.js.map +1 -1
  431. package/lib/shape/point/hollow.js +1 -1
  432. package/lib/shape/point/hollow.js.map +1 -1
  433. package/lib/shape/point/hollowBowtie.js +1 -1
  434. package/lib/shape/point/hollowBowtie.js.map +1 -1
  435. package/lib/shape/point/hollowDiamond.js +1 -1
  436. package/lib/shape/point/hollowDiamond.js.map +1 -1
  437. package/lib/shape/point/hollowHexagon.js +1 -1
  438. package/lib/shape/point/hollowHexagon.js.map +1 -1
  439. package/lib/shape/point/hollowSquare.js +1 -1
  440. package/lib/shape/point/hollowSquare.js.map +1 -1
  441. package/lib/shape/point/hollowTriangle.js +1 -1
  442. package/lib/shape/point/hollowTriangle.js.map +1 -1
  443. package/lib/shape/point/hollowTriangleDown.js +1 -1
  444. package/lib/shape/point/hollowTriangleDown.js.map +1 -1
  445. package/lib/shape/point/hyphen.js +1 -1
  446. package/lib/shape/point/hyphen.js.map +1 -1
  447. package/lib/shape/point/line.js +1 -1
  448. package/lib/shape/point/line.js.map +1 -1
  449. package/lib/shape/point/plus.js +1 -1
  450. package/lib/shape/point/plus.js.map +1 -1
  451. package/lib/shape/point/point.js +1 -1
  452. package/lib/shape/point/point.js.map +1 -1
  453. package/lib/shape/point/square.js +1 -1
  454. package/lib/shape/point/square.js.map +1 -1
  455. package/lib/shape/point/tick.js +1 -1
  456. package/lib/shape/point/tick.js.map +1 -1
  457. package/lib/shape/point/triangle.js +1 -1
  458. package/lib/shape/point/triangle.js.map +1 -1
  459. package/lib/shape/point/triangleDown.js +1 -1
  460. package/lib/shape/point/triangleDown.js.map +1 -1
  461. package/lib/shape/polygon/polygon.js +1 -0
  462. package/lib/shape/polygon/polygon.js.map +1 -1
  463. package/lib/shape/polygon/ribbon.js +1 -0
  464. package/lib/shape/polygon/ribbon.js.map +1 -1
  465. package/lib/shape/shape/shape.js +1 -0
  466. package/lib/shape/shape/shape.js.map +1 -1
  467. package/lib/shape/text/advance.js +3 -1
  468. package/lib/shape/text/advance.js.map +1 -1
  469. package/lib/shape/text/badge.js +1 -0
  470. package/lib/shape/text/badge.js.map +1 -1
  471. package/lib/shape/text/text.js +2 -1
  472. package/lib/shape/text/text.js.map +1 -1
  473. package/lib/shape/utils.d.ts +1 -16
  474. package/lib/shape/utils.js +2 -2
  475. package/lib/shape/utils.js.map +1 -1
  476. package/lib/shape/vector/vector.js +1 -0
  477. package/lib/shape/vector/vector.js.map +1 -1
  478. package/lib/spec/component.d.ts +10 -9
  479. package/lib/spec/coordinateTransform.d.ts +1 -1
  480. package/lib/spec/interaction.d.ts +2 -0
  481. package/lib/spec/scale.d.ts +3 -2
  482. package/lib/spec/theme.d.ts +8 -2
  483. package/lib/stdlib/index.js +1 -1
  484. package/lib/stdlib/index.js.map +1 -1
  485. package/lib/theme/academy.js +77 -78
  486. package/lib/theme/academy.js.map +1 -1
  487. package/lib/theme/classic.d.ts +6 -0
  488. package/lib/theme/{light.js → classic.js} +82 -92
  489. package/lib/theme/classic.js.map +1 -0
  490. package/lib/theme/classicDark.d.ts +6 -0
  491. package/lib/theme/{dark.js → classicDark.js} +80 -89
  492. package/lib/theme/classicDark.js.map +1 -0
  493. package/lib/theme/index.d.ts +2 -2
  494. package/lib/theme/index.js +5 -5
  495. package/lib/theme/index.js.map +1 -1
  496. package/lib/transform/filter.js +4 -1
  497. package/lib/transform/filter.js.map +1 -1
  498. package/lib/utils/event.d.ts +33 -14
  499. package/lib/utils/event.js +44 -17
  500. package/lib/utils/event.js.map +1 -1
  501. package/lib/utils/helper.js +2 -1
  502. package/lib/utils/helper.js.map +1 -1
  503. package/lib/utils/marker.d.ts +10 -0
  504. package/lib/utils/marker.js +256 -0
  505. package/lib/utils/marker.js.map +1 -0
  506. package/lib/utils/style.d.ts +5 -0
  507. package/lib/utils/style.js +30 -0
  508. package/lib/utils/style.js.map +1 -0
  509. package/package.json +3 -3
  510. package/src/.DS_Store +0 -0
  511. package/src/animation/fadeIn.ts +1 -1
  512. package/src/animation/fadeOut.ts +1 -1
  513. package/src/animation/morphing.ts +1 -1
  514. package/src/animation/scaleInX.ts +4 -4
  515. package/src/animation/scaleInY.ts +4 -4
  516. package/src/animation/scaleOutX.ts +4 -4
  517. package/src/animation/scaleOutY.ts +4 -4
  518. package/src/animation/waveIn.ts +4 -4
  519. package/src/animation/zoomIn.ts +4 -4
  520. package/src/animation/zoomOut.ts +4 -4
  521. package/src/api/chart.ts +30 -23
  522. package/src/api/composition/base.ts +30 -4
  523. package/src/component/axis.ts +83 -66
  524. package/src/component/axisRadar.ts +4 -3
  525. package/src/component/axisX.ts +0 -1
  526. package/src/component/legendCategory.ts +69 -56
  527. package/src/component/legendContinuous.ts +31 -23
  528. package/src/component/legendContinuousBlockSize.ts +1 -5
  529. package/src/component/legendContinuousSize.ts +1 -1
  530. package/src/component/scrollbar.ts +6 -6
  531. package/src/component/scrollbarX.ts +1 -1
  532. package/src/component/scrollbarY.ts +1 -1
  533. package/src/component/slider.ts +7 -8
  534. package/src/component/sliderX.ts +1 -1
  535. package/src/component/sliderY.ts +1 -1
  536. package/src/component/title.ts +3 -5
  537. package/src/component/utils.ts +27 -3
  538. package/src/coordinate/fisheye.ts +2 -2
  539. package/src/data/.DS_Store +0 -0
  540. package/src/geo/geoView.ts +1 -1
  541. package/src/index.ts +1 -0
  542. package/src/interaction/brushFilter.ts +2 -2
  543. package/src/interaction/brushHighlight.ts +8 -3
  544. package/src/interaction/elementHighlight.ts +6 -6
  545. package/src/interaction/event.ts +30 -20
  546. package/src/interaction/fisheye.ts +1 -1
  547. package/src/interaction/legendFilter.ts +54 -70
  548. package/src/interaction/sliderFilter.ts +6 -6
  549. package/src/interaction/tooltip.ts +51 -21
  550. package/src/interaction/utils.ts +6 -3
  551. package/src/label-transform/overflowHide.ts +3 -3
  552. package/src/label-transform/overlapHide.ts +3 -2
  553. package/src/mark/boxplot.ts +2 -2
  554. package/src/mark/gauge.ts +2 -1
  555. package/src/mark/sankey.ts +2 -1
  556. package/src/mark/utils.ts +2 -4
  557. package/src/runtime/component.ts +34 -14
  558. package/src/runtime/plot.ts +72 -20
  559. package/src/runtime/render.ts +37 -9
  560. package/src/runtime/types/common.ts +13 -10
  561. package/src/runtime/types/component.ts +16 -8
  562. package/src/shape/.DS_Store +0 -0
  563. package/src/shape/area/area.ts +1 -0
  564. package/src/shape/area/curve.ts +2 -1
  565. package/src/shape/area/hv.ts +1 -0
  566. package/src/shape/area/hvh.ts +1 -0
  567. package/src/shape/area/smooth.ts +1 -0
  568. package/src/shape/area/vh.ts +1 -0
  569. package/src/shape/box/box.ts +1 -0
  570. package/src/shape/connector/connector.ts +6 -4
  571. package/src/shape/interval/color.ts +19 -4
  572. package/src/shape/interval/funnel.ts +1 -0
  573. package/src/shape/interval/hollow.ts +1 -0
  574. package/src/shape/interval/pyramid.ts +1 -0
  575. package/src/shape/interval/rect.ts +1 -0
  576. package/src/shape/label/label.ts +4 -2
  577. package/src/shape/label/position/area.ts +1 -1
  578. package/src/shape/line/curve.ts +3 -2
  579. package/src/shape/line/hv.ts +1 -0
  580. package/src/shape/line/hvh.ts +1 -0
  581. package/src/shape/line/line.ts +1 -0
  582. package/src/shape/line/smooth.ts +1 -0
  583. package/src/shape/line/vh.ts +1 -0
  584. package/src/shape/lineXY/line.ts +1 -0
  585. package/src/shape/link/arc.ts +1 -0
  586. package/src/shape/link/link.ts +1 -0
  587. package/src/shape/link/smooth.ts +1 -0
  588. package/src/shape/link/vhv.ts +1 -0
  589. package/src/shape/path/hollow.ts +1 -0
  590. package/src/shape/path/path.ts +1 -0
  591. package/src/shape/point/bowtie.ts +1 -0
  592. package/src/shape/point/color.ts +4 -4
  593. package/src/shape/point/cross.ts +1 -0
  594. package/src/shape/point/diamond.ts +1 -0
  595. package/src/shape/point/hexagon.ts +1 -0
  596. package/src/shape/point/hollow.ts +1 -0
  597. package/src/shape/point/hollowBowtie.ts +1 -0
  598. package/src/shape/point/hollowDiamond.ts +1 -0
  599. package/src/shape/point/hollowHexagon.ts +1 -0
  600. package/src/shape/point/hollowSquare.ts +1 -0
  601. package/src/shape/point/hollowTriangle.ts +1 -0
  602. package/src/shape/point/hollowTriangleDown.ts +1 -0
  603. package/src/shape/point/hyphen.ts +1 -0
  604. package/src/shape/point/line.ts +1 -0
  605. package/src/shape/point/plus.ts +1 -0
  606. package/src/shape/point/point.ts +1 -0
  607. package/src/shape/point/square.ts +1 -0
  608. package/src/shape/point/tick.ts +1 -0
  609. package/src/shape/point/triangle.ts +1 -0
  610. package/src/shape/point/triangleDown.ts +1 -0
  611. package/src/shape/polygon/polygon.ts +1 -0
  612. package/src/shape/polygon/ribbon.ts +1 -0
  613. package/src/shape/shape/shape.ts +1 -0
  614. package/src/shape/text/advance.ts +3 -2
  615. package/src/shape/text/badge.ts +1 -0
  616. package/src/shape/text/text.ts +2 -1
  617. package/src/shape/utils.ts +4 -22
  618. package/src/shape/vector/vector.ts +1 -0
  619. package/src/spec/component.ts +10 -9
  620. package/src/spec/coordinateTransform.ts +1 -1
  621. package/src/spec/interaction.ts +3 -0
  622. package/src/spec/scale.ts +3 -2
  623. package/src/spec/theme.ts +22 -2
  624. package/src/stdlib/index.ts +3 -3
  625. package/src/theme/academy.ts +77 -78
  626. package/src/theme/{light.ts → classic.ts} +80 -90
  627. package/src/theme/{dark.ts → classicDark.ts} +78 -88
  628. package/src/theme/index.ts +2 -2
  629. package/src/transform/filter.ts +4 -1
  630. package/src/utils/event.ts +47 -15
  631. package/src/utils/helper.ts +2 -1
  632. package/src/utils/marker.ts +293 -0
  633. package/src/utils/style.ts +34 -0
  634. package/esm/shape/point/symbol.d.ts +0 -49
  635. package/esm/shape/point/symbol.js +0 -143
  636. package/esm/shape/point/symbol.js.map +0 -1
  637. package/esm/theme/dark.d.ts +0 -6
  638. package/esm/theme/dark.js.map +0 -1
  639. package/esm/theme/light.d.ts +0 -6
  640. package/esm/theme/light.js.map +0 -1
  641. package/lib/shape/point/symbol.d.ts +0 -49
  642. package/lib/shape/point/symbol.js +0 -158
  643. package/lib/shape/point/symbol.js.map +0 -1
  644. package/lib/theme/dark.d.ts +0 -6
  645. package/lib/theme/dark.js.map +0 -1
  646. package/lib/theme/light.d.ts +0 -6
  647. package/lib/theme/light.js.map +0 -1
  648. package/src/shape/point/symbol.ts +0 -154
@@ -1,10 +1,10 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(m,U,S){"use strict";const j="main-layer",at="label-layer",ot="element",G="view",st="plot",lt="component",ct="label",ut="area";var N="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(B(e,r,n),0<a(e[i],f)&&B(e,r,i);h<d;){for(B(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||X(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];z(i,t.leaf?r(o):o)}return i}function z(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function W(t,e){return t.minX-e.minX}function H(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function $(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function X(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(C(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if($(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;$(t,s)&&(e.leaf?n.push(o):Y(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if($(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if($(t,a)){if(e.leaf||Y(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=X([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!Y(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=X(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=X([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}F(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=V(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=X(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=X([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=D(t,0,c,this.toBBox),f=D(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=V(u)+V(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:W,i=t.leaf?this.compareMinY:H;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];z(o,t.leaf?i(f):f),s+=q(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():F(t[e],this.toBBox)};var Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var tt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new Q(16);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,O=i*c-a*l,k=u*g-f*p,M=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,L=m*A-v*E+b*S+x*_-w*M+O*k;return L?(t[0]=(s*A-l*E+c*S)*(L=1/L),t[1]=(i*E-r*A-a*S)*L,t[2]=(g*O-y*w+e*x)*L,t[3]=(h*w-f*O-d*x)*L,t[4]=(l*_-o*A-c*M)*L,t[5]=(n*A-i*_+a*M)*L,t[6]=(y*b-p*O-e*v)*L,t[7]=(u*O-h*b+d*v)*L,t[8]=(o*E-s*_+c*k)*L,t[9]=(r*_-n*E-a*k)*L,t[10]=(p*w-g*b+e*m)*L,t[11]=(f*b-u*w-d*m)*L,t[12]=(s*M-o*S-l*k)*L,t[13]=(n*S-r*M+i*k)*L,t[14]=(g*v-p*x-y*m)*L,t[15]=(u*x-f*v+h*m)*L,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function Ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function kt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Mt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new Q(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Tt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Pt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Pt;function Nt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Rt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new Q(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new Q(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,O,k,M=r[0],_=r[1],r=r[2],S=Math.hypot(M,_,r);return S<Z?null:(M*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=M*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+M*S,w=M*r*i+_*S,O=_*r*i-M*S,k=r*r*i+n,t[0]=a*(n=M*M*i+n)+c*(m=_*M*i+r*S)+d*(r=r*M*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*O+d*k,t[9]=o*w+u*O+p*k,t[10]=s*w+f*O+g*k,t[11]=l*w+h*O+y*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:Ot,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:kt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Mt,fromQuat2:function(t,e){var n=new Q(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),Mt(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Tt,perspective:Tt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Pt,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Nt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ct,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],O=e[5],k=e[6],M=e[7],_=e[8],S=e[9],E=e[10],A=e[11],L=e[12],T=e[13],P=e[14],e=e[15];return Math.abs(n-m)<=Z*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-O)<=Z*Math.max(1,Math.abs(s),Math.abs(O))&&Math.abs(l-k)<=Z*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-M)<=Z*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-P)<=Z*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Ct});function Bt(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function Ft(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2]}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function $t(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Ut(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Xt=It;function Kt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Qt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}Bt(),Kt();var re=function(t,e,n,r){var i=new Q(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function le(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ce(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ue(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function fe(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function he(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}Bt(),Ft(1,0,0),Ft(0,1,0),Qt(),Qt(),J();var de=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function pe(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new Q(2),Q!=Float32Array&&(e[0]=0,e[1]=0);var ge=function(t,e){return(ge=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ge(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function et(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ye(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function me(r,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function t(n){return function(t){var e=[n,t];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&e[c=0]?0:l;)try{if(a=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,o=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3]))l.label=e[1];else if(6===e[0]&&l.label<s[1])l.label=s[1],s=e;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(e)}}e=i.call(r,l)}catch(t){e=[6,t],o=0}finally{a=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}function ve(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function O(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function be(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function ke(t){return Oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Me(t){return ke(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function _e(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,we[n]))),we[n]););}function Se(t){return 48<=t&&t<=57}function Ee(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ae(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Ee(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Se(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&Se(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Se(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Se(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Se(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Se(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Ee(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Ee(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}_e(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Le=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Te(t){var o,s,l,c;return ke(t)?pe(t):(t=function(t){if(Oe(t))return pe(t);var e=new Le(t);for(Ee(e);e.index<e.max&&!e.err.length;)Ae(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Pe(t){if(Me(t))return pe(t);for(var e,n,r,i,a,o,s,l=Te(t),c=v({},xe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function je(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ne(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ce(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Re(t,e,n,r,i){var a=Ce([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=Ne([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Be(t,e,n,r){var t=[t,e],e=[n,r],i=Ne(t,e,.5),e=Ne(e,i,.5),a=Ne(i,e,.5),o=Ne(e,a,.5),s=Ne(a,o,.5),t=Re(t[0],t[1],i[0],i[1],a[0]).point,i=Re(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Ie(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=je(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=je(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var O=[],k=0,M=(d=b.concat(x,w,d)).length;k<M;k+=1)O[k]=k%2?je(d[k-1],d[k],h).y:je(d[k],d[k+1],h).x;return O}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Be(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Be(h,d,p,g))}return t}function Fe(t,e){var n;if(void 0===e&&(e=!1),Me(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=pe(t),e?[n,[]]:n;for(var r,i=Pe(t),a=v({},xe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Ie(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function De(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var O,k,M,_,S,E,A,L,T,P,j=0;j<=d;j+=1)O=t,k=e,M=n,_=r,S=i,E=a,A=o,L=s,P=void 0,P=1-(T=j/d),g=(O={x:Math.pow(P,3)*O+3*Math.pow(P,2)*T*M+3*P*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(P,3)*k+3*Math.pow(P,2)*T*_+3*P*Math.pow(T,2)*E+Math.pow(T,3)*L}).x,y=O.y,f&&w.push({x:g,y:y}),h&&(m+=Ce(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(M=(m-l)/(m-v[2]),x={x:b[0]*(1-M)+v[0]*M,y:b[1]*(1-M)+v[1]*M}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function ze(t){return(c=l=s=0)<=Fe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function We(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?De(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=Ne(n,i,r),i=Ne(i,a,r),a=Ne(a,e,r),o=Ne(n,i,r),i=Ne(i,a,r),r=Ne(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ge=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},He=function(t){return"function"==typeof t},b=function(t){return null==t},Ve={}.toString,qe=function(t,e){return Ve.call(t)==="[object "+e+"]"},Ye=function(t){return Array.isArray?Array.isArray(t):qe(t,"Array")},$e=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Ue(t,e){if(t)if(Ye(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if($e(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Xe=function(t){return"object"==typeof t&&null!==t},Ke=function(t){if(!Xe(t)||!qe(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Ze=function(t){if(Ye(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Qe=function(t){if(Ye(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Je=function(t){return qe(t,"String")},tn=function(t,e,n){return t<e?e:n<t?n:t},en=function(t){return qe(t,"Number")};var nn=function(t,e){return(t%e+e)%e},rn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Ue(n,function(t,e){He(n)&&"prototype"===e||r.push(t)}),r};var an=function(t){return qe(t,"Boolean")},on=function(t){return void 0===t},sn=function(t){return t instanceof Element||t instanceof HTMLDocument};function ln(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function cn(t,e,n,r){return e&&ln(t,e),n&&ln(t,n),r&&ln(t,r),t}function un(t){if("object"!=typeof t||null===t)return t;if(Ye(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=un(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=un(t[i]):e[i]=t[i];return e}var fn=un;function hn(a,o){var s;if(He(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var dn=5;function pn(t,e){if(t===e)return!0;if(t&&e&&!Je(t)&&!Je(e)){if(Ge(t)||Ge(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=pn(t[r],e[r]));r++);return n}if(Xe(t)||Xe(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=pn(t[i[r]],e[i[r]]));r++);return n}}return!1}function gn(e,t){var n;return null!==e&&Ke(e)?(n={},Ue(t,function(t){xn.call(e,t)&&(n[t]=e[t])}),n):{}}function yn(){}var mn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||dn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ke(o)?(Ke(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ye(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},vn=pn,bn=function(t,e,n){for(var r=0,i=Je(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},xn=Object.prototype.hasOwnProperty;function wn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function On(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function kn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mn=/^#([0-9a-f]{3,8})$/,_n=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Sn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),En=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),An=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Ln=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Tn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jn(){return this.rgb().formatHex()}function Nn(){return this.rgb().formatRgb()}function Cn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Mn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Rn(e):3===n?new In(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Bn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Bn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_n.exec(t))?new In(e[1],e[2],e[3],1):(e=Sn.exec(t))?new In(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=En.exec(t))?Bn(e[1],e[2],e[3],e[4]):(e=An.exec(t))?Bn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ln.exec(t))?Wn(e[1],e[2]/100,e[3]/100,1):(e=Tn.exec(t))?Wn(e[1],e[2]/100,e[3]/100,e[4]):Pn.hasOwnProperty(t)?Rn(Pn[t]):"transparent"===t?new In(NaN,NaN,NaN,0):null}function Rn(t){return new In(t>>16&255,t>>8&255,255&t,1)}function Bn(t,e,n,r){return new In(t=r<=0?e=n=NaN:t,e,n,r)}function In(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Fn(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)}function Dn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function zn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Wn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Hn(t,e,n,r)}function Gn(t){var e,n,r,i,a,o,s,l;return t instanceof Hn?new Hn(t.h,t.s,t.l,t.opacity):(t=t instanceof kn?t:Cn(t))?t instanceof Hn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Hn(o,s,l,t.opacity)):new Hn}function Hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Vn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function qn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Yn(t,e){return Math.abs(t-e)<.001}function $n(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Un(t){return(t+2*Math.PI)%(2*Math.PI)}wn(kn,Cn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:jn,formatHex:jn,formatHsl:function(){return Gn(this).formatHsl()},formatRgb:Nn,toString:Nn}),wn(In,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof kn?i:Cn(i))?new In((i=i.rgb()).r,i.g,i.b,i.opacity):new In:new In(t,e,n,null==r?1:r);var i},On(kn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fn,formatHex:Fn,formatRgb:Dn,toString:Dn})),wn(Hn,function(t,e,n,r){return 1===arguments.length?Gn(t):new Hn(t,e,n,null==r?1:r)},On(kn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new In(Vn(240<=t?t-240:120+t,n,e),Vn(t,n,e),Vn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Xn={box:function(t,e,n,r){return $n([t,n],[e,r])},length:qn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?qn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?qn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(he(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Kn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=qn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=qn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=qn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Zn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Qn(t,e,n){n=t+n-2*e;return Yn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Jn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function tr(t,e,n,r,i,a,o){var s=Zn(t,n,i,o),l=Zn(e,r,a,o),c=Xn.pointAt(t,e,n,r,o),n=Xn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function er(t,e,n,r,i,a,o){return 0===o?(qn(t,e,n,r)+qn(n,r,i,a)+qn(t,e,i,a))/2:(e=(t=tr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),er.apply(void 0,e)+er.apply(void 0,n))}var nr={box:function(t,e,n,r,i,a){var o=Qn(t,n,i)[0],s=Qn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Zn(t,n,i,o)),void 0!==s&&c.push(Zn(e,r,a,s)),$n(l,c)},length:function(t,e,n,r,i,a){return er(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Kn([t,n,i],[e,r,a],o,s,Zn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return qn(t.x,t.y,o,s)},interpolationAt:Zn,pointAt:function(t,e,n,r,i,a,o){return{x:Zn(t,n,i,o),y:Zn(e,r,a,o)}},divide:tr,tangentAngle:function(t,e,n,r,i,a,o){t=Jn(t,n,i,o),n=Jn(e,r,a,o);return Un(Math.atan2(n,t))}};function rr(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function ir(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function ar(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Yn(r,0)?Yn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Yn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function or(t,e,n,r,i,a,o,s,l){var c=rr(t,n,i,o,l),u=rr(e,r,a,s,l),f=Xn.pointAt(t,e,n,r,l),n=Xn.pointAt(n,r,i,a,l),r=Xn.pointAt(i,a,o,s,l),i=Xn.pointAt(f.x,f.y,n.x,n.y,l),a=Xn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function sr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=qn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=or(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return sr.apply(void 0,e)+sr.apply(void 0,n)}var lr={extrema:ar,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=ar(t,n,i,o),f=ar(e,r,a,s),h=0;h<u.length;h++)l.push(rr(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(rr(e,r,a,s,f[d]));return $n(l,c)},length:function(t,e,n,r,i,a,o,s){return sr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Kn([t,n,i,o],[e,r,a,s],l,c,rr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return qn(t.x,t.y,l,c)},interpolationAt:rr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:rr(t,n,i,o,l),y:rr(e,r,a,s,l)}},divide:or,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ir(t,n,i,o,l),n=ir(e,r,a,s,l);return Un(Math.atan2(n,t))}};function cr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var ur=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+cr(d,n),y:e+cr(p,r)}};function fr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function hr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function dr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function pr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var gr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=fr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var O=hr(0,e,n,r,i,v[w]);O<y&&(y=O),m<O&&(m=O)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=pr(s-t,l-e,-i),l=s[0],s=s[1],l=ur(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=dr(n,r,a):o<c&&(l=dr(n,r,o)),pr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return qn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:fr(t,0,n,r,i,o),y:hr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Un(Math.atan2(i,s))}};function yr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=qn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var mr,vr,br={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return $n(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=qn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=yr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Xn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Xn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=yr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function xr(){}function wr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Or(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new wr(n,r||t,i),r=vr?vr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function kr(t,e){0==--t._eventsCount?t._events=new xr:delete t._events[e]}function Mr(){this._events=new xr,this._eventsCount=0}r=e,mr=Object.prototype.hasOwnProperty,vr="~",Object.create&&(xr.prototype=Object.create(null),(new xr).__proto__||(vr=!1)),Mr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)mr.call(t,e)&&n.push(vr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Mr.prototype.listeners=function(t){var t=vr?vr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Mr.prototype.listenerCount=function(t){t=vr?vr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Mr.prototype.emit=function(t,e,n,r,i,a){var o=vr?vr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},Mr.prototype.on=function(t,e,n){return Or(this,t,e,n,!1)},Mr.prototype.once=function(t,e,n){return Or(this,t,e,n,!0)},Mr.prototype.removeListener=function(t,e,n,r){t=vr?vr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||kr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:kr(this,t)}}else kr(this,t);return this},Mr.prototype.removeAllListeners=function(t){return t?(t=vr?vr+t:t,this._events[t]&&kr(this,t)):(this._events=new xr,this._eventsCount=0),this},Mr.prototype.off=Mr.prototype.removeListener,Mr.prototype.addListener=Mr.prototype.on,Mr.prefixed=vr,r.exports=Mr.EventEmitter=Mr;var _r=e.exports;function Sr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Sr.Cache||Map),l}(n=u=u||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",Sr.Cache=Map;var Er=Sr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Ar(t){return"function"==typeof t}var Lr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Tr=Sr(function(t){var t=Er(t),e=Lr[t];return(null==e?void 0:e.alias)||t});var s,Pr,jr,Nr,Cr="Method not implemented.";function Rr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Br(t,e,n){e&&Rr(t.prototype,e),n&&Rr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Ir(){return(Ir=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Fr(t,e){t.prototype=Object.create(e.prototype),Dr(t.prototype.constructor=t,e)}function Dr(t,e){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Wr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r=s=s||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=Pr=Pr||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=jr=jr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=Nr=Nr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Hr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Vr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}function qr(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function Yr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return Pr.kUNumber;case s.kPercentage:return Pr.kUPercent;case s.kPixels:return Pr.kULength;case s.kMilliseconds:case s.kSeconds:return Pr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return Pr.kUAngle;default:return Pr.kUOther}}(t)){case Pr.kUNumber:return s.kNumber;case Pr.kULength:return s.kPixels;case Pr.kUPercent:return s.kPercentage;case Pr.kUTime:return s.kSeconds;case Pr.kUAngle:return s.kDegrees;default:return s.kUnknown}}function $r(t){return ai[t]||(ai[t]=new Jr(t)),ai[t]}var Ur,Xr,Kr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],Zr=((e=Ur=Ur||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Kr.find(function(t){return t.name===e}).unit_type}),n=function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(jr.kNo,Nr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ur.kUnitType&&this.getType()<=Ur.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}Fr(t,n);var e=t.prototype;return e.getType=function(){return Ur.kColorType},e.to=function(t){return this},t}(n),Qr=((e=Xr=Xr||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}Fr(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Ur.kColorType},t}(n)),Jr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}Fr(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ur.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n),ti=function(i){function n(t,e){var n,r;return void 0===e&&(e=s.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?s.kNumber:"percent"===r||"%"===r?s.kPercentage:Zr(r):s.kUnknown:e,n.unit=r,n.value=t,n}Fr(n,i);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ur.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Yr(this.unit))!==Yr(t)||e===s.kUnknown?null:(e=Hr(this.unit)/Hr(t),new n(this.value*e,t))},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Vr(this.unit);i=a<-999999||999999<a?(r=Vr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?qr(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),ei=new ti(0,"px"),ni=(new ti(1,"px"),new ti(0,"deg")),ri=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}Fr(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(r),ii=new Jr("unset"),e=new Jr("initial"),n=new Jr("inherit"),ai={"":ii,unset:ii,initial:e,inherit:n},oi=new ri(0,0,0,0,!0),si=new ri(0,0,0,0),li=Sr(function(t,e,n,r){return new ri(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ci=function(t,e){return void 0===e&&(e=s.kNumber),new ti(t,e)},ui=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,fi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,hi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,di=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var pi={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},gi=Sr(function(t){t="angular"===t.type?Number(t.value):pi[t.value]||0;return ci(t,"deg")}),yi=Sr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ci(n,i),cy:ci(r,a)}}),mi=Sr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return ao(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!b(c)&&!b(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ci(Number(t.length.value),"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Qr(Xr.LinearGradient,{angle:n?gi(n):ni,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=yi(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?$r(n):ci(n,f)),new Qr(Xr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ui.exec(t);if(n)return r=(null==(r=n[2].match(di))?void 0:r.map(function(t){return t.split(":")}))||[],[new Qr(Xr.LinearGradient,{angle:ci(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=fi.exec(t);if(t)return t=(null==(t=t[4].match(di))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ci(50,"%"),cy:ci(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Je(n))return[new Qr(Xr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=hi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function vi(t){return $e(t)&&!b(t.r)&&!b(t.g)&&!b(t.b)}var x,bi=Sr(function(t){var e;return $e(e=t)&&e.image?Ir({repetition:"repeat"},t):"transparent"===(t=b(t)?"":t)?si:mi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Cn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),li.apply(void 0,e))});function xi(t,e){if(vi(t)&&vi(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(tn(e[n],0,255));return e[3]=tn(e[3],0,1),"rgba("+e.join(",")+")"}]}function wi(t,e){if(b(e))return ci(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ci(Number(e),"px");if(0<="deg".search(t))return ci(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ci(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}(r=x=x||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";var Oi=Sr(function(t){return wi(new RegExp("px","g"),t)}),ki=(Sr(function(t){return wi(new RegExp("%","g"),t)}),function(t){return en(t)||isFinite(Number(t))?ci(Number(t),"px"):wi(new RegExp("px|%|em|rem","g"),t)}),Mi=Sr(function(t){return wi(new RegExp("deg|rad|grad|turn","g"),t)});function _i(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=$a(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Si(t){return Je(t)?t.split(" ").map(function(t){return ki(t)}):t.map(function(t){return ki(t.toString())})}function Ei(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Zo.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Ai=function(t){return wi(/deg|rad|grad|turn|px|%/g,t)},Li=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ti(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Li.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ai(t)||bi(t)})}),n.lastIndex===t.length)return r}return[]}function Pi(t){return t.toString()}var ji=Sr(function(t){return"number"==typeof t?ci(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ci(Number(t)):ci(0)});function Ni(t,e){return[t,e,Pi]}function Ci(n,r){return function(t,e){return[t,e,function(t){return Pi(tn(t,n,r))}]}}function Ri(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Sr(function(t){return(Je(t)?t.split(" "):t).map(ji)});var Bi=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Pe(e)}catch(t){n=Pe(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=nn(Ya(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Ro([1,0],p),f=Ro(p,u);Co(p,u)<=-1&&(f=Math.PI);1<=Co(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:Eo(t,[c,e])?0:n,ry:Eo(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Eo(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Lo((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=Lo((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=jo(u,0),b=g.x,y=g.y,c=jo(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=nr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=lr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=gr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Qe(n),d=Qe(r),p=Ze(n),g=Ze(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===h?(b=Ao(m,e),h-=b.xExtra):v[0]===p&&(b=Ao(m,e),p+=b.xExtra),v[1]===d?(b=Ao(m,e),d-=b.yExtra):v[1]===g&&(b=Ao(m,e),g+=b.yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Ii=Sr(Bi);function Fi(t,e){t=(Je(t)?Ii:Bi)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Di(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Fe(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Fe(e.absolutePath,!1),e.curve=d),[h,d]),h=ze((t=h.length!==d.length?function t(e,n,r){var i,e=We(e),n=We(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==ze(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):pe(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Ce(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function zi(t,e){var n,r,i=Je(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=br.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Xn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Wi=null;function Gi(t){return function(e){var n=0;return t.map(function(t){return t===Wi?e[n++]:t})}}function Hi(t){return t}var Vi={matrix:["NNNNNN",[Wi,Wi,0,0,Wi,Wi,0,0,0,0,1,0,Wi,Wi,0,1],Hi],matrix3d:["NNNNNNNNNNNNNNNN",Hi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Gi([Wi,Wi,new ti(1)]),Hi],scalex:["N",Gi([Wi,new ti(1),new ti(1)]),Gi([Wi,new ti(1)])],scaley:["N",Gi([new ti(1),Wi,new ti(1)]),Gi([new ti(1),Wi])],scalez:["N",Gi([new ti(1),new ti(1),Wi])],scale3d:["NNN",Hi],skew:["Aa",null,Hi],skewx:["A",null,Gi([Wi,ni])],skewy:["A",null,Gi([ni,Wi])],translate:["Tt",Gi([Wi,Wi,ei]),Hi],translatex:["T",Gi([Wi,ei,ei]),Gi([Wi,ei])],translatey:["T",Gi([ei,Wi,ei]),Gi([ei,Wi])],translatez:["L",Gi([ei,ei,Wi])],translate3d:["TTL",Hi]};function qi(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Vi[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?ni:Mi(t)},N:ji,T:ki,L:Oi}[h.toUpperCase()](f):{a:ni,n:c[0],t:ei}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Yi(t){switch(t.t){case"rotatex":return i=Ya(_i(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Ya(_i(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Ya(_i(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Ya(_i(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=Ya(_i(t.d[0])),a=Ya(_i(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Ya(_i(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Ya(_i(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,n=Ei(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Ei(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Ei(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,n=Ei(t.d[1],0,null)||0,r=Ei(t.d[2],0,null)||0,1];case"perspective":a=Ei(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function $i(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ui(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Ka,t))return;if(ht(Za,Ka),Za[3]=0,Za[7]=0,Za[11]=0,Za[15]=1,Math.abs(mt(Za))<1e-8)return;var t=Ka[3],o=Ka[7],s=Ka[11],l=Ka[12],c=Ka[13],u=Ka[14],f=Ka[15];if(0!==t||0!==o||0!==s){if(Qa[0]=t,Qa[1]=o,Qa[2]=s,Qa[3]=f,!yt(Za,Za))return;gt(Za,Za),Zt(i,Qa,Za)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,Ka),n[0]=It(d[0]),Ht(d[0],d[0]),r[0]=Vt(d[0],d[1]),to(d[1],d[1],d[0],1,-r[0]),n[1]=It(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),to(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),to(d[2],d[2],d[1],1,-r[2]),n[2]=It(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(Ja,d[1],d[2]),Vt(d[0],Ja)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Yi).reduce($i),e,n,r,i,a),[[e,n,r,a,i]]}var Xi=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=Ki(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=Ki(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=Ki(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=Ki(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function Ki(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Zi(t){return t.toFixed(6).replace(".000000","")}function Qi(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ui(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ui(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=tn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Xi(t[0],t[1],t[2],e,t[4]).map(Zi).join(",")}])}function Ji(t){return t.replace(/[xy]/,"")}function ta(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var ea=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function na(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ci(n):ci(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Qi(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Vi[u],g=Vi[f],y=void 0;if(ea(u,f)){var m=Qi([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&Ji(u)===Ji(f))y=Ji(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||ta(u)!==ta(f)){m=Qi(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=ta(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var O=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Yr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Vr(t.unit)):(ti.isLength(t.unit)||ti.isLength(e.unit))&&(o=Ei(t,i,n),s=Ei(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=O[0],b[w]=O[1],x.push(O[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var ra=Sr(function(t){var e;return Je(t)?"text-anchor"===t?[ci(0,"px"),ci(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[ki(ia(e[0])),ki(ia(e[1]))]):[ci(t[0]||0,"px"),ci(t[1]||0,"px")]});function ia(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=Mi,this.mixer=Ni}return t.prototype.calculator=function(t,e,n,r){return _i(n)},t}(),n=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Jr&&(n=null),k.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&k.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=bi,this.mixer=xi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Jr?"none"===n.value?oi:si:n},t}(),aa=function(){function t(){this.parser=Ti}return t.prototype.calculator=function(t,e,n){return n instanceof Jr?[]:n},t}();function oa(t){t=t.parsedStyle.fontSize;return b(t)?null:t}function sa(){this.parser=ra}var la=function(){function t(){this.parser=ki,this.mixer=Ni}return t.prototype.calculator=function(t,e,n,r,i){if(en(n))return n;if(!ti.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=oa(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=oa(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ca=function(){function t(){this.mixer=Ri}var e=t.prototype;return e.parser=function(t){t=Si(en(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ua=function(){function t(){this.mixer=Ri}var e=t.prototype;return e.parser=function(t){t=Si(en(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),a=function(t){function e(){return t.apply(this,arguments)||this}return Fr(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;b(a)||(l=a),b(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:b(t.parsedStyle.x)||(l=t.parsedStyle.x),b(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),b(l)&&b(c)&&b(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?no(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(b(l)?n:l,b(c)?r:c,b(u)?e:u)))},e}(la),fa=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Jr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),o=function(){function t(){this.mixer=Ni,this.parser=ji}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ha=function(){function t(){this.parser=ji,this.mixer=Ci(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),da=function(){function t(){this.parser=ji,this.mixer=Ci(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),pa=function(){function t(){this.parser=Fi,this.mixer=Di}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Jr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ts(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===x.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),ga=function(){function t(){this.parser=zi}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),ya=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Ci(0,1/0),t}return Fr(t,i),t}(la),ma=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Jr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),va=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),ba=function(){function t(){this.parser=qi,this.mixer=na}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Jr?[]:n},e.postProcessor=function(t){no(t.parsedStyle.transform,t)},t}(),xa=function(){function t(){this.parser=ji}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),wa=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}();var Oa,ka,Ma=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new wa,this.page=new wa,this.canvas=new wa,this.viewport=new wa,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Cr)},Br(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),_a=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(zr(n),e),n}return Fr(t,r),t}(Ma),Sa=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}Fr(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Cr)},t.lookupNamespaceURI=function(t){throw new Error(Cr)},t.lookupPrefix=function(t){throw new Error(Cr)},t.normalize=function(){throw new Error(Cr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},Br(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Gr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new _r}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=an(n)&&n||$e(n)&&n.capture,n=$e(n)&&n.once,s=Ar(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Ar(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=an(n)&&n||$e(n)&&n.capture,i=Ar(e)?void 0:e;return e=Ar(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new _a(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),Ea=(Sa.DOCUMENT_POSITION_DISCONNECTED=1,Sa.DOCUMENT_POSITION_PRECEDING=2,Sa.DOCUMENT_POSITION_FOLLOWING=4,Sa.DOCUMENT_POSITION_CONTAINS=8,Sa.DOCUMENT_POSITION_CONTAINED_BY=16,Sa.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Oa=Oa||{},Oa[Oa.Standard=0]="Standard",(l=ka=ka||{}).DESTROY="destroy",l.ATTR_MODIFIED="DOMAttrModified",l.INSERTED="DOMNodeInserted",l.REMOVED="removed",l.MOUNTED="DOMNodeInsertedIntoDocument",l.UNMOUNTED="DOMNodeRemovedFromDocument",l.BOUNDS_CHANGED="bounds-changed",l.RENDER_ORDER_CHANGED="render-order-changed",l.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return Fr(t,c),t}(Ma)),Aa=(Ea.ADDITION=2,Ea.MODIFICATION=1,Ea.REMOVAL=3,0),La=new Ea(ka.INSERTED,null,"","","",0,"",""),Ta=new Ea(ka.REMOVED,null,"","","",0,"",""),Pa=new _a(ka.DESTROY),l=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=Aa++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Oa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:ft(),localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:ft(),origin:[0,0,0]},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ii,opacity:ii,fillOpacity:ii,strokeOpacity:ii,fill:ii,stroke:ii,transform:ii,transformOrigin:ii,visibility:ii,pointerEvents:ii,lineWidth:ii,lineCap:ii,lineJoin:ii,increasedLineWidthForHitTesting:ii,fontSize:ii,fontFamily:ii,fontStyle:ii,fontWeight:ii,fontVariant:ii,textAlign:ii,textBaseline:ii,textTransform:ii,zIndex:ii,filter:ii,shadowType:ii},t.parsedStyle={},t.attributes={},t}Fr(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Cr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return k.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),La.relatedNode=this,t.dispatchEvent(La),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Ta.relatedNode=this,t.dispatchEvent(Ta),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),k.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return k.sceneGraphService.matches(t,this)},e.getElementById=function(t){return k.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return k.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return k.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return k.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return k.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(k.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Pa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return k.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return k.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return k.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return k.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return k.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e;return"symbol"==typeof t||void 0===(e=this.attributes[t])&&(t=Tr(t),e=this.attributes[t],b(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Cr)},e.getAttributeNode=function(t){throw new Error(Cr)},e.getAttributeNodeNS=function(t,e){throw new Error(Cr)},e.hasAttributeNS=function(t,e){throw new Error(Cr)},e.removeAttributeNS=function(t,e){throw new Error(Cr)},e.removeAttributeNode=function(t){throw new Error(Cr)},e.setAttributeNS=function(t,e,n){throw new Error(Cr)},e.setAttributeNode=function(t){throw new Error(Cr)},e.setAttributeNodeNS=function(t){throw new Error(Cr)},e.toggleAttribute=function(t,e){throw new Error(Cr)},Br(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Sa);var ja=new Ea(ka.ATTR_MODIFIED,null,null,null,null,Ea.MODIFICATION,null,null),Na={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Ca={anchor:[0,0],fill:oi,stroke:oi,transform:[],zIndex:0,filter:[],shadowType:"outer"},Ra=Ir({},Ca,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),Ba=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),Ia=function(i){function t(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||x.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,k.enableCSSParsing?Ca:Ra,r.config.initialParsedStyle),k.enableCSSParsing&&Object.assign(r.attributes,Na),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),k.displayObjectPool.add(r.entity,zr(r)),r}Fr(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),k.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r,i=Ir({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},e.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};k.enableCSSParsing&&(n.usedAttributes=Ba),k.styleValueRegistry.processProperties(this,t,n),e.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Tr(t);on(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(k.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(ja.relatedNode=this,ja.prevValue=i,ja.newValue=e,ja.attrName=t,ja.prevParsedValue=a,ja.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(ja):(ja.target=this).ownerDocument.defaultView.dispatchEvent(ja,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new ts(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return k.sceneGraphService.setOrigin(this,qa(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return k.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return k.sceneGraphService.setPosition(this,qa(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return k.sceneGraphService.setLocalPosition(this,qa(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return k.sceneGraphService.translate(this,qa(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return k.sceneGraphService.translateLocal(this,qa(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return k.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return k.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=qa(t,e=e||t,n=n||t)),k.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=qa(t,e=e||t,n=n||t)),k.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return k.sceneGraphService.getLocalScale(this)},e.getScale=function(){return k.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return $a(Ua(Bt(),k.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return $a(Ua(Bt(),k.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return k.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return k.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotateLocal(this,0,0,t):k.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return b(e)&&b(n)?k.sceneGraphService.rotate(this,0,0,t):k.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return k.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return k.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return k.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return k.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return k.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return k.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return k.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return k.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return k.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){k.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},e.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},e.getConfig=function(){return this.config},e.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?$e(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(Bt(),t),n=e[0],e=e[1],r=St(Bt(),t),i=r[0],r=r[1],t=Et(Qt(),t),t=Ua(Bt(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new Q(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=Xa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},e.setLocalMatrix=function(t){var t=Xa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},e.show=function(){this.style.visibility="visible"},e.hide=function(){this.style.visibility="hidden"},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},Br(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(l),Fa={},Da=[],Ma=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Fa[t]},e.getAll=function(){return Object.keys(Fa).map(function(t){return Fa[t]})},e.add=function(t,e){(Fa[t]=e).nodeName===x.HTML&&Da.push(e)},e.remove=function(t){var e=Fa[t];e&&(delete Fa[t],e.nodeName===x.HTML)&&(t=Da.indexOf(e),Da.splice(t,1))},e.getHTMLs=function(){return Da},t}();function za(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wa(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function Ga(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ha(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Va(t){return void 0===t?0:360<t||t<-360?t%360:t}function qa(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),en(t)?Ft(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new Q(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):Ft(t[0],t[1]||e,t[2]||n)}function Ya(t){return t*(Math.PI/180)}function $a(t){return t*(180/Math.PI)}function Ua(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(Bt(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Xa(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=$a(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ka=ft(),Za=ft(),Qa=Kt(),d=[Bt(),Bt(),Bt()],Ja=Bt();function to(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var eo=ft();function no(t,l){var c,u;t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new Ia({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ei,ei],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ei],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ei],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ei],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ei,ei,ei],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[ni],l.rotateLocal(0,0,_i(o[0]))):"rotatex"===s?(o=t||[ni],l.rotateLocal(_i(o[0]),0,0)):"rotatey"===s?(o=t||[ni],l.rotateLocal(0,_i(o[0]),0)):"rotatez"===s?(o=t||[ni],l.rotateLocal(0,0,_i(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Ya(o[0]),Ya(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Ya(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Ya(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(dt(eo,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Rt,[eo].concat(t.map(function(t){return t.value}))),eo[12]+=c,eo[13]+=u,l.setLocalTransform(eo)))})),l.getLocalTransform()}ro={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},io="";var ro,io,ao=function(t){return io=t,so()};function oo(t){throw new Error(io+": "+t)}function so(){var t=vo(lo);return 0<io.length&&oo("Invalid input not EOF"),t}function lo(){return co("linear-gradient",ro.linearGradient,fo)||co("repeating-linear-gradient",ro.repeatingLinearGradient,fo)||co("radial-gradient",ro.radialGradient,ho)||co("repeating-radial-gradient",ro.repeatingRadialGradient,ho)||co("conic-gradient",ro.conicGradient,ho)}function co(n,t,r){return uo(t,function(t){var e=r();return e&&!_o(ro.comma)&&oo("Missing comma before color stops"),{type:n,orientation:e,colorStops:vo(bo)}})}function uo(t,e){t=_o(t);if(t)return _o(ro.startCall)||oo("Missing ("),e=e(t),_o(ro.endCall)||oo("Missing )"),e}function fo(){return Mo("directional",ro.sideOrCorner,1)||Mo("angular",ro.angleValue,1)}function ho(){var t,e,n=po();return n&&((t=[]).push(n),e=io,_o(ro.comma))&&((n=po())?t.push(n):io=e),t}function po(){var t,e=function(){var t=Mo("shape",/^(circle)/i,0);t&&(t.style=ko()||go());return t}()||function(){var t=Mo("shape",/^(ellipse)/i,0);t&&(t.style=wo()||go());return t}();return e?e.at=yo():(t=go())?(e=t,(t=yo())&&(e.at=t)):(t=mo())&&(e={type:"default-radial",at:t}),e}function go(){return Mo("extent-keyword",ro.extentKeywords,1)}function yo(){var t;if(Mo("position",/^at/,0))return(t=mo())||oo("Missing positioning value"),t}function mo(){var t={x:wo(),y:wo()};if(t.x||t.y)return{type:"position",value:t}}function vo(t){var e=t(),n=[];if(e)for(n.push(e);_o(ro.comma);)(e=t())?n.push(e):oo("One extra comma");return n}function bo(){var t=Mo("hex",ro.hexColor,1)||uo(ro.rgbaColor,function(){return{type:"rgba",value:vo(xo)}})||uo(ro.rgbColor,function(){return{type:"rgb",value:vo(xo)}})||Mo("literal",ro.literalColor,0);return t||oo("Expected color definition"),t.length=wo(),t}function xo(){return _o(ro.number)[1]}function wo(){return Mo("%",ro.percentageValue,1)||Oo()||ko()}function Oo(){return Mo("position-keyword",ro.positionKeywords,1)}function ko(){return Mo("px",ro.pixelValue,1)||Mo("em",ro.emValue,1)}function Mo(t,e,n){e=_o(e);if(e)return{type:t,value:e[n]}}function _o(t){var e=/^[\n\r\t\s]+/.exec(io),e=(e&&So(e[0].length),t.exec(io));return e&&So(e[0].length),e}function So(t){io=io.substring(t)}function Eo(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ao(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Lo(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function To(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Ya(r=nn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Po({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Po(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Po=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function jo(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=To({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=To({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function No(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Co(t,e){return No(t)*No(e)?(t[0]*e[0]+t[1]*e[1])/(No(t)*No(e)):1}function Ro(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Co(t,e))}Sa=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Gr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return Fr(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(Sa)),new(function(t){function e(){return t.apply(this,arguments)||this}return Fr(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(Sa)),new(function(t){function e(){return t.apply(this,arguments)||this}return Fr(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(Sa));new(function(t){function e(){return t.apply(this,arguments)||this}return Fr(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(Sa));var Bo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Io=/([\"\'])[^\'\"]+\1/;function Fo(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-Ko)?0:16-e,r=qo();return Xo[r]=t,1<Object.keys(Xo).length||setTimeout(function(){Ko=n;var e=Xo;Xo={},Object.keys(e).forEach(function(t){return e[t](Uo())})},e),r}function Do(t){delete Xo[t]}function zo(t){return"string"!=typeof t?Fo:""===t?Yo.requestAnimationFrame:Yo[t+"RequestAnimationFrame"]}var Wo,Go,Ho,Vo=1,qo=function(){return Vo++},Yo="object"==typeof self&&self.self==self?self:"object"==typeof N&&N.global==N?N:{},$o=Date.now(),Uo=function(){return Yo.performance&&"function"==typeof Yo.performance.now?Yo.performance.now():Date.now()-$o},Xo={},Ko=Date.now(),l=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],zo),Sa=zo(l),l="string"!=typeof(l=l)?Do:""===l?Yo.cancelAnimationFrame:Yo[l+"CancelAnimationFrame"]||Yo[l+"CancelRequestAnimationFrame"],Zo=(Yo.requestAnimationFrame=Sa,Yo.cancelAnimationFrame=l,function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0],this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){za(this.center,t),za(this.halfExtents,e),Wa(this.min,this.center,this.halfExtents),Ga(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Ga(this.center,e,t),Ha(this.center,this.center,.5),Wa(this.halfExtents,e,t),Ha(this.halfExtents,this.halfExtents,.5),za(this.min,t),za(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),O=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+f*i[0]+h*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+y*t[2],r[1]=m*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+O*t[2],Wa(this.min,n,r),Ga(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=[0,0,0],n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=[0,0,0],i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?za([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?za([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},y}()),Qo=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ft(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Vt(t,this.normal)-this.distance},e.normalize=function(){var t,e,n,r=1/Xt(this.normal);t=this.normal,e=this.normal,n=r,t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,this.distance*=r},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Jo=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Qo)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,zt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),ts=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),es=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:u.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:u.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:u.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:u.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:u.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:u.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:u.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:u.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:u.FILTER},{n:"clipPath",syntax:u.DEFINED_PATH},{n:"textPath",syntax:u.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:u.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:u.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:u.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:u.COORDINATE},{n:"cy",int:!0,d:"0",syntax:u.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:u.COORDINATE},{n:"y",int:!0,d:"0",syntax:u.COORDINATE},{n:"z",int:!0,d:"0",syntax:u.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:u.COORDINATE},{n:"y1",int:!0,l:!0,syntax:u.COORDINATE},{n:"z1",int:!0,l:!0,syntax:u.COORDINATE},{n:"x2",int:!0,l:!0,syntax:u.COORDINATE},{n:"y2",int:!0,l:!0,syntax:u.COORDINATE},{n:"z2",int:!0,l:!0,syntax:u.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:u.PATH,p:50},{n:"points",l:!0,syntax:u.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:u.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:u.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:u.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:u.MARKER},{n:"markerEnd",syntax:u.MARKER},{n:"markerMid",syntax:u.MARKER},{n:"markerStartOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"}],ns={},rs=new WeakMap,Sa=function(){function t(){var e=this;es.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){ns[t]=e})},e.unregisterMetadata=function(t){delete ns[t]},e.getPropertySyntax=function(t){return k.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i,e,a,o,s,l=this;void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),k.enableCSSParsing?(i=(t=t).skipUpdateAttribute,e=t.skipParse,a=t.forceUpdateGeometry,t=t.usedAttributes,o=a,(s=Object.keys(r)).forEach(function(t){var e=Tr(t);i||(n.attributes[e]=r[t]),!o&&null!=(t=ns[e])&&t.l&&(o=!0)}),e||s.forEach(function(t){n.computedStyle[t]=l.parseProperty(t,n.attributes[t],n)}),null!=t&&t.length&&(s=Array.from(new Set(s.concat(t)))),["path","points","text","textTransform","anchor","transform","transformOrigin"].forEach(function(t){var e=s.indexOf(t);-1<e&&(s.splice(e,1),s.push(t))}),s.forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=l.computeProperty(t,n.computedStyle[t],n))}),o&&this.updateGeometry(n),s.forEach(function(t){t in n.parsedStyle&&l.postProcessProperty(t,n,s)}),k.enableCSSParsing&&n.children.length&&s.forEach(function(e){e in n.parsedStyle&&l.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})):(Object.assign(n.attributes,r),n.parsedStyle=Object.assign(n.parsedStyle,r),r.fill&&(n.parsedStyle.fill=bi(r.fill)),r.stroke&&(n.parsedStyle.stroke=bi(r.stroke)),(r.cx||r.cy)&&k.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n),this.updateGeometry(n))},e.parseProperty=function(t,e,n){var r,t=ns[t],i=e;return"unset"===(e=""!==e&&!b(e)?e:"unset")||"initial"===e||"inherit"===e?i=$r(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=$r(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=ns[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Jr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))b(r)||(e=this.parseProperty(t,Ar(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),b(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Jr?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=ns[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=rs.get(t);n||(rs.set(t,[]),n=rs.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=rs.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=rs.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),rs.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y,m,v=k.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Zo),s.renderBounds||(s.renderBounds=new Zo),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=[Math.abs(d)/2,Math.abs(h)/2,p/2],l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===x.TEXT&&delete e.anchor,d=[(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v],s.contentBounds.update(d,p),f=t.nodeName===x.POLYLINE||t.nodeName===x.POLYGON||t.nodeName===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&(p[0]+=h=((c||0)+(u||0))*f,p[1]+=h),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,g=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Ga(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[i,i,0]))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*(a?Ei(a[0],0,t):0),m=(r?-1:1)*(a?Ei(a[1],1,t):0),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),k.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=ns[t];return!!t&&t.inh},t}();(l=Wo=Wo||{})[l.ORBITING=0]="ORBITING",l[l.EXPLORING=1]="EXPLORING",l[l.TRACKING=2]="TRACKING",(l=Go=Go||{})[l.DEFAULT=0]="DEFAULT",l[l.ROTATIONAL=1]="ROTATIONAL",l[l.TRANSLATIONAL=2]="TRANSLATIONAL",l[l.CINEMATIC=3]="CINEMATIC",(l=Ho=Ho||{})[l.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",l[l.PERSPECTIVE=1]="PERSPECTIVE";var is="updated",l=function(){function t(){this.canvas=void 0,this.eventEmitter=new _r,this.matrix=ft(),this.right=Ft(1,0,0),this.up=Ft(0,1,0),this.forward=Ft(0,0,1),this.position=Ft(0,0,1),this.focalPoint=Ft(0,0,0),this.distanceVector=Ft(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Wo.EXPLORING,this.trackingMode=Go.DEFAULT,this.projectionMode=Ho.PERSPECTIVE,this.frustum=new Jo,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Ho.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===Wo.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Wo.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==Wo.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=kt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Ho.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ho.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=Ft(t.x-r,t.y-n,0),e=Vt(i,this.right)/It(this.right),r=Vt(i,this.up)/It(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Ho.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Ya(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Ho.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),jt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=qa(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=Ft(0,1,0);return this.focalPoint=qa(t,e,n),this.trackingMode===Go.CINEMATIC&&(t=(r=Gt(Bt(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=It(r),e=$a(Math.asin(e/r)),r=90+$a(Math.atan2(n,t)),Ot(n=ft(),n,Ya(r)),wt(n,n,Ya(e)),i=Yt(Bt(),[0,1,0],n)),yt(this.matrix,Nt(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=Bt(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=Va(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Va(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Va(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Jt(Qt(),[0,0,1],Ya(this.roll)),e=(pt(this.matrix),Jt(Qt(),[1,0,0],Ya((this.rotateWorld&&this.type!==Wo.TRACKING||this.type===Wo.TRACKING?1:-1)*this.elevation))),n=Jt(Qt(),[0,1,0],Ya((this.rotateWorld&&this.type!==Wo.TRACKING||this.type===Wo.TRACKING?1:-1)*this.azimuth)),n=te(Qt(),n,e),n=te(Qt(),n,t),e=Lt(ft(),n);this.type===Wo.ORBITING||this.type===Wo.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Wo.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=qa(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Dt(this.right,qa(Zt(Kt(),[1,0,0,0],this.matrix))),Dt(this.up,qa(Zt(Kt(),[0,1,0,0],this.matrix))),Dt(this.forward,qa(Zt(Kt(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=It(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Wo.TRACKING||this.rotateWorld?(this.elevation=$a(Math.asin(e/r)),this.azimuth=$a(Math.atan2(-t,-n))):(this.elevation=-$a(Math.asin(e/r)),this.azimuth=-$a(Math.atan2(-t,-n)))},e._getPosition=function(){Dt(this.position,qa(Zt(Kt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=J(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Gt(Bt(),this.focalPoint,this.position),this.distance=It(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Ho.ORTHOGRAPHIC&&(t=this.position,e=Jt(Qt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,Ft((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),Ft(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(is))},e.rotate=function(t,e,n){throw new Error(Cr)},e.pan=function(t,e){throw new Error(Cr)},e.dolly=function(t){throw new Error(Cr)},e.createLandmark=function(t,e){throw new Error(Cr)},e.gotoLandmark=function(t,e){throw new Error(Cr)},t}(),as=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),os=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),c=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),ss=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),ls=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),cs=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Je(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),us=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!b(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),fs=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}(),hs=(0,/\[\s*(.*)=(.*)\s*\]/),ds=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(hs),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!b(t))&&t.toString?t.toString():""},t}();function ps(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var gs=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new _a(ka.BOUNDS_CHANGED),this.rotate=(o=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Qt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Qt(),r)),ae(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Ut(e,Bt())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Wt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=Bt(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=Bt(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Dt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=Bt(),u=Bt(),f=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Ut(e="number"==typeof e?zt(u,e,n,r):e,c)||(Wt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Qt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=Bt(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,Ft(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,b(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;Ut(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=Ft(e,n,r));n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=Ft(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=Ft(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):t.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)ps(n),n=n.parentNode;e&&t.forEach(function(t){ps(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new Ea(ka.ATTR_MODIFIED,t,n,n,e,Ea.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=_t(Bt(),e),r=Et(Qt(),e),e=St(Bt(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Zo.isEmpty(e)?null:((n=n||new Zo).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Zo},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Zo).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Zo)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Zo.isEmpty(r))return(e=new Zo).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Zo.isEmpty(i)||(r=new Zo).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new ts(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new ts((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),ys={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},ms=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,vs=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),bs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),xs=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!bs.exec(e)&&!vs.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,ys.MetricsString+ys.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(ys.BaselineSymbol).width),s=ys.HeightMultiplier*o,o=o*ys.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=en(e)&&e+"px"||"16px",a=Je(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Io.test(s)&&Bo.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new ts(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var O=0;O<g.length;O++)p.measureText(g[O]).width,g[O].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],O=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+O){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var k=f[h].length,M=0,_=k,S=0;S<k;S++){var E=g(f[h][S]);if(c<M+E+y){_=S;break}M+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=O,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=ys.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=ys.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!ms.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!ms.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),k={},as=(cs=new cs,ls=new ls,(cc={})[x.CIRCLE]=new as,cc[x.ELLIPSE]=new os,cc[x.RECT]=cs,cc[x.IMAGE]=cs,cc[x.GROUP]=cs,cc[x.LINE]=new c,cc[x.TEXT]=new us(k),cc[x.POLYLINE]=ls,cc[x.POLYGON]=ls,cc[x.PATH]=new ss,cc[x.HTML]=null,cc[x.MESH]=null,cc),us=(os=new r,cs=new la,(c={})[u.PERCENTAGE]=null,c[u.NUMBER]=new o,c[u.ANGLE]=new e,c[u.DEFINED_PATH]=new n,c[u.PAINT]=os,c[u.COLOR]=os,c[u.FILTER]=new aa,c[u.LENGTH]=cs,c[u.LENGTH_PERCENTAGE]=cs,c[u.LENGTH_PERCENTAGE_12]=new ca,c[u.LENGTH_PERCENTAGE_14]=new ua,c[u.COORDINATE]=new a,c[u.OFFSET_DISTANCE]=new ha,c[u.OPACITY_VALUE]=new da,c[u.PATH]=new pa,c[u.LIST_OF_POINTS]=new ga,c[u.SHADOW_BLUR]=new ya,c[u.TEXT]=new ma,c[u.TEXT_TRANSFORM]=new va,c[u.TRANSFORM]=new ba,c[u.TRANSFORM_ORIGIN]=new sa,c[u.Z_INDEX]=new xa,c[u.MARKER]=new fa,c),ls=(k.CameraContribution=l,k.AnimationTimeline=null,k.EasingFunction=null,k.offscreenCanvas=new fs,k.displayObjectPool=new Ma,k.sceneGraphSelector=new ds,k.sceneGraphService=new gs(k),k.textService=new xs(k),k.geometryUpdaterFactory=as,k.CSSPropertySyntaxFactory=us,k.styleValueRegistry=new Sa,k.layoutRegistry=null,k.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==N)return N;throw new Error("Unable to locate global `this`")}(),k.enableCSSParsing=!0,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function ws(){ws=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(O([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=O,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Os(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function ks(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Os(r,e,n,i,a,"next",t)}function a(t){Os(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ms(){return(Ms=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function _s(t,e){return(_s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(ss=Hb=Hb||{}).READY="ready",ss.BEFORE_RENDER="beforerender",ss.RERENDER="rerender",ss.AFTER_RENDER="afterrender",ss.BEFORE_DESTROY="beforedestroy",ss.AFTER_DESTROY="afterdestroy",ss.RESIZE="resize",ss.DIRTY_RECTANGLE="dirtyrectangle",new _a(ka.MOUNTED),new _a(ka.UNMOUNTED),new _a(Hb.BEFORE_RENDER),new _a(Hb.RERENDER),new _a(Hb.AFTER_RENDER);function Ss(t){return Ns(t,"Function")}function Es(t){return null==t}function As(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}var Ls=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=ks(ws().mark(function t(e){var n,r,i;return ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Ce([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,ks(ws().mark(function t(){return ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),Ts=(Ls.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),_s(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Ls(Ms({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(ls)),Ps=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},js={}.toString,Ns=function(t,e){return js.call(t)==="[object "+e+"]"},Cs=function(t){return Array.isArray?Array.isArray(t):Ns(t,"Array")};function Rs(t,e){if(t)if(Cs(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(As(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function Bs(t){return(t=Gs(t)).charAt(0).toLowerCase()+t.substring(1)}var Is=function(t){return"object"==typeof t&&null!==t},Fs=function(t){if(!Is(t)||!Ns(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Ds=function(t){return Ns(t,"String")},zs=function(t){return Ns(t,"Number")},Ws=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Rs(n,function(t,e){Ss(n)&&"prototype"===e||r.push(t)}),r},Gs=function(t){return Es(t)?"":t.toString()},Hs=function(t){t=Gs(t);return t.charAt(0).toUpperCase()+t.substring(1)};var Vs=5;function qs(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},Cs(t=t)||Fs(t)?(i=e,Rs(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function Ys(t){return t}var $s,nt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Vs,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Fs(o)?(Fs(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Cs(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Us=function(t,e){if(!Ps(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Xs=function(t,e){if(t===e)return!0;if(t&&e&&!Ds(t)&&!Ds(e)){if(Ps(t)||Ps(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Xs(t[r],e[r]));r++);return n}if(Is(t)||Is(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Xs(t[i[r]],e[i[r]]));r++);return n}}return!1},Ks=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Zs(t){return Es(t)?0:(Ps(t)?t:Object.keys(t)).length}!function(a,o){var s;if(Ss(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return($s=$s||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),$s.measureText(Ds(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Ws(e=void 0===e?{}:e)).join("")});Js.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},Js.prototype.once=function(t,e){return this.on(t,e,!0)},Js.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},Js.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},Js.prototype.getEvents=function(){return this._events};var Qs=Js;function Js(){this._events={}}const tl=()=>[["cartesian"]],el=(tl.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),nl=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=el(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},rl=(nl.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),il=(rl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),al=(il.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...il(),...nl({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),ol=(al.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),sl=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=ol(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},ll=(sl.props={},()=>[["parallel",0,1,0,1]]),cl=(ll.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),ul=(cl.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...ll(),...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),fl=(ul.props={},({value:e})=>t=>t.map(()=>e)),hl=(fl.props={},({value:e})=>t=>t.map(e)),dl=(hl.props={},({value:e})=>t=>t.map(t=>t[e])),pl=(dl.props={},({value:t})=>()=>t);function gl(t,e){return t.parent===e.parent?1:2}function yl(t,e){return t+e.x}function ml(t,e){return Math.max(t,e.y)}function vl(){var s=gl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(yl,0)/e.length,t.y=1+n.reduce(ml,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function bl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function xl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ol)):void 0===e&&(e=wl);for(var n,r,i,a,o,t=new _l(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new _l(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Ml)}function wl(t){return t.children}function Ol(t){return Array.isArray(t)?t[1]:null}function kl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Ml(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function _l(t){this.data=t,this.depth=this.height=0,this.parent=null}function Sl(t){return null==t?null:El(t)}function El(t){if("function"!=typeof t)throw new Error;return t}function Al(){return 0}function Ll(t){return function(){return t}}pl.props={},_l.prototype=xl.prototype={constructor:_l,count:function(){return this.eachAfter(bl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return xl(this).eachBefore(kl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Tl=4294967296;function Pl(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Nl(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Rl(t[0],t[1]);case 3:return Bl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Cl(e,t))return[e];for(n=0;n<t.length;++n)if(jl(e,t[n])&&Cl(Rl(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(jl(Rl(t[n],t[r]),e)&&jl(Rl(t[n],e),t[r])&&jl(Rl(t[r],e),t[n])&&Cl(Bl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function jl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Nl(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Cl(t,e){for(var n=0;n<e.length;++n)if(!Nl(t,e[n]))return;return 1}function Rl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Bl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Il(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Fl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Dl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function zl(t){this._=t,this.next=null,this.previous=null}function Wl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Il(r,d,i=t[2]),d=new zl(d),r=new zl(r),i=new zl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Il(d._,r._,i=t[l]),i=new zl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Fl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Fl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Dl(d);(i=i.next)!==r;)(s=Dl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Pl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Gl(t){return Math.sqrt(t.value)}function Hl(){var n=null,r=1,i=1,a=Al;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Tl)/Tl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Vl(n)).eachAfter(ql(a,.5,e)).eachBefore(Yl(1)):t.eachBefore(Vl(Gl)).eachAfter(ql(Al,1,e)).eachAfter(ql(a,t.r/Math.min(r,i),e)).eachBefore(Yl(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Sl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Ll(+t),e):a},e}function Vl(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function ql(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Wl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Yl(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function $l(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ul(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Xl={depth:-1},Kl={},Zl={};function Ql(t){return t.id}function Jl(t){return t.parentId}function tc(){var y,m=Ql,v=Jl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=nc(t,e-1)&&!nc(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(ec);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(ec(r)),c.push(Zl));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new _l(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Kl:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Kl)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===Zl&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Zl;--t)o.data=null}if(i.parent=Xl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Ml),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Sl(t),e):m},e.parentId=function(t){return arguments.length?(v=Sl(t),e):v},e.path=function(t){return arguments.length?(y=Sl(t),e):y},e}function ec(t){let e=t.length;if(e<2)return"";for(;1<--e&&!nc(t,e););return t.slice(0,e)}function nc(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function rc(t,e){return t.parent===e.parent?1:2}function ic(t){var e=t.children;return e?e[0]:t.t}function ac(t){var e=t.children;return e?e[e.length-1]:t.t}function oc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function sc(){var h=rc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new oc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new oc(r[i],i)),n.parent=e;return(t.parent=new oc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=ac(o),i=ic(i),o&&i;)s=ic(s),(a=ac(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!ac(a)&&(a.t=o,a.m+=u-c),i&&!ic(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function lc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}oc.prototype=Object.create(_l.prototype);var cc=(1+Math.sqrt(5))/2;function uc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,O=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(O*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?Ul(o,n,r,i,O?r+=c*u/O:a):lc(o,n,r,O?n+=l*u/O:i,a),O-=u,b=x}return m}var fc=function e(a){function t(t,e,n,r,i){uc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(cc);function hc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function dc(t,e,n,r,i){(1&t.depth?lc:Ul)(t,e,n,r,i)}var pc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Ul(o,e,n,r,h?n+=(i-n)*o.value/h:i):lc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=uc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(cc);function gc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function yc(t={}){return[...gc(t),{name:"title",scale:"identity"}]}function mc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function vc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function bc(t={}){return gc(t)}function xc(){return[{type:"maybeKey"}]}function wc(t,e){return t.getBandWidth(t.invert(e))}function Oc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?wc(l,a[e]):0;var r=p?wc(c,o[e]):0,e=g&&s?(wc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function kc(t){return parseFloat(t)/100}function Mc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?kc(e)*o:+e,"string"==typeof t?kc(t)*s:+t]]})]}function _c(e){return"function"==typeof e?e:t=>t[e]}function Sc(t,e){return Array.from(t,_c(e))}function Ec(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Sc(t,e),o=Sc(t,n),s=Sc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Ac(t,e){return t.getBandWidth(t.invert(e))}const Lc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Ac(c,a[t]),n=e*(u?Ac(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Lc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...xc(),...vc()],interaction:{shareTooltip:!0}};const Tc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Pc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function jc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=Pc,o=(t,e)=>Pc(n(t),e),(t,e)=>n(t)-e):(a=n===Pc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Nc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Nc(){return 0}function*Cc(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}Tc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...xc(),...vc()],interaction:{shareTooltip:!0}};r=jc(Pc);const Rc=r.right,Bc=r.left,Ic=jc(function(t){return null===t?NaN:+t}).center;function Fc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Dc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function zc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Wc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Gc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Hc(this,t))}has(t){return super.has(Hc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Hc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Vc(t){return t}function qc(t,...e){return Uc(t,Vc,Vc,e)}function Yc(t,e,...n){return Uc(t,Vc,e,n)}function $c(t,e,...n){return Uc(t,Array.from,e,n)}function Uc(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Gc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Xc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Zc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Zc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Kc(n))}function Kc(r=Pc){if(r===Pc)return Zc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Zc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Qc=Array.prototype.slice;function Jc(t){return()=>t}const tu=Math.sqrt(50),eu=Math.sqrt(10),nu=Math.sqrt(2);function ru(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=tu?10:r>=eu?5:r>=nu?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?ru(t,e,2*n):[a,o,s]}function iu(t,e,n){return ru(t=+t,e=+e,n=+n)[2]}function au(t){return Math.ceil(Math.log(Fc(t))/Math.LN2)+1}function ou(){var m=Vc,v=zc,b=au;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===zc&&([s,l]=function(t,e,n){let r;for(;;){var i=iu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?ru(e,t,n):ru(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=iu(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===zc){const n=iu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Rc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Jc(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Jc([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Jc(Array.isArray(t)?Qc.call(t):t),e):b},e}function su(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function lu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function cu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function uu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function fu(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?Zc:Kc(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),fu(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(hu(n,i,r),0<o(n[a],f)&&hu(n,i,a);t<e;){for(hu(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?hu(n,i,e):hu(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function hu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function du(t,e,n){var r;if((n=(t=Float64Array.from(Cc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?cu(t):1<=e?su(t):(n=(n-1)*e,(r=su(fu(t,e=Math.floor(n)).subarray(0,e+1)))+(cu(t.subarray(e+1))-r)*(n-e))}function pu(r,t,i){if((i=(r=Float64Array.from(Cc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return uu(r);if(1<=t)return lu(r);t=Math.floor((i-1)*t),i=fu(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>Zc(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<Pc(o,t):0===Pc(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function gu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function yu(t,e){return du(t,.5,e)}function mu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function vu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function bu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function xu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function wu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function Ou(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function ku(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Mu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function _u(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Su(t){return ku(t)||wu(t)}function Eu(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function Au(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const Lu=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(qc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Tu=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Pu=()=>(t,e,n,r)=>{return(Mu(r)?Tu:Lu)(t,e,n,r)};Pu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...xc(),...vc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const ju=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=Oc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};ju.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...xc(),{type:"maybeSize"},...mc()]};const Nu=s=>{const{cartesian:l=!1}=s;return l?Mc:(t,e,n,r)=>{if(l)return Mc(t,0,n,r);const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Nu.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...xc(),...mc()]};const Cu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Cu.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...xc(),...mc()]};const Ru=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(qc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Ru.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...xc(),...vc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Bu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=Oc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Bu.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...xc(),...mc()]};const Iu=s=>{var t=s["cartesian"];return t?Mc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Iu.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...xc(),...mc()]};const Fu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Fu.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...xc(),...mc()]};const Du=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},zu=(Du.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...xc(),...vc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});zu.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...xc(),...mc()]};const Wu=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Wu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...xc()]};const Gu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Gu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...xc()]};const Hu=(...t)=>Bu(...t);function Vu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function qu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Vu("x",r,n,e.x),o=Vu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Hu.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...xc()]};const Yu=()=>qu();Yu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...xc()]};const $u=()=>qu({extendY:!0});$u.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...xc()]};const Uu=()=>qu({extendX:!0});function Xu(t){return t.target.depth}function Ku(t,e){return t.sourceLinks.length?t.depth:e-1}function Zu(t){return function(){return t}}function Qu(t,e){return tf(t.source,e.source)||t.index-e.index}function Ju(t,e){return tf(t.target,e.target)||t.index-e.index}function tf(t,e){return t.y0-e.y0}function ef(t){return t.value}function nf(t){return t.index}function rf(t){return t.nodes}function af(t){return t.links}function of(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function sf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function lf(){let x=0,w=0,O=1,k=1,M=24,_=8,S,E=nf,A=Ku,L,T,P,j=rf,N=af,C=6;function e(e){e={nodes:j(e),links:N(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=of(g,n)),"object"!=typeof r&&(r=t.target=of(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=P)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(P),r.sort(P)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(bu(y.sourceLinks,ef),bu(y.targetLinks,ef)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(L){var s,l=Math.max(su(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=L.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(su(t,t=>t.depth)+1,0),n=(O-x-M)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+M,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(_,(k-w)/(su(u,t=>t.length)-1)),u),f=cu(t,t=>(k-w-(t.length-1)*S)/bu(t,ef));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(k-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===P)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Ju),n.sort(Qu)}(m)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===T&&o.sort(tf),o.length&&R(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===T&&o.sort(tf),o.length&&R(o,i)}}(u,d,p)}return sf(e),e}function R(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,k,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function B({sourceLinks:t,targetLinks:e}){if(void 0===P){for(const{source:{sourceLinks:t}}of e)t.sort(Ju);for(const{target:{targetLinks:e}}of t)e.sort(Qu)}}return e.update=function(t){return sf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Zu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Zu(t),e):A},e.nodeDepth=function(t){return arguments.length?(L=t,e):L},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(M=+t,e):M},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(j="function"==typeof t?t:Zu(t),e):j},e.links=function(t){return arguments.length?(N="function"==typeof t?t:Zu(t),e):N},e.linkSort=function(t){return arguments.length?(P=t,e):P},e.size=function(t){return arguments.length?(x=w=0,O=+t[0],k=+t[1],e):[O-x,k-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],O=+t[1][0],w=+t[0][1],k=+t[1][1],e):[[x,w],[O,k]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}Uu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...bc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...xc()]};const cf={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},uf={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?cu(t.sourceLinks,Xu)-1:0},justify:Ku};const ff=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},cf,f),l=lf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?uf[n]||Ku:"function"==c?n:Ku).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function hf(t){return t}function df(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function pf(t=""){throw new Error(t)}function gf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function yf(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return mf(t,e)||{}}function mf(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Bs(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function vf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function bf(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function xf(t){return null===t||!1===t}function wf(t,e,n={},r=!1){return xf(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function Of(t,e={}){return!xf(t)&&!Array.isArray(t)&&kf(t)?nt(e,t):t}function kf(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function Mf(t,e){return"object"==typeof t?rt(t,e):t}ff.props={};const _f=v=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},w={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},O={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=v,{links:t,nodes:c}=Ec(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:f=t=>t.key,color:h=f}=u,{links:i,nodes:t}=ff(Object.assign(Object.assign(Object.assign({},b),{nodeId:_c(f)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=f,spacing:g=5}=d,y=et(d,["text","spacing"]),m=_c(f);c=wf(l,"node",{title:m,items:[{field:"value"}]},!0),f=wf(l,"link",{title:"",items:[t=>({name:"source",value:m(t.source)}),t=>({name:"target",value:m(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:h}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},O),{text:p,dx:t=>t.x[0]<.5?g:-g}),y),...a],tooltip:c,animate:Mf(s,"node"),axis:!1}),nt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},rt(r,"link")),tooltip:f,animate:Mf(s,"link")})]}},Sf=(_f.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);Sf.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...xc()]};const Ef=t=>t?parseInt(t):0;function Af(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||Ef(t.width),e=e.clientHeight||Ef(t.height),{width:(i={width:i-(Ef(t.paddingLeft)+Ef(t.paddingRight)),height:e-(Ef(t.paddingTop)+Ef(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function Lf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function Tf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:hc,treemapDice:Ul,treemapSlice:lc,treemapSliceDice:dc,treemapSquarify:fc,treemapResquarify:pc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?tc().path(p):tc():xl)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore($l),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:_c(r)(t)).sort(e.sort):p.count(),o=fc,i=!1,s=a=1,l=[0],d=h=f=u=c=Al,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=El(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Ll(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Ll(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Ll(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Ll(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Ll(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const Pf=f=>t=>{var{width:t,height:e}=Lf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["data","encode","scale","style","layout","labels","tooltip"]),u={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=Tf(n,nt({},u,o),r),n=rt(a,"label");return[nt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},c),{tooltip:Of(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},jf=(Pf.props={},f=>t=>{var{width:t,height:e}=Lf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["data","encode","scale","style","layout","labels","tooltip"]),u={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Cs(t)?tc().path(e.path):xl)(t);return r?n.sum(t=>_c(r)(t)).sort(e.sort):n.count(),Hl().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},u,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},c),{tooltip:Of(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function Nf(t,e){return cu(t,t=>e[t])}function Cf(t,e){return su(t,t=>e[t])}function Rf(t,e){const n=2.5*Bf(t,e)-1.5*Ff(t,e);return cu(t,t=>e[t]>=n?e[t]:NaN)}function Bf(t,e){return du(t,.25,t=>e[t])}function If(t,e){return du(t,.5,t=>e[t])}function Ff(t,e){return du(t,.75,t=>e[t])}function Df(t,e){const n=2.5*Ff(t,e)-1.5*Bf(t,e);return su(t,t=>e[t]<=n?e[t]:NaN)}function zf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(qc(t,t=>a[+t]).values()).flatMap(t=>{const e=Rf(t,i),n=Df(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}jf.props={};const Wf=u=>()=>{var{data:t,encode:e,style:n={},tooltip:r={},animate:i}=u,a=et(u,["data","encode","style","tooltip","transform","animate"]),{extend:o=!1}=n,n=et(n,["extend"]),s=e["y"],s={y:s,y1:s,y2:s,y3:s,y4:s},l={y1:Bf,y2:If,y3:Ff},c=wf(r,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),r=wf(r,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return o?[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Nf},l),{y4:Cf})],encode:Object.assign(Object.assign({},e),s),style:n,tooltip:c},a)]:(o=rt(n,"box"),n=rt(n,"point"),[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Rf},l),{y4:Df})],encode:Object.assign(Object.assign({},e),s),style:o,tooltip:c,animate:Mf(i,"box")},a),{type:"point",data:t,transform:[{type:zf}],encode:e,style:Object.assign({},n),tooltip:r,animate:Mf(i,"point")}])},Gf=(Wf.props={},s=>{var t=s["cartesian"];return t?Mc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Hf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Vf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function qf(t){return t[0]}function Yf(t){return t[1]}function $f(t,e,n){e=new Uf(null==e?qf:e,null==n?Yf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Uf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Xf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Gf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};la=$f.prototype=Uf.prototype;function Kf(t){return function(){return t}}function Zf(t){return 1e-6*(t()-.5)}function Qf(t){return t.index}function Jf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function th(c){var u,f,a,o,h,d,s=Qf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Kf(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Zf(d),o=i.y+i.vy-r.y-r.vy||Zf(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Jf(r,t.source)),"object"!=typeof t.target&&(t.target=Jf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Kf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Kf(+t),g(),e):r},e}la.copy=function(){var t,e,n=new Uf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Xf(e));else n._root=Xf(r);return n},la.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Hf(this.cover(e,n),e,n,t)},la.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Hf(this,i[u],a[u],t[u]);return this},la.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},la.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},la.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},la.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Vf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Vf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Vf(y[2],s,c,a,i),new Vf(y[1],a,l,o,c),new Vf(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},la.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},la.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},la.root=function(){return this._root},la.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},la.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Vf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Vf(e,o,s,i,a)),(e=c[2])&&l.push(new Vf(e,n,s,o,a)),(e=c[1])&&l.push(new Vf(e,o,r,i,s)),e=c[0])&&l.push(new Vf(e,n,r,o,s));return this},la.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Vf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Vf(i,a,o,c,u)),(i=f[1])&&n.push(new Vf(i,c,o,s,u)),(i=f[2])&&n.push(new Vf(i,a,u,c,l)),i=f[3])&&n.push(new Vf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},la.x=function(t){return arguments.length?(this._x=t,this):this._x},la.y=function(t){return arguments.length?(this._y=t,this):this._y};var eh={value:()=>{}};function nh(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new rh(r)}function rh(t){this._=t}function ih(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=eh,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}rh.prototype=nh.prototype={constructor:rh,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=ih(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ih(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new rh(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var ah,oh,sh=0,lh=0,ch=0,uh=1e3,fh=0,hh=0,dh=0,ph="object"==typeof performance&&performance.now?performance:Date,gh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yh(){return hh||(gh(mh),hh=ph.now()+dh)}function mh(){hh=0}function vh(){this._call=this._time=this._next=null}function bh(t,e,n){var r=new vh;return r.restart(t,e,n),r}function xh(){hh=(fh=ph.now())+dh,sh=lh=0;try{yh(),++sh;for(var t,e=ah;e;)0<=(t=hh-e._time)&&e._call.call(void 0,t),e=e._next;--sh}finally{for(var n,r,i=ah,a=1/(sh=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:ah=r);oh=n,Oh(a),hh=0}}function wh(){var t=ph.now(),e=t-fh;uh<e&&(dh-=e,fh=t)}function Oh(t){sh||(lh=lh&&clearTimeout(lh),24<t-hh?(t<1/0&&(lh=setTimeout(xh,t-ph.now()-dh)),ch=ch&&clearInterval(ch)):(ch||(fh=ph.now(),ch=setInterval(wh,uh)),sh=1,gh(xh)))}vh.prototype=bh.prototype={constructor:vh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?yh():+n)+(null==e?0:+e),this._next||oh===this||(oh?oh._next=this:ah=this,oh=this),this._call=t,this._time=n,Oh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oh())}};const kh=4294967296;function Mh(t){return t.x}function _h(t){return t.y}var Sh=10,Eh=Math.PI*(3-Math.sqrt(5));function Ah(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=bh(i),n=nh("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%kh)/kh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Sh*Math.sqrt(.5+r),e=r*Eh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function Lh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Kf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Kf(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=$f(i,Mh,_h).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function F(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Zf(c))*i),0===a&&(s+=(a=Zf(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=Zf(c))*i),0===a&&(s+=(a=Zf(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,O,k,M,_,S,E,A,L,n=th(a).id(_c(n)),T=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),Ah(t).force("link",n).force("charge",B));function P(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function j(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function N(t){for(var e,n=0,r=O.length;n<r;++n)(e=O[n]).vx+=(M[n]-e.x)*k[n]*t}function C(){if(O){var t,e=O.length;for(k=new Array(e),M=new Array(e),t=0;t<e;++t)k[t]=isNaN(M[t]=+w(O[t],t,O))?0:+_(O[t],t,O)}}function R(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*L,r=(r/e-E)*L,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(L=1,null==S&&(S=0),null==E&&(E=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(E=+t,R):E},R.strength=function(t){return arguments.length?(L=+t,R):L},R)):T.force("x",(_=Kf(.1),"function"!=typeof w&&(w=Kf(null==w?0:+w)),N.initialize=function(t){O=t,C()},N.strength=function(t){return arguments.length?(_="function"==typeof t?t:Kf(+t),C(),N):_},N.x=function(t){return arguments.length?(w="function"==typeof t?t:Kf(+t),C(),N):w},N)).force("y",(x=Kf(.1),"function"!=typeof y&&(y=Kf(null==y?0:+y)),P.initialize=function(t){m=t,j()},P.strength=function(t){return arguments.length?(x="function"==typeof t?t:Kf(+t),j(),P):x},P.y=function(t){return arguments.length?(y="function"==typeof t?t:Kf(+t),j(),P):y},P)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const Th=g=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,f=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},f),h=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=Ec(t,e),{nodesData:t,linksData:p}=Lh({links:t,nodes:p},nt({},{joint:!0},i),e),i=wf(l,"link",{items:[t=>({name:"source",value:_c(u)(t.source)}),t=>({name:"target",value:_c(u)(t.target)})]}),e=wf(l,"node",{items:[t=>({name:"key",value:_c(c)(t)})]},!0);return[nt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:p,encode:d,labels:o,style:rt(r,"link"),tooltip:i,animate:Mf(s,"link")}),nt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},h),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:Mf(s,"link")})]},Ph=(Th.props={},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=xl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),jh=t=>Ph(vl)(t),Nh=(jh.props={},t=>Ph(sc)(t)),Ch=(Nh.props={},u=>{const f={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Nh(Object.assign(Object.assign(Object.assign({},f),i),{field:c}))(t),t=wf(l,"node",{title:"name",items:["value"]},!0),l=wf(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:Mf(s,"link")}),nt({},h,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:Mf(s,"node")})]}});Ch.props={};var Rh={},Bh={},Ih=34,Fh=10,Dh=13;function zh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Wh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Gh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Hh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Gh(-e,6):9999<e?"+"+Gh(e,6):Gh(e,4))+"-"+Gh(t.getUTCMonth()+1,2)+"-"+Gh(t.getUTCDate(),2)+(a?"T"+Gh(n,2)+":"+Gh(r,2)+":"+Gh(i,2)+"."+Gh(a,3)+"Z":i?"T"+Gh(n,2)+":"+Gh(r,2)+":"+Gh(i,2)+"Z":r||n?"T"+Gh(n,2)+":"+Gh(r,2)+"Z":"")}function Vh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Bh;if(l)return l=!1,Rh;var t,e,n=a;if(r.charCodeAt(n)===Ih){for(;a++<i&&r.charCodeAt(a)!==Ih||r.charCodeAt(++a)===Ih;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Fh?l=!0:e===Dh&&(l=!0,r.charCodeAt(a)===Fh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Fh)l=!0;else if(e===Dh)l=!0,r.charCodeAt(a)===Fh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Fh&&--i,r.charCodeAt(i-1)===Dh&&--i;(e=c())!==Bh;){for(var u=[];e!==Rh&&e!==Bh;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Hh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=zh(n=t),function(t,e){return r(i(t),e,n)}):zh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Wh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Wh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function qh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Yh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Yh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),$h=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ye(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Vh(i).parse(t,a?qh:hf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};$h.props={};const Uh=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};Uh.props={};const Xh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Kh=(Xh.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Kh.props={};const Zh=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};Zh.props={};const Qh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Qh.props={};const Jh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},td=(Jh.props={},t=>{const e=t["value"];return()=>e}),ed=(td.props={},t=>{const{callback:e=hf}=t;return t=>e(t)}),nd=(ed.props={},t=>{const{callback:e=hf}=t;return t=>Array.isArray(t)?t.map(e):t});nd.props={};var rd=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const id={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function ad(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},id),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=qc(r,t=>t.source),a=qc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=bu(e,t=>t.sourceWeight)+bu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:rd[v])&&r.sort(n),!(n=(r=e).length))throw pf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=qc(e,t=>t.source),l=qc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const od=e=>t=>ad(e)(t),sd=(od.props={},Math.PI/180),ld=64,cd=2048;function ud(t){return t.text}function fd(){return"serif"}function hd(){return"normal"}function dd(t){return t.value}function pd(){return 90*~~(2*Math.random())}function gd(){return 1}function yd(){}function md(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(ld<<5)/c,cd/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*sd),h=Math.cos(o.rotate*sd),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=ld<<5&&(i=0,a+=n,n=0),a+e>=cd)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*sd),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(ld<<5)/c,cd/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(ld<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function vd(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function bd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function xd(){return document.createElement("canvas")}function wd(t){return"function"==typeof t?t:function(){return t}}const Od={archimedean:vd,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function kd(){let b=[256,256],r=ud,i=fd,p=dd,g=hd,y=pd,m=gd,x=vd,w=Math.random,v=yd,O=[],k=null,M=1/0;const _=hd,S=xd,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(ld<<5)/e,t.height=cd/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||bd((b[0]>>5)*b[1]),c=O.length,u=[],f=O.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<M&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,md(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return k&&clearInterval(k),k=setInterval(n,0),n(),E},E.stop=function(){return k&&(clearInterval(k),k=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=bd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){M=null==t?1/0:t},E.words=function(t){O=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=wd(t)},E.font=function(t){i=wd(t)},E.fontWeight=function(t){g=wd(t)},E.rotate=function(t){y=wd(t)},E.spiral=function(t){x=Od[t]||t},E.fontSize=function(t){p=wd(t)},E.padding=function(t){m=wd(t)},E.random=function(t){w=wd(t)},E.on=function(t){v=wd(t)},E}const Md={size:[500,500],fontSize:[14,28]};function _d(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const Sd=h=>f=>ye(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Md,h),e=kd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ye(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[cu(e),su(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",_d,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=et(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Ed(e){return"string"==typeof e?t=>t[e]:e}Sd.props={};const Ad=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Ed(r),l=Ed(t),c=Yc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},Ld=(Ad.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});Ld.props={};const Td=u=>c=>ye(void 0,void 0,void 0,function*(){var{width:t,height:e}=Lf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield Sd(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Pd(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function jd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Nd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Td.props={};const Cd=Math.sqrt(50),Rd=Math.sqrt(10),Bd=Math.sqrt(2);function Id(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Cd?10:n>=Rd?5:n>=Bd?2:1)*10**t:-(10**-t)/(n>=Cd?10:n>=Rd?5:n>=Bd?2:1)}function Fd(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Cd?r*=10:n>=Rd?r*=5:n>=Bd&&(r*=2),e<t?-r:r}const Dd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Id(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Id(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Id(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},zd=36e5,Wd=864e5,Gd=7*Wd;Wd,Wd;function Hd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}o=Hd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=Hd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),n=Hd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),os=Hd(zd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+zd*e)},t=>t.getHours()),aa=Hd(Wd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Wd*e)},t=>t.getDate()-1);const Vd=Hd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());cs=Hd(Gd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Gd*e)},t=>{var e=Vd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Gd)}),ca=Hd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const qd={millisecond:o,second:e,minute:n,hour:os,day:aa,week:cs,month:Vd,year:ca};ua=Hd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),a=Hd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ha=Hd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),da=Hd(zd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+zd*e)},t=>t.getUTCHours()),pa=Hd(Wd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Wd*e)},t=>t.getUTCDate()-1);const Yd=Hd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());ga=Hd(Gd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Gd*e)},t=>{var e=Yd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Gd)}),ya=Hd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const $d={millisecond:ua,second:a,minute:ha,hour:da,day:pa,week:ga,month:Yd,year:ya};function Ud(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?$d:qd;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Nd(i,l,0,c,s);let f;return f=u===c?[a,Fd(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Fd(t,e,n),1)]}const Xd=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Ud(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Kd(t){return null!=t&&!Number.isNaN(t)}const Zd=e=>t=>-e(-t),Qd=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Zd(t):t},Jd=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Zd(n):n},tp=(t,e,n,r)=>{var i=t<0,a=Qd(r,i),r=Jd(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function ep(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return zs(t)?Math.round(t):t}):i;this.output=Pd(a,r,e,t)},t.prototype.invert=void 0}}var np,ma={exports:{}},va={exports:{}},rp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},ip=Array.prototype.concat,ap=Array.prototype.slice,op=va.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];rp(i)?e=ip.call(e,ap.call(i)):e.push(i)}return e},sp=(op.wrap=function(t){return function(){return t(op(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),lp=va.exports,cp=Object.hasOwnProperty,up=Object.create(null);for(np in sp)cp.call(sp,np)&&(up[sp[np]]=np);var fp=ma.exports={to:{},get:{}};function hp(t,e,n){return Math.min(Math.max(e,t),n)}function dp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}fp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=fp.get.hsl(t),n="hsl";break;case"hwb":e=fp.get.hwb(t),n="hwb";break;default:e=fp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},fp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:cp.call(sp,e[1])?((i=sp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=hp(i[n],0,255);return i[3]=hp(i[3],0,1),i},fp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,hp(parseFloat(t[2]),0,100),hp(parseFloat(t[3]),0,100),hp(isNaN(e)?1:e,0,1)]):null},fp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,hp(parseFloat(t[2]),0,100),hp(parseFloat(t[3]),0,100),hp(isNaN(e)?1:e,0,1)]):null},fp.to.hex=function(){var t=lp(arguments);return"#"+dp(t[0])+dp(t[1])+dp(t[2])+(t[3]<1?dp(Math.round(255*t[3])):"")},fp.to.rgb=function(){var t=lp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},fp.to.rgb.percent=function(){var t=lp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},fp.to.hsl=function(){var t=lp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},fp.to.hwb=function(){var t=lp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},fp.to.keyword=function(t){return up[t.slice(0,3)]};var pp=ma.exports;function gp(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function yp(t){var e,n,r,t=pp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*gp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*gp(n,r,e),255*gp(n,r,e-1/3),t]):null):null}const mp=(e,n)=>t=>e*(1-t)+n*t,vp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return mp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=yp(n),c=yp(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},bp=(t,e)=>{const n=mp(t,e);return t=>Math.round(n(t))};function xp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function wp(t){return"object"==typeof t?t.valueOf():t}class Op extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=wp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(xp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(xp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class kp{constructor(t){this.options=nt({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=nt({},this.options,t),this.rescale(t)}rescale(t){}}const Mp=Symbol("defaultUnknown");function _p(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Sp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Mp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Ep(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Ap extends kp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Mp}}map(t){return 0===this.domainIndexMap.size&&_p(this.domainIndexMap,this.getDomain(),this.domainKey),Sp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&_p(this.rangeIndexMap,this.getRange(),this.rangeKey),Sp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Ep(e),this.rangeKey=Ep(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Ap(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Lp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Op(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Op(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Tp extends Ap{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Mp,flex:[]}}clone(){return new Tp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Lp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Pp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Id(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};class jp extends kp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Pp}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return zs(e)&&zs(r)?t(e,r,n):[]}clone(){return new jp(this.options)}}function Np(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Cp=[1,5,2,2.5,4,3],Rp=100*Number.EPSILON;const Bp=(n,r,t=5,i=!0,a=Cp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=Zs(h),1-Us(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,O=(M=r,O=w*(e-1),(M-=n)<O?1-((O-M)/2)**2/(.1*M)**2:1);if(o[0]*v+o[1]*O+o[2]*b+o[3]<g.score)break;var k=Math.floor(r/w)*y-(e-1)*y,M=Math.ceil(n/w)*y;if(k<=M){var _=M-k;for(let t=0;t<=_;t+=1){var S=(k+t)*(w/y),E=S+w*(e-1),A=w,L=function(t,e,n,r,i,a){var o=Zs(e),e=Us(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Rp||a-t<Rp)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),T=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,P=(l=e,P=n,l=(l-1)/(E-(j=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(P,j)),2-Math.max(l/c,c/l)),j=o[0]*L+o[1]*T+o[2]*P+ +o[3];g.score<j&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=j)}}t+=1}e+=1}}y+=1}var t=Np(g.lmax),e=Np(g.lmin),N=Np(g.lstep),C=Math.floor((t=(t-e)/N,Math.round(1e12*t)/1e12))+1,R=new Array(C);R[0]=Np(e);for(let t=1;t<C;t+=1)R[t]=Np(R[t-1]+N);return R};class Ip extends kp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Bp}}map(t){return Kd(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Ip(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return zs(t)&&zs(r)?n(t,r,e):[]}}const Fp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Pd(o=t<r?(a=jd(t,r),n(e,i)):(a=jd(r,t),n(i,e)),a)},Dp=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=jd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Nd(r,t,1,i)-1,n=a[e];return Pd(o[e],n)(t)}},zp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Dp:Fp)(t,e,r?bp:n)};class Wp extends kp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:mp,tickCount:5}}map(t){return Kd(t)?this.output(t):this.options.unknown}invert(t){return Kd(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Dd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Ys}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=zp(n.map(t),r,a,i);this.output=Pd(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=zp(i,r.map(t),mp);this.input=Pd(e,n,i)}}class Gp extends Wp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:vp,tickMethod:Pp,tickCount:5}}chooseTransforms(){return[Ys,Ys]}clone(){return new Gp(this.options)}}class Hp extends Tp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Mp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Hp(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Vp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class qp extends Wp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:vp,tickMethod:Pp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Ys,Ys]:(t=.5===r?Vp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new qp(this.options)}}class Yp extends qp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:vp,tickMethod:Pp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Yp(this.options)}}class $p extends kp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Kd(t)?(t=Nd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new $p(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Up=(t,e,n,r=10)=>{var i=t<0,a=Jd(r,i),o=Qd(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=Pp(l,c,n))}else h=Pp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class Xp extends Wp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:vp,tickMethod:Up,tickCount:5}}chooseNice(){return tp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Qd(t,e),Jd(t,e)]}clone(){return new Xp(this.options)}}class Kp extends $p{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Bp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Dd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new Kp(this.options)}}function Zp(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class Qp extends $p{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Bp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Zp(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new Qp(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var Jp=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,t0=/\[([^]*?)\]/gm;function e0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function n0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function r0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var i0,ba=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xa=["January","February","March","April","May","June","July","August","September","October","November","December"],u=e0(xa,3),a0=n0({},{dayNamesShort:e0(ba,3),dayNames:ba,monthNamesShort:u,monthNames:xa,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),o0={D:function(t){return String(t.getDate())},DD:function(t){return r0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return r0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return r0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return r0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return r0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return r0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return r0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return r0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return r0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return r0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return r0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+r0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+r0(Math.floor(Math.abs(t)/60),2)+":"+r0(Math.abs(t)%60,2)}},s0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const l0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Ud(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function c0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class u0 extends Wp{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:l0,interpolate:mp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Xd}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?$d:qd,s=t?c0:Ys;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=s0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=s0[t]||t).replace(t0,function(t,e){return r.push(e),"@@@"}),n0(n0({},a0),n));return(t=t.replace(Jp,function(t){return o0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new u0(this.options)}}var f0;let h0=i0=class extends Gp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Ys,tickMethod:Pp,tickCount:5}}constructor(t){super(t)}clone(){return new i0(this.options)}};h0=i0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([ep(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Pd(mp(0,1),jd(t,e))})],h0);let d0=f0=class extends Gp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Ys,tickMethod:Pp,tickCount:5}}constructor(t){super(t)}clone(){return new f0(this.options)}};function p0([t,e],[n,r]){return[t-n,e-r]}function g0([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function y0([t,e]){return Math.atan2(e,t)}function m0([t,e]){return y0([t,e])+Math.PI/2}function v0(t,e){t=y0(t),e=y0(e);return t<e?e-t:2*Math.PI-(t-e)}function b0(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function x0([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function w0(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function O0(t){return t.map((t,e)=>e)}function k0(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function M0(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)M0(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function _0(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...M0(e,t));return n}function A(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function S0(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*g0(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function E0(t,e,n,r,i){e=y0(p0(r,e))+Math.PI,n=y0(p0(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function A0(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=O0(a),[r,o]=zc(t,t=>a[t]);const s=new Gp({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function L0(t){var[t,e,n,r]=t;return[r,t,e,n]}function T0(t,e,n){var[e,r,,i]=xu(t)?L0(e):e,[n,a]=n,t=t.getCenter(),o=m0(p0(e,t)),r=m0(p0(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:g0(i,t),outerRadius:g0(e,t)}}function P0(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function j0(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function N0(t,e){return wu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function C0(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new R0([t],null,t,t.ownerDocument)}d0=f0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([ep(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Pd(mp(0,.5),jd(e,n)),a=Pd(mp(.5,1),jd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],d0);class R0{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new R0(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new R0(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new R0([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new R0(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new R0(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new R0([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=qc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const qc=f.get(d);s.push([h,qc]);for(const y of qc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new R0([],i,this._parent,this._document),new R0(a,null,this._parent,this._document),new R0(o,null,this._parent,this._document),new R0([],s,this._parent,this._document),new R0(l,null,this._parent,this._document)];return new R0(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new R0(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=R0.registry[t])?new e:pf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new R0([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}R0.registry={g:U.Group,rect:U.Rect,circle:U.Circle,path:U.Path,text:U.Text,ellipse:U.Ellipse,image:U.Image,line:U.Line,polygon:U.Polygon,polyline:U.Polyline,html:U.HTML};const B0=t=>{const u=t["radius"],f=et(t,["shape","radius"]);var t=rt(f,"pointer"),e=rt(f,"pin");const h=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=sl({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=C0(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),f),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),f),i=it(new U.Group);return xf(h)||("function"==typeof h?i.append(()=>h(c,e,s,r)):i.append("line").call(A,a).node()),xf(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(A,o).node()),i.node()}},I0=f=>{const h={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:B0,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=f,a=et(f,["data","scale","style","animate"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},h,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},h,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r)},c),animate:"object"==typeof i?rt(i,"text"):i})]}},F0=(I0.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),D0=(F0.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),z0=(D0.props={},t=>new Tp(t)),W0=(z0.props={},t=>new Gp(t)),G0=(W0.props={},t=>new Ap(t)),H0=(G0.props={},t=>new Ip(t)),V0=(H0.props={},t=>new Hp(t)),q0=(V0.props={},t=>new u0(t)),Y0=(q0.props={},t=>new Xp(t)),$0=(Y0.props={},t=>new qp(t)),U0=($0.props={},t=>new $p(t)),X0=(U0.props={},t=>new Qp(t)),K0=(X0.props={},t=>new Kp(t)),Z0=(K0.props={},t=>new Yp(t)),Q0=(Z0.props={},t=>new h0(t)),J0=(Q0.props={},t=>new jp(t));function t1(t){return function(){return t}}J0.props={};const e1=Math.abs,n1=Math.atan2,r1=Math.cos,i1=Math.max,a1=Math.min,o1=Math.sin,s1=Math.sqrt,l1=1e-12,c1=Math.PI,u1=c1/2,f1=2*c1;function h1(t){return 1<=t?u1:t<=-1?-u1:Math.asin(t)}const d1=Math.PI,p1=2*d1,g1=1e-6,y1=p1-g1;function m1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class v1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?m1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return m1;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>g1&&(Math.abs(h*c-u*f)>g1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((d1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>g1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>g1||Math.abs(this._y1-c)>g1)&&this._append`L${l},${c}`,n&&((f=f<0?f%p1+p1:f)>y1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>g1&&this._append`A${n},${n},0,${+(f>=d1)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function b1(){return new v1}function x1(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new v1(r)}function w1(t){return t.innerRadius}function O1(t){return t.outerRadius}function k1(t){return t.startAngle}function M1(t){return t.endAngle}function _1(t){return t&&t.padAngle}function S1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/s1(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*s1(i1(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function E1(){var A=w1,L=O1,T=t1(0),P=null,j=k1,N=M1,C=_1,R=null,B=x1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,O=+A.apply(this,arguments),k=+L.apply(this,arguments),M=j.apply(this,arguments)-u1,_=N.apply(this,arguments)-u1,S=e1(_-M),E=M<_;if(R=R||(t=B()),k<O&&(e=k,k=O,O=e),k>l1?S>f1-l1?(R.moveTo(k*r1(M),k*o1(M)),R.arc(0,0,k,M,_,!E),O>l1&&(R.moveTo(O*r1(_),O*o1(_)),R.arc(0,0,O,_,M,E))):(r=e=M,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>l1&&(P?+P.apply(this,arguments):s1(O*O+k*k)),w=x=s=a1(e1(k-O)/2,+T.apply(this,arguments)),h>l1&&(f=h1(h/O*o1(u)),h=h1(h/k*o1(u)),(a-=2*f)>l1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(M+_)/2),(o-=2*h)>l1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(M+_)/2)),u=k*r1(e),f=k*o1(e),h=O*r1(i),M=O*o1(i),s>l1&&(d=k*r1(n),p=k*o1(n),g=O*r1(r),y=O*o1(r),S<c1)&&((_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<l1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,M))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/o1((1<(S=(S*b+v*m)/(s1(S*S+v*v)*s1(b*b+m*m)))?0:S<-1?c1:Math.acos(S))/2),b=s1(_[0]*_[0]+_[1]*_[1]),x=a1(s,(O-b)/(v-1)),w=a1(s,(k-b)/(1+v))):x=w=0),o>l1?w>l1?(l=S1(g,y,u,f,k,w,E),c=S1(d,p,h,M,k,w,E),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,n1(l.y01,l.x01),n1(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,w,n1(l.y01,l.x01),n1(l.y11,l.x11),!E),R.arc(0,0,k,n1(l.cy+l.y11,l.cx+l.x11),n1(c.cy+c.y11,c.cx+c.x11),!E),R.arc(c.cx,c.cy,w,n1(c.y11,c.x11),n1(c.y01,c.x01),!E))):(R.moveTo(u,f),R.arc(0,0,k,e,n,!E)):R.moveTo(u,f),O>l1&&a>l1?x>l1?(l=S1(h,M,d,p,O,-x,E),c=S1(u,f,g,y,O,-x,E),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,n1(l.y01,l.x01),n1(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,x,n1(l.y01,l.x01),n1(l.y11,l.x11),!E),R.arc(0,0,O,n1(l.cy+l.y11,l.cx+l.x11),n1(c.cy+c.y11,c.cx+c.x11),E),R.arc(c.cx,c.cy,x,n1(c.y11,c.x11),n1(c.y01,c.x01),!E))):R.arc(0,0,O,i,r,E):R.lineTo(h,M)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+j.apply(this,arguments)+ +N.apply(this,arguments))/2-c1/2;return[r1(e)*t,o1(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:t1(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:t1(+t),e):L},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:t1(+t),e):T},e.padRadius=function(t){return arguments.length?(P=null==t?null:"function"==typeof t?t:t1(+t),e):P},e.startAngle=function(t){return arguments.length?(j="function"==typeof t?t:t1(+t),e):j},e.endAngle=function(t){return arguments.length?(N="function"==typeof t?t:t1(+t),e):N},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:t1(+t),e):C},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function A1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function L1(t){this._context=t}function T1(t){return new L1(t)}function P1(t){return t[0]}function j1(t){return t[1]}function N1(o,s){var l=t1(!0),c=null,u=T1,f=null,h=x1(e);function e(t){var e,n,r,i=(t=A1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?P1:t1(o),s="function"==typeof s?s:void 0===s?j1:t1(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:t1(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:t1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:t1(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function C1(u,f,h){var d=null,p=t1(!0),g=null,y=T1,m=null,v=x1(e);function e(t){var e,n,r,i,a,o=(t=A1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return N1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?P1:t1(+u),f="function"==typeof f?f:t1(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?j1:t1(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:t1(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:t1(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:t1(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:t1(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:t1(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:t1(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:t1(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}b1.prototype=v1.prototype,L1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var R1=I1(T1);function B1(t){this._curve=t}function I1(e){function t(t){return new B1(e(t))}return t._curve=e,t}function F1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I1(t)):e()._curve},t}function D1(){}function z1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function W1(t,e){this._context=t,this._k=(1-e)/6}function G1(t,e){this._context=t,this._k=(1-e)/6}function H1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>l1&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>l1&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function V1(t,e){this._context=t,this._alpha=e}B1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},W1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:z1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:z1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new W1(t,n)}return t.tension=function(t){return e(+t)},t}(0),G1.prototype={areaStart:D1,areaEnd:D1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:z1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new G1(t,n)}return t.tension=function(t){return e(+t)},t}(0),V1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:H1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var q1=function e(n){function t(t){return n?new V1(t,n):new W1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Y1(t,e){this._context=t,this._alpha=e}Y1.prototype={areaStart:D1,areaEnd:D1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:H1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $1=function e(n){function t(t){return n?new Y1(t,n):new G1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function U1(t){this._context=t}function X1(t){return new U1(t)}function K1(t,e){this._context=t,this._t=e}function Z1(t){return new K1(t,.5)}function Q1(t){return new K1(t,0)}function J1(t){return new K1(t,1)}function tg(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!wu(n)&&!ku(n)){var[p,,g]=!!xu(n)?L0(t):t;const[x,v]=p;var[g,p]=p0(g,p),y=(0<g?x:x+g)+o,m=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new U.Rect({})).style("x",y).style("y",m).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(A,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=T0(n,t,[v,b]),s=E1().cornerRadius(a).padAngle(i*Math.PI/180);return it(new U.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(A,r).node()}U1.prototype={areaStart:D1,areaEnd:D1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},K1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};const eg=k=>{const{colorAttribute:M,first:_=!0,last:S=!0}=k,E=et(k,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===M||s?r:0,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y}=E,w=et(E,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:O}=e;return it(tg(t,e,n,{radius:a,radiusTopLeft:_?l:d,radiusTopRight:_?c:p,radiusBottomRight:S?u:g,radiusBottomLeft:S?f:h,inset:y,insetLeft:m,insetRight:v,insetBottom:b,insetTop:x})).call(A,o).style("fill","transparent").style(M,i).style(j0(k),O).style("lineWidth",r).style("stroke",void 0===s?i:s).call(A,w).node()}},ng=(eg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>eg(Object.assign({colorAttribute:"fill"},t))),rg=(ng.props=Object.assign({},eg.props),t=>eg(Object.assign({colorAttribute:"stroke"},t)));rg.props=Object.assign({},eg.props);const ig=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(xu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=et(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return eg(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function ag(t,e,n){var[t,r,i,a]=t;if(xu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}ig.props=Object.assign({},eg.props);const og=t=>ig(Object.assign({adjustPoints:ag},t));function sg(t){const e="function"==typeof t?t:t.render;return class extends U.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}og.props=Object.assign({},eg.props);const lg=sg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new U.Path({})).style("d",e).call(A,r),it(t).maybeAppend("line1",()=>new U.Path({})).style("d",n).call(A,i)});const cg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=et(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?A0(a,s,l,h,d):r,s=N0(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(wu(n)){const u=n.getCenter();c=n=>F1(N1().curve(R1)).angle((t,e)=>m0(p0(n[e],u))).radius((t,e)=>g0(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=N1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new U.Path({})).style("d",c(r)).call(A,l):a&&!g?it(new U.Path({})).style("d",c(t)).call(A,l):it(new lg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},ug=(cg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=wu(n)?X1:T1;return cg(Object.assign({curve:i},a))(t,e,n,r)}),fg=(ug.props=Object.assign({},cg.props),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=wu(n)?$1:q1;return cg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),hg=(fg.props=Object.assign({},cg.props),t=>cg(Object.assign({curve:J1},t))),dg=(hg.props=Object.assign({},cg.props),t=>cg(Object.assign({curve:Q1},t))),pg=(dg.props=Object.assign({},cg.props),t=>cg(Object.assign({curve:Z1},t)));function gg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}pg.props=Object.assign({},cg.props);var yg,mg=Object.freeze({__proto__:null,point:gg,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const f=u=>{const{colorAttribute:f,symbol:t,mode:h="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=mg[t]||gg;return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=C0(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||_u(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(h,t,e,n)||d.r||o.r;return it(new U.Path).call(A,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(j0(u),s).style(f,a).call(A,d).node()}},vg=(f.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>f(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),bg=(vg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),xg=(bg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),wg=(xg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Og=(wg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),kg=(Og.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Mg=(kg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),_g=(Mg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Sg=(_g.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Eg=(Sg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Ag=(Eg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Lg=(Ag.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Tg=(Lg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Pg=(Tg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),jg=(Pg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Ng=(jg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Cg=(Ng.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Rg=(Cg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Bg=(Rg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Ig=(Bg.props=Object.assign({},f.props),t=>{const{arrowSize:u="40%"}=t,f=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=P0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=S0(a,r,{arrowSize:u}),c=b1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new U.Path).call(A,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(A,f).node()}});function Fg(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Fg)}function Dg(){this.constructor=yg}Ig.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},yg=Fg,fa=Error,Dg.prototype=fa.prototype,yg.prototype=new Dg,Fg.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var zg;function Wg(t,e,n,r){var i,a,o,s=Gg(r=void 0===r?"...":r,n),l=Je(t)?t:b(i=t)?"":i.toString(),c=e,u=[];if(Gg(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=Gg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=Gg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Gg=hn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(zg=zg||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),zg.measureText(Je(t)?t:"").width},function(t,e){return O([t],w(rn(e=void 0===e?{}:e)),!1).join("")});function Hg(t,e){return"string"==typeof t?Gg(t,e):t}function Vg(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function qg(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Yg(t){if(en(t))return[t,t,t,t];if(Ye(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var $g=["default","active","selected","disabled","inactive"];function Ug(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}var Xg={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Kg(t){var e;return t?null==t?void 0:t.default:(e=fn(t)||{},$g.forEach(function(t){t in e&&delete e[t]}),e)}function Zg(t,e,n){return void 0===n&&(n=!1),e?(e=bn(t,e),n?mn({},Kg(t),e):e):Kg(t)||{}}function Qg(t,r,i,e){void 0===i&&(i=!1);var a=(e=void 0===e?!0:e)?Ug(t):t;return Object.keys(a).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(r,"[A-Z].*")).test(n)!==i&&(i?t[e]=a[e]:t[(n=e.slice(r.length)).charAt(0).toLowerCase()+n.slice(1)]=a[e]),t},{})}function Jg(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(Qg(i,n)),i=Qg(i,n,!0)),t},[]);return t.push(i),t}function ty(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function ey(t,n){void 0===n&&(n=["x","y","class"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function ny(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}M.prototype.selectAll=function(t){return new M("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},M.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new M(this._elements,null,this._parent,this._document,void 0,void 0,t)},M.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new M([t],null,t,this._document)},M.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=w(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new M(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new M(r,null,r[0],this._document)},M.prototype.maybeAppend=function(t,e){e=be(this,ry,"m",iy).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},M.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=be(this,ry,"m",iy).call(this,t.startsWith(".")?t:".".concat(t),e);return e.addClassName(t),e},M.prototype.maybeAppendByName=function(t,e){e=be(this,ry,"m",iy).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},M.prototype.addClassName=function(r){var e,t;try{for(var n=ve(this._elements),i=n.next();!i.done;i=n.next())!function(t){var e=t.attr("class")||void 0,n=new Set((null==e?void 0:e.split(" "))||[]);r.split(" ").forEach(function(t){return n.add(t)}),t.attr("class",Array.from(n).join(" "))}(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return this},M.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=qc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=ve(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new M([],a,this._parent,this._document),new M(o,null,this._parent,this._document),new M(s,null,this._parent,this._document),new M([],l,this._parent,this._document),new M(c,null,this._parent,this._document)];return new M(this._elements,null,this._parent,this._document,w)},M.prototype.merge=function(t){var e=O(O([],w(this._elements),!1),w(t._elements),!1),t=O(O([],w(this._transitions),!1),w(t._transitions),!1);return new M(e,null,this._parent,this._document,void 0,t)},M.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=M.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},M.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},M.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new M([],null,this._parent,this._document,void 0,this._transitions)},M.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},M.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},M.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},M.prototype.styles=function(e,s){return void 0===s&&(s=!0),this.each(function(i,a){var o=this,t=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],r=e[1],e="function"==typeof r&&s?r:function(){return r};return void 0!==r&&(t[n]=e.call(o,i,a)),t},{});this.attr(t)})},M.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},M.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},M.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},M.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,O([this._parent,this],w(e),!1)),this},M.prototype.node=function(){return this._elements[0]},M.prototype.nodes=function(){return this._elements},M.prototype.transitions=function(){return this._transitions},M.prototype.parent=function(){return this._parent},ry=new WeakSet,iy=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new M([t],null,this._parent,this._document)},M.registry={g:U.Group,rect:U.Rect,circle:U.Circle,path:U.Path,text:U.Text,ellipse:U.Ellipse,image:U.Image,line:U.Line,polygon:U.Polygon,polyline:U.Polyline,html:U.HTML};var ry,iy,ay=M;function M(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),ry.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function _(t){return new ay([t],null,t,t.ownerDocument)}function oy(t,e,n){return t.querySelector(e)?_(t).select(e):_(t).append(n)}function sy(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function ly(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function cy(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function uy(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function fy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)dy(t,e[r]);return t}var hy=5,dy=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=hy),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Ke(t)?(Ke(r[e])||(n[e]={}),a<o?dy(r[e],t,a+1,o):n[e]=i[e]):Ye(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function py(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function gy(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function yy(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function my(a,o){return void 0===a&&(a=0),void 0===o&&(o=!1),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,o&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var vy,by=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function xy(t){return Je(t)||en(t)?new U.Text({style:{text:String(t)}}):t}function wy(t){return t*Math.PI/180}function Oy(t){return Number((180*t/Math.PI).toPrecision(5))}function ky(t,e){var t=(t instanceof U.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function My(t,e){if(e)try{var o=t instanceof U.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof U.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=w([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function _y(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function Sy(t,e){return He(t)?t.apply(void 0,O([],w(e),!1)):t}function Ey(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t instanceof ay?t.node().removeChildren():t instanceof U.DisplayObject?t.removeChildren():t instanceof HTMLElement&&(t.innerHTML="")}),t?n(e):(r&&i(e),null)}function Ay(){return null!==vy&&vy.apply(this,arguments)||this}function Ly(e,n){return i(t,r=U.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t,e){var n;this.attr(mn({},this.attributes,t=void 0===t?{}:t)),null!=(n=(t=this.descriptor).render)&&n.call(t,this.attributes,this,e)},t;function t(t){t=r.call(this,fy({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Ay,vy=U.CustomElement);function Ty(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function Py(t){return t.charAt(0).toUpperCase()+t.slice(1)}function jy(t,e,n){void 0===n&&(n="...");t=t instanceof U.Text?t:t.node();"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}Object.defineProperty(Cy.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Cy.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Cy.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Cy.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Cy.fromRect=function(t){return new Cy(t.x,t.y,t.width,t.height)},Cy.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var Ny=Cy;function Cy(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function Ry(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=w([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new Ny(e,n,r-e,i-n)}function By(n,t,e){function r(t){var e=w(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=w([0,0],2))[0],d=s[1],e=Ry(o=t.map(function(t){var e=t.width,t=t.height,n=w([h,d],2),r=n[0],n=n[1],i=w([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new Ny(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return Ry(s=o.map(function(t){var e=t.x,n=t.y,t=Ny.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=Ny.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=Ny.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function Iy(t,e,n){return[]}function Fy(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}function Dy(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r.attr(e);b(t)||b(n)||n===t||(i[e]=n,a[e]=t)}),e?0<Object.keys(i).length?r.animate([i,a],v({fill:"both"},e)):null:("update"in r?r.update(t):r.attr(t),null)}var zy,Wy=function(e,n){return function(t){return e*(1-t)+n*t}};function Gy(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?Wy(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=Gy(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];e in n?r[e]=Gy(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function Hy(t,e){var n=e?"visibility":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t instanceof U.DisplayObject&&e(t,n)})}(t,function(t){t.attr("visible",n)})}function Vy(){return null!==zy&&zy.apply(this,arguments)||this}i(Vy,zy=U.Group),Vy.prototype.appendChild=function(t,e){return this.destroyChildren(),Hy(t,!1),zy.prototype.appendChild.call(this,t,e)};i(Yy,qy=U.CustomElement),Yy.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},Yy.prototype.update=function(t,e){return this.attr(fy({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},Yy.prototype.clear=function(){this.removeChildren()},Yy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},Yy.prototype.attributeChangedCallback=function(){},Yy.prototype.bindEvents=function(t,e){};var qy,c=Yy;function Yy(t){return qy.call(this,t)||this}function $y(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function Uy(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function Xy(t,e,n){return[["M",t-n,e],["L",t+n,e]]}l=$y,fs=Xy;function Ky(t){n="default",$e(e=t)&&e instanceof Image?n="image":He(e)?n="symbol":Je(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(Jy,Zy=c),Jy.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=(t.class,et(t,["x","y","symbol","size","class"])),l=Ky(a);Ey(!!l,_(e),function(t){t.maybeAppendByClassName("marker",l).addClassName("".concat(l,"-marker")).call(function(t){var e,n;"image"===l?t.styles({img:a,width:e=2*o,height:e,x:-o,y:-o}):(e=o/2,n=He(a)?a:Jy.getSymbol(a),t.styles(v({path:null==n?void 0:n(r,i,e)},s)))})})},Jy.MARKER_SYMBOL_MAP=new Map,Jy.registerSymbol=function(t,e){Jy.MARKER_SYMBOL_MAP.set(t,e)},Jy.getSymbol=function(t){return Jy.MARKER_SYMBOL_MAP.get(t)};var Zy,Qy=Jy;function Jy(){return null!==Zy&&Zy.apply(this,arguments)||this}Qy.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),Qy.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Qy.registerSymbol("line",Uy),Qy.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Qy.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),Qy.registerSymbol("circle",$y),Qy.registerSymbol("point",l),Qy.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),Qy.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),Qy.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),Qy.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Qy.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),Qy.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),Qy.registerSymbol("line",Uy),Qy.registerSymbol("dot",Xy),Qy.registerSymbol("dash",fs),Qy.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),Qy.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),Qy.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),Qy.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),Qy.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(nm,tm=c),nm.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=w(Yg(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=oy(e,".tag-content","g").attr("className","tag-content").node(),y=oy(g,".tag-marker",function(){return new Qy({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(_(g).maybeAppendByClassName("tag-text","text").styles(v(v({fontFamily:"sans-serif",fontSize:12,text:b(o)?"":"".concat(o),x:m,y:y},s),{textBaseline:"middle"})).call(function(t){o||t.remove()}),u=i,m=h,y=f||"start",s=t||"top",t=(f=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),g.getLocalBounds());_(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:(g.style.zIndex||0)-1,y:y.min[1]-h,x:y.min[0]-i,width:null!==c?i+d+2*y.halfExtents[0]:0,height:null!==c?h+p+2*y.halfExtents[1]:0,radius:null!=l?l:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},c))},nm.tag="tag",nm.defaultOptions={style:{padding:4,spacing:4}};var tm,em=nm;function nm(t){return tm.call(this,mn({},nm.defaultOptions,t))||this}var rm,im,am={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},om={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},sm={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function lm(t){var n=rm.call(this,fy({},lm.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function cm(t){return im.call(this,mn({},cm.defaultOptions,t))||this}i(lm,rm=c),Object.defineProperty(lm.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(lm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=on(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(lm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),lm.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=mn({},bn(am,[n,e]),Zg(bn(om,[t,e]),r),Zg(bn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in sm[e]&&(i[t]=bn(sm,[e,t]))}),Object.keys(sm.strict[e]).forEach(function(t){i[t]=bn(sm,["strict",e,t])}),mn(i,Zg(bn(this.attributes,e),"disabled"))),i},lm.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.marker,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(Yg(r),4)),a=(r[0],r[1]),o=(r[2],r[3]),s=this.buttonHeight,l=this.getStyle("markerStyle"),c=this.markerSize,r=oy(e,".marker",function(){return new Qy({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},l),{symbol:i,x:o+c/2,y:s/2,size:c}))}).node().getLocalBounds(),u=this.getStyle("textStyle"),r=(this.textShape=oy(e,".text","text").attr("className","text").styles(v(v({x:c?r.max[0]+t:o,y:s/2},u),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),u=this.getStyle("buttonStyle");_(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},u),{height:s,width:o+(c?c+t:0)+2*r.halfExtents[0]+a}))},lm.prototype.update=function(t){this.attr(mn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},lm.prototype.setState=function(t){this.update({state:t})},lm.prototype.hide=function(){this.style.visibility="hidden"},lm.prototype.show=function(){this.style.visibility="visible"},lm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},lm.tag="button",lm.defaultOptions={style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},i(cm,im=c),cm.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=w(Yg(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=oy(e,".container","g").styles({className:"container",x:n+t,y:r+i}),d=0,p=0,g=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new em({className:"breadcrumb-item",style:v(v({x:d,y:p,text:b(n.text)?n.id:n.text,textStyle:l},gn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,b(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new U.Text({className:"".concat(cm.tag,"-separator"),id:"".concat(cm.tag,"-separator-").concat(t),style:v(v(v(v({},Xg),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},cm.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},cm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},cm.tag="breadcrumb",cm.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},Xg),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(hm,um=U.DisplayObject),hm.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},hm.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},hm.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},hm.prototype.createLines=function(t){_(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})},hm.prototype.createAreas=function(t){_(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})};var um,fm=hm;function hm(t){var e=this,n=t.style,t=et(t,["style"]);return(e=um.call(this,mn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new U.Group({name:"lines"})),e.areasGroup=e.appendChild(new U.Group({name:"areas"})),e.render(),e}i(gm,dm=U.DisplayObject),gm.prototype.render=function(){var t=this.attributes.columns;_(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})},gm.prototype.update=function(t){this.attr(mn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},gm.prototype.clear=function(){this.removeChildren()};var dm,pm=gm;function gm(t){var e=this,n=t.style,t=et(t,["style"]);return(e=dm.call(this,mn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new U.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function ym(t){return 0===t.length?[0,0]:[Qe(function(t,e){if(Ye(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return Qe(t)||0})),Ze(function(t,e){if(Ye(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Ze(t)||0}))]}function mm(t){for(var e=fn(t),n=e[0].length,t=w([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function vm(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=le([0,0],c,x=t[s]),u=ce([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=ue(m=de([0,0],d,h),m,e),0!==(y=(p=fe(x,h))+(g=fe(x,d)))&&(p/=y,g/=y),y=ue([0,0],m,-p),m=ue([0,0],m,g),v=se([0,0],x,y),b=le([0,0],b=se([0,0],x,m),ce([0,0],d,x)),b=ce([0,0],b,le([0,0],d,x)),v=le([0,0],v=se([0,0],x,y=ue([0,0],y=de([0,0],b,x),-p/g)),ce([0,0],h,x)),v=ce([0,0],v,le([0,0],h,x)),b=se([0,0],x,m=ue([0,0],m=de([0,0],x,v),g/p)),o&&(v=le([0,0],v=ce([0,0],v,c),u),b=le([0,0],b=ce([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function bm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return O([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function xm(t,e){if(void 0===e&&(e=!1),t.length<=2)return bm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];vn(a,n.slice(-2))||n.push.apply(n,O([],w(a),!1))}var o=vm(n,!1);return e?o.unshift(O(["M"],w(t[r-1]),!1)):o.unshift(O(["M"],w(t[0]),!1)),o}function wm(t,e,n){t=fn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Mm,Om=c),Object.defineProperty(Mm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=fn(t),en(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"data",{get:function(){return this.attributes.isStack?mm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=Qg(this.attributes,"area"),p=Qg(this.attributes,"line"),u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=w(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=w([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),tn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=xm(o),l=void 0,l=0===i?wm(s,e,n):(a=xm(t[i-1],!0),o=o[0],a[0][0]="L",O(O(O([],w(s),!1),w(a),!1),[O(["M"],w(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=bm(t[i]),s=void 0,s=0===i?wm(o,e,n):((a=bm(t[i-1],!0))[0][0]="L",O(O(O([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=h,l=u,c=g,t.map(function(t){return wm((s?xm:bm)(t),l,c)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(h?xm:bm)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Mm.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=Qg(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=mm(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(ym(s),2),n=e[0],e=e[1],u=new Gp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Mm.prototype.render=function(t,e){this.containerShape=oy(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=oy(e,".".concat(r),function(){return new("line"===n?fm:pm)({className:r,style:i})}).styles(i).node()},Mm.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},Mm.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Mm.prototype.getColor=function(t){var e=this.attributes.color;return Ye(e)?e[t%e.length]:He(e)?e.call(null,t):e},Mm.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=w(ym(t),2),s=o[0],o=o[1],s=new Gp({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new Gp({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Tp({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},Mm.tag="sparkline",Mm.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Om,km=Mm;function Mm(t){return Om.call(this,mn({},Mm.defaultOptions,t))||this}var _m,Sm={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},Em={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},Am={orient:"horizontal",type:"start",showLabel:!0},Lm=Ty({labelGroup:"label-group",label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Tm=Ly({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,et(t,["size","radius","orient","class"])),a=2.4*n,r=_(e).maybeAppendByClassName(Lm.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Lm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Lm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),Pm=(i(jm,_m=c),jm.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(ey(Qg(this.attributes,"label"),[]),2),i=r[0],r=r[1];Ey(!!n,_(t).maybeAppendByClassName(Lm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Lm.label,"text").styles(v(v({},Em),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},jm.prototype.renderIcon=function(t){var e=this.attributes,n=e.iconShape,n=void 0===n?function(){return new Tm({style:r})}:n,e=e.orient,r=v(v({orient:e},Sm),Qg(this.attributes,"icon"));this.icon=_(t).maybeAppendByClassName(Lm.icon,n).update(r)},jm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},jm);function jm(t){return _m.call(this,fy({},{style:Am},t))||this}i(Rm,Nm=c),Object.defineProperty(Rm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=Qg(this.attributes,"sparkline")).padding,t=et(t,["padding"]),e=(i=w(Yg(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.trackLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"availableSpace",{get:function(){var t=w(Yg(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),Rm.prototype.getValues=function(){return this.values},Rm.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attr("values",t=void 0===t?[0,0]:t);t=!1!==e&&this.animation;Dy(this.selectionShape.node(),this.selectionCfg,t),Dy(this.startHandle.node(),this.getHandleShapeCfg("start"),t),Dy(this.endHandle.node(),this.getHandleShapeCfg("end"),t)},Rm.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.update({values:t}),e&&this.onValueChange(n)},Rm.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=Qg(this.attributes,"track");this.trackShape=_(t).maybeAppendByClassName("slider-track","rect").styles(v(v(v({},this.shape),n),{cursor:e?"crosshair":"default"}))},Rm.prototype.renderSparkline=function(t){var n=this;Ey("horizontal"===this.attributes.orient,_(t).maybeAppendByClassName("slider-sparkline-group","g"),function(t){var e=n.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new km({style:e})}).call(function(t){t.node().update(e)})})},Object.defineProperty(Rm.prototype,"selectionCfg",{get:function(){var t=Qg(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),Rm.prototype.renderSelection=function(t){function e(t){var e="".concat(t,"-handle"),n=r.getHandleShapeCfg(t);return r.foregroundGroup.maybeAppendByClassName(e,function(){return new Pm({style:n})}).style("type",t).update(n)}var r=this;this.foregroundGroup=_(t).maybeAppendByClassName("slider-foreground","g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").styles(this.selectionCfg);this.startHandle=e("start"),this.endHandle=e("end")},Rm.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},Rm.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return qg(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return qg(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},Rm.prototype.calcMask=function(t){var t=w(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},Rm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=w(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Rm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=Qg(this.attributes,"handle"),a=Qg(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new U.Text({style:v(v(v({visibility:"hidden"},Xg),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},Rm.prototype.getHandleLabelShapeCfg=function(t){var e;return this.attributes.showLabel?(e=Qg(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},Rm.prototype.getHandleIconShapeCfg=function(){var t=this.attributes,e=t.orient,t=t.handleIconShape,n=Qg(this.attributes,"handleIcon"),r=this.getOrientVal(["ew-resize","ns-resize"]),i=this.getHandleSize();return v(v({},n),{shape:t,orient:e,cursor:r,size:i})},Rm.prototype.getHandleShapeCfg=function(t){var e=this.attributes,n=e.showHandle,e=e.showLabel,r=this.calcHandlePosition(t),i=r.x,r=r.y,a=this.calcHandleText(t);return v(v(v({zIndex:3,showLabel:e,visibility:n?"visible":"hidden"},ty(this.getHandleIconShapeCfg(),"icon")),ty(v(v({},this.getHandleLabelShapeCfg(t)),a),"label")),{x:i,y:r})},Rm.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},Rm.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Rm.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},Rm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Rm.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new U.CustomEvent(n,{detail:t}))})},Rm.prototype.bindEvents=function(){var n=this,t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n.onDragStart(e)(t)}),t.on("touchstart",function(t){n.onDragStart(e)(t)})}),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},Rm.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},Rm.tag="slider",Rm.defaultOptions={style:v(v(v({values:[0,1],trackLength:200,trackSize:20,slidable:!0,brushable:!0,scrollable:!0,orient:"horizontal",trackZIndex:-1,trackFill:"#416180",trackOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,showLabel:!0,handleSpacing:2,formatter:function(t){return t}},ty(Am,"handle")),ty(Sm,"handleIcon")),ty(Em,"handleLabel"))};var Nm,Cm=Rm;function Rm(t){var a=Nm.call(this,mn({},Rm.defaultOptions,t))||this;return a.range=[0,1],a.animation={duration:100,fill:"both"},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(ny(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(ny(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new U.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}i(Fm,Bm=c),Object.defineProperty(Fm.prototype,"padding",{get:function(){return Yg(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Fm.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return tn(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Fm.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(Fm.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(Fm.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Fm.prototype,"thumbRadius",{get:function(){var t,e;return this.attributes.isRound?(t=(e=this.availableSpace).width,e=e.height,this.attributes.thumbRadius||this.getOrientVal([e,t])/2):0},enumerable:!1,configurable:!0}),Fm.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},Fm.prototype.getValue=function(){return this.value},Fm.prototype.renderSlider=function(t){var e=this.attributes,n=e.orient,r=e.trackSize,i=e.padding,e=e.slidable,a=w(Jg(this.attributes,["track","thumb"]),2),o=a[0],a=a[1],s=v(v({orient:n,padding:i,slidable:e,trackSize:r,brushable:!1,showHandle:!1,values:this.getValues(),trackLength:this.trackLength,trackRadius:this.trackRadius,selectionRadius:this.thumbRadius},ty(o,"track")),ty(a,"selection"));this.slider=_(t).maybeAppendByClassName("scrollbar",function(){return new Cm({style:s})}).update(s).node()},Fm.prototype.render=function(t,e){this.renderSlider(e)},Fm.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.style.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(tn(t,i,r)),e),this.onValueChange(n)},Fm.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},Fm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Fm.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},Fm.tag="scrollbar",Fm.defaultOptions={style:{value:0,trackSize:10,isRound:!0,slidable:!0,scrollable:!0,orient:"vertical",padding:[2,2,2,2]}};var Bm,Im=Fm;function Fm(t){var a=Bm.call(this,mn({},Fm.defaultOptions,t))||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.style.value;t!==e&&(a.dispatchEvent(new U.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new U.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(ny(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new U.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new U.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new U.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new U.CustomEvent("trackMouseleave",{detail:t.detail}))},a}function Dm(t,e){return Dy(t,{opacity:0},e)}function zm(t,e){t?t.finished.then(e):e()}var Wm={style:{data:[],animate:{duration:100,easing:"ease-in-out-sine",fill:"both"},dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",showArrow:!0,lineArrow:new U.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},Gm=(mn({},Wm,{style:{type:"arc"}}),mn({},Wm,{style:{}}),Ty({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis")),Hm=Ty({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Vm(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function qm(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?Vm(r):e?(i=cy(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=w(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):Vm(t)}function Ym(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=w([qm(t,n),qm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=w([cy(e,o),cy(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function $m(t,e,n){var r=n.animate,i=(n.type,n.center,n.connect),a=n.areaFill;if(n.closed,!(e.length<2)&&a&&i){for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=w([e[l].points,e[l+1].points],2),c=Ym(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}t.selectAll(Hm.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=Sy(t,[t,e,s]);this.attr(t)}).attr("className",Hm.region.name)},function(t){return t.each(function(t,e){Dy(this,Sy(t,[t,e,s]),r.update)})},function(t){return t.each(function(){return ye(this,void 0,void 0,function(){return me(this,function(t){switch(t.label){case 0:return[4,Dm(this,r.exit)];case 1:return t.sent(),this.remove(),[2]}})})})})}}i(Km,Um=c),Km.prototype.render=function(t,e){t.class;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.animate,t.type,t.center,t.areaFill,t.closed,et(t,["class","items","animate","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=w(e),r=n[0];return n.slice(1),v(v({},t),{points:O(O([],w(e),!1),[r],!1)})}):o),l=_(e).maybeAppendByClassName(Hm.lineGroup,"g"),e=_(e).maybeAppendByClassName(Hm.regionGroup,"g");l=l,r=s,i=(n=t).animate,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:qm(t.points,n)}}),l.selectAll(Hm.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").attr("className",Hm.line.name).styles({stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]}).each(function(t,e){t=Sy(v({path:t.path},r),[t,e,a]);this.attr(t)})},function(t){return t.each(function(t,e){Dy(this,Sy(v({path:t.path},r),[t,e,a]),i.update)})},function(t){return t.each(function(){var e;return ye(this,void 0,void 0,function(){return me(this,function(t){switch(t.label){case 0:return[4,null==(e=Dm(this,i.exit))?void 0:e.finished];case 1:return t.sent(),this.remove(),[2]}})})})}),$m(e,o,t)};var Um,Xm=Km;function Km(){return null!==Um&&Um.apply(this,arguments)||this}function Zm(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],Sy(t[1],e)]}))}function Qm(t,e){return e&&He(e)?t.filter(e):t}var Jm=hn(function(t,e){var e=w(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return O([t],w(e.angleRange),!1).join()}),tv=hn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),he([0,0],[(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=wy(Jm(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?O(O([],w(n.startPos),!1),w(n.endPos),!1):O(O(O([],w(n.angleRange),!1),w(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function ev(t,e,n){var t=tv(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var nv=hn(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return O(O([t],w(e.startPos),!1),w(e.endPos),!1).join()}),rv=hn(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=wy(Jm(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return O(O(O([t],w(e.angleRange),!1),[e.radius],!1),w(e.center),!1).join()});function iv(t,e){return("linear"===e.type?nv:rv)(t,e)}function av(t,e){return e-t==360}function ov(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([wy(t),wy(e)],2),u=c[0],c=c[1],f=w(a(u),2),h=f[0],f=f[1],d=w(a(c),2),p=d[0],d=d[1];return(av(t,e)?(u=(c=w(a((c+u)/2),2))[0],c=c[1],"M".concat(h,",").concat(f," A ").concat(l,",").concat(s," 0 1,0 ").concat(u,", ").concat(c," A ").concat(l,",").concat(s," 0 1,0 ").concat(p,", ")):(u=180<o?1:0,c=e<t?0:1,"M".concat(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,","))).concat(d)}function sv(t,e,n,s){var l=e.angleRange,c=e.center,u=e.radius;return t.selectAll(Gm.line.class).data([{path:ov.apply(void 0,O(O(O([],w(l),!1),w(c),!1),[u],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",Gm.line.name).styles(v({angleRange:l,center:c,radius:u},n)).style("path",function(t){return t.path})},function(t){return t.styles(n).transition(function(){var t,r,e,n,i,a=this,o=(n=(e=(e=t=this).attributes).angleRange,o=e.center,e=e.radius,n=O(O(O([],w(n),!1),w(o),!1),[e],!1),o=O(O(O([],w(l),!1),w(c),!1),[u],!1),(e=s.update)?(i=void 0===(i=e.duration)?0:i,r=Gy(n,o),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,e)):(t.attr("__keyframe_data__",n),null));return o&&(o.onframe=i=function(){var t=bn(a.style,"__keyframe_data__");a.style.path=ov.apply(void 0,O([],w(t),!1))},o.onfinish=i),o}).styles({angleRange:l,center:c,radius:u})},function(t){return t.remove()}).styles(n).transitions()}function lv(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function cv(e,t,n,r){function i(t){return e.selectAll(Gm.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(Gm.line.name," ").concat(t.className)}).styles(n).transition(function(t){return Dy(this,lv(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return Dy(this,lv(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.startPos,c=t.endPos,u=t.truncRange,f=t.lineExtension,h=w([l,c],2),d=w(h[0],2),p=d[0],d=d[1],h=w(h[1],2),g=h[0],h=h[1],c=w(f?(l=w([l=l,c=c,f=void 0===(f=f)?[0,0]:f],3),f=(c=w(l[0],2))[0],c=c[1],y=(a=w(l[1],2))[0],a=a[1],m=(l=w(l[2],2))[0],l=l[1],f=(y=w([y-f,a-c],2))[0],a=y[1],c=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),m=(y=w([-m/c,l/c],2))[0],l=y[1],[m*f,m*a,l*f,l*a]):new Array(4).fill(0),4),y=c[0],m=c[1],f=c[2],l=c[3];return u?(c=(a=w(u,2))[0],u=a[1],s=(c=w([p+(g-p)*c,d+(h-d)*c],2))[0],c=c[1],o=(u=w([p+(g-p)*u,d+(h-d)*u],2))[0],u=u[1],s=i([{line:[[p+y,d+m],[s,c]],className:Gm.lineFirst.name},{line:[[o,u],[g+f,h+l]],className:Gm.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,s):i([{line:[[p+y,d+m],[g+f,h+l]],className:Gm.line.name}])}function uv(t,e,n,r){var i,a,o,s,l,c=e.type,r=("linear"===c?cv:sv)(t,e,n,r);return t=t,c=c,n=n,i=(e=e).showArrow,a=e.lineArrow,o=e.truncRange,s=void 0===(s=e.lineArrowOffset)?0:s,l=e.lineArrowSize,c="arc"!==c&&o?t.select(Gm.lineSecond.class):t.select(Gm.line.class),!i||!a||"arc"===e.type&&av.apply(void 0,O([],w(e.angleRange),!1))?c.style("markerEnd",null):((o=xy(a)).attr(n),Fy(o,l,!0),c.style("markerEnd",o).style("markerEndOffset",-s)),r}function fv(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function hv(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=w(iv(t,r),2),n=e[0],e=e[1],t=w(ue([0,0],ev(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function dv(t,e,n,r,i){var a=r.type,o=r.closed,s=r.areaFill,l=r.connect,c=fv(n),u=Qm(e,n.gridFilter),e="segment"===a?hv(u,n):function(t,a,e){var o,s,l=e.controlAngles;if(!(e=fv(a)))throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(l&&0!==l.length)return e=w(e,2),o=e[0],s=e[1],t.map(function(t){var t=w(iv(t.value,a),2),e=t[0],t=t[1],e=w([e-o,t-s],2),n=e[0],r=e[1],i=[];return l.forEach(function(t){var t=wy(t),t=w([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];i.push([n*e-r*t+o,n*t+r*e+s])}),{points:i}});throw new Error("Invalid gridControlAngles")}(u,n,r);t.maybeAppendByClassName(Gm.grid,function(){return new Xm({})}).update(v(v({type:a,animate:i,connect:l,closed:o,center:c},r),{items:e,areaFill:He(s)?u.map(function(t,e){return Sy(s,[t,e,u])}):s}))}Object.defineProperty(gv.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(gv.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),gv.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},gv.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},gv.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},gv.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},gv.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},gv.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},gv.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},gv.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var pv=gv;function gv(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function yv(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function mv(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),w(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-g,u+l+n,f+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(wy(r),h,d)}function vv(t,a){var o;return O([],w(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=mv(new pv,n,i),yv(r=mv(new pv,r,i),[n[0],n[1],n[2],n[3]])||yv(r,[n[0],n[1],n[4],n[5]])||yv(r,[n[4],n[5],n[6],n[7]])||yv(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var bv=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var xv=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=bv,f=2,h=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,O([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==tv(0,n)[1]&&0!==tv(0,n)[0]||(n=ly(t[0]).left,t=ly(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*g/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());vv((l?O(O([l],w(d),!1),[s],!1):O([s],w(d),!1)).filter(function(t){return by(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return vv(t,s).length<1}function a(n){t.forEach(function(t,e){e=Ye(n)?n[e]:n;b(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,e=void 0===(l=e.recoverWhenFailed)||l,l=t.map(function(t){return+(ky(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;e&&a(l)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=r.getTextShape(t[0]),d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),f=Hg(c,e)||1,h=Hg(s,e)||1,d=Hg(l,e),p=(!b(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=w(u,4),m=(y[0],y[1],y[2],y[3],d);h+f<m;m-=f){var v=function(e){return g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=vv(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function wv(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=xv.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Ov(t){for(var e=t;e<0;)e+=360;return e%360}var kv=hn(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return O(O([],w(t),!1),w(e),!1).join()});function Mv(t,e){return ev(t,e.labelDirection,e)}function _v(t,e,n){var r,i=n.labelAlign,e=ky(e,"rotate");return e?+e%180:(e=0,r=Mv(t.value,n),t=tv(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?kv([1,0],r):kv([t[0]<0?-1:1,0],t),_y(n=((n=Oy(e))+360)%180,-90,90)||(n+=180),n))}function Sv(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Mv(t,n),n=Ov(e),e=Ov(Oy(kv([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":_y(n,90,270)?_y(e,90,270)?"start":"end":_y(e,90,270)?"end":"start";if(0===e){if(_y(n,0,90,!1,!0))return"start";if(_y(n,0,90)||_y(n,270,360))return"start"}if(90===e){if(_y(n,0,90,!1,!0))return"start";if(_y(n,90,180)||_y(n,270,360))return"end"}if(270===e){if(_y(n,0,90,!1,!0))return"end";if(_y(n,90,180)||_y(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(_y(n,0,90)||_y(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(Gm.labelItem.class);"text"===(null==n?void 0:n.nodeName)&&_(n).style("textAlign",t)}function Ev(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=Sy(r.labelSpacing,[t,e,n]),s=w([Mv(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=w(se([0,0],ue([0,0],s[0],l+(1===s[1]?Sy(i?a:0,[t,e,n]):0)),iv(t.value,r)),2);return{x:o[0],y:o[1]}}function Av(n){wv(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Sv(+e,t,n)},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&jy(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Lv(t,e,n,r,i,a){var o,s=bn(e,"_elements");0!==s.length&&(o=bn(e,"_transitions"),(e=s.map(function(t){return function(t,e,n,r,i,a){var o=this,s=_(this).append(t.element).attr("className",Gm.labelItem.name).node(),l=(i=w(ey(Zm(i,[t,e,n])),2))[0],c=(i=i[1]).transform,i=et(i,["transform"]);return"text"===(null==s?void 0:s.nodeName)&&s.attr(v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textAlign:"center",textBaseline:"middle"},l)),this.attr(i),zm(s=Dy(this,Ev(t,e,n,r),a),function(){My(o,c),Sv(_v(t,o,r),o,r)}),s}.call(t,t.__data__,0,n,r,i,a)})).forEach(function(t,e){return o[e]=t}),0===e.filter(function(t){return!!t}).length?Av.call(t,r):Promise.all(e).then(function(){Av.call(t,r)}))}function Tv(e,t,l,n,r){var i=Qm(t,l.labelFilter).map(function(t,e,n){return v({element:(r=t,i=e,a=n,s=(o=l).labelFormatter,He(s)?function(){return xy(Sy(s,[r,i,a,Mv(r.value,o)]))}:function(){return xy(r.label||"")})},t);var r,i,a,o,s});return e.selectAll(Gm.label.class).data(i,function(t,e){return"".concat(t.value,"-").concat(t.label)}).join(function(t){return t.append("g").attr("className",Gm.label.name).call(function(t){Lv(e,t,i,l,n,!1)})},function(t){return t.each(function(){_(this).node().removeChildren()}).call(function(t){Lv(e,t,i,l,n,r.update)})},function(t){return t.transition(function(){var t=this,e=Dm(this,r.exit);return zm(e,function(){_(t).remove()}),e})}).transitions()}function Pv(t,e){return ev(t,e.tickDirection,e)}var jv=hn(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return O(O([],w(t),!1),[e],!1).join()});function Nv(t,e,n,r,i,a,o){var s=Pv(t.value,a),a=(l=t,c=e,u=n,s=s,a=(a=a).tickLength,s=w(jv(s,Sy(a,[l,c,u])),2),a=w(s[0],2),l=a[0],c=a[1],u=w(s[1],2),{x1:l,x2:u[0],y1:c,y2:u[1]}),s=a.x1,l=a.x2,c=a.y1,u=a.y2,a=w(ey(Zm(o,[t,e,n])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:s,x2:l,y1:c,y2:u},o)),i.attr(t),r.styles(o)}function Cv(t,e,n,r,i,a){o=_(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=Pv(s.value,u),u="line",f instanceof U.DisplayObject?u=function(){return f}:He(f)&&(u=function(){return Sy(f,[s,l,c,h])});Nv(t,e,n,o.append(u).attr("className",Gm.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=w(iv(t.value,r),2);return Dy(this,{x:e[0],y:e[1]},a)}var Rv={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"},Bv=Ty({text:"text"},"title");function Iv(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function Fv(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}i(Wv,Dv=c),Wv.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(Bv.text.class);if(!a)return new Ny(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(Yg(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=w([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=Iv(e);if(a.includes("i"))return new Ny(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-f],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=w(Yg(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new Ny(h+n,d+e,p-t,g-a)},Wv.prototype.getBBox=function(){return this.title?this.title.getBBox():new Ny(0,0,0,0)},Wv.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,t.class,et(t,["width","height","position","spacing","class"])),u=w(ey(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=w([+f/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=Iv(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=w([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;Ey(!!c.text,e,function(t){l.title=_(t).maybeAppendByClassName(Bv.text,"text").styles(u).call(Fv,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var Dv,zv=Wv;function Wv(t){return Dv.call(this,fy({},{style:Rv},t=void 0===t?{}:t))||this}function Gv(t,e,n){var r,i,a,o,s,l,c,u,t=t.select(Gm.mainGroup.class);return t=t,e=e,i=void 0===(i=(n=n).titlePosition)?"lb":i,a=void 0===(a=n.titleSpacing)?0:a,o=Iv(i),s=(l=t.node().getBBox()).x,l=l.y,c=(t=w(t.node().getBounds().halfExtents,2))[0],t=t[1],u=(e=w(e.node().getBounds().halfExtents,2))[0],e=e[1],s=w([s+c,l+t],2),s=(l=w([s[0],s[1]],2))[0],l=l[1],["start","end"].includes(i)&&"linear"===n.type?(r=n.startPos,n=n.endPos,n=(i=w("start"===i?[r,n]:[n,r],2))[0],r=(i=w(ue([0,0],he([0,0],[-(r=i[1])[0]+n[0],-r[1]+n[1]]),a),2))[0],i=i[1],{x:n[0]+r,y:n[1]+i}):(o.includes("l")&&(s-=c+u+a),o.includes("r")&&(s+=c+u+a),o.includes("t")&&(l-=t+e+a),o.includes("b")&&(l+=t+e+a),{x:s,y:l})}function Hv(t,s,l,c,e){var u,f,n,r;return l.title?(t=w((t=t,n=(r=l).title,r=t.maybeAppendByClassName(Gm.title,function(){return xy(n)}),[t,r]),2),u=t[0],f=t[1],r=function(){var t=f,e=u,n=s,r=l,i=(a=w(ey(a=c),2))[0],a=a[1],o=void 0===(o=a.transform)?"":o,a=et(a,["transform"]);t.styles(i),e.styles(a),a=(i=Gv(n,e,r)).x,n=i.y,e.node().setPosition(a,n),My(t,o)},e.update?((t=f.node().animate([],e.update))?(t.onframe=r,t.onfinish=r):r(),t):(r(),null)):null}i(Yv,Vv=c),Yv.prototype.render=function(e,n,t){var r=Ug(e),i=r.type,a=r.data,o=(r.class,r.dataThreshold),o=void 0===o?100:o,s=(r.crossSize,r.animate),l=(r.title,r.showTitle),c=(r.titleSpacing,r.truncRange),u=(r.truncShape,r.showLine),f=(r.lineExtension,r.lineArrow,r.lineArrowOffset,r.lineArrowSize,r.showTick),h=(r.tickDirection,r.tickLength,r.tickFilter,r.tickFormatter,r.showLabel),d=(r.labelAlign,r.labelDirection,r.labelSpacing,r.labelFilter,r.labelFormatter,r.labelTransforms,r.showGrid),r=(r.gridFilter,r.gridLength,et(r,["type","data","class","dataThreshold","crossSize","animate","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),i=w(Jg("linear"===i?(r.startPos,r.endPos,et(r,["startPos","endPos"])):(r.angleRange,r.radius,r.center,et(r,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),p=i[0],g=i[1],y=i[2],m=i[3],v=i[4],b=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(a,o).filter(function(t){t=t.value;return!(c&&t>c[0]&&t<c[1])}),x=(r=void 0===t?s:t)?"enter"in r||"update"in r||"exit"in r?r:{enter:r,update:r,exit:r}:{enter:!1,update:!1,exit:!1},i=(Ey(d,_(n).maybeAppendByClassName(Gm.gridGroup,"g"),function(t){return dv(t,b,e,v,x)}),_(n).maybeAppendByClassName(Gm.mainGroup,"g")),a=Ey(u,i.maybeAppendByClassName(Gm.lineGroup,"g"),function(t){return uv(t,e,g,x)})||[],o=Ey(f,i.maybeAppendByClassName(Gm.tickGroup,"g"),function(t){return t=t,r=y,i=x,a=Qm(b,(n=e).tickFilter),t.selectAll(Gm.tick.class).data(a,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",Gm.tick.name).transition(function(t,e){return Cv.call(this,t,e,a,n,r,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),Cv.call(this,t,e,a,n,r,i.update)})},function(t){return t.transition(function(){var t=this,e=Dm(this,i.exit);return zm(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],s=Ey(h,i.maybeAppendByClassName(Gm.labelGroup,"g"),function(t){return Tv(t,b,e,m,x)})||[],t=Ey(l,_(n).maybeAppendByClassName(Gm.titleGroup,"g"),function(t){return Hv(t,_(n),e,p,x)});return O(O(O(O([],w(a),!1),w(o),!1),w(s),!1),[t],!1).filter(function(t){return!!t})};var Vv,qv=Yv;function Yv(t){return Vv.call(this,fy({},Wm,t))||this}var $v,Uv={effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(Ma=0)-(ds=6),(gs=0)-ds],["L",Ma+ds,gs],["L",Ma-ds,gs+ds],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},Xv=Ty({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),Kv=(i(Zv,$v=c),Object.defineProperty(Zv.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return tn(void 0===t?0:t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,O([],w(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),Zv.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Zv.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Object.defineProperty(Zv.prototype,"finished",{get:function(){var t,e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),Zv.prototype.getBBox=function(){var t=$v.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new Ny(e,t,i+n.width,r)},Zv.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,t=t.effect,i=this.currPage,a=this.playState,o=(this.finished,this.playWindow),s=this.pageViews;return"idle"!==a||e<0||s.length<=0||e>=s.length||(s[i].setLocalPosition(0,0),this.prepareFollowingPage(e),a={duration:r,easing:t,fill:"both"},i=(s=w(this.getFollowingPageDiff(e),2))[0],r=s[1],this.playState="running",Promise.all([o.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-i,", ").concat(-r,")")}],a)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:this.finished}},Zv.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?{finished:this.finished}:(t=t?(n-1+e)%e:tn(n-1,0,e),this.goTo(t))},Zv.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?{finished:this.finished}:(t=t?(n+1)%e:tn(n+1,0,e),this.goTo(t))},Zv.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(Xv.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},Zv.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},Zv.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,w("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},Zv.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(Xv.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Zv.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orient,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},Zv.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Zv.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(Xv.controller,"g").style("visibility",u?"visible":"hidden");u&&(i=(u=w(Jg(this.attributes,["button","pageNum"]),2))[0],u=u[1],r=(i=w(ey(i),2))[0],i=i[1],e=r.size,n=et(r,["size"]),r=t.maybeAppendByClassName(Xv.prevBtnGroup,"g").styles(i),this.prevBtnGroup=r.node(),a=r.maybeAppendByClassName(Xv.prevBtn,"path"),i=t.maybeAppendByClassName(Xv.nextBtnGroup,"g").styles(i),this.nextBtnGroup=i.node(),[a,i.maybeAppendByClassName(Xv.nextBtn,"path")].forEach(function(t){t.styles(v(v({},n),{transformOrigin:"center"})),Fy(t.node(),e,!0)}),a=t.maybeAppendByClassName(Xv.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(Xv.pageInfo,"text").styles(v(v({},Xg),u)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),r.on("click",function(){o.prev()}),i.on("click",function(){o.next()}))},Zv.prototype.render=function(t,e){e=_(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Zv.prototype.bindEvents=function(){function t(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}var r,i,a,o,e=this;r=function(){return e.render(e.attributes,e)},i=50;this.playWindow.addEventListener(U.ElementEvent.INSERTED,t),this.playWindow.addEventListener(U.ElementEvent.REMOVED,t)},Zv);function Zv(t){t=$v.call(this,fy({},{style:Uv},t))||this;return t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t.contentGroup=t.appendChild(new U.Group({class:Xv.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new U.Group({class:Xv.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Qv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Qy.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),Qy.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),Qy.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var Jv,tb=Ty({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),eb={span:[1,1],marker:function(){return new U.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},nb=(i(rb,Jv=c),Object.defineProperty(rb.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(Je(t)||en(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(rb.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,n=void 0===n?0:n,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(rb.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=w(Yg(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(rb.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(rb.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(Yg(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(rb.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),rb.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=Qg(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(tb.markerGroup,"g"),Ey(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(tb.marker,r).styles(a),Fy(e.markerGroup.node(),i,!0)})},rb.prototype.renderLabel=function(t){var e=this.attributes.label,n=Qg(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(tb.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(tb.label,function(){return xy(e)}).styles(n)},rb.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=Qg(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(tb.valueGroup,"g"),Ey(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(tb.value,function(){return xy(n)}).styles(r)})},rb.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=Qg(this.attributes,"background");this.background=t.maybeAppendByClassName(tb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(tb.background,"rect").styles(v({width:n,height:e},r))},rb.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=w(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),jy(this.labelGroup.select(tb.label.class),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),jy(this.valueGroup.select(tb.value.class),n))},rb.prototype.render=function(t,e){e=_(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},rb);function rb(t){return Jv.call(this,fy({},{style:eb},t))||this}function ib(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var ab,ob=Ty({page:"item-page",navigator:"navigator",item:"item"},"items"),sb={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:yn,mouseenter:yn,mouseleave:yn},lb=(i(cb,ab=c),Object.defineProperty(cb.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=Qg(this.attributes,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],Sy(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),cb.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},cb.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&ib(g,function(t){return t<l})?(r=w([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=w([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&ib(y,function(t){return t<s})?(r=w([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(cb.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),cb.prototype.ifHorizontal=function(t,e){return Qv(this.attributes.orient,t,e)},cb.prototype.flattenPage=function(e){e.querySelectorAll(ob.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(ob.page.class).forEach(function(t){e.removeChild(t).destroy()})},cb.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));_(t).selectAll(ob.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new nb({style:t})}).attr("className",ob.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("mouseenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("mouseleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},cb.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update(v({},"grid"===e?{pageWidth:t-i,pageHeight:n-r}:{}))},cb.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=w(t,2);return{page:t[0],layouts:t[1]}}),u=O([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new U.Group({className:ob.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=Je(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?($e(r[t])||(r[t]=en(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},cb.prototype.renderNavigator=function(t){var e=this.attributes.orient,n=Qg(this.attributes,"nav"),n=v(v({},n),{orient:e});return this.navigator=t.maybeAppendByClassName(ob.navigator,function(){return new Kv({})}).update(n).node(),this.navigator},cb.prototype.getBBox=function(){return this.navigator.getBBox()},cb.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(_(e)),this.renderItems(n.getContainer()),this.adjustLayout())},cb.prototype.dispatchCustomEvent=function(t,e){t=new U.CustomEvent(t,{detail:e});this.dispatchEvent(t)},cb);function cb(t){t=ab.call(this,fy({},{style:sb},t))||this;return t.navigatorShape=[0,0],t}var ub,fb=Ty({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),hb=v(v({},ty(Xg,"label")),{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}),db=(i(pb,ub=c),pb.prototype.render=function(t,e){var n=_(e).maybeAppendByClassName(fb.markerGroup,"g"),n=(this.renderMarker(n),_(e).maybeAppendByClassName(fb.labelGroup,"g"));this.renderLabel(n)},pb.prototype.attributeChangedCallback=function(){this.render(this.attributes,this)},pb.prototype.renderMarker=function(t){var n=this,e=this.attributes,r=e.orient,e=e.markerSymbol,i=void 0===e?Qv(r,"horizontalHandle","verticalHandle"):e;Ey(!!i,t,function(t){var e=Qg(n.attributes,"marker"),e=v({symbol:i},e);n.marker=t.maybeAppendByClassName(fb.marker,function(){return new Qy({})}).update(e)})},pb.prototype.renderLabel=function(t){var s=this,e=this.attributes,l=e.orient,n=e.spacing,c=void 0===n?0:n,n=e.showLabel,u=e.formatter;Ey(n,t,function(t){var e=Qg(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(fb.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(Qv(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(fb.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},pb);function pb(t){return ub.call(this,fy({},{style:hb},t))||this}var gb,xs={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},yb=mn({},xs,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),mb=mn({},xs,ty(hb,"handle"),{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,labelAlign:"value",labelDirection:"positive",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),vb=Ty({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),bb=(i(xb,gb=c),xb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(ey(Qg(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(vb.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(vb.title,function(){return new zv({style:s})}).update(s)},xb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(Jg(this.attributes,["title"]),2),a=w(ey(a[1]),2),o=a[0],a=a[1],o=v(v({},o),{width:i,height:e});this.itemsGroup=t.maybeAppendByClassName(vb.itemsGroup,"g").styles(v({x:n,y:r},a)),this.items=this.itemsGroup.maybeAppendByClassName(vb.items,function(){return new lb({style:{data:[]}})}),this.items.node().update(o)},xb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(xb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new Ny(0,0,n,t)},enumerable:!1,configurable:!0}),xb.prototype.getBBox=function(){return t=this.title.node(),e=this.items.node(),n=(i=t.attributes).position,r=i.spacing,i=i.inset,a=t.getBBox(),o=e.getBBox(),n=Iv(n),r=(t=w(Yg(t.attributes.text?r:0),4))[0],s=t[1],l=t[2],t=t[3],c=(i=w(Yg(i),4))[0],u=i[1],f=i[2],i=i[3],s=(t=w([t+s,r+l],2))[0],r=t[1],t=(l=w([i+u,c+f],2))[0],i=l[1],"l"===n[0]?new Ny(a.x,a.y,o.width+a.width+s+t,Math.max(o.height+i,a.height)):"t"===n[0]?new Ny(a.x,a.y,Math.max(o.width+t,a.width),o.height+a.height+r+i):(c=(u=w([e.attributes.width||o.width,e.attributes.height||o.height],2))[0],f=u[1],new Ny(o.x,o.y,c+a.width+s+t,f+a.height+r+i));var t,e,n,r,i,a,o,s,l,c,u,f},xb.prototype.render=function(t,e){var n=t.width,t=t.height,e=_(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},xb);function xb(t){return gb.call(this,fy({},yb,t))||this}var wb,Ob={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},kb=Ty({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Mb=(i(_b,wb=c),_b.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.style).position,o=(i=w(Yg(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=Qg(this.attributes,"background"),this.background=_(this.group).maybeAppendByClassName(kb.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},_b.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=w(ey(Qg(this.attributes,"label")),2),r=t[0],t=t[1];this.label=_(this.group).maybeAppendByClassName(kb.labelGroup,"g").styles(t),e&&this.label.maybeAppendByClassName(kb.label,function(){return xy(n(e))}).style("text",n(e).toString()).selectAll("text").styles(v(v({},Xg),r))},_b.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},_b.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[O(["M"],w(t[0]),!1),O(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},_b.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,O([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=w([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},_b.prototype.bindEvents=function(){this.label.on(U.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},_b.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},_b);function _b(t){t=wb.call(this,fy({},{style:v({visibility:"hidden"},Ob)},t))||this;return t.point=[0,0],t.group=t.appendChild(new U.Group({})),t.isMutationObserved=!0,t}function Sb(t,e){var t=w(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Eb=Ty({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Ab(t){var e=t.orient,n=t.size,t=t.len;return Qv(e,[t,n],[n,t])}function Lb(t){var e=t.type,t=w(Ab(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Tb(t){var i,a,o,e=t.orient,r=t.color,n=t.block,t=t.partition,s=(l=He(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return U.parseColor(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(Qv(e,"0","270"),")")):""}function Pb(t,e,n){var r,i,a,o=Tb(e),t=t.maybeAppendByClassName(Eb.selection,"path").styles(v({path:Lb(e),fill:o},n)),n=t.maybeAppendByClassName(Eb.clipPath,"path").styles({path:(n=(o=e).orient,(e=o.range)?(i=(o=w(Ab(o),2))[0],o=o[1],r=(e=w(e,2))[0],e=e[1],a=Qv(n,r*i,0),r=Qv(n,0,r*o),i=Qv(n,e*i,i),[["M",a,r],["L",a,a=Qv(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var jb,Nb,Cb,Rb,Bb=Ly({render:function(t,e){var n,r=w(Jg(t,["selection","track"]),2),i=r[0],r=r[1],a=_(e).maybeAppendByClassName(Eb.trackGroup,"g");n=t,r=r,a.maybeAppendByClassName(Eb.track,"path").styles(v({path:Lb(n)},r)),Pb(_(e).maybeAppendByClassName(Eb.selectionGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})),Ib=hn(function(t){return{min:Math.min.apply(Math,O([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,O([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Fb=(i(h,jb=c),Object.defineProperty(h.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),h.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new Ny(0,0,e,t)},h.prototype.render=function(t,e){var n=this,r=(this.renderTitle(_(e)),this.title.node().getAvailableSpace()),i=r.x,r=r.y,t=t.showLabel,e=_(e).maybeAppendByClassName(vb.contentGroup,"g").styles({x:i,y:r}),i=(Ey(!!t,e.maybeAppendByClassName(vb.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(vb.ribbonGroup,"g"));this.handlesGroup=e.maybeAppendByClassName(vb.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(h.prototype,"range",{get:function(){var t=this.attributes.data;return Ib(t)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonRange",{get:function(){var t=w(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),h.prototype.ifHorizontal=function(t,e){return Qv(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},h.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,r=void 0===r?"":r,i=e.width,e=e.height,a=Qg(this.attributes,"title"),o=v(v({width:i,height:e},a),{text:n?r:""});this.title=t.maybeAppendByClassName(vb.title,function(){return new zv({style:o})}).update(o)},Object.defineProperty(h.prototype,"labelFixedSpacing",{get:function(){return this.attributes.labelShowTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(Gm.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new Ny(0,0,t,e)),this.cacheLabelBBox):new Ny(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,len:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,len:0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.title.node().getAvailableSpace(),n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.len,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,len:0},a=t.size,t=t.len,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new Ny(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,len:e},{size:e,len:t})},enumerable:!1,configurable:!0}),h.prototype.renderRibbon=function(t){var e=this.attributes,n=e.type,r=e.orient,i=e.color,a=e.block,e=e.data,o=Qg(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.len,f=f.size;this.ribbon=t.maybeAppendByClassName(vb.ribbon,function(){return new Bb({})}).update(v({x:u,y:s,len:h,size:f,type:n,orient:r,color:i,block:a,partition:e.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o))},h.prototype.getHandleClassName=function(t){return"".concat(vb.prefix("".concat(t,"-handle")))},h.prototype.renderHandles=function(){var e=this,t=this.attributes,n=t.showHandle,t=t.orient,r=Qg(this.attributes,"handle"),r=(r.formatter,et(r,["formatter"])),i=w(this.selection,2),a=i[0],i=i[1],o=v({orient:t},r),s=this;this.handlesGroup.selectAll(vb.handle.class).data(n?[{value:a,type:"start"},{value:i,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new db({})}).attr("className",function(t){return"".concat(vb.handle," ").concat(e.getHandleClassName(t.type))}).styles(o).style("labelText",function(t){return t.value}).each(function(t){var e=_(this);"start"===t.type?s.startHandle=e:s.endHandle=e})},function(t){return t.styles(o).style("labelText",function(t){return t.value})},function(t){return t.remove()})},h.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(h.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new Ny(0,0,0,0);var t=this.startHandle.node().getBBox(),e=t.width,t=t.height,n=this.endHandle.node().getBBox(),r=n.width,n=n.height,e=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new Ny(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],len:n[1]}},enumerable:!1,configurable:!0}),h.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=w(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.attr("formatter",n),null!=e&&e.setLocalPosition(a,r)},h.prototype.renderIndicator=function(t){var e=Qg(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(vb.indicator,function(){return new Mb({style:e})}).update(e)},Object.defineProperty(h.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(v(v({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelStyle",{get:function(){var t=w(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),h.prototype.renderLabel=function(t){var e=Qg(this.attributes,"label"),n=e.formatter,r=e.filtrate,i=(e.filter,e.align),a=e.labelDirection,o=(e.tickLength,e.showTick),o=void 0!==o&&o,e=w(Jg(et(e,["formatter","filtrate","filter","align","labelDirection","tickLength","showTick"]),["tick"]),2),s=e[0],e=e[1],o=v(v(v({type:"linear",startPos:[0,0],endPos:[0,0],data:this.labelData,showLine:!1,showGrid:!1,showTick:o,tickDirection:a,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(s).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["tick".concat(Py(e)),t]}))),Object.fromEntries(Object.entries(e).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["label".concat(Py(e)),t]}))),a={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===i&&(!r||r(t,t.index,n.filter(function(t){return t.type===i})))},labelFormatter:n},l=v(v({},o),a);this.label=t.maybeAppendByClassName(vb.label,function(){return new qv({style:l})}).node(),this.label.update(l,!1)},Object.defineProperty(h.prototype,"labelAxisCfg",{get:function(){var t=this.attributes,e=t.labelDirection,n=t.labelShowTick,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=w([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return n?(o=c,l=a,"positive"===e?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==e||"top"!==i&&"left"!==i||(s=r)):"positive"===e?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==e||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),h.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisCfg).offset,n=r.spacing,r=r.tickLength,a=(i=w(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},h.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},h.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=tn(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(t=this.indicator.node()).setLocalPosition.apply(t,O([],w(a),!1))):this.hideIndicator()},h.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},h.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},h.prototype.setSelection=function(t,e){this.updateSelection(t,e)},h.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[qg(c,r),qg(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(h.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return on(t)?qg(.01*(e-n),0):t},enumerable:!1,configurable:!0}),h.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Sb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},h.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,O([],w(ny(t)),!1));return tn(this.getOffset(i-a,!0),r,n)},h.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.len,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},h.prototype.dispatchSelection=function(){var t=new U.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},h.prototype.dispatchIndicated=function(t,e){t=new U.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([my(100)],h.prototype,"dispatchSelection",null),t([my(100)],h.prototype,"dispatchIndicated",null),h);function h(t){var a=jb.call(this,fy({},mb,t))||this;return a.eventToOffsetScale=new Gp({}),a.innerRibbonScale=new Gp({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Sb(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),w(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function Db(t){Nb||(Nb=document.createElement("table"),Rb=document.createElement("tr"),Cb=/^\s*<(\w+|!)[^>]*>/,Rb={tr:document.createElement("tbody"),tbody:Nb,thead:Nb,tfoot:Nb,td:Rb,th:Rb,"*":document.createElement("div")});var e=Cb.test(t)&&RegExp.$1,e=(e&&e in Rb||(e="*"),Rb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var zb,as="tooltip",Wb="tooltip-title",Gb="tooltip-list",us="tooltip-list-item",Sa="tooltip-list-item-name",ss="tooltip-list-item-marker",Hb="tooltip-list-item-name-label",ls="tooltip-list-item-value",cc="tooltip-crosshair-x",r="tooltip-crosshair-y",la={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},e=((o={})[".".concat(as)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},o[".".concat(Wb)]={color:"rgba(0, 0, 0, 0.45)"},o[".".concat(Gb)]={margin:"0px","list-style-type":"none",padding:"0px"},o[".".concat(us)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},o[".".concat(ss)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},o[".".concat(Sa)]={display:"flex","align-items":"center","max-width":"216px"},o[".".concat(Hb)]=v({flex:1},la),o[".".concat(ls)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},la),o[".".concat(cc)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},o[".".concat(r)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},o),Vb=(i(qb,zb=c),Object.defineProperty(qb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),qb.prototype.getContainer=function(){return this.element},Object.defineProperty(qb.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(qb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(qb.prototype,"items",{get:function(){return this.attributes.items.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=et(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:null!=a?a:e},t)})},enumerable:!1,configurable:!0}),Object.defineProperty(qb.prototype,"HTMLTooltipItemsElements",{get:function(){var r=this.attributes.template,i=[];return this.items.forEach(function(t){var e,n;i.push(Db((e=r.item,n=t,e&&n?e.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):e)))}),i},enumerable:!1,configurable:!0}),Object.defineProperty(qb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return Je(t)?uy(t):sn(t)?t:void 0},enumerable:!1,configurable:!0}),qb.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},qb.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},qb.prototype.clear=function(){this.element.innerHTML=""},qb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},qb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},qb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},qb.prototype.initShape=function(){var t=this.attributes.template;this.element=Db(t.container),this.id&&this.element.setAttribute("id",this.id)},qb.prototype.renderHTMLTooltipElement=function(){var e,r,t=this.attributes,n=t.title,t=t.enterable,i=this.element,a=this.customContent,a=(this.element.style.pointerEvents=t?"auto":"none",this.clear(),a?i.appendChild(a):(t=this.attributes.template,n?(i.innerHTML=t.title,i.getElementsByClassName(Wb)[0].innerHTML=n):null!=(t=null==(a=i.getElementsByClassName(Wb))?void 0:a[0])&&t.remove(),n=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Gb,n.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=i,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];O([r],w(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},qb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},qb.prototype.setOffsetPosition=function(t){var t=w(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat((void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},qb.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},qb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=w(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=w([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},qb.tag="tooltip",qb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(as,'"></div>'),title:'<div class="'.concat(Wb,'"></div>'),item:'<li class="'.concat(us,'" data-index={index}>\n <span class="').concat(Sa,'">\n <span class="').concat(ss,'" style="background:{color}"></span>\n <span class="').concat(Hb,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(ls,'" title="{value}">{value}</span>\n </li>')},style:e}},t([my(100)],qb.prototype,"updatePosition",null),qb);function qb(t){t=zb.call(this,mn({},qb.defaultOptions,t))||this;return t.visibility="visible",t.initShape(),t.render(t.attributes,t),t}var Yb,$b={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Ub(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function Xb(t){return Yb.call(this,mn({},Xb.defaultOptions,t))||this}i(Xb,Yb=c),Xb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=_(e).maybeAppendByClassName("switch-content","g").node(),l=e.getLocalBounds(),n=bn($b,n,$b.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&_(e).maybeAppendByClassName("switch-tag",function(){return new em({})}).call(function(t){var e,t=t.node(),n=(t.update(mn({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),_(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=_(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();_(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=Ub(p,a,o),r=Ub(p,a,!o);t.attr("x")&&!vn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},Xb.tag="switch",Xb.defaultOptions={style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var Kb,Zb,Qb,Jb,n={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},os=fy({},n,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),aa=fy({},n,{type:"circle",defaultRadius:0}),cs=fy({},n,{type:"polygon",defaultRadius:0,startAngle:0}),ca=(i(t2,Kb=c),Object.defineProperty(t2.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(t2.prototype,"tagCfg",{get:function(){var t=Qg(this.attributes,"tag");return t.position,et(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(t2.prototype,"crosshairCfg",{get:function(){var t=Qg(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),t2.prototype.render=function(t,e){var n=this,e=_(e).maybeAppendByClassName(".crosshair-group","g").node();this.shapesGroup=e,this.tagShape=_(e).maybeAppend(".crosshair-tag",function(){return new em({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=_(e).maybeAppendByClassName(".crosshair-path","path").node().attr(this.crosshairCfg),this.adjustLayout()},t2.prototype.update=function(t){this.attr(mn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},t2.prototype.setPointer=function(t){this.pointer=t},t2.tag="crosshair-base",t2.defaultOptions={style:n},t2);function t2(t){return Kb.call(this,mn({},t2.defaultOptions,t))||this}function e2(t){return Zb.call(this,fy({},e2.defaultOptions,t))||this}function n2(t){return Qb.call(this,fy({},n2.defaultOptions,t))||this}function r2(t){return Jb.call(this,fy({},r2.defaultOptions,t))||this}i(e2,Zb=ca),Object.defineProperty(e2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"tagShapeSpace",{get:function(){var t=sy(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),e2.prototype.update=function(t){Zb.prototype.update.call(this,t)},e2.prototype.setPointer=function(t){Zb.prototype.setPointer.call(this,t),this.adjustPosition()},e2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},e2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},e2.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},e2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},e2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},e2.tag="line-crosshair",e2.defaultOptions={style:os},t([my(20)],e2.prototype,"setPointer",null),i(n2,Qb=ca),Object.defineProperty(n2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),n2.prototype.update=function(t){Qb.prototype.update.call(this,t)},n2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(Qb.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},n2.prototype.adjustLayout=function(){this.tagShape.hide()},n2.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return $y(r,n,t||e)},n2.tag="circle-crosshair",n2.defaultOptions={style:aa},t([my(20)],n2.prototype,"setPointer",null),i(r2,Jb=ca),Object.defineProperty(r2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),r2.prototype.update=function(t){Jb.prototype.update.call(this,t)},Object.defineProperty(r2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),r2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(Jb.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=yy(n,[t,e])/yy(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},r2.prototype.adjustLayout=function(){this.tagShape.hide()},r2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(ue([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},r2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],f=this.points,t=w(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=w(f[p-1],2),y=g[0],g=g[1],m=w(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(y=w(y,2))[0],y=y[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(py(m,a,r,i,o,y)&&gy(l,o,y),py(m,a,r,i,s,g)&&gy(l,s,g),py(o,s,y,g,m,r)&&gy(l,m,r),py(o,s,y,g,a,i))&&gy(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=w(y,2))[0],n=s[1])}return[e,n]},r2.tag="polygon-crosshair",r2.defaultOptions={style:cs},t([my(20)],r2.prototype,"setPointer",null);i(s2,i2=U.DisplayObject),Object.defineProperty(s2.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Ye(t)?t.map(function(t){return Ye(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=w(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),s2.prototype.update=function(t){var e=this;this.attr(fy({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new U.Path({style:t}))})},s2.prototype.clear=function(){this.removeChildren()},s2.prototype.getLinePos=function(t){var e=w(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=w([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=w([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=w([0,a*r],2))[0],n):(s=(t=w([0,a*e+i/2],2))[0],t))[1];return[s,o]},s2.prototype.getLinePath=function(t){var e=this.attributes.width,t=w(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},s2.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=w(this.getLinePos(t),2),a=i[0],i=i[1],o=w([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=w([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=w([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=w([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},s2.prototype.getWavyPath=function(t){return[]},s2.tag="decoration",s2.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var i2,a2,o2=s2;function s2(t){t=i2.call(this,fy({},s2.defaultOptions,t))||this;return t.update({}),t}function l2(t){t=a2.call(this,fy({},l2.defaultOptions,t))||this;return t.init(),t}i(l2,a2=c),Object.defineProperty(l2.prototype,"textWidth",{get:function(){var e=this;return Ze(this.renderText.split("\n").map(function(t){return Gg(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"textHeight",{get:function(){return sy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"height",{get:function(){var t=this.attributes.height;return en(t)&&0!==t?t:sy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Vg(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Vg(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Wg(t,en(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&en(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"font",{get:function(){return gn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},Xg),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return fy({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),l2.prototype.init=function(){this.initShape(),this.update({})},l2.prototype.update=function(t){this.attr(fy({},this.attributes,t)),this.render()},l2.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new o2({style:t}))})},l2.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},l2.prototype.initShape=function(){this.backgroundShape=new U.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new U.Group({name:"decoration-group"}),this.textShape=new U.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},l2.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&en(n)&&"clip"===e&&(this.clipRect=new U.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},l2.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;en(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},l2.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},l2.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},l2.tag="paragraph",l2.defaultOptions={style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var c2,ua=v(v({},Xg),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),u2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},f2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function h2(t){return c2.call(this,mn({},h2.defaultOptions,t))||this}i(h2,c2=c),h2.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,oy(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=cn({},this.checked?u2.selected:u2.default,r),r=cn({},f2,i),t=(this.checkboxBoxShape=oy(a,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(a.style.zIndex||0)-1},e)).node(),oy(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},r)),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;oy(a,".checkbox-label","text").styles(v({className:"checkbox-label",x:e,y:r},n))},h2.tag="checkbox",h2.defaultOptions={style:{x:0,y:0,label:v({text:""},ua),spacing:4,checked:!1}};var d2="gui-poptip",p2="gui-poptip-arrow",g2="gui-poptip-text",y2=((a={})[".".concat(d2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(g2)]={"text-align":"center"},a[".".concat(d2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(d2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(d2,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(d2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(d2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(d2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(d2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(d2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(d2,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(d2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(d2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(d2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(p2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(d2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(p2)]={bottom:"-2px"},a[".".concat(d2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(p2)]={right:"-2px"},a[".".concat(d2,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(p2)]={left:"-2px"},a[".".concat(d2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(p2)]={top:"-2px"},a[".".concat(d2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(p2)]={left:"10px",bottom:"-2px"},a[".".concat(d2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(p2)]={right:"10px",bottom:"-2px"},a[".".concat(d2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(p2)]={right:"-2px",top:"8px"},a[".".concat(d2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(p2)]={right:"-2px",bottom:"8px"},a[".".concat(d2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(p2)]={left:"-2px",top:"8px"},a[".".concat(d2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(p2)]={left:"-2px",bottom:"8px"},a[".".concat(d2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(p2)]={top:"-2px",left:"8px"},a[".".concat(d2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(p2)]={top:"-2px",right:"8px"},a),m2=void 0;var v2;function b2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function x2(t){var n,r;return n=b2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(m2,t)}(t)}function w2(t){t=v2.call(this,mn({style:{id:"gui-poptip"}},w2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(w2,v2=c),Object.defineProperty(w2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),w2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},w2.prototype.update=function(t){this.attr(mn({},this.style,t)),this.render(this.attributes,this)},w2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=et(i,["html","target"]),n=cn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},w2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},w2.prototype.clear=function(){this.container.innerHTML=""},w2.prototype.destroy=function(){var t,e=this;O([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},w2.prototype.showTip=function(t,e,n){var r,i=bn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(g2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},w2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},w2.prototype.getContainer=function(){return this.container},w2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(d2).concat(t?" ".concat(t):"")},w2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=x2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},w2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(p2,'"></span>'));t.innerHTML=n,Je(r)?t.innerHTML+=r:r&&sn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(g2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},w2.prototype.applyStyles=function(){var t,e=fy({},y2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},w2.prototype.setOffsetPosition=function(t,e,n){var n=w(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},w2.tag="poptip",w2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:y2,template:'<div class="'.concat(g2,'"></div>')}};i(k2,O2=U.Group),Object.defineProperty(k2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Yg(t)},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Yg(t)},enumerable:!1,configurable:!0}),k2.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new Ny(e-i,n-a,r+i+o,t+a+s)},k2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,O2.prototype.appendChild.call(this,t,e),t},k2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new Ny(n+o,r+s,e-n-i,t-r-a)},k2.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:By,grid:Iy})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},k2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},k2.prototype.destroy=function(){this.removeAllEventListeners()},k2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=e:"padding"===t&&(this.padding=e),this.layout()};var O2,ha=k2;function k2(t){var e=O2.call(this,t)||this,t=(e.layoutEvents=[U.ElementEvent.BOUNDS_CHANGED,U.ElementEvent.INSERTED,U.ElementEvent.REMOVED],e.$margin=Yg(0),e.$padding=Yg(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}function M2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return N1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=g0(l,t),t=g0(t,i),i=g0(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),N1()(s)}const _2=sg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=rt(e,"background"),h=f["padding"],f=et(f,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").call(A,e).node(),n=M2(it(t).maybeAppend("background","rect").style("zIndex",-1).call(A,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(A,o?f:{}).node(),i,p,u),r=l&&new Qy({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new Qy({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(A,s?d:{})}),S2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(P0(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return it(new _2).style("x",i).style("y",o).call(A,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).call(A,l).node()}};S2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const E2=sg(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(it(t).maybeAppend("marker",()=>new Qy({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(A,e)}),A2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new E2).call(A,a).style("x",r).style("y",o).call(A,e).call(A,s).node()}},L2=(A2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},sg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new U.Path({})).style("d",n).call(A,i),it(t).maybeAppend("area-path",()=>new U.Path({})).style("d",e).call(A,r)}));const T2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=et(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=P0(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=N0(c,e),n=l&&n?A0(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=rt(s,"connect"),i=!!o.length,n=t=>it(new U.Path({})).style("d",t).call(A,s).node();return wu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=C1().curve(R1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return F1(a())},delete t.lineX0,t.lineEndAngle=function(){return F1(o())},delete t.lineX1,t.lineInnerRadius=function(){return F1(s())},delete t.lineY0,t.lineOuterRadius=function(){return F1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I1(t)):e()._curve},t.angle((t,e)=>m0(p0(r[e],n))).outerRadius((t,e)=>g0(r[e],n)).innerRadius((t,e)=>g0(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new L2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(xu(c)?C1().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(f)):C1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new L2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},P2=(T2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=wu(n)?X1:T1;return T2(Object.assign({curve:i},a))(t,e,n,r)}),j2=(P2.props=Object.assign({},T2.props),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=wu(n)?$1:q1;return T2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),N2=(j2.props=Object.assign({},T2.props),i=>(t,e,n,r)=>T2(Object.assign({curve:Z1},i))(t,e,n,r)),C2=(N2.props=Object.assign({},T2.props),i=>(t,e,n,r)=>T2(Object.assign({curve:Q1},i))(t,e,n,r)),R2=(C2.props=Object.assign({},T2.props),i=>(t,e,n,r)=>T2(Object.assign({curve:J1},i))(t,e,n,r)),B2=(R2.props=Object.assign({},T2.props),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=P0(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=b1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=S0(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new U.Path).call(A,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(A,c).node()}}),I2=(B2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=b1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),it(new U.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}});I2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const F2=t=>{const{cornerRatio:u=1/3}=t,f=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=P0(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=b1(),wu(o)?(i=g0(t,c=o.getCenter()),i=(g0(e,c)-i)*n+i,a.moveTo(t[0],t[1]),E0(a,t,e,c,i)):xu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return it(new U.Path).call(A,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(A,f).node()}},D2=(F2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=b1();return t.moveTo(e[0],e[1]),wu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):E0(t,e,i,x0(e,i),g0(e,i)/2),it(new U.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}}),z2=(D2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new U.Image).call(A,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(A,u).node()}});z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const W2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=P0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=b1();if(wu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>g0(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?E0(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return it(new U.Path).call(A,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(A,l).node()}};W2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const G2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=P0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=b1();return wu(e)?(n=g0(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),E0(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),E0(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return it(new U.Path).call(A,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(A,l).node()}};G2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const H2=t=>{const y=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=P0(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=b1(),wu(t)?([i,a]=t=t.getCenter(),o=y0(p0(r[0],t)),s=y0(p0(r[1],t)),g=g0(t,r[2]),l=g0(t,r[3]),c=g0(t,r[8]),u=g0(t,r[10]),t=g0(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return it(new U.Path).call(A,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(A,y).node()}};H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const V2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,wu(t=n)?(t=t.getCenter(),E1()({startAngle:0,endAngle:2*Math.PI,outerRadius:g0(a[0],t),innerRadius:g0(a[1],t)})):N1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,wu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new U.Path({})).call(A,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(A,s).node()}};function q2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}V2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Y2=sg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,N1().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Qy({className:"marker",style:Object.assign(Object.assign({},i),{symbol:q2})}):null).call(A,e)});const $2=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=P0(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(xu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return it(new Y2).call(A,o).style("points",n).style("stroke",r||i).style("transform",e).call(A,c).node()}};function U2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=vf(a.x,c),i=vf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function X2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=T0(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=Z2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?K2(s,h,n):x0(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function K2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function Z2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function Q2(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=T0(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:Z2(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=K2(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function J2(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function tx(t,e,n,r){var i=n["bounds"];return 1===i.length?J2(0,0,n):(Ou(r)?X2:Su(r)?Q2:U2)(t,e,n,r)}function ex(t,e,n){var{innerRadius:n,outerRadius:t}=T0(n,t,[e.y,e.y1]);return n+(t-n)}function nx(t,e,n){var{startAngle:n,endAngle:t}=T0(n,t,[e.y,e.y1]);return(n+t)/2}function rx(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),h=nx(e,n,r),d=0<Math.sin(h)?1:-1,i=Z2(h,i,a),a={textAlign:0<d||Ou(r)?"start":"end",textBaseline:"middle",rotate:i},i=ex(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=K2(t,e,n),[t,r]=K2(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}$2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ix=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=lu(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=y0(p0(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}},bottom:tx,bottomLeft:tx,bottomRight:tx,inside:tx,left:tx,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?J2(0,0,n):(Ou(r)?X2:Su(r)?rx:U2)(t,e,n,r)},right:tx,spider:function(t,e,n,r){var i,a,o,s,l,c;return Su(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(rx(0,e,n,r),[]),s=r.getCenter(),l=ex(e,n,r),e=nx(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return Su(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(rx(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(Su(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=m0([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=K2(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:tx,topLeft:tx,topRight:tx});function ax(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:Su(o)?"inside":xu(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=ix[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const ox=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=ax(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new _2).call(A,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).node()},sx=(ox.props={},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(P0(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new U.Path).call(A,r).style("d",i).style(s,a).call(A,l).node()}}),lx=(sx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>sx(Object.assign({colorAttribute:"fill"},t))),cx=(lx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>sx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),ux=(cx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),fx=(ux.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),hx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:fx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:fx.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:fx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:fx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:fx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:fx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:fx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:fx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:fx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:fx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:fx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:fx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:fx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:fx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:fx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:fx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:fx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleSpacing:0,gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:fx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:fx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:fx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:fx.BLACK,navButtonFillOpacity:.65,navPageNumFill:fx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:fx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:fx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:fx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:fx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",labelShowTick:!0,labelSpacing:8},label:{fill:fx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:fx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:fx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:fx.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:fx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:fx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,trackStroke:"none",thumbFill:"#000",thumbFillOpacity:.15,thumbStroke:"none",thumbHighlightedFillOpacity:.2},title:{titleFill:fx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:fx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},p=(hx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),dx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:p.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:p.BLACK,lineWidth:1}},text:{text:{fill:p.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:p.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:p.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:p.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:p.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:p.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:p.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:p.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:p.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:p.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:p.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:p.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:p.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:p.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:p.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:p.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:p.BLACK,navButtonFillOpacity:.45,navPageNumFill:p.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:p.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:p.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:p.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:p.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:p.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:p.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:p.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:p.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:p.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:p.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:p.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:p.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},px=(dx.props={},dx.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),gx=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:px.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:px.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:px.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:px.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:px.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:px.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:px.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:px.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:px.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:px.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:px.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:px.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:px.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,line:!0,lineStroke:"#888",lineStrokeOpacity:1,lineLineWidth:1,lineArrow:null,tickStroke:px.STROKE,tickStrokeOpacity:1,tickLineWidth:1,tickLength:5,labelFill:px.BLACK,labelFillOpacity:1,labelFontSize:10,labelAutoRotate:!1,labelFontWeight:"normal",labelSpacing:4,labelAlign:"horizontal",gridStroke:"#ddd",gridStrokeOpacity:1,gridLineWidth:1,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom",labelSpacing:8,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:4,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:px.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemLabelFill:px.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemValueFill:px.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:px.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:px.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,backgroundFill:"transparent"},continuousLegend:{showTitle:!1,labelFill:px.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:px.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:px.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:px.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},label:{fill:px.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:null,offset:12,connectorStroke:px.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:px.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:px.STROKE,backgroundFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:px.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:px.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:px.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:px.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function yx(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}gx.props={};var mx,vx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bx(t){var e;if(e=vx.exec(t))return new xx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function xx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function wx(t,e){var n,e=yx(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}bx.prototype=xx.prototype,xx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ox={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>wx(100*t,e),r:wx,s:function(t,e){var n,r,i=yx(t,e);return i?(n=i[0],(i=(i=i[1])-(mx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+yx(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function kx(t){return t}var Mx,_x=Array.prototype.map,Sx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ex(t){var e,s,l,O=void 0===t.grouping||void 0===t.thousands?kx:(s=_x.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",k=void 0===t.decimal?".":t.decimal+"",M=void 0===t.numerals?kx:(e=_x.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=bx(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):Ox[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=Ox[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?Sx[8+mx/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?k+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=O(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=O(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return M(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=bx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=yx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Sx[8+e/3];return function(t){return n(r*t)+i}}}}function Ax(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function Lx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Tx(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}da=Ex({thousands:",",grouping:[3],currency:["$",""]}),Mx=da.format,da.formatPrefix;class Px extends ha{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function jx(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function Nx(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orient:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function Cx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Rx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=zc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Gp({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return _u(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Gp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Gp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return wu(s)||xu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:xu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),Ou(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function Bx(t,e,n){var r;return!(wu(r=e)&&xu(r)||Mu(e))&&(void 0===t?!!n.getTicks:t)}function Ix(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+df(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive",labelTransform:"center"===r?"translate(50%, 0)":"",tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var Fx,pa=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?Mx(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const Dx=pa(t=>{const{direction:f="left",important:h={},labelFormatter:d=t=>""+t,orientation:p,position:g,tickCount:y,tickFilter:m,tickMethod:v,title:b,style:x}=t,w=et(t,["direction","important","labelFormatter","order","orientation","position","size","tickCount","tickFilter","tickMethod","title","transform","style"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],i=Rx(t,i,y,d,m,v,g,n),r=Ix(0,0,r,f,g,p),{labelAutoRotate:a=!0,labelAutoHide:o=!1,label:s=!0,tick:l=!0,line:c=!1,grid:u}=Object.assign({},r,w),u=Bx(u,n,t),t=function(t,e){var[e,n]=Cx(e);return t.includes("bottom")||t.includes("top")?n:e}(g,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o],showLine:!0};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o],showLine:!0};if("number"==typeof e){var[t,a]=r.getCenter(),[s,l]=Eu(r);const[u,f]=Au(r);var r=o/2,o=s*r,s=l*r,[l,r]=[t+n,a+i],[e,c]=[Math.cos(e),Math.sin(e)];return{startPos:[l+s*e,r+s*c],endPos:[l+o*e,r+o*c],gridClosed:f-u==360,gridCenter:[t+n,i+a],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(g,p,e,n),{showLine:n=c}=e,c=et(e,["showLine"]),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),x),{type:"linear",data:i,title:Lx(b),showLabel:s,labelTransforms:(e=a,r=[],o&&r.push({type:"hide"}),e&&r.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),r),showGrid:u,showTick:l,gridLength:t}),w),{showLine:!0}),n?null:{lineOpacity:0}),c),h);return new qv({className:"axis",style:i})}}),zx=pa(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,title:f,grid:h=!1,important:d={}}=t,p=et(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","title","grid","important","style"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],t=Rx(t,i,c,s,l,u,o,n),[i,a]=Eu(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=Au(i),[l,c]=Cx(i),e={center:e,radius:a,angleRange:[o,s],titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(Cx(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new qv({style:nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,title:Lx(f),showGrid:h},p),d))})}}),Wx=(Dx.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},zx.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>Dx(t)),Gx=(Wx.props=Object.assign(Object.assign({},Dx.props),{defaultPosition:"bottom"}),t=>Dx(t));Gx.props=Object.assign(Object.assign({},Dx.props),{defaultPosition:"left"});const Hx=a=>{const{important:o={}}=a,s=et(a,["important"]);return(t,e,n,r)=>{return Dx(Object.assign(Object.assign(Object.assign({},s),(i=a.orientation,(i%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:i>-Math.PI/2&&i<Math.PI/2?{titleTransform:"translate(50%, 0)"}:i>Math.PI/2&&i<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=Au(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{showGrid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,r,n,e)),o)}))(t,e,n,r);var i}};function Vx(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||pf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=et(t,["type"]);return r(e)(Object.assign({},t))},r]}function qx(t,e,n,r,i={}){const[a]=Vx("shape",e);return()=>a({type:"point."+t})([[0,0],[0,0]],Object.assign({size:6},i),n,r)}function Yx(t,e,n,r,i){var{labelFormatter:a=t=>""+t}=e,n={itemMarker:function(t,e,n,r,i){const a=jx(t,"shape"),o=e["itemMarker"];if(!a||o)return"function"==typeof o?o:(t,e)=>qx(o||"point",n,r,i,{color:t.color});{const s=a.getOptions()["domain"];return(t,e)=>qx(a.map(s[e]),n,r,i,{color:t.color})}}(t,e,n,r,i),itemMarkerSize:(e=jx(e=t,"size"))?2*e.map(NaN):8,itemMarkerOpacity:function(t){if(t=jx(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(t)};const o="string"==typeof a?Mx(a):a,s=jx(t,"color");r=t.find(t=>0<t.getOptions().domain.length).getOptions().domain;return Object.assign(Object.assign({},n),{data:r.map(t=>({id:t,label:o(t),color:s.map(t)}))})}Hx.props=Object.assign(Object.assign({},Dx.props),{defaultPosition:"center"});const $x=h=>{const{position:d,dx:p=0,dy:g=0,title:y,gridCol:m,gridRow:v}=h,b=et(h,["order","size","position","orientation","itemMarker","labelFormatter","dx","dy","title","gridCol","gridRow","layout"]);return(t,e,n,r)=>{var{library:i,bbox:a}=e,{x:o,y:s}=a,{width:l,height:c}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=Nx(t,e,n);return{width:i,height:a}}(e,h,$x),e=Tx(d,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[u,f]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(d,v,m),l=Object.assign({orient:["right","left","center"].includes(d)?"vertical":"horizontal",width:l,height:c,gridCol:null!==m&&void 0!==m?m:f,gridRow:null!==v&&void 0!==v?v:u,rowPadding:0,colPadding:8,titleText:Lx(y)},Yx(t,h,i,n,r)),{legend:c={}}=r,f=new Px({style:Object.assign({x:o+p,y:s+g,width:a.width,height:a.height},e)});return f.appendChild(new bb({className:"legend-category",style:Object.assign({},c,l,b)})),f}};$x.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const Ux=c=>{const{dx:u=0,dy:f=0,labelFormatter:h,position:d,title:p}=c,g=et(c,["dx","dy","labelFormatter","layout","order","orientation","position","size","title"]);return(t,e,n,r)=>{var i=e["bbox"],{x:i,y:a,width:o,height:s}=i,l=Tx(d,null==(l=null==(l=null==(l=e.scales)?void 0:l[0])?void 0:l.guide)?void 0:l.layout),i=new Px({style:Object.assign({x:i+u,y:a+f,width:o,height:s},l)}),{continuousLegend:a={}}=r;return i.appendChild(new Fb({style:Object.assign({},a,Object.assign({titleText:Lx(p),titleFontSize:12,showHandle:!1,showIndicator:!1,labelAlign:"value",labelFormatter:"string"==typeof h?t=>Mx(h)(t.label):h},function(t,e,n,r){const a=jx(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orient:c,width:u,height:f,length:h}=Nx(e,n,r);if(i={orient:c,width:u,height:f},a instanceof $p){e=a.thresholds;if(a instanceof Kp||a instanceof Qp)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=jx(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(h).fill(0).map((t,e)=>{var e=(l-s)/(h-1)*e+s,n=a.map(e);const i=d?d.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}(t,e,c,Ux)),g)})),i}},Xx=(Ux.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>Ux(Object.assign({},{block:!0},e))(...t)),Kx=(Xx.props=Object.assign(Object.assign({},Ux.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>Ux(Object.assign({},{type:"size",block:!0,labelShowTick:!1},t))),Zx=(Kx.props=Object.assign(Object.assign({},Ux.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>Ux(Object.assign({},{type:"size",labelShowTick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function Qx(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}Zx.props=Object.assign(Object.assign({},Ux.props),{defaultPosition:"top",defaultOrientation:"horizontal"});Fx={render(t,e){const{y:n,width:r,title:i,subtitle:a,spacing:o=2,align:s="left",style:l}=t;t=rt(l,"title");const c=rt(l,"subtitle"),u=Ax(e,".title","text").attr("className","title").call(A,Object.assign(Object.assign(Object.assign({},Qx(0,n,r,s)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();Ax(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},Qx(0,u.max[1]+o,r,s)),{fontSize:12,textBaseline:"top",text:a}),c))})}};const Jx=class extends U.CustomElement{constructor(t){super(t),this.descriptor=Fx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},tw=s=>(t,e,n,r)=>{var{x:e,y:i,width:a,height:o}=e.bbox;return new Jx({style:nt({},{style:r.title},Object.assign({x:e,y:i,width:a,height:o},s))})};function ew(t){return t.getBandWidth}function nw(t,e,n){if(!ew(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Bc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function rw(t,e){var n,r;return ew(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):Xc(e)}tw.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const iw=t=>{const{orient:u,labelFormatter:f,style:h}=t,d=et(t,["orient","labelFormatter","size","style"]);return([e],t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?Mx(f):f;return new Cm({className:"slider",style:Object.assign({},r,Object.assign(Object.assign({x:t,y:a,trackLength:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(nw(e,t,!0))}},h),d))})}},aw=(iw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>iw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),ow=(aw.props=Object.assign(Object.assign({},iw.props),{defaultPosition:"bottom"}),t=>iw(Object.assign(Object.assign({},t),{orient:"vertical"}))),sw=(ow.props=Object.assign(Object.assign({},iw.props),{defaultPosition:"left"}),t=>{const{orient:s,style:l}=t,c=et(t,["orient","labelFormatter","style"]);return(t,e,n,r)=>{var e=e["bbox"],{x:e,y:i,width:a,height:o}=e,{scrollbar:r={}}=r;return new Im({className:"scrollbar",style:Object.assign({},r,Object.assign(Object.assign(Object.assign(Object.assign({},l),{x:e,y:i,trackLength:"horizontal"===s?a:o}),c),{orient:s,value:0,contentLength:1500,viewportLength:"horizontal"===s?a:o}))})}}),lw=(sw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>sw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),cw=(lw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"bottom"}),t=>sw(Object.assign(Object.assign({},t),{orient:"vertical"})));cw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"left"});class uw{constructor(t){this.$value=t}static of(t){return new uw(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function fw(t,e,n){return uw.of({}).call(hw,t).call(hw,e).call(hw,n).value()}function hw(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function dw(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const pw=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],gw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=xu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,fw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},yw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=xu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,fw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},mw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=xu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,fw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},vw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=xu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,fw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},bw=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],fw(i,n,l))},xw=(bw.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],fw(i,n,l))});function ww(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Ow(t,e){var[n,r,i,t]=ww(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(v,X,S){"use strict";const N="main-layer",at="label-layer",ot="element",H="view",st="plot",lt="component",ct="label",ut="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(B(e,r,n),0<a(e[i],f)&&B(e,r,i);h<d;){for(B(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||U(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];z(i,t.leaf?r(o):o)}return i}function z(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function W(t,e){return t.minX-e.minX}function G(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function $(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function U(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(C(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if($(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;$(t,s)&&(e.leaf?n.push(o):Y(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if($(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if($(t,a)){if(e.leaf||Y(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=U([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!Y(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=U(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=U([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}F(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=V(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=U(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=U([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=D(t,0,c,this.toBBox),f=D(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=V(u)+V(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:W,i=t.leaf?this.compareMinY:G;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];z(o,t.leaf?i(f):f),s+=q(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():F(t[e],this.toBBox)};var Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var tt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],v=n[6],m=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=v*r+m*o+n*c,t[7]=v*i+m*s+n*u,t[8]=v*a+m*l+n*e,t};function ft(){var t=new Q(16);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],v=n*s-r*o,m=n*l-i*o,b=n*c-a*o,x=r*l-i*s,k=r*c-a*s,w=i*c-a*l,O=u*g-f*p,M=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,L=v*A-m*E+b*S+x*_-k*M+w*O;return L?(t[0]=(s*A-l*E+c*S)*(L=1/L),t[1]=(i*E-r*A-a*S)*L,t[2]=(g*w-y*k+e*x)*L,t[3]=(h*k-f*w-d*x)*L,t[4]=(l*_-o*A-c*M)*L,t[5]=(n*A-i*_+a*M)*L,t[6]=(y*b-p*w-e*m)*L,t[7]=(u*w-h*b+d*m)*L,t[8]=(o*E-s*_+c*O)*L,t[9]=(r*_-n*E-a*O)*L,t[10]=(p*k-g*b+e*v)*L,t[11]=(f*b-u*k-d*v)*L,t[12]=(s*M-o*S-l*O)*L,t[13]=(n*S-r*M+i*O)*L,t[14]=(g*m-p*x-y*v)*L,t[15]=(u*x-f*m+h*v)*L,t):null}function vt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function mt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],v=e[14],e=e[15],m=n[0],b=n[1],x=n[2],k=n[3];return t[0]=m*r+b*s+x*f+k*g,t[1]=m*i+b*l+x*h+k*y,t[2]=m*a+b*c+x*d+k*v,t[3]=m*o+b*u+x*p+k*e,m=n[4],b=n[5],x=n[6],k=n[7],t[4]=m*r+b*s+x*f+k*g,t[5]=m*i+b*l+x*h+k*y,t[6]=m*a+b*c+x*d+k*v,t[7]=m*o+b*u+x*p+k*e,m=n[8],b=n[9],x=n[10],k=n[11],t[8]=m*r+b*s+x*f+k*g,t[9]=m*i+b*l+x*h+k*y,t[10]=m*a+b*c+x*d+k*v,t[11]=m*o+b*u+x*p+k*e,m=n[12],b=n[13],x=n[14],k=n[15],t[12]=m*r+b*s+x*f+k*g,t[13]=m*i+b*l+x*h+k*y,t[14]=m*a+b*c+x*d+k*v,t[15]=m*o+b*u+x*p+k*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Ot(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Mt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new Q(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],v=(1-(d+s))*u,m=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=v,t[1]=m,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(v*g+h*y+p*i),t[13]=n[1]+y-(m*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Tt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var Nt=Tt;function jt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Rt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new Q(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new Q(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:vt,multiply:mt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,v,m,b,x,k,w,O,M=r[0],_=r[1],r=r[2],S=Math.hypot(M,_,r);return S<Z?null:(M*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],m=M*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+M*S,k=M*r*i+_*S,w=_*r*i-M*S,O=r*r*i+n,t[0]=a*(n=M*M*i+n)+c*(v=_*M*i+r*S)+d*(r=r*M*i-_*S),t[1]=o*n+u*v+p*r,t[2]=s*n+f*v+g*r,t[3]=l*n+h*v+y*r,t[4]=a*m+c*b+d*x,t[5]=o*m+u*b+p*x,t[6]=s*m+f*b+g*x,t[7]=l*m+h*b+y*x,t[8]=a*k+c*w+d*O,t[9]=o*k+u*w+p*O,t[10]=s*k+f*w+g*O,t[11]=l*k+h*w+y*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:wt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Ot,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Mt,fromQuat2:function(t,e){var n=new Q(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),Mt(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Pt,perspective:Pt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Tt,ortho:Nt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:jt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ct,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],v=e[0],m=e[1],b=e[2],x=e[3],k=e[4],w=e[5],O=e[6],M=e[7],_=e[8],S=e[9],E=e[10],A=e[11],L=e[12],P=e[13],T=e[14],e=e[15];return Math.abs(n-v)<=Z*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-m)<=Z*Math.max(1,Math.abs(r),Math.abs(m))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-k)<=Z*Math.max(1,Math.abs(o),Math.abs(k))&&Math.abs(s-w)<=Z*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(l-O)<=Z*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(c-M)<=Z*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(g-P)<=Z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-T)<=Z*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:mt,sub:Ct});function Bt(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function Ft(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2]}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function $t(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Ut(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Kt=It;function Xt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Qt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}Bt(),Xt();var re=function(t,e,n,r){var i=new Q(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}Bt(),Ft(1,0,0),Ft(0,1,0),Qt(),Qt(),J(),e=new Q(2),Q!=Float32Array&&(e[0]=0,e[1]=0);var le=function(t,e){return(le=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function ce(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var m=function(){return(m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function et(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ue(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function y(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function fe(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var he={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var de={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function pe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return de[e]===t.length-1&&"achlmqstvz".includes(e)})}function ge(t){return pe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ye(t){return ge(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ve(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=de[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,de[n]))),de[n]););}function me(t){return 48<=t&&t<=57}function be(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function xe(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=de[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,be(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(me(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&me(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&me(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;me(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&me(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&me(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),be(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,be(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ve(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var ke=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function we(t){var o,s,l,c;return ge(t)?se(t):(t=function(t){if(pe(t))return se(t);var e=new ke(t);for(be(e);e.index<e.max&&!e.err.length;)xe(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Oe(t){if(ye(t))return se(t);for(var e,n,r,i,a,o,s,l=we(t),c=m({},he),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Me(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function _e(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Se(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ee(t,e,n,r,i){var a=Se([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=_e([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Ae(t,e,n,r){var t=[t,e],e=[n,r],i=_e(t,e,.5),e=_e(e,i,.5),a=_e(i,e,.5),o=_e(e,a,.5),s=_e(a,o,.5),t=Ee(t[0],t[1],i[0],i[1],a[0]).point,i=Ee(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Le(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],k=u[1],m=u[2],b=u[3]):(e=(y=Me(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=Me(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,v=i*i,m=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*v-p*y*y-v*g*g)/(p*y*y+v*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),k=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<m?Math.PI-x:x,k=l<m?Math.PI-k:k,x<0&&(x=2*Math.PI+x),k<0&&(k=2*Math.PI+k),s&&k<x&&(x-=2*Math.PI),!s&&x<k&&(k-=2*Math.PI)),k-x),g=(Math.abs(p)>f&&(v=k,y=l,o=c,k=x+f*(s&&x<k?1:-1),d=t(l=m+r*Math.cos(k),c=b+i*Math.sin(k),r,i,a,0,s,y,o,[k,v,m,b])),p=k-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(k),s=Math.sin(k),y=Math.tan(p/4),o=4/3*r*y,v=4/3*i*y,m=[e,n],b=[e+o*f,n-v*g],x=[l+o*s,c-v*a],k=[l,c];if(b[0]=2*m[0]-b[0],b[1]=2*m[1]-b[1],u)return b.concat(x,k,d);for(var w=[],O=0,M=(d=b.concat(x,k,d)).length;O<M;O+=1)w[O]=O%2?Me(d[O-1],d[O],h).y:Me(d[O],d[O+1],h).x;return w}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Ae(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Ae(h,d,p,g))}return t}function Pe(t,e){var n;if(void 0===e&&(e=!1),ye(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=se(t),e?[n,[]]:n;for(var r,i=Oe(t),a=m({},he),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Le(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function Te(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,v=0,m=[g,y,v],b=[g,y],x={x:0,y:0},k=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var w,O,M,_,S,E,A,L,P,T,N=0;N<=d;N+=1)w=t,O=e,M=n,_=r,S=i,E=a,A=o,L=s,T=void 0,T=1-(P=N/d),g=(w={x:Math.pow(T,3)*w+3*Math.pow(T,2)*P*M+3*T*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(T,3)*O+3*Math.pow(T,2)*P*_+3*T*Math.pow(P,2)*E+Math.pow(P,3)*L}).x,y=w.y,f&&k.push({x:g,y:y}),h&&(v+=Se(b,[g,y])),b=[g,y],p&&l<=v&&l>m[2]&&(M=(v-l)/(v-m[2]),x={x:b[0]*(1-M)+m[0]*M,y:b[1]*(1-M)+m[1]*M}),m=[g,y,v];return{length:v,point:x=p&&v<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}function Ne(t){return(c=l=s=0)<=Pe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function je(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?Te(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=_e(n,i,r),i=_e(i,a,r),a=_e(a,e,r),o=_e(n,i,r),i=_e(i,a,r),r=_e(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ce=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Re=function(t){return"function"==typeof t},b=function(t){return null==t},Be={}.toString,Ie=function(t,e){return Be.call(t)==="[object "+e+"]"},Fe=function(t){return Array.isArray?Array.isArray(t):Ie(t,"Array")},De=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function ze(t,e){if(t)if(Fe(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(De(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var We=function(t){return"object"==typeof t&&null!==t},Ge=function(t){if(!We(t)||!Ie(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},He=function(t){if(Fe(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Ve=function(t){if(Fe(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},qe=function(t,n,e){var r;return Fe(t)||Ge(t)?(r=e,ze(t,function(t,e){r=n(r,t,e)}),r):t},Ye=function(t){return Ie(t,"String")};var $e=function(t,e,n){return t<e?e:n<t?n:t},Ue=function(t){return Ie(t,"Number")};function Ke(t){return b(t)?"":t.toString()}var Xe=function(t,e){return(t%e+e)%e},Ze=function(t){t=Ke(t);return t.charAt(0).toLowerCase()+t.substring(1)};var Qe=function(t){t=Ke(t);return t.charAt(0).toUpperCase()+t.substring(1)},Je=function(t){return Ie(t,"Boolean")},tn=function(t){return void 0===t},en=function(t){return t instanceof Element||t instanceof HTMLDocument};function nn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function rn(t){if("object"!=typeof t||null===t)return t;if(Fe(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=rn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=rn(t[i]):e[i]=t[i];return e}var an=rn;function on(r,i,a){var o;return function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}}function sn(a,o){var s;if(Re(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var ln=5;function cn(t,e){if(t===e)return!0;if(t&&e&&!Ye(t)&&!Ye(e)){if(Ce(t)||Ce(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=cn(t[r],e[r]));r++);return n}if(We(t)||We(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=cn(t[i[r]],e[i[r]]));r++);return n}}return!1}function un(){}var nt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||ln,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ge(o)?(Ge(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Fe(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},fn=cn,hn=function(t,e,n){for(var r=0,i=Ye(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},dn=Object.prototype.hasOwnProperty,pn=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function gn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function yn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function vn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mn=/^#([0-9a-f]{3,8})$/,bn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),xn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),kn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),wn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),On=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Mn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),_n={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Sn(){return this.rgb().formatHex()}function En(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ln(e):3===n?new Tn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Pn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Pn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=bn.exec(t))?new Tn(e[1],e[2],e[3],1):(e=xn.exec(t))?new Tn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=kn.exec(t))?Pn(e[1],e[2],e[3],e[4]):(e=wn.exec(t))?Pn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=On.exec(t))?Rn(e[1],e[2]/100,e[3]/100,1):(e=Mn.exec(t))?Rn(e[1],e[2]/100,e[3]/100,e[4]):_n.hasOwnProperty(t)?Ln(_n[t]):"transparent"===t?new Tn(NaN,NaN,NaN,0):null}function Ln(t){return new Tn(t>>16&255,t>>8&255,255&t,1)}function Pn(t,e,n,r){return new Tn(t=r<=0?e=n=NaN:t,e,n,r)}function Tn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Nn(){return"#"+Cn(this.r)+Cn(this.g)+Cn(this.b)}function jn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Cn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Rn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new In(t,e,n,r)}function Bn(t){var e,n,r,i,a,o,s,l;return t instanceof In?new In(t.h,t.s,t.l,t.opacity):(t=t instanceof vn?t:An(t))?t instanceof In?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new In(o,s,l,t.opacity)):new In}function In(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Fn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Dn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function zn(t,e){return Math.abs(t-e)<.001}function Wn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Gn(t){return(t+2*Math.PI)%(2*Math.PI)}gn(vn,An,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Sn,formatHex:Sn,formatHsl:function(){return Bn(this).formatHsl()},formatRgb:En,toString:En}),gn(Tn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof vn?i:An(i))?new Tn((i=i.rgb()).r,i.g,i.b,i.opacity):new Tn:new Tn(t,e,n,null==r?1:r);var i},yn(vn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nn,formatHex:Nn,formatRgb:jn,toString:jn})),gn(In,function(t,e,n,r){return 1===arguments.length?Bn(t):new In(t,e,n,null==r?1:r)},yn(vn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Tn(Fn(240<=t?t-240:120+t,n,e),Fn(t,n,e),Fn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Hn={box:function(t,e,n,r){return Wn([t,n],[e,r])},length:Dn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Dn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Dn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,s,l,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(s=(n=o=r=[-n[1],n[0]])[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),o[0]=n[0]*s,o[1]=n[1]*s,l=[i-t,a-e],Math.abs(l[0]*r[0]+l[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Vn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Dn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,v=o+f,m=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],m=Dn(l[0],l[1],m[0],m[1]);0<=y&&m<s?(o=y,s=m):(y=[i.apply(void 0,t.concat([v])),i.apply(void 0,e.concat([v]))],m=Dn(l[0],l[1],y[0],y[1]),v<=1&&m<s?(o=v,s=m):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function qn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Yn(t,e,n){n=t+n-2*e;return zn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function $n(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Un(t,e,n,r,i,a,o){var s=qn(t,n,i,o),l=qn(e,r,a,o),c=Hn.pointAt(t,e,n,r,o),n=Hn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Kn(t,e,n,r,i,a,o){return 0===o?(Dn(t,e,n,r)+Dn(n,r,i,a)+Dn(t,e,i,a))/2:(e=(t=Un(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Kn.apply(void 0,e)+Kn.apply(void 0,n))}var Xn={box:function(t,e,n,r,i,a){var o=Yn(t,n,i)[0],s=Yn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(qn(t,n,i,o)),void 0!==s&&c.push(qn(e,r,a,s)),Wn(l,c)},length:function(t,e,n,r,i,a){return Kn(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Vn([t,n,i],[e,r,a],o,s,qn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Dn(t.x,t.y,o,s)},interpolationAt:qn,pointAt:function(t,e,n,r,i,a,o){return{x:qn(t,n,i,o),y:qn(e,r,a,o)}},divide:Un,tangentAngle:function(t,e,n,r,i,a,o){t=$n(t,n,i,o),n=$n(e,r,a,o);return Gn(Math.atan2(n,t))}};function Zn(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Qn(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Jn(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return zn(r,0)?zn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):zn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function tr(t,e,n,r,i,a,o,s,l){var c=Zn(t,n,i,o,l),u=Zn(e,r,a,s,l),f=Hn.pointAt(t,e,n,r,l),n=Hn.pointAt(n,r,i,a,l),r=Hn.pointAt(i,a,o,s,l),i=Hn.pointAt(f.x,f.y,n.x,n.y,l),a=Hn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function er(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=Dn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=tr(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return er.apply(void 0,e)+er.apply(void 0,n)}var nr={extrema:Jn,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Jn(t,n,i,o),f=Jn(e,r,a,s),h=0;h<u.length;h++)l.push(Zn(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(Zn(e,r,a,s,f[d]));return Wn(l,c)},length:function(t,e,n,r,i,a,o,s){return er(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Vn([t,n,i,o],[e,r,a,s],l,c,Zn,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Dn(t.x,t.y,l,c)},interpolationAt:Zn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Zn(t,n,i,o,l),y:Zn(e,r,a,s,l)}},divide:tr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=Qn(t,n,i,o,l),n=Qn(e,r,a,s,l);return Gn(Math.atan2(n,t))}};function rr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var ir=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,v=(f-u)*Math.pow(Math.sin(h),3)/s,m=d-y,b=p-v,y=l-y,v=c-v,x=Math.hypot(b,m),k=Math.hypot(v,y);h+=x*Math.asin((m*v-b*y)/(x*k))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+rr(d,n),y:e+rr(p,r)}};function ar(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function or(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function sr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function lr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var cr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=ar(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,v=-1/0,m=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&m.push(x):o<x&&x<a&&m.push(x)}for(var k=0;k<m.length;k++){var w=or(0,e,n,r,i,m[k]);w<y&&(y=w),v<w&&(v=w)}return{x:l,y:y,width:c-l,height:v-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=lr(s-t,l-e,-i),l=s[0],s=s[1],l=ir(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=sr(n,r,a):o<c&&(l=sr(n,r,o)),lr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Dn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:ar(t,0,n,r,i,o),y:or(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Gn(Math.atan2(i,s))}};function ur(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Dn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var fr,hr,dr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return Wn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=Dn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=ur(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Hn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Hn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=ur(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function pr(){}function gr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function yr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new gr(n,r||t,i),r=hr?hr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function vr(t,e){0==--t._eventsCount?t._events=new pr:delete t._events[e]}function mr(){this._events=new pr,this._eventsCount=0}r=e,fr=Object.prototype.hasOwnProperty,hr="~",Object.create&&(pr.prototype=Object.create(null),(new pr).__proto__||(hr=!1)),mr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)fr.call(t,e)&&n.push(hr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},mr.prototype.listeners=function(t){var t=hr?hr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},mr.prototype.listenerCount=function(t){t=hr?hr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},mr.prototype.emit=function(t,e,n,r,i,a){var o=hr?hr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},mr.prototype.on=function(t,e,n){return yr(this,t,e,n,!1)},mr.prototype.once=function(t,e,n){return yr(this,t,e,n,!0)},mr.prototype.removeListener=function(t,e,n,r){t=hr?hr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||vr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:vr(this,t)}}else vr(this,t);return this},mr.prototype.removeAllListeners=function(t){return t?(t=hr?hr+t:t,this._events[t]&&vr(this,t)):(this._events=new pr,this._eventsCount=0),this},mr.prototype.off=mr.prototype.removeListener,mr.prototype.addListener=mr.prototype.on,mr.prefixed=hr,r.exports=mr.EventEmitter=mr;var s,br,xr,kr,wr=e.exports;function Or(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function Mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Or(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _r(t){return(_r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fr(r.key),r)}}function l(t,e,n){return e&&Sr(t.prototype,e),n&&Sr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=Fr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Er(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}function Ar(t){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Lr(t,e){return(Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tr(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=Ar(n),e=(t=r?(t=Ar(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pr(e)}}function Nr(){return(Nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ar(t)););return t}(t,e);if(r)return(r=Object.getOwnPropertyDescriptor(r,e)).get?r.get.call(arguments.length<3?t:n):r.value}).apply(this,arguments)}function jr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Rr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cr(t){return function(t){if(Array.isArray(t))return Br(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Rr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(t,e){var n;if(t)return"string"==typeof t?Br(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Br(t,e):void 0}function Br(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ir(t,e){var n,r,i,a,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return r=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){r=!0,i=t},f:function(){try{n||null==o.return||o.return()}finally{if(r)throw i}}};if(Array.isArray(t)||(o=Rr(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=function(){},n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fr(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(n=c=c||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",(r=s=s||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=br=br||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=xr=xr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=kr=kr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Dr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function zr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Wr,Gr,Hr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],Vr=((e=Wr=Wr||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Hr.find(function(t){return t.name===e}).unit_type}),qr=function(){function t(){p(this,t)}return l(t,[{key:"toString",value:function(){return this.buildCSSText(xr.kNo,kr.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Wr.kUnitType&&this.getType()<=Wr.kClampType}}],[{key:"isAngle",value:function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns}},{key:"isLength",value:function(t){return t>=s.kEms&&t<s.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems}},{key:"isTime",value:function(t){return t===s.kSeconds||t===s.kMilliseconds}}]),t}(),Yr=function(){Er(r,qr);var n=Tr(r);function r(t){var e;return p(this,r),(e=n.call(this)).colorSpace=void 0,e.colorSpace=t,e}return l(r,[{key:"getType",value:function(){return Wr.kColorType}},{key:"to",value:function(t){return this}}]),r}(),$r=((n=Gr=Gr||{})[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.RadialGradient=2]="RadialGradient",function(){Er(i,qr);var r=Tr(i);function i(t,e){var n;return p(this,i),(n=r.call(this)).type=void 0,n.value=void 0,n.type=t,n.value=e,n}return l(i,[{key:"clone",value:function(){return new i(this.type,this.value)}},{key:"buildCSSText",value:function(t,e,n){return n}},{key:"getType",value:function(){return Wr.kColorType}}]),i}()),Ur=function(){Er(r,qr);var n=Tr(r);function r(t){var e;return p(this,r),(e=n.call(this)).value=void 0,e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value)}},{key:"getType",value:function(){return Wr.kKeywordType}},{key:"buildCSSText",value:function(t,e,n){return n+this.value}}]),r}();function Kr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Kr.Cache||Map),l}Kr.Cache=Map;function Xr(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")}var Zr=Kr(function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Qr(t){return"function"==typeof t}function Jr(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n="";if(Number.isFinite(t)){var r=Number.isNaN(t);if(!r)throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function ti(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return br.kUNumber;case s.kPercentage:return br.kUPercent;case s.kPixels:return br.kULength;case s.kMilliseconds:case s.kSeconds:return br.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return br.kUAngle;default:return br.kUOther}}(t)){case br.kUNumber:return s.kNumber;case br.kULength:return s.kPixels;case br.kUPercent:return s.kPercentage;case br.kUTime:return s.kSeconds;case br.kUAngle:return s.kDegrees;default:return s.kUnknown}}function ei(t){return ci[t]||(ci[t]=new Ur(t)),ci[t]}var ni={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},ri=Kr(function(t){var t=Zr(t),e=ni[t];return(null==e?void 0:e.alias)||t}),ii=function(){Er(a,qr);var i=Tr(a);function a(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s.kNumber;return p(this,a),(e=i.call(this)).unit=void 0,e.value=void 0,n="string"==typeof r?(n=r)?"number"===n?s.kNumber:"percent"===n||"%"===n?s.kPercentage:Vr(n):s.kUnknown:r,e.unit=n,e.value=t,e}return l(a,[{key:"clone",value:function(){return new a(this.value,this.unit)}},{key:"equals",value:function(t){return this.value===t.value&&this.unit===t.unit}},{key:"getType",value:function(){return Wr.kUnitType}},{key:"convertTo",value:function(t){var e;return this.unit===t?new a(this.value,this.unit):(e=ti(this.unit))!==ti(t)||e===s.kUnknown?null:(e=Dr(this.unit)/Dr(t),new a(this.value*e,t))}},{key:"buildCSSText",value:function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=zr(this.unit);i=a<-999999||999999<a?(r=zr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?Jr(a,r):a+(r||"")):"".concat(a).concat(o)}return n+=i}}]),a}(),ai=new ii(0,"px"),oi=(new ii(1,"px"),new ii(0,"deg")),si=function(){Er(s,Yr);var o=Tr(s);function s(t,e,n){var r,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return p(this,s),(r=o.call(this,"rgb")).r=void 0,r.g=void 0,r.b=void 0,r.alpha=void 0,r.isNone=void 0,r.r=t,r.g=e,r.b=n,r.alpha=i,r.isNone=a,r}return l(s,[{key:"clone",value:function(){return new s(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}]),s}(),li=new Ur("unset"),r=new Ur("initial"),e=new Ur("inherit"),ci={"":li,unset:li,initial:r,inherit:e},ui=new si(0,0,0,0,!0),fi=new si(0,0,0,0),hi=Kr(function(t,e,n,r){return new si(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),di=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s.kNumber;return new ii(t,e)};new ii(50,"%");var pi="Method not implemented.";function gi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function yi(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function vi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function mi(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function bi(t){return void 0===t?0:360<t||t<-360?t%360:t}function xi(t,e,n){var r,i,e=1<arguments.length&&void 0!==e?e:0,n=2<arguments.length&&void 0!==n?n:0;return Array.isArray(t)&&3===t.length?(r=t,(i=new Q(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):Ue(t)?Ft(t,e,n):Ft(t[0],t[1]||e,t[2]||n)}function ki(t){return t*(Math.PI/180)}function wi(t){return t*(180/Math.PI)}function Oi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=jr(St(Bt(),r),3))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Mi(t,e,n,r,i){var a,o,s,l,c=Math.cos(t),t=Math.sin(t);return a=r*c,o=i*t,r=-r*t,t=i*c,c=i=0,e=e,n=n,s=1,(l=new Q(9))[0]=a,l[1]=o,l[2]=i,l[3]=r,l[4]=t,l[5]=c,l[6]=e,l[7]=n,l[8]=s,l}function _i(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=wi(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Si=ft(),Ei=ft(),Ai=Xt(),d=[Bt(),Bt(),Bt()],Li=Bt();function Pi(t,e,n,r,i,a){if(function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Si,t)&&(ht(Ei,Si),Ei[3]=0,Ei[7]=0,Ei[11]=0,Ei[15]=1,!(Math.abs(vt(Ei))<1e-8))){var t=Si[3],o=Si[7],s=Si[11],l=Si[12],c=Si[13],u=Si[14],f=Si[15];if(0!==t||0!==o||0!==s){if(Ai[0]=t,Ai[1]=o,Ai[2]=s,Ai[3]=f,!yt(Ei,Ei))return;gt(Ei,Ei),Zt(i,Ai,Ei)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=Si,(o=d)[0][0]=t[0],o[0][1]=t[1],o[0][2]=t[2],o[1][0]=t[4],o[1][1]=t[5],o[1][2]=t[6],o[2][0]=t[8],o[2][1]=t[9],o[2][2]=t[10],n[0]=It(d[0]),Ht(d[0],d[0]),r[0]=Vt(d[0],d[1]),Ti(d[1],d[1],d[0],1,-r[0]),n[1]=It(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),Ti(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),Ti(d[2],d[2],d[1],1,-r[2]),n[2]=It(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(Li,d[1],d[2]),Vt(d[0],Li)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]),d[0][2]>d[2][0]&&(a[1]=-a[1]),d[1][0]>d[0][1]&&(a[2]=-a[2])}}function Ti(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var Ni=ft();function ji(t,l){var c,u;t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new hs({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ai,ai],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ai],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ai],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ai],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ai,ai,ai],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[oi],l.rotateLocal(0,0,Wa(o[0]))):"rotatex"===s?(o=t||[oi],l.rotateLocal(Wa(o[0]),0,0)):"rotatey"===s?(o=t||[oi],l.rotateLocal(0,Wa(o[0]),0)):"rotatez"===s?(o=t||[oi],l.rotateLocal(0,0,Wa(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(ki(o[0]),ki(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(ki(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],ki(o[0]))):"matrix"===s?(e=(o=jr(t.map(function(t){return t.value}),6))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(dt(Ni,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Rt,[Ni].concat(Cr(t.map(function(t){return t.value})))),Ni[12]+=c,Ni[13]+=u,l.setLocalTransform(Ni)))})),l.getLocalTransform()}Ci={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Ri="";var Ci,Ri,x,Bi=function(t){return Ri=t,Fi()};function Ii(t){throw new Error(Ri+": "+t)}function Fi(){var t=Ui(Di);return 0<Ri.length&&Ii("Invalid input not EOF"),t}function Di(){return zi("linear-gradient",Ci.linearGradient,Gi)||zi("repeating-linear-gradient",Ci.repeatingLinearGradient,Gi)||zi("radial-gradient",Ci.radialGradient,Hi)||zi("repeating-radial-gradient",Ci.repeatingRadialGradient,Hi)||zi("conic-gradient",Ci.conicGradient,Hi)}function zi(n,t,r){return Wi(t,function(t){var e=r();return e&&!ea(Ci.comma)&&Ii("Missing comma before color stops"),{type:n,orientation:e,colorStops:Ui(Ki)}})}function Wi(t,e){t=ea(t);if(t)return ea(Ci.startCall)||Ii("Missing ("),e=e(t),ea(Ci.endCall)||Ii("Missing )"),e}function Gi(){return ta("directional",Ci.sideOrCorner,1)||ta("angular",Ci.angleValue,1)}function Hi(){var t,e,n=Vi();return n&&((t=[]).push(n),e=Ri,ea(Ci.comma))&&((n=Vi())?t.push(n):Ri=e),t}function Vi(){var t,e=function(){var t=ta("shape",/^(circle)/i,0);t&&(t.style=Ji()||qi());return t}()||function(){var t=ta("shape",/^(ellipse)/i,0);t&&(t.style=Zi()||qi());return t}();return e?e.at=Yi():(t=qi())?(e=t,(t=Yi())&&(e.at=t)):(t=$i())&&(e={type:"default-radial",at:t}),e}function qi(){return ta("extent-keyword",Ci.extentKeywords,1)}function Yi(){var t;if(ta("position",/^at/,0))return(t=$i())||Ii("Missing positioning value"),t}function $i(){var t={x:Zi(),y:Zi()};if(t.x||t.y)return{type:"position",value:t}}function Ui(t){var e=t(),n=[];if(e)for(n.push(e);ea(Ci.comma);)(e=t())?n.push(e):Ii("One extra comma");return n}function Ki(){var t=ta("hex",Ci.hexColor,1)||Wi(Ci.rgbaColor,function(){return{type:"rgba",value:Ui(Xi)}})||Wi(Ci.rgbColor,function(){return{type:"rgb",value:Ui(Xi)}})||ta("literal",Ci.literalColor,0);return t||Ii("Expected color definition"),t.length=Zi(),t}function Xi(){return ea(Ci.number)[1]}function Zi(){return ta("%",Ci.percentageValue,1)||Qi()||Ji()}function Qi(){return ta("position-keyword",Ci.positionKeywords,1)}function Ji(){return ta("px",Ci.pixelValue,1)||ta("em",Ci.emValue,1)}function ta(t,e,n){e=ea(e);if(e)return{type:t,value:e[n]}}function ea(t){var e=/^[\n\r\t\s]+/.exec(Ri),e=(e&&na(e[0].length),t.exec(Ri));return e&&na(e[0].length),e}function na(t){Ri=Ri.substring(t)}function ra(t,e){return t[0]===e[0]&&t[1]===e[1]}function ia(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function aa(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(n=x=x||{}).GROUP="g",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh";function oa(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ki(r=Xe(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=sa({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=sa(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var sa=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function la(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],r=t[s+1],c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=Xe(ki(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=ha([1,0],p),f=ha(p,u);fa(p,u)<=-1&&(f=Math.PI);1<=fa(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:ra(t,[c,e])?0:n,ry:ra(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):n=[l[(m=l.length)-2],l[m-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&ra(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,v,m=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=m,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=aa((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=aa((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(b=(g=ca(u,0)).x,y=g.y,v=(c=ca(u,1,!1)).x,c=c.y,u.startTangent=[b,y],u.endTangent=[v,c]),e.push(u)}return e}function ca(t,e,n){var n=!(2<arguments.length&&void 0!==n)||n,r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=oa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=oa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function ua(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function fa(t,e){return ua(t)*ua(e)?(t[0]*e[0]+t[1]*e[1])/(ua(t)*ua(e)):1}function ha(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(fa(t,e))}var da=function(){function e(t){p(this,e),this.config=t,this.options=void 0,this._args=void 0}return l(e,[{key:"create",value:function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw ".concat(t,";\n")},onResult:function(t){return"return ".concat(t,";\n")},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback(".concat(t,");\n")},onResult:function(t){return"_callback(null, ".concat(t,");\n")},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error(".concat(t,");\n")},onResult:function(t){return"_resolve(".concat(t,");\n")},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e}},{key:"setup",value:function(t,e){t._x=e.taps.map(function(t){return t.fn})}},{key:"init",value:function(t){this.options=t,this._args=t.args.slice()}},{key:"deinit",value:function(){this.options=void 0,this._args=void 0}},{key:"contentWithInterceptors",value:function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+="".concat(this.getInterceptor(o),".call(").concat(this.args({before:s.context?"_context":void 0}),");\n"))}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+="".concat(r.getInterceptor(n),".error(").concat(t,");\n"));return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+="".concat(r.getInterceptor(n),".result(").concat(t,");\n"));return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+="".concat(r.getInterceptor(e),".done();\n"));return t+=n()}}))}return this.content(t)}},{key:"header",value:function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t}},{key:"needContext",value:function(){var t,e=Ir(this.options.taps);try{for(e.s();!(t=e.n()).done;)if(t.value.context)return!0}catch(t){e.e(t)}finally{e.f()}return!1}},{key:"callTap",value:function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap".concat(t," = ").concat(this.getTap(t),";\n"),s=!0),o+="".concat(this.getInterceptor(l),".tap(").concat(c.context?"_context, ":"","_tap").concat(t,");\n"))}o+="var _fn".concat(t," = ").concat(this.getTapFn(t),";\n");var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError".concat(t," = false;\n")+"try {\n"),o+=(r?"var _result".concat(t," = _fn"):"_fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"),a||(o=(o=(o=(o+="} catch(_err) {\n")+"_hasError".concat(t," = true;\n"))+n("_err")+"}\n")+"if(!_hasError".concat(t,") {\n")),r&&(o+=r("_result".concat(t))),i&&(o+=i()),a||(o+="}\n");break;case"async":var f="",f=(f=(f+=(r?"(function(_err".concat(t,", _result"):"(function(_err").concat(t,") {\n"))+"if(_err".concat(t,") {\n"))+n("_err".concat(t))+"} else {\n";r&&(f+=r("_result".concat(t))),i&&(f+=i()),f=f+"}\n"+"})",o+="_fn".concat(t,"(").concat(this.args({before:u.context?"_context":void 0,after:f}),");\n");break;case"promise":o=(o=(o=(o=(o=(o+="var _hasResult".concat(t," = false;\n"))+"var _promise".concat(t," = _fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"))+"if (!_promise".concat(t," || !_promise").concat(t,".then)\n"))+" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise".concat(t," + ')');\n"))+"_promise".concat(t,".then((function(_result").concat(t,") {\n"))+"_hasResult".concat(t," = true;\n"),r&&(o+=r("_result".concat(t))),i&&(o+=i()),o=(o=(o+="}), function(_err".concat(t,") {\n"))+"if(_hasResult".concat(t,") throw _err").concat(t,";\n"))+n("_err".concat(t))+"});\n"}return o}},{key:"callTapsSeries",value:function(t){var i=this,a=t.onError,o=t.onResult,e=t.resultReturns,s=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return s();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),u=e||n,f="",h=s,d=0,r=function(){function e(t){return t?"":s()}var n=p,r=(h!==s&&("sync"!==i.options.taps[n].type||20<d++)&&(d=0,f=(f+="function _next".concat(n,"() {\n"))+h()+"}\n",h=function(){return"".concat(u?"return ":"","_next").concat(n,"();\n")}),h),t=i.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:o&&function(t){return o(n,t,r,e)},onDone:!o&&r,rethrowIfPossible:l&&(c<0||n<c)});h=function(){return t}},p=this.options.taps.length-1;0<=p;p--)r();return f+=h()}},{key:"callTapsLooping",value:function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+="".concat(this.getInterceptor(i),".loop(").concat(this.args({before:o.context?"_context":void 0}),");\n"))}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+"if(".concat(e," !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r}},{key:"callTapsParallel",value:function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+"var _counter = ".concat(this.options.taps.length,";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"}},{key:"args",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")}},{key:"getTapFn",value:function(t){return"_x[".concat(t,"]")}},{key:"getTap",value:function(t){return"_taps[".concat(t,"]")}},{key:"getInterceptor",value:function(t){return"_interceptors[".concat(t,"]")}}]),e}();new(function(){Er(e,da);var t=Tr(e);function e(){return p(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})}}]),e}()),new(function(){Er(e,da);var t=Tr(e);function e(){return p(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})}}]),e}()),new(function(){Er(e,da);var t=Tr(e);function e(){return p(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})}}]),e}());new(function(){Er(e,da);var t=Tr(e);function e(){return p(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})}}]),e}());var pa=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ga=/([\"\'])[^\'\"]+\1/;function ya(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-_a)?0:16-e,r=xa();return Ma[r]=t,1<Object.keys(Ma).length||setTimeout(function(){_a=n;var e=Ma;Ma={},Object.keys(e).forEach(function(t){return e[t](Oa())})},e),r}function va(t){delete Ma[t]}function ma(t){return"string"!=typeof t?ya:""===t?ka.requestAnimationFrame:ka[t+"RequestAnimationFrame"]}var ba=1,xa=function(){return ba++},ka="object"===("undefined"==typeof self?"undefined":_r(self))&&self.self==self?self:"object"===(void 0===j?"undefined":_r(j))&&j.global==j?j:{},wa=Date.now(),Oa=function(){return ka.performance&&"function"==typeof ka.performance.now?ka.performance.now():Date.now()-wa},Ma={},_a=Date.now(),r=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],ma),e=ma(r),r="string"!=typeof(n=r)?va:""===n?ka.cancelAnimationFrame:ka[n+"CancelAnimationFrame"]||ka[n+"CancelRequestAnimationFrame"],Sa=(ka.requestAnimationFrame=e,ka.cancelAnimationFrame=r,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),Ea=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Aa=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,La=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Pa={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Ta=Kr(function(t){t="angular"===t.type?Number(t.value):Pa[t.value]||0;return di(t,"deg")}),Na=Kr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:di(n,i),cy:di(r,a)}}),ja=Kr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Bi(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!b(c)&&!b(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:"".concat(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:di(Number(t.length.value),"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#".concat(t):"literal"===e?t:("rgb"===e?"rgb(":"rgba(").concat(t.join(","),")"))};var e});return"linear-gradient"===e?new $r(Gr.LinearGradient,{angle:n?Ta(n):oi,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=Na(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?ei(n):di(n,f)),new $r(Gr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Sa.exec(t);if(n)return r=(null==(r=n[2].match(La))?void 0:r.map(function(t){return t.split(":")}))||[],[new $r(Gr.LinearGradient,{angle:di(parseFloat(n[1]),"deg"),steps:r.map(function(t){var t=jr(t,2),e=t[0],t=t[1];return{offset:di(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Ea.exec(t);if(t)return t=(null==(t=t[4].match(La))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:di(50,"%"),cy:di(50,"%"),steps:t.map(function(t){var t=jr(t,2),e=t[0],t=t[1];return{offset:di(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Ye(n))return[new $r(Gr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Aa.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function Ca(t){return t&&!b(t.r)&&!b(t.g)&&!b(t.b)}var Ra=Kr(function(t){var e;return(e=t)&&e.image?Mr({repetition:"repeat"},t):"transparent"===(t=b(t)?"":t)?fi:ja(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=An(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),hi.apply(void 0,e))});function Ba(t,e){if(Ca(t)&&Ca(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round($e(e[n],0,255));return e[3]=$e(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Ia(t,e){if(b(e))return di(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return di(Number(e),"px");if(0<="deg".search(t))return di(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return di(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Fa=Kr(function(t){return Ia(new RegExp("px","g"),t)}),Da=(Kr(function(t){return Ia(new RegExp("%","g"),t)}),function(t){return Ue(t)||isFinite(Number(t))?di(Number(t)||0,"px"):Ia(new RegExp("px|%|em|rem","g"),t)}),za=Kr(function(t){return Ia(new RegExp("deg|rad|grad|turn","g"),t)});function Wa(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=wi(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Ga(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):Ye(t)?n=t.split(" ").map(function(t){return Number(t)}):Ue(t)&&(n=[t]),2===e?1===n.length?[n[0],n[0]]:[n[0],n[1]]:1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function Ha(t){return Ye(t)?t.split(" ").map(function(t){return Da(t)}):t.map(function(t){return Da(t.toString())})}function Va(t,e,n){return 0===t.value?0:t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var qa=function(t){return Ia(/deg|rad|grad|turn|px|%/g,t)},Ya=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function $a(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().trim();if("none"!==t)for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Ya.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return qa(t)||Ra(t)})}),n.lastIndex===t.length)return r}return[]}function Ua(t){return t.toString()}var Ka=Kr(function(t){return"number"==typeof t?di(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?di(Number(t)):di(0)});function Xa(t,e){return[t,e,Ua]}function Za(n,r){return function(t,e){return[t,e,function(t){return Ua($e(t,n,r))}]}}function Qa(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Kr(function(t){return(Ye(t)?t.split(" "):t).map(Ka)});var Ja=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Oe(e)}catch(t){n=Oe(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=la(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=Xn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=nr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams,u=cr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}var n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),h=Ve(n),d=Ve(r),p=He(n),g=He(r);if(0!==i.length)for(var y=0;y<i.length;y++){var v=i[y],m=v.currentPoint;m[0]===h?h-=ia(v,e).xExtra:m[0]===p&&(p+=ia(v,e).xExtra),m[1]===d?d-=ia(v,e).yExtra:m[1]===g&&(g+=ia(v,e).yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},to=Kr(Ja);function eo(t,e){t=(Ye(t)?to:Ja)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function no(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Pe(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Pe(e.absolutePath,!1),e.curve=d),[h,d]),h=Ne((t=h.length!==d.length?function t(e,n,r){var i,e=je(e),n=je(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Ne(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):se(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Se(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function ro(t,e){var n,r,i=Ye(t)?t.split(" ").map(function(t){var t=jr(t.split(","),2),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=dr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Hn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,Cr(i.map(function(t){return t[0]})))),l=Math.min.apply(Math,Cr(i.map(function(t){return t[1]})));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}function io(t,e){return[t.points,e.points,function(t){return t}]}var ao=null;function oo(t){return function(e){var n=0;return t.map(function(t){return t===ao?e[n++]:t})}}function so(t){return t}var lo={matrix:["NNNNNN",[ao,ao,0,0,ao,ao,0,0,0,0,1,0,ao,ao,0,1],so],matrix3d:["NNNNNNNNNNNNNNNN",so],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",oo([ao,ao,new ii(1)]),so],scalex:["N",oo([ao,new ii(1),new ii(1)]),oo([ao,new ii(1)])],scaley:["N",oo([new ii(1),ao,new ii(1)]),oo([new ii(1),ao])],scalez:["N",oo([new ii(1),new ii(1),ao])],scale3d:["NNN",so],skew:["Aa",null,so],skewx:["A",null,oo([ao,oi])],skewy:["A",null,oo([oi,ao])],translate:["Tt",oo([ao,ao,ai]),so],translatex:["T",oo([ao,ai,ai]),oo([ao,ai])],translatey:["T",oo([ai,ao,ai]),oo([ai,ao])],translatez:["L",oo([ai,ai,ao])],translate3d:["TTL",so]};function co(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=lo[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?oi:za(t)},N:Ka,T:Da,L:Fa}[h.toUpperCase()](f):{a:oi,n:c[0],t:ai}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function uo(t){switch(t.t){case"rotatex":return i=ki(Wa(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=ki(Wa(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=ki(Wa(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=ki(Wa(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=ki(Wa(t.d[0])),a=ki(Wa(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=ki(Wa(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=ki(Wa(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Va(t.d[0],0,null)||0,n=Va(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Va(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Va(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Va(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Va(t.d[0],0,null)||0,n=Va(t.d[1],0,null)||0,r=Va(t.d[2],0,null)||0,1];case"perspective":a=Va(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function fo(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function ho(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return Pi(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(uo).reduce(fo),e,n,r,i,a),[[e,n,r,a,i]]}var po=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=go(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=go(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=go(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=go(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function go(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function yo(t){return t.toFixed(6).replace(".000000","")}function vo(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=ho(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=ho(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=$e(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return po(t[0],t[1],t[2],e,t[4]).map(yo).join(",")}])}function mo(t){return t.replace(/[xy]/,"")}function bo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var xo=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ko(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var a=0;a<r.length;a++)!function(){var t=r[a],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?di(n):di(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=vo(r,i),n=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=lo[u],g=lo[f],y=void 0;if(xo(u,f)){var v=vo([r[c]],[i[c]]);n.push(v[0]),o.push(v[1]),s.push(["matrix",[v[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&mo(u)===mo(f))y=mo(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||bo(u)!==bo(f)){v=vo(r,i);n=[v[0]],o=[v[1]],s=[["matrix",[v[2]]]];break}y=bo(u),h=p[1](h),d=g[1](d)}for(var m=[],b=[],x=[],k=0;k<h.length;k++){var w=function(t,e,n,r,i){var i=4<arguments.length&&void 0!==i?i:0,a="",o=t.value||0,s=e.value||0,l=ti(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=zr(t.unit)):(ii.isLength(t.unit)||ii.isLength(e.unit))&&(o=Va(t,i,n),s=Va(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[k],d[k],t,!1,k);m[k]=w[0],b[k]=w[1],x.push(w[2])}n.push(m),o.push(b),s.push([y,x])}}return e&&(l=n,n=o,o=l),[n,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var wo=Kr(function(t){var e;return Ye(t)?"text-anchor"===t?[di(0,"px"),di(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Da(Oo(e[0])),Da(Oo(e[1]))]):[di(t[0]||0,"px"),di(t[1]||0,"px")]});function Oo(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){p(this,t),this.parser=za,this.parserWithCSSDisabled=null,this.mixer=Xa}return l(t,[{key:"calculator",value:function(t,e,n,r){return Wa(n)}}]),t}(),e=function(){function t(){p(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Ur&&(n=null),w.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&w.sceneGraphService.dirtifyToRoot(t)}),n}}]),t}(),r=function(){function t(){p(this,t),this.parser=Ra,this.parserWithCSSDisabled=Ra,this.mixer=Ba}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Ur?"none"===n.value?ui:fi:n}}]),t}(),i=function(){function t(){p(this,t),this.parser=$a}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof Ur?[]:n}}]),t}();function Mo(t){t=t.parsedStyle.fontSize;return b(t)?null:t}var _o=function(){function t(){p(this,t),this.parser=Da,this.parserWithCSSDisabled=null,this.mixer=Xa}return l(t,[{key:"calculator",value:function(t,e,n,r,i){if(Ue(n))return n;if(!ii.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=Mo(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Mo(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}}}]),t}(),So=function(){function t(){p(this,t),this.mixer=Qa}return l(t,[{key:"parser",value:function(t){t=Ha(Ue(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),Eo=function(){function t(){p(this,t),this.mixer=Qa}return l(t,[{key:"parser",value:function(t){t=Ha(Ue(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),Ao=function(){Er(e,_o);var t=Tr(e);function e(){return p(this,e),t.apply(this,arguments)}return l(e,[{key:"postProcessor",value:function(t,e){var n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;b(a)||(l=a),b(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:b(t.parsedStyle.x)||(l=t.parsedStyle.x),b(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),b(l)&&b(c)&&b(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?ji(e,t):(n=(e=jr(t.getLocalPosition(),3))[0],r=e[1],e=e[2],t.setLocalPosition(b(l)?n:l,b(c)?r:c,b(u)?e:u)))}}]),e}(),Lo=function(){function t(){p(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){n=null==(n=n=n instanceof Ur?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n}}]),t}(),Po=function(){function t(){p(this,t),this.mixer=Xa,this.parser=Ka,this.parserWithCSSDisabled=null}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),To=function(){function t(){p(this,t),this.parser=Ka,this.parserWithCSSDisabled=null,this.mixer=Za(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}},{key:"postProcessor",value:function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))}}]),t}(),No=function(){function t(){p(this,t),this.parser=Ka,this.parserWithCSSDisabled=null,this.mixer=Za(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),jo=function(){function y(){p(this,y),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return l(y,[{key:"update",value:function(t,e){gi(this.center,t),gi(this.halfExtents,e),yi(this.min,this.center,this.halfExtents),vi(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,e){vi(this.center,e,t),mi(this.center,this.center,.5),yi(this.halfExtents,e,t),mi(this.halfExtents,this.halfExtents,.5),gi(this.min,t),gi(this.max,e)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))}},{key:"setFromTransformedAABB",value:function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),v=Math.abs(l),m=Math.abs(c),b=Math.abs(u),x=Math.abs(f),k=Math.abs(h),w=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+f*i[0]+h*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+y*t[2],r[1]=v*t[0]+m*t[1]+b*t[2],r[2]=x*t[0]+k*t[1]+w*t[2],yi(this.min,n,r),vi(this.max,n,r)}},{key:"intersects",value:function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]}},{key:"intersection",value:function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=[0,0,0],n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=[0,0,0],i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null}},{key:"getNegativeFarPoint",value:function(t){return 273===t.pnVertexFlag?gi([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(t){return 273===t.pnVertexFlag?gi([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]}}]),y}(),Co=function(){function n(t,e){p(this,n),this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||Ft(0,1,0),this.updatePNVertexFlag()}return l(n,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])}},{key:"distanceToPoint",value:function(t){return Vt(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t,e,n,r=1/Kt(this.normal);t=this.normal,e=this.normal,n=r,t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,this.distance*=r}},{key:"intersectsLine",value:function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o}}]),n}(),Ro=(0,function(){function n(t){if(p(this,n),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Co)}return l(n,[{key:"extractFromVPMatrix",value:function(t){var t=jr(t,16),e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,zt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})}}]),n}()),Bo=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;p(this,n),this.x=0,this.y=0,this.x=t,this.y=e}return l(n,[{key:"clone",value:function(){return new n(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}]),n}(),Io=function(){function i(t,e,n,r){p(this,i),this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return l(i,[{key:"toJSON",value:function(){}}]),i}(),Fo=function(){function t(){p(this,t),this.parser=eo,this.parserWithCSSDisabled=eo,this.mixer=no}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof Ur&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Io(0,0,0,0)}:n}},{key:"postProcessor",value:function(t,e){var n;t.nodeName===x.PATH&&-1===e.indexOf("transform")&&(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(void 0===n?0:n,void 0===e?0:e))}}]),t}(),Do=function(){function t(){p(this,t),this.parser=ro,this.mixer=io}return l(t,[{key:"postProcessor",value:function(t,e){var n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))}}]),t}(),zo=function(){Er(a,_o);var i=Tr(a);function a(){var t;p(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).mixer=Za(0,1/0),t}return l(a)}(),Wo=function(){function t(){p(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Ur?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}]),t}(),Go=function(){function t(){p(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value}}]),t}(),Ho=function(){function t(){p(this,t),this.parser=co,this.parserWithCSSDisabled=co,this.mixer=ko}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Ur?[]:n}},{key:"postProcessor",value:function(t){ji(t.parsedStyle.transform,t)}}]),t}(),Vo=l(function t(){p(this,t),this.parser=wo}),qo=function(){function t(){p(this,t),this.parser=Ka}return l(t,[{key:"calculator",value:function(t,e,n,r){return n.value}},{key:"postProcessor",value:function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)}}]),t}();var Yo,$o,Uo=function(){function e(t){p(this,e),this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Bo,this.page=new Bo,this.canvas=new Bo,this.viewport=new Bo,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return l(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(pi)}}]),e}(),Ko=function(){Er(i,Uo);var r=Tr(i);function i(t,e){var n;return p(this,i),(n=r.call(this,null)).type=t,n.detail=e,Object.assign(Pr(n),e),n}return l(i)}(),Xo=function(){function t(){p(this,t),this.emitter=new wr}return l(t,[{key:"on",value:function(t,e,n){return this.addEventListener(t,e,n),this}},{key:"addEventListener",value:function(t,e,n){var r,i,a,o=Je(n)&&n||De(n)&&n.capture,n=De(n)&&n.once,s=Qr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=jr(t.split(":"),2))[0],t=r[1],c=i,l=!0),t=o?"".concat(t,"capture"):t,e=Qr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this}},{key:"off",value:function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){this.emitter.removeAllListeners()}},{key:"removeEventListener",value:function(t,e,n){var n=Je(n)&&n||De(n)&&n.capture,r=Qr(e)?void 0:e;return t=n?"".concat(t,"capture"):t,e=Qr(e)?e:null==(n=e)?void 0:n.handleEvent,this.emitter.off(t,e,r),this}},{key:"emit",value:function(t,e){this.dispatchEvent(new Ko(t,e))}},{key:"dispatchEvent",value:function(t){var e,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!t.type)throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");if(e=this.document?this:this.defaultView||(null==(e=this.ownerDocument)?void 0:e.defaultView)){if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],n||(t.target=this),null!=(e=t.manager)&&e.dispatchEvent(t,t.type,n)}return!t.defaultPrevented}}]),t}(),Zo=function(){Er(d,Xo);var i=Tr(d);function d(){var t;p(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}return l(d,[{key:"textContent",get:function(){var t,e="",n=(this.nodeName===x.TEXT&&(e+=this.style.text),Ir(this.childNodes));try{for(n.s();!(t=n.n()).done;){var r=t.value;r.nodeName===x.TEXT?e+=r.nodeValue:e+=r.textContent}}catch(t){n.e(t)}finally{n.f()}return e},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return 0<this.childNodes.length}},{key:"isDefaultNamespace",value:function(t){throw new Error(pi)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(pi)}},{key:"lookupPrefix",value:function(t){throw new Error(pi)}},{key:"normalize",value:function(){throw new Error(pi)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e}},{key:"getAncestor",value:function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e}},{key:"forEach",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})}}],[{key:"isNode",value:function(t){return!!t.childNodes}}]),d}(),Qo=(Zo.DOCUMENT_POSITION_DISCONNECTED=1,Zo.DOCUMENT_POSITION_PRECEDING=2,Zo.DOCUMENT_POSITION_FOLLOWING=4,Zo.DOCUMENT_POSITION_CONTAINS=8,Zo.DOCUMENT_POSITION_CONTAINED_BY=16,Zo.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Yo=Yo||{},Yo[Yo.Standard=0]="Standard",(a=$o=$o||{}).REPARENT="reparent",a.DESTROY="destroy",a.ATTR_MODIFIED="DOMAttrModified",a.INSERTED="DOMNodeInserted",a.REMOVED="removed",a.MOUNTED="DOMNodeInsertedIntoDocument",a.UNMOUNTED="DOMNodeRemovedFromDocument",a.BOUNDS_CHANGED="bounds-changed",a.RENDER_ORDER_CHANGED="render-order-changed",a.CULLED="culled",function(){Er(u,Uo);var c=Tr(u);function u(t,e,n,r,i,a,o,s){var l;return p(this,u),(l=c.call(this,null)).relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return l(u)}()),Jo=(Qo.ADDITION=2,Qo.MODIFICATION=1,Qo.REMOVAL=3,0),ts=new Qo($o.INSERTED,null,"","","",0,"",""),es=new Qo($o.REMOVED,null,"","","",0,"",""),ns=new Ko($o.DESTROY),rs=function(){Er(a,Zo);var i=Tr(a);function a(){var t;p(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).entity=Jo++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Yo.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle=w.enableCSSParsing?{anchor:li,opacity:li,fillOpacity:li,strokeOpacity:li,fill:li,stroke:li,transform:li,transformOrigin:li,visibility:li,pointerEvents:li,lineWidth:li,lineCap:li,lineJoin:li,increasedLineWidthForHitTesting:li,fontSize:li,fontFamily:li,fontStyle:li,fontWeight:li,fontVariant:li,textAlign:li,textBaseline:li,textTransform:li,zIndex:li,filter:li,shadowType:li}:null,t.parsedStyle={},t.attributes={},t}return l(a,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}},{key:"cloneNode",value:function(t){throw new Error(pi)}},{key:"appendChild",value:function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return w.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),ts.relatedNode=this,t.dispatchEvent(ts),t}},{key:"insertBefore",value:function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t}},{key:"replaceChild",value:function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e}},{key:"removeChild",value:function(t){var e;return es.relatedNode=this,t.dispatchEvent(es),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),w.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];this.removeChild(e)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}}},{key:"matches",value:function(t){return w.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return w.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return w.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return w.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return w.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return w.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return w.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var e=this;do{if(w.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null}},{key:"find",value:function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r}},{key:"findAll",value:function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r}},{key:"after",value:function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,Cr(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})}},{key:"prepend",value:function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.dispatchEvent(ns),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return w.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return w.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return w.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return w.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return w.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(t){var e;return"symbol"===_r(t)?w.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=ri(t),e=this.attributes[t],w.enableCSSParsing)&&b(e)?null:e}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,e){this.attributes[t]=e}},{key:"getAttributeNS",value:function(t,e){throw new Error(pi)}},{key:"getAttributeNode",value:function(t){throw new Error(pi)}},{key:"getAttributeNodeNS",value:function(t,e){throw new Error(pi)}},{key:"hasAttributeNS",value:function(t,e){throw new Error(pi)}},{key:"removeAttributeNS",value:function(t,e){throw new Error(pi)}},{key:"removeAttributeNode",value:function(t){throw new Error(pi)}},{key:"setAttributeNS",value:function(t,e,n){throw new Error(pi)}},{key:"setAttributeNode",value:function(t){throw new Error(pi)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(pi)}},{key:"toggleAttribute",value:function(t,e){throw new Error(pi)}}],[{key:"isElement",value:function(t){return!!t.getAttribute}}]),a}();var is,as,os,ss=new Qo($o.ATTR_MODIFIED,null,null,null,null,Qo.MODIFICATION,null,null),ls={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},cs={anchor:[0,0],fill:ui,stroke:ui,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},us=Mr(Mr({},cs),{},{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),fs=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),hs=function(){Er(i,rs);var e=Tr(i);function i(t){p(this,i),(r=e.call(this)).config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.dataset=void 0,r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||x.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,w.enableCSSParsing?cs:us,r.config.initialParsedStyle),w.enableCSSParsing&&Object.assign(r.attributes,ls),r.initAttributes(r.config.style);var r,t=w.globalThis.Proxy||function(){};return r.dataset=new t({},{get:function(t,e){e="".concat("data-").concat(Xr(e));return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("".concat("data-").concat(Xr(e)),n),!0}}),r.style=new t({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),w.displayObjectPool.add(r.entity,Pr(r)),r}return l(i,[{key:"destroy",value:function(){Nr(Ar(i.prototype),"destroy",this).call(this),w.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(e,t){var n,r,i=Mr({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o}},{key:"initAttributes",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this.renderable,n={forceUpdateGeometry:!0};w.enableCSSParsing&&(n.usedAttributes=fs),w.styleValueRegistry.processProperties(this,t,n),e.dirty=!0}},{key:"setAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],t=ri(t);tn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),Nr(Ar(i.prototype),"setAttribute",this).call(this,t,e))}},{key:"internalSetAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],n=(w.styleValueRegistry.processProperties(this,o({},t,e),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(ss.relatedNode=this,ss.prevValue=i,ss.newValue=e,ss.attrName=t,ss.prevParsedValue=a,ss.newParsedValue=n,this.isMutationObserved?this.dispatchEvent(ss):(ss.target=this).ownerDocument.defaultView.dispatchEvent(ss,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,n)}},{key:"getBBox",value:function(){var t=this.getBounds(),e=jr(t.getMin(),2),n=e[0],e=e[1],t=jr(t.getMax(),2),r=t[0],t=t[1];return new Io(n,e,r-n,t-e)}},{key:"setOrigin",value:function(t){return w.sceneGraphService.setOrigin(this,xi(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getOrigin",value:function(){return w.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){return w.sceneGraphService.setPosition(this,xi(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"setLocalPosition",value:function(t){return w.sceneGraphService.setLocalPosition(this,xi(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translate",value:function(t){return w.sceneGraphService.translate(this,xi(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translateLocal",value:function(t){return w.sceneGraphService.translateLocal(this,xi(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getPosition",value:function(){return w.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return w.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,e,n){return this.scaleLocal(t,e,n)}},{key:"scaleLocal",value:function(t,e,n){return"number"==typeof t&&(t=xi(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,e,n){return"number"==typeof t&&(t=xi(t,e=e||t,n=n||t)),w.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return w.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return w.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){return wi(jr(Oi(Bt(),w.sceneGraphService.getWorldTransform(this)),3)[2])}},{key:"getLocalEulerAngles",value:function(){return wi(jr(Oi(Bt(),w.sceneGraphService.getLocalRotation(this)),3)[2])}},{key:"setEulerAngles",value:function(t){return w.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return w.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,e,n){return b(e)&&b(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this}},{key:"rotate",value:function(t,e,n){return b(e)&&b(n)?w.sceneGraphService.rotate(this,0,0,t):w.sceneGraphService.rotate(this,t,e,n),this}},{key:"setRotation",value:function(t,e,n,r){return w.sceneGraphService.setRotation(this,t,e,n,r),this}},{key:"setLocalRotation",value:function(t,e,n,r){return w.sceneGraphService.setLocalRotation(this,t,e,n,r),this}},{key:"setLocalSkew",value:function(t,e){return w.sceneGraphService.setLocalSkew(this,t,e),this}},{key:"getRotation",value:function(){return w.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return w.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return w.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return w.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return w.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return w.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){w.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null}},{key:"isVisible",value:function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,Cr(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Cr(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?De(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(t){var t=t||this.getWorldTransform(),e=jr(_t(Bt(),t),2),n=e[0],e=e[1],r=jr(St(Bt(),t),2),i=r[0],r=r[1],t=Et(Qt(),t),t=jr(Oi(Bt(),t),3),a=t[0],t=t[2];return Mi(a||t,n,e,i,r)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var t=jr(_i(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)}},{key:"setLocalMatrix",value:function(t){var t=jr(_i(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)}},{key:"show",value:function(){w.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){w.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(t){return this.children[t]||null}},{key:"add",value:function(t,e){return this.appendChild(t,e)}},{key:"setClip",value:function(t){this.style.clipPath=t}},{key:"set",value:function(t,e){this.config[t]=e}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"move",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}]),i}(),ds={},ps=[],a=function(){function t(){p(this,t)}return l(t,[{key:"getByEntity",value:function(t){return ds[t]}},{key:"getAll",value:function(){return Object.keys(ds).map(function(t){return ds[t]})}},{key:"add",value:function(t,e){(ds[t]=e).nodeName===x.HTML&&ps.push(e)}},{key:"remove",value:function(t){var e=ds[t];e&&(delete ds[t],e.nodeName===x.HTML)&&(t=ps.indexOf(e),ps.splice(t,1))}},{key:"getHTMLs",value:function(){return ps}}]),t}(),gs={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Io(0,0,0,0)},ys=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:c.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:c.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:c.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:c.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:c.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:c.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:c.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:c.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:c.FILTER},{n:"clipPath",syntax:c.DEFINED_PATH},{n:"textPath",syntax:c.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:c.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:c.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:c.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:c.COORDINATE},{n:"cy",int:!0,d:"0",syntax:c.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:c.COORDINATE},{n:"y",int:!0,d:"0",syntax:c.COORDINATE},{n:"z",int:!0,d:"0",syntax:c.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:c.COORDINATE},{n:"y1",int:!0,l:!0,syntax:c.COORDINATE},{n:"z1",int:!0,l:!0,syntax:c.COORDINATE},{n:"x2",int:!0,l:!0,syntax:c.COORDINATE},{n:"y2",int:!0,l:!0,syntax:c.COORDINATE},{n:"z2",int:!0,l:!0,syntax:c.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:c.PATH,p:50},{n:"points",int:!0,l:!0,syntax:c.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:c.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:c.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:c.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:c.MARKER},{n:"markerEnd",syntax:c.MARKER},{n:"markerMid",syntax:c.MARKER},{n:"markerStartOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"}],vs=ys.filter(function(t){return!!t.l}).map(function(t){return t.n}),ms={},bs=new WeakMap,xs=function(){function t(){var e=this;p(this,t),ys.forEach(function(t){e.registerMetadata(t)})}return l(t,[{key:"registerMetadata",value:function(e){[e.n].concat(Cr(e.a||[])).forEach(function(t){ms[t]=e})}},{key:"unregisterMetadata",value:function(t){delete ms[t]}},{key:"getPropertySyntax",value:function(t){return w.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(n,r){var i=this,t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]};if(w.enableCSSParsing){var a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,s=t.usedAttributes,l=o,c=Object.keys(r);c.forEach(function(t){var e=ri(t);a||(n.attributes[e]=r[t]),!l&&null!=(t=ms[e])&&t.l&&(l=!0)}),e||c.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(c=null!=s&&s.length?Array.from(new Set(c.concat(s))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n,c)}),w.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{r.src&&(r.img=r.src),r.d&&(r.path=r.d),r.strokeDasharray&&(r.lineDash=r.strokeDasharray),r.strokeWidth&&(r.lineWidth=r.strokeWidth),r.textAnchor&&(r.textAlign=r.textAnchor),Object.assign(n.attributes,r);var o=Object.keys(r),e=n.parsedStyle.clipPath,s=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,r),!!t.forceUpdateGeometry);if(!u)for(var f=0;f<vs.length;f++)if(vs[f]in r){u=!0;break}r.fill&&(n.parsedStyle.fill=Ra(r.fill)),r.stroke&&(n.parsedStyle.stroke=Ra(r.stroke)),r.shadowColor&&(n.parsedStyle.shadowColor=Ra(r.shadowColor)),r.filter&&(n.parsedStyle.filter=$a(r.filter)),b(r.radius)||(n.parsedStyle.radius=Ga(r.radius,4)),b(r.lineDash)||(n.parsedStyle.lineDash=Ga(r.lineDash,2)),r.points&&(n.parsedStyle.points=ro(r.points,n)),""===r.path&&(n.parsedStyle.path=Mr({},gs)),r.path&&(n.parsedStyle.path=eo(r.path,n)),r.textTransform&&w.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:r.textTransform},n,null),r.clipPath&&w.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",e,r.clipPath,n,this),r.offsetPath&&w.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",s,r.offsetPath,n,this),r.anchor&&(n.parsedStyle.anchor=Ga(r.anchor,2)),r.transform&&(n.parsedStyle.transform=co(r.transform)),r.transformOrigin&&(n.parsedStyle.transformOrigin=wo(r.transformOrigin)),r.markerStart&&(n.parsedStyle.markerStart=w.CSSPropertySyntaxFactory["<marker>"].calculator(null,r.markerStart,r.markerStart,null,null)),r.markerEnd&&(n.parsedStyle.markerEnd=w.CSSPropertySyntaxFactory["<marker>"].calculator(null,r.markerEnd,r.markerEnd,null,null)),r.markerMid&&(n.parsedStyle.markerMid=w.CSSPropertySyntaxFactory["<marker>"].calculator("",r.markerMid,r.markerMid,null,null)),(n.nodeName!==x.CIRCLE&&n.nodeName!==x.ELLIPSE||b(r.cx)&&b(r.cy))&&(n.nodeName!==x.RECT&&n.nodeName!==x.IMAGE&&n.nodeName!==x.GROUP&&n.nodeName!==x.HTML&&n.nodeName!==x.TEXT&&n.nodeName!==x.MESH||b(r.x)&&b(r.y)&&b(r.z))&&(n.nodeName!==x.LINE||b(r.x1)&&b(r.y1)&&b(r.z1)&&b(r.x2)&&b(r.y2)&&b(r.z2))||w.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,o),b(r.zIndex)||w.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,o),r.path&&w.CSSPropertySyntaxFactory["<path>"].postProcessor(n,o),r.points&&w.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,o),b(r.offsetDistance)||w.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,o),r.transform&&w.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,o),u&&this.updateGeometry(n)}}},{key:"parseProperty",value:function(t,e,n){var r,t=ms[t],i=e;return"unset"===(e=""!==e&&!b(e)?e:"unset")||"initial"===e||"inherit"===e?i=ei(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=ei(e):t&&t.parser&&(i=t.parser(e,n))),i}},{key:"computeProperty",value:function(t,e,n){var r=ms[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Ur){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))b(r)||(e=this.parseProperty(t,Qr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),b(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Ur?e.value:e}return a}},{key:"postProcessProperty",value:function(t,e,n){var t=ms[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)}},{key:"addUnresolveProperty",value:function(t,e){var n=bs.get(t);n||(bs.set(t,[]),n=bs.get(t)),-1===n.indexOf(e)&&n.push(e)}},{key:"tryToResolveProperty",value:function(t,e){var n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).inherited;if(n&&(t.parentElement&&function(t,e){t=bs.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n}},{key:"recalc",value:function(e){var n,t=bs.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),bs.delete(e))}},{key:"updateGeometry",value:function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y=t.nodeName,v=w.geometryUpdaterFactory[y];v&&((s=t.geometry).contentBounds||(s.contentBounds=new jo),s.renderBounds||(s.renderBounds=new jo),e=t.parsedStyle,n=(v=v.update(e,t)).width,r=v.height,f=void 0===(f=v.depth)?0:f,u=void 0===(u=v.offsetX)?0:u,p=void 0===(p=v.offsetY)?0:p,v=void 0===(v=v.offsetZ)?0:v,f=[Math.abs(n)/2,Math.abs(r)/2,f/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,h=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,y===x.TEXT&&delete e.anchor,u=[(1-2*(o&&o[0]||0))*n/2+u,(1-2*(o&&o[1]||0))*r/2+p,(1-2*(o&&o[2]||0))*f[2]+v],s.contentBounds.update(u,f),p=y===x.POLYLINE||y===x.POLYGON||y===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&(f[0]+=v=((c||0)+(g||0))*p,f[1]+=v),s.renderBounds.update(u,f),h&&d&&"inner"!==d&&(l=(y=s.renderBounds).min,c=y.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,v=e.shadowOffsetY||0,u=l[0]-g+p,f=c[0]+g+p,h=l[1]-g+v,d=c[1]+g+v,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],f),l[1]=Math.min(l[1],h),c[1]=Math.max(c[1],d),s.renderBounds.setMinMax(l,c)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,vi(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[i,i,0]))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=r<0,g=((p=n<0)?-1:1)*(a?Va(a[0],0,t):0),v=(y?-1:1)*(a?Va(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,v-=(y?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,v),w.sceneGraphService.dirtifyToRoot(t))}},{key:"isPropertyInheritable",value:function(t){t=ms[t];return!!t&&t.inh}}]),t}();(ws=is=is||{})[ws.ORBITING=0]="ORBITING",ws[ws.EXPLORING=1]="EXPLORING",ws[ws.TRACKING=2]="TRACKING",(ws=as=as||{})[ws.DEFAULT=0]="DEFAULT",ws[ws.ROTATIONAL=1]="ROTATIONAL",ws[ws.TRANSLATIONAL=2]="TRANSLATIONAL",ws[ws.CINEMATIC=3]="CINEMATIC",(ws=os=os||{})[ws.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",ws[ws.PERSPECTIVE=1]="PERSPECTIVE";var ks="updated",ws=function(){function t(){p(this,t),this.canvas=void 0,this.eventEmitter=new wr,this.matrix=ft(),this.right=Ft(1,0,0),this.up=Ft(0,1,0),this.forward=Ft(0,0,1),this.position=Ft(0,0,1),this.focalPoint=Ft(0,0,0),this.distanceVector=Ft(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=is.EXPLORING,this.trackingMode=as.DEFAULT,this.projectionMode=os.PERSPECTIVE,this.frustum=new Ro,this.orthoMatrix=ft()}return l(t,[{key:"isOrtho",value:function(){return this.projectionMode===os.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(t){this.enableUpdate=t}},{key:"setType",value:function(t,e){return this.type=t,this.type===is.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===is.TRACKING&&void 0!==e&&this.setTrackingMode(e),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==is.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return yt(ft(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,e){t=Ot(ft(),[t,e,0]);this.jitteredProjectionMatrix=mt(ft(),t,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===os.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===os.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===os.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===os.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(t){return this.zoom=t,this.projectionMode===os.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===os.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=Ft(t.x-r,t.y-n,0),e=Vt(i,this.right)/It(this.right),r=Vt(i,this.up)/It(this.up);return this.pan(-e,-r),this}},{key:"setPerspective",value:function(t,e,n,r){this.projectionMode=os.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(ki(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,e,n,r,i,a){this.projectionMode=os.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),Nt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,Ft(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){t=xi(t,(1<arguments.length&&void 0!==arguments[1]?arguments:this.position)[1],(2<arguments.length&&void 0!==arguments[2]?arguments:this.position)[2]);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var e,n=(1<arguments.length&&void 0!==arguments[1]?arguments:this.focalPoint)[1],r=(2<arguments.length&&void 0!==arguments[2]?arguments:this.focalPoint)[2],i=Ft(0,1,0);return this.focalPoint=xi(t,n,r),this.trackingMode===as.CINEMATIC&&(t=(e=Gt(Bt(),this.focalPoint,this.position))[0],n=e[1],r=e[2],e=It(e),n=wi(Math.asin(n/e)),e=90+wi(Math.atan2(r,t)),wt(r=ft(),r,ki(e)),kt(r,r,ki(n)),i=Yt(Bt(),[0,1,0],r)),yt(this.matrix,jt(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=Bt(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=bi(t),this.computeMatrix(),this._getAxes(),this.type===is.ORBITING||this.type===is.EXPLORING?this._getPosition():this.type===is.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=bi(t),this.computeMatrix(),this._getAxes(),this.type===is.ORBITING||this.type===is.EXPLORING?this._getPosition():this.type===is.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=bi(t),this.computeMatrix(),this._getAxes(),this.type===is.ORBITING||this.type===is.EXPLORING?this._getPosition():this.type===is.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var t=Jt(Qt(),[0,0,1],ki(this.roll)),e=(pt(this.matrix),Jt(Qt(),[1,0,0],ki((this.rotateWorld&&this.type!==is.TRACKING||this.type===is.TRACKING?1:-1)*this.elevation))),n=Jt(Qt(),[0,1,0],ki((this.rotateWorld&&this.type!==is.TRACKING||this.type===is.TRACKING?1:-1)*this.azimuth)),n=te(Qt(),n,e),n=te(Qt(),n,t),e=Lt(ft(),n);this.type===is.ORBITING||this.type===is.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),mt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===is.TRACKING&&(bt(this.matrix,this.matrix,this.position),mt(this.matrix,this.matrix,e))}},{key:"_setPosition",value:function(t,e,n){this.position=xi(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){Dt(this.right,xi(Zt(Xt(),[1,0,0,0],this.matrix))),Dt(this.up,xi(Zt(Xt(),[0,1,0,0],this.matrix))),Dt(this.forward,xi(Zt(Xt(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=It(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===is.TRACKING||this.rotateWorld?(this.elevation=wi(Math.asin(e/r)),this.azimuth=wi(Math.atan2(-t,-n))):(this.elevation=-wi(Math.asin(e/r)),this.azimuth=-wi(Math.atan2(-t,-n)))}},{key:"_getPosition",value:function(){Dt(this.position,xi(Zt(Xt(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=J(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=Gt(Bt(),this.focalPoint,this.position),this.distance=It(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){var t,e;this.projectionMode===os.ORTHOGRAPHIC&&(t=this.position,e=Jt(Qt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,Ft((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),Ft(this.zoom,this.zoom,1),t))}},{key:"triggerUpdate",value:function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=mt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(ks))}},{key:"rotate",value:function(t,e,n){throw new Error(pi)}},{key:"pan",value:function(t,e){throw new Error(pi)}},{key:"dolly",value:function(t){throw new Error(pi)}},{key:"createLandmark",value:function(t,e){throw new Error(pi)}},{key:"gotoLandmark",value:function(t,e){throw new Error(pi)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(pi)}}]),t}(),Os=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t,e){t=t.r;return{width:2*t,height:2*t}}}]),t}(),Ms=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t,e){return{width:2*t.rx,height:2*t.ry}}}]),t}(),_s=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}}}]),t}(),Ss=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t){t=t.path.rect;return{width:t.width,height:t.height}}}]),t}(),Es=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t){var t=t.points.points,e=Math.min.apply(Math,Cr(t.map(function(t){return t[0]}))),n=Math.max.apply(Math,Cr(t.map(function(t){return t[0]}))),r=Math.min.apply(Math,Cr(t.map(function(t){return t[1]})));return{width:n-e,height:Math.max.apply(Math,Cr(t.map(function(t){return t[1]})))-r}}}]),t}(),As=function(){function t(){p(this,t)}return l(t,[{key:"update",value:function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Ye(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}}}]),t}(),Ls=function(){function e(t){p(this,e),this.globalRuntime=void 0,this.globalRuntime=t}return l(e,[{key:"isReadyToMeasure",value:function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!b(t)}},{key:"update",value:function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=w.enableCSSParsing?n-e.ascent:0:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})}}]),e}(),Ps=function(){function t(){p(this,t),this.canvas=void 0,this.context=void 0}return l(t,[{key:"getOrCreateCanvas",value:function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas}},{key:"getOrCreateContext",value:function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context}}]),t}(),Ts=(0,/\[\s*(.*)=(.*)\s*\]/),Ns=function(){function t(){p(this,t)}return l(t,[{key:"selectOne",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})}},{key:"selectAll",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})}},{key:"is",value:function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var t=t.match(Ts),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}}},{key:"attributeToString",value:function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!b(t))&&t.toString?t.toString():""}}]),t}();function js(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Cs=new Qo($o.REPARENT,null,"","","",0,"",""),Rs=function(){function e(t){var o,r,i,a,s,l,n,c,u,f,h,d,g=this;p(this,e),this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Ko($o.BOUNDS_CHANGED),this.rotate=(o=Qt(),function(t,e){"number"==typeof e&&(e=Ft(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n=Qt(),e[0],e[1],e[2]),r=g.getRotation(t),i=g.getRotation(t.parentNode),ie(o,i),ee(o,o),te(n,o,n),te(a.localRotation,n,r),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.rotateLocal(t,e)}),this.rotateLocal=(r=Qt(),function(t,e){"number"==typeof e&&(e=Ft(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;ne(r,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,r),g.dirtifyLocal(t,n)}),this.setEulerAngles=(i=Qt(),function(t,e){"number"==typeof e&&(e=Ft(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r.localRotation,e[0],e[1],e[2]),n=g.getRotation(t.parentNode),ie(i,ee(Qt(),n)),ae(r.localRotation,r.localRotation,i),g.dirtifyLocal(t,r)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e){"number"==typeof e&&(e=Ft(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a,o,s,l,c,u,f,h,d,p=t.transformable;Ut(e,Bt())||(r=n=e,i=p.localRotation,a=i[0],o=i[1],s=i[2],i=i[3],l=r[0],c=r[1],r=r[2],d=o*(h=a*c-o*l)-s*(f=s*l-a*r),s=s*(u=o*r-s*c)-a*h,a=a*f-o*u,f*=o=2*i,h*=o,s*=2,a*=2,n[0]=l+(u*=o)+(d*=2),n[1]=c+f+s,n[2]=r+h+a,Wt(p.localPosition,p.localPosition,e),g.dirtifyLocal(t,p))},this.setPosition=(a=ft(),s=Bt(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(a,e.worldTransform),yt(a,a),Yt(n.localPosition,s,a)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=Bt(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Dt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(n=Bt(),c=Bt(),u=Bt(),function(t,e){Ut(e="number"==typeof e?zt(c,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0):e,n)||(Wt(u,g.getPosition(t),e),g.setPosition(t,u))}),this.setRotation=function(){var o=Qt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(f=ft(),h=Bt(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,Ft(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(f))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),mt(t.localTransform,t.localTransform,e)),e=At(f,d,h,t.localScale,t.origin),mt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}return l(e,[{key:"matches",value:function(t,e){return this.runtime.sceneGraphSelector.is(t,e)}},{key:"querySelector",value:function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)}},{key:"querySelectorAll",value:function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)}},{key:"attach",value:function(t,e,n){var r=!1,n=(t.parentNode&&(r=t.parentNode!==e,this.detach(t)),t.parentNode=e,b(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t),e.sortable),e=((null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent(Cs)}},{key:"detach",value:function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)}},{key:"getOrigin",value:function(t){return t.transformable.origin}},{key:"setOrigin",value:function(t,e){var n,r=t.transformable;(e="number"==typeof e?[e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0]:e)[0]===r.origin[0]&&e[1]===r.origin[1]&&e[2]===r.origin[2]||((n=r.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,r))}},{key:"setLocalEulerAngles",value:function(t,e){"number"==typeof e&&(e=Ft(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)}},{key:"scaleLocal",value:function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=Ft(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)}},{key:"setLocalScale",value:function(t,e){var n=t.transformable,e=Ft(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))}},{key:"setLocalRotation",value:function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)}},{key:"setLocalSkew",value:function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)}},{key:"dirtifyLocal",value:function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)}},{key:"dirtifyWorld",value:function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)}},{key:"triggerPendingEvents",value:function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):t.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var t=jr(t,2),e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.clearPendingEvents(),i.clear()}},{key:"clearPendingEvents",value:function(){this.pendingEvents=[]}},{key:"dirtifyToRoot",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)js(n),n=n.parentNode;e&&t.forEach(function(t){js(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])}},{key:"updateDisplayObjectDependency",value:function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))}},{key:"informDependentDisplayObjects",value:function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new Qo($o.ATTR_MODIFIED,t,n,n,e,Qo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})}},{key:"getPosition",value:function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))}},{key:"getRotation",value:function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))}},{key:"getScale",value:function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))}},{key:"getWorldTransform",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.transformable;return(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"getLocalTransform",value:function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(t,e){var n=_t(Bt(),e),r=Et(Qt(),e),e=St(Bt(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])}},{key:"getTransformedGeometryBounds",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length?arguments[2]:void 0,e=this.getGeometryBounds(t,e);return jo.isEmpty(e)?null:((n=n||new jo).setFromTransformedAABB(e,this.getWorldTransform(t)),n)}},{key:"getGeometryBounds",value:function(t){t=t.geometry;return(1<arguments.length&&void 0!==arguments[1]&&arguments[1]?t.renderBounds:t.contentBounds||null)||new jo}},{key:"getBounds",value:function(t){var e,n,r=this,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a=t.renderable;return a.boundsDirty||i||!a.bounds?!a.renderBoundsDirty&&i&&a.renderBounds?a.renderBounds:(e=i?a.renderBounds:a.bounds,n=this.getTransformedGeometryBounds(t,i,e),t.childNodes.forEach(function(t){t=r.getBounds(t,i);t&&(n?n.add(t):(n=e||new jo).update(t.center,t.halfExtents))}),i&&(t=function(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.parsedStyle.clipPath.getBounds(i),n?t&&(n=t.intersection(n)):n=t),(n=n||new jo)&&(i?a.renderBounds=n:a.bounds=n),i?a.renderBoundsDirty=!1:a.boundsDirty=!1,n):a.bounds}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!jo.isEmpty(r))return(e=new jo).setFromTransformedAABB(r,n),e}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var e,n,r,i=this.getGeometryBounds(t),i=(jo.isEmpty(i)||(r=new jo).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=jr(r.getMin(),2))[0],t=t[1],n=(r=jr(r.getMax(),2))[0],r=r[1],new Io(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Io((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}},{key:"syncHierarchy",value:function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}}},{key:"sync",value:function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?mt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}},{key:"unfreezeParentToRoot",value:function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}}}]),e}(),Bs={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Is=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Fs=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),Ds=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),zs=function(){function e(t){var n=this;p(this,e),this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Ds.exec(e)&&!Fs.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=Cr(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}return l(e,[{key:"measureFont",value:function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Bs.MetricsString+Bs.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Bs.BaselineSymbol).width),s=Bs.HeightMultiplier*o,o=o*Bs.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n}},{key:"measureText",value:function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Ue(e)&&"".concat(e,"px")||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!ga.test(s)&&pa.indexOf(s)<0&&(s='"'.concat(s,'"')),a[o]=s}return"".concat(r," ").concat(i," ").concat(t," ").concat(e," ").concat(a.join(","))}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),v=0;if(!u){for(var m=0;m<g.length;m++){var b=p.measureText(g[m]).width+(g[m].length-1)*c;y[m]=b,v=Math.max(v,b)}var r=v+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),k=0;return"middle"===s?k=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?k=-i:"top"!==s&&"hanging"!==s||(k=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:v,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Io(n-o/2,k+e*x,t+o,x)})}}u.getTotalLength();for(var w=0;w<g.length;w++)p.measureText(g[w]).width,g[w].length}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),v=Array.from(t),m=0;m<v.length;m++){var b=v[m],x=t[m-1],k=t[m+1],w=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+w){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var O=f[h].length,M=0,_=O,S=0;S<O;S++){var E=g(f[h][S]);if(c<M+E+y){_=S;break}M+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,k)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=w,f[h]=(f[h]||"")+b}}return f.join("\n")}},{key:"isBreakingSpace",value:function(t){return"string"==typeof t&&0<=Bs.BreakingSpaces.indexOf(t.charCodeAt(0))}},{key:"isNewline",value:function(t){return"string"==typeof t&&0<=Bs.Newlines.indexOf(t.charCodeAt(0))}},{key:"trimToBreakable",value:function(t){var e,t=Cr(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t}},{key:"canBreakInLastChar",value:function(t){return!t||!Is.test(t)}},{key:"sumTextWidthByCache",value:function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)}},{key:"findBreakableIndex",value:function(t){for(var e=t.length-1;0<=e;e--)if(!Is.test(t[e]))return e;return-1}},{key:"getFromCache",value:function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i}}]),e}(),w={},Os=(As=new As,Es=new Es,o(ac={},x.CIRCLE,new Os),o(ac,x.ELLIPSE,new Ms),o(ac,x.RECT,As),o(ac,x.IMAGE,As),o(ac,x.GROUP,As),o(ac,x.LINE,new _s),o(ac,x.TEXT,new Ls(w)),o(ac,x.POLYLINE,Es),o(ac,x.POLYGON,Es),o(ac,x.PATH,new Ss),o(ac,x.HTML,null),o(ac,x.MESH,null),ac),Ls=(Ms=new r,As=new _o,o(_s={},c.PERCENTAGE,null),o(_s,c.NUMBER,new Po),o(_s,c.ANGLE,new n),o(_s,c.DEFINED_PATH,new e),o(_s,c.PAINT,Ms),o(_s,c.COLOR,Ms),o(_s,c.FILTER,new i),o(_s,c.LENGTH,As),o(_s,c.LENGTH_PERCENTAGE,As),o(_s,c.LENGTH_PERCENTAGE_12,new So),o(_s,c.LENGTH_PERCENTAGE_14,new Eo),o(_s,c.COORDINATE,new Ao),o(_s,c.OFFSET_DISTANCE,new To),o(_s,c.OPACITY_VALUE,new No),o(_s,c.PATH,new Fo),o(_s,c.LIST_OF_POINTS,new Do),o(_s,c.SHADOW_BLUR,new zo),o(_s,c.TEXT,new Wo),o(_s,c.TEXT_TRANSFORM,new Go),o(_s,c.TRANSFORM,new Ho),o(_s,c.TRANSFORM_ORIGIN,new Vo),o(_s,c.Z_INDEX,new qo),o(_s,c.MARKER,new Lo),_s),Es=(w.CameraContribution=ws,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new Ps,w.displayObjectPool=new a,w.sceneGraphSelector=new Ns,w.sceneGraphService=new Rs(w),w.textService=new zs(w),w.geometryUpdaterFactory=Os,w.CSSPropertySyntaxFactory=Ls,w.styleValueRegistry=new xs,w.layoutRegistry=null,w.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==j)return j;throw new Error("Unable to locate global `this`")}(),w.enableCSSParsing=!0,function(){function t(){p(this,t),this.context=void 0,this.plugins=[]}return l(t,[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})}}]),t}());function Ws(){Ws=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new k(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return O()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(w([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function v(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:O}}function O(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},v(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},v(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=w,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Gs(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Hs(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Gs(r,e,n,i,a,"next",t)}function a(t){Gs(r,e,n,i,a,"throw",t)}i(void 0)})}}function Vs(){return(Vs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function qs(t,e){return(qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(Ss=Sg=Sg||{}).READY="ready",Ss.BEFORE_RENDER="beforerender",Ss.RERENDER="rerender",Ss.AFTER_RENDER="afterrender",Ss.BEFORE_DESTROY="beforedestroy",Ss.AFTER_DESTROY="afterdestroy",Ss.RESIZE="resize",Ss.DIRTY_RECTANGLE="dirtyrectangle",new Ko($o.MOUNTED),new Ko($o.UNMOUNTED),new Ko(Sg.BEFORE_RENDER),new Ko(Sg.RERENDER),new Ko(Sg.AFTER_RENDER);var Ys=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Hs(Ws().mark(function t(e){var n,r,i;return Ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Se([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,Hs(Ws().mark(function t(){return Ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),$s=(Ys.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),qs(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Ys(Vs({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(Es)),Us=(Ks.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},Ks.prototype.once=function(t,e){return this.on(t,e,!0)},Ks.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},Ks.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},Ks.prototype.getEvents=function(){return this._events},Ks);function Ks(){this._events={}}const Xs=()=>[["cartesian"]],Zs=(Xs.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Qs=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Zs(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},Js=(Qs.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),tl=(Js.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),el=(tl.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...tl(),...Qs({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),nl=(el.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),rl=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=nl(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Qs({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},il=(rl.props={},()=>[["parallel",0,1,0,1]]),al=(il.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),ol=(al.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...il(),...Qs({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),sl=(ol.props={},({value:e})=>t=>t.map(()=>e)),ll=(sl.props={},({value:e})=>t=>t.map(e)),cl=(ll.props={},({value:e})=>t=>t.map(t=>t[e])),ul=(cl.props={},({value:t})=>()=>t);function fl(t,e){return t.parent===e.parent?1:2}function hl(t,e){return t+e.x}function dl(t,e){return Math.max(t,e.y)}function pl(){var s=fl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(hl,0)/e.length,t.y=1+n.reduce(dl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function gl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function yl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ml)):void 0===e&&(e=vl);for(var n,r,i,a,o,t=new kl(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new kl(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(xl)}function vl(t){return t.children}function ml(t){return Array.isArray(t)?t[1]:null}function bl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function xl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function kl(t){this.data=t,this.depth=this.height=0,this.parent=null}function wl(t){return null==t?null:Ol(t)}function Ol(t){if("function"!=typeof t)throw new Error;return t}function Ml(){return 0}function _l(t){return function(){return t}}ul.props={},kl.prototype=yl.prototype={constructor:kl,count:function(){return this.eachAfter(gl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return yl(this).eachBefore(bl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Sl=4294967296;function El(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Ll(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Tl(t[0],t[1]);case 3:return Nl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Pl(e,t))return[e];for(n=0;n<t.length;++n)if(Al(e,t[n])&&Pl(Tl(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Al(Tl(t[n],t[r]),e)&&Al(Tl(t[n],e),t[r])&&Al(Tl(t[r],e),t[n])&&Pl(Nl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Al(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Ll(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Pl(t,e){for(var n=0;n<e.length;++n)if(!Ll(t,e[n]))return;return 1}function Tl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Nl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function jl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Cl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Rl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Bl(t){this._=t,this.next=null,this.previous=null}function Il(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;jl(r,d,i=t[2]),d=new Bl(d),r=new Bl(r),i=new Bl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){jl(d._,r._,i=t[l]),i=new Bl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Cl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Cl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Rl(d);(i=i.next)!==r;)(s=Rl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=El(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Fl(t){return Math.sqrt(t.value)}function Dl(){var n=null,r=1,i=1,a=Ml;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Sl)/Sl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(zl(n)).eachAfter(Wl(a,.5,e)).eachBefore(Gl(1)):t.eachBefore(zl(Fl)).eachAfter(Wl(Ml,1,e)).eachAfter(Wl(a,t.r/Math.min(r,i),e)).eachBefore(Gl(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=wl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:_l(+t),e):a},e}function zl(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Wl(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Il(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Gl(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Hl(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vl(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var ql={depth:-1},Yl={},$l={};function Ul(t){return t.id}function Kl(t){return t.parentId}function Xl(){var y,v=Ul,m=Kl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=v,f=m,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=Ql(t,e-1)&&!Ql(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Zl);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Zl(r)),c.push($l));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new kl(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Yl:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Yl)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===$l&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===$l;--t)o.data=null}if(i.parent=ql,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(xl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(v=wl(t),e):v},e.parentId=function(t){return arguments.length?(m=wl(t),e):m},e.path=function(t){return arguments.length?(y=wl(t),e):y},e}function Zl(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Ql(t,e););return t.slice(0,e)}function Ql(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Jl(t,e){return t.parent===e.parent?1:2}function tc(t){var e=t.children;return e?e[0]:t.t}function ec(t){var e=t.children;return e?e[e.length-1]:t.t}function nc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function rc(){var h=Jl,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new nc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new nc(r[i],i)),n.parent=e;return(t.parent=new nc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=ec(o),i=tc(i),o&&i;)s=tc(s),(a=ec(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!ec(a)&&(a.t=o,a.m+=u-c),i&&!tc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function ic(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}nc.prototype=Object.create(kl.prototype);var ac=(1+Math.sqrt(5))/2;function oc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,v=[],m=e.children,b=0,x=0,k=m.length,w=e.value;b<k;){for(l=i-n,c=a-r;!(u=m[x++].value)&&x<k;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(w*t)),p=Math.max(h/y,y/f);x<k;++x){if(u+=s=m[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}v.push(o={value:u,dice:l<c,children:m.slice(b,x)}),o.dice?Vl(o,n,r,i,w?r+=c*u/w:a):ic(o,n,r,w?n+=l*u/w:i,a),w-=u,b=x}return v}var sc=function e(a){function t(t,e,n,r,i){oc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(ac);function lc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function cc(t,e,n,r,i){(1&t.depth?ic:Vl)(t,e,n,r,i)}var uc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Vl(o,e,n,r,h?n+=(i-n)*o.value/h:i):ic(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=oc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(ac);function fc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function hc(t={}){return[...fc(t),{name:"title",scale:"identity"}]}function dc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function pc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function gc(t={}){return fc(t)}function yc(){return[{type:"maybeKey"}]}function vc(t,e){return t.getBandWidth(t.invert(e))}function mc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?vc(l,a[e]):0;var r=p?vc(c,o[e]):0,e=g&&s?(vc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function bc(t){return parseFloat(t)/100}function xc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?bc(e)*o:+e,"string"==typeof t?bc(t)*s:+t]]})]}function kc(e){return"function"==typeof e?e:t=>t[e]}function wc(t,e){return Array.from(t,kc(e))}function Oc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=wc(t,e),o=wc(t,n),s=wc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Mc(t,e){return t.getBandWidth(t.invert(e))}const _c=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Mc(c,a[t]),n=e*(u?Mc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};_c.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...yc(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...pc()],interaction:{shareTooltip:!0}};const Sc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Ec(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Ac(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=Ec,o=(t,e)=>Ec(n(t),e),(t,e)=>n(t)-e):(a=n===Ec||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Lc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Lc(){return 0}function*Pc(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}Sc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc(),{type:"maybeZeroY1"}],postInference:[...pc()],interaction:{shareTooltip:!0}};r=Ac(Ec);const Tc=r.right,Nc=r.left,jc=Ac(function(t){return null===t?NaN:+t}).center;function Cc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Rc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Bc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Ic{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Fc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Dc(this,t))}has(t){return super.has(Dc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Dc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function zc(t){return t}function Wc(t,...e){return Vc(t,zc,zc,e)}function Gc(t,e,...n){return Vc(t,zc,e,n)}function Hc(t,e,...n){return Vc(t,Array.from,e,n)}function Vc(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Fc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function qc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=$c(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>$c(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Yc(n))}function Yc(r=Ec){if(r===Ec)return $c;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function $c(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Uc=Array.prototype.slice;function Kc(t){return()=>t}const Xc=Math.sqrt(50),Zc=Math.sqrt(10),Qc=Math.sqrt(2);function Jc(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=Xc?10:r>=Zc?5:r>=Qc?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?Jc(t,e,2*n):[a,o,s]}function tu(t,e,n){return Jc(t=+t,e=+e,n=+n)[2]}function eu(t){return Math.max(1,Math.ceil(Math.log(Cc(t))/Math.LN2)+1)}function nu(){var v=zc,m=Bc,b=eu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=v(t[a],a,t);var o=m(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(m===Bc&&([s,l]=function(t,e,n){let r;for(;;){var i=tu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?Jc(e,t,n):Jc(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=tu(s,l,u)),c[c.length-1]>=l)if(l<=o&&m===Bc){const n=tu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Tc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(v="function"==typeof t?t:Kc(t),e):v},e.domain=function(t){return arguments.length?(m="function"==typeof t?t:Kc([t[0],t[1]]),e):m},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Kc(Array.isArray(t)?Uc.call(t):t),e):b},e}function ru(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function iu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function au(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ou(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function su(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?$c:Yc(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),su(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(lu(n,i,r),0<o(n[a],f)&&lu(n,i,a);t<e;){for(lu(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?lu(n,i,e):lu(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function lu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function cu(t,e,n){var r;if((n=(t=Float64Array.from(Pc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?au(t):1<=e?ru(t):(n=(n-1)*e,(r=ru(su(t,e=Math.floor(n)).subarray(0,e+1)))+(au(t.subarray(e+1))-r)*(n-e))}function uu(r,t,i){if((i=(r=Float64Array.from(Pc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return ou(r);if(1<=t)return iu(r);t=Math.floor((i-1)*t),i=su(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>$c(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<Ec(o,t):0===Ec(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function fu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function hu(t,e){return cu(t,.5,e)}function du(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function pu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function gu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function yu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function vu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function mu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function bu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function xu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function ku(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function wu(t){return bu(t)||vu(t)}function Ou(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function Mu(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const _u=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Wc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Su=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Eu=()=>(t,e,n,r)=>{return(xu(r)?Su:_u)(t,e,n,r)};Eu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...yc(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...pc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Au=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=mc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Au.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...yc(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...dc()]};const Lu=s=>{const{cartesian:l=!1}=s;return l?xc:(t,e,n,r)=>{if(l)return xc(t,0,n,r);const{x:i,y:a}=n,o=mc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Lu.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...yc(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...dc()]};const Pu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Pu.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...yc(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...dc()]};const Tu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Wc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Tu.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...yc(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...pc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Nu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=mc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Nu.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...dc()]};const ju=s=>{var t=s["cartesian"];return t?xc:(t,e,n,r)=>{const{x:i,y:a}=n,o=mc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};ju.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...yc(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...dc()]};const Cu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Cu.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc()],postInference:[...dc()]};const Ru=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Bu=(Ru.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...yc(),{type:"maybeZeroX"}],postInference:[...pc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Bu.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...yc()],postInference:[...dc()]};const Iu=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Iu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["line"]}),{name:"y",required:!0}],preInference:[...yc(),{type:"maybeTupleY"}],postInference:[]};const Fu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Fu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["line"]}),{name:"x",required:!0}],preInference:[...yc(),{type:"maybeTupleX"}],postInference:[]};const Du=(...t)=>Nu(...t);function zu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Wu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=zu("x",r,n,e.x),o=zu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Du.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc()],postInference:[]};const Gu=()=>Wu();Gu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc()],postInference:[]};const Hu=()=>Wu({extendY:!0});Hu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["range"]}),{name:"x",required:!0}],preInference:[...yc()],postInference:[]};const Vu=()=>Wu({extendX:!0});function qu(t){return t.target.depth}function Yu(t,e){return t.sourceLinks.length?t.depth:e-1}function $u(t){return function(){return t}}function Uu(t,e){return Xu(t.source,e.source)||t.index-e.index}function Ku(t,e){return Xu(t.target,e.target)||t.index-e.index}function Xu(t,e){return t.y0-e.y0}function Zu(t){return t.value}function Qu(t){return t.index}function Ju(t){return t.nodes}function tf(t){return t.links}function ef(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function nf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function rf(){let x=0,k=0,w=1,O=1,M=24,_=8,S,E=Qu,A=Yu,L,P,T,N=Ju,j=tf,C=6;function e(e){e={nodes:N(e),links:j(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=ef(g,n)),"object"!=typeof r&&(r=t.target=ef(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=T)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(T),r.sort(T)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(gu(y.sourceLinks,Zu),gu(y.targetLinks,Zu)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(L){var s,l=Math.max(ru(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=L.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(ru(t,t=>t.depth)+1,0),n=(w-x-M)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+M,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(_,(O-k)/(ru(u,t=>t.length)-1)),u),f=au(t,t=>(O-k-(t.length-1)*S)/gu(t,Zu));for(const v of t){let e=k;for(const m of v){m.y0=e,m.y1=e+m.value*f,e=m.y1+S;for(const b of m.sourceLinks)b.width=b.value*f}e=(O-e+S)/(v.length+1);for(let t=0;t<v.length;++t){var h=v[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===T)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Ku),n.sort(Uu)}(v)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(Xu),o.length&&R(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,B(c))}void 0===P&&o.sort(Xu),o.length&&R(o,i)}}(u,d,p)}return nf(e),e}function R(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,O,t.length-1,e),i(t,k,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function B({sourceLinks:t,targetLinks:e}){if(void 0===T){for(const{source:{sourceLinks:t}}of e)t.sort(Ku);for(const{target:{targetLinks:e}}of t)e.sort(Uu)}}return e.update=function(t){return nf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:$u(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:$u(t),e):A},e.nodeDepth=function(t){return arguments.length?(L=t,e):L},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(M=+t,e):M},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:$u(t),e):N},e.links=function(t){return arguments.length?(j="function"==typeof t?t:$u(t),e):j},e.linkSort=function(t){return arguments.length?(T=t,e):T},e.size=function(t){return arguments.length?(x=k=0,w=+t[0],O=+t[1],e):[w-x,O-k]},e.extent=function(t){return arguments.length?(x=+t[0][0],w=+t[1][0],k=+t[0][1],O=+t[1][1],e):[[x,k],[w,O]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}Vu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...gc({shapes:["range"]}),{name:"y",required:!0}],preInference:[...yc()],postInference:[]};const af={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},of={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?au(t.sourceLinks,qu)-1:0},justify:Yu};const sf=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},af,f),l=rf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?of[n]||Yu:"function"==c?n:Yu).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function lf(t){return t}function cf(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function uf(t=""){throw new Error(t)}function ff(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function hf(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return df(t,e)||{}}function df(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Ze(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function pf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function gf(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function yf(t){return null===t||!1===t}function vf(t,e,n={},r=!1){return yf(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function mf(t,e={}){return!yf(t)&&!Array.isArray(t)&&bf(t)?nt(e,t):t}function bf(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function xf(t,e){return"object"==typeof t?rt(t,e):t}sf.props={};const kf=m=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},k={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},w={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=m,{links:t,nodes:c}=Oc(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:f=t=>t.key,color:h=f}=u,{links:i,nodes:t}=sf(Object.assign(Object.assign(Object.assign({},b),{nodeId:kc(f)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=f,spacing:g=5}=d,y=et(d,["text","spacing"]),v=kc(f);c=vf(l,"node",{title:v,items:[{field:"value"}]},!0),f=vf(l,"link",{title:"",items:[t=>({name:"source",value:v(t.source)}),t=>({name:"target",value:v(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:h}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},w),{text:p,dx:t=>t.x[0]<.5?g:-g}),y),...a],tooltip:c,animate:xf(s,"node"),axis:!1}),nt({},k,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},rt(r,"link")),tooltip:f,animate:xf(s,"link")})]}},wf=(kf.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);wf.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...hc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...yc()],postInference:[]};const Of=t=>t?parseInt(t):0;function Mf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||Of(t.width),e=e.clientHeight||Of(t.height),{width:(i={width:i-(Of(t.paddingLeft)+Of(t.paddingRight)),height:e-(Of(t.paddingTop)+Of(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function _f(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function Sf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:lc,treemapDice:Vl,treemapSlice:ic,treemapSliceDice:cc,treemapSquarify:sc,treemapResquarify:uc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Xl().path(p):Xl():yl)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(Hl),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:kc(r)(t)).sort(e.sort):p.count(),o=sc,i=!1,s=a=1,l=[0],d=h=f=u=c=Ml,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Ol(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:_l(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:_l(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:_l(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:_l(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:_l(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const Ef=f=>t=>{var{width:t,height:e}=_f(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["data","encode","scale","style","layout","labels","tooltip"]),u={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=Sf(n,nt({},u,o),r),n=rt(a,"label");return[nt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},c),{tooltip:mf(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},Af=(Ef.props={},f=>t=>{var{width:t,height:e}=_f(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=f,c=et(f,["data","encode","scale","style","layout","labels","tooltip"]),u={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Fe(t)?Xl().path(e.path):yl)(t);return r?n.sum(t=>kc(r)(t)).sort(e.sort):n.count(),Dl().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},u,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},c),{tooltip:mf(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function Lf(t,e){return au(t,t=>e[t])}function Pf(t,e){return ru(t,t=>e[t])}function Tf(t,e){const n=2.5*Nf(t,e)-1.5*Cf(t,e);return au(t,t=>e[t]>=n?e[t]:NaN)}function Nf(t,e){return cu(t,.25,t=>e[t])}function jf(t,e){return cu(t,.5,t=>e[t])}function Cf(t,e){return cu(t,.75,t=>e[t])}function Rf(t,e){const n=2.5*Cf(t,e)-1.5*Nf(t,e);return ru(t,t=>e[t]<=n?e[t]:NaN)}function Bf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Wc(t,t=>a[+t]).values()).flatMap(t=>{const e=Tf(t,i),n=Rf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}Af.props={};const If=f=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=f,o=et(f,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=et(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:Nf,y2:jf,y3:Cf},u=vf(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),i=vf(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=rt(r,"box"),t=rt(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Tf},c),{y4:Rf})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:xf(a,"box")},o),{type:"point",data:e,transform:[{type:Bf}],encode:n,style:Object.assign({},t),tooltip:i,animate:xf(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Lf},c),{y4:Pf})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},Ff=(If.props={},s=>{var t=s["cartesian"];return t?xc:(t,e,n,r)=>{const{x:i,y:a}=n,o=mc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Df(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,m=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(y+m)/2))?y=o:m=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+v)/2))?g=a:v=a,(u=n>=(o=(y+m)/2))?y=o:m=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function zf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Wf(t){return t[0]}function Gf(t){return t[1]}function Hf(t,e,n){e=new Vf(null==e?Wf:e,null==n?Gf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Vf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function qf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Ff.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...yc(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Po=Hf.prototype=Vf.prototype;function Yf(t){return function(){return t}}function $f(t){return 1e-6*(t()-.5)}function Uf(t){return t.index}function Kf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Xf(c){var u,f,a,o,h,d,s=Uf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Yf(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||$f(d),o=i.y+i.vy-r.y-r.vy||$f(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Kf(r,t.source)),"object"!=typeof t.target&&(t.target=Kf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Yf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Yf(+t),g(),e):r},e}Po.copy=function(){var t,e,n=new Vf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=qf(e));else n._root=qf(r);return n},Po.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Df(this.cover(e,n),e,n,t)},Po.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Df(this,i[u],a[u],t[u]);return this},Po.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},Po.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},Po.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Po.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new zf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new zf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new zf(y[2],s,c,a,i),new zf(y[1],a,l,o,c),new zf(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},Po.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},Po.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Po.root=function(){return this._root},Po.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},Po.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new zf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new zf(e,o,s,i,a)),(e=c[2])&&l.push(new zf(e,n,s,o,a)),(e=c[1])&&l.push(new zf(e,o,r,i,s)),e=c[0])&&l.push(new zf(e,n,r,o,s));return this},Po.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new zf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new zf(i,a,o,c,u)),(i=f[1])&&n.push(new zf(i,c,o,s,u)),(i=f[2])&&n.push(new zf(i,a,u,c,l)),i=f[3])&&n.push(new zf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Po.x=function(t){return arguments.length?(this._x=t,this):this._x},Po.y=function(t){return arguments.length?(this._y=t,this):this._y};var Zf={value:()=>{}};function Qf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Jf(r)}function Jf(t){this._=t}function th(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Zf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Jf.prototype=Qf.prototype={constructor:Jf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=th(i[n],t.name,e);else if(null==e)for(n in i)i[n]=th(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Jf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var eh,nh,rh=0,ih=0,ah=0,oh=1e3,sh=0,lh=0,ch=0,uh="object"==typeof performance&&performance.now?performance:Date,fh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hh(){return lh||(fh(dh),lh=uh.now()+ch)}function dh(){lh=0}function ph(){this._call=this._time=this._next=null}function gh(t,e,n){var r=new ph;return r.restart(t,e,n),r}function yh(){lh=(sh=uh.now())+ch,rh=ih=0;try{hh(),++rh;for(var t,e=eh;e;)0<=(t=lh-e._time)&&e._call.call(void 0,t),e=e._next;--rh}finally{for(var n,r,i=eh,a=1/(rh=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:eh=r);nh=n,mh(a),lh=0}}function vh(){var t=uh.now(),e=t-sh;oh<e&&(ch-=e,sh=t)}function mh(t){rh||(ih=ih&&clearTimeout(ih),24<t-lh?(t<1/0&&(ih=setTimeout(yh,t-uh.now()-ch)),ah=ah&&clearInterval(ah)):(ah||(sh=uh.now(),ah=setInterval(vh,oh)),rh=1,fh(yh)))}ph.prototype=gh.prototype={constructor:ph,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?hh():+n)+(null==e?0:+e),this._next||nh===this||(nh?nh._next=this:eh=this,nh=this),this._call=t,this._time=n,mh()},stop:function(){this._call&&(this._call=null,this._time=1/0,mh())}};const bh=4294967296;function xh(t){return t.x}function kh(t){return t.y}var wh=10,Oh=Math.PI*(3-Math.sqrt(5));function Mh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=gh(i),n=Qf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%bh)/bh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=wh*Math.sqrt(.5+r),e=r*Oh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function _h(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,B=(r=Yf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Yf(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=Hf(i,xh,kh).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function F(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=$f(c))*i),0===a&&(s+=(a=$f(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=$f(c))*i),0===a&&(s+=(a=$f(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,v,m,b,x,k,w,O,M,_,S,E,A,L,n=Xf(a).id(kc(n)),P=("function"==typeof o&&B.strength(o),"function"==typeof s&&n.strength(s),Mh(t).force("link",n).force("charge",B));function T(t){for(var e,n=0,r=v.length;n<r;++n)(e=v[n]).vy+=(b[n]-e.y)*m[n]*t}function N(){if(v){var t,e=v.length;for(m=new Array(e),b=new Array(e),t=0;t<e;++t)m[t]=isNaN(b[t]=+y(v[t],t,v))?0:+x(v[t],t,v)}}function j(t){for(var e,n=0,r=w.length;n<r;++n)(e=w[n]).vx+=(M[n]-e.x)*O[n]*t}function C(){if(w){var t,e=w.length;for(O=new Array(e),M=new Array(e),t=0;t<e;++t)O[t]=isNaN(M[t]=+k(w[t],t,w))?0:+_(w[t],t,w)}}function R(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*L,r=(r/e-E)*L,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(L=1,null==S&&(S=0),null==E&&(E=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(E=+t,R):E},R.strength=function(t){return arguments.length?(L=+t,R):L},R)):P.force("x",(_=Yf(.1),"function"!=typeof k&&(k=Yf(null==k?0:+k)),j.initialize=function(t){w=t,C()},j.strength=function(t){return arguments.length?(_="function"==typeof t?t:Yf(+t),C(),j):_},j.x=function(t){return arguments.length?(k="function"==typeof t?t:Yf(+t),C(),j):k},j)).force("y",(x=Yf(.1),"function"!=typeof y&&(y=Yf(null==y?0:+y)),T.initialize=function(t){v=t,N()},T.strength=function(t){return arguments.length?(x="function"==typeof t?t:Yf(+t),N(),T):x},T.y=function(t){return arguments.length?(y="function"==typeof t?t:Yf(+t),N(),T):y},T)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const Sh=g=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,f=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},f),h=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=Oc(t,e),{nodesData:t,linksData:p}=_h({links:t,nodes:p},nt({},{joint:!0},i),e),i=vf(l,"link",{items:[t=>({name:"source",value:kc(u)(t.source)}),t=>({name:"target",value:kc(u)(t.target)})]}),e=vf(l,"node",{items:[t=>({name:"key",value:kc(c)(t)})]},!0);return[nt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:p,encode:d,labels:o,style:rt(r,"link"),tooltip:i,animate:xf(s,"link")}),nt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},h),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:xf(s,"link")})]},Eh=(Sh.props={},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=yl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Ah=t=>Eh(pl)(t),Lh=(Ah.props={},t=>Eh(rc)(t)),Ph=(Lh.props={},u=>{const f={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Lh(Object.assign(Object.assign(Object.assign({},f),i),{field:c}))(t),t=vf(l,"node",{title:"name",items:["value"]},!0),l=vf(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:xf(s,"link")}),nt({},h,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:xf(s,"node")})]}});Ph.props={};var Th={},Nh={},jh=34,Ch=10,Rh=13;function Bh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Ih(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Fh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Dh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Fh(-e,6):9999<e?"+"+Fh(e,6):Fh(e,4))+"-"+Fh(t.getUTCMonth()+1,2)+"-"+Fh(t.getUTCDate(),2)+(a?"T"+Fh(n,2)+":"+Fh(r,2)+":"+Fh(i,2)+"."+Fh(a,3)+"Z":i?"T"+Fh(n,2)+":"+Fh(r,2)+":"+Fh(i,2)+"Z":r||n?"T"+Fh(n,2)+":"+Fh(r,2)+"Z":"")}function zh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Nh;if(l)return l=!1,Th;var t,e,n=a;if(r.charCodeAt(n)===jh){for(;a++<i&&r.charCodeAt(a)!==jh||r.charCodeAt(++a)===jh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Ch?l=!0:e===Rh&&(l=!0,r.charCodeAt(a)===Ch)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Ch)l=!0;else if(e===Rh)l=!0,r.charCodeAt(a)===Ch&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Ch&&--i,r.charCodeAt(i-1)===Rh&&--i;(e=c())!==Nh;){for(var u=[];e!==Th&&e!==Nh;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Dh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Bh(n=t),function(t,e){return r(i(t),e,n)}):Bh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Ih(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Ih(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Wh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Gh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Gh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Hh=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ue(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),zh(i).parse(t,a?Wh:lf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Hh.props={};const Vh=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};Vh.props={};const qh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Yh=(qh.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Yh.props={};const $h=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};$h.props={};const Uh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Uh.props={};const Kh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Xh=(Kh.props={},t=>{const e=t["value"];return()=>e}),Zh=(Xh.props={},t=>{const{callback:e=lf}=t;return t=>e(t)}),Qh=(Zh.props={},t=>{const{callback:e=lf}=t;return t=>Array.isArray(t)?t.map(e):t});Qh.props={};var Jh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const td={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function ed(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:v,sortBy:m}=Object.assign(Object.assign({},td),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=v(t)});const i=Wc(r,t=>t.source),a=Wc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=gu(e,t=>t.sourceWeight)+gu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof m?m:Jh[m])&&r.sort(n),!(n=(r=e).length))throw uf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Wc(e,t=>t.source),l=Wc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const nd=e=>t=>ed(e)(t),rd=(nd.props={},Math.PI/180),id=64,ad=2048;function od(t){return t.text}function sd(){return"serif"}function ld(){return"normal"}function cd(t){return t.value}function ud(){return 90*~~(2*Math.random())}function fd(){return 1}function hd(){}function dd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(id<<5)/c,ad/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*rd),h=Math.cos(o.rotate*rd),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=id<<5&&(i=0,a+=n,n=0),a+e>=ad)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*rd),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(id<<5)/c,ad/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,v=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*v;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var m=v*e+(t>>5),b=p[(a+e)*(id<<5)+(i+t)<<2]?1<<31-t%32:0;g[m]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*v)}}}function pd(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function gd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function yd(){return document.createElement("canvas")}function vd(t){return"function"==typeof t?t:function(){return t}}const md={archimedean:pd,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function bd(){let b=[256,256],r=od,i=sd,p=cd,g=ld,y=ud,v=fd,x=pd,k=Math.random,m=hd,w=[],O=null,M=1/0;const _=ld,S=yd,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(id<<5)/e,t.height=ad/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||gd((b[0]>>5)*b[1]),c=w.length,u=[],f=w.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=v.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<M&&++h<c;){var i=f[h];i.x=a*(k()+.5)>>1,i.y=o*(k()+.5)>>1,dd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=k()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,v=32-y,m=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<m;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<v|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(m.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),m.call(null,"end",{cloud:E,words:u,bounds:d}))}return O&&clearInterval(O),O=setInterval(n,0),n(),E},E.stop=function(){return O&&(clearInterval(O),O=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=gd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){M=null==t?1/0:t},E.words=function(t){w=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=vd(t)},E.font=function(t){i=vd(t)},E.fontWeight=function(t){g=vd(t)},E.rotate=function(t){y=vd(t)},E.spiral=function(t){x=md[t]||t},E.fontSize=function(t){p=vd(t)},E.padding=function(t){v=vd(t)},E.random=function(t){k=vd(t)},E.on=function(t){m=vd(t)},E}const xd={size:[500,500],fontSize:[14,28]};function kd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const wd=h=>f=>ue(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},xd,h),e=bd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ue(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[au(e),ru(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",kd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=et(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Od(e){return"string"==typeof e?t=>t[e]:e}wd.props={};const Md=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Od(r),l=Od(t),c=Gc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},_d=(Md.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});_d.props={};const Sd=u=>c=>ue(void 0,void 0,void 0,function*(){var{width:t,height:e}=_f(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield wd(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Ed(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Ad(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ld(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Sd.props={};const Pd=Math.sqrt(50),Td=Math.sqrt(10),Nd=Math.sqrt(2);function jd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Pd?10:n>=Td?5:n>=Nd?2:1)*10**t:-(10**-t)/(n>=Pd?10:n>=Td?5:n>=Nd?2:1)}function Cd(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Pd?r*=10:n>=Td?r*=5:n>=Nd&&(r*=2),e<t?-r:r}const Rd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=jd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=jd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=jd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},Bd=36e5,Id=864e5,Fd=7*Id;Id,Id;function Dd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}n=Dd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=Dd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),Ms=Dd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),i=Dd(Bd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Bd*e)},t=>t.getHours()),As=Dd(Id,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Id*e)},t=>t.getDate()-1);const zd=Dd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());So=Dd(Fd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Fd*e)},t=>{var e=zd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Fd)}),Eo=Dd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Wd={millisecond:n,second:e,minute:Ms,hour:i,day:As,week:So,month:zd,year:Eo};Ao=Dd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),To=Dd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),No=Dd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Fo=Dd(Bd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Bd*e)},t=>t.getUTCHours()),Do=Dd(Id,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Id*e)},t=>t.getUTCDate()-1);const Gd=Dd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());zo=Dd(Fd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Fd*e)},t=>{var e=Gd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Fd)}),Wo=Dd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const Hd={millisecond:Ao,second:To,minute:No,hour:Fo,day:Do,week:zo,month:Gd,year:Wo};function Vd(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?Hd:Wd;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Ld(i,l,0,c,s);let f;return f=u===c?[a,Cd(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Cd(t,e,n),1)]}const qd=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Vd(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Yd(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function $d(t){return Xd(t,"Function")}function Ud(t){return null==t}var Kd={}.toString,Xd=function(t,e){return Kd.call(t)==="[object "+e+"]"},Zd=function(t){return Array.isArray?Array.isArray(t):Xd(t,"Array")};var Qd=function(t){if("object"!=typeof(e=t)||null===e||!Xd(t,"Object"))return!1;var e;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},Jd=function(t){return Xd(t,"Number")},tp=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){$d(n)&&"prototype"===e||r.push(t)};if(e)if(Zd(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},ep=5;function np(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||ep,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Qd(o)?(Qd(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Zd(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function rp(t){return t}var ip,ap=function(t,e){if(!Yd(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};function op(t){return Ud(t)?0:(Yd(t)?t:Object.keys(t)).length}function sp(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if($d(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(ip=ip||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),ip.measureText(Xd(t,"String")?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],tp(e=void 0===e?{}:e)).join("")});const lp=e=>t=>-e(-t),cp=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?lp(t):t},up=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?lp(n):n},fp=(t,e,n,r)=>{var i=t<0,a=cp(r,i),r=up(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function hp(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Jd(t)?Math.round(t):t}):i;this.output=Ed(a,r,e,t)},t.prototype.invert=void 0}}var dp,Go={exports:{}},Ho={exports:{}},pp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},gp=Array.prototype.concat,yp=Array.prototype.slice,vp=Ho.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];pp(i)?e=gp.call(e,yp.call(i)):e.push(i)}return e},mp=(vp.wrap=function(t){return function(){return t(vp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),bp=Ho.exports,xp=Object.hasOwnProperty,kp=Object.create(null);for(dp in mp)xp.call(mp,dp)&&(kp[mp[dp]]=dp);var wp=Go.exports={to:{},get:{}};function Op(t,e,n){return Math.min(Math.max(e,t),n)}function Mp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}wp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=wp.get.hsl(t),n="hsl";break;case"hwb":e=wp.get.hwb(t),n="hwb";break;default:e=wp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},wp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:xp.call(mp,e[1])?((i=mp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Op(i[n],0,255);return i[3]=Op(i[3],0,1),i},wp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Op(parseFloat(t[2]),0,100),Op(parseFloat(t[3]),0,100),Op(isNaN(e)?1:e,0,1)]):null},wp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Op(parseFloat(t[2]),0,100),Op(parseFloat(t[3]),0,100),Op(isNaN(e)?1:e,0,1)]):null},wp.to.hex=function(){var t=bp(arguments);return"#"+Mp(t[0])+Mp(t[1])+Mp(t[2])+(t[3]<1?Mp(Math.round(255*t[3])):"")},wp.to.rgb=function(){var t=bp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},wp.to.rgb.percent=function(){var t=bp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},wp.to.hsl=function(){var t=bp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},wp.to.hwb=function(){var t=bp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},wp.to.keyword=function(t){return kp[t.slice(0,3)]};var _p=Go.exports;function Sp(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Ep(t){var e,n,r,t=_p.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Sp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Sp(n,r,e),255*Sp(n,r,e-1/3),t]):null):null}const Ap=(e,n)=>t=>e*(1-t)+n*t,Lp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Ap(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Ep(n),c=Ep(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Pp=(t,e)=>{const n=Ap(t,e);return t=>Math.round(n(t))};function Tp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Np(t){return"object"==typeof t?t.valueOf():t}class jp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Np,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Tp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Tp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Cp{constructor(t){this.options=np({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=np({},this.options,t),this.rescale(t)}rescale(t){}}const Rp=Symbol("defaultUnknown");function Bp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Ip(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Rp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Fp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Dp extends Cp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Rp}}map(t){return 0===this.domainIndexMap.size&&Bp(this.domainIndexMap,this.getDomain(),this.domainKey),Ip({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Bp(this.rangeIndexMap,this.getRange(),this.rangeKey),Ip({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Fp(e),this.rangeKey=Fp(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Dp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function zp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new jp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new jp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var v=new Array(l);for(let t=0;t<l;t+=1){v[t]=(m=y,Math.round(1e12*m)/1e12);var m=e[t];y+=g.get(m)}return{valueBandWidth:c,valueStep:g,adjustedRange:v}}class Wp extends Dp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Rp,flex:[]}}clone(){return new Wp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return zp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Gp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=jd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};class Hp extends Cp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Gp}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return Jd(e)&&Jd(r)?t(e,r,n):[]}clone(){return new Hp(this.options)}}function Vp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const qp=[1,5,2,2.5,4,3],Yp=100*Number.EPSILON;const $p=(n,r,t=5,i=!0,a=qp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var v=a[t],m=(f=v,h=a,d=y,p=void 0,p=op(h),1-ap(h,f)/(p-1)-d+1);if(o[0]*m+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*m+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/v;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var k=y*v*10**t,w=(M=r,w=k*(e-1),(M-=n)<w?1-((w-M)/2)**2/(.1*M)**2:1);if(o[0]*m+o[1]*w+o[2]*b+o[3]<g.score)break;var O=Math.floor(r/k)*y-(e-1)*y,M=Math.ceil(n/k)*y;if(O<=M){var _=M-O;for(let t=0;t<=_;t+=1){var S=(O+t)*(k/y),E=S+k*(e-1),A=k,L=function(t,e,n,r,i,a){var o=op(e),e=ap(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Yp||a-t<Yp)&&r<=0&&0<=i?1:s)}(v,a,y,S,E,A),P=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,T=(l=e,T=n,l=(l-1)/(E-(N=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(T,N)),2-Math.max(l/c,c/l)),N=o[0]*L+o[1]*P+o[2]*T+ +o[3];g.score<N&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Vp(g.lmax),e=Vp(g.lmin),j=Vp(g.lstep),C=Math.floor((t=(t-e)/j,Math.round(1e12*t)/1e12))+1,R=new Array(C);R[0]=Vp(e);for(let t=1;t<C;t+=1)R[t]=Vp(R[t-1]+j);return R};class Up extends Cp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:$p}}map(t){return sp(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Up(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Jd(t)&&Jd(r)?n(t,r,e):[]}}const Kp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Ed(o=t<r?(a=Ad(t,r),n(e,i)):(a=Ad(r,t),n(i,e)),a)},Xp=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Ad(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Ld(r,t,1,i)-1,n=a[e];return Ed(o[e],n)(t)}},Zp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Xp:Kp)(t,e,r?Pp:n)};class Qp extends Cp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ap,tickCount:5}}map(t){return sp(t)?this.output(t):this.options.unknown}invert(t){return sp(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Rd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return rp}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Zp(n.map(t),r,a,i);this.output=Ed(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Zp(i,r.map(t),Ap);this.input=Ed(e,n,i)}}class Jp extends Qp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Lp,tickMethod:Gp,tickCount:5}}chooseTransforms(){return[rp,rp]}clone(){return new Jp(this.options)}}class t0 extends Wp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Rp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new t0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const e0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class n0 extends Qp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Lp,tickMethod:Gp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[rp,rp]:(t=.5===r?e0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new n0(this.options)}}class r0 extends n0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Lp,tickMethod:Gp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new r0(this.options)}}class i0 extends Cp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return sp(t)?(t=Ld(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new i0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const a0=(t,e,n,r=10)=>{var i=t<0,a=up(r,i),o=cp(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=Gp(l,c,n))}else h=Gp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class o0 extends Qp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Lp,tickMethod:a0,tickCount:5}}chooseNice(){return fp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[cp(t,e),up(t,e)]}clone(){return new o0(this.options)}}class s0 extends i0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:$p}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Rd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new s0(this.options)}}function l0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class c0 extends i0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:$p}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=l0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new c0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var u0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,f0=/\[([^]*?)\]/gm;function h0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function d0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function p0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var g0,Vo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qo=["January","February","March","April","May","June","July","August","September","October","November","December"],c=h0(qo,3),y0=d0({},{dayNamesShort:h0(Vo,3),dayNames:Vo,monthNamesShort:c,monthNames:qo,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),v0={D:function(t){return String(t.getDate())},DD:function(t){return p0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return p0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return p0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return p0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return p0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return p0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return p0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return p0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return p0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return p0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return p0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+p0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+p0(Math.floor(Math.abs(t)/60),2)+":"+p0(Math.abs(t)%60,2)}},m0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const b0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Vd(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function x0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class k0 extends Qp{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:b0,interpolate:Ap,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return qd}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?Hd:Wd,s=t?x0:rp;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=m0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=m0[t]||t).replace(f0,function(t,e){return r.push(e),"@@@"}),d0(d0({},y0),n));return(t=t.replace(u0,function(t){return v0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new k0(this.options)}}var w0;let O0=g0=class extends Jp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:rp,tickMethod:Gp,tickCount:5}}constructor(t){super(t)}clone(){return new g0(this.options)}};O0=g0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([hp(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Ed(Ap(0,1),Ad(t,e))})],O0);let M0=w0=class extends Jp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:rp,tickMethod:Gp,tickCount:5}}constructor(t){super(t)}clone(){return new w0(this.options)}};function _0(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function S0(t){return t.map((t,e)=>e)}function E0(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function A0(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)A0(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function L0(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...A0(e,t));return n}function P0([t,e],[n,r]){return[t-n,e-r]}function T0([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function N0([t,e]){return Math.atan2(e,t)}function j0([t,e]){return N0([t,e])+Math.PI/2}function C0(t,e){t=N0(t),e=N0(e);return t<e?e-t:2*Math.PI-(t-e)}function R0(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function B0([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function L(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function I0(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*T0(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function F0(t,e,n,r,i){e=N0(P0(r,e))+Math.PI,n=N0(P0(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function D0(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=S0(a),[r,o]=Bc(t,t=>a[t]);const s=new Jp({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function z0(t){var[t,e,n,r]=t;return[r,t,e,n]}function W0(t,e,n){var[e,r,,i]=yu(t)?z0(e):e,[n,a]=n,t=t.getCenter(),o=j0(P0(e,t)),r=j0(P0(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:T0(i,t),outerRadius:T0(e,t)}}function G0(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function H0(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function V0(t,e){return vu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function q0(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new Y0([t],null,t,t.ownerDocument)}M0=w0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([hp(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Ed(Ap(0,.5),Ad(e,n)),a=Ed(Ap(.5,1),Ad(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],M0);class Y0{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Y0(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Y0(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new Y0([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new Y0(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new Y0(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new Y0([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Wc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const Wc=f.get(d);s.push([h,Wc]);for(const y of Wc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new Y0([],i,this._parent,this._document),new Y0(a,null,this._parent,this._document),new Y0(o,null,this._parent,this._document),new Y0([],s,this._parent,this._document),new Y0(l,null,this._parent,this._document)];return new Y0(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new Y0(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=Y0.registry[t])?new e:uf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new Y0([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}Y0.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:X.Text,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};const $0=t=>{const u=t["radius"],f=et(t,["shape","radius"]);var t=rt(f,"pointer"),e=rt(f,"pin");const h=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=rl({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=q0(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),f),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),f),i=it(new X.Group);return yf(h)||("function"==typeof h?i.append(()=>h(c,e,s,r)):i.append("line").call(L,a).node()),yf(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(L,o).node()),i.node()}},U0=f=>{const h={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:$0,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=f,a=et(f,["data","scale","style","animate","transform"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},h,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},h,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r.toString())},c),animate:"object"==typeof i?rt(i,"text"):i})]}},K0=(U0.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),X0=(K0.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Z0=(X0.props={},t=>new Wp(t)),Q0=(Z0.props={},t=>new Jp(t)),J0=(Q0.props={},t=>new Dp(t)),t1=(J0.props={},t=>new Up(t)),e1=(t1.props={},t=>new t0(t)),n1=(e1.props={},t=>new k0(t)),r1=(n1.props={},t=>new o0(t)),i1=(r1.props={},t=>new n0(t)),a1=(i1.props={},t=>new i0(t)),o1=(a1.props={},t=>new c0(t)),s1=(o1.props={},t=>new s0(t)),l1=(s1.props={},t=>new r0(t)),c1=(l1.props={},t=>new O0(t)),u1=(c1.props={},t=>new Hp(t));function f1(t){return function(){return t}}u1.props={};const h1=Math.abs,d1=Math.atan2,p1=Math.cos,g1=Math.max,y1=Math.min,v1=Math.sin,m1=Math.sqrt,b1=1e-12,x1=Math.PI,k1=x1/2,w1=2*x1;function O1(t){return 1<=t?k1:t<=-1?-k1:Math.asin(t)}const M1=Math.PI,_1=2*M1,S1=1e-6,E1=_1-S1;function A1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class L1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?A1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return A1;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>S1&&(Math.abs(h*c-u*f)>S1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((M1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>S1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>S1||Math.abs(this._y1-c)>S1)&&this._append`L${l},${c}`,n&&((f=f<0?f%_1+_1:f)>E1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>S1&&this._append`A${n},${n},0,${+(f>=M1)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function P1(){return new L1}function T1(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new L1(r)}function N1(t){return t.innerRadius}function j1(t){return t.outerRadius}function C1(t){return t.startAngle}function R1(t){return t.endAngle}function B1(t){return t&&t.padAngle}function I1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/m1(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*m1(g1(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function F1(){var A=N1,L=j1,P=f1(0),T=null,N=C1,j=R1,C=B1,R=null,B=T1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,v,m,b,x,k,w=+A.apply(this,arguments),O=+L.apply(this,arguments),M=N.apply(this,arguments)-k1,_=j.apply(this,arguments)-k1,S=h1(_-M),E=M<_;if(R=R||(t=B()),O<w&&(e=O,O=w,w=e),O>b1?S>w1-b1?(R.moveTo(O*p1(M),O*v1(M)),R.arc(0,0,O,M,_,!E),w>b1&&(R.moveTo(w*p1(_),w*v1(_)),R.arc(0,0,w,_,M,E))):(r=e=M,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>b1&&(T?+T.apply(this,arguments):m1(w*w+O*O)),k=x=s=y1(h1(O-w)/2,+P.apply(this,arguments)),h>b1&&(f=O1(h/w*v1(u)),h=O1(h/O*v1(u)),(a-=2*f)>b1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(M+_)/2),(o-=2*h)>b1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(M+_)/2)),u=O*p1(e),f=O*v1(e),h=w*p1(i),M=w*v1(i),s>b1&&(d=O*p1(n),p=O*v1(n),g=w*p1(r),y=w*v1(r),S<x1)&&((_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<b1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,M))?(S=u-_[0],m=f-_[1],b=d-_[0],v=p-_[1],m=1/v1((1<(S=(S*b+m*v)/(m1(S*S+m*m)*m1(b*b+v*v)))?0:S<-1?x1:Math.acos(S))/2),b=m1(_[0]*_[0]+_[1]*_[1]),x=y1(s,(w-b)/(m-1)),k=y1(s,(O-b)/(1+m))):x=k=0),o>b1?k>b1?(l=I1(g,y,u,f,O,k,E),c=I1(d,p,h,M,O,k,E),R.moveTo(l.cx+l.x01,l.cy+l.y01),k<s?R.arc(l.cx,l.cy,k,d1(l.y01,l.x01),d1(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,k,d1(l.y01,l.x01),d1(l.y11,l.x11),!E),R.arc(0,0,O,d1(l.cy+l.y11,l.cx+l.x11),d1(c.cy+c.y11,c.cx+c.x11),!E),R.arc(c.cx,c.cy,k,d1(c.y11,c.x11),d1(c.y01,c.x01),!E))):(R.moveTo(u,f),R.arc(0,0,O,e,n,!E)):R.moveTo(u,f),w>b1&&a>b1?x>b1?(l=I1(h,M,d,p,w,-x,E),c=I1(u,f,g,y,w,-x,E),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,d1(l.y01,l.x01),d1(c.y01,c.x01),!E):(R.arc(l.cx,l.cy,x,d1(l.y01,l.x01),d1(l.y11,l.x11),!E),R.arc(0,0,w,d1(l.cy+l.y11,l.cx+l.x11),d1(c.cy+c.y11,c.cx+c.x11),E),R.arc(c.cx,c.cy,x,d1(c.y11,c.x11),d1(c.y01,c.x01),!E))):R.arc(0,0,w,i,r,E):R.lineTo(h,M)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +j.apply(this,arguments))/2-x1/2;return[p1(e)*t,v1(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:f1(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:f1(+t),e):L},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:f1(+t),e):P},e.padRadius=function(t){return arguments.length?(T=null==t?null:"function"==typeof t?t:f1(+t),e):T},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:f1(+t),e):N},e.endAngle=function(t){return arguments.length?(j="function"==typeof t?t:f1(+t),e):j},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:f1(+t),e):C},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function D1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function z1(t){this._context=t}function W1(t){return new z1(t)}function G1(t){return t[0]}function H1(t){return t[1]}function V1(o,s){var l=f1(!0),c=null,u=W1,f=null,h=T1(e);function e(t){var e,n,r,i=(t=D1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?G1:f1(o),s="function"==typeof s?s:void 0===s?H1:f1(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:f1(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:f1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:f1(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function q1(u,f,h){var d=null,p=f1(!0),g=null,y=W1,v=null,m=T1(e);function e(t){var e,n,r,i,a,o=(t=D1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(v=y(a=m())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,v.areaStart(),v.lineStart();else{for(v.lineEnd(),v.lineStart(),r=e-1;n<=r;--r)v.point(l[r],c[r]);v.lineEnd(),v.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),v.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return v=null,a+""||null}function t(){return V1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?G1:f1(+u),f="function"==typeof f?f:f1(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?H1:f1(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:f1(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:f1(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:f1(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:f1(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:f1(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:f1(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:f1(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(v=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=v=null:v=y(g=t),e):g},e}P1.prototype=L1.prototype,z1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Y1=U1(W1);function $1(t){this._curve=t}function U1(e){function t(t){return new $1(e(t))}return t._curve=e,t}function K1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(U1(t)):e()._curve},t}function X1(){}function Z1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Q1(t,e){this._context=t,this._k=(1-e)/6}function J1(t,e){this._context=t,this._k=(1-e)/6}function tg(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>b1&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>b1&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function eg(t,e){this._context=t,this._alpha=e}$1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Q1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Z1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Q1(t,n)}return t.tension=function(t){return e(+t)},t}(0),J1.prototype={areaStart:X1,areaEnd:X1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Z1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new J1(t,n)}return t.tension=function(t){return e(+t)},t}(0),eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:tg(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ng=function e(n){function t(t){return n?new eg(t,n):new Q1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function rg(t,e){this._context=t,this._alpha=e}rg.prototype={areaStart:X1,areaEnd:X1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:tg(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ig=function e(n){function t(t){return n?new rg(t,n):new J1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function ag(t){this._context=t}function og(t){return new ag(t)}function sg(t,e){this._context=t,this._t=e}function lg(t){return new sg(t,.5)}function cg(t){return new sg(t,0)}function ug(t){return new sg(t,1)}function fg(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!vu(n)&&!bu(n)){var[p,,g]=!!yu(n)?z0(t):t;const[x,m]=p;var[g,p]=P0(g,p),y=(0<g?x:x+g)+o,v=(0<p?m:m+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new X.Rect({})).style("x",y).style("y",v).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(L,r).node()}const{y:m,y1:b}=e;l=n.getCenter(),p=W0(n,t,[m,b]),s=F1().cornerRadius(a).padAngle(i*Math.PI/180);return it(new X.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(L,r).node()}ag.prototype={areaStart:X1,areaEnd:X1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};const hg=M=>{const{colorAttribute:_,first:S=!0,last:E=!0}=M,A=et(M,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===_||s?r:0,inset:y=0,insetLeft:v=y,insetRight:m=y,insetBottom:b=y,insetTop:x=y}=A,k=et(A,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:w}=e;const O=[S?l:d,S?c:p,E?u:g,E?f:h];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],yu(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,O[e]]))),{inset:y,insetLeft:v,insetRight:m,insetBottom:b,insetTop:x});return it(fg(t,e,n,d)).call(L,o).style("fill","transparent").style(_,i).style(H0(M),w).style("lineWidth",r).style("stroke",void 0===s?i:s).call(L,k).node()}},dg=(hg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>hg(Object.assign({colorAttribute:"fill"},t))),pg=(dg.props=Object.assign(Object.assign({},hg.props),{defaultMarker:"square"}),t=>hg(Object.assign({colorAttribute:"stroke"},t)));pg.props=Object.assign(Object.assign({},hg.props),{defaultMarker:"hollowSquare"});const gg=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(yu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=et(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return hg(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function yg(t,e,n){var[t,r,i,a]=t;if(yu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}gg.props=Object.assign(Object.assign({},hg.props),{defaultMarker:"funnel"});const vg=t=>gg(Object.assign({adjustPoints:yg},t));function mg(t){const e="function"==typeof t?t:t.render;return class extends X.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}vg.props=Object.assign(Object.assign({},hg.props),{defaultMarker:"square"});const bg=mg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new X.Path({})).style("d",e).call(L,r),it(t).maybeAppend("line1",()=>new X.Path({})).style("d",n).call(L,i)});const xg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,y=et(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?D0(a,s,l,h,d):r,s=V0(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(vu(n)){const u=n.getCenter();c=n=>K1(V1().curve(Y1)).angle((t,e)=>j0(P0(n[e],u))).radius((t,e)=>T0(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=V1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new X.Path({})).style("d",c(r)||[]).call(L,l):a&&!g?it(new X.Path({})).style("d",c(t)).call(L,l):it(new bg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},kg=(xg.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?og:W1;return xg(Object.assign({curve:i},a))(t,e,n,r)}),wg=(kg.props=Object.assign(Object.assign({},xg.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?ig:ng;return xg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Og=(wg.props=Object.assign(Object.assign({},xg.props),{defaultMarker:"smooth"}),t=>xg(Object.assign({curve:ug},t))),Mg=(Og.props=Object.assign(Object.assign({},xg.props),{defaultMarker:"hv"}),t=>xg(Object.assign({curve:cg},t))),_g=(Mg.props=Object.assign(Object.assign({},xg.props),{defaultMarker:"vh"}),t=>xg(Object.assign({curve:lg},t)));_g.props=Object.assign(Object.assign({},xg.props),{defaultMarker:"hvh"});var Lo=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]],_s=(Lo.style=["fill"],Lo.bind(void 0)),ws=(_s.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]),Ps=(ws.style=["fill"],ws.bind(void 0)),a=(Ps.style=["fill"],ws.bind(void 0)),Ns=(a.style=["stroke","lineWidth"],(t,e,n)=>{var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]}),Rs=(Ns.style=["fill"],Ns.bind(void 0)),zs=(Rs.style=["stroke","lineWidth"],(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),Os=(zs.style=["fill"],zs.bind(void 0)),Ls=(Os.style=["stroke","lineWidth"],(t,e,n)=>{var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),xs=(Ls.style=["fill"],Ls.bind(void 0)),Ss=(xs.style=["stroke","lineWidth"],(t,e,n)=>{var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),Sg=(Ss.style=["fill"],Ss.bind(void 0)),Es=(Sg.style=["stroke","lineWidth"],(t,e,n)=>{var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),ac=(Es.style=["fill"],Es.bind(void 0)),r=(ac.style=["stroke","lineWidth"],(t,e,n)=>[["M",t,e+n],["L",t,e-n]]),Po=(r.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]),n=(Po.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]),e=(n.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]),Ms=(e.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),i=(Ms.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),As=(i.style=["stroke","lineWidth"],i.bind(void 0)),So=(As.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]),Eo=(So.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]),Ao=(Eo.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]),To=(Ao.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]),No=(To.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]);No.style=["stroke","lineWidth"];const Eg=new Map([["bowtie",Es],["cross",Po],["dash",As],["diamond",Ns],["dot",i],["hexagon",Ss],["hollowBowtie",ac],["hollowDiamond",Rs],["hollowHexagon",Sg],["hollowPoint",_s],["hollowSquare",a],["hollowTriangle",Os],["hollowTriangleDown",xs],["hv",Eo],["hvh",To],["hyphen",Ms],["line",r],["plus",e],["point",Lo],["rect",Ps],["smooth",So],["square",ws],["tick",n],["triangleDown",Ls],["triangle",zs],["vh",Ao],["vhv",No]]);const u=u=>{const{colorAttribute:f,symbol:t,mode:h="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=Eg.get(t)||Eg.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=q0(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||ku(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(h,t,e,n)||d.r||o.r;return it(new X.Path).call(L,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(H0(u),s).style(f,a).call(L,d).node()}},Ag=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Lg=(Ag.props=Object.assign({defaultMarker:"bowtie"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Pg=(Lg.props=Object.assign({defaultMarker:"cross"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Tg=(Pg.props=Object.assign({defaultMarker:"diamond"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Ng=(Tg.props=Object.assign({defaultMarker:"hexagon"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),jg=(Ng.props=Object.assign({defaultMarker:"hollowBowtie"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Cg=(jg.props=Object.assign({defaultMarker:"hollowDiamond"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Rg=(Cg.props=Object.assign({defaultMarker:"hollowHexagon"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Bg=(Rg.props=Object.assign({defaultMarker:"hollowPoint"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Ig=(Bg.props=Object.assign({defaultMarker:"hollowSquare"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Fg=(Ig.props=Object.assign({defaultMarker:"hollowTriangle"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Dg=(Fg.props=Object.assign({defaultMarker:"hollowTriangleDown"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),zg=(Dg.props=Object.assign({defaultMarker:"hyphen"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Wg=(zg.props=Object.assign({defaultMarker:"line"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),Gg=(Wg.props=Object.assign({defaultMarker:"plus"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Hg=(Gg.props=Object.assign({defaultMarker:"point"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Vg=(Hg.props=Object.assign({defaultMarker:"square"},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),qg=(Vg.props=Object.assign({defaultMarker:"tick"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Yg=(qg.props=Object.assign({defaultMarker:"triangle"},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),$g=(Yg.props=Object.assign({defaultMarker:"triangleDown"},u.props),t=>{const{arrowSize:u="40%"}=t,f=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=G0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=I0(a,r,{arrowSize:u}),c=P1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new X.Path).call(L,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(L,f).node()}});function Ug(t){Xg(t,!0)}function Kg(t){Xg(t,!1)}function Xg(t,e){var n=e?"visible":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t&&e(t,n)})}(t,function(t){t.attr("visibility",n)})}$g.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};ce(Jg,Zg=X.Group);var Zg,Qg=Jg;function Jg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Zg.apply(this,y([],k(t),!1))||this;return n.addEventListener(X.ElementEvent.INSERTED,function(){Kg(n)}),n}function ty(t){t=t.appendChild(new Qg({class:"offscreen"}));return Kg(t),t}ce(ry,ey=X.Text),Object.defineProperty(ry.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=ty(this)),this._offscreen},enumerable:!1,configurable:!0}),ry.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var ey,ny=ry;function ry(t){var e=(t=void 0===t?{}:t).style,t=et(t,["style"]);return ey.call(this,m({style:m({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function iy(t){return t*Math.PI/180}function ay(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(sy.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(sy.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(sy.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(sy.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),sy.fromRect=function(t){return new sy(t.x,t.y,t.width,t.height)},sy.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var oy=sy;function sy(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function ly(t,e){return Re(t)?t.apply(void 0,y([],k(e),!1)):t}function cy(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=k(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function uy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)fy(t,e[r]);return t}var fy=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=k(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Ge(t)?(Ge(r[e])||(n[e]={}),a<o?fy(r[e],t,a+1,o):n[e]=i[e]):Fe(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},hy=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function dy(t,e,n){void 0===n&&(n="..."),"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function py(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}function gy(t){return"function"==typeof t?t():Ye(t)||Ue(t)?new ny({style:{text:String(t)}}):t}function yy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function vy(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function my(t,e){var t=k(t,2),n=t[0],t=t[1],e=k(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function by(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t?n(e):(r&&i(e),null)}function xy(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var ky=function(e,n){return function(t){return e*(1-t)+n*t}};function wy(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?ky(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=wy(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];e in n?r[e]=wy(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function Oy(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=k([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new oy(e,n,r-e,i-n)}function My(n,t,e){function r(t){var e=k(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=k([0,0],2))[0],d=s[1],e=Oy(o=t.map(function(t){var e=t.width,t=t.height,n=k([h,d],2),r=n[0],n=n[1],i=k([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new oy(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return Oy(s=o.map(function(t){var e=t.x,n=t.y,t=oy.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=oy.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=oy.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function _y(t,e,n){return[]}function Sy(t,e){return[t[0]*e,t[1]*e]}function Ey(t,e){return[t[0]+e[0],t[1]+e[1]]}function Ay(t,e){return[t[0]-e[0],t[1]-e[1]]}function Ly(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function Py(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function Ty(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Ny(t){var e;return 0===t[0]&&0===t[1]?[0,0]:(e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)),[t[0]/e,t[1]/e])}function jy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Cy(t,e){var n,r={},i=Array.isArray(e)?e:[e];for(n in t)i.includes(n)||(r[n]=t[n]);return r}function Ry(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r,s=[1/0,1/0],l=[-1/0,-1/0];if(o){s=(r=k(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=Ly(s,x=t[c]),l=Py(l,x)}for(var c=0,f=t.length;c<f;c+=1){var h,d,p,g,y,v,m,b,x=t[c];0!==c||n?c!==f-1||n?(h=t[[c?c-1:f-1,c-1][n?0:1]],v=[0,0],v=Sy(v=Ay(d=t[n?(c+1)%f:c+1],h),e),0!==(y=(p=Ty(x,h))+(g=Ty(x,d)))&&(p/=y,g/=y),y=Sy(v,-p),v=Sy(v,g),m=Ey(x,y),b=Ly(b=Ey(x,v),Py(d,x)),b=Py(b,Ly(d,x)),m=Ly(m=Ey(x,y=Sy(y=Ay(b,x),-p/g)),Py(h,x)),b=Ey(x,v=Sy(v=Ay(x,m=Py(m,Ly(h,x))),g/p)),o&&(m=Ly(m=Py(m,s),l),b=Ly(b=Py(b,s),l)),a.push(i),a.push(m),i=b):(m=x,a.push(i),a.push(m)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],l=k(r,1)[0],f.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),f}var By=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function Iy(t){var e,n,r={};for(e in t)n=e,By.includes(n)&&(r[e]=t[e]);return r}function Fy(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}O.prototype.selectAll=function(t){return new O("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},O.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new O(this._elements,null,this._parent,this._document,void 0,void 0,t)},O.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new O([t],null,t,this._document)},O.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=k(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=fe(this,Dy,"m",zy).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=fe(this,Dy,"m",zy).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=fe(this,Dy,"m",zy).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},O.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Wc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var v=h.get(g);l.push([p,v]);try{r=void 0;for(var m=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(v),b=m.next();!b.done;b=m.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var k=[new O([],a,this._parent,this._document),new O(o,null,this._parent,this._document),new O(s,null,this._parent,this._document),new O([],l,this._parent,this._document),new O(c,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,k)},O.prototype.merge=function(t){var e=y(y([],k(this._elements),!1),k(t._elements),!1),t=y(y([],k(this._transitions),!1),k(t._transitions),!1);return new O(e,null,this._parent,this._document,void 0,t)},O.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=O.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},O.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},O.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new O([],null,this._parent,this._document,void 0,this._transitions)},O.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},O.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},O.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},O.prototype.styles=function(t,o){return void 0===t&&(t={}),void 0===o&&(o=!0),this.each(function(r,i){var a=this;Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],n=t[1],t="function"==typeof n&&o?n:function(){return n};void 0!==n&&a.attr(e,t.call(a,r,i))})})},O.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},O.prototype.maybeUpdate=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},O.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},O.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},O.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,y([this._parent,this],k(e),!1)),this},O.prototype.node=function(){return this._elements[0]},O.prototype.nodes=function(){return this._elements},O.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},O.prototype.parent=function(){return this._parent},Dy=new WeakSet,zy=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new O([t],null,this._parent,this._document)},O.registry={g:X.Group,rect:X.Rect,circle:X.Circle,path:X.Path,text:ny,ellipse:X.Ellipse,image:X.Image,line:X.Line,polygon:X.Polygon,polyline:X.Polyline,html:X.HTML};var Dy,zy,Wy,Gy=O;function O(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),Dy.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function M(t){return new Gy([t],null,t,t.ownerDocument)}function Hy(t,e,n){return t.querySelector(e)?M(t).select(e):M(t).append(n)}function Vy(t){if(Ue(t))return[t,t,t,t];if(Fe(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}function qy(t){var t=t.getLocalBounds(),t=k([t.min,t.max],2),e=k(t[0],2),n=e[0],e=e[1],t=k(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function Yy(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function $y(t,e){return"".concat(e).concat(Yy(t))}function _(t,i,a){void 0===a&&(a=!1);var o={};return Object.entries(t).forEach(function(t){var e,n,t=k(t,2),r=t[0],t=t[1];"className"!==r&&"class"!==r&&(r.startsWith($y(i,"show"))!==a?r===$y(i,"show")?o[r]=t:o[r.replace(new RegExp(Yy(i)),"")]=t:r.startsWith(i)!==a&&(r=r,void 0===n&&(n=!0),e=(e=i)||(null==(e=r.match(/^([a-z][a-z0-9]+)/))?void 0:e[0])||"",r=r.replace(new RegExp("^(".concat(e,")")),""),"filter"===(n=n?(e=r).toString().charAt(0).toLowerCase()+e.toString().slice(1):r)&&"function"==typeof t||(o[n]=t)))}),o}function Uy(t,r){return Object.entries(t).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1];return n.startsWith("show")?t["show".concat(r).concat(n.slice(4))]=e:t["".concat(r).concat(Yy(n))]=e,t},{})}function Ky(t,n){void 0===n&&(n=["x","y","class","className"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=k(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Xy(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Xy)}function Zy(){this.constructor=Wy}Wy=Xy,Fo=Error,Zy.prototype=Fo.prototype,Wy.prototype=new Zy,Xy.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Qy;var Jy=sn(function(t,e){var n=Ye(t)?t:t.style.text.toString(),e=e||tv(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Qy=Qy||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),Qy.measureText(n).width},function(t,e){return[Ye(t)?t:t.style.text.toString(),Object.values(e||tv(t)).join()].join("")}),tv=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function ev(o,t){if(t)try{var e=t.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=(r=o).getBBox()).width,a=r.height,[(r=k([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",e)}catch(t){}}ce(rv,nv=X.CustomElement),Object.defineProperty(rv.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=ty(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(rv.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),rv.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},rv.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},rv.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){Xg(this,"hidden"!==this.attributes.visibility)}.call(this)},rv.prototype.update=function(t,e){return this.attr(uy({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},rv.prototype.clear=function(){this.removeChildren()},rv.prototype.bindEvents=function(t,e){};var nv,Do=rv;function rv(t,e){t=nv.call(this,uy({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function iv(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function av(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function ov(t,e,n){return[["M",t-n,e],["L",t+n,e]]}zo=iv,Wo=ov;function sv(t){n="default",De(e=t)&&e instanceof Image?n="image":Re(e)?n="symbol":Ye(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}ce(uv,lv=Do),uv.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=et(t,["symbol","size"]),o=sv(r);by(!!o,M(e),function(t){t.maybeAppendByClassName("marker",o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?t.styles({img:r,width:e=2*i,height:e,x:-i,y:-i}):(e=i/2,n=Re(r)?r:uv.getSymbol(r),t.styles(m({path:null==n?void 0:n(0,0,e)},a)))})})},uv.MARKER_SYMBOL_MAP=new Map,uv.registerSymbol=function(t,e){uv.MARKER_SYMBOL_MAP.set(t,e)},uv.getSymbol=function(t){return uv.MARKER_SYMBOL_MAP.get(t)};var lv,cv=uv;function uv(){return null!==lv&&lv.apply(this,arguments)||this}cv.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),cv.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),cv.registerSymbol("line",av),cv.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),cv.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),cv.registerSymbol("circle",iv),cv.registerSymbol("point",zo),cv.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),cv.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),cv.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),cv.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),cv.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),cv.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),cv.registerSymbol("line",av),cv.registerSymbol("dot",ov),cv.registerSymbol("dash",Wo),cv.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),cv.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),cv.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),cv.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),cv.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});ce(dv,fv=Do),dv.prototype.render=function(t,e){var n,r,i=t.padding,i=void 0===i?0:i,a=t.marker,o=t.text,s=t.radius,l=t.spacing,c=t.align,u=t.verticalAlign,f=_(t,"label"),t=_(t,"background"),i=k(Vy(i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=Hy(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),y=a?{marker:a}:{symbol:"triangle",size:0},a=Hy(g,".tag-marker",function(){return new cv({style:y})}).attr("className","tag-marker").call(function(t){t.node().clear()}).update(y).node(),l=(l=l,{x:(v=(a=a).getLocalBounds()).halfExtents[0]?v.max[0]+(l||0):a.style.x,y:v.halfExtents[1]?(v.min[1]+v.max[1])/2:a.style.y}),v=l.x,a=l.y,a=(M(g).maybeAppendByClassName("tag-text",function(){return new ny}).styles(m(m({fontSize:12,text:b(o)?"":"".concat(o),x:v,y:a},f),{textBaseline:"middle"})).call(function(t){o||t.remove()}),l=i,v=h,a=c||"start",f=u||"top",u=(c=g).getLocalBounds(),r=n=0,"start"===a&&(n=l),"center"===a&&(n=-u.halfExtents[0]),"end"===a&&(n=-l-2*u.halfExtents[0]),"top"===f&&(r=v+u.halfExtents[1]),"middle"===f&&(r=0),"bottom"===f&&(r=v-2*u.halfExtents[1]),c.setLocalPosition([n,r]),g.getLocalBounds());M(e).maybeAppendByClassName("tag-background","rect").styles(m({zIndex:-1,y:a.min[1]-h,x:a.min[0]-i,width:null!==t?i+d+2*a.halfExtents[0]:0,height:null!==t?h+p+2*a.halfExtents[1]:0,radius:null!=s?s:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},t))},dv.tag="tag";var fv,hv=dv;function dv(t){return fv.call(this,t,{padding:4,spacing:4})||this}var pv,gv,yv={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},vv={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},mv={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};function bv(t){var n=pv.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=t,n.render(n.attributes,n)},n}function xv(t){return gv.call(this,nt({},xv.defaultOptions,t))||this}ce(bv,pv=Do),Object.defineProperty(bv.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(bv.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=tn(i)?this.getStyle("button").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(bv.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),bv.prototype.getStyle=function(t){var e=this.attributes,n=e.size,e=e.type,r=this.state,i=nt({},yv[n],vv[e][r],this.attributes.default,this.attributes[r]);return"disabled"===r&&(Object.keys(i).forEach(function(t){t in mv&&(i[t]=mv[t])}),Object.keys(mv.strict).forEach(function(t){i[t]=mv.strict[t]}),nt(i,this.attributes.disabled||{})),_(i,t)},bv.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.markerSymbol,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),k(Vy(r),4)),a=(r[0],r[1]),r=(r[2],r[3]),o=this.buttonHeight,s=this.getStyle("marker"),l=this.markerSize,c=m(m({},s),{symbol:i,x:r+l/2,y:o/2,size:l}),s=Hy(e,".marker",function(){return new cv({className:"marker",style:c})}).update({style:c}).node().getLocalBounds(),i=this.getStyle("text"),s=(this.textShape=Hy(e,".text","text").attr("className","text").styles(m(m({x:l?s.max[0]+t:r,y:o/2},i),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),i=this.getStyle("button");M(e).maybeAppendByClassName(".background","rect").styles(m(m({zIndex:-1},i),{height:o,width:r+(l?l+t:0)+2*s.halfExtents[0]+a}))},bv.prototype.update=function(t){this.attr(nt({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=t,this.render(this.attributes,this)},bv.prototype.setState=function(t){this.update({state:t})},bv.prototype.hide=function(){this.style.visibility="hidden"},bv.prototype.show=function(){this.style.visibility="visible"},bv.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},bv.tag="button",ce(xv,gv=Do),xv.prototype.render=function(t,e){for(var n=t.x,r=t.y,c=t.items,i=(t.textStyle,t.padding),u=t.width,f=t.separator,i=k(Vy(void 0===i?0:i),3),a=i[0],h=i[1],i=i[2],d=_(t,"tag"),p=Hy(e,".container","g").styles({className:"container",x:n+i,y:r+a}),g=0,y=0,o=(p.node().removeChildren(),function(t){var e,n,r,i=c[t],a=new hv({className:"breadcrumb-item",style:m(m(m(m({x:g,y:y},d),{text:b(i.text)?i.id:i.text}),(o=["marker"],null!==(e=i)&&Ge(e)?(n={},ze(o,function(t){dn.call(e,t)&&(n[t]=e[t])}),n):{})),{padding:0})}),o=(p.append(function(){return a}),a.getLocalBounds()),s=2*o.halfExtents[0],o=2*o.halfExtents[1],s=(g+=s,b(u)||u-h<g&&(a.attr({x:0,y:y+o}),g=s,y+=o),v.bindInnerEvents(a,i),f||{}),i=s.spacing,i=void 0===i?0:i,l=s.text,l=void 0===l?"/":l,s=s.style;t!==c.length-1&&(r=new ny({className:"".concat(xv.tag,"-separator"),id:"".concat(xv.tag,"-separator-").concat(t),style:m(m({x:g+i,y:y+o/2},s),{text:l,textAlign:"end",textBaseline:"middle"})}),p.append(function(){return r}),t=r.getLocalBounds(),g+=2*t.halfExtents[0]+i)}),v=this,s=0;s<c.length;s++)o(s)},xv.prototype.update=function(t){this.attr(nt({},this.attributes,t)),this.render(this.attributes,this)},xv.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},xv.tag="breadcrumb",xv.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};ce(Ov,kv=X.DisplayObject),Ov.prototype.render=function(){var t=this.attributes.columns;M(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Ov.prototype.update=function(t){this.attr(uy({},this.attributes,t)),this.render()},Ov.prototype.clear=function(){this.removeChildren()};var kv,wv=Ov;function Ov(t){var e=this,n=t.style,t=et(t,["style"]);return(e=kv.call(this,nt({},{type:"column"},m({style:n},t)))||this).columnsGroup=new X.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}ce(Sv,Mv=X.DisplayObject),Sv.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},Sv.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Sv.prototype.update=function(t){this.attr(uy({},this.attributes,t)),this.render()},Sv.prototype.renderLines=function(t){M(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Sv.prototype.renderAreas=function(t){M(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})};var Mv,_v=Sv;function Sv(t){var e=this,n=t.style,t=et(t,["style"]);return(e=Mv.call(this,nt({},{type:"lines"},m({style:n},t)))||this).linesGroup=e.appendChild(new X.Group),e.areasGroup=e.appendChild(new X.Group),e.render(),e}function Ev(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return y([e===n?"M":"L"],k(t),!1)});return e?t.reverse():t}function Av(t,e){if(void 0===e&&(e=!1),t.length<=2)return Ev(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];fn(a,n.slice(-2))||n.push.apply(n,y([],k(a),!1))}var o=Ry(n,!1);return e?o.unshift(y(["M"],k(t[r-1]),!1)):o.unshift(y(["M"],k(t[0]),!1)),o}function Lv(t,e,n){t=an(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function Pv(t){return 0===t.length?[0,0]:[Ve(function(t,e){if(Fe(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Re(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return Ve(t)||0})),He(function(t,e){if(Fe(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Re(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return He(t)||0}))]}function Tv(t){for(var e=an(t),n=e[0].length,t=k([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}ce(Cv,Nv=Do),Object.defineProperty(Cv.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=an(t),Ue(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"data",{get:function(){return this.attributes.isStack?Tv(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"baseline",{get:function(){var t=this.scales.y,e=k(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"linesStyle",{get:function(){var n=this,t=this.attributes,e=t.type,r=t.isStack,i=t.smooth;if("line"!==e)throw new Error("linesStyle can only be used in line type");var a,o,s,l,c,u,f,h,d,p=_(this.attributes,"area"),g=_(this.attributes,"line"),t=this.containerShape.width,e=this.data;return 0===e[0].length?{lines:[],areas:[]}:(a=this.scales,u=a.x,a=a.y,e=e,o=(u={type:"line",x:u,y:a}).x,s=u.y,l=(u=k(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=k([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),$e(s.map(t),c,l)]})}),u=[],p&&(e=this.baseline,u=r?(i?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Av(o),l=void 0,l=0===i?Lv(s,e,n):(a=Av(t[i-1],!0),o=o[0],a[0][0]="L",y(y(y([],k(s),!1),k(a),!1),[y(["M"],k(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Ev(t[i]),s=void 0,s=0===i?Lv(o,e,n):((a=Ev(t[i-1],!0))[0][0]="L",y(y(y([],k(o),!1),k(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(f=i,h=t,d=e,a.map(function(t){return Lv((f?Av:Ev)(t),h,d)}))),{lines:a.map(function(t,e){return m({stroke:n.getColor(e),path:(i?Av:Ev)(t)},g)}),areas:u.map(function(t,e){return m({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Cv.prototype,"columnsStyle",{get:function(){var i=this,a=_(this.attributes,"column"),t=this.attributes,o=t.isStack;if("column"!==t.type)throw new Error("columnsStyle can only be used in column type");var t=this.containerShape.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=Tv(s));var e=this.createScales(s),l=e.x,c=e.y,e=k(Pv(s),2),n=e[0],e=e[1],u=new Jp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return m(m({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Cv.prototype.render=function(t,e){this.container=Hy(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=Hy(e,".".concat(r),function(){return new("line"===n?_v:wv)({className:r,style:i})}).styles(i).node()},Cv.prototype.getColor=function(t){var e=this.attributes.color;return Fe(e)?e[t%e.length]:Re(e)?e.call(null,t):e},Cv.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,i=n.range,i=void 0===i?[]:i,a=n.isGroup,n=n.spacing,o=this.containerShape,s=o.width,o=o.height,l=k(Pv(t),2),c=l[0],l=l[1],c=new Jp({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new Jp({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new Wp({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},Cv.tag="sparkline";var Nv,jv=Cv;function Cv(t){return Nv.call(this,t,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff"})||this}function Rv(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=k(t,1)[0];return!e.includes(t)})),Object.fromEntries(e.map(function(t){var e;return"boolean"!=typeof(e=n)&&"enter"in e&&"update"in e&&"exit"in e?!1===n[t]?[t,!1]:[t,m(m({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function Bv(t,e){t?t.finished.then(e):e()}function Iv(t,e){"update"in t?t.update(e):t.attr(e)}function Fv(t,e,n){return 0===e.length?null:n?t.animate(e,n):(Iv(t,{style:e.slice(-1)[0]}),null)}function Dv(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=k(t,2),n=t[0],t=t[1];b(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?Fv(r,[i,a],m({fill:"both"},e)):(Iv(r,a),null)}function zv(t,e){return t.style.opacity||(t.style.opacity=1),Dv(t,{opacity:0},e)}var Wv,Gv={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Hv={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Vv={orientation:"horizontal",showLabel:!0,type:"start"},qv=cy({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),Yv=cy({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),$v=(ce(Uv,Wv=Do),Uv.prototype.render=function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orientation,t=et(t,["size","radius","orientation"]),a=2.4*n,r=M(e).maybeAppendByClassName(Yv.iconRect,"rect").styles(m(m({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Yv.iconLine,"-1"),"line").styles(m({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Yv.iconLine,"-2"),"line").styles(m({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},Uv);function Uv(){return null!==Wv&&Wv.apply(this,arguments)||this}ce(Zv,Kv=Do),Zv.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=k(Ky(_(this.attributes,"label"),[]),2),i=r[0],r=r[1];by(!!n,M(t).maybeAppendByClassName(Yv.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Yv.label,"text").styles(m(m({},Hv),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},Zv.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=m(m({orientation:e},Gv),_(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new $v({style:n})}:e;M(t).maybeAppendByClassName(Yv.iconGroup,"g").selectAll(Yv.icon.class).data([r]).join(function(t){return t.append(r).attr("className",Yv.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},Zv.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var Kv,Xv=Zv;function Zv(t){return Kv.call(this,t,Vv)||this}ce(tm,Qv=Do),Object.defineProperty(tm.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=_(this.attributes,"sparkline"),m(m({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=k(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(tm.prototype,"availableSpace",{get:function(){var t=k(Vy(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),tm.prototype.getValues=function(){return this.values},tm.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attributes.values=t=void 0===t?[0,0]:t;t=!1!==e&&this.attributes.animate;Dv(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},tm.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(Dv(this.startHandle,this.getHandleStyle("start"),t),Dv(this.endHandle,this.getHandleStyle("end"),t))},tm.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.attr("values",t),this.setValues(t),e&&this.onValueChange(n)},tm.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=_(this.attributes,"track");this.trackShape=M(t).maybeAppendByClassName(qv.track,"rect").styles(m(m({cursor:e?"crosshair":"default"},this.shape),n))},tm.prototype.renderSparkline=function(t){var n=this;by("horizontal"===this.attributes.orientation,M(t).maybeAppendByClassName(qv.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(qv.sparkline,function(){return new jv({style:e})}).update(e)})},Object.defineProperty(tm.prototype,"selectionStyle",{get:function(){var t=_(this.attributes,"selection");return m(m({},t),this.calcMask())},enumerable:!1,configurable:!0}),tm.prototype.renderHandles=function(){var t,e=this,n=(this.attributes.showHandle?["start","end"]:[]).map(function(t){return{type:t}}),r=this;null!=(t=this.foregroundGroup)&&t.selectAll(qv.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new Xv({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(qv.handle.name," ").concat(e,"-handle")),"".concat(e,"Handle"));(r[t]=this).addEventListener("pointerdown",function(t){r.onDragStart(e)(t)})})},function(t){return t.each(function(t){t=t.type;this.update(r.getHandleStyle(t))})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");r[t]=void 0}).remove()})},tm.prototype.renderSelection=function(t){this.foregroundGroup=M(t).maybeAppendByClassName(qv.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(qv.selection,"rect").styles(this.selectionStyle),this.renderHandles()},tm.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},tm.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=k(this.range,2),r=n[0],n=n[1],i=k(this.getValues().map(function(t){return jy(t,e)}),2),a=i[0],i=i[1],t=k((t||[a,i]).map(function(t){return jy(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=k([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},tm.prototype.calcMask=function(t){var t=k(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},tm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=k(this.clampValues(),2),o=a[0],a=a[1],t=("start"===t?o:a)*this.getOrientVal([i,e]);return{x:n+this.getOrientVal([t,i/2]),y:r+this.getOrientVal([e/2,t])}},tm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orientation,n=n.formatter,i=_(this.attributes,"handle"),a=_(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=new ny({style:m(m({},a),{text:n})}),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},tm.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=_(this.attributes,"handleLabel"),m(m({},e),this.calcHandleText(t))):{}},tm.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=_(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return m({cursor:n,shape:t,size:r},e)},tm.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return m(m(m(m({},Uy(this.getHandleIconStyle(),"icon")),Uy(m(m({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},tm.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,t=t.height;return e||Math.floor((this.getOrientVal([+t,+n])+4)/2.4)},tm.prototype.getOrientVal=function(t){var t=k(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},tm.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=k(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},tm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},tm.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new X.CustomEvent(n,{detail:t}))})},tm.prototype.bindEvents=function(){var t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},tm.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},tm.tag="slider";var Qv,Jv=tm;function tm(t){var a=Qv.call(this,t,m(m(m({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,scrollable:!0,selectionCursor:"move",selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1]},Uy(Vv,"handle")),Uy(Gv,"handleIcon")),Uy(Hv,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(py(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(py(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new X.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}ce(rm,em=Do),Object.defineProperty(rm.prototype,"padding",{get:function(){return Vy(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(rm.prototype,"value",{get:function(){var t=this.attributes.value,e=k(this.range,2),n=e[0],e=e[1];return $e(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(rm.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(rm.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=k(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=k(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(rm.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(rm.prototype,"thumbRadius",{get:function(){var t,e=this.attributes,n=e.isRound,e=e.thumbRadius;return n?(t=(n=this.availableSpace).width,n=n.height,e||this.getOrientVal([n,t])/2):0},enumerable:!1,configurable:!0}),rm.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=k(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},rm.prototype.getValue=function(){return this.value},rm.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=_(this.attributes,"track"),o=_(this.attributes,"thumb"),s=m(m({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},Uy(a,"track")),Uy(o,"selection"));this.slider=M(t).maybeAppendByClassName("scrollbar",function(){return new Jv({style:s})}).update(s).node()},rm.prototype.render=function(t,e){this.renderSlider(e)},rm.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=k(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues($e(t,i,r)),e),this.onValueChange(n)},rm.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},rm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},rm.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},rm.tag="scrollbar";var em,nm=rm;function rm(t){var a=em.call(this,t,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.attributes.value;t!==e&&(a.dispatchEvent(new X.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new X.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=k(a.getLocalPosition(),2))[0],e=e[1],n=(i=k(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(py(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new X.CustomEvent("trackMouseleave",{detail:t.detail}))},a}var im={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new X.Path({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",tickStrokeOpacity:.65,labelOverlap:[]},am=(nt({},im,{style:{type:"arc"}}),nt({},im,{style:{}}),cy({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis")),om=cy({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function sm(t){return t.reduce(function(t,e,n){return t.push(y([0===n?"M":"L"],k(e),!1)),t},[])}function lm(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?sm(r):e?(i=Ty(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(y(["M"],k(e),!1)):t.push(y(["A",i,i,0,0,a],k(e),!1)),t},[])):[]):sm(t)}function cm(t,e,n){function r(t,e){return[l,t,c,e,s].flat()}var i=n.type,a=n.connect,o=n.center,s=n.closed?[["Z"]]:[],n=k([lm(t,n),lm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=k([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([y(["L"],k(e),!1)],[y(["L"],k(t),!1)]);if(o)return a=(n=k([Ty(e,o),Ty(t,o)],2))[0],i=n[1],r([y(["A",a,a,0,0,1],k(e),!1),y(["L"],k(e),!1)],[y(["A",i,i,0,0,0],k(t),!1),y(["L"],k(t),!1)]);throw new Error("Arc grid need to specified center")}function um(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=k([e[l].points,e[l+1].points],2),c=cm(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(om.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=ly(t,[t,e,s]);this.attr(t)}).attr("className",om.region.name)},function(t){return t.transition(function(t,e){return Dv(this,ly(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=zv(this,r.exit);return Bv(e,function(){return t.remove()}),e})}).transitions()}ce(dm,fm=Do),dm.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=et(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=k(e,1)[0];return m(m({},t),{points:y(y([],k(e),!1),[n],!1)})}):s),l=M(e).maybeAppendByClassName(om.lineGroup,"g"),e=M(e).maybeAppendByClassName(om.regionGroup,"g"),o=(l=l,r=o,i=(n=t).animate,a=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:lm(t.points,n)}}),l.selectAll(om.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=ly(Iy(m({path:t.path},r)),[t,e,a]);this.attr(m({class:om.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.each(function(t,e){Dv(this,ly(Iy(m({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=zv(this,i.exit);return Bv(e,function(){return t.remove()}),e})}).transitions()),l=um(e,s,t);return y(y([],k(o),!1),k(l),!1)};var fm,hm=dm;function dm(){return null!==fm&&fm.apply(this,arguments)||this}function pm(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=k(t,2);return[t[0],ly(t[1],e)]}))}function gm(t,e){return e&&Re(e)?t.filter(e):t}var ym=sn(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),vm=sn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=k(e.startPos,2))[0],n=n[1],i=k(e.endPos,2),Ny([(r=k([i[0]-r,i[1]-n],2))[0],r[1]])):(i=iy(ym(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n,r,i,a="linear"===(n=e).type?(a=n.startPos,r=n.endPos,y(y([],k(a),!1),k(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,y(y([a,r],k(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function mm(t,e,n){t=vm(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}var bm=sn(function(t,e){var n=k(e.startPos,2),r=n[0],n=n[1],e=k(e.endPos,2),e=k([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return y(y([t],k(e.startPos),!1),k(e.endPos),!1).join()}),xm=sn(function(t,e){var n=e.radius,r=k(e.center,2),i=r[0],r=r[1],t=iy(ym(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return y([t,e.startAngle,e.endAngle,e.radius],k(e.center),!1).join()});function km(t,e){return("linear"===e.type?bm:xm)(t,e)}function wm(t,e){return e-t==360}function Om(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=k([i,i],2),l=s[0],s=s[1],c=k([iy(t),iy(e)],2),u=c[0],c=c[1],f=k(a(u),2),h=f[0],f=f[1],d=k(a(c),2),p=d[0],d=d[1];return wm(t,e)?[["M",h,f],["A",l,s,0,1,0,(c=k(a((c+u)/2),2))[0],c[1]],["A",l,s,0,1,0,p,d]]:(u=180<o?1:0,c=e<t?0:1,"M".concat(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function Mm(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,f=e.radius;return t.selectAll(am.line.class).data([{path:Om.apply(void 0,y(y([l,c],k(u),!1),[f],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",am.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,r,e,n,i,a=this,o=(o=(i=(i=t=this).attributes).startAngle,e=i.endAngle,n=i.center,i=i.radius,o=y(y([o,e],k(n),!1),[i],!1),e=y(y([l,c],k(u),!1),[f],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=wy(o,e),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,m({fill:"both"},n))):(t.attr("__keyframe_data__",e),null));return o&&(o.onframe=i=function(){var t=hn(a.attributes,"__keyframe_data__");a.style.path=Om.apply(void 0,y([],k(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function _m(t){var t=k(t,2),e=k(t[0],2),n=e[0],e=e[1],t=k(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function Sm(e,t,n,r){function i(t){return e.selectAll(am.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(am.line.name," ").concat(t.className)}).styles(n).transition(function(t){return Dv(this,_m(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return Dv(this,_m(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,f=t.truncRange,h=t.lineExtension,d=k([c,u],2),p=k(d[0],2),g=p[0],p=p[1],d=k(d[1],2),y=d[0],d=d[1],u=k(h?(c=k([c=c,u=u,h=void 0===(h=h)?[0,0]:h],3),h=(u=k(c[0],2))[0],u=u[1],v=(a=k(c[1],2))[0],a=a[1],m=(c=k(c[2],2))[0],c=c[1],h=(v=k([v-h,a-u],2))[0],a=v[1],u=Math.sqrt(Math.pow(h,2)+Math.pow(a,2)),m=(v=k([-m/u,c/u],2))[0],c=v[1],[m*h,m*a,c*h,c*a]):new Array(4).fill(0),4),v=u[0],m=u[1],h=u[2],c=u[3];return l&&f?(u=(a=k(f,2))[0],l=a[1],o=(u=k([g+(f=y-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(f=k([g+f*l,p+s*l],2))[0],l=f[1],f=i([{line:[[g+v,p+m],[o,u]],className:am.lineFirst.name},{line:[[s,l],[y+h,d+c]],className:am.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,f):i([{line:[[g+v,p+m],[y+h,d+c]],className:am.line.name}])}function Em(t,e,n){var r,i,a,o,s,l=e.type,c=_(e,"line"),n=("linear"===l?Sm:Mm)(t,e,Cy(c,"arrow"),n);return t=t,l=l,c=c,r=(e=e).showArrow,i=e.showTrunc,a=e.lineArrow,o=e.lineArrowOffset,s=e.lineArrowSize,l="arc"!==l&&i?t.select(am.lineSecond.class):t.select(am.line.class),!r||!a||"arc"===e.type&&wm(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=gy(a)).attr(c),Fy(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function Am(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Lm(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=k(km(t,i),2),r=n[0],n=n[1],t=k(Sy(mm(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function Pm(t,e,n,r){var i=_(n,"grid"),a=i.type,o=i.areaFill,s=Am(n),l=gm(e,n.gridFilter),e=("segment"===a?Lm:function(t,o){var s,l,c=o.gridControlAngles,e=Am(o);if(!e)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=k(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=k(km(t.value,o),2),n=t[0],t=t[1],n=k([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=iy(t),t=k([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a,id:e}});throw new Error("Invalid gridControlAngles")})(l,n),c=m(m({},i),{center:s,areaFill:Re(o)?l.map(function(t,e){return ly(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(am.grid.class).data([1]).join(function(t){return t.append(function(){return new hm({style:c})}).attr("className",am.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(Nm.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Nm.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Nm.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Nm.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Nm.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Nm.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Nm.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Nm.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Nm.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Nm.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Tm=Nm;function Nm(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function jm(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=k(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=k(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Cm(t,e){void 0===e&&(e=[0,0,0,0]);var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=k(r.min,2),a=i[0],i=i[1],r=k(r.max,2),o=r[0],r=r[1],s=t.getBBox(),l=s.width,s=s.height,c=0,u=0,f=a,h=i,d=("text"===t.tagName&&(s-=1.5,d=t.style.textAlign,p=t.style.textBaseline,c=+t.style.dx,u=+t.style.dy,"center"===d?f=(a+o)/2:"right"!==d&&"end"!==d||(f=o),"middle"===p?h=(i+r)/2:"bottom"!==p&&"baseline"!==p||(h=r)),k(e,4)),o=d[0],p=void 0===o?0:o,r=d[1],e=void 0===r?0:r,o=d[2],r=void 0===o?p:o,o=d[3],d=void 0===o?e:o,o=new Tm;return o.set((c+=a)-d,(u+=i)-p,c+l+e,u+s+r),t.setEulerAngles(n),o.rotatedPoints(iy(n),f,h)}function Rm(t,a){var o;return y([],k(t.reduce(function(t,e,n){return n&&o&&(n=e,r=Cm(r=o,i=a),jm(n=Cm(n,i),[r[0],r[1],r[2],r[3]])||jm(n,[r[0],r[1],r[4],r[5]])||jm(n,[r[4],r[5],r[6],r[7]])||jm(n,[r[2],r[3],r[6],r[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}function Bm(t,e){return void 0===e&&(e={}),b(t)?0:"number"==typeof t?t:Math.floor(Jy(t,e))}var Im=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(Kg(t),1))})};var Fm=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c=Im,u=function(t){return t.forEach(r.show),t},f=2,h=t.slice(),d=t.slice(),p=Math.min.apply(Math,y([1],k(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==vm(0,n)[1]&&0!==vm(0,n)[0]||(n=qy(t[0]).left,t=qy(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*p/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse()),u(h);Rm((l?y(y([l],k(d),!1),[s],!1):y([s],k(d),!1)).filter(hy),null==e?void 0:e.margin).length;)(l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=c(u(h),{seq:f}),f++}}],["rotate",function(t,e,n,r){for(var i=void 0===(o=e.optionalAngles)?[0,45,90]:o,a=e.margin,e=void 0===(o=e.recoverWhenFailed)||o,o=t.map(function(t){return t.getLocalEulerAngles()}),s=function(n){return t.forEach(function(t,e){e=Fe(n)?n[e]:n;r.rotate(t,+e)})},l=0;l<i.length;l++)if(s(i[l]),Rm(t,a).length<1)return;e&&s(o)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i=void 0===(a=e.suffix)?"...":a,a=e.minLength,o=void 0===(o=e.maxLength)?1/0:o,s=void 0===(s=e.step)?" ":s,l=void 0===(e=e.margin)?[0,0,0,0]:e,e=tv(r.getTextShape(t[0])),c=Bm(s,e),u=a?Bm(a,e):c,s=Bm(o,e),f=(!b(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),t.slice()),h=((a=k(l,4))[0],a[1],a[2],a[3],s);u+c<h;h-=c){var d=function(e){if(f.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(f=Rm(t,l)).length<1)return{value:void 0}}(h);if("object"==typeof d)return d.value}}]]);function Dm(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=Fm.get(e);!function(t,e,n){if(!(e.labelOverlap.length<1))if("hide"===n){for(var r=t[0];r;){if("offscreen"===r.className)return;r=r.parent}return 1}else return"rotate"===n?!t.some(function(t){return!(null==(t=t.attr("transform"))||!t.includes("rotate"))}):"ellipsis"!==n||1<t.map(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function zm(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var Wm=sn(function(t,e){var t=k(t,2),n=t[0],t=t[1],e=k(e,2),r=e[0],e=e[1],n=k([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return y(y([],k(t),!1),k(e),!1).join()});function Gm(t,e){return mm(t,e.labelDirection,e)}function Hm(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=Gm(t.value,n),t=vm(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?Wm([1,0],e):Wm([t[0]<0?-1:1,0],t),xy(n=((n=ay(r))+360)%180,-90,90)||(n+=180),n))}function Vm(t,e,n){var r=n.type,i=n.labelAlign,t=Gm(t,n),n=zm(e),e=zm(ay(Wm([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":xy(n,90,270)?xy(e,90,270)?"start":"end":xy(e,90,270)?"end":"start";if(0===e){if(xy(n,0,90,!1,!0))return"start";if(xy(n,0,90)||xy(n,270,360))return"start"}if(90===e){if(xy(n,0,90,!1,!0))return"start";if(xy(n,90,180)||xy(n,270,360))return"end"}if(270===e){if(xy(n,0,90,!1,!0))return"end";if(xy(n,90,180)||xy(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(xy(n,0,90)||xy(n,270,360))return"end"}return"start"}function qm(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=ly(s,[t,l,e]),o=k([Gm(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(o,a)],2),a=k(Ey(Sy(o[0],s+(1===o[1]?ly(r?i:0,[t,l,e]):0)),km(t.value,n)),2);return{x:a[0],y:a[1]}}function Ym(t,e){"text"===t.nodeName&&t.attr(e)}function $m(r){Dm(this.node().childNodes,r,{hide:Kg,show:Ug,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=Vm(t.__data__.value,e,n),(n=t.querySelector(am.labelItem.class))&&Ym(n,{textAlign:e})},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&dy(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Um(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),f=M(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Re(c)?function(){return gy(ly(c,[a,o,s,Gm(a.value,l)]))}:function(){return gy(a.label||"")})).attr("className",am.labelItem.name).node(),r=k(Ky(pm(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=et(n,["transform"]),h=(ev(t,r),Hm(e,t,i));return t.setLocalEulerAngles(+h),Ym(f,m({textAlign:Vm(e.value,h,i),textBaseline:"middle"},u)),ev(t,r),t.attr(n),f}function Km(n,h,d,p){var t=gm(h,d.labelFilter),g=_(d,"label");return n.selectAll(am.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",am.label.name).transition(function(t){return Um(this,t,h,g,d),this.attr(qm(t,h,d)),null}).call(function(){return $m.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(am.labelItem.class),c=Um(this,t,h,g,d),u=(e=l,n=c,l=p.update,void 0===r&&(r="destroy"),l?(c=void 0===(c=l.duration)?0:c,i=void 0===(i=l.delay)?0:i,a=Math.ceil(+c/2),c=+c/4,o=(u=k((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=k(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=k(s(n),2),s=(o=k([(o+s[0])/2-o,(u+s[1])/2-u],2))[0],u=o[1],o=e.animate([{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(s,", ").concat(u,")")}],m(m({fill:"both"},l),{duration:i+a+c})),Bv(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],m(m({fill:"both"},l),{duration:a+c,delay:i+a-c})),f),[o,s]):(f(),[null]));function f(){"destroy"===r?e.destroy():"hide"===r&&Kg(e),n.isVisible()&&Ug(n)}l=Dv(this,qm(t,h,d),p.update);return y(y([],k(u),!1),[l],!1)}).call(function(t){var e,t=hn(t,"_transitions").flat().filter(hy);e=function(){return $m.call(n,d)},0===(t=t).length?e():Promise.all(t.map(function(t){return null==t?void 0:t.finished})).then(e)})},function(t){return t.transition(function(){var t=this,e=zv(this,p.exit);return Bv(e,function(){return M(t).remove()}),e})}).transitions()}function Xm(t,e){return mm(t,e.tickDirection,e)}var Zm=sn(function(t,e){t=k(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return y(y([],k(t),!1),[e],!1).join()});function Qm(t,e,n,r,i,a,o){var s=Xm(t.value,a),a=(c=t,u=e,f=n,l=s,a=(a=a).tickLength,l=k(Zm(l,ly(a,[c,u,f])),2),a=k(l[0],2),c=a[0],u=a[1],f=k(l[1],2),{x1:c,x2:f[0],y1:u,y2:f[1]}),l=a.x1,c=a.x2,u=a.y1,f=a.y2,a=k(Ky(pm(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(m({x1:l,x2:c,y1:u,y2:f},o)),i.attr(t),r.styles(o)}function Jm(t,e,n,r,i,a){o=M(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=Xm(s.value,u),u="line",Re(f)&&(u=function(){return ly(f,[s,l,c,h])});Qm(t,e,n,o.append(u).attr("className",am.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=k(km(t.value,r),2);return Dv(this,{x:e[0],y:e[1]},a)}var tb=cy({text:"text"},"title");function eb(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function nb(r,t){t=Object.entries(t).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}ce(ab,rb=Do),ab.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(tb.text.class);if(!a)return new oy(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=k(Vy(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=k([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=eb(e);if(a.includes("i"))return new oy(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=k(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=k([+r-o-f],1),p=n[0]),"b"===t&&(n=k([+i-s-l],1),g=n[0]),"l"===t&&(n=k(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=k(Vy(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=k([n+a,e+t],2),t=a[0],a=a[1];return new oy(h+n,d+e,p-t,g-a)},ab.prototype.getBBox=function(){return this.title?this.title.getBBox():new oy(0,0,0,0)},ab.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,et(t,["width","height","position","spacing"])),u=k(Ky(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=k([+f/2,+r/2],2),a=(i=k([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=eb(t)).includes("l")&&(a=(n=k([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=k([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=k([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=k([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;by(!!c.text,M(e),function(t){l.title=t.maybeAppendByClassName(tb.text,"text").styles(u).call(nb,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var rb,ib=ab;function ab(t){return rb.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}function ob(t,e,n,r,i){var a,o,s,l,c,u,f,h,d=k(Ky(_(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=et(d,["transform"]),y=(t.styles(p),e.styles(d),ev(t.node(),g),p=M(n._offscreen||n.querySelector(am.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=eb(r),p=p.node().getLocalBounds(),s=(l=k(p.min,2))[0],l=l[1],c=(p=k(p.halfExtents,2))[0],p=p[1],u=(d=k(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=k([s+c,l+p],2))[0],s=s[1],v=(a=k(Vy(a),4))[0],f=a[1],h=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(y=n.startPos,n=n.endPos,n=(r=k("start"===r?[y,n]:[n,y],2))[0],y=(r=k(Sy(Ny([-(y=r[1])[0]+n[0],-y[1]+n[1]]),v),2))[0],r=r[1],{x:n[0]+y,y:n[1]+r}):(o.includes("t")&&(s-=p+d+v),o.includes("r")&&(l+=c+u+f),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+h),{x:l,y:s})),n=y.x,r=y.y,v=Dv(e.node(),{x:n,y:r},i);return ev(t.node(),g),v}function sb(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=by(n,t.maybeAppendByClassName(am.lineGroup,"g"),function(t){return Em(t,e,s)})||[],r=by(r,t.maybeAppendByClassName(am.tickGroup,"g"),function(t){return t=t,r=s,i=gm(o,(n=e).tickFilter),a=_(n,"tick"),t.selectAll(am.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",am.tick.name).transition(function(t,e){return Jm.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),Jm.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=zv(this,r.exit);return Bv(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=by(i,t.maybeAppendByClassName(am.labelGroup,"g"),function(t){return Km(t,o,e,s)})||[];return y(y(y([],k(n),!1),k(r),!1),k(i),!1).filter(function(t){return!!t})}ce(ub,lb=Do),ub.prototype.render=function(o,t,e){var s=this,n=o.titleText,r=o.data,i=o.animate,a=o.showTitle,l=o.showGrid,c=o.dataThreshold,u=o.truncRange,f=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(r,c).filter(function(t){t=t.value;return!(u&&t>u[0]&&t<u[1])}),h=Rv(void 0===e?i:e),r=by(l,M(t).maybeAppendByClassName(am.gridGroup,"g"),function(t){return Pm(t,f,o,h)})||[],c=M(t).maybeAppendByClassName(am.mainGroup,"g"),i=(n&&(!this.initialized&&h.enter||this.initialized&&h.update)&&sb(o,M(this.offscreenGroup),f,Rv(!1)),sb(o,M(c.node()),f,h)),e=by(a,M(t).maybeAppendByClassName(am.titleGroup,"g"),function(t){return e=t,n=s,i=h,(r=o).titleText?(a=r.titleText,e.selectAll(am.title.class).data([{title:a}],function(t,e){return t.title}).join(function(t){return t.append(function(){return gy(a)}).attr("className",am.title.name).transition(function(){return ob(M(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return ob(M(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions()):null;var e,n,r,i,a})||[];return y(y(y([],k(r),!1),k(i),!1),k(e),!1).flat().filter(function(t){return!!t})};var lb,cb=ub;function ub(t){return lb.call(this,t,im)||this}var fb,hb=cy({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),db=(ce(pb,fb=Do),Object.defineProperty(pb.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return $e(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(pb.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(pb.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(pb.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=k((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,y([],k(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),pb.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(pb.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(pb.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),pb.prototype.getBBox=function(){var t=fb.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new oy(e,t,i+n.width,r)},pb.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,a=this.playWindow,o=this.pageViews;if("idle"!==i||t<0||o.length<=0||t>=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);i=k(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=Fv(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return Bv(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},pb.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?null:(t=t?(n-1+e)%e:$e(n-1,0,e),this.goTo(t))},pb.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?null:(t=t?(n+1)%e:$e(n+1,0,e),this.goTo(t))},pb.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(hb.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},pb.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?Ug:Kg)(t)})},pb.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,k("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=k(i.offset,3),o=k(a[0],2),s=o[0],c=o[1],l=k(a[1],2),r=l[0],o=l[1],l=k(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},pb.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(hb.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},pb.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orientation,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},pb.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=k(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},pb.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(hb.controller,"g");Xg(t.node(),u),u&&(u=_(this.attributes,"button"),e=_(this.attributes,"pageNum"),i=(u=k(Ky(u),2))[0],u=u[1],n=i.size,r=et(i,["size"]),i=!t.select(hb.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(hb.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(hb.prevBtn,"path"),u=t.maybeAppendByClassName(hb.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(hb.nextBtn,"path")].forEach(function(t){t.styles(m(m({},r),{transformOrigin:"center"})),Fy(t.node(),n,!0)}),a=t.maybeAppendByClassName(hb.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(hb.pageInfo,"text").styles(e),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),i)&&(this.prevBtnGroup.addEventListener("click",function(){o.prev()}),this.nextBtnGroup.addEventListener("click",function(){o.next()}))},pb.prototype.render=function(t,e){e=M(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},pb.prototype.bindEvents=function(){var t=this,e=on(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(X.ElementEvent.INSERTED,e),this.playWindow.addEventListener(X.ElementEvent.REMOVED,e)},pb);function pb(t){var e,n,t=fb.call(this,t,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",(t=0)-(n=6),(e=0)-n],["L",t+n,e],["L",t-n,e+n],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},initPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new X.Group({class:hb.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new X.Group({class:hb.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function gb(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}cv.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),cv.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),cv.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var yb,vb=cy({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),mb=(ce(bb,yb=Do),Object.defineProperty(bb.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=k(Vy(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=k(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=k(this.span,2),a=(e=k([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=k(Vy(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=k(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),bb.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=_(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(vb.markerGroup,"g").style("zIndex",0),by(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(vb.marker,r).styles(a),Fy(e.markerGroup.node(),i,!0)})},bb.prototype.renderLabel=function(t){var e=_(this.attributes,"label"),n=e.text,e=et(e,["text"]);this.labelGroup=t.maybeAppendByClassName(vb.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(vb.label,function(){return gy(n)}).styles(e)},bb.prototype.renderValue=function(t){var e=this,n=_(this.attributes,"value"),r=n.text,i=et(n,["text"]);this.valueGroup=t.maybeAppendByClassName(vb.valueGroup,"g").style("zIndex",0),by(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(vb.value,function(){return gy(r)}).styles(i)})},bb.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=_(this.attributes,"background");this.background=t.maybeAppendByClassName(vb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(vb.background,"rect").styles(m({width:n,height:e},r))},bb.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=k(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),dy(this.labelGroup.select(vb.label.class).node(),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),dy(this.valueGroup.select(vb.value.class).node(),n))},bb.prototype.render=function(t,e){e=M(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},bb);function bb(t){return yb.call(this,t,{span:[1,1],marker:function(){return new X.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function xb(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var kb,wb=cy({page:"item-page",navigator:"navigator",item:"item"},"items"),Ob=(ce(Mb,kb=Do),Object.defineProperty(Mb.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(Mb.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=_(this.attributes,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:m({layout:o,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=k(t,2);return[t[0],ly(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Mb.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orientation,h=t.width,d=t.rowPadding,p=t.colPadding,g=k(this.navigatorShape,1)[0],t=k(this.grid,2),y=t[0],v=t[1],m=v*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/m),i=e%m,a=u.ifHorizontal(v,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),k(a,2)),o=a[0],a=a[1],s=(h-g-(v-1)*p)/v,t=t.getBBox().height,l=k([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=k([b,o*(t+d)],2))[0],l=n[1],a===v-1?0:b+s+p):(c=(n=k([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Mb.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=k(this.navigatorShape,1)[0],r=k(this.grid,2),s=r[0],l=r[1],r=k([e-t,n],2),c=r[0],u=r[1],e=k([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],v=e[6],m=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===v?0:o,i=v+r+n;return i<=c&&xb(g,function(t){return t<l})?(r=k([v+r,m,i],3),f=r[0],h=r[1],v=r[2]):(i=k([y+1,0,0,m+t+a],4),y=i[0],g=i[1],v=i[2],(m=i[3])+a+t<=u&&xb(y,function(t){return t<s})?(r=k([v,m,n],3),f=r[0],h=r[1],v=r[2]):(i=k([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],v=i[2],m=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(Mb.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),Mb.prototype.ifHorizontal=function(t,e){return gb(this.attributes.orientation,t,e)},Mb.prototype.flattenPage=function(e){e.querySelectorAll(wb.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(wb.page.class).forEach(function(t){e.removeChild(t).destroy()})},Mb.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));M(t).selectAll(wb.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new mb({style:t})}).attr("className",wb.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("pointerenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("pointerleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},Mb.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=k(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},Mb.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=k(t,2);return{page:t[0],layouts:t[1]}}),u=y([],k(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new X.Group({className:wb.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=Ye(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(De(r[t])||(r[t]=Ue(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},Mb.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=_(this.attributes,"nav"),e=uy({orientation:e},n);return this.navigator=t.maybeAppendByClassName(wb.navigator,function(){return new db({})}).update(e).node(),this.navigator},Mb.prototype.getBBox=function(){return this.navigator.getBBox()},Mb.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(M(e)),this.renderItems(n.getContainer()),this.adjustLayout())},Mb.prototype.dispatchCustomEvent=function(t,e){t=new X.CustomEvent(t,{detail:e});this.dispatchEvent(t)},Mb);function Mb(t){t=kb.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:un,mouseenter:un,mouseleave:un})||this;return t.navigatorShape=[0,0],t}var _b,Sb=cy({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Eb={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},Ab=(ce(Lb,_b=Do),Lb.prototype.render=function(t,e){var n=M(e).maybeAppendByClassName(Sb.markerGroup,"g"),n=(this.renderMarker(n),M(e).maybeAppendByClassName(Sb.labelGroup,"g"));this.renderLabel(n)},Lb.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?gb(n,"horizontalHandle","verticalHandle"):e;by(!!i,t,function(t){var e=_(r.attributes,"marker"),n=m({symbol:i},e);r.marker=t.maybeAppendByClassName(Sb.marker,function(){return new cv({style:n})}).update(n)})},Lb.prototype.renderLabel=function(t){var s=this,e=this.attributes,n=e.showLabel,l=e.orientation,r=e.spacing,c=void 0===r?0:r,u=e.formatter;by(n,t,function(t){var e=_(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(Sb.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=k(gb(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(Sb.label,"text").styles(m(m({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},Lb);function Lb(t){return _b.call(this,t,Eb)||this}var Pb,Ho={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Tb=uy({},Ho,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Nb=uy({},Ho,Uy(Eb,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),jb=cy({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Cb=(ce(Rb,Pb=Do),Rb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=k(Ky(_(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(jb.titleGroup,"g").styles(a),m(m({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(jb.title,function(){return new ib({style:s})}).update(s)},Rb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=_(this.attributes,"title",!0),o=a.style,a=et(a,["style"]),o=k(Ky(o),2),s=o[0],o=o[1],a=m(m(m({},a),s),{width:i,height:e,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(jb.itemsGroup,"g").styles(m({x:n,y:r},o)),this.items=this.itemsGroup.maybeAppendByClassName(jb.items,function(){return new Ob({style:{data:[]}})}).update(a)},Rb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Rb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new oy(0,0,n,t)},enumerable:!1,configurable:!0}),Rb.prototype.getBBox=function(){return t=this.title.node(),e=this.items.node(),n=(a=t.attributes).position,r=a.spacing,i=a.inset,a=a.text,t=t.getBBox(),o=e.getBBox(),n=eb(n),r=(a=k(Vy(a?r:0),4))[0],s=a[1],l=a[2],a=a[3],c=(i=k(Vy(i),4))[0],u=i[1],f=i[2],i=i[3],s=(a=k([a+s,r+l],2))[0],r=a[1],a=(l=k([i+u,c+f],2))[0],i=l[1],"l"===n[0]?new oy(t.x,t.y,o.width+t.width+s+a,Math.max(o.height+i,t.height)):"t"===n[0]?new oy(t.x,t.y,Math.max(o.width+a,t.width),o.height+t.height+r+i):(c=(u=k([e.attributes.width||o.width,e.attributes.height||o.height],2))[0],f=u[1],new oy(o.x,o.y,c+t.width+s+a,f+t.height+r+i));var t,e,n,r,i,a,o,s,l,c,u,f},Rb.prototype.render=function(t,e){var n=t.width,t=t.height,e=M(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},Rb);function Rb(t){return Pb.call(this,t,Tb)||this}var Bb,Ib={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",zIndex:999},Fb=cy({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Db=(ce(zb,Bb=Do),zb.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=k(Vy(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=_(this.attributes,"background"),this.background=M(this.group).maybeAppendByClassName(Fb.background,"path").styles(m(m({},o),{path:a})),this.group.appendChild(this.label.node()))},zb.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=k(Ky(_(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,et(r,["text"]));this.label=M(this.group).maybeAppendByClassName(Fb.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(Fb.label,function(){return gy(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},zb.prototype.adjustLayout=function(){var t=k(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},zb.prototype.getPath=function(n,t){var r=this,t=k(t,2),e=k(t[0],2),i=e[0],e=e[1],t=k(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=k(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[y(["M"],k(t[0]),!1),y(["L"],k(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},zb.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=k(t,2))[0],t=t[1],r=(e=k(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,y([],k(t),!1)),t=k(t,2),r=k(t[0],2),i=r[0],r=r[1],t=k(t[1],2),a=t[0],t=t[1],a=k(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=k(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=k([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},zb.prototype.bindEvents=function(){this.label.on(X.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},zb.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},zb);function zb(t){t=Bb.call(this,t,Ib)||this;return t.point=[0,0],t.group=t.appendChild(new X.Group({})),t.isMutationObserved=!0,t}function Wb(t,e){var t=k(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Gb=cy({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Hb(t){var e=t.orientation,n=t.size,t=t.length;return gb(e,[t,n],[n,t])}function Vb(t){var e=t.type,t=k(Hb(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function qb(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Re(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return X.parseColor(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(gb(e,"0","270"),")")):""}function Yb(t,e){var n,r,i,a=_(e,"selection"),o=qb(e),t=t.maybeAppendByClassName(Gb.selection,"path").styles(m({path:Vb(e),fill:o},a)),a=t.maybeAppendByClassName(Gb.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=k(Hb(o),2))[0],o=o[1],n=(e=k(e,2))[0],e=e[1],i=gb(a,n*r,0),n=gb(a,0,n*o),r=gb(a,e*r,r),[["M",i,n],["L",i,i=gb(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}ce(Kb,$b=Do),Kb.prototype.render=function(t,e){var n,r,i=M(e).maybeAppendByClassName(Gb.trackGroup,"g");i=i,r=_(n=t,"track"),i.maybeAppendByClassName(Gb.track,"path").styles(m({path:Vb(n)},r)),Yb(M(e).maybeAppendByClassName(Gb.selectionGroup,"g"),t)};var $b,Ub=Kb;function Kb(t){return $b.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var Xb,Zb,Qb,Jb,t2=sn(function(t){return{min:Math.min.apply(Math,y([],k(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,y([],k(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),e2=(ce(f,Xb=Do),Object.defineProperty(f.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),f.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new oy(0,0,e,t)},f.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(M(e)),this.availableSpace),i=r.x,r=r.y,e=M(e).maybeAppendByClassName(jb.contentGroup,"g").styles({x:i,y:r}),i=(by(!!t,e.maybeAppendByClassName(jb.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(jb.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(jb.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(f.prototype,"range",{get:function(){var t=this.attributes.data;return t2(t)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonRange",{get:function(){var t=k(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=k(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),f.prototype.ifHorizontal=function(t,e){return gb(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},f.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=_(this.attributes,"title"),o=m(m({},a),{width:i,height:e,text:r}),s=this;t.selectAll(jb.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new ib({style:o})}).attr("className",jb.title.name).each(function(){s.title=this})},function(t){return t.update(o)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(f.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new oy(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(am.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new oy(0,0,t,e)),this.cacheLabelBBox):new oy(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,length:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,length:0}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.availableSpace,n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.length,n=k(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,length:0},a=t.size,t=t.length,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=k(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=k(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new oy(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,length:e},{size:e,length:t})},enumerable:!1,configurable:!0}),f.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=_(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.length,f=f.size,d=uy({x:u,y:s,length:h,size:f,type:r,orientation:i,color:a,block:e,partition:n.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o);this.ribbon=t.maybeAppendByClassName(jb.ribbon,function(){return new Ub({style:d})}).update(d)},f.prototype.getHandleClassName=function(t){return"".concat(jb.prefix("".concat(t,"-handle")))},f.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=_(this.attributes,"handle"),r=k(this.selection,2),i=r[0],r=r[1],a=m(m({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(jb.handle.class).data(e?[{value:i,type:"start"},{value:r,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new Ab({style:a})}).attr("className",function(t){t=t.type;return"".concat(jb.handle," ").concat(o.getHandleClassName(t))}).each(function(t){var e=t.type,t=t.value,t=(this.update({labelText:t}),"".concat(e,"Handle"));(o[t]=this).addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.update(a).each(function(t){t=t.value;this.update({labelText:t})})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");o[t]=void 0}).remove()})},f.prototype.adjustHandles=function(){var t=k(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(f.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new oy(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,t=t.height,n=this.endHandle.getBBox(),r=n.width,n=n.height,e=k([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new oy(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=k(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),f.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=k(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.update({x:a,y:r,formatter:n})},f.prototype.renderIndicator=function(t){var e=_(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(jb.indicator,function(){return new Db({})}).update(e)},Object.defineProperty(f.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(m(m({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=k([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(m(m({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelStyle",{get:function(){var t=k(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),f.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=_(this.attributes,"label"),a=i.align,o=_(i,"tick"),i=_(i,"tick",!0),n=uy(m({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),Uy(o,"tick"),Uy(i,"label"),{data:this.labelData}),o={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===a&&(!r||r(t,t.index,n.filter(function(t){return t.type===a})))},labelFormatter:e},s=m(m({},n),o);this.label=t.maybeAppendByClassName(jb.label,function(){return new cb({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(f.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=k([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return e?(o=c,l=a,"positive"===n?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==n||"top"!==i&&"left"!==i||(s=r)):"positive"===n?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==n||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),f.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisStyle).offset,n=r.spacing,r=r.tickLength,a=(i=k(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},f.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},f.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=$e(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({x:a[0],y:a[1],position:this.ifHorizontal("top","left"),labelText:e}),Ug(this.indicator.node())):this.hideIndicator()},f.prototype.hideIndicator=function(){Kg(this.indicator.node())},f.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},f.prototype.setSelection=function(t,e){this.updateSelection(t,e)},f.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=k(this.selection,2),c=l[0],l=l[1],t=k([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=k((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=k(n,2))[0],n=n[1],a=(c=k(c,2))[0],c=c[1],o=(l=k(l,2))[0],l=l[1],c=(a=k([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=k([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[jy(c,r),jy(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(f.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return tn(t)?jy(.01*(e-n),0):t},enumerable:!1,configurable:!0}),f.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Wb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},f.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=k(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,y([],k(py(t)),!1));return $e(this.getOffset(i-a,!0),r,n)},f.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.length,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},f.prototype.dispatchSelection=function(){var t=new X.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},f.prototype.dispatchIndicated=function(t,e){t=new X.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},f);function f(t){var a=Xb.call(this,t,Nb)||this;return a.eventToOffsetScale=new Jp({}),a.innerRibbonScale=new Jp({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Wb(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),k(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function n2(t){Zb||(Zb=document.createElement("table"),Jb=document.createElement("tr"),Qb=/^\s*<(\w+|!)[^>]*>/,Jb={tr:document.createElement("tbody"),tbody:Zb,thead:Zb,tfoot:Zb,td:Jb,th:Jb,"*":document.createElement("div")});var e=Qb.test(t)&&RegExp.$1,e=(e&&e in Jb||(e="*"),Jb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var r2,i2,a2,o2="tooltip",s2="tooltip-title",l2="tooltip-list",c2="tooltip-list-item",u2="tooltip-list-item-name",f2="tooltip-list-item-marker",h2="tooltip-list-item-name-label",d2="tooltip-list-item-value",Go="tooltip-crosshair-x",Vo="tooltip-crosshair-y",c={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},p2=((qo={})[".".concat(o2)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},qo[".".concat(s2)]={color:"rgba(0, 0, 0, 0.45)"},qo[".".concat(l2)]={margin:"0px","list-style-type":"none",padding:"0px"},qo[".".concat(c2)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},qo[".".concat(f2)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},qo[".".concat(u2)]={display:"flex","align-items":"center","max-width":"216px"},qo[".".concat(h2)]=m({flex:1},c),qo[".".concat(d2)]=m({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},c),qo[".".concat(Go)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},qo[".".concat(Vo)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},qo),g2=(ce(y2,r2=Do),Object.defineProperty(y2.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),y2.prototype.getContainer=function(){return this.element},Object.defineProperty(y2.prototype,"position",{set:function(t){var t=k(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(y2.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(y2.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,o=t.template;return e.map(function(t,e){var n,r=t.name,r=void 0===r?"":r,i=t.color,i=void 0===i?"black":i,a=t.index,t=et(t,["name","color","index"]),r=m({name:r,color:i,index:null!=a?a:e},t);return n2((i=o.item,n=r,i&&n?i.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):i))})},enumerable:!1,configurable:!0}),y2.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},y2.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),r2.prototype.destroy.call(this)},y2.prototype.show=function(t,e){var n,r=this;void 0!==t&&void 0!==e&&(n=this.element.style.transition,this.element.style.transition="none",this.position=[null!=t?t:+this.attributes.x,null!=e?e:+this.attributes.y],setTimeout(function(){r.element.style.transition=n},10)),this.element.style.visibility="visible"},y2.prototype.hide=function(){this.element.style.visibility="hidden"},y2.prototype.initShape=function(){var t=this.attributes.template;this.element=n2(t.container),this.id&&this.element.setAttribute("id",this.id)},y2.prototype.renderCustomContent=function(){var t;(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey)&&(this.prevCustomContentKey=this.attributes.contentKey,t=this.attributes.content)&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))},y2.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(o.innerHTML=e.title,o.getElementsByClassName(s2)[0].innerHTML=n):null!=(t=null==(i=o.getElementsByClassName(s2))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=l2,n.replaceChildren.apply(n,y([],k(e),!1)),(i=this.element.querySelector(".".concat(l2)))?i.replaceWith(n):o.appendChild(n)),r=o,Object.entries(a).forEach(function(t){var t=k(t,2),e=t[0],n=t[1];y([r],k(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})},y2.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=t||n,t=("auto"===e?"bottom-right":e).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},n=this.elementSize,o=n.width,s=n.height,l=[-o/2,-s/2];return t.forEach(function(t){var e=k(l,2),n=e[0],e=e[1],t=k(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},y2.prototype.setOffsetPosition=function(t){var t=k(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(+(void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(+i+n+t,"px")},y2.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},y2.prototype.autoPosition=function(t){var e,n,r,i,t=k(t,2),a=t[0],t=t[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position,o=o.defaultPosition;return"auto"!==u?[a,t]:(e=(u=this.element).offsetWidth,u=u.offsetHeight,a=(s=k([+s+a,+l+t],2))[0],l=s[1],n={left:"right",right:"left",top:"bottom",bottom:"top"},t=c.x,s=c.y,r={left:a<t,right:t+c.width<a+e,top:l<s,bottom:s+c.height<l+u},i=[],o.split("-").forEach(function(t){i.push(r[t]?n[t]:t)}),t=i.join("-"),this.getRelativeOffsetFromCursor(t))},y2.tag="tooltip",t([(void 0===(i2=100)&&(i2=0),void 0===(a2=!0)&&(a2=!1),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,a2&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},i2))})})],y2.prototype,"updatePosition",null),y2);function y2(t){t=r2.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",defaultPosition:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(o2,'"></div>'),title:'<div class="'.concat(s2,'"></div>'),item:'<li class="'.concat(c2,'" data-index={index}>\n <span class="').concat(u2,'">\n <span class="').concat(f2,'" style="background:{color}"></span>\n <span class="').concat(h2,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(d2,'" title="{value}">{value}</span>\n </li>')},style:p2})||this;return t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}var v2,m2={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function b2(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function x2(t){return v2.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}ce(x2,v2=Do),x2.prototype.render=function(t,e){var i=this,n=t.size,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=(this.attributes,M(e).maybeAppendByClassName("switch-content","g").node()),l=e.getLocalBounds(),n=hn(m2,n,m2.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&M(e).maybeAppendByClassName("switch-tag",function(){return new hv({})}).call(function(t){var e,t=t.node(),n=(t.update(m(m({cursor:f,backgroundStyle:null,text:!1,marker:!1},u),d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=m(m({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),M(e).maybeAppendByClassName("switch-background","rect").styles(m({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=M(e).maybeAppendByClassName("switch-background-stroke","rect").styles(m({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();M(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=b2(p,a,o),r=b2(p,a,!o);t.attr("x")&&!fn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},x2.tag="switch";var k2,w2,O2,M2,_2={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},Es=uy({},_2,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),Po=uy({},_2,{type:"circle",defaultRadius:0}),As=uy({},_2,{type:"polygon",defaultRadius:0,startAngle:0}),Ns=(ce(S2,k2=Do),Object.defineProperty(S2.prototype,"localPointer",{get:function(){var t=k(this.getPosition(),2),e=t[0],t=t[1],n=k(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"tagStyle",{get:function(){return _(this.attributes,"tag")},enumerable:!1,configurable:!0}),Object.defineProperty(S2.prototype,"crosshairStyle",{get:function(){var t=_(this.attributes,"line");return m(m({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),S2.prototype.render=function(t,e){var e=M(e).maybeAppendByClassName(".crosshair-group","g").node(),n=(this.shapesGroup=e,this.tagStyle),r=this.crosshairStyle;this.tagShape=M(e).maybeAppendByClassName("crosshair-tag",function(){return new hv({style:n})}).styles(n).node(),this.crosshairShape=M(e).maybeAppendByClassName(".crosshair-path","path").styles(r).node(),this.adjustLayout()},S2.prototype.setPointer=function(t){this.pointer=t},S2.tag="crosshair-base",S2);function S2(t){return k2.call(this,t,_2)||this}function E2(t){return w2.call(this,uy({},E2.defaultOptions,t))||this}function A2(t){return O2.call(this,uy({},A2.defaultOptions,t))||this}function L2(t){return M2.call(this,uy({},L2.defaultOptions,t))||this}ce(E2,w2=Ns),Object.defineProperty(E2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=k(t.startPos,2),n=e[0],e=e[1],t=k(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(E2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=k(this.getPosition(),2))[0],e=e[1],[(n=k(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(E2.prototype,"isVertical",{get:function(){var t=this.attributes,e=k(t.startPos,2),n=e[0],e=e[1],t=k(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(E2.prototype,"tagShapeSpace",{get:function(){var t,e=(t=(t=this.tagShape)&&t.getRenderBounds())?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0};return{width:e.width,height:e.height}},enumerable:!1,configurable:!0}),E2.prototype.update=function(t){w2.prototype.update.call(this,t)},E2.prototype.setPointer=function(t){w2.prototype.setPointer.call(this,t),this.adjustPosition()},E2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},E2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},E2.prototype.adjustPosition=function(){var t=k(this.localPointer,2),e=t[0],t=t[1],n=k(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},E2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=k(e.startPos,2),a=i[0],i=i[1],e=k(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(Ug(this.tagShape),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=k(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):Kg(this.tagShape)},E2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},E2.tag="line-crosshair",E2.defaultOptions={style:Es},ce(A2,O2=Ns),Object.defineProperty(A2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),A2.prototype.update=function(t){O2.prototype.update.call(this,t)},A2.prototype.setPointer=function(t){var t=k(t,2),e=t[0],t=t[1],e=(O2.prototype.setPointer.call(this,[e,t]),k(this.localPointer,2)),t=e[0],e=e[1],n=k(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},A2.prototype.adjustLayout=function(){Kg(this.tagShape)},A2.prototype.createCirclePath=function(t){var e=this.attributes,n=k(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return iv(r,n,t||e)},A2.tag="circle-crosshair",A2.defaultOptions={style:Po},ce(L2,M2=Ns),Object.defineProperty(L2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),L2.prototype.update=function(t){M2.prototype.update.call(this,t)},Object.defineProperty(L2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=u,e=[0,0],n=s/180*Math.PI+c*h,a=r=i=r=void 0,r=(t=k(t,2))[0],t=t[1],i=(e=k(e,2))[0],e=e[1],r-=i,t-=e,a=Math.sin(n),n=Math.cos(n),[r*n-t*a+i,r*a+t*n+e]));return f},enumerable:!1,configurable:!0}),L2.prototype.setPointer=function(t){var t=k(t,2),e=t[0],t=t[1],e=(M2.prototype.setPointer.call(this,[e,t]),k(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=k(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=my(n,[t,e])/my(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},L2.prototype.adjustLayout=function(){Kg(this.tagShape)},L2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=k(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=k(t,2),t=k(Sy([t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},L2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=k(t,2),c=t[0],u=t[1],f=this.points,t=k(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=k(f[p-1],2),y=g[0],g=g[1],v=k(f[p%f.length],2),m=v[0],v=v[1],y=(i=[h,d],y=[y+h,g+d],g=[m+h,v+d],l=s=o=a=v=m=void 0,v=(r=k(r=[c,u],2))[0],r=r[1],a=(i=k(i,2))[0],i=i[1],o=(y=k(y,2))[0],y=y[1],s=(g=k(g,2))[0],g=g[1],l=[],(g-y)*(a-v)==(i-r)*(s-o)?(i-r)*(o-v)==(y-r)*(a-v)&&(yy(v,a,r,i,o,y)&&vy(l,o,y),yy(v,a,r,i,s,g)&&vy(l,s,g),yy(o,s,y,g,v,r)&&vy(l,v,r),yy(o,s,y,g,a,i))&&vy(l,a,i):(m=(v*(i-r)+y*(a-v)-r*(a-v)-o*(i-r))/((s-o)*(i-r)-(a-v)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-v*(g-y))/((a-v)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=m&&m<=1&&(l[0]=v+g*(a-v),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=k(y,2))[0],n=s[1])}return[e,n]},L2.tag="polygon-crosshair",L2.defaultOptions={style:As};var P2,T2=Uy({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),N2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},j2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function C2(t){return P2.call(this,t,m({x:0,y:0,labelText:"",spacing:4,checked:!1},T2))||this}ce(C2,P2=Do),C2.prototype.render=function(t,e){var n=t.checked,r=t.spacing,n=(this.checked=!!n,Hy(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=_(t,"box"),i=_(t,"checked"),t=_(t,"label"),e=m(m({},this.checked?N2.selected:N2.default),e),i=m(m({},j2),i),i=(this.checkboxBoxShape=Hy(n,".checkbox-box","rect").styles(m({className:"checkbox-box",zIndex:(n.style.zIndex||0)-1},e)).node(),Hy(this.checkboxBoxShape,".checkbox-checked","path").styles(m({className:"checkbox-box-checked",stroke:"#fff"},i)),e=this.checkboxBoxShape,i=Number(r),{x:(r=e.getLocalBounds()).halfExtents[0]?r.max[0]+(i||0):e.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:e.style.y}),r=i.x,e=i.y;Hy(n,".checkbox-label","text").styles(m({className:"checkbox-label",x:r,y:e},t))},C2.tag="checkbox";var R2="gui-poptip",B2="gui-poptip-arrow",I2="gui-poptip-text",F2=((i={})[".".concat(R2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},i[".".concat(I2)]={"text-align":"center"},i[".".concat(R2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},i[".".concat(R2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},i[".".concat(R2,"[data-position='right']")]={transform:"translate(0, -50%)"},i[".".concat(R2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},i[".".concat(R2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},i[".".concat(R2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},i[".".concat(R2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},i[".".concat(R2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},i[".".concat(R2,"[data-position='right-top']")]={transform:"translate(0, 0)"},i[".".concat(R2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},i[".".concat(R2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},i[".".concat(R2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},i[".".concat(B2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},i[".".concat(R2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},i["[data-position='top'] .".concat(B2)]={bottom:"-2px"},i[".".concat(R2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},i["[data-position='left'] .".concat(B2)]={right:"-2px"},i[".".concat(R2,"[data-position='right']")]={transform:"translate(5px, -50%)"},i["[data-position='right'] .".concat(B2)]={left:"-2px"},i[".".concat(R2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},i["[data-position='bottom'] .".concat(B2)]={top:"-2px"},i[".".concat(R2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},i["[data-position='top-left'] .".concat(B2)]={left:"10px",bottom:"-2px"},i[".".concat(R2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},i["[data-position='top-right'] .".concat(B2)]={right:"10px",bottom:"-2px"},i[".".concat(R2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},i["[data-position='left-top'] .".concat(B2)]={right:"-2px",top:"8px"},i[".".concat(R2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},i["[data-position='left-bottom'] .".concat(B2)]={right:"-2px",bottom:"8px"},i[".".concat(R2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},i["[data-position='right-top'] .".concat(B2)]={left:"-2px",top:"8px"},i[".".concat(R2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},i["[data-position='right-bottom'] .".concat(B2)]={left:"-2px",bottom:"8px"},i[".".concat(R2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},i["[data-position='bottom-left'] .".concat(B2)]={top:"-2px",left:"8px"},i[".".concat(R2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},i["[data-position='bottom-right'] .".concat(B2)]={top:"-2px",right:"8px"},i),D2=void 0;var z2;function W2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function G2(t){var n,r;return n=W2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(D2,t)}(t)}function H2(t){t=z2.call(this,nt({style:{id:"gui-poptip"}},H2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}ce(H2,z2=Do),Object.defineProperty(H2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),H2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},H2.prototype.update=function(t){this.attr(nt({},this.style,t)),this.render(this.attributes,this)},H2.prototype.bind=function(u,f){var h,t,e,d=this;u&&(h=this.style.text,e=function(){d.hideTip()},u.addEventListener("mousemove",t=function(t){var e,n,r=u,i=d.style,a=h,o=(f&&(n=(s="function"==typeof f?f.call(null,t):f).html,e=s.target,s=et(s,["html","target"]),c={},o=d.style,s=s,o&&nn(c,o),s&&nn(c,s),l&&nn(c,l),i=c,!e&&!1!==e||(r=e),"string"==typeof n)&&(a=n),i.position),s=i.arrowPointAtCenter,l=i.follow,c=i.offset;r?(n=(e=k(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,r,o,s,l),2))[0],i=e[1],d.showTip(n,i,{text:a,position:o,offset:c})):d.hideTip()}),u.addEventListener("mouseleave",e),this.map.set(u,[t,e]))},H2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=k(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},H2.prototype.clear=function(){this.container.innerHTML=""},H2.prototype.destroy=function(){var t,e=this;y([],k(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove(),z2.prototype.destroy.call(this)},H2.prototype.showTip=function(t,e,n){var r,i=hn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(I2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},H2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},H2.prototype.getContainer=function(){return this.container},H2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(R2).concat(t?" ".concat(t):"")},H2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=G2(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},H2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.className=this.getClassName(),'<span class="'.concat(B2,'"></span>'));t.innerHTML=n,Ye(r)?t.innerHTML+=r:r&&en(r)&&t.appendChild(r),e&&(t.getElementsByClassName(I2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},H2.prototype.applyStyles=function(){var t,e=uy({},F2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=k(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},H2.prototype.setOffsetPosition=function(t,e,n){var n=k(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},H2.tag="poptip",H2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:F2,template:'<div class="'.concat(I2,'"></div>')}};ce(q2,V2=X.Group),Object.defineProperty(q2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Vy(t)},enumerable:!1,configurable:!0}),Object.defineProperty(q2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Vy(t)},enumerable:!1,configurable:!0}),q2.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=k(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new oy(e-i,n-a,r+i+o,t+a+s)},q2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,V2.prototype.appendChild.call(this,t,e),t},q2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=k(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=k(this.$margin,4),s=o[0],o=o[3];return new oy(n+o,r+s,e-n-i,t-r-a)},q2.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:My,grid:_y})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},q2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},q2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var V2,Ss=q2;function q2(t){var e=V2.call(this,t)||this,t=(e.layoutEvents=[X.ElementEvent.BOUNDS_CHANGED,X.ElementEvent.INSERTED,X.ElementEvent.REMOVED],e.$margin=Vy(0),e.$padding=Vy(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}X.runtime.enableCSSParsing=!1;function Y2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return V1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=T0(l,t),t=T0(t,i),i=T0(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),V1()(s)}const $2=mg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=rt(e,"background"),h=f["padding"],f=et(f,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").style("zIndex",0).call(L,Object.assign({textBaseline:"middle"},e)).node(),n=Y2(it(t).maybeAppend("background","rect").style("zIndex",-1).call(L,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(L,o?f:{}).node(),i,p,u),r=l&&new cv({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new cv({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("zIndex",0).style("path",n).style("markerStart",r).style("markerEnd",a).call(L,s?d:{})}),U2=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(G0(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return it(new $2).style("x",i).style("y",o).call(L,r).style("transform",s+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).call(L,l).node()}};U2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const K2=mg(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(it(t).maybeAppend("marker",()=>new cv({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(L,e)}),X2=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new K2).call(L,a).style("x",r).style("y",o).call(L,e).call(L,s).node()}},Z2=(X2.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},mg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new X.Path({})).style("d",n).call(L,i),it(t).maybeAppend("area-path",()=>new X.Path({})).style("d",e).call(L,r)}));const Q2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connect:h=!1}=t,d=et(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=G0(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=V0(c,e),n=l&&n?D0(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=rt(s,"connect"),i=!!o.length,n=t=>it(new X.Path({})).style("d",t).call(L,s).node();return vu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=q1().curve(Y1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return K1(a())},delete t.lineX0,t.lineEndAngle=function(){return K1(o())},delete t.lineX1,t.lineInnerRadius=function(){return K1(s())},delete t.lineY0,t.lineOuterRadius=function(){return K1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(U1(t)):e()._curve},t.angle((t,e)=>j0(P0(r[e],n))).outerRadius((t,e)=>T0(r[e],n)).innerRadius((t,e)=>T0(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new Z2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(yu(c)?q1().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(f)):q1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):it(new Z2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},J2=(Q2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?og:W1;return Q2(Object.assign({curve:i},a))(t,e,n,r)}),tx=(J2.props=Object.assign(Object.assign({},Q2.props),{defaultMarker:"point"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?ig:ng;return Q2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),ex=(tx.props=Object.assign(Object.assign({},Q2.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>Q2(Object.assign({curve:lg},i))(t,e,n,r)),nx=(ex.props=Object.assign(Object.assign({},Q2.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>Q2(Object.assign({curve:cg},i))(t,e,n,r)),rx=(nx.props=Object.assign(Object.assign({},Q2.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>Q2(Object.assign({curve:ug},i))(t,e,n,r)),ix=(rx.props=Object.assign(Object.assign({},Q2.props),{defaultMarker:"hv"}),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=G0(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=P1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=I0(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new X.Path).call(L,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(L,c).node()}}),ax=(ix.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=P1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}});ax.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ox=t=>{const{cornerRatio:u=1/3}=t,f=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=G0(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=P1(),vu(o)?(i=T0(t,c=o.getCenter()),i=(T0(e,c)-i)*n+i,a.moveTo(t[0],t[1]),F0(a,t,e,c,i)):yu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return it(new X.Path).call(L,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(L,f).node()}},sx=(ox.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=P1();return t.moveTo(e[0],e[1]),vu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):F0(t,e,i,B0(e,i),T0(e,i)/2),it(new X.Path).call(L,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(L,s).node()}}),lx=(sx.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new X.Image).call(L,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(L,u).node()}});lx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const cx=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=G0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=P1();if(vu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>T0(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?F0(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return it(new X.Path).call(L,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(L,l).node()}};cx.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ux=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=G0(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=P1();return vu(e)?(n=T0(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),F0(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),F0(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return it(new X.Path).call(L,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(L,l).node()}};ux.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fx=t=>{const y=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=G0(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=P1(),vu(t)?([i,a]=t=t.getCenter(),o=N0(P0(r[0],t)),s=N0(P0(r[1],t)),g=T0(t,r[2]),l=T0(t,r[3]),c=T0(t,r[8]),u=T0(t,r[10]),t=T0(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return it(new X.Path).call(L,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(L,y).node()}};fx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const hx=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,vu(t=n)?(t=t.getCenter(),F1()({startAngle:0,endAngle:2*Math.PI,outerRadius:T0(a[0],t),innerRadius:T0(a[1],t)})):V1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,vu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new X.Path({})).call(L,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(L,s).node()}};function dx(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}hx.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const px=mg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,V1().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new cv({className:"marker",style:Object.assign(Object.assign({},i),{symbol:dx})}):null).call(L,e)});const gx=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=G0(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(yu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return it(new px).call(L,o).style("points",n).style("stroke",r||i).style("transform",e).call(L,c).node()}};function yx(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=pf(a.x,c),i=pf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function vx(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=W0(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=bx(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?mx(s,h,n):B0(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function mx(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function bx(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function xx(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=W0(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:bx(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=mx(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function kx(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function wx(t,e,n,r){var i=n["bounds"];return 1===i.length?kx(0,0,n):(mu(r)?vx:wu(r)?xx:yx)(t,e,n,r)}function Ox(t,e,n){var{innerRadius:n,outerRadius:t}=W0(n,t,[e.y,e.y1]);return n+(t-n)}function Mx(t,e,n){var{startAngle:n,endAngle:t}=W0(n,t,[e.y,e.y1]);return(n+t)/2}function _x(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),h=Mx(e,n,r),d=0<Math.sin(h)?1:-1,i=bx(h,i,a),a={textAlign:0<d||mu(r)?"start":"end",textBaseline:"middle",rotate:i},i=Ox(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=mx(t,e,n),[t,r]=mx(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}gx.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Sx=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=iu(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=N0(P0(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:wx,bottomLeft:wx,bottomRight:wx,inside:wx,left:wx,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?kx(0,0,n):(mu(r)?vx:wu(r)?_x:yx)(t,e,n,r)},right:wx,spider:function(t,e,n,r){var i,a,o,s,l,c;return wu(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(_x(0,e,n,r),[]),s=r.getCenter(),l=Ox(e,n,r),e=Mx(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return wu(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(_x(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(wu(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=j0([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=mx(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:wx,topLeft:wx,topRight:wx});function Ex(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:wu(o)?"inside":yu(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=Sx[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const Ax=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=Ex(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new $2).call(L,t).style("text",""+i).style("transform",r+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(L,a).node()},Lx=(Ax.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(G0(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new X.Path).call(L,r).style("d",i).style(s,a).call(L,l).node()}}),Px=(Lx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Lx(Object.assign({colorAttribute:"fill"},t))),Tx=(Px.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Lx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),Nx=(Tx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),jx=(Nx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),Cx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:jx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:jx.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:jx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:jx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:jx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:jx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:jx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:jx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:jx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:jx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:jx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:jx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:jx.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:jx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:jx.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:jx.BLACK,tickStrokeOpacity:.25,titleFill:jx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:jx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:jx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:jx.BLACK,navButtonFillOpacity:.65,navPageNumFill:jx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:jx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:jx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:jx.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:jx.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:jx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:jx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:jx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:jx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:jx.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:jx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:jx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{titleFill:jx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:jx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},Rx=(Cx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),Bx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:Rx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:Rx.BLACK,lineWidth:1}},text:{text:{fill:Rx.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:Rx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Rx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Rx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Rx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Rx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Rx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Rx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:Rx.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:Rx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:Rx.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:Rx.BLACK,tickStrokeOpacity:.25,titleFill:Rx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:Rx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:Rx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:Rx.BLACK,navButtonFillOpacity:.45,navPageNumFill:Rx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:Rx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:Rx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:Rx.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:Rx.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:Rx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:Rx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:Rx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Rx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:Rx.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Rx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Rx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:Rx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:Rx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},Ix=(Bx.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),Fx=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:Ix.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:Ix.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:Ix.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Ix.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Ix.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Ix.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Ix.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Ix.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Ix.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Ix.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Ix.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Ix.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelAlign:"horizontal",labelAutoRotate:!1,labelFill:Ix.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:Ix.STROKE,tickStrokeOpacity:1,titleFill:Ix.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:8,tickDirection:"positive",titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:4,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:Ix.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:Ix.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:Ix.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:Ix.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:Ix.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:Ix.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:Ix.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:Ix.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:Ix.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:Ix.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:Ix.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Ix.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:Ix.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Ix.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Ix.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:Ix.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:Ix.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function Dx(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}Fx.props={};var zx,Wx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gx(t){var e;if(e=Wx.exec(t))return new Hx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function Hx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Vx(t,e){var n,e=Dx(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}Gx.prototype=Hx.prototype,Hx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qx={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Vx(100*t,e),r:Vx,s:function(t,e){var n,r,i=Dx(t,e);return i?(n=i[0],(i=(i=i[1])-(zx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Dx(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yx(t){return t}var $x,Ux=Array.prototype.map,Kx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xx(t){var e,s,l,w=void 0===t.grouping||void 0===t.thousands?Yx:(s=Ux.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",O=void 0===t.decimal?".":t.decimal+"",M=void 0===t.numerals?Yx:(e=Ux.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Gx(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,v=t.type,m=("n"===v?(p=!0,v="g"):qx[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),b="$"===e?i:/[%p]/.test(v)?a:"",x=qx[v],k=/[defgprs%]/.test(v);function n(t){var e,n,r,i=m,a=b;if("c"===v)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===v?Kx[8+zx/3]:"")+a+(o&&"("===f?")":""),k)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?O+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=w(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=w(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return M(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=Gx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=Dx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Kx[8+e/3];return function(t){return n(r*t)+i}}}}function Zx(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function Qx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Jx(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}ac=Xx({thousands:",",grouping:[3],currency:["$",""]}),$x=ac.format,ac.formatPrefix;class tk extends Ss{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function ek(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function nk(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orientation:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function rk(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+Qe(t)]=e:r[t]=e}),r}function ik(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function ak(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function ok(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Bc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=t=>"object"==typeof t?t:String(t),h=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Jp({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),d=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return ku(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Jp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Jp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return vu(s)||yu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:yu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:f(u(ak(t),e,n)),id:String(e)}}),mu(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(h(a.map(t)+r)),label:f(u(ak(t),e,n)),id:String(e)}})}function sk(t,e,n){var r;return!(vu(r=e)&&yu(r)||xu(e))&&(void 0===t?!!n.getTicks:t)}function lk(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+cf(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var ck,Rs=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?$x(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const uk=Rs(t=>{const{direction:o="left",important:s={},labelFormatter:l=t=>""+t,orientation:c,position:u,style:f={},title:h,tickCount:d,tickFilter:p,tickMethod:g,transform:y}=t,v=et(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=lk(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),f),v),a=function(t,e){var[e,n]=ik(e);return t.includes("bottom")||t.includes("top")?n:e}(u,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("number"==typeof e){var[t,a]=r.getCenter(),[s,l]=Ou(r);const[u,f]=Mu(r);var r=o/2,o=s*r,s=l*r,[l,r]=[t+n,a+i],[e,c]=[Math.cos(e),Math.sin(e)];return{startPos:[l+s*e,r+s*c],endPos:[l+o*e,r+o*c],gridClosed:f-u==360,gridCenter:[t+n,i+a],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:ok(t,i,d,l,p,g,u,n),titleText:Qx(h),labelOverlap:function(t=[],e){var{labelAutoRotate:e=!0,labelAutoHide:n=!1,labelAutoEllipsis:r=!1}=e;const i=[...t];return(t=(e,t)=>{t?-1!==(t=i.findIndex(t=>t.type===e.type))?i[t]=e:i.push(e):-1!==(t=i.findIndex(t=>t.type===e.type))&&i.splice(t,1)})({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),t({type:"ellipsis",minLength:20},r),t({type:"hide"},n),i}(y,r),grid:sk(r.grid,n,t),gridLength:a,line:!0}),r.line?null:{lineOpacity:0}),e),s);return new cb({className:"axis",style:rk(i)})}}),fk=Rs(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,important:f={},style:e={}}=t,h=et(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style"]),{title:d,grid:p=!1}=e;return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],t=ok(t,i,c,s,l,u,o,n),[i,a]=Ou(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=Mu(i),[l,c]=ik(i),e={center:e,radius:a,startAngle:o,endAngle:s,titleFillOpacity:0,titlePosition:"inner",line:!1,tick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(ik(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new cb({style:rk(nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:Qx(d),grid:p},h),f)))})}}),hk=(uk.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},fk.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>uk(t)),dk=(hk.props=Object.assign(Object.assign({},uk.props),{defaultPosition:"bottom"}),t=>uk(t));dk.props=Object.assign(Object.assign({},uk.props),{defaultPosition:"left"});const pk=a=>{const{important:o={}}=a,s=et(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return uk(Object.assign(Object.assign(Object.assign({},s),(e=a.orientation,(e%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=Mu(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{grid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,n,r,i)),o)}))(t)}};function gk(t,e,n,r,i={}){const a=(null==(e=null==(e=e["shape."+t])?void 0:e.props)?void 0:e.defaultMarker)||function(t){if(Ce(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=et(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=Eg.get(t)||Eg.get("point");return(...t)=>{return new X.Path({style:Object.assign(Object.assign({},o),{path:s(...t),stroke:s.style.includes("stroke")?a||r:"",fill:s.style.includes("fill")?a||n:"",lineWidth:s.style.includes("lineWidth")?i||2:0})})}}(a,i)(0,0,6)}function yk(t,{scales:e,library:n,markState:r}){var i=ek(e,"shape");const[a,o]=function(t,e){const n=ek(t,"shape");var r=ek(t,"color");const i=[];for(const[l,c]of e){var a=l.type,o=(0<(null==r?void 0:r.getOptions().domain.length)?null==r?void 0:r.getOptions().domain:c.data).map((t,e)=>{return n?n.map(t||"point"):(null==(t=null===l||void 0===l?void 0:l.style)?void 0:t.shape)||c.defaultShape||"point"});"string"==typeof a&&i.push([a,o])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const s=n.getOptions()["range"];return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){var r=s[t%s.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(e,r),s=t["itemMarker"];return i&&!s?(t,e)=>gk(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>gk(s||o[e],n,0,0,{color:t.color})}function vk(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:yk(t,e),itemMarkerSize:(t=ek(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=ek(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?$x(n):n,a=ek(r,"color");t=r.find(t=>0<t.getOptions().domain.length).getOptions().domain;return Object.assign(Object.assign({},e),{data:t.map(t=>({id:t,label:i(t),color:a.map(t)}))})}pk.props=Object.assign(Object.assign({},uk.props),{defaultPosition:"center"});const mk=l=>{const{position:c,title:u}=l,f=et(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:h,gridRow:d}=f;return t=>{var{value:e,theme:n}=t,r=e["bbox"],{width:i,height:a}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=nk(t,e,n);return{width:i,height:a}}(e,l,mk),e=Jx(c,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[o,s]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(c,d,h),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==h&&void 0!==h?h:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:Qx(u)},vk(l,t)),{legend:a={}}=n,s=new tk({style:Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e)});return s.appendChild(new Cb({className:"legend-category",style:rk(Object.assign({},a,i,f))})),s}};mk.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const bk=l=>{const{labelFormatter:c,position:u,title:f,style:h}=l,d=et(l,["labelFormatter","layout","order","orientation","position","size","title","style"]);return({scales:t,value:e,theme:n})=>{var r=e["bbox"],{x:r,y:i,width:a,height:o}=r,s=Jx(u,null==(s=null==(s=null==(s=e.scales)?void 0:s[0])?void 0:s.guide)?void 0:s.layout),r=new tk({style:Object.assign({x:r,y:i,width:a,height:o},s)}),{continuousLegend:i={}}=n;return r.appendChild(new e2({style:rk(Object.assign({},i,Object.assign(Object.assign({titleText:Qx(f),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof c?t=>$x(c)(t.label):c},function(t,e,n,r){const a=ek(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orientation:c,width:u,height:f,length:h}=nk(e,n,r);if(i={orientation:c,width:u,height:f},a instanceof i0){e=a.thresholds;if(a instanceof s0||a instanceof c0)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=ek(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(h).fill(0).map((t,e)=>{var e=(l-s)/(h-1)*e+s,n=a.map(e);const i=d?d.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}(t,e,l,bk)),h),d))})),r}},xk=(bk.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>bk(Object.assign({},{block:!0},e))(...t)),kk=(xk.props=Object.assign(Object.assign({},bk.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>bk(Object.assign({},{type:"size",block:!0,tick:!1},t))),wk=(kk.props=Object.assign(Object.assign({},bk.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>bk(Object.assign({},{type:"size",tick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function Ok(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}wk.props=Object.assign(Object.assign({},bk.props),{defaultPosition:"top",defaultOrientation:"horizontal"});ck={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=et(o,["spacing","align"]);t=rt(c,"title");const u=rt(c,"subtitle"),f=Zx(e,".title","text").attr("className","title").call(L,Object.assign(Object.assign(Object.assign({},Ok(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();Zx(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},Ok(0,f.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const Mk=class extends X.CustomElement{constructor(t){super(t),this.descriptor=ck}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},_k=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new Mk({style:nt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function Sk(t){return t.getBandWidth}function Ek(t,e,n){if(!Sk(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Nc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function Ak(t,e){var n,r;return Sk(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):qc(e)}_k.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const Lk=t=>{const{orientation:c,labelFormatter:u,style:f}=t,h=et(t,["orientation","labelFormatter","size","style"]);return({scales:[e],value:t,theme:n})=>{var r,t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:n={}}=n;const s=(null==(r=e.getFormatter)?void 0:r.call(e))||(t=>t.toString()),l="string"==typeof u?$x(u):u;return new Jv({className:"slider",style:Object.assign({},n,Object.assign(Object.assign({x:t,y:i,trackLength:"horizontal"===c?a:o,orientation:c,formatter:t=>{return(l||s)(Ek(e,t,!0))}},f),h))})}},Pk=(Lk.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Lk(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),Tk=(Pk.props=Object.assign(Object.assign({},Lk.props),{defaultPosition:"bottom"}),t=>Lk(Object.assign(Object.assign({},t),{orientation:"vertical"}))),Nk=(Tk.props=Object.assign(Object.assign({},Lk.props),{defaultPosition:"left"}),t=>{const{orientation:a,style:o}=t,s=et(t,["orientation","labelFormatter","style"]);return({value:t,theme:e})=>{var t=t["bbox"],{x:t,y:n,width:r,height:i}=t,{scrollbar:e={}}=e;return new nm({className:"scrollbar",style:Object.assign({},e,Object.assign(Object.assign(Object.assign(Object.assign({},o),{x:t,y:n,trackLength:"horizontal"===a?r:i}),s),{orientation:a,value:0,contentLength:1500,viewportLength:"horizontal"===a?r:i}))})}}),jk=(Nk.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Nk(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),Ck=(jk.props=Object.assign(Object.assign({},Nk.props),{defaultPosition:"bottom"}),t=>Nk(Object.assign(Object.assign({},t),{orientation:"vertical"})));Ck.props=Object.assign(Object.assign({},Nk.props),{defaultPosition:"left"});class Rk{constructor(t){this.$value=t}static of(t){return new Rk(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Bk(t,e,n){return Rk.of({}).call(Ik,t).call(Ik,e).call(Ik,n).value()}function Ik(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function Fk(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Dk=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],zk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=yu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Bk(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Wk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=yu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Bk(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Gk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=yu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Bk(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Hk=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=yu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Bk(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Vk=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Bk(i,n,l))},qk=(Vk.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Bk(i,n,l))});function Yk(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function $k(t,e){var[n,r,i,t]=Yk(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
2
2
  M ${t} ${e}
3
3
  L ${t+n} ${e}
4
4
  L ${t+n} ${e+r}
5
5
  L ${t} ${e+r}
6
6
  Z
7
- `}([h,d,f,s]))}c-=u,l+=1}return o}function kw(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Mw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function _w(t){var e,t=U.convertToPath(t);if(t&&(Mw(e=t,"m")&&Mw(e,"M")))return t}function Sw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=_w(e),y=_w(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=ww(i=e),[c,u,f,a]=(kw(p,i),ww(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},dw(i,pw)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},dw(p,pw))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(kw(u=new U.Path({style:Object.assign(Object.assign({},dw(l,pw)),{d:c})}),l),u),f=[Object.assign({path:g},dw(e,pw)),Object.assign({path:y},dw(n,pw))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}xw.props={};const Ew=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Ow,i=fw(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Sw(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Sw(t,new U.Path({style:Object.assign({path:d[e]},dw(l,pw))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Sw(t,t,new U.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Aw=(Ew.props={},b=>{return U.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:U.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!wu(r))return gw(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l,strokeOpacity:c,opacity:u}=e,{points:t,y:f,y1:h}=t;const d=E1().cornerRadius(e).padAngle(s*Math.PI/180),p=T0(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new U.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=U.convertToPath(m);return m.style.transform="none",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,fw(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),Lw=(Aw.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,fw(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Tw=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,fw(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Pw=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],fw(i,n,o))},jw=(Pw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new U.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=gw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Nw=(jw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new U.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=mw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Cw(t){return it(t).selectAll("."+ot).nodes().filter(t=>!t.__removed__)}function Rw(t,e){return Bw(t,e).flatMap(({container:t})=>Cw(t))}function Bw(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function Iw(t){return it(t).select("."+st).node()}function Fw(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function Dw(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function zw(t){return t=>t.__data__.color}function Ww(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Gw(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function Hw(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),o[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function Vw(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function qw(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function Yw(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=et(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Xc(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=b1();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),w0(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=et(r,["fill"]),o=new U.Path({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function $w(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return wu(e)?(a=n.__data__["points"],[a,i]=xu(e)?L0(a):a,r=p0(a,a=e.getCenter()),i=p0(i,a),a=y0(r)+v0(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):xu(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function Uw(t){var{background:e,scale:o,coordinate:s,valueof:l}=t,c=et(t,["background","scale","coordinate","valueof"]);const u="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},f=(t,e)=>{var n=o["x"];return ew(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},h=(t,e)=>{var n=o["y"];return ew(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=e["padding"],[r,i]=f(t,n),[n,a]=h(t,n),t=t["__data__"],{y:t,y1:o}=t;return tg([[r,n],[i,n],[i,a],[r,a]].map(t=>s.map(t)),{y:t,y1:o},s,e)},p=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=et(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=w0(c,t=>l(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001}=t,t=et(t,["fill","fillOpacity","zIndex","padding"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a}),n=((()=>{var{x:t,y:e}=o;return[t,e].some(ew)})()?d:p)(e,t);n.className=u,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===u]}function Xw(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function Kw(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=qc(u,i);t=qw(u,n);const[d,p]=Yw(Object.assign({elements:u,valueof:t,link:r,coordinate:l},rt(c.active,"link"))),[g,y,m]=Uw(Object.assign({scale:s,coordinate:l,background:a,valueof:t},rt(c.active,"background"))),{setState:v,removeState:b,hasState:x}=Hw(nt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return $w(u[t],e,l)}})}),t);let w;const O=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},k=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},M=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{k(),w=null},o)):k())},_=()=>{k()};return e.addEventListener("pointerover",O),e.addEventListener("pointerout",M),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",O),e.removeEventListener("pointerout",M),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function Zw(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=et(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return Kw(Iw(t),Object.assign({elements:Cw,datum:Gw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:Vw(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function Qw(t){return Zw(Object.assign(Object.assign({},t),{createGroup:Ww}))}function Jw(t){return Zw(Object.assign(Object.assign({},t),{createGroup:zw}))}function t5(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=qc(h,c);t=qw(h,n);const[g,y]=Yw(Object.assign({link:u,elements:h,valueof:t,coordinate:r},rt(o.selected,"link"))),[m,v]=Uw(Object.assign({background:i,coordinate:r,scale:a,valueof:t},rt(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=Hw(nt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return $w(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function e5(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=et(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return t5(Iw(t),Object.assign({elements:Cw,datum:Gw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:Vw(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function n5(t){return e5(Object.assign(Object.assign({},t),{createGroup:Ww}))}function r5(t){return e5(Object.assign(Object.assign({},t),{createGroup:zw}))}function i5(t){var{wait:M=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=et(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Xc(t.map(t=>d[t])),u=nt({},e),f=u.marks.find(t=>"line"===t.type);t=su(Yc(t,t=>su(t,t=>+h[t])/cu(t,t=>+h[t]),t=>l[t]).values());nt(f,{scale:{y:{domain:[1/t,t]}}});const p=Iw(r),g=r.getElementsByClassName(ot);const y=qc(r.getElementsByClassName(ct),t=>t.__data__.key.split("-")[0]),m=new U.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},rt(A,"rule"))}),v=new U.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},rt(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Ic(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var O;const k=Ks(t=>{t=Fw(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[jc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},M,{leading:_,trailing:S});return O=[0,0],ye(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,O);x(O,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[jc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",k),p.addEventListener("pointermove",k),p.addEventListener("pointerleave",k),()=>{m.remove(),p.removeEventListener("pointerenter",k),p.removeEventListener("pointermove",k),p.removeEventListener("pointerleave",k)}}}function a5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Iw(n),a=nt({},e);for(const s of a.marks)s.animate=!1;const o=Ks(t=>{var e,n,t=Fw(i,t);t&&([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function o5(t){return t.getRootNode().defaultView.getConfig().container}function s5(t,e,n,r,i,a,o){var o=o?o5(t):t,{tooltipElement:t=function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Vb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},title:" ",position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return o5(t).appendChild(e.HTMLTooltipElement),e}(t,n,r)}=o,{items:e,title:s}=e;t.show(),t.position=[n,r],t.update(Object.assign({items:e,title:void 0===s?"":s},void 0!==i&&{customContent:i(a,{items:e,title:s})})),o.tooltipElement=t}function l5(t,e){e=(e?o5(t):t).tooltipElement;e&&e.hide()}function c5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function u5(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Ip)&&!(t instanceof jp);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function f5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function h5(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function d5(n,o,s=!0,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=h5(t.map(t=>t.title),e).filter(yf),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;return e.filter(yf).map(t=>{var{color:e=f5(i),name:n}=t,t=et(t,["color","name"]),n=s?u5(o,r)||n:n||u5(o,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})});return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:h5(t,t=>`(${e(t.name)}, ${e(t.value)})`)})}function p5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function g5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function y5(t,e){return void 0===t?e:t}function m5(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function v5(_,{elements:t,sort:S,filter:E,scale:A,coordinate:L,crosshairs:T,render:P,style:e,groupName:j=!0,wait:n=50,leading:r=!0,trailing:i=!1,startX:N=0,startY:C=0,body:R=!0,single:B=!0}){t=t(_);const I=xu(L),F=wu(L),{innerWidth:D,innerHeight:z}=L.getOptions(),W=[],G=[];for(const s of t){var a=s["__data__"],a=a["seriesX"];(a?W:G).push(s)}W.sort((t,e)=>{const n=I?0:1;var r=t=>t.getBounds().min[n];return I?r(e)-r(t):r(t)-r(e)});const H=new Map(W.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Xc(n.map((t,e)=>e),t=>n[+t]),n]]})),V=rt(e,"crosshairs");t=A.x;const q=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,Y=(t,e)=>{const n=I?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return Xc([t[n],e[n]])})(t);return r>=t&&r<=e})},o=Ks(t=>{var e=Fw(_,t);if(e){var n=_.getBounds();const g=n.min[0],y=n.min[1];var r=[e[0]-N,e[1]-C],n=Y(r,G),i=[],a=[];for(const m of W){var[o,s]=H.get(m),o=((t,e,n)=>{var[t]=L.invert(t),t=t-q,[r,i]=Xc([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,jc(t=>n[+t]).center)(e,t)]})(r,o,s);if(null!==o){i.push(m);s=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,e])=>{e=e[n];return[Bs(t.replace("series","")),e]}))})(m,o);const{x:g,y}=s;o=L.map([g+q,y]);a.push([s,o])}}var l=[...a.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...i,...n],l=d5(n,A,j,l);if(S&&l.items.sort((t,e)=>S(t)-S(e)),E&&(l.items=l.items.filter(E)),0===n.length||m5(l))$();else if(R&&s5(_,l,e[0]+g,e[1]+y,P,t,B),T){n=a.map(t=>t[1]);{var c,l=_,e=n,{height:n,width:u,startX:f,startY:h,transposed:d,polar:p}=t=Object.assign(Object.assign({},V),{width:D,height:z,startX:N,startY:C,transposed:I,polar:F}),t=et(t,["height","width","startX","startY","transposed","polar"]);const v=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t),b=(t=e.map(t=>t[1]),e=e.map(t=>t[0]),gu(t)),x=gu(e),[w,O,k,M]=p?(t=f+u/2,e=h+n/2,p=Math.min(u,n)/2,c=y0(p0([x,b],[t,e])),[t,t+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[f,f+u,b+h,b+h]:[x+f,x+f,h,h+n];(e=l.ruleY||(t=new U.Line({style:Object.assign({x1:w,x2:O,y1:k,y2:M},v)}),l.appendChild(t),t)).style.x1=w,e.style.x2=O,e.style.y1=k,e.style.y2=M,l.ruleY=e}}}},n,{leading:r,trailing:i}),$=()=>{l5(_,B),T&&p5(_)};return _.addEventListener("pointerenter",o),_.addEventListener("pointermove",o),_.addEventListener("pointerleave",$),()=>{_.removeEventListener("pointerover",o),_.removeEventListener("pointerout",o),_.removeEventListener("pointerleave",$),c5(_),T&&p5(_)}}function b5(i,{elements:t,scale:a,render:o,groupName:s=!0,sort:l,filter:c,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:u=t=>t,single:f=!0}){t=t(i);const h=new Set(t),d=qc(t,u),p=Ks(t=>{var e,n,r=t["target"];h.has(r)&&(r=u(r),r=1===(r=d.get(r)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(yf).map(t=>{var{color:e=f5(n)}=t,t=et(t,["color"]);return Object.assign(Object.assign({},t),{color:e})});return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(r[0]):d5(r,a,s),l&&r.items.sort((t,e)=>l(t)-l(e)),c&&(r.items=r.items.filter(c)),m5(r)?l5(i,f):({offsetX:e,offsetY:n}=t,s5(i,r,e,n,o,t,f)))},e,{leading:n,trailing:r}),g=t=>{t=t.target;h.has(t)&&l5(i,f)};return i.addEventListener("pointerover",p),i.addEventListener("pointermove",p),i.addEventListener("pointerout",g),()=>{i.removeEventListener("pointerover",p),i.removeEventListener("pointermove",p),i.removeEventListener("pointerout",g),c5(i)}}function x5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=et(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=g5(a,"seriesTooltip"),l=g5(a,"crosshairs"),n=Iw(n),s=y5(h,s);if(s&&!p)return v5(n,Object.assign(Object.assign({},g),{elements:Cw,scale:i,coordinate:o,crosshairs:y5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=Rw(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return v5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:y5(f,l),item:d,startX:s,startY:t}))}return b5(n,Object.assign(Object.assign({},g),{elements:Cw,scale:i,coordinate:o,groupKey:u?Ww(r):void 0,item:d}))}}Nw.props={};const w5="legend-category",O5="items-item",k5="legend-category-item-marker",M5="legend-category-item-label";function _5(t){return t.getElementsByClassName(k5)[0]}function S5(t){return t.getElementsByClassName(M5)[0]}function E5(t){return t.getElementsByClassName(O5)}function A5(t){return t.getElementsByClassName(w5)}function L5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function T5(t){const e=function(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}(t)["data"];t=L5(t).scales[0].name;return[t,{legends:E5,marker:_5,label:S5,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}function P5(t,{legends:e,marker:i,label:a,datum:o,filter:n,setAttribute:r,state:s={}}){const l=new Map,c=new Map,u=new Map;var{unselected:s={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=s,f={unselected:rt(s,"marker")},s={unselected:rt(s,"label")};const{setState:h,removeState:d}=Hw(f,void 0,r),{setState:p,removeState:g}=Hw(s,void 0,r),y=Array.from(e(t)),m=y.map(o),v=()=>{for(const r of y){var t=o(r),e=i(r),n=a(r);(m.includes(t)?(d(e,"unselected"),g):(h(e,"unselected"),p))(n,"unselected")}};for(const O of y){var b=()=>{Xw(t,"pointer")},x=()=>{Xw(t,"default")},w=()=>ye(this,void 0,void 0,function*(){var t=o(O),e=m.indexOf(t);-1===e?m.push(t):m.splice(e,1),0===m.length&&m.push(...y.map(o)),yield n(m),v()});O.addEventListener("click",w),O.addEventListener("pointerenter",b),O.addEventListener("pointerout",x),l.set(O,w),c.set(O,b),u.set(O,x)}return()=>{for(const t of y)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function j5(t){var s=t["channel"],l=et(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=A5(e),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[n,r]=t?T5(t):[null,{}];return n&&(s=n),P5(e,Object.assign(Object.assign(Object.assign({},r),{filter:r=>ye(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return nt({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)}),state:t.attributes.state}),l))}}function N5(){return t=>{const{container:e,view:n,options:r}=t;t=A5(e);const i=Cw(e);var a=Vw(r,["active","inactive"]),o=qw(i,Gw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=L5(u).scales[0].name,d=E5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=qc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=Hw(a,o);var l={inactive:rt(s,"marker")},s={inactive:rt(s,"label")};const{setState:v,removeState:b}=Hw(l),{setState:x,removeState:w}=Hw(s),O=t=>{for(const r of d){var e=_5(r),n=S5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},k=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");O(_)};_.addEventListener("pointerover",c),k.set(_,c)}const M=()=>{for(const t of i)m(t,"inactive","active");O(null)};return u.addEventListener("pointerleave",M),()=>{u.removeEventListener(M);for(var[t,e]of k)t.removeEventListener(e)}}}}function C5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=et(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,O=(Xw(a,"crosshair"),a.style.draggable=!0,()=>{y=new U.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new U.Rect({style:{draggable:!0,fill:"transparent"},className:"mask"}),a.appendChild(y),a.appendChild(g)}),k=()=>{g=new U.Rect({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},M=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
8
- M${v},${b}L${x},${b}L${x},${w}L${v},${w}Z
7
+ `}([h,d,f,s]))}c-=u,l+=1}return o}function Uk(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Kk(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function Xk(t){var e,t=X.convertToPath(t);if(t&&(Kk(e=t,"m")&&Kk(e,"M")))return t}function Zk(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=Xk(e),y=Xk(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=Yk(i=e),[c,u,f,a]=(Uk(p,i),Yk(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},Fk(i,Dk)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},Fk(p,Dk))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(Uk(u=new X.Path({style:Object.assign(Object.assign({},Fk(l,Dk)),{d:c})}),l),u),f=[Object.assign({path:g},Fk(e,Dk)),Object.assign({path:y},Fk(n,Dk))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}qk.props={};const Qk=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:$k,i=Bk(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Zk(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Zk(t,new X.Path({style:Object.assign({path:d[e]},Fk(l,Dk))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e=1,strokeOpacity:t=1,opacity:n=1}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Zk(t,t,new X.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Jk=(Qk.props={},b=>{return X.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:X.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!vu(r))return zk(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l=1,strokeOpacity:c=1,opacity:u=1}=e,{points:t,y:f,y1:h}=t;const d=F1().cornerRadius(e).padAngle(s*Math.PI/180),p=W0(r,t,[f,h]),{startAngle:g,endAngle:y}=p,v=new X.Path({}),m=t=>{v.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=X.convertToPath(v);return v.style.transform="",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,Bk(i,n,b));return s.onframe=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),tw=(Jk.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,Bk(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),ew=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t="",fillOpacity:o=1,strokeOpacity:s=1,opacity:l=1}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,Bk(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},nw=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Bk(i,n,o))},rw=(nw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=zk(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),iw=(rw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new X.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Gk(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),aw=(iw.props={},{visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1});function ow(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>ow(t,e,n,r))}function sw(t){ow(t,"visibility","hidden",!0)}function lw(t){ow(t,"visibility","visible",!0)}function cw(t){return it(t).selectAll("."+ot).nodes().filter(t=>!t.__removed__)}function uw(t,e){return fw(t,e).flatMap(({container:t})=>cw(t))}function fw(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function hw(t){return it(t).select("."+st).node()}function dw(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getRenderBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function pw(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function gw(t){return t=>t.__data__.color}function yw(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function vw(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function mw(s,l=(t,e)=>t,c=(t,e,n)=>t.setAttribute(e,n)){const u="__states__",f="__ordinal__",i=t=>{var{[u]:e=[],[f]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),s[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){a=t,o=r;var a=null!=(a=t.style[o])?a:aw[o],o=l(i,t);c(t,r,o),r in n||(n[r]=a)}t[f]=n}},a=t=>{t[u]||(t[u]=[])};return{setState:(t,...e)=>{a(t),t[u]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[u].indexOf(r);-1!==n&&t[u].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[u].indexOf(e))}}function bw(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function xw(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function kw(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=et(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=qc(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=P1();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),_0(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=et(r,["fill"]),o=new X.Path({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function ww(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return vu(e)?(a=n.__data__["points"],[a,i]=yu(e)?z0(a):a,r=P0(a,a=e.getCenter()),i=P0(i,a),a=N0(r)+C0(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):yu(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function Ow(t){var{background:e,scale:s,coordinate:l,valueof:c}=t,u=et(t,["background","scale","coordinate","valueof"]);const f="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},h=(t,e)=>{var n=s["x"];return Sk(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=s["y"];return Sk(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},p=(t,e)=>{var n=e["padding"],[r,i]=h(t,n),[n,a]=d(t,n),t=t["__data__"],{y:t,y1:o}=t;return fg([[r,n],[i,n],[i,a],[r,a]].map(t=>l.map(t)),{y:t,y1:o},l,e)},g=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=et(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=_0(u,t=>c(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001,strokeWidth:o=0}=t,t=et(t,["fill","fillOpacity","zIndex","padding","strokeWidth"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a,strokeWidth:o}),n=((()=>{var{x:t,y:e}=s;return[t,e].some(Sk)})()?p:g)(e,t);n.className=f,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===f]}function Mw(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function _w(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=Wc(u,i);t=xw(u,n);const[d,p]=kw(Object.assign({elements:u,valueof:t,link:r,coordinate:l},rt(c.active,"link"))),[g,y,v]=Ow(Object.assign({scale:s,coordinate:l,background:a,valueof:t},rt(c.active,"background"))),{setState:m,removeState:b,hasState:x}=mw(nt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return ww(u[t],e,l)}})}),t);let k;const w=t=>{var e=t["target"];if(f.has(e)){k&&clearTimeout(k);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||m(r,"active"):(m(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},O=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},M=t=>{t=t.target;a&&!v(t)||(a||f.has(t))&&(0<o?(k&&clearTimeout(k),k=setTimeout(()=>{O(),k=null},o)):O())},_=()=>{O()};return e.addEventListener("pointerover",w),e.addEventListener("pointerout",M),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",w),e.removeEventListener("pointerout",M),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function Sw(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=et(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return _w(hw(t),Object.assign({elements:cw,datum:vw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:bw(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function Ew(t){return Sw(Object.assign(Object.assign({},t),{createGroup:yw}))}function Aw(t){return Sw(Object.assign(Object.assign({},t),{createGroup:gw}))}function Lw(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=Wc(h,c);t=xw(h,n);const[g,y]=kw(Object.assign({link:u,elements:h,valueof:t,coordinate:r},rt(o.selected,"link"))),[v,m]=Ow(Object.assign({background:i,coordinate:r,scale:a,valueof:t},rt(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=mw(nt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return ww(h[t],e,r)}})}),t),k=()=>{for(const t of h)s(t,"selected","unselected"),y(t),m(t)},l=t=>{t=t.target;if(!d.has(t))return k();if(f){var e=t;if(x(e,"selected"))k();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&m(a);g(n),v(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return k();for(const s of t)b(s,"unselected"),y(s),m(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),v(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function Pw(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=et(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return Lw(hw(t),Object.assign({elements:cw,datum:vw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:bw(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function Tw(t){return Pw(Object.assign(Object.assign({},t),{createGroup:yw}))}function Nw(t){return Pw(Object.assign(Object.assign({},t),{createGroup:gw}))}function jw(t){var{wait:M=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=et(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=qc(t.map(t=>d[t])),u=nt({},e),f=u.marks.find(t=>"line"===t.type);t=ru(Gc(t,t=>ru(t,t=>+h[t])/au(t,t=>+h[t]),t=>l[t]).values());nt(f,{scale:{y:{domain:[1/t,t]}}});const p=hw(r),g=r.getElementsByClassName(ot);const y=Wc(r.getElementsByClassName(ct),t=>t.__data__.key.split("-")[0]),v=new X.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},rt(A,"rule"))}),m=new X.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},rt(A,"label"))}),b=(v.append(m),p.appendChild(v),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[jc(c,n)]}),x=(t,e)=>{v.setAttribute("x1",t[0]),v.setAttribute("x2",t[0]),m.setAttribute("text",E(e))};let k;var w;const O=pn(t=>{t=dw(p,t);if(t){var{scale:e,coordinate:n}=k,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Ac(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},M,{leading:_,trailing:S});return w=[0,0],ue(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,w);x(w,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Ac(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);k=t.view}),p.addEventListener("pointerenter",O),p.addEventListener("pointermove",O),p.addEventListener("pointerleave",O),()=>{v.remove(),p.removeEventListener("pointerenter",O),p.removeEventListener("pointermove",O),p.removeEventListener("pointerleave",O)}}}function Cw({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=hw(n),a=nt({},e);for(const s of a.marks)s.animate=!1;const o=pn(t=>{var e,n,t=dw(i,t);t&&([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(a)).focusX=t,n.focusY=e,n.visual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function Rw(t){return t.getRootNode().defaultView.getConfig().container}function Bw({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1}){var o=o?Rw(t):t,{tooltipElement:t=function(t,e,n,r,i){var{min:[a,o],max:[s,l]}=t.getBounds(),e=new g2({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},data:[],bounding:{x:a,y:o,width:s-a,height:l-o},position:r,enterable:i,title:"",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return Rw(t).appendChild(e.HTMLTooltipElement),e}(t,n,r,s,l)}=o,{items:e,title:c=""}=e;t.update(Object.assign({x:n,y:r,data:e,title:c,position:s,enterable:l},void 0!==i&&{content:i(a,{items:e,title:c})})),o.tooltipElement=t}function Iw(t,e){e=(e?Rw(t):t).tooltipElement;e&&e.hide()}function Fw(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function Dw(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Up)&&!(t instanceof Hp);return i(n)?n.invert(r):r&&r!==e?r:!i(t)||(n=t.invert(e),Array.isArray(n))?null:n}function zw(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e&&"transparent"!==e?e:n}=t;return t}function Ww(t,e=t=>t){t=new Map(t.map(t=>[e(t),t]));return Array.from(t.values())}function Gw(n,o,s=!0,t=n.map(t=>t.__data__)){const e=t=>t instanceof Date?+t:t;var r=Ww(t.map(t=>t.title),e).filter(hf),t=t.flatMap((r,t)=>{const i=n[t],{items:e=[],title:a}=r;return e.filter(hf).map(t=>{var{color:e=zw(i),name:n}=t,t=et(t,["color","name"]),n=s?Dw(o,r)||n:n||Dw(o,r);return Object.assign(Object.assign({},t),{color:e,name:n||a})})});return Object.assign(Object.assign({},0<r.length&&{title:r.join(",")}),{items:Ww(t,t=>`(${e(t.name)}, ${e(t.value)})`)})}function Hw(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Vw(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function qw(t,e){return void 0===t?e:t}function Yw(t){var{title:t,items:e}=t;return 0===e.length&&void 0===t}function $w(_,{elements:t,sort:S,filter:E,scale:A,coordinate:L,crosshairs:P,render:T,style:e,groupName:N=!0,wait:n=50,leading:r=!0,trailing:i=!1,startX:j=0,startY:C=0,body:R=!0,single:B=!0,position:I,enterable:F}){t=t(_);const D=yu(L),z=vu(L),{innerWidth:W,innerHeight:G}=L.getOptions(),H=[],V=[];for(const s of t){var a=s["__data__"],a=a["seriesX"];(a?H:V).push(s)}H.sort((t,e)=>{const n=D?0:1;var r=t=>t.getBounds().min[n];return D?r(e)-r(t):r(t)-r(e)});const q=new Map(H.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[qc(n.map((t,e)=>e),t=>n[+t]),n]]})),Y=rt(e,"crosshairs");t=A.x;const $=null!=t&&t.getBandWidth?t.getBandWidth()/2:0,U=(t,e)=>{const n=D?1:0,r=t[n];return e.filter(t=>{var[t,e]=(t=>{var{min:t,max:e}=t.getLocalBounds();return qc([t[n],e[n]])})(t);return r>=t&&r<=e})},o=pn(t=>{var e=dw(_,t);if(e){var n=_.getRenderBounds();const g=n.min[0],y=n.min[1];var r=[e[0]-j,e[1]-C],n=U(r,V),i=[],a=[];for(const v of H){var[o,s]=q.get(v),o=((t,e,n)=>{var[t]=L.invert(t),t=t-$,[r,i]=qc([n[0],n[n.length-1]]);return t<r||i<t?null:e[(0,Ac(t=>n[+t]).center)(e,t)]})(r,o,s);if(null!==o){i.push(v);s=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,e])=>{e=e[n];return[Ze(t.replace("series","")),e]}))})(v,o);const{x:g,y}=s;o=L.map([g+$,y]);a.push([s,o])}}var l=[...a.map(t=>t[0]),...n.map(t=>t.__data__)],n=[...i,...n],l=Gw(n,A,N,l);if(S&&l.items.sort((t,e)=>S(t)-S(e)),E&&(l.items=l.items.filter(E)),0===n.length||Yw(l))K();else if(R&&Bw({root:_,data:l,x:e[0]+g,y:e[1]+y,render:T,event:t,single:B,position:I,enterable:F}),P){n=a.map(t=>t[1]);{var c,l=_,e=n,{height:n,width:u,startX:f,startY:h,transposed:d,polar:p}=t=Object.assign(Object.assign({},Y),{width:W,height:G,startX:j,startY:C,transposed:D,polar:z}),t=et(t,["height","width","startX","startY","transposed","polar"]);const m=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t),b=(t=e.map(t=>t[1]),e=e.map(t=>t[0]),fu(t)),x=fu(e),[k,w,O,M]=p?(t=f+u/2,e=h+n/2,p=Math.min(u,n)/2,c=N0(P0([x,b],[t,e])),[t,t+p*Math.cos(c),e,e+p*Math.sin(c)]):d?[f,f+u,b+h,b+h]:[x+f,x+f,h,h+n];(e=l.ruleY||(t=new X.Line({style:Object.assign({x1:k,x2:w,y1:O,y2:M},m)}),l.appendChild(t),t)).style.x1=k,e.style.x2=w,e.style.y1=O,e.style.y2=M,l.ruleY=e}}}},n,{leading:r,trailing:i}),K=()=>{Iw(_,B),P&&Hw(_)};return _.addEventListener("pointerenter",o),_.addEventListener("pointermove",o),_.addEventListener("pointerleave",K),()=>{_.removeEventListener("pointerenter",o),_.removeEventListener("pointermove",o),_.removeEventListener("pointerleave",K),Fw(_),P&&Hw(_)}}function Uw(i,{elements:t,scale:a,render:o,groupName:s=!0,sort:l,filter:c,wait:e=50,leading:n=!0,trailing:r=!1,groupKey:u=t=>t,single:f=!0,position:h,enterable:d}){t=t(i);const p=new Set(t),g=Wc(t,u),y=pn(t=>{var e,n,r=t["target"];p.has(r)&&(r=u(r),r=1===(r=g.get(r)).length?function(n){var{title:t,items:e=[]}=t=n["__data__"],e=e.filter(hf).map(t=>{var{color:e=zw(n)}=t,t=et(t,["color"]);return Object.assign(Object.assign({},t),{color:e})});return Object.assign(Object.assign({},t&&{title:t}),{items:e})}(r[0]):Gw(r,a,s),l&&r.items.sort((t,e)=>l(t)-l(e)),c&&(r.items=r.items.filter(c)),Yw(r)?Iw(i,f):({offsetX:e,offsetY:n}=t,Bw({root:i,data:r,x:e,y:n,render:o,event:t,single:f,position:h,enterable:d})))},e,{leading:n,trailing:r}),v=t=>{t=t.target;p.has(t)&&Iw(i,f)};return i.addEventListener("pointerover",y),i.addEventListener("pointermove",y),i.addEventListener("pointerout",v),()=>{i.removeEventListener("pointerover",y),i.removeEventListener("pointermove",y),i.removeEventListener("pointerout",v),Fw(i)}}function Kw(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=et(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=Vw(a,"seriesTooltip"),l=Vw(a,"crosshairs"),n=hw(n),s=qw(h,s);if(s&&!p)return $w(n,Object.assign(Object.assign({},g),{elements:cw,scale:i,coordinate:o,crosshairs:qw(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=uw(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return $w(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:qw(f,l),item:d,startX:s,startY:t}))}return Uw(n,Object.assign(Object.assign({},g),{elements:cw,scale:i,coordinate:o,groupKey:u?yw(r):void 0,item:d}))}}const Xw="legend-category",Zw="items-item",Qw="legend-category-item-marker",Jw="legend-category-item-label";function t5(t){return t.getElementsByClassName(Qw)[0]}function e5(t){return t.getElementsByClassName(Jw)[0]}function n5(t){return t.getElementsByClassName(Zw)}function r5(t){return t.getElementsByClassName(Xw)}function i5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function a5(t,{legends:e,marker:i,label:a,datum:o,filter:n,state:r={}}){const s=new Map,l=new Map,c=new Map;var{unselected:r={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=r,u={unselected:rt(r,"marker")},r={unselected:rt(r,"label")};const{setState:f,removeState:h}=mw(u,void 0),{setState:d,removeState:p}=mw(r,void 0),g=Array.from(e(t)),y=g.map(o),v=()=>{for(const r of g){var t=o(r),e=i(r),n=a(r);(y.includes(t)?(h(e,"unselected"),p):(f(e,"unselected"),d))(n,"unselected")}};for(const k of g){var m=()=>{Mw(t,"pointer")},b=()=>{Mw(t,"default")},x=()=>ue(this,void 0,void 0,function*(){var t=o(k),e=y.indexOf(t);-1===e?y.push(t):y.splice(e,1),0===y.length&&y.push(...g.map(o)),yield n(y),v()});k.addEventListener("click",x),k.addEventListener("pointerenter",m),k.addEventListener("pointerout",b),s.set(k,x),l.set(k,m),c.set(k,b)}return()=>{for(const t of g)t.removeEventListener("click",s.get(t)),t.removeEventListener("pointerenter",l.get(t)),t.removeEventListener("pointerout",c.get(t))}}function o5(){return(t,e,n)=>{const{container:r,view:a,options:o,update:s}=t;t=r5(r);const i=(r,i)=>ue(this,void 0,void 0,function*(){var t=a["scale"];const{[r]:n}=t;t=o.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[r]:i},...e];return nt({},t,{transform:e,scale:{[r]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},o),{marks:t});return s(t)});if(!t.length)return n.on("legend:filter",t=>{var{values:t,channel:e}=t;i(e,t)}),()=>{};const l=t.map(t=>{const{name:e,domain:n}=i5(t).scales[0];return a5(r,{legends:n5,marker:t5,label:e5,datum:t=>{t=t.__data__,t=t.index;return n[t]},filter:t=>i(e,t),state:t.attributes.state})});return()=>{l.forEach(t=>t())}}}function s5(){return t=>{const{container:e,view:n,options:r}=t;t=r5(e);const i=cw(e);var a=bw(r,["active","inactive"]),o=xw(i,vw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=i5(u).scales[0].name,d=n5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=Wc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:v}=mw(a,o);var l={inactive:rt(s,"marker")},s={inactive:rt(s,"label")};const{setState:m,removeState:b}=mw(l),{setState:x,removeState:k}=mw(s),w=t=>{for(const r of d){var e=t5(r),n=e5(r);(r===t||null===t?(b(e,"inactive"),k):(m(e,"inactive"),x))(n,"inactive")}},O=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");w(_)};_.addEventListener("pointerover",c),O.set(_,c)}const M=()=>{for(const t of i)v(t,"inactive","active");w(null)};return u.addEventListener("pointerleave",M),()=>{u.removeEventListener(M);for(var[t,e]of O)t.removeEventListener(e)}}}}function l5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=et(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,v=!1;const[m,b,x,k]=s,w=(Mw(a,"crosshair"),a.style.draggable=!0,()=>{y=new X.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new X.Rect({style:{x:0,y:0,width:0,height:0,draggable:!0},className:"mask"}),a.appendChild(y),a.appendChild(g)}),O=()=>{g=new X.Rect({style:Object.assign(Object.assign({x:0,y:0},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},M=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,v=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
8
+ M${m},${b}L${x},${b}L${x},${k}L${m},${k}Z
9
9
  M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
10
- `,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=Dw(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return O();k()})(t,n),m=!0)},L=t=>{var e,n,r,t=Dw(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},T=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=Dw(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},P=t=>{t=t.target;g&&t!==g&&M()},j=t=>{t=t.target;t!==g||m?Xw(a,"crosshair"):Xw(a,"move")},N=()=>{Xw(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",L),a.addEventListener("dragend",T),a.addEventListener("click",P),a.addEventListener("pointermove",j),a.addEventListener("pointerleave",N),{mask:g,remove(){g&&M()},destroy(){g&&M(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",L),a.removeEventListener("dragend",T),a.removeEventListener("click",P),a.removeEventListener("pointermove",j),a.removeEventListener("pointerleave",N)}}}function R5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function B5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=et(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=qw(p,i),n=rt(e,"mask");const{setState:m,removeState:f}=Hw(u,r),h=new Map,{width:v,height:b,x,y:w}=c(t);i=o||[0,0,v,b];return C5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new U.Rect({style:{x:t+x,y:e+w,width:n-t,height:r-e}}),m(o,"inactive"),m(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?m(f,"inactive"):(m(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"active"):m(h,"inactive")}}))}function I5(t){var{facet:h,brushKey:d}=t,p=et(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=Iw(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],B5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Rw(t,e),datum:Gw(Bw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:Vw(Bw(t,e).map(t=>t.options),u)},c),p));const f=B5(o,Object.assign(Object.assign({elements:Cw,key:t=>t.__data__.key,siblings:()=>{return R5(t,e,d).map(t=>Iw(t.container))},datum:Gw([s,...R5(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:Vw([l,...R5(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function F5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function D5(t){return I5(Object.assign(Object.assign({},t),{brushRegion:F5}))}function z5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function W5(t){return I5(Object.assign(Object.assign({},t),{brushRegion:z5}))}const G5="axis",H5="axis-hot-area";function V5(t){return t.getElementsByClassName(G5)}function q5(t){return t.getElementsByClassName("axis-line")[0]}function Y5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function $5(t,e){var{cross:n,offsetX:i}=e,e=et(e,["cross","offsetX","offsetY"]),r=Y5(t),[t]=q5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:z5,hotZone:new U.Rect({className:H5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function U5(t,e){var{offsetY:i,cross:n=!1}=e,e=et(e,["offsetY","offsetX","cross"]),r=Y5(t),[,t]=q5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:F5,hotZone:new U.Rect({className:H5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function X5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=et(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=Hw(u,qw(f,o))["setState"],d=new Map;var p=rt(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?U5:$5)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),C5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function K5(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=Iw(t).getBBox();return X5(t,Object.assign({elements:Cw,axes:V5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Gw(e),state:Vw(n,["active",["inactive",{opacity:.5}]])},a))}}function Z5(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=rt(et(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=C5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function Q5(t){var{hideX:y=!0,hideY:m=!0}=t,i=et(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=Iw(n);let d=!1,p=!1,g=r;return Z5(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ye(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[nw(i,t,e),nw(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>nt({axis:Object.assign(Object.assign({},y&&{x:{labelTransform:[{type:"hide"}]}}),m&&{y:{labelTransform:[{type:"hide"}]}})},t,{scale:{x:{domain:rw(i,[n[0],o[0]])},y:{domain:rw(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function J5(t){return Q5(Object.assign(Object.assign({hideX:!0},t),{brushRegion:F5}))}function tO(t){return Q5(Object.assign(Object.assign({hideY:!0},t),{brushRegion:z5}))}const eO="slider";function nO({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:l,update:c}=t;t=e.getElementsByClassName(eO);if(t.length){let s=!1;const u=n["scale"];var{x:r,y:i}=u;const o=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orient"];var a=Ks(o=>ye(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];s||(s=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return rw(e,[nw(e,t,!0),nw(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=l,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>nt({axis:{x:{labelTransform:[{type:"hide"}]},y:{labelTransform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield c(a),s=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",a),o.set(h,a)}return()=>{for(var[t,e]of o)t.removeEventListener("valuechange",e)}}}}const rO={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function iO(t){return"text"===t.nodeName&&!!t.isOverflowing()}function aO(t){var{offsetX:h=8,offsetY:d=8}=t,r=et(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=rt(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];iO(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new U.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},rO),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];iO(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}function oO(t,e,n){var{data:r={}}=t;r.data=function(t,e){const{markKey:n,index:r,seriesIndex:i}=t=t.__data__,a=(t=e.markState,Array.from(t.keys()).find(t=>t.key===n));if(a)return i?i.map(t=>a.data[t]):a.data[r]}(e,n),t.data=r}function sO(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(e=t["target"],{classList:n=[]}=e,[n,r]=n,"element"===n?(oO(t,e,a),o.emit("element:"+i,t),o.emit(r+":"+i,t)):o.emit(n+":click"))}}function lO(){return(t,e,n)=>{const{container:r,view:i}=t,a=sO("click",i,n,t=>1===t.detail),o=sO("dblclick",i,n,t=>2===t.detail),s=sO("pointertap",i,n),l=sO("pointerdown",i,n),c=sO("pointerup",i,n),u=sO("pointerover",i,n),f=sO("pointerout",i,n),h=sO("pointermove",i,n),d=sO("pointerenter",i,n),p=sO("pointerleave",i,n),g=sO("pointerupoutside",i,n),y=sO("dragstart",i,n),m=sO("drag",i,n),v=sO("dragend",i,n),b=sO("dragenter",i,n),x=sO("dragleave",i,n),w=sO("dragover",i,n),O=sO("drop",i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",m),r.addEventListener("dragend",v),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",O),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",m),r.removeEventListener("dragend",v),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",O)}}}function cO(n){return(t,...e)=>nt({},n(t,...e),t)}function uO(n){return(t,...e)=>nt({},t,n(t,...e))}function fO(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=et(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const hO=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=et(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:fO(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},dO=(hO.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=et(g,["data"]),y=fO(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),pO=(dO.props={},()=>t=>{var e=t["children"],t=et(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=et(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=et(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:fO(e,s),scale:nt({},l,n),encode:nt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&nt({},c,r),legend:!(!i||!u)&&nt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),gO=(pO.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:O,x:k,y:M,key:_,frame:S,title:E,labelTransform:A,parentKey:L,clip:T}=t,t=et(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:k,y:M,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:O,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),yO=(gO.props={},cO(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=qc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),mO=cO(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:nt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:nt({title:i},o)}}}),vO=cO(()=>({animate:{enterType:"fadeIn"}})),bO=uO(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),xO=uO(()=>({type:"cell"})),wO=uO(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),OO=uO((t,c=function(t){t=t.points;return b0(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?kO(a,e):(t=e.length?void 0:null,nt({title:r===i-1&&void 0,grid:t},a))}},O=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?kO(r,e):(n=e.length?void 0:null,nt({title:0===t&&void 0,grid:n},r))}},k={})=>{const{data:e,encode:n,children:u,scale:r,x:M=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=O0(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>E.filter(t)),v=f?su(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=et(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:L?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:T}},o={x:MO(o,w)(p,r),y:MO(a,O)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+M,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:nt(s,e,l),axis:nt({},i,o),legend:!1},t),k)})})}}});function kO(t,e){return e.length?nt({title:!1,tick:null,label:null},t):nt({title:!1,tick:null,label:null,grid:null},t)}function MO(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const _O=()=>t=>{return[uw.of(t).call(xO).call(mO).call(vO).call(yO).call(bO).call(wO).call(OO).value()]},SO=(_O.props={},cO(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),EO=uO(t=>{const{data:w,children:c,x:O=0,y:k=0,key:M}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=O0(t);const s=t.map(({points:t})=>b0(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=et(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return kO(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return kO(n,e)})(y,w)};return Object.assign({data:w,parentKey:M,key:i+"-"+c,x:u+m+O,y:f+v+k,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:nt({x:{facet:!1},y:{facet:!1}},e),axis:nt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:nt({},a,{x:p,y:g})},t)})})}}}),AO=uO(t=>{var e=t["encode"],t=et(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=et(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const LO=()=>t=>{return[uw.of(t).call(xO).call(mO).call(EO).call(AO).call(vO).call(bO).call(SO).value()]},TO=cO(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),PO=cO(t=>({coordinate:{type:"polar"}})),jO=t=>{var e=t["encode"],t=et(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function NO(t){return t=>null}function CO(t){var t=t["points"],[t,e,n,r]=t,i=g0(t,r),t=p0(t,r),r=v0(t,p0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=m0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const RO=()=>t=>{return[uw.of(t).call(xO).call(jO).call(mO).call(PO).call(wO).call(OO,CO,NO,NO,{frame:!1}).call(vO).call(bO).call(TO).value()]};const BO=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=nt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function IO(t,e){if(null!==t)return{type:"column",value:t,field:e}}function FO(t,e){t=IO(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function DO(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function zO(t,e){var n=[];for(const r of t)n[r]=e;return n}function R(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function WO(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R(t,i);if(null!==n)return[n,r]}return[null,null]}function GO(t){return!(t instanceof Date)&&"object"==typeof t}BO.props={};const HO=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y1:FO(zO(t,0))}})]};function VO(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>yf(t));return Array.from(qc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function qO(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Pc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>QO(t=>r(e[t]))):"series"===t?UO:"value"===t?XO:"sum"===t?KO:"maxIndex"===t?ZO:()=>null}function YO(t,e){for(const n of t)n.sort(e)}function $O(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function UO(t,e,n){return QO(t=>n[t])}function XO(t,e,n){return QO(t=>e[t])}function KO(t,n,e){t=O0(t),t=Array.from(qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return QO(t=>r.get(e[t]))}function ZO(t,n,e){t=O0(t),t=Array.from(qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,lu(e,t=>n[t])]));return QO(t=>r.get(e[t]))}function QO(n){return(t,e)=>Pc(n(t),n(e))}HO.props={};const JO=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:P=!1,y:j="y",y1:N="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?WO(r,"series","color"):R(r,"color"),c=VO(L,t,e),n=qO(T)(n,a,r),u=(n&&YO(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){P&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var O=h[A];0<O?r=u[A]=(f[A]=r)+O:u[A]=f[A]=r}}const k=new Set(d),M=new Set(p);r="y"===j?u:f,n="y"===N?u:f;return[t,nt({},e,{encode:{y0:FO(a,o),y:IO(r,o),y1:IO(n,l)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>M.has(e)},i)})]}};function tk(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}JO.props={};const ek=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(tk)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",JO({groupBy:r})(t,e,n))},nk=(ek.props={},(t={})=>{const{channel:a="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(xf(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];const i=Object.keys(n).filter(t=>t.startsWith(a)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);return 0===i.length?[t,e]:[t,nt({},e,{tooltip:{title:t.map(e=>({value:i.map(t=>t[e]).join(", ")}))}})]}}),rk=(nk.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{x:FO(zO(t,0))},scale:{x:{guide:null}}})]}),ik=(rk.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y:FO(zO(t,0))},scale:{y:{guide:null}}})]}),ak=(ik.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{size:DO(zO(t,3))}})]}),ok=(ak.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=et(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,nt({},e,{encode:{key:IO(r)}})]}),sk=(ok.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,nt({},e,{encode:{series:IO(r,i)}})])}),lk=(sk.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(GO)?[t,e]:[t,nt({},e,{encode:{y:IO(n)}})]}),ck=(lk.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(GO)?[t,e]:[t,nt({},e,{encode:{x:IO(n)}})]}),uk=(ck.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,nt({},e,{encode:{y1:IO([...r])}})])}),fk=(uk.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,nt({},e,{encode:{x1:IO([...r])}})])}),hk=(fk.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return xf(n)||({items:r=[]}=n,!r)||0<r.length?[t,e]:(r=(Array.isArray(i)?i:[i]).flatMap(e=>Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,nt({},e,{tooltip:{items:r}})])}}),dk=(hk.props={},()=>(t,e)=>[t,nt({scale:{x:{padding:0},y:{padding:0}}},e)]),pk=(dk.props={},()=>(t,e)=>{var{style:n={}}=e,r=et(e,["data","style"]),{x:i,y:a}=n,n=et(n,["x","y"]);return null==i||null==a?[t,e]:[[0],nt({},r,{data:[0],cartesian:!0,encode:{x:IO([i||0]),y:IO([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),gk=(pk.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),yk=(gk.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(GO)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,nt({},e,{encode:{x:IO(n),y:IO(r)}})])}),mk=(yk.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,nt({},e,{encode:{series:DO(zO(t,void 0))}})]:[t,e]}),vk=(mk.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return et(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=WO(r,"series","color"),o=$O(r,i),i=VO(c,t,e),n=qO(f)(n,a,r),s=(n&&YO(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,nt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:IO(s)}})]}}),bk=(vk.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(qc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[zO(n,r)]:WO(e,"enterDuration",zO(n,r));var[l]=WO(e,"enterDelay",zO(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=su(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,nt({},t,{encode:{enterDuration:DO(s),enterDelay:DO(c)}})]}});bk.props={};const xk=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=et(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=VO(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>cu(t,t=>e[+t]),max:(t,e)=>su(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>gu(t,t=>e[+t]),median:(t,e)=>yu(t,t=>e[+t]),sum:(t,e)=>bu(t,t=>e[+t]),deviation:(t,e)=>Dc(t,t=>e[+t])}[h]||su;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[d]=+u[d]/c}}var h=xf(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,nt({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,IO(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function wk(t,e,n){return null===t?[-.5,.5]:(t=$O(t,e),[-(e=new Tp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function Ok(t,e,n){return e*(1-t)+n*t}xk.props={};const kk=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=wk(a,r,l),s=wk(n,i,c);a=t.map(()=>Ok(u(),...s)),r=t.map(()=>Ok(u(),...o));return[t,nt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:IO(a),dx:IO(r)}})]}},Mk=(kk.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=wk(n,r,a);n=t.map(()=>Ok(o(),...i));return[t,nt({scale:{x:{padding:.5}}},e,{encode:{dx:IO(n)}})]}}),_k=(Mk.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=et(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=VO(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=zc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,nt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,IO(e,R(n,t)[1])]))})]}}),Sk=(_k.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?WO(n,"series","color"):R(n,"color"),VO(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,nt({},e,{encode:{y1:IO(a,i)}})]}});function Ek(t,e){return[t[0]]}function Ak(t,e){return[t[t.length-1]]}function Lk(t,e){return[t[lu(t,t=>e[t])]]}function Tk(t,e){return[t[uu(t,t=>e[t])]]}Sk.props={};const Pk=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=VO(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:Ek,last:Ak,max:Lk,min:Tk}[n]||Ek;return[t.flatMap(t=>i(t,r)),e]}},jk=(Pk.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return Pk(Object.assign({channel:"x",selector:e},t))}),Nk=(jk.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return Pk(Object.assign({channel:"y",selector:e},t))});function Ck(e){return t=>null===t?e:e+" of "+t}function Rk(){return[(t,e)=>gu(t,t=>+e[t]),Ck("mean")]}function Bk(){return[(t,e)=>yu(t,t=>+e[t]),Ck("median")]}function Ik(){return[(t,e)=>su(t,t=>+e[t]),Ck("max")]}function Fk(){return[(t,e)=>cu(t,t=>+e[t]),Ck("min")]}function Dk(){return[(t,e)=>t.length,Ck("count")]}function zk(){return[(t,e)=>bu(t,t=>+e[t]),Ck("sum")]}function Wk(){return[(t,e)=>e[t[0]],Ck("first")]}function Gk(){return[(t,e)=>e[t[t.length-1]],Ck("last")]}Nk.props={};const Hk=(t={})=>{const i=t["groupBy"],a=et(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Rk,max:Ik,count:Dk,first:Wk,last:Gk,sum:zk,min:Fk,median:Bk}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=IO(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,IO(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[O0(c),nt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},Vk=(Hk.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=et(t,["channels"]);return Hk(Object.assign(Object.assign({},e),{groupBy:(t,e)=>VO(n,t,e)}))}),qk=(Vk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),Yk=(qk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),$k=(Yk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channels:["color"]})));function Uk(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=et(n,["reverse","slice","channel"]),o=e["encode"];const[s]=R(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>su(t,t=>+a[t]);if("min"===i)return t=>cu(t,t=>+a[t]);if("sum"===i)return t=>bu(t,t=>+a[t]);if("median"===i)return t=>yu(t,t=>+a[t]);if("mean"===i)return t=>gu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Xc(Yc(o,l,c),([t,e],[n,r])=>Pc(e,r)||Pc(t,n)):Xc(qc(o,c),([t,e],[n,r])=>l(e,r)||Pc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,nt(e,{scale:{[a]:{domain:c}}})]}$k.props={};const Xk=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=et(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return Uk(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=Xc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},Kk=(Xk.props={},(t={})=>Xk(Object.assign(Object.assign({},t),{channel:"x"}))),Zk=(Kk.props={},(t={})=>Xk(Object.assign(Object.assign({},t),{channel:"color"}))),Qk=(Zk.props={},(t={})=>Xk(Object.assign(Object.assign({},t),{channel:"y"})));Qk.props={};const Jk=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=$c(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>bu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,nt({},e,{scale:{x:{flex:r}}})]}};function t3(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=b0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}Jk.props={};const e3=()=>(t,e)=>[t,nt({},e,{modifier:t3,axis:!1})],n3=(e3.props={},"thresholds");function r3(t){var[e,n]=zc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Fc(t))/(3.49*Dc(t)))))}const i3=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=et(t,["groupChannels","binChannels"]),u={};return Hk(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(n3)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=rt(c,n3),o=t.filter(e=>i.every(t=>yf(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(yf).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||r3(n),e=ou().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(qc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},a3=(i3.props={},(t={})=>{var e=t["thresholds"];return i3(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function o3(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function s3(t){if("function"==typeof t)return t;if("lttb"===t)return o3;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[uu(t,t=>n[t])]],max:(t,e,n)=>[t[lu(t,t=>n[t])]],median:(t,e,n)=>{return[t[pu(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}a3.props={};const l3=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=s3(e);return(t,e)=>{var n=e["encode"],t=VO(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},c3=(l3.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(yf);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,nt({},e,{encode:Object.fromEntries(o)})]});function u3(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function f3(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}c3.props={};const h3=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{t.attr("visibility","visible");const i=t.getLocalBounds();n.some(t=>{var e=u3(i),t=u3(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?t.attr("visibility","hidden"):n.push(t)}),t}};function d3(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const p3=t=>{const{maxIterations:O=10,maxError:k=.1,padding:M=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=d3(),[m,v]=d3();var a,o,s,l,[c,t]=d3(),[u,n]=d3();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<O;t++){i.sort((t,e)=>Pc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<M&&(d=(M-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<k)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function g3(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function y3(t,e,n){return.2126*g3(t)+.7152*g3(e)+.0722*g3(n)}function m3(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=y3(t,n,r),n=y3(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function v3(e,t){return t[lu(t,t=>{return m3(e,"object"==typeof(t=t)?t:U.parseColor(t))})]}const b3=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;m3(t.parsedStyle.fill,e)<n&&t.attr("fill",v3(e,r))}),t)},x3=t=>(t,e)=>(t.forEach(t=>{t.attr("visibility","visible");var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(f3(t,e)&&f3(n,e))}(u3(t.getLocalBounds()),e)||t.attr("visibility","hidden")}),t);var T=1e-6,w3=1e-12,E=Math.PI,O3=E/2,k3=E/4,M3=2*E,_3=180/E,S3=E/180,E3=Math.abs,A3=Math.atan,L3=Math.atan2,L=Math.cos,T3=Math.ceil,P3=Math.exp,j3=Math.log,N3=Math.pow,P=Math.sin,C3=Math.sign||function(t){return 0<t?1:t<0?-1:0},R3=Math.sqrt,B3=Math.tan;function I3(t){return 1<t?0:t<-1?E:Math.acos(t)}function F3(t){return 1<t?O3:t<-1?-O3:Math.asin(t)}function D3(){}function z3(t,e){t&&G3.hasOwnProperty(t.type)&&G3[t.type](t,e)}var W3={Feature:function(t,e){z3(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)z3(n[r].geometry,e)}},G3={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){H3(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)H3(n[r],e,0)},Polygon:function(t,e){V3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)V3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)z3(n[r],e)}};function H3(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function V3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)H3(t[n],e,1);e.polygonEnd()}function q3(t,e){t&&W3.hasOwnProperty(t.type)?W3[t.type](t,e):z3(t,e)}function Y3(t){return[L3(t[1],t[0]),F3(t[2])]}function $3(t){var e=t[0],t=t[1],n=L(t);return[n*L(e),n*P(e),P(t)]}function U3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function X3(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function K3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Z3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Q3(t){var e=R3(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function J3(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function tM(t,e){return E3(t)>E&&(t-=Math.round(t/M3)*M3),[t,e]}function eM(t,e,n){return(t%=M3)?e||n?J3(rM(t),iM(e,n)):rM(t):e||n?iM(e,n):tM}function nM(n){return function(t,e){return E3(t+=n)>E&&(t-=Math.round(t/M3)*M3),[t,e]}}function rM(t){var e=nM(t);return e.invert=nM(-t),e}function iM(t,e){var i=L(t),a=P(t),o=L(e),s=P(e);function n(t,e){var n=L(e),r=L(t)*n,t=P(t)*n,n=P(e),e=n*i+r*a;return[L3(t*o-e*s,r*i-n*a),F3(e*o+t*s)]}return n.invert=function(t,e){var n=L(e),r=L(t)*n,t=P(t)*n,n=P(e),e=n*o-t*s;return[L3(t*o+n*s,r*i+e*a),F3(e*i-r*a)]},n}function aM(t,e){(e=$3(e))[0]-=t,Q3(e);t=I3(-e[1]);return((-e[2]<0?-t:t)+M3-T)%M3}function oM(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:D3,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function sM(t,e){return E3(t[0]-e[0])<T&&E3(t[1]-e[1])<T}function lM(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function cM(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(sM(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new lM(r,t,null,!0)),l.push(n.o=new lM(r,null,n,!1)),s.push(n=new lM(i,t,null,!1)),l.push(n.o=new lM(i,null,n,!0))}}),s.length){for(l.sort(e),uM(s),uM(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function uM(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function fM(t){return E3(t[0])<=E?t[0]:C3(t[0])*((E3(t[0])+E)%M3-E)}function hM(y,m,v,b){return function(s){var l,c,u,n=m(s),f=oM(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=mu(c);var t=function(t,e){var n=fM(e),r=e[1],e=P(r),i=[P(n),-L(n),0],a=0,o=0,s=new Wc;1===e?r=O3+T:-1===e&&(r=-O3-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=fM(h),p=h[1]/2+k3,g=P(p),y=L(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=fM(v),x=v[1]/2+k3,w=P(x),x=L(x),O=b-d,k=0<=O?1:-1,M=k*O,_=E<M,S=g*w;s.add(L3(S*k*P(M),y*x+S*L(M))),a+=_?O+k*M3:O,_^n<=d^n<=b&&(Q3(S=X3($3(h),$3(v))),Q3(M=X3(i,S)),(k=(_^0<=O?-1:1)*F3(M[2]))<r||r===k&&(S[0]||S[1]))&&(o+=_^0<=O?1:-1)}return(a<-T||a<T&&s<-w3)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),cM(c,pM,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(dM))}return e}}function dM(t){return 1<t.length}function pM(t,e){return((t=t.x)[0]<0?t[1]-O3-T:O3-t[1])-((e=e.x)[0]<0?e[1]-O3-T:O3-e[1])}tM.invert=tM;var gM=hM(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=E3(t-f);E3(l-E)<T?(c.point(f,h=0<(h+e)/2?O3:-O3),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(E3(f-d)<T&&(f-=d*T),E3(t-s)<T&&(t-=s*T),l=h,i=e,o=P((n=f)-(r=t)),h=E3(o)>T?A3((P(l)*(a=L(i))*P(r)-P(i)*(r=L(l))*P(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*O3,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):E3(t[0]-e[0])>T?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-O3]);function yM(d){var g=L(d),p=6*S3,f=0<g,h=E3(g)>T;function y(t,e){return L(t)*L(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=X3($3(t),$3(e)),h=U3(f,f),d=f[0],p=h-d*d;return p?(r=X3(u,f),K3(u=Z3(u,g*h/p),Z3(f,-g*d/p)),(p=(f=U3(u,h=r))*f-(d=U3(h,h))*(U3(u,u)-1))<0?void 0:(K3(p=Z3(h,(-f-(r=R3(p)))/d),u),p=Y3(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=E3((s=a-i)-E)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(E3(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(K3(c=Z3(h,(-f+r)/d),u),[p,Y3(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return hM(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!sM(o,n)&&!sM(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&sM(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=L(r),c=P(r),u=o*a;null==n?(n=r+o*M3,s=r-u/2):(n=aM(l,n),s=aM(l,s),(0<o?n<s:s<n)&&(n+=o*M3));for(var f,h=n;0<o?s<h:h<s;h-=u)f=Y3([l,-c*L(h),-c*P(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var mM=1e9,vM=-mM;function bM(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function O(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return E3(t[0]-m)<T?0<e?0:3:E3(t[0]-b)<T?0<e?2:1:E3(t[1]-v)<T?0<e?1:0:0<e?3:2}function k(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=oM(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=mu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),O(null,null,1,r),r.lineEnd()),n&&cM(i,k,t,O,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(vM,Math.min(mM,c)),u=Math.max(vM,Math.min(mM,u))],r=[t=Math.max(vM,Math.min(mM,t)),e=Math.max(vM,Math.min(mM,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function xM(t,e,n){var r=vu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function wM(t,e,n){var r=vu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function OM(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=xM(s,o,90),f=wM(r,n,v),h=xM(c,l,90),d=wM(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return vu(T3(a/y)*y,i,y).map(h).concat(vu(T3(c/m)*m,l,m).map(d)).concat(vu(T3(r/p)*p,n,p).filter(function(t){return E3(t%y)>T}).map(u)).concat(vu(T3(s/g)*g,o,g).filter(function(t){return E3(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var kM,MM,_M,SM,EM=t=>t,AM=new Wc,LM=new Wc,TM={point:D3,lineStart:D3,lineEnd:D3,polygonStart:function(){TM.lineStart=PM,TM.lineEnd=CM},polygonEnd:function(){TM.lineStart=TM.lineEnd=TM.point=D3,AM.add(E3(LM)),LM=new Wc},result:function(){var t=AM/2;return AM=new Wc,t}};function PM(){TM.point=jM}function jM(t,e){TM.point=NM,kM=_M=t,MM=SM=e}function NM(t,e){LM.add(SM*t-_M*e),_M=t,SM=e}function CM(){NM(kM,MM)}var RM=TM,BM=1/0,IM=BM,FM=-BM,DM=FM;var zM,WM,GM,HM,VM={point:function(t,e){t<BM&&(BM=t);FM<t&&(FM=t);e<IM&&(IM=e);DM<e&&(DM=e)},lineStart:D3,lineEnd:D3,polygonStart:D3,polygonEnd:D3,result:function(){var t=[[BM,IM],[FM,DM]];return FM=DM=-(IM=BM=1/0),t}},qM=0,YM=0,$M=0,UM=0,XM=0,KM=0,ZM=0,QM=0,JM=0,t4={point:e4,lineStart:n4,lineEnd:a4,polygonStart:function(){t4.lineStart=o4,t4.lineEnd=s4},polygonEnd:function(){t4.point=e4,t4.lineStart=n4,t4.lineEnd=a4},result:function(){var t=JM?[ZM/JM,QM/JM]:KM?[UM/KM,XM/KM]:$M?[qM/$M,YM/$M]:[NaN,NaN];return qM=YM=$M=UM=XM=KM=ZM=QM=JM=0,t}};function e4(t,e){qM+=t,YM+=e,++$M}function n4(){t4.point=r4}function r4(t,e){t4.point=i4,e4(GM=t,HM=e)}function i4(t,e){var n=t-GM,r=e-HM,n=R3(n*n+r*r);UM+=n*(GM+t)/2,XM+=n*(HM+e)/2,KM+=n,e4(GM=t,HM=e)}function a4(){t4.point=e4}function o4(){t4.point=l4}function s4(){c4(zM,WM)}function l4(t,e){t4.point=c4,e4(zM=GM=t,WM=HM=e)}function c4(t,e){var n=t-GM,r=e-HM,n=R3(n*n+r*r);UM+=n*(GM+t)/2,XM+=n*(HM+e)/2,KM+=n,ZM+=(n=HM*t-GM*e)*(GM+t),QM+=n*(HM+e),JM+=3*n,e4(GM=t,HM=e)}var u4=t4;function f4(t){this._context=t}f4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,M3)}},result:D3};var h4,d4,p4,g4,y4,m4=new Wc,v4={point:D3,lineStart:function(){v4.point=b4},lineEnd:function(){h4&&x4(d4,p4),v4.point=D3},polygonStart:function(){h4=!0},polygonEnd:function(){h4=null},result:function(){var t=+m4;return m4=new Wc,t}};function b4(t,e){v4.point=x4,d4=g4=t,p4=y4=e}function x4(t,e){g4-=t,y4-=e,m4.add(R3(g4*g4+y4*y4)),g4=t,y4=e}var w4=v4;let O4,k4,M4,_4;class S4{constructor(t){this._append=null==t?E4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return E4;if(e!==O4){const r=10**e;O4=e,k4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return k4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===M4&&this._append===k4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,M4=n,k4=this._append,_4=this._,this._=r),this._+=_4}}result(){var t=this._;return this._="",t.length?t:null}}function E4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function A4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),q3(t,a(o))),o.result()}return s.area=function(t){return q3(t,a(RM)),RM.result()},s.measure=function(t){return q3(t,a(w4)),w4.result()},s.bounds=function(t){return q3(t,a(VM)),VM.result()},s.centroid=function(t){return q3(t,a(u4)),u4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,EM):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new S4(r)):new f4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new S4(r)),s},s.projection(e).digits(r).context(n)}function L4(r){return function(t){var e,n=new T4;for(e in r)n[e]=r[e];return n.stream=t,n}}function T4(){}function P4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),q3(n,t.stream(VM)),e(VM.result()),null!=r&&t.clipExtent(r),t}function j4(i,a,t){return P4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function N4(t,e,n){return j4(t,[[0,0],e],n)}function C4(r,i,t){return P4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function R4(i,a,t){return P4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}T4.prototype={constructor:T4,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var B4=16,I4=L(30*S3);function F4(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=$3([t,e]),e=E(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],B4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,B4,r),g.lineEnd=m,m()}return g}):(n=t,L4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,O,k,M=o-t,_=s-e,S=M*M+_*_;4*A<S&&h--&&(y=a+f,x=F3(y/=m=R3((p=r+c)*p+(g=i+u)*g+y*y)),v=E3(E3(y)-1)<T||E3(n-l)<T?(n+l)/2:L3(g,p),b=(x=E(v,x))[0],x=x[1],A<(k=_*(w=b-t)-M*(O=x-e))*k/S||.3<E3((M*w+_*O)/S-.5)||r*c+i*u+a*f<I4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var D4=L4({point:function(t,e){this.stream.point(t*S3,e*S3)}});function z4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=L(e),e=P(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function W4(t){return G4(function(){return t})()}function G4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,O=null,k=gM,M=null,_=EM,S=.5;function E(t){return l(t[0]*S3,t[1]*S3)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*_3,t[1]*_3]}function L(){var t=z4(f,0,0,x,w,b).apply(null,e(p,g)),t=z4(f,h-t[0],d-t[1],x,w,b);return r=eM(y,m,v),s=J3(e,t),l=J3(r,s),o=F4(s,S),T()}function T(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=D4((n=r,L4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(k(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(k=t,O=void 0,T()):k},E.postclip=function(t){return arguments.length?(_=t,M=n=i=a=null,T()):_},E.clipAngle=function(t){return arguments.length?(k=+t?yM(O=t*S3):(O=null,gM),T()):O*_3},E.clipExtent=function(t){return arguments.length?(_=null==t?(M=n=i=a=null,EM):bM(M=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==M?null:[[M,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,L()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*S3,g=t[1]%360*S3,L()):[p*_3,g*_3]},E.rotate=function(t){return arguments.length?(y=t[0]%360*S3,m=t[1]%360*S3,v=2<t.length?t[2]%360*S3:0,L()):[y*_3,m*_3,v*_3]},E.angle=function(t){return arguments.length?(b=t%360*S3,L()):b*_3},E.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},E.precision=function(t){return arguments.length?(o=F4(s,S=t*t),T()):R3(S)},E.fitExtent=function(t,e){return j4(E,t,e)},E.fitSize=function(t,e){return N4(E,t,e)},E.fitWidth=function(t,e){return C4(E,t,e)},E.fitHeight=function(t,e){return R4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,L()}}function H4(t){var e=0,n=E/3,r=G4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*S3,n=t[1]*S3):[e*_3,n*_3]},t}function V4(t,e){var n,r,i,a=P(t),o=(a+P(e))/2;return E3(o)<T?(n=L(t),s.invert=function(t,e){return[t/n,F3(e*n)]},s):(i=R3(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=L3(t,E3(e))*C3(e);return e*o<0&&(n-=E*C3(t)*C3(e)),[n/o,F3((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,P(e)/n]}function l(t,e){e=R3(r-2*o*P(e))/o;return[e*P(t*=o),i-e*L(t)]}}function q4(){return H4(V4).scale(155.424).center([0,33.6442])}function Y4(){return q4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $4(i){return function(t,e){var n=L(t),r=L(e),n=i(n*r);return n===1/0?[2,0]:[n*r*P(t),n*P(e)]}}function U4(a){return function(t,e){var n=R3(t*t+e*e),r=a(n),i=P(r),r=L(r);return[L3(t*i,n*r),F3(n&&e*i/n)]}}var X4=$4(function(t){return R3(2/(1+t))});X4.invert=U4(function(t){return 2*F3(t/2)});var K4=$4(function(t){return(t=I3(t))&&t/P(t)});function Z4(t,e){return[t,j3(B3((O3+e)/2))]}function Q4(r){var i,a,o,s=W4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=eM((e=s.rotate())[0]*S3,e[1]*S3,2<e.length?e[2]*S3:0),function(t){return(t=e.invert(t[0]*S3,t[1]*S3))[0]*=_3,t[1]*=_3,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===Z4?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function J4(t){return B3((O3+t)/2)}function t6(t,e){var n=L(t),i=t===e?P(t):j3(n/L(e))/j3(J4(e)/J4(t)),a=n*N3(J4(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=C3(i)*R3(t*t+e*e),r=L3(t,E3(e))*C3(e);return e*i<0&&(r-=E*C3(t)*C3(e)),[r/i,2*A3(N3(a/n,1/i))-O3]},r):Z4;function r(t,e){0<a?e<-O3+T&&(e=-O3+T):O3-T<e&&(e=O3-T);e=a/N3(J4(e),i);return[e*P(i*t),a-e*L(i*t)]}}function e6(t,e){return[t,e]}function n6(t,e){var n=L(t),r=t===e?P(t):(n-L(e))/(e-t),i=n/r+t;return E3(r)<T?e6:(a.invert=function(t,e){var e=i-e,n=L3(t,E3(e))*C3(e);return e*r<0&&(n-=E*C3(t)*C3(e)),[n/r,i-C3(r)*R3(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*P(t),i-e*L(t)]}}K4.invert=U4(function(t){return t}),Z4.invert=function(t,e){return[t,2*A3(P3(e))-O3]},e6.invert=e6;var r6=1.340264,i6=-.081106,a6=893e-6,o6=.003796,s6=R3(3)/2;function l6(t,e){var e=F3(s6*P(e)),n=e*e,r=n*n*n;return[t*L(e)/(s6*(r6+3*i6*n+r*(7*a6+9*o6*n))),e*(r6+i6*n+r*(a6+o6*n))]}function c6(t,e){var n=L(e),r=L(t)*n;return[n*P(t)/r,P(e)/r]}function u6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function f6(t,e){return[L(e)*P(t),P(e)]}function h6(t,e){var n=L(e),r=1+L(t)*n;return[n*P(t)/r,P(e)/r]}function d6(t,e){return[j3(B3((O3+e)/2)),-t]}l6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(r6+i6*i+a*(a6+o6*i))-e)/(r6+3*i6*i+a*(7*a6+9*o6*i)))*r)*i*i,!(E3(n)<w3));++o);return[s6*t*(r6+3*i6*i+a*(7*a6+9*o6*i))/L(r),F3(P(r)/s6)]},c6.invert=U4(A3),u6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),E3(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},f6.invert=U4(F3),h6.invert=U4(function(t){return 2*A3(t)}),d6.invert=function(t,e){return[-e,2*A3(P3(t))-O3]};var p6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=Y4(),l=q4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=q4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return j4(f,t,e)},f.fitSize=function(t,e){return N4(f,t,e)},f.fitWidth=function(t,e){return C4(f,t,e)},f.fitHeight=function(t,e){return R4(f,t,e)},f.scale(1070)},geoAlbers:Y4,geoAzimuthalEqualArea:function(){return W4(X4).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:X4,geoAzimuthalEquidistant:function(){return W4(K4).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:K4,geoConicConformal:function(){return H4(t6).scale(109.5).parallels([30,30])},geoConicConformalRaw:t6,geoConicEqualArea:q4,geoConicEqualAreaRaw:V4,geoConicEquidistant:function(){return H4(n6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:n6,geoEqualEarth:function(){return W4(l6).scale(177.158)},geoEqualEarthRaw:l6,geoEquirectangular:function(){return W4(e6).scale(152.63)},geoEquirectangularRaw:e6,geoGnomonic:function(){return W4(c6).scale(144.049).clipAngle(60)},geoGnomonicRaw:c6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=L4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=EM;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,EM):bM(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=P(d=t%360*S3),r=L(d),b()):d*_3},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return j4(x,t,e)},x.fitSize=function(t,e){return N4(x,t,e)},x.fitWidth=function(t,e){return C4(x,t,e)},x.fitHeight=function(t,e){return R4(x,t,e)},x},geoProjection:W4,geoProjectionMutator:G4,geoMercator:function(){return Q4(Z4).scale(961/M3)},geoMercatorRaw:Z4,geoNaturalEarth1:function(){return W4(u6).scale(175.295)},geoNaturalEarth1Raw:u6,geoOrthographic:function(){return W4(f6).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:f6,geoStereographic:function(){return W4(h6).scale(250).clipAngle(142)},geoStereographicRaw:h6,geoTransverseMercator:function(){var t=Q4(d6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:d6});function g6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function y6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(v6),e.find(t=>t.sphere)?{type:"Sphere"}:g6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=A4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function m6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[OM()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function v6(t){return"geoPath"===t.type}var b6,ga=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=et(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Hs(t);if(e=p6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(m6);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(y6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=A4(i);const u=new Gp({domain:[t,t+n]}),f=new Gp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return v6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:Of(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)})})):t})})]},ya=(ga.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=et(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});ya.props={};const x6={"composition.geoView":ga,"composition.geoPath":ya};function w6(){return Object.assign({"data.fetch":$h,"data.inline":td,"data.sortBy":Jh,"data.sort":Kh,"data.filter":Xh,"data.pick":Zh,"data.rename":Qh,"data.fold":Uh,"data.slice":Ld,"data.custom":ed,"data.map":nd,"data.cluster":jh,"data.tree":Nh,"data.sankey":ff,"data.arc":od,"data.wordCloud":Sd,"data.join":Ad,"transform.maybeZeroY1":HO,"transform.maybeZeroX":rk,"transform.maybeStackY":ek,"transform.maybeTitle":nk,"transform.maybeSeries":sk,"transform.maybeZeroPadding":dk,"transform.stackY":JO,"transform.binX":a3,"transform.bin":i3,"transform.dodgeX":vk,"transform.jitter":kk,"transform.jitterX":Mk,"transform.symmetryY":_k,"transform.diffY":Sk,"transform.stackEnter":bk,"transform.normalizeY":xk,"transform.select":Pk,"transform.selectX":jk,"transform.selectY":Nk,"transform.groupX":qk,"transform.groupY":Yk,"transform.groupColor":$k,"transform.group":Vk,"transform.maybeSize":ak,"transform.maybeZeroY":ik,"transform.maybeKey":ok,"transform.sortX":Kk,"transform.sortY":Qk,"transform.sortColor":Zk,"transform.flexX":Jk,"transform.maybeTupleY":lk,"transform.maybeTupleX":ck,"transform.maybeIdentityY":uk,"transform.maybeIdentityX":fk,"transform.maybeTuple":yk,"transform.maybeVisualPosition":pk,"transform.maybeFunctionAttribute":gk,"transform.maybeGradient":mk,"transform.maybeTooltip":hk,"transform.pack":e3,"transform.sample":l3,"transform.filter":c3,"coordinate.cartesian":tl,"coordinate.polar":nl,"coordinate.helix":rl,"coordinate.transpose":il,"coordinate.theta":al,"coordinate.parallel":ll,"coordinate.fisheye":cl,"coordinate.radial":sl,"coordinate.radar":ul,"encode.constant":fl,"encode.field":dl,"encode.transform":hl,"encode.column":pl,"mark.interval":Lc,"mark.rect":Tc,"mark.line":Pu,"mark.point":ju,"mark.text":Nu,"mark.cell":Cu,"mark.area":Ru,"mark.link":Bu,"mark.image":Iu,"mark.polygon":Fu,"mark.box":Du,"mark.vector":zu,"mark.lineX":Gu,"mark.lineY":Wu,"mark.connector":Hu,"mark.range":Yu,"mark.rangeX":$u,"mark.rangeY":Uu,"mark.sankey":_f,"mark.path":Sf,"mark.treemap":Pf,"mark.pack":jf,"mark.boxplot":Wf,"mark.shape":Gf,"mark.forceGraph":Th,"mark.gauge":I0,"mark.tree":Ch,"mark.wordCloud":Td,"palette.category10":F0,"palette.category20":D0,"scale.linear":W0,"scale.ordinal":G0,"scale.band":z0,"scale.identity":H0,"scale.point":V0,"scale.time":q0,"scale.log":Y0,"scale.pow":$0,"scale.sqrt":Z0,"scale.threshold":U0,"scale.quantile":X0,"scale.quantize":K0,"scale.sequential":Q0,"scale.constant":J0,"shape.interval.rect":ng,"shape.interval.hollow":rg,"shape.interval.funnel":ig,"shape.interval.pyramid":og,"shape.rect.rect":ng,"shape.rect.hollow":rg,"shape.cell.cell":ng,"shape.cell.hollow":rg,"shape.line.line":ug,"shape.line.hv":hg,"shape.line.vh":dg,"shape.line.hvh":pg,"shape.line.smooth":fg,"shape.point.bowtie":vg,"shape.point.cross":bg,"shape.point.diamond":xg,"shape.point.hexagon":wg,"shape.point.hollowBowtie":Og,"shape.point.hollowDiamond":kg,"shape.point.hollowHexagon":Mg,"shape.point.hollow":_g,"shape.point.hollowSquare":Sg,"shape.point.hollowTriangle":Eg,"shape.point.hollowTriangleDown":Ag,"shape.point.hyphen":Lg,"shape.point.line":Tg,"shape.point.plus":Pg,"shape.point.point":jg,"shape.point.square":Ng,"shape.point.tick":Cg,"shape.point.triangle":Rg,"shape.point.triangleDown":Bg,"shape.text.text":S2,"shape.area.area":P2,"shape.area.smooth":j2,"shape.area.hvh":N2,"shape.area.vh":C2,"shape.area.hv":R2,"shape.link.smooth":I2,"shape.link.vhv":F2,"shape.link.arc":D2,"shape.link.link":B2,"shape.image.image":z2,"shape.polygon.polygon":W2,"shape.polygon.ribbon":G2,"shape.box.box":H2,"shape.vector.vector":Ig,"shape.label.label":ox,"shape.text.badge":A2,"shape.lineX.line":V2,"shape.lineY.line":V2,"shape.shape.shape":ux,"shape.connector.connector":$2,"shape.range.range":ng,"shape.rangeX.range":ng,"shape.rangeY.range":ng,"shape.path.path":lx,"shape.path.hollow":cx,"theme.light":hx,"theme.dark":dx,"theme.academy":gx,"component.axisX":Wx,"component.axisY":Gx,"component.axisRadar":Hx,"component.axisLinear":Dx,"component.axisArc":zx,"component.legendCategory":$x,"component.legendContinuous":Ux,"component.legendContinuousBlock":Xx,"component.legendContinuousBlockSize":Kx,"component.legendContinuousSize":Zx,"component.title":tw,"component.sliderX":aw,"component.sliderY":ow,"component.scrollbarX":lw,"component.scrollbarY":cw,"animation.scaleInX":gw,"animation.scaleOutX":yw,"animation.scaleInY":mw,"animation.scaleOutY":vw,"animation.waveIn":Aw,"animation.fadeIn":bw,"animation.fadeOut":xw,"animation.zoomIn":Lw,"animation.zoomOut":Tw,"animation.pathIn":Pw,"animation.morphing":Ew,"animation.growInX":jw,"animation.growInY":Nw,"interaction.elementHighlight":Zw,"interaction.elementHighlightByX":Qw,"interaction.elementHighlightByColor":Jw,"interaction.elementSelect":e5,"interaction.elementSelectByX":n5,"interaction.elementSelectByColor":r5,"interaction.fisheye":a5,"interaction.chartIndex":i5,"interaction.tooltip":x5,"interaction.legendFilter":j5,"interaction.legendHighlight":N5,"interaction.brushHighlight":I5,"interaction.brushXHighlight":D5,"interaction.brushYHighlight":W5,"interaction.brushAxisHighlight":K5,"interaction.brushFilter":Q5,"interaction.brushXFilter":J5,"interaction.brushYFilter":tO,"interaction.sliderFilter":nO,"interaction.poptip":aO,"interaction.event":lO,"composition.spaceLayer":hO,"composition.spaceFlex":dO,"composition.mark":gO,"composition.view":pO,"composition.facetRect":_O,"composition.repeatMatrix":LO,"composition.facetCircle":RO,"composition.timingKeyframe":BO,"labelTransform.overlapHide":h3,"labelTransform.overlapDodgeY":p3,"labelTransform.overflowHide":x3,"labelTransform.contrastReverse":b3},x6)}function O6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}(va=b6=b6||{}).BEFORE_RENDER="beforerender",va.AFTER_RENDER="afterrender",va.BEFORE_PAINT="beforepaint",va.AFTER_PAINT="afterpaint",va.BEFORE_CHANGE_DATA="beforechangedata",va.AFTER_CHANGE_DATA="afterchangedata",va.BEFORE_CLEAR="beforeclear",va.AFTER_CLEAR="afterclear",va.BEFORE_DESTROY="beforedestroy",va.AFTER_DESTROY="afterdestroy",va.BEFORE_CHANGE_SIZE="beforechangesize",va.AFTER_CHANGE_SIZE="afterchangesize";function k6(t,e,n,r,i){var a=t[0],t=t[1],o=J();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function M6(t,e,n,r,i){var a=new Gp({range:[e,e+r]}),o=new Gp({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function _6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function S6(t,e,n,r,i){return t[0]}function E6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Gp({range:[s,t]}),c=new Gp({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function A6(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function L6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return R6.apply(void 0,B6([[-1,-1]],e,!1))}function T6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return R6.apply(void 0,B6([[-1,1]],e,!1))}function P6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return R6.apply(void 0,B6([[1,-1]],e,!1))}function j6(t,e,n,r,i){var a,t=t[0],o=J();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function N6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Gp({range:[s,s+.99*l]}),f=new Gp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function C6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Gp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Hp({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var R6=function(t,e,n,r,i){var a=t[0],t=t[1],o=J();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},B6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function I6(t){return 1/Math.tan(t)}function F6(t,e,n,r,i){var a=I6(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function D6(t,e,n,r,i){var a=I6(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function z6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function W6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function G6(t,e,n){return n?new Gp({range:[0,1],domain:[0,e]}).map(t):t}function H6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=G6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[z6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[W6(e,s,o,0,1),t]}}}function V6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=G6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],z6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],W6(t[1],s,o,0,1)]}}}function q6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=G6(a,r,t=void 0!==t&&t),u=G6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[z6(e,c,s,0,1),z6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[W6(e,c,s,0,1),W6(t,u,l,0,1)]}}}function Y6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Gp({range:[0,r]}),u=new Gp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=z6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=W6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var $6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},U6=(X6.prototype.update=function(t){this.options=nt({},this.options,t),this.recoordinate()},X6.prototype.clone=function(){return new X6(this.options)},X6.prototype.getOptions=function(){return this.options},X6.prototype.clear=function(){this.update({transformations:[]})},X6.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},X6.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},X6.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:$6($6([],n,!0),[$6([],t,!0)],!1)}),this},X6.prototype.map=function(t){return this.output(t)},X6.prototype.invert=function(t){return this.input(t)},X6.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},X6.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?$6([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p($6([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Ys,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Ys}.apply(void 0,a)},X6.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=J();return e&&t.reverse(),t.forEach(function(t){return tt(p,p,t)}),e&&(e=t=p,(d=new Q(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},X6);function X6(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:M6,translate:k6,custom:_6,matrix:S6,polar:E6,transpose:A6,scale:R6,"shear.x":F6,"shear.y":D6,reflect:L6,"reflect.x":T6,"reflect.y":P6,rotate:j6,helix:N6,parallel:C6,fisheye:q6,"fisheye.x":H6,"fisheye.y":V6,"fisheye.circular":Y6},this.update(t)}function K6(t,e){var{coordinate:n={}}=t,t=et(t,["coordinate"]),{type:r,transform:i=[]}=n,n=et(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=Vx("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function Z6(t,e){return t.filter(t=>t.type===e)}function Q6(t){return 0<Z6(t,"polar").length}function J6(t){return Z6(t,"transpose").length%2==1}function t_(t){return 0<Z6(t,"theta").length}function e_(t){return 0<Z6(t,"radial").length}function g(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}ma=g("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ba=g("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),u=g("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xa=g("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),fa=g("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),l=g("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),fs=g("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ma=g("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),gs=g("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),ds=g("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function n_(t,e,n){(t.prototype=e.prototype=n).constructor=t}function r_(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function i_(){}var a_=1/.7,xs="\\s*([+-]?\\d+)\\s*",la="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o_=/^#([0-9a-f]{3,8})$/,s_=new RegExp(`^rgb\\(${xs},${xs},${xs}\\)$`),l_=new RegExp(`^rgb\\(${cc},${cc},${cc}\\)$`),c_=new RegExp(`^rgba\\(${xs},${xs},${xs},${la}\\)$`),u_=new RegExp(`^rgba\\(${cc},${cc},${cc},${la}\\)$`),f_=new RegExp(`^hsl\\(${la},${cc},${cc}\\)$`),h_=new RegExp(`^hsla\\(${la},${cc},${cc},${la}\\)$`),d_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function p_(){return this.rgb().formatHex()}function g_(){return this.rgb().formatRgb()}function y_(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=o_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?m_(e):3===n?new w_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?v_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?v_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s_.exec(t))?new w_(e[1],e[2],e[3],1):(e=l_.exec(t))?new w_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c_.exec(t))?v_(e[1],e[2],e[3],e[4]):(e=u_.exec(t))?v_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=f_.exec(t))?E_(e[1],e[2]/100,e[3]/100,1):(e=h_.exec(t))?E_(e[1],e[2]/100,e[3]/100,e[4]):d_.hasOwnProperty(t)?m_(d_[t]):"transparent"===t?new w_(NaN,NaN,NaN,0):null}function m_(t){return new w_(t>>16&255,t>>8&255,255&t,1)}function v_(t,e,n,r){return new w_(t=r<=0?e=n=NaN:t,e,n,r)}function b_(t){return(t=t instanceof i_?t:y_(t))?new w_((t=t.rgb()).r,t.g,t.b,t.opacity):new w_}function x_(t,e,n,r){return 1===arguments.length?b_(t):new w_(t,e,n,null==r?1:r)}function w_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function O_(){return"#"+S_(this.r)+S_(this.g)+S_(this.b)}function k_(){var t=M_(this.opacity);return(1===t?"rgb(":"rgba(")+__(this.r)+`, ${__(this.g)}, `+__(this.b)+(1===t?")":`, ${t})`)}function M_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function __(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function S_(t){return((t=__(t))<16?"0":"")+t.toString(16)}function E_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new L_(t,e,n,r)}function A_(t){var e,n,r,i,a,o,s,l;return t instanceof L_?new L_(t.h,t.s,t.l,t.opacity):(t=t instanceof i_?t:y_(t))?t instanceof L_?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new L_(o,s,l,t.opacity)):new L_}function L_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function T_(t){return(t=(t||0)%360)<0?t+360:t}function P_(t){return Math.max(0,Math.min(1,t||0))}function j_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}n_(i_,y_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:p_,formatHex:p_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return A_(this).formatHsl()},formatRgb:g_,toString:g_}),n_(w_,x_,r_(i_,{brighter(t){return t=null==t?a_:Math.pow(a_,t),new w_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new w_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new w_(__(this.r),__(this.g),__(this.b),M_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:O_,formatHex:O_,formatHex8:function(){return"#"+S_(this.r)+S_(this.g)+S_(this.b)+S_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:k_,toString:k_})),n_(L_,function(t,e,n,r){return 1===arguments.length?A_(t):new L_(t,e,n,null==r?1:r)},r_(i_,{brighter(t){return t=null==t?a_:Math.pow(a_,t),new L_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new L_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new w_(j_(240<=t?t-240:120+t,n,e),j_(t,n,e),j_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new L_(T_(this.h),P_(this.s),P_(this.l),M_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=M_(this.opacity);return(1===t?"hsl(":"hsla(")+T_(this.h)+`, ${100*P_(this.s)}%, ${100*P_(this.l)}%`+(1===t?")":`, ${t})`)}}));const N_=Math.PI/180,C_=180/Math.PI;var R_=1.78277,B_=-.29227,I_=-.90649,F_=1.97294,D_=F_*I_,z_=F_*R_,W_=R_*B_- -.14861*I_;function G_(t,e,n,r){return 1===arguments.length?(i=t)instanceof H_?new H_(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof w_?i:b_(i)).r/255,o=i.g/255,l=i.b/255,l=(F_*(o-(a=(W_*l+D_*a-z_*o)/(W_+D_-z_)))-B_*(o=l-a))/I_,new H_((l=(s=Math.sqrt(l*l+o*o)/(F_*a*(1-a)))?Math.atan2(l,o)*C_-120:NaN)<0?l+360:l,s,a,i.opacity)):new H_(t,e,n,null==r?1:r);var i,a,o,s,l}function H_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}n_(H_,G_,r_(i_,{brighter(t){return t=null==t?a_:Math.pow(a_,t),new H_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new H_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*N_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new w_(255*(e+n*(-.14861*r+R_*t)),255*(e+n*(B_*r+I_*t)),255*(e+F_*r*n),this.opacity)}}));var V_=t=>()=>t;function q_(e,n){return function(t){return e+t*n}}function Y_(a){return 1==(a=+a)?$_:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):V_(isNaN(t)?e:t);var n,r,i}}function $_(t,e){var n=e-t;return n?q_(t,n):V_(isNaN(t)?e:t)}!function t(e){var o=Y_(e);function n(e,t){var n=o((e=x_(e)).r,(t=x_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=$_(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);U_=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var U_,X_=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=x_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=U_(r),i=U_(i),a=U_(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function K_(s){return function t(o){function e(e,t){var n=s((e=G_(e)).h,(t=G_(t)).h),r=$_(e.s,t.s),i=$_(e.l,t.l),a=$_(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}K_(function(t,e){var n=e-t;return n?q_(t,180<n||n<-180?n-360*Math.round(n/360):n):V_(isNaN(t)?e:t)});var r=K_($_),o=t=>X_(t[t.length-1]),as=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(g),us=o(as),Sa=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(g),ss=o(Sa),Hb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(g),ls=o(Hb),e=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(g),n=o(e),os=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(g),aa=o(os),ca=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(g),cs=o(ca),ua=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(g),a=o(ua),c=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(g),da=o(c),ha=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(g),pa=o(ha),ga=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(g),ya=o(ga),va=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(g),xs=o(va),cc=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(g),la=o(cc),Z_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(g),Q_=o(Z_),J_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(g),t8=o(J_),e8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(g),n8=o(e8),r8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(g),i8=o(r8),a8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(g),o8=o(a8),s8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(g),l8=o(s8),c8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(g),u8=o(c8),f8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(g),h8=o(f8),d8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(g),p8=o(d8),g8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(g),y8=o(g8),m8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(g),v8=o(m8),b8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(g),x8=o(b8),w8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(g),O8=o(w8),k8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(g),M8=o(k8),_8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(g),o=o(_8);var S8=r(G_(300,.5,0),G_(-240,.5,1)),E8=r(G_(-100,.75,.35),G_(80,1.5,.8)),r=r(G_(260,.75,.35),G_(80,1.5,.8)),A8=G_();var L8=x_(),T8=Math.PI/3,P8=2*Math.PI/3;function j8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var N8=j8(g("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),C8=j8(g("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),R8=j8(g("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),B8=j8(g("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),I8=Object.freeze({__proto__:null,schemeCategory10:ma,schemeAccent:ba,schemeDark2:u,schemePaired:xa,schemePastel1:fa,schemePastel2:l,schemeSet1:fs,schemeSet2:Ma,schemeSet3:gs,schemeTableau10:ds,interpolateBrBG:us,schemeBrBG:as,interpolatePRGn:ss,schemePRGn:Sa,interpolatePiYG:ls,schemePiYG:Hb,interpolatePuOr:n,schemePuOr:e,interpolateRdBu:aa,schemeRdBu:os,interpolateRdGy:cs,schemeRdGy:ca,interpolateRdYlBu:a,schemeRdYlBu:ua,interpolateRdYlGn:da,schemeRdYlGn:c,interpolateSpectral:pa,schemeSpectral:ha,interpolateBuGn:ya,schemeBuGn:ga,interpolateBuPu:xs,schemeBuPu:va,interpolateGnBu:la,schemeGnBu:cc,interpolateOrRd:Q_,schemeOrRd:Z_,interpolatePuBuGn:t8,schemePuBuGn:J_,interpolatePuBu:n8,schemePuBu:e8,interpolatePuRd:i8,schemePuRd:r8,interpolateRdPu:o8,schemeRdPu:a8,interpolateYlGnBu:l8,schemeYlGnBu:s8,interpolateYlGn:u8,schemeYlGn:c8,interpolateYlOrBr:h8,schemeYlOrBr:f8,interpolateYlOrRd:p8,schemeYlOrRd:d8,interpolateBlues:y8,schemeBlues:g8,interpolateGreens:v8,schemeGreens:m8,interpolateGreys:x8,schemeGreys:b8,interpolatePurples:O8,schemePurples:w8,interpolateReds:M8,schemeReds:k8,interpolateOranges:o,schemeOranges:_8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:S8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return A8.h=360*t-100,A8.s=1.5-1.5*e,A8.l=.8-.9*e,A8+""},interpolateWarm:E8,interpolateCool:r,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,L8.r=255*(e=Math.sin(t))*e,L8.g=255*(e=Math.sin(t+T8))*e,L8.b=255*(e=Math.sin(t+P8))*e,L8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:N8,interpolateMagma:C8,interpolateInferno:R8,interpolatePlasma:B8});function F8(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return X8(t,bf)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?V8(t):void 0===r?$8(e)?V8(t):U8(e)?"time":q8(t,i):$8([r])?V8(t):U8(e)?"time":q8(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)yf(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return Y8(e);case"quantile":return function(t){return Y8(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)yf(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=vp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:t_(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Hs(e),i=I8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=H8(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return H8(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function D8(t,e){var[e]=Vx("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[hf,hf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function z8(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(W8)?zc(e):t.every(G8)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function W8(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function G8(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function H8(t,e,n,r,i){var[i]=Vx("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Hs(t),i=I8["scheme"+e],a=I8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function V8(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function q8(t,e){return"color"!==t||e?"linear":"sequential"}function Y8(t){return Array.from(new Set(t.flat()))}function $8(t){return X8(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function U8(t){return X8(t,t=>t instanceof Date)}function X8(t,e){for(const n of t)if(n.some(e))return!0;return!1}const K8={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},Z8={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Q8={ordinal:"ordinal",band:"band",point:"point"},J8={constant:"constant"};function tS(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=Vx("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=Vx("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?J6(i)?t+"Y":t+"X":"y"===e?J6(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){t=t.filter(t=>"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)),t=new Map(Array.from(qc(t,t=>t.field||"__internal_unset__")).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===t.size)return[];const l=(t,e)=>{t=_0(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",(()=>{var t=[["shape","discrete"],["shape","constant"]],e=[["size","constant"]],n=[["opacity","discrete"],["opacity","constant"]],r=[];for(const i of[["color","discrete"],["color","constant"]])for(const a of t)for(const o of e)for(const s of n)[i,a,o,s].every(t=>"constant"===t[1])||r.push(...l([a,o,s],i));return r.sort((t,e)=>e.length-t.length)})()],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",l([["opacity","continuous"]],["color","distribution"])],["legendContinuous",l([["opacity","continuous"]],["color","continuous"])]];t=Array.from(t).map(([,t])=>{var e,n,r=_0(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in K8?"continuous":t in Q8?"discrete":t in Z8?"distribution":t in J8?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>Xs(i(t),i(a))))return[e,o];return null}).filter(yf);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<Z6(n,"helix").length||t_(n))&&(!J6(n)||!Q6(n)&&!e_(n))){if(e.startsWith("x"))return Q6(n)?["axisArc",[t]]:e_(n)?["axisLinear",[t]]:[J6(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return Q6(n)?["axisLinear",[t]]:e_(n)?["axisArc",[t]]:[J6(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<Z6(n,"radar").length)return["axisRadar",[t]];if(!Q6(n))return["axisY",[t]]}}return null}).filter(yf)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=nS(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=rS(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=nS(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<Z6(t,"parallel").length}(i))return null===(s=rS(n))?e:J6(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=nS(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(Q6(i))return["center",null];if(e_(i))return["center",null];if("axisX"===t&&function(t){return 0<Z6(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<Z6(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&Q6(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function eS(t,e,n,r){var[i]=Vx("component",r),{scales:a=[],bbox:o}=t,t=et(t,["scales","bbox"]),s=a.map(t=>D8(t,r)),o={bbox:o,scales:a,library:r};return i(t)(s,o,e,n)}function nS(t){var e,n=Z6(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=el(n),[n,e]):(n=Z6(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=ol(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function rS(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function iS(t,e){var t=function(t,e){var n=qc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+df(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function aS(t,B,e){var I=qc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,Pc],right:[W-n,r,n,a,"horizontal",!1,Pc],bottom:[t,s-i,o,i,"vertical",!1,Pc],left:[0,r,t,a,"horizontal",!0,Pc],"top-left":[t,0,o,r,"vertical",!0,Pc],"top-right":[t,0,o,r,"vertical",!0,Pc],"bottom-left":[t,s-i,o,i,"vertical",!1,Pc],"bottom-right":[t,s-i,o,i,"vertical",!1,Pc],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[C,t]of I.entries()){var l=G[C],[c,H]=k0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=k0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return Mu(t)&&wu(t)}(g)){if(wu(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(Mu(g)){d=void 0;u=void 0;O=void 0;k=void 0;d=c;u=g;var O=y;var k=c[0].orientation;"horizontal"===k?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,O):"vertical"===k&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,O)}}else{M=void 0;k=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var M=c;k=y;var[_,S,E,A]=k;for(const R of M)R.bbox={x:_,y:S,width:E,height:A},R.radar={index:M.indexOf(R),count:M.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;V=void 0;q=void 0;O=void 0;T=void 0;P=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[V,q,,u]=u,[O,T]=d.getCenter(),[d]=Eu(d),u=u/2,P=d*u,Y=O-P,$=T-P;for(let t=0;t<L.length;t++)L[t].bbox={x:V+Y,y:q+$,width:2*P,height:2*P}}else if("outer"===m){g=void 0;d=void 0;U=void 0;X=void 0;K=void 0;Z=void 0;g=c;d=y;var[U,X,K,Z]=d;for(const et of g)et.bbox={x:U,y:X,width:K,height:Z}}J=Q=N=y=c=m=T=u=j=void 0;var j=p,u=f,T=h;if(0!==j.length){var[T,m,c,y]=T,[u]=Eu(u),N=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<j.length;t++)j[t].bbox={x:Q-N,y:J-N,width:2*N,height:2*N}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function oS(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=et(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function sS(t,i,a){return ye(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=Vx("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=et(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ye(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),hf)}([et(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?O0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function lS(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function cS(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=w0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return yf(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function uS(t,e,n){var r=e["encode"];return r?(r=w0(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function fS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=Vx("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=w0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function hS(t,e,n){var{tooltip:r={}}=e;return xf(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:bf(r)&&kf(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function dS(g,t,e){const{data:y,encode:m,tooltip:n={}}=t;var r,i,a,o;return xf(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(bf(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?Mx(a):a,s=n&&m[n],a=s&&m[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?m[n].value[d]:null;u&&(c[d]={name:l,color:r,value:o(u)})}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,m);bf(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=et(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function pS(l,t,e){var n,r=t["encode"],i=et(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=et(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function gS(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function yS(t,e,n){var r=e["animate"];return r||void 0===r||nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function mS(l,c,u){return ye(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ye(this,void 0,void 0,function*(){var t=c["library"],[t]=Vx("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[oS,sS,lS,cS,uS,fS,pS,yS,gS,hS,...e.map(t),...r.map(t),...n.map(t),dS];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=$c(Object.entries(n).filter(([,t])=>yf(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:f}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=et(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function vS(F,D,z,W){return ye(this,void 0,void 0,function*(){const[n]=Vx("composition",z);var[t]=Vx("interaction",z);const r=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(yf)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[F],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?OS(h,f,z):yield xS(f,z),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>K6(t,z)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>wS(t,z)));z8(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),z8(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===i(f)?f:yield TS(f,z),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(b6.BEFORE_PAINT);const v=new Map,b=new Map,x=[];D.selectAll(CS(G)).data(o,t=>t.key).join(t=>t.append("g").attr("className",G).attr("id",t=>t.key).call(bS).each(function(t){kS(t,it(this),x,z),v.set(t,this)}),t=>t.call(bS).each(function(t){kS(t,it(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var w=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ye(this,void 0,void 0,function*(){var[t,e]=yield xS(r,a);kS(t,i,[],a);for(const n of e)vS(n,i,a,o);return{options:r,view:t}})}(it(e),z,W)})),O=w(v);for(const T of O){const F=T["options"];var k=new Map;T.container.nameInteraction=k;for(const P of LS(F)){var M=t(P)(T,O,W.emitter);k.set(P.type,{destroy:M})}}var _=w(b);for(const j of _){const{options:F,container:N}=j;var S=N.nameInteraction;for(const C of LS(F)){var E=S.get(C.type);E&&E.destroy();E=t(C)(j,_,W.emitter);S.set(F.type,{destroy:E})}}const{width:A,height:B}=F;var L=[];for(const R of u){var I=new Promise(e=>ye(this,void 0,void 0,function*(){for(const t of R)yield vS(Object.assign({width:A,height:B},t),D,z,W);e()}));L.push(I)}W.views=o,W.animations=x,W.emitter.emit(b6.AFTER_PAINT);w=x.filter(yf).map(ES).map(t=>t.finished);return Promise.all([...w,...L])})}function bS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function xS(e,n){return ye(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=et(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>nt(t,e),{}),e=[n,...a].reduce((t,e)=>nt(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ye(this,void 0,void 0,function*(){var[t,e]=Vx("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield TS(a,u);const{type:s=pf("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,K6(t,n));return OS(yield wS(t,n),t,n)})}function wS(p,g){return ye(this,void 0,void 0,function*(){var[t]=Vx("theme",g),[,e]=Vx("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(AS(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield mS(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of qc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>nt(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(yf)));const p=nt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=F8(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function OS(t,e,n){var[r]=Vx("mark",n),[i]=Vx("theme",n),[a]=Vx("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(AS(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=tS(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),y=iS(g,e),m=function(t,e,n){var[n]=Vx("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new U6(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?nt({mainLineWidth:1,mainStroke:"#000"},u):u,v=(aS(g,m,y),{}),b=[];for([h,d]of t.entries()){const{children:O,dataDomain:k,modifier:M,key:_}=h,{index:S,channels:E,tooltip:A}=d;var x=w0(Object.fromEntries(E.map(({name:t,scale:e})=>[t,e])),t=>D8(t,n));Object.assign(v,x);const L=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(E,x),[T,P,j]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>yf(t)&&yf(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(S,x,L,m));var w=k||T.length;const N=M?M(P,w,y):[],C=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);w=T.map((t,e)=>{var n=Object.assign({points:P[e],transform:N[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],j&&(n["series"+Hs(r)]=j[e].map(t=>i[t]));return j&&(n.seriesIndex=j[e]),j&&A&&(n.seriesItems=j[e].map(t=>R(t)),n.seriesTitle=j[e].map(t=>C(t))),n}),w=(d.data=w,d.index=T,null==O?void 0:O(w,x,y));b.push(...w||[])}return[{layout:y,theme:i,coordinate:m,components:g,markState:t,key:o,clip:c,scale:v,style:p,labelTransform:MS(f.map(a))},b]}function kS(Z,Q,J,tt){ye(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I,clip:a}=Z,{width:F,height:D}=t,z=et(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>mf(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>rt(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=it(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(CS(ut)).data(s.filter(t=>yf(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ut).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:m=l,updateDelay:v=c,enterType:b=u,enterDuration:x=f,enterDelay:w=h,exitDuration:O=p,exitDelay:k=g,exitType:M=d}=_;void 0!==y&&!y||(e=Math.max(e,m+v),n=Math.min(n,v)),void 0!==M&&!M||(e=Math.max(e,O+k),n=Math.min(n,k)),void 0!==b&&!b||(e=Math.max(e,x+w),n=Math.min(n,w))}}return e===-1/0?null:[n,e-n]}(e)),y=!!g&&{duration:g[1]};var m,v,b,s=Q.selectAll(CS(lt)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",lt).append(t=>eS(nt({animate:y},t),r,n,tt)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=eS(nt({animate:y},t),r,n,tt)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(yf));const x=Q.selectAll(CS(st)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",st).call(PS).call(NS,Array.from(e.keys())).call(RS,a),t=>t.call(NS,Array.from(e.keys())).call(t=>{if(!g)return PS(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(RS,a)).transitions();J.push(...x.flat());for([m,v]of e.entries()){var G=v["data"];const{key:i,class:H,type:E}=m,A=function(l,t,e,n){const[c]=Vx("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=et(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=w0(y,t=>_S(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:jS(l,n)}))(r,t,p,d,h)}}(m,v,Z,tt),V=(w=m,b=v,SS("enter",w,b,Z,tt)),L=(w=m,b=v,SS("update",w,b,Z,tt)),q=(w=m,b=v,SS("exit",w,b,Z,tt));var w=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(Q,H,"element");const T=[ot],x=("string"==typeof E&&T.push(E),Q.select("#"+i).selectAll(CS(ot)).selectFacetAll(w).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(A).attr("className",T.join(" ")).transition(function(t){return V(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=A(t,e),s=L(t,[this],[o]);return null===s&&gf(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return q(t,[this])}).remove(),t=>t.append(A).attr("className",ot).transition(function(t){var e=this["__fromElements__"],t=L(t,e,[this]);return new R0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new R0([],this.__toData__,this.parentNode).append(A).attr("className",ot).nodes();return L(t,[this],e)}).remove()).transitions());J.push(...x.flat())}{var O=Z,k=Q,M=tt,_,S;const[Y]=Vx("labelTransform",M),{markState:$,labelTransform:P}=O,U=k.select(CS(at)).node(),j=new Map,N=new Map,X=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=Vx("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=et(t,["formatter","transform","style"]),t=w0(Object.assign(Object.assign({},t),a),t=>_S(t,r,e,l)),{shape:a=c,text:o}=t,t=et(t,["shape","text"]),i="string"==typeof i?Mx(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,O,M),a=k.select("#"+r).selectAll(CS(ot)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=et(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{j.set(t,i),N.set(t,e)}),t})})}),C=it(U).selectAll(CS(ct)).data(X,t=>t.key).join(t=>t.append(t=>j.get(t)(t)).attr("className",ct),t=>t.each(function(t){gf(this,j.get(t)(t))}),t=>t.remove()).nodes(),K=qc(C,t=>N.get(t.__data__)),R=O["coordinate"];for([_,S]of K){var{transform:_=[]}=_;MS(_.map(Y))(S,R)}P&&P(C,R)}})}function MS(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function _S(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function SS(o,t,e,n,r){var[,i]=Vx("shape",r);const[s]=Vx("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Hs(o)}Animation`;const{[e]:c}=i(jS(t,r)).props,{[o]:u={}}=a,f=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function ES(t){return t.finished.then(()=>{t.cancel()}),t}function AS(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function LS(t){var{interaction:t={}}=t;return Object.entries(nt({event:!0,tooltip:!0},t)).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function TS(r,i){return ye(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=et(r,["data"]);return null==e?r:([,{data:e}]=yield sS(0,{data:e},t),Object.assign({data:e},n))})}function PS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function jS(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function NS(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(CS(j)).data(e,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(CS(at)).node())||t.append("g").attr("className",at)}function CS(...t){return t.map(t=>"."+t).join("")}function RS(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new U.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function BS(t){for(var t=nt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function IS(t,e={},n){const{width:r=640,height:i=480}=t,a=BS(t),{canvas:o=(t=r,c=i,u=new S.Renderer,u.registerPlugin(new Ts),new U.Canvas({width:t,height:c,container:document.createElement("div"),renderer:u})),library:s=w6(),emitter:l=new Qs}=e;var c,u;e.canvas=o,e.library=s,e.emitter=l,o.resize(r,i),l.emit(b6.BEFORE_RENDER);const f=it(o.document.documentElement);return o.ready.then(()=>vS(Object.assign(Object.assign({},a),{width:r,height:i}),f,s,e)).then(()=>{l.emit(b6.AFTER_RENDER),null!=n&&n()}),"string"==typeof(t=o.getConfig().container)?document.getElementById(t):t}function FS(t,e={}){var{canvas:e,emitter:n}=e;e&&e.destroy(),n.off()}function DS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function zS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function WS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function y(r){return t=>{for(const n of r){var e=n["type"];"value"===e?DS(t,n):"array"===e?zS(t,n):"object"===e?WS(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):bf(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function GS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function HS(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class VS{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return HS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return HS(this,t=>{e===t.type&&n.push(t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class qS extends VS{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}ma=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let YS=class extends qS{constructor(){super({})}},$S=(YS=t([y(ma)],YS),class extends qS{constructor(){super({},"interval")}}),US=($S=t([y(ma)],$S),class extends qS{constructor(){super({},"rect")}}),XS=(US=t([y(ma)],US),class extends qS{constructor(){super({},"point")}}),KS=(XS=t([y(ma)],XS),class extends qS{constructor(){super({},"area")}}),ZS=(KS=t([y(ma)],KS),class extends qS{constructor(){super({},"line")}}),QS=(ZS=t([y(ma)],ZS),class extends qS{constructor(){super({},"cell")}}),JS=(QS=t([y(ma)],QS),class extends qS{constructor(){super({},"vector")}}),tE=(JS=t([y(ma)],JS),class extends qS{constructor(){super({},"link")}}),eE=(tE=t([y(ma)],tE),class extends qS{constructor(){super({},"polygon")}});eE=t([y(ma)],eE);ba=t([y(ma)],class extends qS{constructor(){super({},"image")}});let nE=class extends qS{constructor(){super({},"text")}},rE=(nE=t([y(ma)],nE),class extends qS{constructor(){super({},"box")}}),iE=(rE=t([y(ma)],rE),class extends qS{constructor(){super({},"lineX")}}),aE=(iE=t([y(ma)],iE),class extends qS{constructor(){super({},"lineY")}}),oE=(aE=t([y(ma)],aE),class extends qS{constructor(){super({},"range")}}),sE=(oE=t([y(ma)],oE),class extends qS{constructor(){super({},"rangeX")}}),lE=(sE=t([y(ma)],sE),class extends qS{constructor(){super({},"rangeY")}}),cE=(lE=t([y(ma)],lE),class extends qS{constructor(){super({},"connector")}}),uE=(cE=t([y(ma)],cE),class extends qS{constructor(){super({},"shape")}}),fE=(uE=t([y(ma)],uE),class extends qS{constructor(){super({},"sankey")}}),hE=(fE=t([y([...ma,{name:"layout",type:"value"}])],fE),class extends qS{constructor(){super({},"treemap")}}),dE=(hE=t([y([...ma,{name:"layout",type:"value"}])],hE),class extends qS{constructor(){super({},"boxplot")}}),pE=(dE=t([y(ma)],dE),class extends qS{constructor(){super({},"pack")}}),gE=(pE=t([y([...ma,{name:"layout",type:"value"}])],pE),class extends qS{constructor(){super({},"forceGraph")}}),yE=(gE=t([y([...ma,{name:"layout",type:"value"}])],gE),class extends qS{constructor(){super({},"tree")}}),mE=(yE=t([y([...ma,{name:"layout",type:"value"}])],yE),class extends qS{constructor(){super({},"wordCloud")}}),vE=(mE=t([y([...ma,{name:"layout",type:"object"}])],mE),class extends qS{constructor(){super({},"gauge")}});vE=t([y(ma)],vE);u={mark:YS,interval:$S,rect:US,point:XS,area:KS,line:ZS,cell:QS,vector:JS,link:tE,polygon:eE,image:ba,text:nE,box:rE,lineX:iE,lineY:aE,range:oE,rangeX:sE,rangeY:lE,connector:cE,sankey:fE,treemap:hE,boxplot:dE,shape:uE,pack:pE,forceGraph:gE,tree:yE,wordCloud:mE,gauge:vE};class bE extends VS{getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this.attr("key"))}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&t.setAttribute("visibility","visible")}hide(){var t=this.getGroup();t&&t.isVisible()&&t.setAttribute("visibility","hidden")}}let xE=class extends bE{constructor(t={},e="view"){super(t,e)}},wE=(xE=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...GS(u)])],xE),class extends bE{constructor(){super({},"spaceLayer")}}),OE=(wE=t([y([{type:"value",name:"data"},...GS(u)])],wE),class extends bE{constructor(){super({},"spaceFlex")}}),kE=(OE=t([y([{type:"value",name:"data"},...GS(u)])],OE),class extends bE{constructor(){super({},"facetRect")}}),ME=(kE=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...GS(u)])],kE),class extends bE{constructor(){super({},"facetCircle")}}),_E=(ME=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...GS(u)])],ME),class extends bE{constructor(){super({},"repeatMatrix")}}),SE=(_E=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...GS(u)])],_E),class extends bE{constructor(){super({},"timingKeyframe")}}),EE=(SE=t([y([...GS(u)])],SE),class extends bE{constructor(){super({},"geoView")}}),AE=(EE=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...GS(u)])],EE),class extends bE{constructor(){super({},"geoPath")}});AE=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...GS(u)])],AE);var LE={view:xE,spaceLayer:wE,spaceFlex:OE,facetRect:kE,facetCircle:ME,repeatMatrix:_E,timingKeyframe:SE,geoView:EE,geoPath:AE};for(const NE of Object.values(LE))y(GS(LE))(NE);const TE=w6();const PE=["container","renderer"];function jE(t){return Object.assign(Object.assign({},t.value),{type:t.type})}xa=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...GS(u),...Object.entries(LE).map(([t,e])=>({type:"container",name:t,ctor:e}))];m.Chart=class extends xE{constructor(t={}){var r,i,a,o,{container:e,canvas:n}=t;super(et(t,["container","canvas"]),"view"),this.onResize=(r=()=>{this.forceFit()},i=300,function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new Qs,this._context={library:TE,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=Af(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new S.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ts),o.forEach(t=>a.registerPlugin(t)),new U.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise(t=>{IS(this.options(),this._context,()=>t(this))})}options(t){return 0===arguments.length?this._options||function(t){var e,t=null!==(t=t).type?t:((e=t.children[t.children.length-1]).attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e.attr("insetLeft",t.attr("insetLeft")),e.attr("insetRight",t.attr("insetRight")),e.attr("insetBottom",t.attr("insetBottom")),e.attr("insetTop",t.attr("insetTop")),e.attr("marginLeft",t.attr("marginLeft")),e.attr("marginBottom",t.attr("marginBottom")),e.attr("marginTop",t.attr("marginTop")),e.attr("marginRight",t.attr("marginRight")),e.attr("autoFit",t.attr("autoFit")),e.attr("padding",t.attr("padding")),e.attr("margin",t.attr("margin")),e.attr("inset",t.attr("inset")),e),n=[t],r=new Map;for(r.set(t,jE(t));n.length;){const t=n.pop();var i=r.get(t);for(const s of t.children){var a=jE(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(t)}(this):(this._options=nt(this._options||{},qs(t,PE)),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}destroy(){var t,e;this.options();this.emit(b6.BEFORE_DESTROY),this.unbindAutoFit(),FS(0,this._context),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(b6.AFTER_DESTROY)}clear(){this.options();this.emit(b6.BEFORE_CLEAR),FS(0,this._context),this.emit(b6.AFTER_CLEAR)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=Af(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(b6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(b6.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},m.Chart=t([y(xa)],m.Chart),m.AREA_CLASS_NAME=ut,m.COMPONENT_CLASS_NAME=lt,m.CompositionNode=bE,m.ELEMENT_CLASS_NAME=ot,m.LABEL_CLASS_NAME=ct,m.LABEL_LAYER_CLASS_NAME=at,m.MAIN_LAYER_CLASS_NAME=j,m.MarkNode=qS,m.PLOT_CLASS_NAME=st,m.VIEW_CLASS_NAME=G,m.createLibrary=w6,m.register=function(t,e){Object.assign(TE,{[t]:e})},m.render=IS,m.renderToMountedElement=function(t,e={},n){var r,{width:i=640,height:a=480}=t,t=BS(t);const{library:o=w6(),group:s=new U.Group,emitter:l=new Qs}=e;if(null!=s&&s.parentElement)return r=it(s),e.group=s,e.library=o,(e.emitter=l).emit(b6.BEFORE_RENDER),vS(Object.assign(Object.assign({},t),{width:i,height:a}),r,o,e).then(()=>{l.emit(b6.AFTER_RENDER),null!=n&&n()}),s;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(m,"__esModule",{value:!0})});
10
+ `,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=pw(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return w();O()})(t,n),v=!0)},L=t=>{var e,n,r,t=pw(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],m,x),n=n(e,h[1],d[1],b,k),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},P=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=pw(a,t),[e,n,r,i]=_(h,d),v=!1,o(e,n,r,i))},T=t=>{t=t.target;g&&t!==g&&M()},N=t=>{t=t.target;t!==g||v?Mw(a,"crosshair"):Mw(a,"move")},j=()=>{Mw(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",L),a.addEventListener("dragend",P),a.addEventListener("click",T),a.addEventListener("pointermove",N),a.addEventListener("pointerleave",j),{mask:g,remove(){g&&M()},destroy(){g&&M(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",L),a.removeEventListener("dragend",P),a.removeEventListener("click",T),a.removeEventListener("pointermove",N),a.removeEventListener("pointerleave",j)}}}function c5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function u5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=et(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=xw(p,i),n=rt(e,"mask");const{setState:v,removeState:f}=mw(u,r),h=new Map,{width:m,height:b,x=0,y:k=0}=c(t);i=o||[0,0,m,b];return l5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new X.Rect({style:{x:t+x,y:e+k,width:n-t,height:r-e}}),v(o,"inactive"),v(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?v(f,"inactive"):(v(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?v(h,"active"):v(h,"inactive")}}))}function f5(t){var{facet:h,brushKey:d}=t,p=et(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=hw(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],u5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>uw(t,e),datum:vw(fw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:bw(fw(t,e).map(t=>t.options),u)},c),p));const f=u5(o,Object.assign(Object.assign({elements:cw,key:t=>t.__data__.key,siblings:()=>{return c5(t,e,d).map(t=>hw(t.container))},datum:vw([s,...c5(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:bw([l,...c5(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function h5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function d5(t){return f5(Object.assign(Object.assign({},t),{brushRegion:h5}))}function p5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function g5(t){return f5(Object.assign(Object.assign({},t),{brushRegion:p5}))}const y5="axis",v5="axis-hot-area";function m5(t){return t.getElementsByClassName(y5)}function b5(t){return t.getElementsByClassName("axis-line")[0]}function x5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function k5(t,e){var{cross:n,offsetX:i}=e,e=et(e,["cross","offsetX","offsetY"]),r=x5(t),[t]=b5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:p5,hotZone:new X.Rect({className:v5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function w5(t,e){var{offsetY:i,cross:n=!1}=e,e=et(e,["offsetY","offsetX","cross"]),r=x5(t),[,t]=b5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:h5,hotZone:new X.Rect({className:v5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function O5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=et(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=mw(u,xw(f,o))["setState"],d=new Map;var p=rt(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const v of r){const{hotZone:m,brushRegion:b,extent:x}=(a(v)?w5:k5)(v,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});v.parentNode.appendChild(m),l5(m,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(v),g()},brushed(t,e,n,r){d.set(v,x(t,e,n,r)),g()}}))}}function M5(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=hw(t).getBBox();return O5(t,Object.assign({elements:cw,axes:m5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:vw(e),state:bw(n,["active",["inactive",{opacity:.5}]])},a))}}function _5(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=rt(et(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=l5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function S5(t){var{hideX:y=!0,hideY:v=!0}=t,i=et(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=hw(n);let d=!1,p=!1,g=r;return _5(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ue(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[Ek(i,t,e),Ek(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>nt({axis:Object.assign(Object.assign({},y&&{x:{transform:[{type:"hide"}]}}),v&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:Ak(i,[n[0],o[0]])},y:{domain:Ak(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function E5(t){return S5(Object.assign(Object.assign({hideX:!0},t),{brushRegion:h5}))}function A5(t){return S5(Object.assign(Object.assign({hideY:!0},t),{brushRegion:p5}))}const L5="slider";function P5({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:s,update:l}=t;t=e.getElementsByClassName(L5);if(!t.length)return()=>{};let c=!1;const u=n["scale"];var{x:r,y:i}=u;const a=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orientation"];var o=pn(o=>ue(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];c||(c=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return Ak(e,[Ek(e,t,!0),Ek(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=s,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>nt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield l(a),c=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",o),a.set(h,o)}return()=>{for(var[t,e]of a)t.removeEventListener("valuechange",e)}}}const T5={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function N5(t){return"text"===t.nodeName&&!!t.isOverflowing()}function j5(t){var{offsetX:h=8,offsetY:d=8}=t,r=et(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=rt(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];N5(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new X.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},T5),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];N5(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}const C5=new Proxy({BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"},{get(t,e){if(e in t)return t[e]},set(){return!0}});function R5(t,e,n){var{data:r={}}=t;r.data=function(t,e){const{markKey:n,index:r,seriesIndex:i}=t=t.__data__,a=(t=e.markState,Array.from(t.keys()).find(t=>t.key===n));if(a)return i?i.map(t=>a.data[t]):a.data[r]}(e,n),t.data=r}function B5(i,a,o,s=t=>!0){return t=>{var e,n,r;s(t)&&(e=t["target"],{className:n,markType:r}=e,"element"===n?(R5(t,e,a),o.emit("element:"+i,t),o.emit(r+":"+i,t)):o.emit(n+":click"))}}function I5(){return(t,e,n)=>{const{container:r,view:i}=t,a=B5(C5.CLICK,i,n,t=>1===t.detail),o=B5(C5.DBLCLICK,i,n,t=>2===t.detail),s=B5(C5.POINTER_TAP,i,n),l=B5(C5.POINTER_DOWN,i,n),c=B5(C5.POINTER_UP,i,n),u=B5(C5.POINTER_OVER,i,n),f=B5(C5.POINTER_OUT,i,n),h=B5(C5.POINTER_MOVE,i,n),d=B5(C5.POINTER_ENTER,i,n),p=B5(C5.POINTER_LEAVE,i,n),g=B5(C5.POINTER_UPOUTSIDE,i,n),y=B5(C5.DRAG_START,i,n),v=B5(C5.DRAG,i,n),m=B5(C5.DRAG_END,i,n),b=B5(C5.DRAG_ENTER,i,n),x=B5(C5.DRAG_LEAVE,i,n),k=B5(C5.DRAG_OVER,i,n),w=B5(C5.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",h),r.addEventListener("pointerenter",d),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",y),r.addEventListener("drag",v),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",k),r.addEventListener("drop",w),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",h),r.removeEventListener("pointerenter",d),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",y),r.removeEventListener("drag",v),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",k),r.removeEventListener("drop",w)}}}function F5(n){return(t,...e)=>nt({},n(t,...e),t)}function D5(n){return(t,...e)=>nt({},t,n(t,...e))}function z5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=et(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const W5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:o=0,y:s=0,width:l,height:c,data:u}=t;return e.map(t=>{var{data:e,x:n,y:r,width:i,height:a}=t,t=et(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},t),{data:z5(e,u),x:null!=n?n:o,y:null!=r?r:s,width:null!=i?i:l,height:null!=a?a:c})})},G5=(W5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=et(g,["data"]),y=z5(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),H5=(G5.props={},()=>t=>{var e=t["children"],t=et(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=et(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=et(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:z5(e,s),scale:nt({},l,n),encode:nt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&nt({},c,r),legend:!(!i||!u)&&nt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),V5=(H5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:v,data:m,coordinate:b,theme:x,component:k,interaction:w,x:O,y:M,key:_,frame:S,title:E,labelTransform:A,parentKey:L,clip:P}=t,t=et(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:O,y:M,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:k,interaction:w,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:v,parentKey:L,clip:P,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:m})]}]}),q5=(V5.props={},F5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Wc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),Y5=F5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:nt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:nt({title:i},o)}}}),$5=F5(()=>({animate:{enterType:"fadeIn"}})),U5=D5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),K5=D5(()=>({type:"cell"})),X5=D5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),Z5=D5((t,c=function(t){t=t.points;return R0(t)},k=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?Q5(a,e):(t=e.length?void 0:null,nt({title:r===i-1&&void 0,grid:t},a))}},w=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?Q5(r,e):(n=e.length?void 0:null,nt({title:0===t&&void 0,grid:n},r))}},O={})=>{const{data:e,encode:n,children:u,scale:r,x:M=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:L}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=S0(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>E.filter(t)),m=f?ru(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=et(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:L?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:P}},o={x:J5(o,k)(p,r),y:J5(a,w)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+M,y:f+v+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:m,scale:nt(s,e,l),axis:nt({},i,o),legend:!1},t),O)})})}}});function Q5(t,e){return e.length?nt({title:!1,tick:null,label:null},t):nt({title:!1,tick:null,label:null,grid:null},t)}function J5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const tO=()=>t=>{return[Rk.of(t).call(K5).call(Y5).call($5).call(q5).call(U5).call(X5).call(Z5).value()]},eO=(tO.props={},F5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),nO=D5(t=>{const{data:k,children:c,x:w=0,y:O=0,key:M}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:v,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=S0(t);const s=t.map(({points:t})=>R0(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=et(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return Q5(r,e)})(y,k),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return Q5(n,e)})(y,k)};return Object.assign({data:k,parentKey:M,key:i+"-"+c,x:u+v+w,y:f+m+O,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:nt({x:{facet:!1},y:{facet:!1}},e),axis:nt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:nt({},a,{x:p,y:g})},t)})})}}}),rO=D5(t=>{var e=t["encode"],t=et(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=et(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const iO=()=>t=>{return[Rk.of(t).call(K5).call(Y5).call(nO).call(rO).call($5).call(U5).call(eO).value()]},aO=F5(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),oO=F5(t=>({coordinate:{type:"polar"}})),sO=t=>{var e=t["encode"],t=et(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function lO(t){return t=>null}function cO(t){var t=t["points"],[t,e,n,r]=t,i=T0(t,r),t=P0(t,r),r=C0(t,P0(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=j0(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const uO=()=>t=>{return[Rk.of(t).call(K5).call(sO).call(Y5).call(oO).call(X5).call(Z5,cO,lO,lO,{frame:!1}).call($5).call(U5).call(aO).value()]};const fO=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=nt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function hO(t,e){if(null!==t)return{type:"column",value:t,field:e}}function dO(t,e){t=hO(t,e);return Object.assign(Object.assign({},t),{inferred:!0})}function pO(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function gO(t,e){var n=[];for(const r of t)n[r]=e;return n}function R(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function yO(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R(t,i);if(null!==n)return[n,r]}return[null,null]}function vO(t){return!(t instanceof Date)&&"object"==typeof t}fO.props={};const mO=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y1:dO(gO(t,0))}})]};function bO(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R(r,t))?void 0:t[0]]}).filter(([,t])=>hf(t));return Array.from(Wc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function xO(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Ec(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>EO(t=>r(e[t]))):"series"===t?OO:"value"===t?MO:"sum"===t?_O:"maxIndex"===t?SO:()=>null}function kO(t,e){for(const n of t)n.sort(e)}function wO(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function OO(t,e,n){return EO(t=>n[t])}function MO(t,e,n){return EO(t=>e[t])}function _O(t,n,e){t=S0(t),t=Array.from(Wc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return EO(t=>r.get(e[t]))}function SO(t,n,e){t=S0(t),t=Array.from(Wc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,iu(e,t=>n[t])]));return EO(t=>r.get(e[t]))}function EO(n){return(t,e)=>Ec(n(t),n(e))}mO.props={};const AO=(t={})=>{const{groupBy:L="x",orderBy:P=null,reverse:T=!1,y:N="y",y1:j="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R(r,"y"),[s,l]=R(r,"y1"),[r]=C?yO(r,"series","color"):R(r,"color"),c=bO(L,t,e),n=xO(P)(n,a,r),u=(n&&kO(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){T&&_.reverse();var g=s?+s[_[0]]:0,y=[],v=[];for(const S of _){var m=h[S]=+a[S]-g;m<0?v.push(S):0<=m&&y.push(S)}var b=0<y.length?y:v,x=0<v.length?v:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of v.reverse()){var k=h[E];n=u[E]=(f[E]=n)+k}let r=g;for(const A of y){var w=h[A];0<w?r=u[A]=(f[A]=r)+w:u[A]=f[A]=r}}const O=new Set(d),M=new Set(p);r="y"===N?u:f,n="y"===j?u:f;return[t,nt({},e,{encode:{y0:dO(a,o),y:hO(r,o),y1:hO(n,l)},style:Object.assign({first:(t,e)=>O.has(e),last:(t,e)=>M.has(e)},i)})]}};function LO(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}AO.props={};const PO=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(LO)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",AO({groupBy:r})(t,e,n))},TO=(PO.props={},(t={})=>{const{channel:a="x"}=t;return(t,e)=>{const n=e["encode"];var r=e["tooltip"];if(yf(r))return[t,e];r=r.title;if(void 0!==r)return[t,e];const i=Object.keys(n).filter(t=>t.startsWith(a)).filter(t=>!n[t].inferred).map(t=>R(n,t)).filter(([t])=>t).map(t=>t[0]);return 0===i.length?[t,e]:[t,nt({},e,{tooltip:{title:t.map(e=>({value:i.map(t=>t[e]).join(", ")}))}})]}}),NO=(TO.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{x:dO(gO(t,0))},scale:{x:{guide:null}}})]}),jO=(NO.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{y:dO(gO(t,0))},scale:{y:{guide:null}}})]}),CO=(jO.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,nt({},e,{encode:{size:pO(gO(t,3))}})]}),RO=(CO.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=et(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,nt({},e,{encode:{key:hO(r)}})]}),BO=(RO.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R(n,"color"),[t,nt({},e,{encode:{series:hO(r,i)}})])}),IO=(BO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(vO)?[t,e]:[t,nt({},e,{encode:{y:hO(n)}})]}),FO=(IO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(vO)?[t,e]:[t,nt({},e,{encode:{x:hO(n)}})]}),DO=(FO.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R(n,"y"),[t,nt({},e,{encode:{y1:hO([...r])}})])}),zO=(DO.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R(n,"x"),[t,nt({},e,{encode:{x1:hO([...r])}})])}),WO=(zO.props={},t=>{const i=t["channel"];return(t,e)=>{const{encode:a,tooltip:n}=e;var r;return yf(n)||({items:r=[]}=n,!r)||0<r.length?[t,e]:(r=(Array.isArray(i)?i:[i]).flatMap(e=>Object.keys(a).filter(t=>t.startsWith(e)).map(t=>{var{field:e,value:n,inferred:r=!1,aggregate:i}=a[t];return r?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t)),[t,nt({},e,{tooltip:{items:r}})])}}),GO=(WO.props={},()=>(t,e)=>[t,nt({scale:{x:{padding:0},y:{padding:0}}},e)]),HO=(GO.props={},()=>(t,e)=>{var{style:n={}}=e,r=et(e,["data","style"]),{x:i,y:a}=n,n=et(n,["x","y"]);return null==i||null==a?[t,e]:[[0],nt({},r,{data:[0],cartesian:!0,encode:{x:hO([i||0]),y:hO([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),VO=(HO.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),qO=(VO.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(vO)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,nt({},e,{encode:{x:hO(n),y:hO(r)}})])}),YO=(qO.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,nt({},e,{encode:{series:pO(gO(t,void 0))}})]:[t,e]}),$O=(YO.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return et(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R(r,"y"),[r]=yO(r,"series","color"),o=wO(r,i),i=bO(c,t,e),n=xO(f)(n,a,r),s=(n&&kO(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,nt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:hO(s)}})]}}),UO=($O.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:v=!1,duration:m}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Wc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=R(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),v&&i.reverse()}r=(m||3e3)/i.length;const[s]=m?[gO(n,r)]:yO(e,"enterDuration",gO(n,r));var[l]=yO(e,"enterDelay",gO(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=ru(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,nt({},t,{encode:{enterDuration:pO(s),enterDelay:pO(c)}})]}});UO.props={};const KO=(t={})=>{const{groupBy:p="x",basis:g="max"}=t;return(e,t)=>{const{encode:n,tooltip:r}=t;var i=et(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=bO(p,e,t),l="function"==typeof(h=g)?h:{min:(t,e)=>au(t,t=>e[+t]),max:(t,e)=>ru(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>fu(t,t=>e[+t]),median:(t,e)=>hu(t,t=>e[+t]),sum:(t,e)=>gu(t,t=>e[+t]),deviation:(t,e)=>Rc(t,t=>e[+t])}[h]||ru;for(const e of i){var c=l(e,o);for(const d of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[d]=+u[d]/c}}var h=yf(r)||(null==r?void 0:r.items)&&0!==(null==r?void 0:r.items.length);return[e,nt({},t,Object.assign({encode:Object.fromEntries(s.map(([t,e])=>[t,hO(e,R(n,t)[1])]))},!h&&n.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function XO(t,e,n){return null===t?[-.5,.5]:(t=wO(t,e),[-(e=new Wp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function ZO(t,e,n){return e*(1-t)+n*t}KO.props={};const QO=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R(n,"x"),[n]=R(n,"y");const o=XO(a,r,l),s=XO(n,i,c);a=t.map(()=>ZO(u(),...s)),r=t.map(()=>ZO(u(),...o));return[t,nt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:hO(a),dx:hO(r)}})]}},JO=(QO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R(n,"x");const i=XO(n,r,a);n=t.map(()=>ZO(o(),...i));return[t,nt({scale:{x:{padding:.5}}},e,{encode:{dx:hO(n)}})]}}),tM=(JO.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=et(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=bO(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Bc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,nt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,hO(e,R(n,t)[1])]))})]}}),eM=(tM.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R(n,"y");var[,i]=R(n,"y1"),n=(f?yO(n,"series","color"):R(n,"color"),bO(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,nt({},e,{encode:{y1:hO(a,i)}})]}});function nM(t,e){return[t[0]]}function rM(t,e){return[t[t.length-1]]}function iM(t,e){return[t[iu(t,t=>e[t])]]}function aM(t,e){return[t[ou(t,t=>e[t])]]}eM.props={};const oM=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=bO(a,t,e);const[r]=R(n,o),i="function"==typeof(n=s)?n:{first:nM,last:rM,max:iM,min:aM}[n]||nM;return[t.flatMap(t=>i(t,r)),e]}},sM=(oM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return oM(Object.assign({channel:"x",selector:e},t))}),lM=(sM.props={},(t={})=>{var e=t["selector"],t=et(t,["selector"]);return oM(Object.assign({channel:"y",selector:e},t))});function cM(e){return t=>null===t?e:e+" of "+t}function uM(){return[(t,e)=>fu(t,t=>+e[t]),cM("mean")]}function fM(){return[(t,e)=>hu(t,t=>+e[t]),cM("median")]}function hM(){return[(t,e)=>ru(t,t=>+e[t]),cM("max")]}function dM(){return[(t,e)=>au(t,t=>+e[t]),cM("min")]}function pM(){return[(t,e)=>t.length,cM("count")]}function gM(){return[(t,e)=>gu(t,t=>+e[t]),cM("sum")]}function yM(){return[(t,e)=>e[t[0]],cM("first")]}function vM(){return[(t,e)=>e[t[t.length-1]],cM("last")]}lM.props={};const mM=(t={})=>{const i=t["groupBy"],a=et(t,["groupBy"]);return(t,e)=>{const{data:s,encode:l}=e,c=i(t,e);if(!c)return[t,e];var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:uM,max:hM,count:pM,first:yM,last:vM,sum:gM,min:dM,median:fM}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R(l,t);e=e;var e=(o=a)||((e=e["from"])?([,e]=R(l,e),e):o),o=c.map(t=>n(t,null!==i&&void 0!==i?i:s));return[t,Object.assign(Object.assign({},(t=o,o=(null==r?void 0:r(e))||e,t=hO(t,o),Object.assign(Object.assign({},t),{constant:!1}))),{aggregate:!0})]}),n=Object.keys(l).map(t=>{const[e,n]=R(l,t);return[t,hO(c.map(t=>e[t[0]]),n)]}),r=c.map(t=>s[t[0]]);return[S0(c),nt({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},bM=(mM.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=et(t,["channels"]);return mM(Object.assign(Object.assign({},e),{groupBy:(t,e)=>bO(n,t,e)}))}),xM=(bM.props={},(t={})=>bM(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),kM=(xM.props={},(t={})=>bM(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),wM=(kM.props={},(t={})=>bM(Object.assign(Object.assign({},t),{channels:["color"]})));function OM(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=et(n,["reverse","slice","channel"]),o=e["encode"];const[s]=R(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>ru(t,t=>+a[t]);if("min"===i)return t=>au(t,t=>+a[t]);if("sum"===i)return t=>gu(t,t=>+a[t]);if("median"===i)return t=>hu(t,t=>+a[t]);if("mean"===i)return t=>fu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?qc(Gc(o,l,c),([t,e],[n,r])=>Ec(e,r)||Ec(t,n)):qc(Wc(o,c),([t,e],[n,r])=>l(e,r)||Ec(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,nt(e,{scale:{[a]:{domain:c}}})]}wM.props={};const MM=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=et(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return OM(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=R(i,r);return i=qc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},_M=(MM.props={},(t={})=>MM(Object.assign(Object.assign({},t),{channel:"x"}))),SM=(_M.props={},(t={})=>MM(Object.assign(Object.assign({},t),{channel:"color"}))),EM=(SM.props={},(t={})=>MM(Object.assign(Object.assign({},t),{channel:"y"})));EM.props={};const AM=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R(r,s)[0],r=Hc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>gu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,nt({},e,{scale:{x:{flex:r}}})]}};function LM(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=R0(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}AM.props={};const PM=()=>(t,e)=>[t,nt({},e,{modifier:LM,axis:!1})],TM=(PM.props={},"thresholds");function NM(t){var e,[n,r]=Bc(t);return Math.min(200,(n=n,r=r,e=Cc(t=t),t=Rc(t),e&&t?Math.ceil((r-n)*Math.cbrt(e)/(3.49*t)):1))}const jM=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=et(t,["groupChannels","binChannels"]),u={};return mM(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(TM)))),Object.fromEntries(l.flatMap(e=>{var t=([t])=>+u[e].get(t).split(",")[1];return[[t.from=e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",t]]}))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R(n,t);return t}),a=rt(c,TM),o=t.filter(e=>i.every(t=>hf(t[e]))),r=[...s.map(t=>{var[t]=R(n,t);return t}).filter(hf).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||NM(n),e=nu().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Wc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},CM=(jM.props={},(t={})=>{var e=t["thresholds"];return jM(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function RM(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,v=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((v[0]-t)*(s(r)-v[1])-(v[0]-l(r))*(e-v[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function BM(t){if("function"==typeof t)return t;if("lttb"===t)return RM;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[ou(t,t=>n[t])]],max:(t,e,n)=>[t[iu(t,t=>n[t])]],median:(t,e,n)=>{return[t[uu(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}CM.props={};const IM=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=BM(e);return(t,e)=>{var n=e["encode"],t=bO(o,t,e);const[r]=R(n,"x"),[i]=R(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},FM=(IM.props={},(o={})=>(t,e)=>{const i=e["encode"],n=Object.entries(o).map(([t,e])=>{const[n]=R(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(hf);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);t=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[a,nt({},e,{encode:Object.fromEntries(t)})]});function DM(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function zM(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}FM.props={};const WM=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{lw(t);const i=t.getLocalBounds();n.some(t=>{var e=DM(i),t=DM(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?sw(t):n.push(t)}),t}};function GM(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const HM=t=>{const{maxIterations:w=10,maxError:O=.1,padding:M=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=GM(),[v,m]=GM();var a,o,s,l,[c,t]=GM(),[u,n]=GM();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),m(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<w;t++){i.sort((t,e)=>Ec(v(t),v(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=v(h);var d=c(h),p=v(e),d=p-(g+d);d<M&&(d=(M-d)/2,r=Math.max(r,d),m(h,g-d),m(e,p+d))}}if(r<O)break}for(const k of i)k.style.y+=v(k)-g(k)}return i}};function VM(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function qM(t,e,n){return.2126*VM(t)+.7152*VM(e)+.0722*VM(n)}function YM(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=qM(t,n,r),n=qM(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function $M(e,t){return t[iu(t,t=>{return YM(e,"object"==typeof(t=t)?t:X.parseColor(t))})]}const UM=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;YM(t.parsedStyle.fill,e)<n&&t.attr("fill",$M(e,r))}),t)},KM=t=>(t,e)=>(t.forEach(t=>{lw(t);var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(zM(t,e)&&zM(n,e))}(DM(t.getLocalBounds()),e)||sw(t)}),t);var P=1e-6,XM=1e-12,E=Math.PI,ZM=E/2,QM=E/4,JM=2*E,t3=180/E,e3=E/180,n3=Math.abs,r3=Math.atan,i3=Math.atan2,A=Math.cos,a3=Math.ceil,o3=Math.exp,s3=Math.log,l3=Math.pow,T=Math.sin,c3=Math.sign||function(t){return 0<t?1:t<0?-1:0},u3=Math.sqrt,f3=Math.tan;function h3(t){return 1<t?0:t<-1?E:Math.acos(t)}function d3(t){return 1<t?ZM:t<-1?-ZM:Math.asin(t)}function p3(){}function g3(t,e){t&&v3.hasOwnProperty(t.type)&&v3[t.type](t,e)}var y3={Feature:function(t,e){g3(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)g3(n[r].geometry,e)}},v3={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){m3(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)m3(n[r],e,0)},Polygon:function(t,e){b3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)b3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)g3(n[r],e)}};function m3(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function b3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)m3(t[n],e,1);e.polygonEnd()}function x3(t,e){t&&y3.hasOwnProperty(t.type)?y3[t.type](t,e):g3(t,e)}function k3(t){return[i3(t[1],t[0]),d3(t[2])]}function w3(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*T(e),T(t)]}function O3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function M3(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function _3(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function S3(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function E3(t){var e=u3(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function A3(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function L3(t,e){return n3(t)>E&&(t-=Math.round(t/JM)*JM),[t,e]}function P3(t,e,n){return(t%=JM)?e||n?A3(N3(t),j3(e,n)):N3(t):e||n?j3(e,n):L3}function T3(n){return function(t,e){return n3(t+=n)>E&&(t-=Math.round(t/JM)*JM),[t,e]}}function N3(t){var e=T3(t);return e.invert=T3(-t),e}function j3(t,e){var i=A(t),a=T(t),o=A(e),s=T(e);function n(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*i+r*a;return[i3(t*o-e*s,r*i-n*a),d3(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*o-t*s;return[i3(t*o+n*s,r*i+e*a),d3(e*i-r*a)]},n}function C3(t,e){(e=w3(e))[0]-=t,E3(e);t=h3(-e[1]);return((-e[2]<0?-t:t)+JM-P)%JM}function R3(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:p3,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function B3(t,e){return n3(t[0]-e[0])<P&&n3(t[1]-e[1])<P}function I3(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function F3(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(B3(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new I3(r,t,null,!0)),l.push(n.o=new I3(r,null,n,!1)),s.push(n=new I3(i,t,null,!1)),l.push(n.o=new I3(i,null,n,!0))}}),s.length){for(l.sort(e),D3(s),D3(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function D3(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function z3(t){return n3(t[0])<=E?t[0]:c3(t[0])*((n3(t[0])+E)%JM-E)}function W3(y,v,m,b){return function(s){var l,c,u,n=v(s),f=R3(),h=v(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=du(c);var t=function(t,e){var n=z3(e),r=e[1],e=T(r),i=[T(n),-A(n),0],a=0,o=0,s=new Ic;1===e?r=ZM+P:-1===e&&(r=-ZM-P);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=z3(h),p=h[1]/2+QM,g=T(p),y=A(p),v=0;v<f;++v,d=b,g=k,y=x,h=m){var m=u[v],b=z3(m),x=m[1]/2+QM,k=T(x),x=A(x),w=b-d,O=0<=w?1:-1,M=O*w,_=E<M,S=g*k;s.add(i3(S*O*T(M),y*x+S*A(M))),a+=_?w+O*JM:w,_^n<=d^n<=b&&(E3(S=M3(w3(h),w3(m))),E3(M=M3(i,S)),(O=(_^0<=w?-1:1)*d3(M[2]))<r||r===O&&(S[0]||S[1]))&&(o+=_^0<=w?1:-1)}return(a<-P||a<P&&s<-XM)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),F3(c,H3,t,m,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),m(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),m(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(G3))}return e}}function G3(t){return 1<t.length}function H3(t,e){return((t=t.x)[0]<0?t[1]-ZM-P:ZM-t[1])-((e=e.x)[0]<0?e[1]-ZM-P:ZM-e[1])}L3.invert=L3;var V3=W3(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=n3(t-f);n3(l-E)<P?(c.point(f,h=0<(h+e)/2?ZM:-ZM),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(n3(f-d)<P&&(f-=d*P),n3(t-s)<P&&(t-=s*P),l=h,i=e,o=T((n=f)-(r=t)),h=n3(o)>P?r3((T(l)*(a=A(i))*T(r)-T(i)*(r=A(l))*T(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*ZM,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):n3(t[0]-e[0])>P?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-ZM]);function q3(d){var g=A(d),p=6*e3,f=0<g,h=n3(g)>P;function y(t,e){return A(t)*A(e)>g}function v(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=M3(w3(t),w3(e)),h=O3(f,f),d=f[0],p=h-d*d;return p?(r=M3(u,f),_3(u=S3(u,g*h/p),S3(f,-g*d/p)),(p=(f=O3(u,h=r))*f-(d=O3(h,h))*(O3(u,u)-1))<0?void 0:(_3(p=S3(h,(-f-(r=u3(p)))/d),u),p=k3(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=n3((s=a-i)-E)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(n3(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(_3(c=S3(h,(-f+r)/d),u),[p,k3(c)]):void 0):p)):!n&&t}function m(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return W3(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:m(t,e):i?m(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=v(o,r))&&!B3(o,n)&&!B3(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=v(r,o),a.point(n[0],n[1])):(n=v(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=v(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&B3(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=A(r),c=T(r),u=o*a;null==n?(n=r+o*JM,s=r-u/2):(n=C3(l,n),s=C3(l,s),(0<o?n<s:s<n)&&(n+=o*JM));for(var f,h=n;0<o?s<h:h<s;h-=u)f=k3([l,-c*A(h),-c*T(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var Y3=1e9,$3=-Y3;function U3(v,m,b,x){function k(t,e){return v<=t&&t<=b&&m<=e&&e<=x}function w(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?v:b,1<i?x:m),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return n3(t[0]-v)<P?0<e?0:3:n3(t[0]-b)<P?0<e?2:1:n3(t[1]-m)<P?0<e?1:0:0<e?3:2}function O(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=R3(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(v-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(v-r)&&--t;return t}(),e=p&&t,n=(i=du(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),w(null,null,1,r),r.lineEnd()),n&&F3(i,O,t,w,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){k(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=k(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max($3,Math.min(Y3,c)),u=Math.max($3,Math.min(Y3,u))],r=[t=Math.max($3,Math.min(Y3,t)),e=Math.max($3,Math.min(Y3,e))],v,m,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function K3(t,e,n){var r=pu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function X3(t,e,n){var r=pu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function Z3(){return g=p=10,y=90,v=360,m=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(m)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(m)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],v=+t[1],e):[y,v]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(m=+t,u=K3(s,o,90),f=X3(r,n,m),h=K3(c,l,90),d=X3(a,i,m),e):m},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return pu(a3(a/y)*y,i,y).map(h).concat(pu(a3(c/v)*v,l,v).map(d)).concat(pu(a3(r/p)*p,n,p).filter(function(t){return n3(t%y)>P}).map(u)).concat(pu(a3(s/g)*g,o,g).filter(function(t){return n3(t%v)>P}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,v,m}var Q3,J3,t4,e4,n4=t=>t,r4=new Ic,i4=new Ic,a4={point:p3,lineStart:p3,lineEnd:p3,polygonStart:function(){a4.lineStart=o4,a4.lineEnd=c4},polygonEnd:function(){a4.lineStart=a4.lineEnd=a4.point=p3,r4.add(n3(i4)),i4=new Ic},result:function(){var t=r4/2;return r4=new Ic,t}};function o4(){a4.point=s4}function s4(t,e){a4.point=l4,Q3=t4=t,J3=e4=e}function l4(t,e){i4.add(e4*t-t4*e),t4=t,e4=e}function c4(){l4(Q3,J3)}var u4=a4,f4=1/0,h4=f4,d4=-f4,p4=d4;var g4,y4,v4,m4,b4={point:function(t,e){t<f4&&(f4=t);d4<t&&(d4=t);e<h4&&(h4=e);p4<e&&(p4=e)},lineStart:p3,lineEnd:p3,polygonStart:p3,polygonEnd:p3,result:function(){var t=[[f4,h4],[d4,p4]];return d4=p4=-(h4=f4=1/0),t}},x4=0,k4=0,w4=0,O4=0,M4=0,_4=0,S4=0,E4=0,A4=0,L4={point:P4,lineStart:T4,lineEnd:C4,polygonStart:function(){L4.lineStart=R4,L4.lineEnd=B4},polygonEnd:function(){L4.point=P4,L4.lineStart=T4,L4.lineEnd=C4},result:function(){var t=A4?[S4/A4,E4/A4]:_4?[O4/_4,M4/_4]:w4?[x4/w4,k4/w4]:[NaN,NaN];return x4=k4=w4=O4=M4=_4=S4=E4=A4=0,t}};function P4(t,e){x4+=t,k4+=e,++w4}function T4(){L4.point=N4}function N4(t,e){L4.point=j4,P4(v4=t,m4=e)}function j4(t,e){var n=t-v4,r=e-m4,n=u3(n*n+r*r);O4+=n*(v4+t)/2,M4+=n*(m4+e)/2,_4+=n,P4(v4=t,m4=e)}function C4(){L4.point=P4}function R4(){L4.point=I4}function B4(){F4(g4,y4)}function I4(t,e){L4.point=F4,P4(g4=v4=t,y4=m4=e)}function F4(t,e){var n=t-v4,r=e-m4,n=u3(n*n+r*r);O4+=n*(v4+t)/2,M4+=n*(m4+e)/2,_4+=n,S4+=(n=m4*t-v4*e)*(v4+t),E4+=n*(m4+e),A4+=3*n,P4(v4=t,m4=e)}var D4=L4;function z4(t){this._context=t}z4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,JM)}},result:p3};var W4,G4,H4,V4,q4,Y4=new Ic,$4={point:p3,lineStart:function(){$4.point=U4},lineEnd:function(){W4&&K4(G4,H4),$4.point=p3},polygonStart:function(){W4=!0},polygonEnd:function(){W4=null},result:function(){var t=+Y4;return Y4=new Ic,t}};function U4(t,e){$4.point=K4,G4=V4=t,H4=q4=e}function K4(t,e){V4-=t,q4-=e,Y4.add(u3(V4*V4+q4*q4)),V4=t,q4=e}var X4=$4;let Z4,Q4,J4,t6;class e6{constructor(t){this._append=null==t?n6:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return n6;if(e!==Z4){const r=10**e;Z4=e,Q4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return Q4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===J4&&this._append===Q4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,J4=n,Q4=this._append,t6=this._,this._=r),this._+=t6}}result(){var t=this._;return this._="",t.length?t:null}}function n6(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function r6(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),x3(t,a(o))),o.result()}return s.area=function(t){return x3(t,a(u4)),u4.result()},s.measure=function(t){return x3(t,a(X4)),X4.result()},s.bounds=function(t){return x3(t,a(b4)),b4.result()},s.centroid=function(t){return x3(t,a(D4)),D4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,n4):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new e6(r)):new z4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new e6(r)),s},s.projection(e).digits(r).context(n)}function i6(r){return function(t){var e,n=new a6;for(e in r)n[e]=r[e];return n.stream=t,n}}function a6(){}function o6(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),x3(n,t.stream(b4)),e(b4.result()),null!=r&&t.clipExtent(r),t}function s6(i,a,t){return o6(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function l6(t,e,n){return s6(t,[[0,0],e],n)}function c6(r,i,t){return o6(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function u6(i,a,t){return o6(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}a6.prototype={constructor:a6,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var f6=16,h6=A(30*e3);function d6(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:v,polygonStart:function(){r.polygonStart(),g.lineStart=m},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=w3([t,e]),e=E(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],f6,r),r.point(u,f)}function v(){g.point=t,r.lineEnd()}function m(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,f6,r),g.lineEnd=v,v()}return g}):(n=t,i6({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,v,m,b,x,k,w,O,M=o-t,_=s-e,S=M*M+_*_;4*A<S&&h--&&(y=a+f,x=d3(y/=v=u3((p=r+c)*p+(g=i+u)*g+y*y)),m=n3(n3(y)-1)<P||n3(n-l)<P?(n+l)/2:i3(g,p),b=(x=E(m,x))[0],x=x[1],A<(O=_*(k=b-t)-M*(w=x-e))*O/S||.3<n3((M*k+_*w)/S-.5)||r*c+i*u+a*f<h6)&&(L(t,e,n,r,i,a,b,x,m,p/=v,g/=v,y,h,d),d.point(b,x),L(b,x,m,p,g,y,o,s,l,c,u,f,h,d))}}var p6=i6({point:function(t,e){this.stream.point(t*e3,e*e3)}});function g6(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,v;return e?(f=A(e),e=T(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,v=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(v-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,m.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},m);function m(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function y6(t){return v6(function(){return t})()}function v6(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,v=0,m=0,b=0,x=1,k=1,w=null,O=V3,M=null,_=n4,S=.5;function E(t){return l(t[0]*e3,t[1]*e3)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*t3,t[1]*t3]}function L(){var t=g6(f,0,0,x,k,b).apply(null,e(p,g)),t=g6(f,h-t[0],d-t[1],x,k,b);return r=P3(y,v,m),s=A3(e,t),l=A3(r,s),o=d6(s,S),P()}function P(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=p6((n=r,i6({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(O(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(O=t,w=void 0,P()):O},E.postclip=function(t){return arguments.length?(_=t,M=n=i=a=null,P()):_},E.clipAngle=function(t){return arguments.length?(O=+t?q3(w=t*e3):(w=null,V3),P()):w*t3},E.clipExtent=function(t){return arguments.length?(_=null==t?(M=n=i=a=null,n4):U3(M=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==M?null:[[M,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,L()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*e3,g=t[1]%360*e3,L()):[p*t3,g*t3]},E.rotate=function(t){return arguments.length?(y=t[0]%360*e3,v=t[1]%360*e3,m=2<t.length?t[2]%360*e3:0,L()):[y*t3,v*t3,m*t3]},E.angle=function(t){return arguments.length?(b=t%360*e3,L()):b*t3},E.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},E.reflectY=function(t){return arguments.length?(k=t?-1:1,L()):k<0},E.precision=function(t){return arguments.length?(o=d6(s,S=t*t),P()):u3(S)},E.fitExtent=function(t,e){return s6(E,t,e)},E.fitSize=function(t,e){return l6(E,t,e)},E.fitWidth=function(t,e){return c6(E,t,e)},E.fitHeight=function(t,e){return u6(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,L()}}function m6(t){var e=0,n=E/3,r=v6(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*e3,n=t[1]*e3):[e*t3,n*t3]},t}function b6(t,e){var n,r,i,a=T(t),o=(a+T(e))/2;return n3(o)<P?(n=A(t),s.invert=function(t,e){return[t/n,d3(e*n)]},s):(i=u3(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=i3(t,n3(e))*c3(e);return e*o<0&&(n-=E*c3(t)*c3(e)),[n/o,d3((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,T(e)/n]}function l(t,e){e=u3(r-2*o*T(e))/o;return[e*T(t*=o),i-e*A(t)]}}function x6(){return m6(b6).scale(155.424).center([0,33.6442])}function k6(){return x6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function w6(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*T(t),n*T(e)]}}function O6(a){return function(t,e){var n=u3(t*t+e*e),r=a(n),i=T(r),r=A(r);return[i3(t*i,n*r),d3(n&&e*i/n)]}}var M6=w6(function(t){return u3(2/(1+t))});M6.invert=O6(function(t){return 2*d3(t/2)});var _6=w6(function(t){return(t=h3(t))&&t/T(t)});function S6(t,e){return[t,s3(f3((ZM+e)/2))]}function E6(r){var i,a,o,s=y6(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=P3((e=s.rotate())[0]*e3,e[1]*e3,2<e.length?e[2]*e3:0),function(t){return(t=e.invert(t[0]*e3,t[1]*e3))[0]*=t3,t[1]*=t3,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===S6?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function A6(t){return f3((ZM+t)/2)}function L6(t,e){var n=A(t),i=t===e?T(t):s3(n/A(e))/s3(A6(e)/A6(t)),a=n*l3(A6(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=c3(i)*u3(t*t+e*e),r=i3(t,n3(e))*c3(e);return e*i<0&&(r-=E*c3(t)*c3(e)),[r/i,2*r3(l3(a/n,1/i))-ZM]},r):S6;function r(t,e){0<a?e<-ZM+P&&(e=-ZM+P):ZM-P<e&&(e=ZM-P);e=a/l3(A6(e),i);return[e*T(i*t),a-e*A(i*t)]}}function P6(t,e){return[t,e]}function T6(t,e){var n=A(t),r=t===e?T(t):(n-A(e))/(e-t),i=n/r+t;return n3(r)<P?P6:(a.invert=function(t,e){var e=i-e,n=i3(t,n3(e))*c3(e);return e*r<0&&(n-=E*c3(t)*c3(e)),[n/r,i-c3(r)*u3(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*T(t),i-e*A(t)]}}_6.invert=O6(function(t){return t}),S6.invert=function(t,e){return[t,2*r3(o3(e))-ZM]},P6.invert=P6;var N6=1.340264,j6=-.081106,C6=893e-6,R6=.003796,B6=u3(3)/2;function I6(t,e){var e=d3(B6*T(e)),n=e*e,r=n*n*n;return[t*A(e)/(B6*(N6+3*j6*n+r*(7*C6+9*R6*n))),e*(N6+j6*n+r*(C6+R6*n))]}function F6(t,e){var n=A(e),r=A(t)*n;return[n*T(t)/r,T(e)/r]}function D6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function z6(t,e){return[A(e)*T(t),T(e)]}function W6(t,e){var n=A(e),r=1+A(t)*n;return[n*T(t)/r,T(e)/r]}function G6(t,e){return[s3(f3((ZM+e)/2)),-t]}I6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(N6+j6*i+a*(C6+R6*i))-e)/(N6+3*j6*i+a*(7*C6+9*R6*i)))*r)*i*i,!(n3(n)<XM));++o);return[B6*t*(N6+3*j6*i+a*(7*C6+9*R6*i))/A(r),d3(T(r)/B6)]},F6.invert=O6(r3),D6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),n3(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},z6.invert=O6(d3),W6.invert=O6(function(t){return 2*r3(t)}),G6.invert=function(t,e){return[-e,2*r3(o3(t))-ZM]};var H6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=k6(),l=x6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=x6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return s6(f,t,e)},f.fitSize=function(t,e){return l6(f,t,e)},f.fitWidth=function(t,e){return c6(f,t,e)},f.fitHeight=function(t,e){return u6(f,t,e)},f.scale(1070)},geoAlbers:k6,geoAzimuthalEqualArea:function(){return y6(M6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:M6,geoAzimuthalEquidistant:function(){return y6(_6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:_6,geoConicConformal:function(){return m6(L6).scale(109.5).parallels([30,30])},geoConicConformalRaw:L6,geoConicEqualArea:x6,geoConicEqualAreaRaw:b6,geoConicEquidistant:function(){return m6(T6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:T6,geoEqualEarth:function(){return y6(I6).scale(177.158)},geoEqualEarthRaw:I6,geoEquirectangular:function(){return y6(P6).scale(152.63)},geoEquirectangularRaw:P6,geoGnomonic:function(){return y6(F6).scale(144.049).clipAngle(60)},geoGnomonicRaw:F6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,v=i6({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),m=n4;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=v(m(s=t))},x.postclip=function(t){return arguments.length?(m=t,p=e=n=a=null,b()):m},x.clipExtent=function(t){return arguments.length?(m=null==t?(p=e=n=a=null,n4):U3(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=T(d=t%360*e3),r=A(d),b()):d*t3},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return s6(x,t,e)},x.fitSize=function(t,e){return l6(x,t,e)},x.fitWidth=function(t,e){return c6(x,t,e)},x.fitHeight=function(t,e){return u6(x,t,e)},x},geoProjection:y6,geoProjectionMutator:v6,geoMercator:function(){return E6(S6).scale(961/JM)},geoMercatorRaw:S6,geoNaturalEarth1:function(){return y6(D6).scale(175.295)},geoNaturalEarth1Raw:D6,geoOrthographic:function(){return y6(z6).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:z6,geoStereographic:function(){return y6(W6).scale(250).clipAngle(142)},geoStereographicRaw:W6,geoTransverseMercator:function(){var t=E6(G6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:G6});function V6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function q6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter($6),e.find(t=>t.sphere)?{type:"Sphere"}:V6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=r6(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function Y6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[Z3()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function $6(t){return"geoPath"===t.type}Sg=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=et(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Qe(t);if(e=H6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(Y6);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(q6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=r6(i);const u=new Jp({domain:[t,t+n]}),f=new Jp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{var e,n,r;return $6(t)?({style:n,tooltip:r={}}=e=t,Object.assign(Object.assign({},e),{type:"path",tooltip:mf(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>g(t)||[]})})):t})})]},Sg.props={},_s=()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=et(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]};_s.props={};const U6={"composition.geoView":Sg,"composition.geoPath":_s};function K6(){return Object.assign({"data.fetch":Hh,"data.inline":Xh,"data.sortBy":Kh,"data.sort":Yh,"data.filter":qh,"data.pick":$h,"data.rename":Uh,"data.fold":Vh,"data.slice":_d,"data.custom":Zh,"data.map":Qh,"data.cluster":Ah,"data.tree":Lh,"data.sankey":sf,"data.arc":nd,"data.wordCloud":wd,"data.join":Md,"transform.maybeZeroY1":mO,"transform.maybeZeroX":NO,"transform.maybeStackY":PO,"transform.maybeTitle":TO,"transform.maybeSeries":BO,"transform.maybeZeroPadding":GO,"transform.stackY":AO,"transform.binX":CM,"transform.bin":jM,"transform.dodgeX":$O,"transform.jitter":QO,"transform.jitterX":JO,"transform.symmetryY":tM,"transform.diffY":eM,"transform.stackEnter":UO,"transform.normalizeY":KO,"transform.select":oM,"transform.selectX":sM,"transform.selectY":lM,"transform.groupX":xM,"transform.groupY":kM,"transform.groupColor":wM,"transform.group":bM,"transform.maybeSize":CO,"transform.maybeZeroY":jO,"transform.maybeKey":RO,"transform.sortX":_M,"transform.sortY":EM,"transform.sortColor":SM,"transform.flexX":AM,"transform.maybeTupleY":IO,"transform.maybeTupleX":FO,"transform.maybeIdentityY":DO,"transform.maybeIdentityX":zO,"transform.maybeTuple":qO,"transform.maybeVisualPosition":HO,"transform.maybeFunctionAttribute":VO,"transform.maybeGradient":YO,"transform.maybeTooltip":WO,"transform.pack":PM,"transform.sample":IM,"transform.filter":FM,"coordinate.cartesian":Xs,"coordinate.polar":Qs,"coordinate.helix":Js,"coordinate.transpose":tl,"coordinate.theta":el,"coordinate.parallel":il,"coordinate.fisheye":al,"coordinate.radial":rl,"coordinate.radar":ol,"encode.constant":sl,"encode.field":cl,"encode.transform":ll,"encode.column":ul,"mark.interval":_c,"mark.rect":Sc,"mark.line":Eu,"mark.point":Au,"mark.text":Lu,"mark.cell":Pu,"mark.area":Tu,"mark.link":Nu,"mark.image":ju,"mark.polygon":Cu,"mark.box":Ru,"mark.vector":Bu,"mark.lineX":Fu,"mark.lineY":Iu,"mark.connector":Du,"mark.range":Gu,"mark.rangeX":Hu,"mark.rangeY":Vu,"mark.sankey":kf,"mark.path":wf,"mark.treemap":Ef,"mark.pack":Af,"mark.boxplot":If,"mark.shape":Ff,"mark.forceGraph":Sh,"mark.gauge":U0,"mark.tree":Ph,"mark.wordCloud":Sd,"palette.category10":K0,"palette.category20":X0,"scale.linear":Q0,"scale.ordinal":J0,"scale.band":Z0,"scale.identity":t1,"scale.point":e1,"scale.time":n1,"scale.log":r1,"scale.pow":i1,"scale.sqrt":l1,"scale.threshold":a1,"scale.quantile":o1,"scale.quantize":s1,"scale.sequential":c1,"scale.constant":u1,"shape.interval.rect":dg,"shape.interval.hollow":pg,"shape.interval.funnel":gg,"shape.interval.pyramid":vg,"shape.rect.rect":dg,"shape.rect.hollow":pg,"shape.cell.cell":dg,"shape.cell.hollow":pg,"shape.line.line":kg,"shape.line.hv":Og,"shape.line.vh":Mg,"shape.line.hvh":_g,"shape.line.smooth":wg,"shape.point.bowtie":Ag,"shape.point.cross":Lg,"shape.point.diamond":Pg,"shape.point.hexagon":Tg,"shape.point.hollowBowtie":Ng,"shape.point.hollowDiamond":jg,"shape.point.hollowHexagon":Cg,"shape.point.hollow":Rg,"shape.point.hollowSquare":Bg,"shape.point.hollowTriangle":Ig,"shape.point.hollowTriangleDown":Fg,"shape.point.hyphen":Dg,"shape.point.line":zg,"shape.point.plus":Wg,"shape.point.point":Gg,"shape.point.square":Hg,"shape.point.tick":Vg,"shape.point.triangle":qg,"shape.point.triangleDown":Yg,"shape.text.text":U2,"shape.area.area":J2,"shape.area.smooth":tx,"shape.area.hvh":ex,"shape.area.vh":nx,"shape.area.hv":rx,"shape.link.smooth":ax,"shape.link.vhv":ox,"shape.link.arc":sx,"shape.link.link":ix,"shape.image.image":lx,"shape.polygon.polygon":cx,"shape.polygon.ribbon":ux,"shape.box.box":fx,"shape.vector.vector":$g,"shape.label.label":Ax,"shape.text.badge":X2,"shape.lineX.line":hx,"shape.lineY.line":hx,"shape.shape.shape":Nx,"shape.connector.connector":gx,"shape.range.range":dg,"shape.rangeX.range":dg,"shape.rangeY.range":dg,"shape.path.path":Px,"shape.path.hollow":Tx,"theme.classic":Cx,"theme.classicDark":Bx,"theme.academy":Fx,"component.axisX":hk,"component.axisY":dk,"component.axisRadar":pk,"component.axisLinear":uk,"component.axisArc":fk,"component.legendCategory":mk,"component.legendContinuous":bk,"component.legendContinuousBlock":xk,"component.legendContinuousBlockSize":kk,"component.legendContinuousSize":wk,"component.title":_k,"component.sliderX":Pk,"component.sliderY":Tk,"component.scrollbarX":jk,"component.scrollbarY":Ck,"animation.scaleInX":zk,"animation.scaleOutX":Wk,"animation.scaleInY":Gk,"animation.scaleOutY":Hk,"animation.waveIn":Jk,"animation.fadeIn":Vk,"animation.fadeOut":qk,"animation.zoomIn":tw,"animation.zoomOut":ew,"animation.pathIn":nw,"animation.morphing":Qk,"animation.growInX":rw,"animation.growInY":iw,"interaction.elementHighlight":Sw,"interaction.elementHighlightByX":Ew,"interaction.elementHighlightByColor":Aw,"interaction.elementSelect":Pw,"interaction.elementSelectByX":Tw,"interaction.elementSelectByColor":Nw,"interaction.fisheye":Cw,"interaction.chartIndex":jw,"interaction.tooltip":Kw,"interaction.legendFilter":o5,"interaction.legendHighlight":s5,"interaction.brushHighlight":f5,"interaction.brushXHighlight":d5,"interaction.brushYHighlight":g5,"interaction.brushAxisHighlight":M5,"interaction.brushFilter":S5,"interaction.brushXFilter":E5,"interaction.brushYFilter":A5,"interaction.sliderFilter":P5,"interaction.poptip":j5,"interaction.event":I5,"composition.spaceLayer":W5,"composition.spaceFlex":G5,"composition.mark":V5,"composition.view":H5,"composition.facetRect":tO,"composition.repeatMatrix":iO,"composition.facetCircle":uO,"composition.timingKeyframe":fO,"labelTransform.overlapHide":WM,"labelTransform.overlapDodgeY":HM,"labelTransform.overflowHide":KM,"labelTransform.contrastReverse":UM},U6)}function X6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function Z6(t,e,n,r,i){var a=t[0],t=t[1],o=J();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function Q6(t,e,n,r,i){var a=new Jp({range:[e,e+r]}),o=new Jp({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function J6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function t_(t,e,n,r,i){return t[0]}function e_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Jp({range:[s,t]}),c=new Jp({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=X6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function n_(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function r_(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return c_.apply(void 0,u_([[-1,-1]],e,!1))}function i_(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return c_.apply(void 0,u_([[-1,1]],e,!1))}function a_(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return c_.apply(void 0,u_([[1,-1]],e,!1))}function o_(t,e,n,r,i){var a,t=t[0],o=J();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function s_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Jp({range:[s,s+.99*l]}),f=new Jp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=X6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function l_(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Jp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new t0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var c_=function(t,e,n,r,i){var a=t[0],t=t[1],o=J();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},u_=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function f_(t){return 1/Math.tan(t)}function h_(t,e,n,r,i){var a=f_(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function d_(t,e,n,r,i){var a=f_(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function p_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function g_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function y_(t,e,n){return n?new Jp({range:[0,1],domain:[0,e]}).map(t):t}function v_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=y_(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[p_(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[g_(e,s,o,0,1),t]}}}function m_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=y_(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],p_(t[1],s,o,0,1)]},untransform:function(t){return[t[0],g_(t[1],s,o,0,1)]}}}function b_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=y_(a,r,t=void 0!==t&&t),u=y_(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[p_(e,c,s,0,1),p_(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[g_(e,c,s,0,1),g_(t,u,l,0,1)]}}}function x_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Jp({range:[0,r]}),u=new Jp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=p_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=g_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var k_=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},w_=(O_.prototype.update=function(t){this.options=np({},this.options,t),this.recoordinate()},O_.prototype.clone=function(){return new O_(this.options)},O_.prototype.getOptions=function(){return this.options},O_.prototype.clear=function(){this.update({transformations:[]})},O_.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},O_.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},O_.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:k_(k_([],n,!0),[k_([],t,!0)],!1)}),this},O_.prototype.map=function(t){return this.output(t)},O_.prototype.invert=function(t){return this.input(t)},O_.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},O_.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?k_([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(k_([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||rp,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):rp}.apply(void 0,a)},O_.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=J();return e&&t.reverse(),t.forEach(function(t){return tt(p,p,t)}),e&&(e=t=p,(d=new Q(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},O_);function O_(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Q6,translate:Z6,custom:J6,matrix:t_,polar:e_,transpose:n_,scale:c_,"shear.x":h_,"shear.y":d_,reflect:r_,"reflect.x":i_,"reflect.y":a_,rotate:o_,helix:s_,parallel:l_,fisheye:b_,"fisheye.x":v_,"fisheye.y":m_,"fisheye.circular":x_},this.update(t)}function M_(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||uf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=et(t,["type"]);return r(e)(Object.assign({},t))},r]}function __(t,e){var{coordinate:n={}}=t,t=et(t,["coordinate"]),{type:r,transform:i=[]}=n,n=et(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=M_("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function S_(t,e){return t.filter(t=>t.type===e)}function E_(t){return 0<S_(t,"polar").length}function A_(t){return S_(t,"transpose").length%2==1}function L_(t){return 0<S_(t,"theta").length}function P_(t){return 0<S_(t,"radial").length}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}a=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Os=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),xs=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Eo=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),To=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Ms=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),r=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),e=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Lo=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Ps=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function T_(t,e,n){(t.prototype=e.prototype=n).constructor=t}function N_(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function j_(){}var C_=1/.7,So="\\s*([+-]?\\d+)\\s*",ws="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R_=/^#([0-9a-f]{3,8})$/,B_=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),I_=new RegExp(`^rgb\\(${n},${n},${n}\\)$`),F_=new RegExp(`^rgba\\(${So},${So},${So},${ws}\\)$`),D_=new RegExp(`^rgba\\(${n},${n},${n},${ws}\\)$`),z_=new RegExp(`^hsl\\(${ws},${n},${n}\\)$`),W_=new RegExp(`^hsla\\(${ws},${n},${n},${ws}\\)$`),G_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function H_(){return this.rgb().formatHex()}function V_(){return this.rgb().formatRgb()}function q_(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=R_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Y_(e):3===n?new X_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?$_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?$_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=B_.exec(t))?new X_(e[1],e[2],e[3],1):(e=I_.exec(t))?new X_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=F_.exec(t))?$_(e[1],e[2],e[3],e[4]):(e=D_.exec(t))?$_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=z_.exec(t))?nS(e[1],e[2]/100,e[3]/100,1):(e=W_.exec(t))?nS(e[1],e[2]/100,e[3]/100,e[4]):G_.hasOwnProperty(t)?Y_(G_[t]):"transparent"===t?new X_(NaN,NaN,NaN,0):null}function Y_(t){return new X_(t>>16&255,t>>8&255,255&t,1)}function $_(t,e,n,r){return new X_(t=r<=0?e=n=NaN:t,e,n,r)}function U_(t){return(t=t instanceof j_?t:q_(t))?new X_((t=t.rgb()).r,t.g,t.b,t.opacity):new X_}function K_(t,e,n,r){return 1===arguments.length?U_(t):new X_(t,e,n,null==r?1:r)}function X_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Z_(){return"#"+eS(this.r)+eS(this.g)+eS(this.b)}function Q_(){var t=J_(this.opacity);return(1===t?"rgb(":"rgba(")+tS(this.r)+`, ${tS(this.g)}, `+tS(this.b)+(1===t?")":`, ${t})`)}function J_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function tS(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function eS(t){return((t=tS(t))<16?"0":"")+t.toString(16)}function nS(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new iS(t,e,n,r)}function rS(t){var e,n,r,i,a,o,s,l;return t instanceof iS?new iS(t.h,t.s,t.l,t.opacity):(t=t instanceof j_?t:q_(t))?t instanceof iS?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new iS(o,s,l,t.opacity)):new iS}function iS(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function aS(t){return(t=(t||0)%360)<0?t+360:t}function oS(t){return Math.max(0,Math.min(1,t||0))}function sS(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}T_(j_,q_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:H_,formatHex:H_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rS(this).formatHsl()},formatRgb:V_,toString:V_}),T_(X_,K_,N_(j_,{brighter(t){return t=null==t?C_:Math.pow(C_,t),new X_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new X_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new X_(tS(this.r),tS(this.g),tS(this.b),J_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Z_,formatHex:Z_,formatHex8:function(){return"#"+eS(this.r)+eS(this.g)+eS(this.b)+eS(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:Q_,toString:Q_})),T_(iS,function(t,e,n,r){return 1===arguments.length?rS(t):new iS(t,e,n,null==r?1:r)},N_(j_,{brighter(t){return t=null==t?C_:Math.pow(C_,t),new iS(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new iS(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new X_(sS(240<=t?t-240:120+t,n,e),sS(t,n,e),sS(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new iS(aS(this.h),oS(this.s),oS(this.l),J_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=J_(this.opacity);return(1===t?"hsl(":"hsla(")+aS(this.h)+`, ${100*oS(this.s)}%, ${100*oS(this.l)}%`+(1===t?")":`, ${t})`)}}));const lS=Math.PI/180,cS=180/Math.PI;var uS=1.78277,fS=-.29227,hS=-.90649,dS=1.97294,pS=dS*hS,gS=dS*uS,yS=uS*fS- -.14861*hS;function vS(t,e,n,r){return 1===arguments.length?(i=t)instanceof mS?new mS(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof X_?i:U_(i)).r/255,o=i.g/255,l=i.b/255,l=(dS*(o-(a=(yS*l+pS*a-gS*o)/(yS+pS-gS)))-fS*(o=l-a))/hS,new mS((l=(s=Math.sqrt(l*l+o*o)/(dS*a*(1-a)))?Math.atan2(l,o)*cS-120:NaN)<0?l+360:l,s,a,i.opacity)):new mS(t,e,n,null==r?1:r);var i,a,o,s,l}function mS(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}T_(mS,vS,N_(j_,{brighter(t){return t=null==t?C_:Math.pow(C_,t),new mS(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new mS(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*lS,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new X_(255*(e+n*(-.14861*r+uS*t)),255*(e+n*(fS*r+hS*t)),255*(e+dS*r*n),this.opacity)}}));var bS=t=>()=>t;function xS(e,n){return function(t){return e+t*n}}function kS(a){return 1==(a=+a)?wS:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):bS(isNaN(t)?e:t);var n,r,i}}function wS(t,e){var n=e-t;return n?xS(t,n):bS(isNaN(t)?e:t)}!function t(e){var o=kS(e);function n(e,t){var n=o((e=K_(e)).r,(t=K_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=wS(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);OS=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var OS,MS=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=K_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=OS(r),i=OS(i),a=OS(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function _S(s){return function t(o){function e(e,t){var n=s((e=vS(e)).h,(t=vS(t)).h),r=wS(e.s,t.s),i=wS(e.l,t.l),a=wS(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}_S(function(t,e){var n=e-t;return n?xS(t,180<n||n<-180?n-360*Math.round(n/360):n):bS(isNaN(t)?e:t)});var Ls=_S(wS),zs=t=>MS(t[t.length-1]),Ao=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),No=zs(Ao),Fo=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),zo=zs(Fo),Wo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),Ho=zs(Wo),c=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),Go=zs(c),Vo=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),qo=zs(Vo),Es=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),Po=zs(Es),Ns=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),As=zs(Ns),i=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),Do=zs(i),ac=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),Ss=zs(ac),Rs=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),Sg=zs(Rs),_s=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),So=zs(_s),n=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),ws=zs(n),SS=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),ES=zs(SS),AS=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),LS=zs(AS),PS=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),TS=zs(PS),NS=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),jS=zs(NS),CS=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),RS=zs(CS),BS=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),IS=zs(BS),FS=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),DS=zs(FS),zS=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),WS=zs(zS),GS=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),HS=zs(GS),VS=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),qS=zs(VS),YS=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),$S=zs(YS),US=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),KS=zs(US),XS=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),ZS=zs(XS),QS=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),JS=zs(QS),tE=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),zs=zs(tE);var eE=Ls(vS(300,.5,0),vS(-240,.5,1)),nE=Ls(vS(-100,.75,.35),vS(80,1.5,.8)),Ls=Ls(vS(260,.75,.35),vS(80,1.5,.8)),rE=vS();var iE=K_(),aE=Math.PI/3,oE=2*Math.PI/3;function sE(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var lE=sE(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),cE=sE(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),uE=sE(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fE=sE(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),hE=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:Os,schemeDark2:xs,schemePaired:Eo,schemePastel1:To,schemePastel2:Ms,schemeSet1:r,schemeSet2:e,schemeSet3:Lo,schemeTableau10:Ps,interpolateBrBG:No,schemeBrBG:Ao,interpolatePRGn:zo,schemePRGn:Fo,interpolatePiYG:Ho,schemePiYG:Wo,interpolatePuOr:Go,schemePuOr:c,interpolateRdBu:qo,schemeRdBu:Vo,interpolateRdGy:Po,schemeRdGy:Es,interpolateRdYlBu:As,schemeRdYlBu:Ns,interpolateRdYlGn:Do,schemeRdYlGn:i,interpolateSpectral:Ss,schemeSpectral:ac,interpolateBuGn:Sg,schemeBuGn:Rs,interpolateBuPu:So,schemeBuPu:_s,interpolateGnBu:ws,schemeGnBu:n,interpolateOrRd:ES,schemeOrRd:SS,interpolatePuBuGn:LS,schemePuBuGn:AS,interpolatePuBu:TS,schemePuBu:PS,interpolatePuRd:jS,schemePuRd:NS,interpolateRdPu:RS,schemeRdPu:CS,interpolateYlGnBu:IS,schemeYlGnBu:BS,interpolateYlGn:DS,schemeYlGn:FS,interpolateYlOrBr:WS,schemeYlOrBr:zS,interpolateYlOrRd:HS,schemeYlOrRd:GS,interpolateBlues:qS,schemeBlues:VS,interpolateGreens:$S,schemeGreens:YS,interpolateGreys:KS,schemeGreys:US,interpolatePurples:ZS,schemePurples:XS,interpolateReds:JS,schemeReds:QS,interpolateOranges:zs,schemeOranges:tE,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:eE,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return rE.h=360*t-100,rE.s=1.5-1.5*e,rE.l=.8-.9*e,rE+""},interpolateWarm:nE,interpolateCool:Ls,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,iE.r=255*(e=Math.sin(t))*e,iE.g=255*(e=Math.sin(t+aE))*e,iE.b=255*(e=Math.sin(t+oE))*e,iE+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:lE,interpolateMagma:cE,interpolateInferno:uE,interpolatePlasma:fE});function dE(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return ME(t,gf)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?bE(t):void 0===r?wE(e)?bE(t):OE(e)?"time":xE(t,i):wE([r])?bE(t):OE(e)?"time":xE(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)hf(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return kE(e);case"quantile":return function(t){return kE(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)hf(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Lp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:L_(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Qe(e),i=hE["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=mE(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return mE(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function pE(t,e){var[e]=M_("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[lf,lf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function gE(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(yE)?Bc(e):t.every(vE)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function yE(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function vE(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function mE(t,e,n,r,i){var[i]=M_("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Qe(t),i=hE["scheme"+e],a=hE["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function bE(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function xE(t,e){return"color"!==t||e?"linear":"sequential"}function kE(t){return Array.from(new Set(t.flat()))}function wE(t){return ME(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function OE(t){return ME(t,t=>t instanceof Date)}function ME(t,e){for(const n of t)if(n.some(e))return!0;return!1}const _E={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},SE={threshold:"threshold",quantize:"quantize",quantile:"quantile"},EE={ordinal:"ordinal",band:"band",point:"point"},AE={constant:"constant"};function LE(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=M_("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=M_("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?A_(i)?t+"Y":t+"X":"y"===e?A_(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=t.filter(t=>"string"!=typeof t.type||["shape","size","color","opacity"].includes(t.name)).filter(t=>!("constant"===t.type&&"size"===t.name)),n=e.filter(t=>!t.field),r=e.filter(t=>!!t.field),i=new Map(Array.from(Wc(r,t=>t.field)).map(([t,e])=>[t,[...e,...n.filter(t=>"constant"===t.type)]]).concat([[void 0,n]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];const l=(t,e)=>{t=L0(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",(()=>{var t=[["shape","discrete"],["shape","constant"]],e=[["size","constant"]],n=[["opacity","discrete"],["opacity","constant"]],r=[];for(const i of[["color","discrete"],["color","constant"]])for(const a of t)for(const o of e)for(const s of n)[i,a,o,s].every(t=>"constant"===t[1])||r.push(...l([a,o,s],i));return r.sort((t,e)=>e.length-t.length)})()],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",l([["opacity","continuous"]],["color","distribution"])],["legendContinuous",l([["opacity","continuous"]],["color","continuous"])]];t=Array.from(i).map(([,t])=>{var e,n,r=L0(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in _E?"continuous":t in EE?"discrete":t in SE?"distribution":t in AE?"constant":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>fn(i(t),i(a))))return[e,o];return null}).filter(hf);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<S_(n,"helix").length||L_(n))&&(!A_(n)||!E_(n)&&!P_(n))){if(e.startsWith("x"))return E_(n)?["axisArc",[t]]:P_(n)?["axisLinear",[t]]:[A_(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return E_(n)?["axisLinear",[t]]:P_(n)?["axisArc",[t]]:[A_(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<S_(n,"radar").length)return["axisRadar",[t]];if(!E_(n))return["axisY",[t]]}}return null}).filter(hf)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=TE(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=NE(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=TE(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<S_(t,"parallel").length}(i))return null===(s=NE(n))?e:A_(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=TE(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(E_(i))return["center",null];if(P_(i))return["center",null];if("axisX"===t&&function(t){return 0<S_(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<S_(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&E_(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function PE(t,e,n,r,i){var[a]=M_("component",r),{scales:o=[],bbox:s}=t,t=et(t,["scales","bbox"]),l=o.map(t=>pE(t,r)),s={bbox:s,scales:o,library:r};return a(t)({coordinate:e,library:r,markState:i,scales:l,theme:n,value:s})}function TE(t){var e,n=S_(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Zs(n),[n,e]):(n=S_(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=nl(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function NE(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function jE(t,e){var t=function(t,e){var n=Wc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+cf(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function CE(t,B,e){var I=Wc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:F,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=F+D,G={top:[t,0,o,r,"vertical",!0,Ec],right:[W-n,r,n,a,"horizontal",!1,Ec],bottom:[t,s-i,o,i,"vertical",!1,Ec],left:[0,r,t,a,"horizontal",!0,Ec],"top-left":[t,0,o,r,"vertical",!0,Ec],"top-right":[t,0,o,r,"vertical",!0,Ec],"bottom-left":[t,s-i,o,i,"vertical",!1,Ec],"bottom-right":[t,s-i,o,i,"vertical",!1,Ec],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[C,t]of I.entries()){var l=G[C],[c,H]=E0(t,t=>"string"==typeof t.type&&("center"===C||!(!t.type.startsWith("axis")||!["inner","outer"].includes(C))));if(c.length){p=d=h=f=u=void 0;var u=c,f=B,h=l,d=C,[u,p]=E0(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(v=y=g=c=void 0,u),g=f,y=h,v=d;if("center"===v)if(!function(t){return xu(t)&&vu(t)}(g)){if(vu(g)){u=void 0;d=void 0;m=void 0;b=void 0;x=void 0;k=void 0;u=c;d=y;var[m,b,x,k]=d;for(const tt of u)tt.bbox={x:m,y:b,width:x,height:k}}else if(xu(g)){d=void 0;u=void 0;w=void 0;O=void 0;d=c;u=g;var w=y;var O=c[0].orientation;"horizontal"===O?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,w):"vertical"===O&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,w)}}else{M=void 0;O=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var M=c;O=y;var[_,S,E,A]=O;for(const R of M)R.bbox={x:_,y:S,width:E,height:A},R.radar={index:M.indexOf(R),count:M.length}}else if("inner"===v){L=void 0;d=void 0;u=void 0;V=void 0;q=void 0;w=void 0;P=void 0;T=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[V,q,,u]=u,[w,P]=d.getCenter(),[d]=Ou(d),u=u/2,T=d*u,Y=w-T,$=P-T;for(let t=0;t<L.length;t++)L[t].bbox={x:V+Y,y:q+$,width:2*T,height:2*T}}else if("outer"===v){g=void 0;d=void 0;U=void 0;K=void 0;X=void 0;Z=void 0;g=c;d=y;var[U,K,X,Z]=d;for(const et of g)et.bbox={x:U,y:K,width:X,height:Z}}J=Q=j=y=c=v=P=u=N=void 0;var N=p,u=f,P=h;if(0!==N.length){var[P,v,c,y]=P,[u]=Ou(u),j=y/2*u/Math.sqrt(2),Q=P+c/2,J=v+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:Q-j,y:J-j,width:2*j,height:2*j}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],v=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=v;t<n.length;t++){var m=n[t],b=m["size"];m.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function RE(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=et(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function BE(t,i,a){return ue(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=M_("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=et(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ue(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),lf)}([et(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?S0(n):[],Object.assign(Object.assign({},i),{data:n})]})}function IE(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function FE(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=_0(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return hf(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function DE(t,e,n){var r=e["encode"];return r?(r=_0(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function zE(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=M_("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=_0(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function WE(t,e,n){var{tooltip:r={}}=e;return yf(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:gf(r)&&bf(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function GE(g,t,e){const{data:y,encode:v,tooltip:n={}}=t;var r,i,a,o;return yf(n)?[g,t]:(r=e=>{if(!e)return e;if("string"==typeof e)return g.map(t=>({name:e,value:y[t][e]}));if(gf(e)){var{field:t,channel:n,color:r,name:i=t,valueFormatter:a=t=>t}=e,o="string"==typeof a?$x(a):a,s=n&&v[n],a=s&&v[n].field,l=i||a||n,c=[];for(const d of g){var u=t?y[d][t]:s?v[n].value[d]:null;u&&(c[d]={name:l,color:r,value:o(u)})}return c}if("function"!=typeof e)return e;var f=[];for(const p of g){var h=e(y[p],p,y,v);gf(h)?f[p]=h:f[p]={value:h}}return f},{title:o,items:i=[]}=n,a=et(n,["title","items"]),o=Object.assign({title:r(o),items:Array.isArray(i)?i.map(r):[]},a),[g,Object.assign(Object.assign({},t),{tooltip:o})])}function HE(l,t,e){var n,r=t["encode"],i=et(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=et(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function VE(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function qE(t,e,n){var r=e["animate"];return r||void 0===r||nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function YE(l,c,u){return ue(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ue(this,void 0,void 0,function*(){var t=c["library"],[t]=M_("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[RE,BE,IE,FE,DE,zE,HE,qE,VE,WE,...e.map(t),...r.map(t),...n.map(t),GE];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(l,c,{library:u});const{encode:n,scale:h,data:r,tooltip:i}=e;if(!1===Array.isArray(r))return null;const a=c["channels"],o=Hc(Object.entries(n).filter(([,t])=>hf(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=a.find(t=>t.name===e);return null!=n&&n.independent?t:e});var s=a.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:f}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=et(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:s,tooltip:i})]})}function $E(F,D,z,W){var G;return ue(this,void 0,void 0,function*(){const[n]=M_("composition",z);var[t]=M_("interaction",z);const r=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(hf)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[F],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?ZE(h,f,z):yield KE(f,z),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>__(t,z)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>XE(t,z)));gE(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),gE(h,"y");for(let t=0;t<p.length;t++){var y=p[t],v=g[t];l.set(y,v)}}}else{d="mark"===i(f)?f:yield a8(f,z),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(C5.BEFORE_PAINT);const m=new Map,b=new Map,x=[];D.selectAll(c8(H)).data(o,t=>t.key).join(t=>t.append("g").attr("className",H).attr("id",t=>t.key).call(UE).each(function(t){QE(t,it(this),x,z),m.set(t,this)}),t=>t.call(UE).each(function(t){QE(t,it(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var k=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(h,d,p){return f=>ue(this,void 0,void 0,function*(){var t,[e,n]=yield KE(f,d),r=(QE(e,h,[],d),h),i=f,a=e,o=p,[s]=M_("interaction",s=d),l=(l=r.node()).nameInteraction,c=i8(c=i["interaction"]).find(t=>"tooltip"===t.type);(l=l.get("tooltip"))&&(null!=(t=l.destroy)&&t.call(l),t=s(c),l={options:i,view:a,container:r.node(),update:t=>Promise.resolve(t)},t(l,[],o.emitter));for(const u of n)$E(u,h,d,p);return{options:f,view:e}})}(it(e),z,W)})),w=k(m);for(const P of w){const F=P["options"];var O=new Map;P.container.nameInteraction=O;for(const T of i8(F)){var M=t(T)(P,w,W.emitter);O.set(T.type,{destroy:M})}}var _=k(b);for(const N of _){const{options:F,container:j}=N;var S=j.nameInteraction;for(const C of i8(F)){var E=S.get(C.type);E&&null!=(G=E.destroy)&&G.call(E);E=t(C)(N,_,W.emitter);S.set(F.type,{destroy:E})}}const{width:A,height:B}=F;var L=[];for(const R of u){var I=new Promise(e=>ue(this,void 0,void 0,function*(){for(const t of R)yield $E(Object.assign({width:A,height:B},t),D,z,W);e()}));L.push(I)}W.views=o,W.animations=x,W.emitter.emit(C5.AFTER_PAINT);k=x.filter(hf).map(n8).map(t=>t.finished);return Promise.all([...k,...L])})}function UE(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function KE(e,n){return ue(this,void 0,void 0,function*(){var t=function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=et(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>nt(t,e),{}),e=[n,...a].reduce((t,e)=>nt(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ue(this,void 0,void 0,function*(){var[t,e]=M_("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield a8(a,u);const{type:s=uf("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign(Object.assign({},t),{key:l+"-"+e})))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),t=(e.interaction=t.interaction,e.coordinate=t.coordinate,__(t,n));return ZE(yield XE(t,n),t,n)})}function XE(p,g){return ue(this,void 0,void 0,function*(){var[t]=M_("theme",g),[,e]=M_("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(r8(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield YE(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of Wc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>nt(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(hf)));const p=nt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=dE(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function ZE(t,e,n){var[r]=M_("mark",n),[i]=M_("theme",n),[a]=M_("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(r8(l)),p=Array.from(t.values()),g=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),g=LE(function(t,e,n){for(var[r]of n.entries())if("cell"===r.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;n=e[0].defaultShape;if(!["point","line","rect","hollow"].includes(n))return t;e=(null==(e=t.find(t=>"color"===t.name))?void 0:e.field)||null,e={field:e,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[n]]};return[...t,e]}(Array.from(g),p,t),e,n),y=jE(g,e),v=function(t,e,n){var[n]=M_("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new w_(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(y,e,n),p=s?nt({mainLineWidth:1,mainStroke:"#000"},u):u,m=(CE(g,v,y),{}),b=[];for([h,d]of t.entries()){const{children:w,dataDomain:O,modifier:M,key:_}=h,{index:S,channels:E,tooltip:A}=d;var x=_0(Object.fromEntries(E.map(({name:t,scale:e})=>[t,e])),t=>pE(t,n));Object.assign(m,x);const L=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(E,x),[P,T,N]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>hf(t)&&hf(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(S,x,L,v));var k=O||P.length;const j=M?M(T,k,y):[],C=t=>{var e;return null==(e=null==(e=A.title)?void 0:e[t])?void 0:e.value},R=e=>A.items.map(t=>t[e]);k=P.map((t,e)=>{var n=Object.assign({points:T[e],transform:j[e],index:t,markKey:_,viewKey:o},A&&{title:C(t),items:R(t)});for(const[r,i]of Object.entries(L))n[r]=i[t],N&&(n["series"+Qe(r)]=N[e].map(t=>i[t]));return N&&(n.seriesIndex=N[e]),N&&A&&(n.seriesItems=N[e].map(t=>R(t)),n.seriesTitle=N[e].map(t=>C(t))),n}),k=(d.data=k,d.index=P,null==w?void 0:w(k,x,y));b.push(...k||[])}return[{layout:y,theme:i,coordinate:v,components:g,markState:t,key:o,clip:c,scale:m,style:p,labelTransform:JE(f.map(a))},b]}function QE(Z,Q,J,tt){ue(this,void 0,void 0,function*(){const{components:B,theme:n,layout:t,markState:r,coordinate:i,key:e,style:I,clip:a}=Z,{width:F,height:D}=t,z=et(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>df(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>rt(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=it(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=F,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(Q.selectAll(c8(ut)).data(s.filter(t=>hf(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ut).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{enter:r={},update:a={},exit:o={}}=r,{type:s,duration:l=300,delay:c=0}=a,{type:u,duration:f=300,delay:h=0}=r,{type:d,duration:p=300,delay:g=0}=o;for(const _ of i){var{updateType:y=s,updateDuration:v=l,updateDelay:m=c,enterType:b=u,enterDuration:x=f,enterDelay:k=h,exitDuration:w=p,exitDelay:O=g,exitType:M=d}=_;void 0!==y&&!y||(e=Math.max(e,v+m),n=Math.min(n,m)),void 0!==M&&!M||(e=Math.max(e,w+O),n=Math.min(n,O)),void 0!==b&&!b||(e=Math.max(e,x+k),n=Math.min(n,k))}}return e===-1/0?null:[n,e-n]}(r)),y=!!g&&{duration:g[1]};var v,m,b,s=Q.selectAll(c8(lt)).data(B,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",lt).append(t=>PE(nt({animate:y},t),i,n,tt,r)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=PE(nt({animate:y},t),i,n,tt,r)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();J.push(...s.flat().filter(hf));const x=Q.selectAll(c8(st)).data([t],()=>e).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",st).call(o8).call(l8,Array.from(r.keys())).call(u8,a),t=>t.call(l8,Array.from(r.keys())).call(t=>{if(!g)return o8(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(u8,a)).transitions();J.push(...x.flat());for([v,m]of r.entries()){var G=m["data"];const{key:e,class:H,type:A}=v;var k=Q.select("#"+e);const L=function(l,t,e,n){const[c]=M_("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=et(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=_0(y,t=>t8(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:s8(l,n)}))(r,t,p,d,h)}}(v,m,Z,tt),V=(w=v,b=m,e8("enter",w,b,Z,tt)),P=(w=v,b=m,e8("update",w,b,Z,tt)),q=(w=v,b=m,e8("exit",w,b,Z,tt));var w=function(t,e,n,r){t=t.node().parentElement;return t.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(Q,k,H,"element");const x=k.selectAll(c8(ot)).selectFacetAll(w).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){return V(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,s=c,n.__facet__&&(i=n.parentNode.parentNode,o=r.parentNode,[i,a]=s(i),[s,o]=s(o),i=`translate(${i-s}, ${a-o})`,s=n.style.transform,a="none"===(a=s)||void 0===a?"":s,n.style.transform=(a+" "+i).trimStart(),r.append(n));var n,r,i,a,o=L(t,e),s=P(t,[this],[o]);return null===s&&ff(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return q(t,[this])}).remove(),t=>t.append(L).attr("className",ot).attr("markType",A).transition(function(t){var e=this["__fromElements__"],t=P(t,e,[this]);return new Y0(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new Y0([],this.__toData__,this.parentNode).append(L).attr("className",ot).attr("markType",A).nodes();return P(t,[this],e)}).remove()).transitions();J.push(...x.flat())}{var O=Z,M=Q,_=tt,S,E;const[Y]=M_("labelTransform",_),{markState:$,labelTransform:T}=O,U=M.select(c8(at)).node(),N=new Map,j=new Map,K=Array.from($.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=M_("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=et(t,["formatter","transform","style"]),t=_0(Object.assign(Object.assign({},t),a),t=>t8(t,r,e,l)),{shape:a=c,text:o}=t,t=et(t,["shape","text"]),i="string"==typeof i?$x(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,O,_),a=M.select("#"+r).selectAll(c8(ot)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=et(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),j.set(t,e)}),t})})}),C=it(U).selectAll(c8(ct)).data(K,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",ct),t=>t.each(function(t){ff(this,N.get(t)(t))}),t=>t.remove()).nodes(),X=Wc(C,t=>j.get(t.__data__)),R=O["coordinate"];for([S,E]of X){var{transform:S=[]}=S;JE(S.map(Y))(E,R)}T&&T(C,R)}})}function JE(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function t8(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function e8(o,t,e,n,r){var[,i]=M_("shape",r);const[s]=M_("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Qe(o)}Animation`;const{[e]:c}=i(s8(t,r)).props,{[o]:u={}}=a,f=(null==(n=t.animate)?void 0:n[o])||{};return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function n8(t){return t.finished.then(()=>{t.cancel()}),t}function r8(t={}){var e;return"string"==typeof t?{type:t}:({type:e="classic"}=t,t=et(t,["type"]),Object.assign(Object.assign({},t),{type:e}))}function i8(t){var{interaction:t={}}=t;return Object.entries(nt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0},t)).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function a8(r,i){return ue(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=et(r,["data"]);return null==e?r:([,{data:e}]=yield BE(0,{data:e},t),Object.assign({data:e},n))})}function o8(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function s8(t,e){t=t.type;return"string"==typeof e?t+"."+e:e}function l8(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(c8(N)).data(e,t=>t.key).join(t=>t.append("g").attr("className",N).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(c8(at)).node())||t.append("g").attr("className",at).style("zIndex",0)}function c8(...t){return t.map(t=>"."+t).join("")}function u8(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new X.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function f8(t){for(var t=nt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function h8(t,e={},n,r){const{width:i=640,height:a=480,theme:o}=t,s=(o||uf('ChartOptions.theme is required, such as `const chart = new Chart({ theme: "classic"})`.'),f8(t)),{canvas:l=(t=i,f=a,h=new S.Renderer,h.registerPlugin(new $s),new X.Canvas({width:t,height:f,container:document.createElement("div"),renderer:h})),library:c=K6(),emitter:u=new Us}=e;var f,h;e.canvas=l,e.library=c,e.emitter=u,l.resize(i,a),u.emit(C5.BEFORE_RENDER);const d=it(l.document.documentElement);return l.ready.then(()=>$E(Object.assign(Object.assign({},s),{width:i,height:a}),d,c,e)).then(()=>{u.emit(C5.AFTER_RENDER),null!=n&&n()}).catch(t=>{null!=r&&r(t)}),"string"==typeof(t=l.getConfig().container)?document.getElementById(t):t}function d8(t,e={},n=!1){var r,{canvas:e,emitter:i}=e;e&&(null!=(r=(r=e).getRoot().querySelectorAll("."+H))&&r.forEach(t=>{var{nameInteraction:t=new Map}=t;0<(null==t?void 0:t.size)&&Array.from(null==t?void 0:t.values()).forEach(t=>{null!=t&&t.destroy()})}),n?e.destroy():e.destroyChildren()),i.off()}function p8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function g8(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function y8(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?p8(t,n):"array"===e?g8(t,n):"object"===e?y8(t,n):"node"===e?function(t,{name:n,ctor:r}){t.prototype[n]=function(t){var e=this.append(r);return"mark"===n&&(e.type=t),e}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"mix"===e&&function(t,{name:r}){t.prototype[r]=function(t){var e,n;return 0===arguments.length?this.attr(r):Array.isArray(t)?this.attr(r,{items:t}):gf(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t?this.attr(r,t):({items:n=[]}=e=this.attr(r)||{},n.push(t),e.items=n,this.attr(r,e))}}(t,n)}return t}}function v8(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function m8(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class b8{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return m8(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return m8(this,t=>{e===t.type&&n.push(t)}),n}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class x8 extends b8{changeData(t){var e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.getRoot())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.getRoot())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.getRoot())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}}a=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"},{name:"tooltip",type:"mix"}];let k8=class extends x8{constructor(){super({})}},w8=(k8=t([g(a)],k8),class extends x8{constructor(){super({},"interval")}}),O8=(w8=t([g(a)],w8),class extends x8{constructor(){super({},"rect")}}),M8=(O8=t([g(a)],O8),class extends x8{constructor(){super({},"point")}}),_8=(M8=t([g(a)],M8),class extends x8{constructor(){super({},"area")}}),S8=(_8=t([g(a)],_8),class extends x8{constructor(){super({},"line")}}),E8=(S8=t([g(a)],S8),class extends x8{constructor(){super({},"cell")}}),A8=(E8=t([g(a)],E8),class extends x8{constructor(){super({},"vector")}}),L8=(A8=t([g(a)],A8),class extends x8{constructor(){super({},"link")}}),P8=(L8=t([g(a)],L8),class extends x8{constructor(){super({},"polygon")}});P8=t([g(a)],P8);Os=t([g(a)],class extends x8{constructor(){super({},"image")}});let T8=class extends x8{constructor(){super({},"text")}},N8=(T8=t([g(a)],T8),class extends x8{constructor(){super({},"box")}}),j8=(N8=t([g(a)],N8),class extends x8{constructor(){super({},"lineX")}}),C8=(j8=t([g(a)],j8),class extends x8{constructor(){super({},"lineY")}}),R8=(C8=t([g(a)],C8),class extends x8{constructor(){super({},"range")}}),B8=(R8=t([g(a)],R8),class extends x8{constructor(){super({},"rangeX")}}),I8=(B8=t([g(a)],B8),class extends x8{constructor(){super({},"rangeY")}}),F8=(I8=t([g(a)],I8),class extends x8{constructor(){super({},"connector")}}),D8=(F8=t([g(a)],F8),class extends x8{constructor(){super({},"shape")}}),z8=(D8=t([g(a)],D8),class extends x8{constructor(){super({},"sankey")}}),W8=(z8=t([g([...a,{name:"layout",type:"value"}])],z8),class extends x8{constructor(){super({},"treemap")}}),G8=(W8=t([g([...a,{name:"layout",type:"value"}])],W8),class extends x8{constructor(){super({},"boxplot")}}),H8=(G8=t([g(a)],G8),class extends x8{constructor(){super({},"pack")}}),V8=(H8=t([g([...a,{name:"layout",type:"value"}])],H8),class extends x8{constructor(){super({},"forceGraph")}}),q8=(V8=t([g([...a,{name:"layout",type:"value"}])],V8),class extends x8{constructor(){super({},"tree")}}),Y8=(q8=t([g([...a,{name:"layout",type:"value"}])],q8),class extends x8{constructor(){super({},"wordCloud")}}),$8=(Y8=t([g([...a,{name:"layout",type:"object"}])],Y8),class extends x8{constructor(){super({},"gauge")}});$8=t([g(a)],$8);xs={mark:k8,interval:w8,rect:O8,point:M8,area:_8,line:S8,cell:E8,vector:A8,link:L8,polygon:P8,image:Os,text:T8,box:N8,lineX:j8,lineY:C8,range:R8,rangeX:B8,rangeY:I8,connector:F8,sankey:z8,treemap:W8,boxplot:G8,shape:D8,pack:H8,forceGraph:V8,tree:q8,wordCloud:Y8,gauge:$8};class U8 extends b8{changeData(e){var t,n=this.getRoot();if(n)return this.attr("data",e),null!=(t=this.children)&&t.length&&this.children.forEach(t=>{t.attr("data",e)}),null==n?void 0:n.render()}getView(){var t=this.getRoot().getContext()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this.attr("key"))}getScale(){var t;return null==(t=this.getView())?void 0:t.scale}getScaleByChannel(t){var e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&lw(t)}hide(){var t=this.getGroup();t&&t.isVisible()&&sw(t)}}let K8=class extends U8{constructor(t={},e="view"){super(t,e)}},X8=(K8=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...v8(xs)])],K8),class extends U8{constructor(){super({},"spaceLayer")}}),Z8=(X8=t([g([{type:"value",name:"data"},...v8(xs)])],X8),class extends U8{constructor(){super({},"spaceFlex")}}),Q8=(Z8=t([g([{type:"value",name:"data"},...v8(xs)])],Z8),class extends U8{constructor(){super({},"facetRect")}}),J8=(Q8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...v8(xs)])],Q8),class extends U8{constructor(){super({},"facetCircle")}}),tA=(J8=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...v8(xs)])],J8),class extends U8{constructor(){super({},"repeatMatrix")}}),eA=(tA=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...v8(xs)])],tA),class extends U8{constructor(){super({},"timingKeyframe")}}),nA=(eA=t([g([...v8(xs)])],eA),class extends U8{constructor(){super({},"geoView")}}),rA=(nA=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...v8(xs)])],nA),class extends U8{constructor(){super({},"geoPath")}});rA=t([g([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...v8(xs)])],rA);var iA={view:K8,spaceLayer:X8,spaceFlex:Z8,facetRect:Q8,facetCircle:J8,repeatMatrix:tA,timingKeyframe:eA,geoView:nA,geoPath:rA};for(const cA of Object.values(iA))g(v8(iA))(cA);const aA=K6();const oA=["container","renderer"];function sA(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function lA(t){var e,t=null!==(t=t).type?t:((e=t.children[t.children.length-1]).attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e.attr("insetLeft",t.attr("insetLeft")),e.attr("insetRight",t.attr("insetRight")),e.attr("insetBottom",t.attr("insetBottom")),e.attr("insetTop",t.attr("insetTop")),e.attr("marginLeft",t.attr("marginLeft")),e.attr("marginBottom",t.attr("marginBottom")),e.attr("marginTop",t.attr("marginTop")),e.attr("marginRight",t.attr("marginRight")),e.attr("autoFit",t.attr("autoFit")),e.attr("padding",t.attr("padding")),e.attr("margin",t.attr("margin")),e.attr("inset",t.attr("inset")),e.attr("theme",t.attr("theme")),e),n=[t],r=new Map;for(r.set(t,sA(t));n.length;){const t=n.pop();var i=r.get(t);for(const s of t.children){var a=sA(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(t)}Eo=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"transform",type:"array"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},{name:"labelTransform",type:"array"},...v8(xs),...Object.entries(iA).map(([t,e])=>({type:"container",name:t,ctor:e}))];v.Chart=class extends K8{constructor(t){var t=t||{},{container:e,canvas:n,key:r="G2_CHART_KEY"}=t;super(et(t,["container","canvas","key"]),"view"),this.onResize=on(()=>{this.forceFit()},300),this.attr("key",r),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new Us,this._context={library:aA,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=Mf(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new S.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new $s),o.forEach(t=>a.registerPlugin(t)),new X.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise((t,e)=>{try{h8(this.options(),this._context,()=>t(this),e)}catch(t){e(t)}})}options(t){var r;return 0===arguments.length?this._options||lA(this):(this._options=nt(this._options||lA(this),(t=t,r=oA,qe(t,function(t,e,n){return r.includes(n)||(t[n]=e),t},{}))),this)}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){this.options();this.emit(C5.BEFORE_CLEAR),this._options={},d8(0,this._context,!1),this.emit(C5.AFTER_CLEAR)}destroy(){var t,e;this.options();this.emit(C5.BEFORE_DESTROY),this.unbindAutoFit(),this._options={},d8(0,this._context,!0),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(C5.AFTER_DESTROY)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=Mf(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(C5.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(C5.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},v.Chart=t([g(Eo)],v.Chart),v.AREA_CLASS_NAME=ut,v.COMPONENT_CLASS_NAME=lt,v.ChartEvent=C5,v.CompositionNode=U8,v.ELEMENT_CLASS_NAME=ot,v.LABEL_CLASS_NAME=ct,v.LABEL_LAYER_CLASS_NAME=at,v.MAIN_LAYER_CLASS_NAME=N,v.MarkNode=x8,v.PLOT_CLASS_NAME=st,v.VIEW_CLASS_NAME=H,v.createLibrary=K6,v.register=function(t,e){Object.assign(aA,{[t]:e})},v.render=h8,v.renderToMountedElement=function(t,e={},n){var r,{width:i=640,height:a=480}=t,t=f8(t);const{library:o=K6(),group:s=new X.Group,emitter:l=new Us}=e;if(null!=s&&s.parentElement)return r=it(s),e.group=s,e.library=o,(e.emitter=l).emit(C5.BEFORE_RENDER),$E(Object.assign(Object.assign({},t),{width:i,height:a}),r,o,e).then(()=>{l.emit(C5.AFTER_RENDER),null!=n&&n()}),s;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(v,"__esModule",{value:!0})});