@antv/g 5.0.19 → 5.0.22-alpha.1

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 (506) hide show
  1. package/dist/index.umd.min.js +16 -17
  2. package/es/Canvas.d.ts +39 -6
  3. package/es/Canvas.js +59 -23
  4. package/es/camera/Camera.d.ts +14 -7
  5. package/es/camera/Camera.js +56 -25
  6. package/es/camera/Landmark.d.ts +2 -0
  7. package/es/camera/Landmark.js +9 -3
  8. package/es/css/CSS.d.ts +84 -0
  9. package/es/css/CSS.js +113 -0
  10. package/es/css/CSSProperty.d.ts +40 -0
  11. package/es/css/CSSProperty.js +1 -0
  12. package/es/css/LayoutRegistry.d.ts +11 -0
  13. package/es/css/LayoutRegistry.js +22 -0
  14. package/es/css/StyleValueRegistry.d.ts +113 -0
  15. package/es/css/StyleValueRegistry.js +887 -0
  16. package/es/css/cssom/CSSColorValue.d.ts +23 -0
  17. package/es/css/cssom/CSSColorValue.js +43 -0
  18. package/es/css/cssom/CSSGradientValue.d.ts +39 -0
  19. package/es/css/cssom/CSSGradientValue.js +54 -0
  20. package/es/css/cssom/CSSImageValue.d.ts +1 -0
  21. package/es/css/cssom/CSSImageValue.js +0 -0
  22. package/es/css/cssom/CSSKeywordValue.d.ts +15 -0
  23. package/es/css/cssom/CSSKeywordValue.js +37 -0
  24. package/es/css/cssom/CSSMathInvert.d.ts +14 -0
  25. package/es/css/cssom/CSSMathInvert.js +84 -0
  26. package/es/css/cssom/CSSMathMax.d.ts +17 -0
  27. package/es/css/cssom/CSSMathMax.js +118 -0
  28. package/es/css/cssom/CSSMathMin.d.ts +17 -0
  29. package/es/css/cssom/CSSMathMin.js +119 -0
  30. package/es/css/cssom/CSSMathNegate.d.ts +14 -0
  31. package/es/css/cssom/CSSMathNegate.js +80 -0
  32. package/es/css/cssom/CSSMathOperator.d.ts +11 -0
  33. package/es/css/cssom/CSSMathOperator.js +32 -0
  34. package/es/css/cssom/CSSMathProduct.d.ts +16 -0
  35. package/es/css/cssom/CSSMathProduct.js +109 -0
  36. package/es/css/cssom/CSSMathSum.d.ts +17 -0
  37. package/es/css/cssom/CSSMathSum.js +117 -0
  38. package/es/css/cssom/CSSMathValue.d.ts +11 -0
  39. package/es/css/cssom/CSSMathValue.js +27 -0
  40. package/es/css/cssom/CSSMathVariadic.d.ts +9 -0
  41. package/es/css/cssom/CSSMathVariadic.js +44 -0
  42. package/es/css/cssom/CSSNumericSumValue.d.ts +7 -0
  43. package/es/css/cssom/CSSNumericSumValue.js +1 -0
  44. package/es/css/cssom/CSSNumericValue.d.ts +75 -0
  45. package/es/css/cssom/CSSNumericValue.js +500 -0
  46. package/es/css/cssom/CSSNumericValueType.d.ts +33 -0
  47. package/es/css/cssom/CSSNumericValueType.js +259 -0
  48. package/es/css/cssom/CSSRGB.d.ts +25 -0
  49. package/es/css/cssom/CSSRGB.js +48 -0
  50. package/es/css/cssom/CSSStyleValue.d.ts +53 -0
  51. package/es/css/cssom/CSSStyleValue.js +625 -0
  52. package/es/css/cssom/CSSTransformComponent.d.ts +22 -0
  53. package/es/css/cssom/CSSTransformComponent.js +32 -0
  54. package/es/css/cssom/CSSTransformValue.d.ts +30 -0
  55. package/es/css/cssom/CSSTransformValue.js +48 -0
  56. package/es/css/cssom/CSSTranslate.d.ts +15 -0
  57. package/es/css/cssom/CSSTranslate.js +44 -0
  58. package/es/css/cssom/CSSUnitValue.d.ts +33 -0
  59. package/es/css/cssom/CSSUnitValue.js +252 -0
  60. package/es/css/cssom/index.d.ts +29 -0
  61. package/es/css/cssom/index.js +29 -0
  62. package/es/css/cssom/types.d.ts +86 -0
  63. package/es/css/cssom/types.js +119 -0
  64. package/es/css/index.d.ts +10 -0
  65. package/es/css/index.js +10 -0
  66. package/es/css/parser/color.d.ts +6 -0
  67. package/es/{property-handlers → css/parser}/color.js +26 -43
  68. package/es/css/parser/dimension.d.ts +36 -0
  69. package/es/css/parser/dimension.js +146 -0
  70. package/es/css/parser/filter.d.ts +7 -0
  71. package/es/{property-handlers → css/parser}/filter.js +0 -0
  72. package/es/css/parser/index.d.ts +15 -0
  73. package/es/css/parser/index.js +15 -0
  74. package/es/css/parser/numeric.d.ts +19 -0
  75. package/es/css/parser/numeric.js +62 -0
  76. package/es/css/parser/path.d.ts +5 -0
  77. package/es/{property-handlers → css/parser}/path.js +4 -4
  78. package/es/{property-handlers → css/parser}/points.d.ts +1 -1
  79. package/es/{property-handlers → css/parser}/points.js +5 -0
  80. package/es/css/parser/transform-origin.d.ts +6 -0
  81. package/es/css/parser/transform-origin.js +45 -0
  82. package/es/css/parser/transform.d.ts +15 -0
  83. package/es/{property-handlers → css/parser}/transform.js +16 -139
  84. package/es/css/parser/types.d.ts +2 -0
  85. package/es/css/parser/types.js +1 -0
  86. package/es/css/properties/CSSPropertyAnchor.d.ts +6 -0
  87. package/es/css/properties/CSSPropertyAnchor.js +24 -0
  88. package/es/{property-handlers/clipPath.d.ts → css/properties/CSSPropertyClipPath.d.ts} +4 -2
  89. package/es/css/properties/CSSPropertyClipPath.js +50 -0
  90. package/es/css/properties/CSSPropertyColor.d.ts +13 -0
  91. package/es/css/properties/CSSPropertyColor.js +30 -0
  92. package/es/css/properties/CSSPropertyFilter.d.ts +5 -0
  93. package/es/css/properties/CSSPropertyFilter.js +16 -0
  94. package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +19 -0
  95. package/es/css/properties/CSSPropertyLengthOrPercentage.js +74 -0
  96. package/es/css/properties/CSSPropertyLineDash.d.ts +7 -0
  97. package/es/css/properties/CSSPropertyLineDash.js +25 -0
  98. package/es/css/properties/CSSPropertyLocalPosition.d.ts +20 -0
  99. package/es/css/properties/CSSPropertyLocalPosition.js +46 -0
  100. package/es/css/properties/CSSPropertyOffsetDistance.d.ts +7 -0
  101. package/es/css/properties/CSSPropertyOffsetDistance.js +33 -0
  102. package/es/css/properties/CSSPropertyOffsetPath.d.ts +4 -0
  103. package/es/css/properties/CSSPropertyOffsetPath.js +31 -0
  104. package/es/css/properties/CSSPropertyOpacity.d.ts +9 -0
  105. package/es/css/properties/CSSPropertyOpacity.js +20 -0
  106. package/es/css/properties/CSSPropertyPath.d.ts +14 -0
  107. package/es/css/properties/CSSPropertyPath.js +51 -0
  108. package/es/css/properties/CSSPropertyPoints.d.ts +17 -0
  109. package/es/css/properties/CSSPropertyPoints.js +28 -0
  110. package/es/css/properties/CSSPropertyShadowBlur.d.ts +4 -0
  111. package/es/css/properties/CSSPropertyShadowBlur.js +22 -0
  112. package/es/css/properties/CSSPropertyText.d.ts +6 -0
  113. package/es/css/properties/CSSPropertyText.js +30 -0
  114. package/es/css/properties/CSSPropertyTextTransform.d.ts +4 -0
  115. package/es/css/properties/CSSPropertyTextTransform.js +29 -0
  116. package/es/{property-handlers/transform.d.ts → css/properties/CSSPropertyTransform.d.ts} +7 -15
  117. package/es/css/properties/CSSPropertyTransform.js +157 -0
  118. package/es/css/properties/CSSPropertyTransformOrigin.d.ts +10 -0
  119. package/es/css/properties/CSSPropertyTransformOrigin.js +21 -0
  120. package/es/css/properties/CSSPropertyVisibility.d.ts +11 -0
  121. package/es/css/properties/CSSPropertyVisibility.js +24 -0
  122. package/es/css/properties/CSSPropertyZIndex.d.ts +6 -0
  123. package/es/css/properties/CSSPropertyZIndex.js +33 -0
  124. package/es/css/properties/index.d.ts +18 -0
  125. package/es/css/properties/index.js +18 -0
  126. package/es/display-objects/Circle.d.ts +3 -4
  127. package/es/display-objects/Circle.js +3 -2
  128. package/es/display-objects/DisplayObject.d.ts +27 -10
  129. package/es/display-objects/DisplayObject.js +131 -149
  130. package/es/display-objects/Ellipse.d.ts +5 -7
  131. package/es/display-objects/Ellipse.js +4 -3
  132. package/es/display-objects/Group.d.ts +14 -11
  133. package/es/display-objects/Group.js +12 -4
  134. package/es/display-objects/HTML.d.ts +3 -3
  135. package/es/display-objects/Image.d.ts +3 -5
  136. package/es/display-objects/Image.js +3 -3
  137. package/es/display-objects/Line.d.ts +7 -6
  138. package/es/display-objects/Line.js +3 -5
  139. package/es/display-objects/Path.d.ts +2 -2
  140. package/es/display-objects/Path.js +1 -3
  141. package/es/display-objects/Polyline.js +1 -3
  142. package/es/display-objects/Rect.d.ts +5 -7
  143. package/es/display-objects/Rect.js +4 -3
  144. package/es/display-objects/Text.d.ts +15 -19
  145. package/es/display-objects/Text.js +13 -14
  146. package/es/dom/AnimationTimeline.d.ts +3 -0
  147. package/es/dom/AnimationTimeline.js +5 -5
  148. package/es/dom/Document.d.ts +12 -0
  149. package/es/dom/Document.js +133 -11
  150. package/es/dom/Element.d.ts +6 -1
  151. package/es/dom/Element.js +13 -3
  152. package/es/dom/FederatedEvent.d.ts +1 -5
  153. package/es/dom/FederatedEvent.js +0 -10
  154. package/es/dom/MutationObserver.d.ts +0 -1
  155. package/es/dom/MutationObserver.js +6 -3
  156. package/es/dom/interfaces.d.ts +14 -2
  157. package/es/dom/interfaces.js +1 -0
  158. package/es/global-module.d.ts +0 -8
  159. package/es/global-module.js +25 -71
  160. package/es/index.d.ts +4 -5
  161. package/es/index.js +9 -10
  162. package/es/plugins/CullingPlugin.js +2 -2
  163. package/es/plugins/DirtyCheckPlugin.d.ts +0 -1
  164. package/es/plugins/DirtyCheckPlugin.js +5 -8
  165. package/es/plugins/EventPlugin.d.ts +1 -0
  166. package/es/plugins/EventPlugin.js +74 -19
  167. package/es/plugins/PrepareRendererPlugin.d.ts +1 -0
  168. package/es/plugins/PrepareRendererPlugin.js +13 -19
  169. package/es/services/EventService.d.ts +1 -0
  170. package/es/services/EventService.js +59 -21
  171. package/es/services/OffscreenCanvasCreator.d.ts +13 -0
  172. package/es/services/{text/OffscreenCanvasCreator.js → OffscreenCanvasCreator.js} +23 -12
  173. package/es/services/RenderingContext.d.ts +2 -1
  174. package/es/services/RenderingContext.js +3 -1
  175. package/es/services/RenderingService.d.ts +35 -2
  176. package/es/services/RenderingService.js +52 -11
  177. package/es/services/SceneGraphSelector.d.ts +3 -1
  178. package/es/services/SceneGraphSelector.js +43 -12
  179. package/es/services/SceneGraphService.d.ts +7 -1
  180. package/es/services/SceneGraphService.js +15 -12
  181. package/es/services/{text/index.d.ts → TextService.d.ts} +5 -4
  182. package/es/services/{text/index.js → TextService.js} +35 -39
  183. package/es/services/aabb/CircleUpdater.js +6 -17
  184. package/es/services/aabb/EllipseUpdater.js +6 -23
  185. package/es/services/aabb/LineUpdater.js +4 -4
  186. package/es/services/aabb/RectUpdater.d.ts +2 -2
  187. package/es/services/aabb/RectUpdater.js +21 -16
  188. package/es/services/aabb/TextUpdater.d.ts +3 -1
  189. package/es/services/aabb/TextUpdater.js +63 -25
  190. package/es/services/aabb/interfaces.d.ts +3 -2
  191. package/es/services/aabb/interfaces.js +3 -2
  192. package/es/services/index.d.ts +2 -2
  193. package/es/services/index.js +2 -2
  194. package/es/shapes/index.d.ts +0 -1
  195. package/es/shapes/index.js +1 -2
  196. package/es/types.d.ts +64 -28
  197. package/es/types.js +2 -1
  198. package/es/utils/animation.js +1 -1
  199. package/es/utils/assert.d.ts +3 -0
  200. package/es/utils/assert.js +15 -0
  201. package/es/utils/custom-easing.d.ts +0 -9
  202. package/es/utils/custom-easing.js +37 -53
  203. package/es/utils/event.d.ts +41 -9
  204. package/es/utils/event.js +2 -65
  205. package/es/utils/index.d.ts +1 -1
  206. package/es/utils/index.js +1 -1
  207. package/es/utils/interpolation.js +39 -37
  208. package/es/utils/math.d.ts +5 -0
  209. package/es/utils/math.js +54 -0
  210. package/es/utils/path.d.ts +1 -1
  211. package/es/utils/path.js +27 -29
  212. package/es/utils/text.js +3 -7
  213. package/lib/Canvas.d.ts +39 -6
  214. package/lib/Canvas.js +62 -27
  215. package/lib/camera/Camera.d.ts +14 -7
  216. package/lib/camera/Camera.js +59 -25
  217. package/lib/camera/Landmark.d.ts +2 -0
  218. package/lib/camera/Landmark.js +9 -3
  219. package/lib/css/CSS.d.ts +84 -0
  220. package/lib/css/CSS.js +125 -0
  221. package/lib/css/CSSProperty.d.ts +40 -0
  222. package/lib/css/CSSProperty.js +5 -0
  223. package/lib/css/LayoutRegistry.d.ts +11 -0
  224. package/lib/css/LayoutRegistry.js +30 -0
  225. package/lib/css/StyleValueRegistry.d.ts +113 -0
  226. package/lib/css/StyleValueRegistry.js +903 -0
  227. package/lib/css/cssom/CSSColorValue.d.ts +23 -0
  228. package/lib/css/cssom/CSSColorValue.js +51 -0
  229. package/lib/css/cssom/CSSGradientValue.d.ts +39 -0
  230. package/lib/css/cssom/CSSGradientValue.js +64 -0
  231. package/lib/css/cssom/CSSImageValue.d.ts +1 -0
  232. package/lib/css/cssom/CSSImageValue.js +1 -0
  233. package/lib/css/cssom/CSSKeywordValue.d.ts +15 -0
  234. package/lib/css/cssom/CSSKeywordValue.js +45 -0
  235. package/lib/css/cssom/CSSMathInvert.d.ts +14 -0
  236. package/lib/css/cssom/CSSMathInvert.js +94 -0
  237. package/lib/css/cssom/CSSMathMax.d.ts +17 -0
  238. package/lib/css/cssom/CSSMathMax.js +128 -0
  239. package/lib/css/cssom/CSSMathMin.d.ts +17 -0
  240. package/lib/css/cssom/CSSMathMin.js +128 -0
  241. package/lib/css/cssom/CSSMathNegate.d.ts +14 -0
  242. package/lib/css/cssom/CSSMathNegate.js +89 -0
  243. package/lib/css/cssom/CSSMathOperator.d.ts +11 -0
  244. package/lib/css/cssom/CSSMathOperator.js +40 -0
  245. package/lib/css/cssom/CSSMathProduct.d.ts +16 -0
  246. package/lib/css/cssom/CSSMathProduct.js +119 -0
  247. package/lib/css/cssom/CSSMathSum.d.ts +17 -0
  248. package/lib/css/cssom/CSSMathSum.js +129 -0
  249. package/lib/css/cssom/CSSMathValue.d.ts +11 -0
  250. package/lib/css/cssom/CSSMathValue.js +35 -0
  251. package/lib/css/cssom/CSSMathVariadic.d.ts +9 -0
  252. package/lib/css/cssom/CSSMathVariadic.js +55 -0
  253. package/lib/css/cssom/CSSNumericSumValue.d.ts +7 -0
  254. package/lib/css/cssom/CSSNumericSumValue.js +5 -0
  255. package/lib/css/cssom/CSSNumericValue.d.ts +75 -0
  256. package/lib/css/cssom/CSSNumericValue.js +511 -0
  257. package/lib/css/cssom/CSSNumericValueType.d.ts +33 -0
  258. package/lib/css/cssom/CSSNumericValueType.js +272 -0
  259. package/lib/css/cssom/CSSRGB.d.ts +25 -0
  260. package/lib/css/cssom/CSSRGB.js +56 -0
  261. package/lib/css/cssom/CSSStyleValue.d.ts +53 -0
  262. package/lib/css/cssom/CSSStyleValue.js +634 -0
  263. package/lib/css/cssom/CSSTransformComponent.d.ts +22 -0
  264. package/lib/css/cssom/CSSTransformComponent.js +39 -0
  265. package/lib/css/cssom/CSSTransformValue.d.ts +30 -0
  266. package/lib/css/cssom/CSSTransformValue.js +56 -0
  267. package/lib/css/cssom/CSSTranslate.d.ts +15 -0
  268. package/lib/css/cssom/CSSTranslate.js +53 -0
  269. package/lib/css/cssom/CSSUnitValue.d.ts +33 -0
  270. package/lib/css/cssom/CSSUnitValue.js +267 -0
  271. package/lib/css/cssom/index.d.ts +29 -0
  272. package/lib/css/cssom/index.js +278 -0
  273. package/lib/css/cssom/types.d.ts +86 -0
  274. package/lib/css/cssom/types.js +130 -0
  275. package/lib/css/index.d.ts +10 -0
  276. package/lib/css/index.js +96 -0
  277. package/lib/css/parser/color.d.ts +6 -0
  278. package/lib/{property-handlers → css/parser}/color.js +25 -44
  279. package/lib/css/parser/dimension.d.ts +36 -0
  280. package/lib/css/parser/dimension.js +173 -0
  281. package/lib/css/parser/filter.d.ts +7 -0
  282. package/lib/{property-handlers → css/parser}/filter.js +0 -0
  283. package/lib/css/parser/index.d.ts +15 -0
  284. package/lib/css/parser/index.js +122 -0
  285. package/lib/css/parser/numeric.d.ts +19 -0
  286. package/lib/css/parser/numeric.js +81 -0
  287. package/lib/css/parser/path.d.ts +5 -0
  288. package/lib/{property-handlers → css/parser}/path.js +4 -4
  289. package/lib/{property-handlers → css/parser}/points.d.ts +1 -1
  290. package/lib/{property-handlers → css/parser}/points.js +6 -0
  291. package/lib/css/parser/transform-origin.d.ts +6 -0
  292. package/lib/css/parser/transform-origin.js +52 -0
  293. package/lib/css/parser/transform.d.ts +15 -0
  294. package/lib/{property-handlers → css/parser}/transform.js +22 -146
  295. package/lib/css/parser/types.d.ts +2 -0
  296. package/lib/css/parser/types.js +5 -0
  297. package/lib/css/properties/CSSPropertyAnchor.d.ts +6 -0
  298. package/lib/css/properties/CSSPropertyAnchor.js +33 -0
  299. package/lib/{property-handlers/clipPath.d.ts → css/properties/CSSPropertyClipPath.d.ts} +4 -2
  300. package/lib/css/properties/CSSPropertyClipPath.js +59 -0
  301. package/lib/css/properties/CSSPropertyColor.d.ts +13 -0
  302. package/lib/css/properties/CSSPropertyColor.js +40 -0
  303. package/lib/css/properties/CSSPropertyFilter.d.ts +5 -0
  304. package/lib/css/properties/CSSPropertyFilter.js +25 -0
  305. package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +19 -0
  306. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +83 -0
  307. package/lib/css/properties/CSSPropertyLineDash.d.ts +7 -0
  308. package/lib/css/properties/CSSPropertyLineDash.js +34 -0
  309. package/lib/css/properties/CSSPropertyLocalPosition.d.ts +20 -0
  310. package/lib/css/properties/CSSPropertyLocalPosition.js +56 -0
  311. package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +7 -0
  312. package/lib/css/properties/CSSPropertyOffsetDistance.js +42 -0
  313. package/lib/css/properties/CSSPropertyOffsetPath.d.ts +4 -0
  314. package/lib/css/properties/CSSPropertyOffsetPath.js +39 -0
  315. package/lib/css/properties/CSSPropertyOpacity.d.ts +9 -0
  316. package/lib/css/properties/CSSPropertyOpacity.js +29 -0
  317. package/lib/css/properties/CSSPropertyPath.d.ts +14 -0
  318. package/lib/css/properties/CSSPropertyPath.js +60 -0
  319. package/lib/css/properties/CSSPropertyPoints.d.ts +17 -0
  320. package/lib/css/properties/CSSPropertyPoints.js +37 -0
  321. package/lib/css/properties/CSSPropertyShadowBlur.d.ts +4 -0
  322. package/lib/css/properties/CSSPropertyShadowBlur.js +32 -0
  323. package/lib/css/properties/CSSPropertyText.d.ts +6 -0
  324. package/lib/css/properties/CSSPropertyText.js +39 -0
  325. package/lib/css/properties/CSSPropertyTextTransform.d.ts +4 -0
  326. package/lib/css/properties/CSSPropertyTextTransform.js +38 -0
  327. package/lib/{property-handlers/transform.d.ts → css/properties/CSSPropertyTransform.d.ts} +7 -15
  328. package/lib/css/properties/CSSPropertyTransform.js +168 -0
  329. package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +10 -0
  330. package/lib/css/properties/CSSPropertyTransformOrigin.js +30 -0
  331. package/lib/css/properties/CSSPropertyVisibility.d.ts +11 -0
  332. package/lib/css/properties/CSSPropertyVisibility.js +32 -0
  333. package/lib/css/properties/CSSPropertyZIndex.d.ts +6 -0
  334. package/lib/css/properties/CSSPropertyZIndex.js +42 -0
  335. package/lib/css/properties/index.d.ts +18 -0
  336. package/lib/css/properties/index.js +239 -0
  337. package/lib/display-objects/Circle.d.ts +3 -4
  338. package/lib/display-objects/Circle.js +3 -2
  339. package/lib/display-objects/DisplayObject.d.ts +27 -10
  340. package/lib/display-objects/DisplayObject.js +132 -148
  341. package/lib/display-objects/Ellipse.d.ts +5 -7
  342. package/lib/display-objects/Ellipse.js +4 -3
  343. package/lib/display-objects/Group.d.ts +14 -11
  344. package/lib/display-objects/Group.js +12 -4
  345. package/lib/display-objects/HTML.d.ts +3 -3
  346. package/lib/display-objects/Image.d.ts +3 -5
  347. package/lib/display-objects/Image.js +3 -3
  348. package/lib/display-objects/Line.d.ts +7 -6
  349. package/lib/display-objects/Line.js +2 -4
  350. package/lib/display-objects/Path.d.ts +2 -2
  351. package/lib/display-objects/Path.js +0 -2
  352. package/lib/display-objects/Polyline.js +0 -2
  353. package/lib/display-objects/Rect.d.ts +5 -7
  354. package/lib/display-objects/Rect.js +4 -3
  355. package/lib/display-objects/Text.d.ts +15 -19
  356. package/lib/display-objects/Text.js +12 -13
  357. package/lib/dom/AnimationTimeline.d.ts +3 -0
  358. package/lib/dom/AnimationTimeline.js +5 -6
  359. package/lib/dom/Document.d.ts +12 -0
  360. package/lib/dom/Document.js +134 -10
  361. package/lib/dom/Element.d.ts +6 -1
  362. package/lib/dom/Element.js +14 -4
  363. package/lib/dom/FederatedEvent.d.ts +1 -5
  364. package/lib/dom/FederatedEvent.js +0 -10
  365. package/lib/dom/MutationObserver.d.ts +0 -1
  366. package/lib/dom/MutationObserver.js +6 -4
  367. package/lib/dom/interfaces.d.ts +14 -2
  368. package/lib/dom/interfaces.js +1 -0
  369. package/lib/global-module.d.ts +0 -8
  370. package/lib/global-module.js +42 -104
  371. package/lib/index.d.ts +4 -5
  372. package/lib/index.js +41 -54
  373. package/lib/plugins/CullingPlugin.js +2 -2
  374. package/lib/plugins/DirtyCheckPlugin.d.ts +0 -1
  375. package/lib/plugins/DirtyCheckPlugin.js +5 -8
  376. package/lib/plugins/EventPlugin.d.ts +1 -0
  377. package/lib/plugins/EventPlugin.js +74 -18
  378. package/lib/plugins/PrepareRendererPlugin.d.ts +1 -0
  379. package/lib/plugins/PrepareRendererPlugin.js +10 -20
  380. package/lib/services/EventService.d.ts +1 -0
  381. package/lib/services/EventService.js +60 -22
  382. package/lib/services/OffscreenCanvasCreator.d.ts +13 -0
  383. package/lib/services/{text/OffscreenCanvasCreator.js → OffscreenCanvasCreator.js} +23 -12
  384. package/lib/services/RenderingContext.d.ts +2 -1
  385. package/lib/services/RenderingContext.js +4 -1
  386. package/lib/services/RenderingService.d.ts +35 -2
  387. package/lib/services/RenderingService.js +52 -11
  388. package/lib/services/SceneGraphSelector.d.ts +3 -1
  389. package/lib/services/SceneGraphSelector.js +45 -15
  390. package/lib/services/SceneGraphService.d.ts +7 -1
  391. package/lib/services/SceneGraphService.js +15 -11
  392. package/lib/services/{text/index.d.ts → TextService.d.ts} +5 -4
  393. package/lib/services/{text/index.js → TextService.js} +36 -41
  394. package/lib/services/aabb/CircleUpdater.js +6 -17
  395. package/lib/services/aabb/EllipseUpdater.js +6 -23
  396. package/lib/services/aabb/LineUpdater.js +4 -4
  397. package/lib/services/aabb/RectUpdater.d.ts +2 -2
  398. package/lib/services/aabb/RectUpdater.js +22 -16
  399. package/lib/services/aabb/TextUpdater.d.ts +3 -1
  400. package/lib/services/aabb/TextUpdater.js +65 -26
  401. package/lib/services/aabb/interfaces.d.ts +3 -2
  402. package/lib/services/aabb/interfaces.js +8 -2
  403. package/lib/services/index.d.ts +2 -2
  404. package/lib/services/index.js +8 -8
  405. package/lib/shapes/index.d.ts +0 -1
  406. package/lib/shapes/index.js +0 -13
  407. package/lib/types.d.ts +64 -28
  408. package/lib/types.js +5 -1
  409. package/lib/utils/animation.js +1 -1
  410. package/lib/utils/assert.d.ts +3 -0
  411. package/lib/utils/assert.js +26 -0
  412. package/lib/utils/custom-easing.d.ts +0 -9
  413. package/lib/utils/custom-easing.js +41 -65
  414. package/lib/utils/event.d.ts +41 -9
  415. package/lib/utils/event.js +2 -76
  416. package/lib/utils/index.d.ts +1 -1
  417. package/lib/utils/index.js +13 -13
  418. package/lib/utils/interpolation.js +35 -30
  419. package/lib/utils/math.d.ts +5 -0
  420. package/lib/utils/math.js +64 -0
  421. package/lib/utils/path.d.ts +1 -1
  422. package/lib/utils/path.js +27 -29
  423. package/lib/utils/text.js +2 -6
  424. package/package.json +3 -4
  425. package/es/property-handlers/aabb.d.ts +0 -2
  426. package/es/property-handlers/aabb.js +0 -134
  427. package/es/property-handlers/anchor.d.ts +0 -4
  428. package/es/property-handlers/anchor.js +0 -21
  429. package/es/property-handlers/clipPath.js +0 -36
  430. package/es/property-handlers/color.d.ts +0 -34
  431. package/es/property-handlers/dimension.d.ts +0 -31
  432. package/es/property-handlers/dimension.js +0 -192
  433. package/es/property-handlers/filter.d.ts +0 -8
  434. package/es/property-handlers/index.d.ts +0 -21
  435. package/es/property-handlers/index.js +0 -21
  436. package/es/property-handlers/inherit.d.ts +0 -6
  437. package/es/property-handlers/inherit.js +0 -25
  438. package/es/property-handlers/interfaces.d.ts +0 -20
  439. package/es/property-handlers/interfaces.js +0 -6
  440. package/es/property-handlers/lineDash.d.ts +0 -6
  441. package/es/property-handlers/lineDash.js +0 -27
  442. package/es/property-handlers/localPosition.d.ts +0 -2
  443. package/es/property-handlers/localPosition.js +0 -11
  444. package/es/property-handlers/numeric.d.ts +0 -5
  445. package/es/property-handlers/numeric.js +0 -34
  446. package/es/property-handlers/offsetDistance.d.ts +0 -5
  447. package/es/property-handlers/offsetDistance.js +0 -20
  448. package/es/property-handlers/offsetPath.d.ts +0 -5
  449. package/es/property-handlers/offsetPath.js +0 -18
  450. package/es/property-handlers/origin.d.ts +0 -11
  451. package/es/property-handlers/origin.js +0 -68
  452. package/es/property-handlers/path.d.ts +0 -4
  453. package/es/property-handlers/text.d.ts +0 -2
  454. package/es/property-handlers/text.js +0 -3
  455. package/es/property-handlers/textTransform.d.ts +0 -6
  456. package/es/property-handlers/textTransform.js +0 -19
  457. package/es/property-handlers/zIndex.d.ts +0 -2
  458. package/es/property-handlers/zIndex.js +0 -16
  459. package/es/services/text/OffscreenCanvasCreator.d.ts +0 -6
  460. package/es/shapes/Polygon.d.ts +0 -9
  461. package/es/shapes/Polygon.js +0 -64
  462. package/es/shapes/Rect.d.ts +0 -12
  463. package/es/shapes/Rect.js +0 -24
  464. package/es/utils/raf.d.ts +0 -6
  465. package/es/utils/raf.js +0 -13
  466. package/lib/property-handlers/aabb.d.ts +0 -2
  467. package/lib/property-handlers/aabb.js +0 -150
  468. package/lib/property-handlers/anchor.d.ts +0 -4
  469. package/lib/property-handlers/anchor.js +0 -34
  470. package/lib/property-handlers/clipPath.js +0 -43
  471. package/lib/property-handlers/color.d.ts +0 -34
  472. package/lib/property-handlers/dimension.d.ts +0 -31
  473. package/lib/property-handlers/dimension.js +0 -217
  474. package/lib/property-handlers/filter.d.ts +0 -8
  475. package/lib/property-handlers/index.d.ts +0 -21
  476. package/lib/property-handlers/index.js +0 -265
  477. package/lib/property-handlers/inherit.d.ts +0 -6
  478. package/lib/property-handlers/inherit.js +0 -34
  479. package/lib/property-handlers/interfaces.d.ts +0 -20
  480. package/lib/property-handlers/interfaces.js +0 -18
  481. package/lib/property-handlers/lineDash.d.ts +0 -6
  482. package/lib/property-handlers/lineDash.js +0 -36
  483. package/lib/property-handlers/localPosition.d.ts +0 -2
  484. package/lib/property-handlers/localPosition.js +0 -18
  485. package/lib/property-handlers/numeric.d.ts +0 -5
  486. package/lib/property-handlers/numeric.js +0 -50
  487. package/lib/property-handlers/offsetDistance.d.ts +0 -5
  488. package/lib/property-handlers/offsetDistance.js +0 -27
  489. package/lib/property-handlers/offsetPath.d.ts +0 -5
  490. package/lib/property-handlers/offsetPath.js +0 -25
  491. package/lib/property-handlers/origin.d.ts +0 -11
  492. package/lib/property-handlers/origin.js +0 -79
  493. package/lib/property-handlers/path.d.ts +0 -4
  494. package/lib/property-handlers/text.d.ts +0 -2
  495. package/lib/property-handlers/text.js +0 -10
  496. package/lib/property-handlers/textTransform.d.ts +0 -6
  497. package/lib/property-handlers/textTransform.js +0 -27
  498. package/lib/property-handlers/zIndex.d.ts +0 -2
  499. package/lib/property-handlers/zIndex.js +0 -23
  500. package/lib/services/text/OffscreenCanvasCreator.d.ts +0 -6
  501. package/lib/shapes/Polygon.d.ts +0 -9
  502. package/lib/shapes/Polygon.js +0 -71
  503. package/lib/shapes/Rect.d.ts +0 -12
  504. package/lib/shapes/Rect.js +0 -31
  505. package/lib/utils/raf.d.ts +0 -6
  506. package/lib/utils/raf.js +0 -26
@@ -1,19 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G=e():t.G=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"h",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"b",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"k",(function(){return h})),n.d(e,"g",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"i",(function(){return d}));
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var r=function(t,e){return(r=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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=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 a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function h(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 t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function d(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]},function(t,e,n){"use strict";e.__esModule=!0,e.SyncHook=n(62),e.SyncBailHook=n(63),e.SyncWaterfallHook=n(64),e.SyncLoopHook=n(65),e.AsyncParallelHook=n(66),e.AsyncParallelBailHook=n(67),e.AsyncSeriesHook=n(68),e.AsyncSeriesBailHook=n(69),e.AsyncSeriesLoopHook=n(70),e.AsyncSeriesWaterfallHook=n(71),e.HookMap=n(72),e.MultiHook=n(73)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0;var r=n(1);e.METADATA_KEY=r;var i=n(36);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return i.Container}});var o=n(12);Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return o.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return o.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return o.TargetTypeEnum}});var a=n(52);Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return a.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return a.ContainerModule}});var s=n(53);Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return s.injectable}});var u=n(54);Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return u.tagged}});var c=n(55);Object.defineProperty(e,"named",{enumerable:!0,get:function(){return c.named}});var l=n(26);Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return l.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return l.LazyServiceIdentifer}});var h=n(56);Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return h.optional}});var f=n(57);Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return f.unmanaged}});var p=n(58);Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return p.multiInject}});var d=n(59);Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return d.targetName}});var y=n(60);Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return y.postConstruct}});var v=n(24);Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return v.MetadataReader}});var g=n(15);Object.defineProperty(e,"id",{enumerable:!0,get:function(){return g.id}});var m=n(13);Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return m.decorate}});var b=n(29);Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return b.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return b.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return b.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return b.typeConstraint}});var E=n(16);Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return E.getServiceIdentifierAsString}});var T=n(61);Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return T.multiBindToService}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=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}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5),i=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new r.a,this.page=new r.a,this.canvas=new r.a,this.viewport=new r.a,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalEvent",{get:function(){return this.nativeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n,r,i,o,a,s,u){var c=t.call(this,null)||this;return c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return Object(r.d)(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(n(6).a)},function(t,e,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return r})),n.d(e,"Shape",(function(){return na})),n.d(e,"LineCap",(function(){return ra})),n.d(e,"LineJoin",(function(){return ia})),n.d(e,"TextTransform",(function(){return oa})),n.d(e,"TextAlign",(function(){return aa})),n.d(e,"CanvasConfig",(function(){return ha})),n.d(e,"Geometry",(function(){return qa})),n.d(e,"Renderable",(function(){return Wa})),n.d(e,"Transform",(function(){return za})),n.d(e,"Strategy",(function(){return Da})),n.d(e,"Cullable",(function(){return Ha})),n.d(e,"Sortable",(function(){return Ya})),n.d(e,"ElementEvent",(function(){return Fo})),n.d(e,"DELEGATION_SPLITTER",(function(){return Ga})),n.d(e,"EventTarget",(function(){return Va})),n.d(e,"Node",(function(){return Ua})),n.d(e,"Element",(function(){return Bu})),n.d(e,"Document",(function(){return fc})),n.d(e,"FederatedEvent",(function(){return Ba.a})),n.d(e,"FederatedMouseEvent",(function(){return pc})),n.d(e,"FederatedPointerEvent",(function(){return dc})),n.d(e,"FederatedWheelEvent",(function(){return yc})),n.d(e,"Animation",(function(){return Vu})),n.d(e,"AnimationEvent",(function(){return Fu})),n.d(e,"AnimationEffectTiming",(function(){return Wu})),n.d(e,"CustomEvent",(function(){return Fa})),n.d(e,"MutationEvent",(function(){return Qo.a})),n.d(e,"Registration",(function(){return vc.b})),n.d(e,"MutationObserver",(function(){return vc.a})),n.d(e,"MutationRecord",(function(){return gc.a})),n.d(e,"makeTiming",(function(){return $u})),n.d(e,"normalizeTimingInput",(function(){return Xu})),n.d(e,"numericTimingToObject",(function(){return Ku})),n.d(e,"KeyframeEffect",(function(){return Ju})),n.d(e,"normalizeKeyframes",(function(){return zu})),n.d(e,"compareAnimations",(function(){return Uu})),n.d(e,"AnimationTimeline",(function(){return qu})),n.d(e,"CustomElementRegistry",(function(){return mc})),n.d(e,"AbstractRenderer",(function(){return Dh})),n.d(e,"CanvasEvent",(function(){return Bh})),n.d(e,"Canvas",(function(){return Jh})),n.d(e,"DisplayObjectPool",(function(){return lt})),n.d(e,"DefaultCamera",(function(){return Lh})),n.d(e,"CAMERA_TYPE",(function(){return Ch})),n.d(e,"CAMERA_TRACKING_MODE",(function(){return Ih})),n.d(e,"CAMERA_PROJECTION_MODE",(function(){return jh})),n.d(e,"CameraEvent",(function(){return Fh})),n.d(e,"Camera",(function(){return Uh})),n.d(e,"Landmark",(function(){return kh})),n.d(e,"sortByZIndex",(function(){return ta})),n.d(e,"dirtifyToRoot",(function(){return ea})),n.d(e,"SceneGraphService",(function(){return sa})),n.d(e,"DefaultSceneGraphService",(function(){return ua})),n.d(e,"ContextService",(function(){return Ra})),n.d(e,"RenderReason",(function(){return ga})),n.d(e,"RenderingContext",(function(){return ka})),n.d(e,"RenderingPluginContribution",(function(){return bc})),n.d(e,"RenderingService",(function(){return Ec})),n.d(e,"EventService",(function(){return Tc})),n.d(e,"SceneGraphSelectorFactory",(function(){return Ko})),n.d(e,"SceneGraphSelector",(function(){return Jo})),n.d(e,"DefaultSceneGraphSelector",(function(){return Zo})),n.d(e,"OffscreenCanvasCreator",(function(){return ma})),n.d(e,"TextService",(function(){return Ma})),n.d(e,"GeometryUpdaterFactory",(function(){return ca})),n.d(e,"GeometryAABBUpdater",(function(){return la})),n.d(e,"CircleUpdater",(function(){return fa})),n.d(e,"EllipseUpdater",(function(){return pa})),n.d(e,"RectUpdater",(function(){return da})),n.d(e,"TextUpdater",(function(){return wa})),n.d(e,"LineUpdater",(function(){return _a})),n.d(e,"PolylineUpdater",(function(){return Pa})),n.d(e,"PathUpdater",(function(){return Aa})),n.d(e,"AABB",(function(){return Do})),n.d(e,"BoundingSphere",(function(){return Lo})),n.d(e,"Mask",(function(){return Po})),n.d(e,"Frustum",(function(){return Go})),n.d(e,"Plane",(function(){return Bo})),n.d(e,"Ray",(function(){return Ho})),n.d(e,"Point",(function(){return Yo.a})),n.d(e,"Rectangle",(function(){return $o})),n.d(e,"PolygonShape",(function(){return Xo})),n.d(e,"getAngle",(function(){return $a})),n.d(e,"createVec3",(function(){return Xa})),n.d(e,"deg2rad",(function(){return Ka})),n.d(e,"rad2deg",(function(){return Ja})),n.d(e,"getScaling",(function(){return Za})),n.d(e,"getTranslation",(function(){return Qa})),n.d(e,"getRotationInRadians",(function(){return ts})),n.d(e,"getEuler",(function(){return es})),n.d(e,"fromRotationTranslationScale",(function(){return ns})),n.d(e,"makePerspective",(function(){return rs})),n.d(e,"convertEffectInput",(function(){return qs})),n.d(e,"formatAttribute",(function(){return $s})),n.d(e,"equalizeSegments",(function(){return hu})),n.d(e,"getDrawDirection",(function(){return fu})),n.d(e,"getPathArea",(function(){return du})),n.d(e,"reverseCurve",(function(){return yu})),n.d(e,"clonePath",(function(){return vu})),n.d(e,"getRotatedCurve",(function(){return gu})),n.d(e,"convertToPath",(function(){return bu})),n.d(e,"patch",(function(){return Mu})),n.d(e,"requestAnimationFrame",(function(){return wu})),n.d(e,"cancelAnimationFrame",(function(){return _u})),n.d(e,"toFontString",(function(){return va})),n.d(e,"camelCase",(function(){return Us})),n.d(e,"supportsTouchEvents",(function(){return Pu})),n.d(e,"supportsPointerEvents",(function(){return Au})),n.d(e,"MOUSE_POINTER_ID",(function(){return xu})),n.d(e,"TOUCH_TO_POINTER",(function(){return Nu})),n.d(e,"isTouchEvent",(function(){return Su})),n.d(e,"isMouseEvent",(function(){return Cu})),n.d(e,"normalizeToPointerEvent",(function(){return Iu})),n.d(e,"cleanExistedCanvas",(function(){return Du})),n.d(e,"isBrowser",(function(){return ku})),n.d(e,"StylePropertyParser",(function(){return xa})),n.d(e,"StylePropertyParserFactory",(function(){return Na})),n.d(e,"StylePropertyUpdater",(function(){return Sa})),n.d(e,"StylePropertyUpdaterFactory",(function(){return Ca})),n.d(e,"StylePropertyMerger",(function(){return Ia})),n.d(e,"StylePropertyMergerFactory",(function(){return ja})),n.d(e,"updateAnchor",(function(){return Oc})),n.d(e,"updateGeometry",(function(){return il})),n.d(e,"updateLocalPosition",(function(){return ol})),n.d(e,"numberToString",(function(){return al})),n.d(e,"parseNumber",(function(){return sl})),n.d(e,"mergeNumbers",(function(){return ul})),n.d(e,"clampedMergeNumbers",(function(){return cl})),n.d(e,"mergeNumberLists",(function(){return ll})),n.d(e,"PARSED_COLOR_TYPE",(function(){return Pc})),n.d(e,"parseColor",(function(){return nl})),n.d(e,"mergeColors",(function(){return rl})),n.d(e,"updateOffsetPath",(function(){return hl})),n.d(e,"updateOffsetDistance",(function(){return fl})),n.d(e,"updateClipPath",(function(){return pl})),n.d(e,"updateZIndex",(function(){return dl})),n.d(e,"updateOrigin",(function(){return Al})),n.d(e,"updateTransformOrigin",(function(){return xl})),n.d(e,"parseTransform",(function(){return kl})),n.d(e,"mergeTransforms",(function(){return Fl})),n.d(e,"updateTransform",(function(){return Gl})),n.d(e,"parseDimension",(function(){return bl})),n.d(e,"mergeDimensions",(function(){return El})),n.d(e,"parseLength",(function(){return Tl})),n.d(e,"parseLengthOrPercent",(function(){return Ol})),n.d(e,"parseAngle",(function(){return Ml})),n.d(e,"parseLengthOrPercentList",(function(){return wl})),n.d(e,"convertPercentUnit",(function(){return _l})),n.d(e,"convertAngleUnit",(function(){return Pl})),n.d(e,"parsePath",(function(){return dh})),n.d(e,"mergePaths",(function(){return vh})),n.d(e,"parsePoints",(function(){return gh})),n.d(e,"parseParam",(function(){return mh})),n.d(e,"parseFilter",(function(){return Eh})),n.d(e,"parseLineDash",(function(){return Th})),n.d(e,"updateText",(function(){return Oh})),n.d(e,"updateTextTransform",(function(){return Mh})),n.d(e,"updateInherit",(function(){return yl})),n.d(e,"computeInheritStyleProperty",(function(){return vl})),n.d(e,"DisplayObject",(function(){return Qu})),n.d(e,"CustomElement",(function(){return tc})),n.d(e,"Circle",(function(){return ec})),n.d(e,"Ellipse",(function(){return nc})),n.d(e,"Group",(function(){return rc})),n.d(e,"Image",(function(){return ic})),n.d(e,"Line",(function(){return oc})),n.d(e,"Path",(function(){return ac})),n.d(e,"Polygon",(function(){return sc})),n.d(e,"Polyline",(function(){return uc})),n.d(e,"Rect",(function(){return cc})),n.d(e,"Text",(function(){return lc})),n.d(e,"HTML",(function(){return hc})),n.d(e,"globalContainer",(function(){return wh})),n.d(e,"INHERIT_PROPERTIES",(function(){return _h})),n.d(e,"stylePropertyParserFactory",(function(){return Ph})),n.d(e,"stylePropertyUpdaterFactory",(function(){return Ah})),n.d(e,"stylePropertyMergerFactory",(function(){return xh})),n.d(e,"addPropertyHandler",(function(){return Nh})),n.d(e,"addPropertiesHandler",(function(){return Sh})),n.d(e,"containerModule",(function(){return Rh}));var r={};n.r(r),n.d(r,"injectable",(function(){return x})),n.d(r,"singleton",(function(){return N})),n.d(r,"transient",(function(){return S})),n.d(r,"inject",(function(){return C})),n.d(r,"named",(function(){return I})),n.d(r,"postConstruct",(function(){return f.postConstruct})),n.d(r,"optional",(function(){return f.optional})),n.d(r,"unmanaged",(function(){return f.unmanaged})),n.d(r,"decorate",(function(){return f.decorate})),n.d(r,"Container",(function(){return it})),n.d(r,"GlobalContainer",(function(){return ot})),n.d(r,"register",(function(){return at})),n.d(r,"SyringeModule",(function(){return J})),n.d(r,"isSyringeModule",(function(){return Z})),n.d(r,"Module",(function(){return Q})),n.d(r,"Provider",(function(){return G})),n.d(r,"DefaultContributionProvider",(function(){return Y})),n.d(r,"contrib",(function(){return st})),n.d(r,"Contribution",(function(){return et})),n.d(r,"Syringe",(function(){return l})),n.d(r,"Utils",(function(){return h})),n.d(r,"OptionSymbol",(function(){return j})),n.d(r,"registerSideOption",(function(){return R}));var i={};n.r(i),n.d(i,"create",(function(){return Ft})),n.d(i,"fromMat4",(function(){return Gt})),n.d(i,"clone",(function(){return Vt})),n.d(i,"copy",(function(){return Ut})),n.d(i,"fromValues",(function(){return qt})),n.d(i,"set",(function(){return Wt})),n.d(i,"identity",(function(){return zt})),n.d(i,"transpose",(function(){return Ht})),n.d(i,"invert",(function(){return Yt})),n.d(i,"adjoint",(function(){return $t})),n.d(i,"determinant",(function(){return Xt})),n.d(i,"multiply",(function(){return Kt})),n.d(i,"translate",(function(){return Jt})),n.d(i,"rotate",(function(){return Zt})),n.d(i,"scale",(function(){return Qt})),n.d(i,"fromTranslation",(function(){return te})),n.d(i,"fromRotation",(function(){return ee})),n.d(i,"fromScaling",(function(){return ne})),n.d(i,"fromMat2d",(function(){return re})),n.d(i,"fromQuat",(function(){return ie})),n.d(i,"normalFromMat4",(function(){return oe})),n.d(i,"projection",(function(){return ae})),n.d(i,"str",(function(){return se})),n.d(i,"frob",(function(){return ue})),n.d(i,"add",(function(){return ce})),n.d(i,"subtract",(function(){return le})),n.d(i,"multiplyScalar",(function(){return he})),n.d(i,"multiplyScalarAndAdd",(function(){return fe})),n.d(i,"exactEquals",(function(){return pe})),n.d(i,"equals",(function(){return de})),n.d(i,"mul",(function(){return ye})),n.d(i,"sub",(function(){return ve}));var o={};n.r(o),n.d(o,"create",(function(){return ge})),n.d(o,"clone",(function(){return me})),n.d(o,"copy",(function(){return be})),n.d(o,"fromValues",(function(){return Ee})),n.d(o,"set",(function(){return Te})),n.d(o,"identity",(function(){return Oe})),n.d(o,"transpose",(function(){return Me})),n.d(o,"invert",(function(){return we})),n.d(o,"adjoint",(function(){return _e})),n.d(o,"determinant",(function(){return Pe})),n.d(o,"multiply",(function(){return Ae})),n.d(o,"translate",(function(){return xe})),n.d(o,"scale",(function(){return Ne})),n.d(o,"rotate",(function(){return Se})),n.d(o,"rotateX",(function(){return Ce})),n.d(o,"rotateY",(function(){return Ie})),n.d(o,"rotateZ",(function(){return je})),n.d(o,"fromTranslation",(function(){return Re})),n.d(o,"fromScaling",(function(){return De})),n.d(o,"fromRotation",(function(){return ke})),n.d(o,"fromXRotation",(function(){return Le})),n.d(o,"fromYRotation",(function(){return Be})),n.d(o,"fromZRotation",(function(){return Fe})),n.d(o,"fromRotationTranslation",(function(){return Ge})),n.d(o,"fromQuat2",(function(){return Ve})),n.d(o,"getTranslation",(function(){return Ue})),n.d(o,"getScaling",(function(){return qe})),n.d(o,"getRotation",(function(){return We})),n.d(o,"fromRotationTranslationScale",(function(){return ze})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return He})),n.d(o,"fromQuat",(function(){return Ye})),n.d(o,"frustum",(function(){return $e})),n.d(o,"perspectiveNO",(function(){return Xe})),n.d(o,"perspective",(function(){return Ke})),n.d(o,"perspectiveZO",(function(){return Je})),n.d(o,"perspectiveFromFieldOfView",(function(){return Ze})),n.d(o,"orthoNO",(function(){return Qe})),n.d(o,"ortho",(function(){return tn})),n.d(o,"orthoZO",(function(){return en})),n.d(o,"lookAt",(function(){return nn})),n.d(o,"targetTo",(function(){return rn})),n.d(o,"str",(function(){return on})),n.d(o,"frob",(function(){return an})),n.d(o,"add",(function(){return sn})),n.d(o,"subtract",(function(){return un})),n.d(o,"multiplyScalar",(function(){return cn})),n.d(o,"multiplyScalarAndAdd",(function(){return ln})),n.d(o,"exactEquals",(function(){return hn})),n.d(o,"equals",(function(){return fn})),n.d(o,"mul",(function(){return pn})),n.d(o,"sub",(function(){return dn}));var a={};n.r(a),n.d(a,"create",(function(){return yn})),n.d(a,"clone",(function(){return vn})),n.d(a,"length",(function(){return gn})),n.d(a,"fromValues",(function(){return mn})),n.d(a,"copy",(function(){return bn})),n.d(a,"set",(function(){return En})),n.d(a,"add",(function(){return Tn})),n.d(a,"subtract",(function(){return On})),n.d(a,"multiply",(function(){return Mn})),n.d(a,"divide",(function(){return wn})),n.d(a,"ceil",(function(){return _n})),n.d(a,"floor",(function(){return Pn})),n.d(a,"min",(function(){return An})),n.d(a,"max",(function(){return xn})),n.d(a,"round",(function(){return Nn})),n.d(a,"scale",(function(){return Sn})),n.d(a,"scaleAndAdd",(function(){return Cn})),n.d(a,"distance",(function(){return In})),n.d(a,"squaredDistance",(function(){return jn})),n.d(a,"squaredLength",(function(){return Rn})),n.d(a,"negate",(function(){return Dn})),n.d(a,"inverse",(function(){return kn})),n.d(a,"normalize",(function(){return Ln})),n.d(a,"dot",(function(){return Bn})),n.d(a,"cross",(function(){return Fn})),n.d(a,"lerp",(function(){return Gn})),n.d(a,"hermite",(function(){return Vn})),n.d(a,"bezier",(function(){return Un})),n.d(a,"random",(function(){return qn})),n.d(a,"transformMat4",(function(){return Wn})),n.d(a,"transformMat3",(function(){return zn})),n.d(a,"transformQuat",(function(){return Hn})),n.d(a,"rotateX",(function(){return Yn})),n.d(a,"rotateY",(function(){return $n})),n.d(a,"rotateZ",(function(){return Xn})),n.d(a,"angle",(function(){return Kn})),n.d(a,"zero",(function(){return Jn})),n.d(a,"str",(function(){return Zn})),n.d(a,"exactEquals",(function(){return Qn})),n.d(a,"equals",(function(){return tr})),n.d(a,"sub",(function(){return nr})),n.d(a,"mul",(function(){return rr})),n.d(a,"div",(function(){return ir})),n.d(a,"dist",(function(){return or})),n.d(a,"sqrDist",(function(){return ar})),n.d(a,"len",(function(){return sr})),n.d(a,"sqrLen",(function(){return ur})),n.d(a,"forEach",(function(){return cr}));var s={};n.r(s),n.d(s,"create",(function(){return lr})),n.d(s,"clone",(function(){return hr})),n.d(s,"fromValues",(function(){return fr})),n.d(s,"copy",(function(){return pr})),n.d(s,"set",(function(){return dr})),n.d(s,"add",(function(){return yr})),n.d(s,"subtract",(function(){return vr})),n.d(s,"multiply",(function(){return gr})),n.d(s,"divide",(function(){return mr})),n.d(s,"ceil",(function(){return br})),n.d(s,"floor",(function(){return Er})),n.d(s,"min",(function(){return Tr})),n.d(s,"max",(function(){return Or})),n.d(s,"round",(function(){return Mr})),n.d(s,"scale",(function(){return wr})),n.d(s,"scaleAndAdd",(function(){return _r})),n.d(s,"distance",(function(){return Pr})),n.d(s,"squaredDistance",(function(){return Ar})),n.d(s,"length",(function(){return xr})),n.d(s,"squaredLength",(function(){return Nr})),n.d(s,"negate",(function(){return Sr})),n.d(s,"inverse",(function(){return Cr})),n.d(s,"normalize",(function(){return Ir})),n.d(s,"dot",(function(){return jr})),n.d(s,"cross",(function(){return Rr})),n.d(s,"lerp",(function(){return Dr})),n.d(s,"random",(function(){return kr})),n.d(s,"transformMat4",(function(){return Lr})),n.d(s,"transformQuat",(function(){return Br})),n.d(s,"zero",(function(){return Fr})),n.d(s,"str",(function(){return Gr})),n.d(s,"exactEquals",(function(){return Vr})),n.d(s,"equals",(function(){return Ur})),n.d(s,"sub",(function(){return qr})),n.d(s,"mul",(function(){return Wr})),n.d(s,"div",(function(){return zr})),n.d(s,"dist",(function(){return Hr})),n.d(s,"sqrDist",(function(){return Yr})),n.d(s,"len",(function(){return $r})),n.d(s,"sqrLen",(function(){return Xr})),n.d(s,"forEach",(function(){return Kr}));var u={};n.r(u),n.d(u,"create",(function(){return Jr})),n.d(u,"identity",(function(){return Zr})),n.d(u,"setAxisAngle",(function(){return Qr})),n.d(u,"getAxisAngle",(function(){return ti})),n.d(u,"getAngle",(function(){return ei})),n.d(u,"multiply",(function(){return ni})),n.d(u,"rotateX",(function(){return ri})),n.d(u,"rotateY",(function(){return ii})),n.d(u,"rotateZ",(function(){return oi})),n.d(u,"calculateW",(function(){return ai})),n.d(u,"exp",(function(){return si})),n.d(u,"ln",(function(){return ui})),n.d(u,"pow",(function(){return ci})),n.d(u,"slerp",(function(){return li})),n.d(u,"random",(function(){return hi})),n.d(u,"invert",(function(){return fi})),n.d(u,"conjugate",(function(){return pi})),n.d(u,"fromMat3",(function(){return di})),n.d(u,"fromEuler",(function(){return yi})),n.d(u,"str",(function(){return vi})),n.d(u,"clone",(function(){return Mi})),n.d(u,"fromValues",(function(){return wi})),n.d(u,"copy",(function(){return _i})),n.d(u,"set",(function(){return Pi})),n.d(u,"add",(function(){return Ai})),n.d(u,"mul",(function(){return xi})),n.d(u,"scale",(function(){return Ni})),n.d(u,"dot",(function(){return Si})),n.d(u,"lerp",(function(){return Ci})),n.d(u,"length",(function(){return Ii})),n.d(u,"len",(function(){return ji})),n.d(u,"squaredLength",(function(){return Ri})),n.d(u,"sqrLen",(function(){return Di})),n.d(u,"normalize",(function(){return ki})),n.d(u,"exactEquals",(function(){return Li})),n.d(u,"equals",(function(){return Bi})),n.d(u,"rotationTo",(function(){return Fi})),n.d(u,"sqlerp",(function(){return Gi})),n.d(u,"setAxes",(function(){return Vi}));var c={};n.r(c),n.d(c,"create",(function(){return Ui})),n.d(c,"clone",(function(){return qi})),n.d(c,"fromValues",(function(){return Wi})),n.d(c,"copy",(function(){return zi})),n.d(c,"set",(function(){return Hi})),n.d(c,"add",(function(){return Yi})),n.d(c,"subtract",(function(){return $i})),n.d(c,"multiply",(function(){return Xi})),n.d(c,"divide",(function(){return Ki})),n.d(c,"ceil",(function(){return Ji})),n.d(c,"floor",(function(){return Zi})),n.d(c,"min",(function(){return Qi})),n.d(c,"max",(function(){return to})),n.d(c,"round",(function(){return eo})),n.d(c,"scale",(function(){return no})),n.d(c,"scaleAndAdd",(function(){return ro})),n.d(c,"distance",(function(){return io})),n.d(c,"squaredDistance",(function(){return oo})),n.d(c,"length",(function(){return ao})),n.d(c,"squaredLength",(function(){return so})),n.d(c,"negate",(function(){return uo})),n.d(c,"inverse",(function(){return co})),n.d(c,"normalize",(function(){return lo})),n.d(c,"dot",(function(){return ho})),n.d(c,"cross",(function(){return fo})),n.d(c,"lerp",(function(){return po})),n.d(c,"random",(function(){return yo})),n.d(c,"transformMat2",(function(){return vo})),n.d(c,"transformMat2d",(function(){return go})),n.d(c,"transformMat3",(function(){return mo})),n.d(c,"transformMat4",(function(){return bo})),n.d(c,"rotate",(function(){return Eo})),n.d(c,"angle",(function(){return To})),n.d(c,"zero",(function(){return Oo})),n.d(c,"str",(function(){return Mo})),n.d(c,"exactEquals",(function(){return wo})),n.d(c,"equals",(function(){return _o})),n.d(c,"len",(function(){return Ao})),n.d(c,"sub",(function(){return xo})),n.d(c,"mul",(function(){return No})),n.d(c,"div",(function(){return So})),n.d(c,"dist",(function(){return Co})),n.d(c,"sqrDist",(function(){return Io})),n.d(c,"sqrLen",(function(){return jo})),n.d(c,"forEach",(function(){return Ro}));n(22);var l,h,f=n(3);function p(t){return(p="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 d(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,r.key,r)}}function y(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t){return(g="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 m(t,e){return e.lifecycle===l.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function b(t,e){t.whenTargetNamed(O(e))}function E(t,e){return e.bind(M(t))}function T(t,e){if(e.isBound(M(t)))try{return e.rebind(M(t))}catch(n){return e.bind(M(t))}return e.bind(M(t))}function O(t){return h.isDefinedToken(t)?t.symbol:t}function M(t){return h.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=y((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===p(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(l||(l={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===p(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==p(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===p(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(h||(h={}));var w=new f.Container;function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(f.injectable)();return function(n){Reflect.defineMetadata(l.ClassOptionSymbol,P(P({},t),{},{target:n}),n),e(n)}}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x(P(P({},t),{},{lifecycle:l.Lifecycle.singleton}))}function S(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x(P(P({},t),{},{lifecycle:l.Lifecycle.transient}))}function C(t){return Object(f.inject)(M(t))}function I(t){return Object(f.named)(O(t))}var j=Symbol("SyringeOptionSymbol"),R=function(t,e){Reflect.defineMetadata(j,t,e)};function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){L(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function L(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(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,r.key,r)}}var F=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=r,this.rawToken=h.isNamedToken(n)?n.token:n,this.named=h.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||h.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,r;return e=t,r=[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(j,n);i&&t.resolveOption(e,i)}catch(t){}if(h.isClass(n))if(r.useClass){var o=h.toArray(r.useClass);o.unshift(n),r.useClass=o}else r.useClass=[n];var a;try{a=Reflect.getMetadata(l.ClassOptionSymbol,n)}catch(t){}if((a=k(k({},a||{}),r)).token){var s=h.toArray(a.token);s.unshift(n),a.token=s}else a.token=[n];t.resolveOption(e,a)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r,i,o,a,s,u,c,f,p=(r=k(k({},t.globalConfig),n),i=h.toArray(r.token),o=h.toArray(r.useClass),a=h.toArray(r.useDynamic),s=h.toArray(r.useFactory),u=h.toArray(r.contrib),c=r.lifecycle||l.Lifecycle.transient,f={token:i,useClass:o,lifecycle:u.length>0?l.Lifecycle.singleton:c,contrib:u,useDynamic:a,useFactory:s},"useValue"in r&&(f.useValue=r.useValue),f);(0!==p.useClass.length||0!==p.useDynamic.length||0!==p.useFactory.length||"useValue"in p)&&p.token.forEach((function(n){new t(e,n,k({},p)).resolve()}))}}],(n=[{key:"resolve",value:function(){var t,e=this,n=this.register;(t=n)&&"object"===g(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(t){h.isMultipleEnabled(t)?E(t,n).toService(e.generalToken):T(t,n).toService(e.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return T(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return m(T(this.generalToken,t).toDynamicValue((function(t){var n=it.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return T(this.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return m(T(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return m(E(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return m(E(e.generalToken,t).toDynamicValue((function(t){var e=it.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return E(e.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?E(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&b(t,e.named)})),r.forEach((function(t){return e.named&&b(t,e.named)})),i.forEach((function(t){return e.named&&b(t,e.named)})),o&&b(o,this.named))}}])&&B(e.prototype,n),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();F.globalConfig=l.DefaultOption;var G=l.defineToken("ContributionProvider");function V(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(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 U(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 q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(Object(n),!0).forEach((function(e){z(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function z(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(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,r.key,r)}}var Y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=W(W({},this.option),r))}var e,n,r;return e=t,(n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,V(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=W(W({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}])&&H(e.prototype,n),r&&H(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $(t,e){return{token:{token:G,named:t},useDynamic:function(n){return new Y(t,n.container,e)},lifecycle:l.Lifecycle.singleton}}function X(t,e,n){t({token:{token:G,named:e},useDynamic:function(t){return new Y(e,t.container,n)},lifecycle:l.Lifecycle.singleton})}function K(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,r.key,r)}}var J=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,i){var o={bind:t,unbind:e,isBound:r,rebind:i},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?F.resolveOption(o,t):F.resolveTarget(o,t,e)};n.baseRegistry&&n.baseRegistry(a),n.optionCollection&&n.optionCollection.forEach((function(t){return a(t)}))},this.baseRegistry=e,this.inversifyModule=new f.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push($(e))})),this}}])&&K(e.prototype,n),r&&K(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Z(t){return t&&"inversifyModule"in t}function Q(t){return new J(t)}function tt(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,r.key,r)}}var et,nt,rt=new Map,it=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new f.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,r=[{key:"setContainer",value:function(t,e){return rt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=rt.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){F.globalConfig=t}}],(n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Z(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){Z(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(M(t))}},{key:"get",value:function(t){return this.container.get(M(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(M(t),O(e))}},{key:"getAll",value:function(t){return this.container.getAll(M(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(M(t),O(e))}},{key:"isBound",value:function(t){return this.container.isBound(M(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(M(t),O(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?F.resolveOption(this.container,t):F.resolveTarget(this.container,t,e)}}])&&tt(e.prototype,n),r&&tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ot=new it(w),at=ot.register.bind(ot),st=function(t){return function(e,n,r){I(t)(e,n,r),C(G)(e,n,r)}};(nt=et||(et={})).Provider=G,nt.register=X;var ut=n(14),ct=n(0),lt=function(){function t(){this.pool={}}return t.prototype.getByEntity=function(t){return this.pool[t]},t.prototype.add=function(t,e){this.pool[t]=e},t.prototype.remove=function(t){delete this.pool[t]},t=Object(ct.c)([N()],t)}(),ht=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},ft={}.toString,pt=function(t,e){return ft.call(t)==="[object "+e+"]"},dt=function(t){return pt(t,"Function")},yt=function(t){return null==t},vt=function(t){return Array.isArray?Array.isArray(t):pt(t,"Array")},gt=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var mt=function(t,e){if(t)if(vt(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(gt(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;var bt=function(t){return"object"==typeof t&&null!==t};var Et=function(t){if(vt(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},Tt=function(t){if(vt(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},Ot=Array.prototype,Mt=(Ot.splice,Ot.indexOf,Array.prototype.splice,function(t){return pt(t,"String")});function wt(t,e){void 0===e&&(e=new Map);var n=[];if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r];e.has(o)||(n.push(o),e.set(o,!0))}return n}Object.prototype.hasOwnProperty;var _t=function(t,e,n){return t<e?e:t>n?n:t},Pt=function(t){return pt(t,"Number")};Number.isInteger&&Number.isInteger;var At=function(t,e){return(t%e+e)%e},xt=(Math.PI,parseInt,Math.PI/180),Nt=function(t){return xt*t},St=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return mt(t,(function(n,r){dt(t)&&"prototype"===r||e.push(n)})),e};var Ct=function(t){return pt(t,"Boolean")},It=(Object.prototype,function(t){return void 0===t});Object.prototype.hasOwnProperty;var jt,Rt=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Mt(t)||Mt(e))return!1;if(ht(t)||ht(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Rt(t[r],e[r]));r++);return n}if(bt(t)||bt(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=Rt(t[i[r]],e[i[r]]));r++);return n}return!1},Dt=Rt;Object.prototype.hasOwnProperty;(function(t,e){if(!dt(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map})((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return jt||(jt=document.createElement("canvas").getContext("2d")),jt.font=[o,a,i,n+"px",r].join(" "),jt.measureText(Mt(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),Object(ct.j)([t],St(e)).join("")})),function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();var kt=1e-6,Lt="undefined"!=typeof Float32Array?Float32Array:Array,Bt=Math.random;Math.PI;function Ft(){var t=new Lt(9);return Lt!=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}function Gt(t,e){return 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}function Vt(t){var e=new Lt(9);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}function Ut(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}function qt(t,e,n,r,i,o,a,s,u){var c=new Lt(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c[8]=u,c}function Wt(t,e,n,r,i,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t}function zt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ht(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Yt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,f=-l*o+s*u,p=c*o-a*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function $t(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*a,t[3]=s*u-o*l,t[4]=n*l-i*u,t[5]=i*o-n*s,t[6]=o*c-a*u,t[7]=r*u-n*c,t[8]=n*a-r*o,t}function Xt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)}function Kt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],y=n[3],v=n[4],g=n[5],m=n[6],b=n[7],E=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*s+d*l,t[2]=f*o+p*u+d*h,t[3]=y*r+v*a+g*c,t[4]=y*i+v*s+g*l,t[5]=y*o+v*u+g*h,t[6]=m*r+b*a+E*c,t[7]=m*i+b*s+E*l,t[8]=m*o+b*u+E*h,t}function Jt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+p*a+c,t[7]=f*i+p*s+l,t[8]=f*o+p*u+h,t}function Zt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*s,t[2]=p*o+f*u,t[3]=p*a-f*r,t[4]=p*s-f*i,t[5]=p*u-f*o,t[6]=c,t[7]=l,t[8]=h,t}function Qt(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function te(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function ee(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ne(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function ie(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[3]=l-g,t[6]=f+v,t[1]=l+g,t[4]=1-c-d,t[7]=p-y,t[2]=f-v,t[5]=p+y,t[8]=1-c-h,t}function oe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,E=n*c-o*a,T=r*u-i*s,O=r*c-o*s,M=i*c-o*u,w=l*y-h*d,_=l*v-f*d,P=l*g-p*d,A=h*v-f*y,x=h*g-p*y,N=f*g-p*v,S=m*N-b*x+E*A+T*P-O*_+M*w;return S?(S=1/S,t[0]=(s*N-u*x+c*A)*S,t[1]=(u*P-a*N-c*_)*S,t[2]=(a*x-s*P+c*w)*S,t[3]=(i*x-r*N-o*A)*S,t[4]=(n*N-i*P+o*_)*S,t[5]=(r*P-n*x-o*w)*S,t[6]=(y*M-v*O+g*T)*S,t[7]=(v*E-d*M-g*b)*S,t[8]=(d*O-y*E+g*m)*S,t):null}function ae(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function se(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function ue(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function ce(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}function le(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}function he(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}function fe(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}function pe(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]}function de(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=e[0],f=e[1],p=e[2],d=e[3],y=e[4],v=e[5],g=e[6],m=e[7],b=e[8];return Math.abs(n-h)<=kt*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=kt*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=kt*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=kt*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=kt*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-v)<=kt*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-g)<=kt*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-m)<=kt*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-b)<=kt*Math.max(1,Math.abs(l),Math.abs(b))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ye=Kt,ve=le;function ge(){var t=new Lt(16);return Lt!=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 me(t){var e=new Lt(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}function be(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 Ee(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y){var v=new Lt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=s,v[8]=u,v[9]=c,v[10]=l,v[11]=h,v[12]=f,v[13]=p,v[14]=d,v[15]=y,v}function Te(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=p,t[13]=d,t[14]=y,t[15]=v,t}function Oe(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 Me(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else 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];return t}function we(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,E=n*c-o*a,T=r*u-i*s,O=r*c-o*s,M=i*c-o*u,w=l*y-h*d,_=l*v-f*d,P=l*g-p*d,A=h*v-f*y,x=h*g-p*y,N=f*g-p*v,S=m*N-b*x+E*A+T*P-O*_+M*w;return S?(S=1/S,t[0]=(s*N-u*x+c*A)*S,t[1]=(i*x-r*N-o*A)*S,t[2]=(y*M-v*O+g*T)*S,t[3]=(f*O-h*M-p*T)*S,t[4]=(u*P-a*N-c*_)*S,t[5]=(n*N-i*P+o*_)*S,t[6]=(v*E-d*M-g*b)*S,t[7]=(l*M-f*E+p*b)*S,t[8]=(a*x-s*P+c*w)*S,t[9]=(r*P-n*x-o*w)*S,t[10]=(d*O-y*E+g*m)*S,t[11]=(h*E-l*O-p*m)*S,t[12]=(s*_-a*A-u*w)*S,t[13]=(n*A-r*_+i*w)*S,t[14]=(y*b-d*T-v*m)*S,t[15]=(l*T-h*b+f*m)*S,t):null}function _e(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15];return t[0]=s*(f*g-p*v)-h*(u*g-c*v)+y*(u*p-c*f),t[1]=-(r*(f*g-p*v)-h*(i*g-o*v)+y*(i*p-o*f)),t[2]=r*(u*g-c*v)-s*(i*g-o*v)+y*(i*c-o*u),t[3]=-(r*(u*p-c*f)-s*(i*p-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-p*v)-l*(u*g-c*v)+d*(u*p-c*f)),t[5]=n*(f*g-p*v)-l*(i*g-o*v)+d*(i*p-o*f),t[6]=-(n*(u*g-c*v)-a*(i*g-o*v)+d*(i*c-o*u)),t[7]=n*(u*p-c*f)-a*(i*p-o*f)+l*(i*c-o*u),t[8]=a*(h*g-p*y)-l*(s*g-c*y)+d*(s*p-c*h),t[9]=-(n*(h*g-p*y)-l*(r*g-o*y)+d*(r*p-o*h)),t[10]=n*(s*g-c*y)-a*(r*g-o*y)+d*(r*c-o*s),t[11]=-(n*(s*p-c*h)-a*(r*p-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*v-f*y)-l*(s*v-u*y)+d*(s*f-u*h)),t[13]=n*(h*v-f*y)-l*(r*v-i*y)+d*(r*f-i*h),t[14]=-(n*(s*v-u*y)-a*(r*v-i*y)+d*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t}function Pe(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-f*y)-(e*s-r*o)*(l*v-f*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*v-f*p)-(n*u-i*a)*(c*y-h*p)+(r*u-i*s)*(c*d-l*p)}function Ae(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15],b=n[0],E=n[1],T=n[2],O=n[3];return t[0]=b*r+E*s+T*h+O*y,t[1]=b*i+E*u+T*f+O*v,t[2]=b*o+E*c+T*p+O*g,t[3]=b*a+E*l+T*d+O*m,b=n[4],E=n[5],T=n[6],O=n[7],t[4]=b*r+E*s+T*h+O*y,t[5]=b*i+E*u+T*f+O*v,t[6]=b*o+E*c+T*p+O*g,t[7]=b*a+E*l+T*d+O*m,b=n[8],E=n[9],T=n[10],O=n[11],t[8]=b*r+E*s+T*h+O*y,t[9]=b*i+E*u+T*f+O*v,t[10]=b*o+E*c+T*p+O*g,t[11]=b*a+E*l+T*d+O*m,b=n[12],E=n[13],T=n[14],O=n[15],t[12]=b*r+E*s+T*h+O*y,t[13]=b*i+E*u+T*f+O*v,t[14]=b*o+E*c+T*p+O*g,t[15]=b*a+E*l+T*d+O*m,t}function xe(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,y=n[0],v=n[1],g=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*g+e[12],t[13]=e[1]*y+e[5]*v+e[9]*g+e[13],t[14]=e[2]*y+e[6]*v+e[10]*g+e[14],t[15]=e[3]*y+e[7]*v+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*y+s*v+h*g+e[12],t[13]=i*y+u*v+f*g+e[13],t[14]=o*y+c*v+p*g+e[14],t[15]=a*y+l*v+d*g+e[15]),t}function Ne(t,e,n){var r=n[0],i=n[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Se(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d,y,v,g,m,b,E,T,O,M,w,_,P,A,x=r[0],N=r[1],S=r[2],C=Math.hypot(x,N,S);return C<kt?null:(x*=C=1/C,N*=C,S*=C,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],p=e[6],d=e[7],y=e[8],v=e[9],g=e[10],m=e[11],b=x*x*a+o,E=N*x*a+S*i,T=S*x*a-N*i,O=x*N*a-S*i,M=N*N*a+o,w=S*N*a+x*i,_=x*S*a+N*i,P=N*S*a-x*i,A=S*S*a+o,t[0]=s*b+h*E+y*T,t[1]=u*b+f*E+v*T,t[2]=c*b+p*E+g*T,t[3]=l*b+d*E+m*T,t[4]=s*O+h*M+y*w,t[5]=u*O+f*M+v*w,t[6]=c*O+p*M+g*w,t[7]=l*O+d*M+m*w,t[8]=s*_+h*P+y*A,t[9]=u*_+f*P+v*A,t[10]=c*_+p*P+g*A,t[11]=l*_+d*P+m*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function Ce(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=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]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function Ie(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=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]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function je(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=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]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}function Re(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 De(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}function ke(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return c<kt?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Le(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Be(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,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]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Fe(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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 Ge(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,p=i*u,d=i*c,y=o*c,v=a*s,g=a*u,m=a*c;return t[0]=1-(p+y),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=f+g,t[9]=d-v,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ve(t,e){var n=new Lt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),Ge(t,e,n),t}function Ue(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function qe(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,c,l),t}function We(t,e){var n=new Lt(3);qe(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,p=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-p)/v,t[1]=(f-u)/v,t[2]=(s-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/v,t[0]=.25*v,t[1]=(s+c)/v,t[2]=(f+u)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(f-u)/v,t[0]=(s+c)/v,t[1]=.25*v,t[2]=(h+p)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/v,t[0]=(f+u)/v,t[1]=(h+p)/v,t[2]=.25*v),t}function ze(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,p=i*l,d=o*c,y=o*l,v=a*l,g=s*u,m=s*c,b=s*l,E=r[0],T=r[1],O=r[2];return t[0]=(1-(d+v))*E,t[1]=(f+b)*E,t[2]=(p-m)*E,t[3]=0,t[4]=(f-b)*T,t[5]=(1-(h+v))*T,t[6]=(y+g)*T,t[7]=0,t[8]=(p+m)*O,t[9]=(y-g)*O,t[10]=(1-(h+d))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function He(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=o*l,d=o*h,y=a*l,v=a*h,g=s*h,m=u*c,b=u*l,E=u*h,T=r[0],O=r[1],M=r[2],w=i[0],_=i[1],P=i[2],A=(1-(y+g))*T,x=(p+E)*T,N=(d-b)*T,S=(p-E)*O,C=(1-(f+g))*O,I=(v+m)*O,j=(d+b)*M,R=(v-m)*M,D=(1-(f+y))*M;return t[0]=A,t[1]=x,t[2]=N,t[3]=0,t[4]=S,t[5]=C,t[6]=I,t[7]=0,t[8]=j,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+w-(A*w+S*_+j*P),t[13]=n[1]+_-(x*w+C*_+R*P),t[14]=n[2]+P-(N*w+I*_+D*P),t[15]=1,t}function Ye(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[1]=l+g,t[2]=f-v,t[3]=0,t[4]=l-g,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function $e(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function Xe(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var Ke=Xe;function Je(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function Ze(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.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}function Qe(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,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)*u,t[14]=(a+o)*c,t[15]=1,t}var tn=Qe;function en(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t}function nn(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d=e[0],y=e[1],v=e[2],g=r[0],m=r[1],b=r[2],E=n[0],T=n[1],O=n[2];return Math.abs(d-E)<kt&&Math.abs(y-T)<kt&&Math.abs(v-O)<kt?Oe(t):(l=d-E,h=y-T,f=v-O,i=m*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-g*f,a=g*h-m*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(s*d+u*y+c*v),t[14]=-(l*d+h*y+f*v),t[15]=1,t)}function rn(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=u*f-c*h,y=c*l-s*f,v=s*h-u*l;return(p=d*d+y*y+v*v)>0&&(d*=p=1/Math.sqrt(p),y*=p,v*=p),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-f*y,t[5]=f*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function on(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]+")"}function an(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])}function sn(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}function un(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}function cn(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}function ln(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}function hn(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]}function fn(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],y=t[13],v=t[14],g=t[15],m=e[0],b=e[1],E=e[2],T=e[3],O=e[4],M=e[5],w=e[6],_=e[7],P=e[8],A=e[9],x=e[10],N=e[11],S=e[12],C=e[13],I=e[14],j=e[15];return Math.abs(n-m)<=kt*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=kt*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-E)<=kt*Math.max(1,Math.abs(i),Math.abs(E))&&Math.abs(o-T)<=kt*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(a-O)<=kt*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(s-M)<=kt*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-w)<=kt*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(c-_)<=kt*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(l-P)<=kt*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(h-A)<=kt*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(f-x)<=kt*Math.max(1,Math.abs(f),Math.abs(x))&&Math.abs(p-N)<=kt*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(d-S)<=kt*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(y-C)<=kt*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(v-I)<=kt*Math.max(1,Math.abs(v),Math.abs(I))&&Math.abs(g-j)<=kt*Math.max(1,Math.abs(g),Math.abs(j))}var pn=Ae,dn=un;function yn(){var t=new Lt(3);return Lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function vn(t){var e=new Lt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function gn(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function mn(t,e,n){var r=new Lt(3);return r[0]=t,r[1]=e,r[2]=n,r}function bn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function En(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Tn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function On(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Mn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function wn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function _n(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Pn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function An(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function xn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function Nn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function Sn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Cn(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}function In(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function jn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Rn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Dn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function kn(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Ln(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Bn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Fn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Gn(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Vn(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t}function Un(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,f=u*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t}function qn(t,e){e=e||1;var n=2*Bt()*Math.PI,r=2*Bt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function Wn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function zn(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Hn(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*s-r*c,f=r*u-i*s,p=i*f-o*h,d=o*l-r*f,y=r*h-i*l,v=2*a;return l*=v,h*=v,f*=v,p*=2,d*=2,y*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+y,t}function Yn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function $n(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Xn(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Kn(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),c=u&&Bn(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function Jn(t){return t[0]=0,t[1]=0,t[2]=0,t}function Zn(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Qn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function tr(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=kt*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=kt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=kt*Math.max(1,Math.abs(i),Math.abs(s))}var er,nr=On,rr=Mn,ir=wn,or=In,ar=jn,sr=gn,ur=Rn,cr=(er=yn(),function(t,e,n,r,i,o){var a,s;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a<s;a+=e)er[0]=t[a],er[1]=t[a+1],er[2]=t[a+2],i(er,er,o),t[a]=er[0],t[a+1]=er[1],t[a+2]=er[2];return t});function lr(){var t=new Lt(4);return Lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function hr(t){var e=new Lt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function fr(t,e,n,r){var i=new Lt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function pr(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function dr(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function yr(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}function vr(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}function gr(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}function mr(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}function br(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Er(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function Tr(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function Or(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function Mr(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function wr(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}function _r(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}function Pr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function Ar(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function xr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function Nr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function Sr(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function Cr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function Ir(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function jr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Rr(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],l=e[0],h=e[1],f=e[2],p=e[3];return t[0]=h*c-f*u+p*s,t[1]=-l*c+f*a-p*o,t[2]=l*u-h*a+p*i,t[3]=-l*s+h*o-f*i,t}function Dr(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function kr(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*Bt()-1)*n+(r=2*Bt()-1)*r}while(a>=1);do{s=(i=2*Bt()-1)*i+(o=2*Bt()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t}function Lr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Br(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,h=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+h*-u-f*-s,t[1]=h*c+p*-s+f*-a-l*-u,t[2]=f*c+p*-u+l*-s-h*-a,t[3]=e[3],t}function Fr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Gr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function Vr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Ur(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],c=e[3];return Math.abs(n-a)<=kt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=kt*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=kt*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=kt*Math.max(1,Math.abs(o),Math.abs(c))}var qr=vr,Wr=gr,zr=mr,Hr=Pr,Yr=Ar,$r=xr,Xr=Nr,Kr=function(){var t=lr();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function Jr(){var t=new Lt(4);return Lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Zr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Qr(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 ti(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>kt?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function ei(t,e){var n=Si(t,e);return Math.acos(2*n*n-1)}function ni(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function ri(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t}function ii(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t}function oi(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t}function ai(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function si(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function ui(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function ci(t,e,n){return ui(t,e),Ni(t,t,n),si(t,t),t}function li(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],y=n[2],v=n[3];return(o=c*p+l*d+h*y+f*v)<0&&(o=-o,p=-p,d=-d,y=-y,v=-v),1-o>kt?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*p,t[1]=s*l+u*d,t[2]=s*h+u*y,t[3]=s*f+u*v,t}function hi(t){var e=Bt(),n=Bt(),r=Bt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function fi(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function pi(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function di(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function yi(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}function vi(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var gi,mi,bi,Ei,Ti,Oi,Mi=hr,wi=fr,_i=pr,Pi=dr,Ai=yr,xi=ni,Ni=wr,Si=jr,Ci=Dr,Ii=xr,ji=Ii,Ri=Nr,Di=Ri,ki=Ir,Li=Vr,Bi=Ur,Fi=(gi=yn(),mi=mn(1,0,0),bi=mn(0,1,0),function(t,e,n){var r=Bn(e,n);return r<-.999999?(Fn(gi,mi,e),sr(gi)<1e-6&&Fn(gi,bi,e),Ln(gi,gi),Qr(t,gi,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Fn(gi,e,n),t[0]=gi[0],t[1]=gi[1],t[2]=gi[2],t[3]=1+r,ki(t,t))}),Gi=(Ei=Jr(),Ti=Jr(),function(t,e,n,r,i,o){return li(Ei,e,i,o),li(Ti,n,r,o),li(t,Ei,Ti,2*o*(1-o)),t}),Vi=(Oi=Ft(),function(t,e,n,r){return Oi[0]=n[0],Oi[3]=n[1],Oi[6]=n[2],Oi[1]=r[0],Oi[4]=r[1],Oi[7]=r[2],Oi[2]=-e[0],Oi[5]=-e[1],Oi[8]=-e[2],ki(t,di(t,Oi))});function Ui(){var t=new Lt(2);return Lt!=Float32Array&&(t[0]=0,t[1]=0),t}function qi(t){var e=new Lt(2);return e[0]=t[0],e[1]=t[1],e}function Wi(t,e){var n=new Lt(2);return n[0]=t,n[1]=e,n}function zi(t,e){return t[0]=e[0],t[1]=e[1],t}function Hi(t,e,n){return t[0]=e,t[1]=n,t}function Yi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function $i(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Xi(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function Ki(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Ji(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function Zi(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Qi(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function to(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function eo(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function no(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ro(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function io(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function oo(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function ao(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function so(t){var e=t[0],n=t[1];return e*e+n*n}function uo(t,e){return t[0]=-e[0],t[1]=-e[1],t}function co(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function lo(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function ho(t,e){return t[0]*e[0]+t[1]*e[1]}function fo(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function po(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function yo(t,e){e=e||1;var n=2*Bt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function vo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function go(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function mo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function bo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function Eo(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t}function To(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function Oo(t){return t[0]=0,t[1]=0,t}function Mo(t){return"vec2("+t[0]+", "+t[1]+")"}function wo(t,e){return t[0]===e[0]&&t[1]===e[1]}function _o(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=kt*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=kt*Math.max(1,Math.abs(r),Math.abs(o))}var Po,Ao=ao,xo=$i,No=Xi,So=Ki,Co=io,Io=oo,jo=so,Ro=function(){var t=Ui();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],o(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}}(),Do=function(){function t(t,e){this.min=a.create(),this.max=a.create(),this.update(t,e)}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){this.center=a.copy(a.create(),t||a.create()),this.halfExtents=a.copy(a.create(),e||a.fromValues(0,0,0)),this.min=a.sub(this.min,this.center,this.halfExtents),this.max=a.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){a.add(this.center,e,t),a.scale(this.center,this.center,.5),a.sub(this.halfExtents,e,t),a.scale(this.halfExtents,this.halfExtents,.5),a.copy(this.min,t),a.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,p=i+u,d=o-c,y=o+c,v=e.center,g=v[0],m=v[1],b=v[2],E=e.halfExtents,T=E[0],O=E[1],M=E[2],w=g-T,_=g+T,P=m-O,A=m+O,x=b-M,N=b+M;w<l&&(l=w),_>h&&(h=_),P<f&&(f=P),A>p&&(p=A),x<d&&(d=x),N>y&&(y=N),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,s=e[0],u=e[4],c=e[8],l=e[1],h=e[5],f=e[9],p=e[2],d=e[6],y=e[10],v=Math.abs(s),g=Math.abs(u),m=Math.abs(c),b=Math.abs(l),E=Math.abs(h),T=Math.abs(f),O=Math.abs(p),M=Math.abs(d),w=Math.abs(y);a.set(n,e[12]+s*i[0]+u*i[1]+c*i[2],e[13]+l*i[0]+h*i[1]+f*i[2],e[14]+p*i[0]+d*i[1]+y*i[2]),a.set(r,v*o[0]+g*o[1]+m*o[2],b*o[0]+E*o[1]+T*o[2],O*o[0]+M*o[1]+w*o[2]),this.min=a.sub(this.min,n,r),this.max=a.add(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=a.max(a.create(),this.getMin(),e.getMin()),i=a.min(a.create(),this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.prototype.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.min):272===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):a.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.max):272===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):a.fromValues(this.min[0],this.min[1],this.min[2])},t}(),ko=a.create(),Lo=function(){function t(t,e){this.center=t||a.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return a.sub(ko,t,this.center),a.length(ko)<this.radius*this.radius},t.prototype.intersects=function(t){a.sub(ko,t.center,this.center);var e=t.radius+this.radius;return a.length(ko)<=e*e},t}(),Bo=function(){function t(t,e){this.distance=t||0,this.normal=e||a.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return a.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/a.len(this.normal);a.scale(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&a.lerp(n,t,e,i),o},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(Po||(Po={}));var Fo,Go=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Bo)}return t.prototype.extractFromVPMatrix=function(t){var e=Object(ct.g)(t,16),n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15];a.set(this.planes[0].normal,o-n,l-s,d-h),this.planes[0].distance=m-y,a.set(this.planes[1].normal,o+n,l+s,d+h),this.planes[1].distance=m+y,a.set(this.planes[2].normal,o+r,l+u,d+f),this.planes[2].distance=m+v,a.set(this.planes[3].normal,o-r,l-u,d-f),this.planes[3].distance=m-v,a.set(this.planes[4].normal,o-i,l-c,d-p),this.planes[4].distance=m-g,a.set(this.planes[5].normal,o+i,l+c,d+p),this.planes[5].distance=m+g,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Vo=a.create(),Uo=a.create(),qo=a.create(),Wo=a.create(),zo=a.create(),Ho=function(){function t(t,e){this.origin=t||a.create(),this.direction=e||a.fromValues(0,0,-1)}return t.prototype.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},t.prototype.intersectsSphere=function(t,e){var n=a.sub(Vo,this.origin,t.center);a.normalize(Uo,a.copy(Uo,this.direction));var r=a.dot(n,Uo),i=a.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(o<0)return!1;var s=Math.abs(-r-Math.sqrt(o));return e&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,s)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-a.dot(t.normal,this.origin))/a.dot(t.normal,this.direction),r=n>=0;return r&&e&&a.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=Vo,n=Uo,r=qo,i=Wo,o=zo,s=this.direction;return a.sub(e,this.origin,t.center),a.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),a.mul(r,e,s),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(a.set(o,Math.abs(s[0]),Math.abs(s[1]),Math.abs(s[2])),a.cross(n,s,e),a.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=a.copy(a.create(),t.getMin());a.sub(n,n,this.origin);var r=a.copy(a.create(),t.getMax());a.sub(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=n[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=r[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=n[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=r[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=n[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=r[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=a.set(qo,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),s=a.set(Wo,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),u=Math.min(Math.min(s[0],s[1]),s[2]),c=Math.max(Math.max(o[0],o[1]),o[2]),l=u>=c&&c>=0;return l&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,c)),l},t}(),Yo=n(5),$o=function(){function t(t,e,n,r){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}(),Xo=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Array.isArray(t[0])?t[0]:t;if("number"!=typeof n[0]){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].x,n[i].y);n=r}this.points=n,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var n=!1,r=this.points.length/2,i=0,o=r-1;i<r;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],c=this.points[2*o+1];s>e!=c>e&&t<(e-s)/(c-s)*(u-a)+a&&(n=!n)}return n},t}(),Ko=l.defineToken("SceneGraphSelectorFactory"),Jo=l.defineToken("SceneGraphSelector",{multiple:!1}),Zo=function(){function t(){}return t.prototype.selectOne=function(t,e){return t.startsWith("#")?e.find((function(e){return e.id===t.substring(1)})):null},t.prototype.selectAll=function(t,e){return t.startsWith(".")?e.findAll((function(e){return e.className===t.substring(1)})):t.startsWith("#")?e.findAll((function(e){return e.id===t.substring(1)})):t.startsWith("[name=")?e.findAll((function(e){return e.name===t.substring(7,t.length-2)})):e.findAll((function(e){return e.nodeName===t}))},t.prototype.is=function(){return!0},t=Object(ct.c)([N({token:Jo})],t)}();!function(t){t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.RENDER_ORDER_CHANGED="render-order-changed"}(Fo||(Fo={}));var Qo=n(7);function ta(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function ea(t,e){void 0===e&&(e=!1);for(var n=t;n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),n=n.parentNode}t.emit(Fo.BOUNDS_CHANGED,{affectChildren:e})}var na,ra,ia,oa,aa,sa="SceneGraphService",ua=function(){function t(){var t,e,n,r,i,s=this;this.rotate=(t=u.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var c=u.create();u.fromEuler(c,n[0],n[1],n[2]);var l=s.getRotation(e),h=s.getRotation(e.parentNode);u.copy(t,h),u.invert(t,t),u.multiply(c,t,c),u.multiply(o.localRotation,c,l),u.normalize(o.localRotation,o.localRotation),s.dirtifyLocal(e,o)}else s.rotateLocal(e,n)}),this.rotateLocal=(e=u.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=t.transformable;u.fromEuler(e,n[0],n[1],n[2]),u.mul(o.localRotation,o.localRotation,e),s.dirtifyLocal(t,o)}),this.setEulerAngles=(n=u.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=a.fromValues(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){u.fromEuler(o.localRotation,e[0],e[1],e[2]);var c=s.getRotation(t.parentNode);u.copy(n,u.invert(u.create(),c)),u.mul(o.localRotation,o.localRotation,n),s.dirtifyLocal(t,o)}else s.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;a.equals(e,a.create())||(a.transformQuat(e,e,i.localRotation),a.add(i.localPosition,i.localPosition,e),s.dirtifyLocal(t,i))},this.setPosition=(r=o.create(),function(t,e){var n=t.transformable;if(e=a.fromValues(e[0],e[1],e[2]||n.position[2]),!a.equals(s.getPosition(t),e)){if(n.position=e,null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;o.copy(r,i.worldTransform),o.invert(r,r),a.transformMat4(n.localPosition,e,r)}else a.copy(n.localPosition,e);s.dirtifyLocal(t,n)}}),this.translate=(i=a.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r)),a.equals(e,a.create())||(a.add(i,s.getPosition(t),e),s.setPosition(t,i))}),this.setRotation=function(){var t=u.create();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=u.fromValues(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var c=s.getRotation(e.parentNode);u.copy(t,c),u.invert(t,t),u.multiply(a.localRotation,t,n),u.normalize(a.localRotation,a.localRotation),s.dirtifyLocal(e,a)}else s.setLocalRotation(e,n)}}}return t.prototype.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},t.prototype.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},t.prototype.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,yt(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},t.prototype.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;if(!a.equals(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;u.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=a.fromValues(e[0],e[1],e[2]||n.localPosition[2]),a.equals(n.localPosition,e)||(a.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;a.multiply(n.localScale,n.localScale,a.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=a.fromValues(e[0],e[1],e[2]||n.localScale[2]);a.equals(r,n.localScale)||(a.copy(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=u.fromValues(e,n,r,i));var o=t.transformable;u.copy(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),ea(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return o.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return o.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return o.getScaling(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},t.prototype.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(Do.isEmpty(n))return null;var r=new Do;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,r=e?n.renderBounds:n.contentBounds||null;return r&&new Do(r.center,r.halfExtents)||new Do},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new Do).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),s=void 0;a&&(s=new Do).setFromTransformedAABB(a,this.getWorldTransform(t)),i?s&&(i=s.intersection(i)):i=s}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new Do},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=o.create();t.parentNode.transformable&&(e=o.invert(o.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Do.isEmpty(n)){var r=new Do;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Do.isEmpty(i)||(r=new Do).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=Object(ct.g)(r.getMin(),2),s=a[0],u=a[1],c=Object(ct.g)(r.getMax(),2),l=c[0],h=c[1];return new $o(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),l-s,h-u)}return new $o((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),t.dispatchEvent(new Qo.a(Fo.ATTR_MODIFIED,t,null,null,"modelMatrix",Qo.a.MODIFICATION,null,null))}},t.prototype.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])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?o.multiply(e.worldTransform,r.worldTransform,e.localTransform):o.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},Object(ct.c)([C(Ko),Object(ct.f)("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=Object(ct.c)([N()],t)}(),ca="GeometryUpdaterFactory",la="GeometryAABBUpdater";!function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html"}(na||(na={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(ra||(ra={})),function(t){t.BEVEL="bevel",t.ROUND="round",t.MITER="miter"}(ia||(ia={})),function(t){t.CAPITALIZE="capitalize",t.UPPERCASE="uppercase",t.LOWERCASE="lowercase",t.NONE="none"}(oa||(oa={})),function(t){t.START="start",t.CENTER="center",t.END="end",t.LEFT="left",t.RIGHT="right"}(aa||(aa={}));var ha="CanvasConfig",fa=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r,r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o,s=n.unit,u=n.value,c=0,l=0;return""!==s&&"px"!==s||(c=2*u,l=2*u),e.parsedStyle.rInPixels=c/2,{width:c,height:l,x:i,y:a}},t=Object(ct.c)([N({token:{token:la,named:na.CIRCLE}})],t)}(),pa=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry,i=t.x,o=void 0===i?0:i,a=t.y,s=void 0===a?0:a,u=n.unit,c=n.value,l=r.unit,h=r.value,f=0,p=0;return""!==u&&"px"!==u||(f=2*c),""!==l&&"px"!==l||(p=2*h),e.parsedStyle.rxInPixels=f/2,e.parsedStyle.ryInPixels=p/2,{width:f,height:p,x:o,y:s}},t=Object(ct.c)([N({token:{token:la,named:na.ELLIPSE}})],t)}(),da=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o,s=t.width,u=t.height,c=0,l=0,h=s.unit,f=s.value,p=u.unit,d=u.value;return""!==h&&"px"!==h||(c=f),""!==p&&"px"!==p||(l=d),n&&!Mt(n)&&(c||(c=n.width),l||(l=n.height)),e.parsedStyle.widthInPixels=c,e.parsedStyle.heightInPixels=l,{width:c,height:l,x:i,y:a}},t=Object(ct.c)([N({token:[{token:la,named:na.RECT},{token:la,named:na.IMAGE},{token:la,named:na.GROUP}]})],t)}(),ya=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function va(t){var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Pt(e)?"".concat(e,"px"):"".concat(e.value).concat(e.unit||"px"),s=n;Array.isArray(n)||(s=n.split(","));for(var u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&ya.indexOf(c)<0&&(c='"'.concat(c,'"')),s[u]=c}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(s.join(","))}var ga,ma=function(){function t(){}return t.prototype.getOrCreateCanvas=function(){if(this.canvas)return this.canvas;try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),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")}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(){return this.context||this.getOrCreateCanvas(),this.context},t=Object(ct.c)([N()],t)}(),ba={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]},Ea=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ta=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),Oa=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),Ma=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!Oa.exec(n)&&!Ta.exec(e))},this.trimByKinsokuShorui=function(t){var e=Object(ct.i)([],Object(ct.g)(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t){if(this.cache[t])return this.cache[t];var e={ascent:0,descent:0,fontSize:0},n=this.offscreenCanvas.getOrCreateCanvas(),r=this.offscreenCanvas.getOrCreateContext();r.font=t;var i=ba.MetricsString+ba.BaselineSymbol,o=Math.ceil(r.measureText(i).width),a=Math.ceil(r.measureText(ba.BaselineSymbol).width),s=ba.HeightMultiplier*a;a=a*ba.BaselineMultiplier|0,n.width=o,n.height=s,r.fillStyle="#f00",r.fillRect(0,0,o,s),r.font=t,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(i,0,a);var u=r.getImageData(0,0,o||1,s||1).data,c=u.length,l=4*o,h=0,f=0,p=!1;for(h=0;h<a;++h){for(var d=0;d<l;d+=4)if(255!==u[f+d]){p=!0;break}if(p)break;f+=l}for(e.ascent=a-h,f=c-l,p=!1,h=s;h>a;--h){for(d=0;d<l;d+=4)if(255!==u[f+d]){p=!0;break}if(p)break;f-=l}return e.descent=h-a,e.fontSize=e.ascent+e.descent,this.cache[t]=e,e},t.prototype.measureText=function(t,e){var n=e.fontSize,r=e.wordWrap,i=e.lineHeight,o=void 0===i?0:i,a=e.lineWidth,s=e.textBaseline,u=e.textAlign,c=e.letterSpacing,l=void 0===c?0:c,h=e.dropShadow,f=e.dropShadowDistance,p=void 0===f?0:f,d=e.leading,y=void 0===d?0:d,v=va(e),g=this.measureFont(v);0===g.fontSize&&(g.fontSize=n.value,g.ascent=n.value);var m=this.offscreenCanvas.getOrCreateContext();m.font=v;for(var b=(r?this.wordWrap(t,e):t).split(/(?:\r\n|\r|\n)/),E=new Array(b.length),T=0,O=0;O<b.length;O++){var M=m.measureText(b[O]).width+(b[O].length-1)*l;E[O]=M,T=Math.max(T,M)}var w=T+a.value;h&&(w+=p);var _=o||g.fontSize+a.value,P=Math.max(_,g.fontSize+a.value)+(b.length-1)*(_+y);h&&(P+=p);var A=0;return"middle"===s?A=-P/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?A=-P:"top"!==s&&"hanging"!==s||(A=0),{font:v,width:w,height:P,lines:b,lineWidths:E,lineHeight:_+=y,maxLineWidth:T,fontProperties:g,lineMetrics:E.map((function(t,e){var n=0;return"center"===u?n-=t/2:"right"!==u&&"end"!==u||(n-=t),new $o(n-a.value/2,A+e*_,t+a.value,_)}))}},t.prototype.wordWrap=function(t,e){var n=this,r=e.wordWrapWidth,i=void 0===r?0:r,o=e.letterSpacing,a=void 0===o?0:o,s=this.offscreenCanvas.getOrCreateContext(),u=i+a,c=[],l=0,h=0,f={},p=function(t){return n.getFromCache(t,a,f,s)};return Array.from(t).forEach((function(e,r){var i=t[r-1],o=t[r+1],a=p(e);if(n.isNewline(e))return l++,h=0,void(c[l]="");if(h>0&&h+a>u){if(l++,h=0,c[l]="",n.isBreakingSpace(e))return;n.canBreakInLastChar(e)||(c=n.trimToBreakable(c),h=n.sumTextWidthByCache(c[l]||"",f)),n.shouldBreakByKinsokuShorui(e,o)&&(c=n.trimByKinsokuShorui(c),h+=p(i||""))}h+=a,c[l]=(c[l]||"")+e})),c.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&ba.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&ba.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=Object(ct.i)([],Object(ct.g)(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e},t.prototype.canBreakInLastChar=function(t){return!t||!Ea.test(t)},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!Ea.test(t[e]))return e;return-1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},Object(ct.c)([C(ma),Object(ct.f)("design:type",ma)],t.prototype,"offscreenCanvas",void 0),t=Object(ct.c)([N()],t)}(),wa=function(){function t(){}return t.prototype.update=function(t){var e=t.text,n=void 0===e?"":e,r=t.textAlign,i=t.lineWidth,o=t.textBaseline,s=t.x,u=void 0===s?0:s,c=t.y,l=void 0===c?0:c,h=t.dx,f=t.dy,p=this.textService.measureText(n,t);if(t.metrics=p,!n)return{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var d=p.width,y=p.height,v=p.lineHeight,g=p.fontProperties,m=a.fromValues(d/2,y/2,0),b=[0,1],E=0;"center"===r?(E=i.value/2,b=[.5,1]):"right"!==r&&"end"!==r||(E=i.value,b=[1,1]),t.anchor=b;var T=0;return"middle"===o?T=m[1]:"top"===o||"hanging"===o?T=2*m[1]:"alphabetic"===o?T=v-g.ascent:"bottom"!==o&&"ideographic"!==o||(T=0),h&&"px"===h.unit&&(E+=h.value),f&&"px"===f.unit&&(T+=f.value),{width:2*m[0],height:2*m[1],x:u,y:l,offsetX:E,offsetY:T}},Object(ct.c)([C(Ma),Object(ct.f)("design:type",Ma)],t.prototype,"textService",void 0),t=Object(ct.c)([N({token:{token:la,named:na.TEXT}})],t)}(),_a=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),s=Math.min(n,i);return{width:a-o,height:Math.max(n,i)-s,x:o,y:s}},t=Object(ct.c)([N({token:{token:la,named:na.LINE}})],t)}(),Pa=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,Object(ct.i)([],Object(ct.g)(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,Object(ct.i)([],Object(ct.g)(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,Object(ct.i)([],Object(ct.g)(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,Object(ct.i)([],Object(ct.g)(e.map((function(t){return t[1]}))),!1))-i,x:n,y:i}},t=Object(ct.c)([N({token:[{token:la,named:na.POLYLINE},{token:la,named:na.POLYGON}]})],t)}(),Aa=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect,n=e.x,r=e.y;return{width:e.width,height:e.height,x:n,y:r}},t=Object(ct.c)([N({token:{token:la,named:na.PATH}})],t)}(),xa="StylePropertyParser",Na="StylePropertyParserFactory",Sa="StylePropertyUpdater",Ca="StylePropertyUpdaterFactory",Ia="StylePropertyMerger",ja="StylePropertyMergerFactory",Ra=l.defineToken("ContextService",{multiple:!1});!function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"}(ga||(ga={}));var Da,ka="RenderingContext",La=n(2),Ba=n(6),Fa=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return Object(ct.d)(e,t),e}(Ba.a),Ga=":",Va=function(){function t(){this.emitter=new ut.EventEmitter}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=Ct(n)&&n||gt(n)&&n.capture,i=gt(n)&&n.once,o=dt(e)?void 0:e,a=!1,s="";if(t.indexOf(Ga)>-1){var u=Object(ct.g)(t.split(Ga),2),c=u[0];t=u[1],s=c,a=!0}if(t=r?"".concat(t,"capture"):t,e=dt(e)?e:e.handleEvent,a){var l=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null===(t=e[0].target)||void 0===t?void 0:t.name)===s&&l.apply(void 0,Object(ct.i)([],Object(ct.g)(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=Ct(n)&&n||gt(n)&&n.capture,i=dt(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=dt(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new Fa(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof Ba.a))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var r=this.ownerDocument||this.document;return r&&(t.manager=(null===(e=r.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t)),!t.defaultPrevented},t}(),Ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Object(ct.d)(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===na.TEXT&&(n+=this.style.text);try{for(var r=Object(ct.k)(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===na.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t,!0)})),this.nodeName===na.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},e.prototype.lookupPrefix=function(t){throw new Error("Method not implemented.")},e.prototype.normalize=function(){throw new Error("Method not implemented.")},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){var n;if(t===this)return 0;if(!(t instanceof e))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var s=o.length>a.length?o:a,u=s===o?a:o;if(s[s.length-u.length]===u[0])return s===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var p=h.parentNode.childNodes;return p.indexOf(h)<p.indexOf(f)?u===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:s===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(Va),qa=function(){function t(){}return t.tag="c-geometry",t}(),Wa=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),za=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=a.fromValues(0,0,0),this.localRotation=u.fromValues(0,0,0,1),this.localScale=a.fromValues(1,1,1),this.localTransform=o.create(),this.position=a.fromValues(0,0,0),this.rotation=u.fromValues(0,0,0,1),this.scaling=a.fromValues(1,1,1),this.worldTransform=o.create(),this.origin=a.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(Da||(Da={}));var Ha=function(){function t(){this.strategy=Da.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t.tag="c-cullable",t}(),Ya=function(){function t(){this.dirty=!1,this.renderOrder=0}return t.tag="c-sortable",t}();function $a(t){return void 0===t?0:t>360||t<-360?t%360:t}function Xa(t,e,n){return Pt(t)?a.fromValues(t,e,n):3===t.length?a.clone(t):a.fromValues(t[0],t[1],t[2]||0)}function Ka(t){return t*(Math.PI/180)}function Ja(t){return t*(180/Math.PI)}function Za(t,e){var n=e[0],r=e[1],i=e[3],o=e[4];return t[0]=Math.hypot(n,r),t[1]=Math.hypot(i,o),t}function Qa(t,e){return t[0]=e[6],t[1]=e[7],t}function ts(t){return Math.atan2(t[1],t[4])}function es(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,s=Object(ct.g)(o.getScaling(a.create(),e),3),u=s[0],c=s[1],l=s[2],h=Math.asin(-e[2]/u);return h<i?h>-i?(n=Math.atan2(e[6]/c,e[10]/l),r=Math.atan2(e[1]/u,e[0]/u)):(r=0,n=-Math.atan2(e[4]/c,e[5]/c)):(r=0,n=Math.atan2(e[4]/c,e[5]/c)),t[0]=n,t[1]=h,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):l<-.499995*c?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function ns(t,e,n,r,o){var a=Math.cos(t),s=Math.sin(t);return i.fromValues(r*a,o*s,0,-r*s,o*a,0,e,n,1)}function rs(t,e,n,r,i,o,a){var s=2*o/(n-e),u=2*o/(r-i),c=(n+e)/(n-e),l=(r+i)/(r-i),h=-(a+o)/(a-o),f=-2*a*o/(a-o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=c,t[9]=l,t[10]=h,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}var is="function"==typeof Float32Array,os=function(t,e){return 1-3*e+3*t},as=function(t,e){return 3*e-6*t},ss=function(t){return 3*t},us=function(t,e,n){return((os(e,n)*t+as(e,n))*t+ss(e))*t},cs=function(t,e,n){return 3*os(e,n)*t*t+2*as(e,n)*t+ss(e)},ls=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=is?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=us(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var a=r+.1*((e-i[o])/(i[o+1]-i[o])),s=cs(a,t,n);return s>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=cs(e,n,r);if(0===o)return e;e-=(us(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=us(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:us(a(t),e,r)}},hs=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substr(1):t},fs=function(t,e,n){return Math.min(Math.max(t,e),n)},ps=function(t){return Math.pow(t,2)},ds=function(t){return Math.pow(t,3)},ys=function(t){return Math.pow(t,4)},vs=function(t){return Math.pow(t,5)},gs=function(t){return Math.pow(t,6)},ms=function(t){return 1-Math.cos(t*Math.PI/2)},bs=function(t){return 1-Math.sqrt(1-t*t)},Es=function(t){return t*t*(3*t-2)},Ts=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},Os=function(t,e){void 0===e&&(e=[]);var n=Object(ct.g)(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,s=fs(Number(i),1,10),u=fs(Number(a),.1,2);return 0===t||1===t?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-u/(2*Math.PI)*Math.asin(1/s))*(2*Math.PI)/u)},Ms=function(t,e,n){void 0===e&&(e=[]);var r=Object(ct.g)(e,4),i=r[0],o=void 0===i?1:i,a=r[1],s=void 0===a?100:a,u=r[2],c=void 0===u?10:u,l=r[3],h=void 0===l?0:l;o=fs(o,.1,1e3),s=fs(s,.1,1e3),c=fs(c,.1,1e3),h=fs(h,.1,1e3);var f=Math.sqrt(s/o),p=c/(2*Math.sqrt(s*o)),d=p<1?f*Math.sqrt(1-p*p):0,y=p<1?(p*f-h)/d:-h+f,v=n?n*t/1e3:t;return v=p<1?Math.exp(-v*p*f)*(1*Math.cos(d*v)+y*Math.sin(d*v)):(1+y*v)*Math.exp(-v*f),0===t||1===t?t:1-v},ws=(new Map,function(t,e){void 0===e&&(e=[]);var n=Object(ct.g)(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fs(t,0,1)*i)/i}),_s=function(t,e){void 0===e&&(e=[]);var n=Object(ct.g)(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return ls(r,i,o,a)(t)},Ps=ls(.42,0,1,1),As=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},xs=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},Ns=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Ss={steps:ws,"step-start":function(t){return ws(t,[1,"start"])},"step-end":function(t){return ws(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":_s,ease:function(t){return _s(t,[.25,.1,.25,1])},in:Ps,out:As(Ps),"in-out":xs(Ps),"out-in":Ns(Ps),"in-quad":ps,"out-quad":As(ps),"in-out-quad":xs(ps),"out-in-quad":Ns(ps),"in-cubic":ds,"out-cubic":As(ds),"in-out-cubic":xs(ds),"out-in-cubic":Ns(ds),"in-quart":ys,"out-quart":As(ys),"in-out-quart":xs(ys),"out-in-quart":Ns(ys),"in-quint":vs,"out-quint":As(vs),"in-out-quint":xs(vs),"out-in-quint":Ns(vs),"in-expo":gs,"out-expo":As(gs),"in-out-expo":xs(gs),"out-in-expo":Ns(gs),"in-sine":ms,"out-sine":As(ms),"in-out-sine":xs(ms),"out-in-sine":Ns(ms),"in-circ":bs,"out-circ":As(bs),"in-out-circ":xs(bs),"out-in-circ":Ns(bs),"in-back":Es,"out-back":As(Es),"in-out-back":xs(Es),"out-in-back":Ns(Es),"in-bounce":Ts,"out-bounce":As(Ts),"in-out-bounce":xs(Ts),"out-in-bounce":Ns(Ts),"in-elastic":Os,"out-elastic":As(Os),"in-out-elastic":xs(Os),"out-in-elastic":Ns(Os),spring:Ms,"spring-in":Ms,"spring-out":As(Ms),"spring-in-out":xs(Ms),"spring-out-in":Ns(Ms)},Cs=function(t){return Ss[function(t){return hs(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Ss.linear},Is=function(t){return t};function js(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var Rs="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Ds=new RegExp("cubic-bezier\\("+Rs+","+Rs+","+Rs+","+Rs+"\\)"),ks=/steps\(\s*(\d+)\s*\)/,Ls=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Bs(t){var e=Ds.exec(t);if(e)return ls.apply(void 0,Object(ct.i)([],Object(ct.g)(e.slice(1).map(Number)),!1));var n=ks.exec(t);if(n)return js(Number(n[1]),0);var r=Ls.exec(t);return r?js(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):Cs(t)}function Fs(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function Gs(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Vs={in:"ease-in",out:"ease-out","in-out":"ease-in-out","in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};Object.keys(Vs);function Us(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function qs(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(Ws(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Bs(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:zs(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.style[n.property]=n.interpolation(o)}));else for(var n in r)Ws(n)&&(t.style[n]=null)}}function Ws(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}function zs(t,e,n,r){var i=e,o=n,a=Ph[t],s=xh[t];a&&(i=a(e,r,t),o=a(n,r,t));var u=s&&s(i,o,r);if(u){var c=Hs.apply(void 0,Object(ct.i)([],Object(ct.g)(u),!1));return function(t){return 0===t?e:1===t?n:c(t)}}return Hs(!1,!0,(function(t){return t?n:e}))}var Hs=function(t,e,n){return function(r){return n(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r))}},Ys={d:{alias:"path"},cx:{alias:"x"},cy:{alias:"y"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function $s(t,e){var n,r=Us(t),i=Ys[r];return[r=(null==i?void 0:i.alias)||r,(null===(n=null==i?void 0:i.values)||void 0===n?void 0:n[e])||e]}function Xs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Ks(t,e){return Math.abs(t-e)<.001}function Js(t,e){var n=Tt(t),r=Tt(e);return{x:n,y:r,width:Et(t)-n,height:Et(e)-r}}function Zs(t){return(t+2*Math.PI)%(2*Math.PI)}var Qs={box:function(t,e,n,r){return Js([t,n],[e,r])},length:function(t,e,n,r){return Xs(t,e,n,r)},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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Xs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Xs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];c.normalize(s,s);var u=[i-t,o-e];return Math.abs(c.dot(u,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function tu(t,e,n,r,i,o){var a=-1,s=1/0,u=[n,r],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,f=0;f<=c;f++){var p=f*l,d=[i.apply(void 0,Object(ct.i)([],Object(ct.g)(t.concat([p])),!1)),i.apply(void 0,Object(ct.i)([],Object(ct.g)(e.concat([p])),!1))];(m=Xs(u[0],u[1],d[0],d[1]))<s&&(a=p,s=m)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}s=1/0;for(f=0;f<32&&!(h<1e-4);f++){var v=a-h,g=a+h,m=(d=[i.apply(void 0,Object(ct.i)([],Object(ct.g)(t.concat([v])),!1)),i.apply(void 0,Object(ct.i)([],Object(ct.g)(e.concat([v])),!1))],Xs(u[0],u[1],d[0],d[1]));if(v>=0&&m<s)a=v,s=m;else{var b=[i.apply(void 0,Object(ct.i)([],Object(ct.g)(t.concat([g])),!1)),i.apply(void 0,Object(ct.i)([],Object(ct.g)(e.concat([g])),!1))],E=Xs(u[0],u[1],b[0],b[1]);g<=1&&E<s?(a=g,s=E):h*=.5}}return{x:i.apply(void 0,Object(ct.i)([],Object(ct.g)(t.concat([a])),!1)),y:i.apply(void 0,Object(ct.i)([],Object(ct.g)(e.concat([a])),!1))}}function eu(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function nu(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function ru(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,u=6*t-12*e+6*n,c=3*e-3*t,l=[];if(Ks(s,0))Ks(u,0)||(i=-c/u)>=0&&i<=1&&l.push(i);else{var h=u*u-4*s*c;Ks(h,0)?l.push(-u/(2*s)):h>0&&(o=(-u-(a=Math.sqrt(h)))/(2*s),(i=(-u+a)/(2*s))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function iu(t,e,n,r,i,o,a,s,u){var c=eu(t,n,i,a,u),l=eu(e,r,o,s,u),h=Qs.pointAt(t,e,n,r,u),f=Qs.pointAt(n,r,i,o,u),p=Qs.pointAt(i,o,a,s,u),d=Qs.pointAt(h.x,h.y,f.x,f.y,u),y=Qs.pointAt(f.x,f.y,p.x,p.y,u);return[[t,e,h.x,h.y,d.x,d.y,c,l],[c,l,y.x,y.y,p.x,p.y,a,s]]}function ou(t,e,n,r,i,o,a,s,u){if(0===u)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){n+=Xs(t[i],e[i],t[(i+1)%r],e[(i+1)%r])}return n/2}([t,n,i,a],[e,r,o,s]);var c=iu(t,e,n,r,i,o,a,s,.5),l=Object(ct.i)(Object(ct.i)([],Object(ct.g)(c[0]),!1),[u-1],!1),h=Object(ct.i)(Object(ct.i)([],Object(ct.g)(c[1]),!1),[u-1],!1);return ou.apply(void 0,Object(ct.i)([],Object(ct.g)(l),!1))+ou.apply(void 0,Object(ct.i)([],Object(ct.g)(h),!1))}var au={extrema:ru,box:function(t,e,n,r,i,o,a,s){for(var u=[t,a],c=[e,s],l=ru(t,n,i,a),h=ru(e,r,o,s),f=0;f<l.length;f++)u.push(eu(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(eu(e,r,o,s,h[f]));return Js(u,c)},length:function(t,e,n,r,i,o,a,s){return ou(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,u,c,l){return tu([t,n,i,a],[e,r,o,s],u,c,eu,l)},pointDistance:function(t,e,n,r,i,o,a,s,u,c,l){var h=this.nearestPoint(t,e,n,r,i,o,a,s,u,c,l);return Xs(h.x,h.y,u,c)},interpolationAt:eu,pointAt:function(t,e,n,r,i,o,a,s,u){return{x:eu(t,n,i,a,u),y:eu(e,r,o,s,u)}},divide:function(t,e,n,r,i,o,a,s,u){return iu(t,e,n,r,i,o,a,s,u)},tangentAngle:function(t,e,n,r,i,o,a,s,u){var c=nu(t,n,i,a,u),l=nu(e,r,o,s,u);return Zs(Math.atan2(l,c))}};function su(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Xs(r[0],r[1],i[0],i[1])}return e}var uu=function(t){return su(t)};function cu(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function lu(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?au.length.apply(au,Object(ct.i)([],Object(ct.g)(r),!1)):0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=cu(n,r,e),s=cu(r,i,e),u=cu(i,o,e),c=cu(a,s,e),l=cu(s,u,e),h=cu(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function hu(t,e,n){var r=lu(t),i=lu(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],p=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&p[e]&&t.l>=f[e],p[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:hu(y[0],y[1],h)}function fu(t){return du(t)>=0}function pu(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}function du(t){var e=0,n=0,r=0,i=0,o=0;return t.map((function(t){var a;switch(t[0]){case"M":case"Z":return r="M"===t[0]?t[1]:r,i="M"===t[0]?t[2]:i,e=r,n=i,0;default:return o=pu.apply(0,[e,n].concat(t.slice(1))),a=Object(ct.g)(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function yu(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function vu(t){return t.map((function(t){return Array.isArray(t)?vu(t):Number.isNaN(+t)?t:+t}))}function gu(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,s=i+o;return 0===o||t[s]&&"M"===t[s][0]?(a=t[s],["M"].concat(a.slice(-2))):(s>=e&&(s-=n),t[s])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}function mu(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}function bu(t){var e=t.getLocalTransform(),n=(t.style.anchor,[]);switch(t.nodeName){case na.LINE:var r=t.parsedStyle;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(r.x1,r.y1,r.x2,r.y2);break;case na.CIRCLE:var i=t.parsedStyle,o=i.rInPixels,s=i.x,u=void 0===s?0:s,c=i.y;n=mu(o,o,u,void 0===c?0:c);break;case na.ELLIPSE:var l=t.parsedStyle,h=l.rxInPixels,f=l.ryInPixels,p=l.x,d=void 0===p?0:p,y=l.y;n=mu(h,f,d,void 0===y?0:y);break;case na.POLYLINE:case na.POLYGON:n=function(t){return t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t.parsedStyle.points.points);break;case na.RECT:var v=t.parsedStyle;n=function(t,e,n,r,i){return i?[["M",n,i+r],["A",i,i,0,0,1,i+n,r],["L",t-i+n,r],["A",i,i,0,0,1,t+n,i+r],["L",t+n,e-i+r],["A",i,i,0,0,1,t-i+n,e+r],["L",i+n,e+r],["A",i,i,0,0,1,n,e-i+r],["Z"]]:[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(v.widthInPixels,v.heightInPixels,v.x,v.y,v.radius);break;case na.PATH:n=t.parsedStyle.path.curve}if(n.length)return function(t,e,n,r){var i=r.x,o=r.y;return t.reduce((function(t,n){var r="";if("M"===n[0]||"L"===n[0]){var s=a.fromValues(n[1]-i,n[2]-o,0);a.transformMat4(s,s,e),r="".concat(n[0]).concat(s[0],",").concat(s[1])}else if("Z"===n[0])r=n[0];else if("C"===n[0]){var u=a.fromValues(n[1]-i,n[2]-o,0),c=a.fromValues(n[3]-i,n[4]-o,0),l=a.fromValues(n[5]-i,n[6]-o,0);a.transformMat4(u,u,e),a.transformMat4(c,c,e),a.transformMat4(l,l,e),r="".concat(n[0]).concat(u[0],",").concat(u[1],",").concat(c[0],",").concat(c[1],",").concat(l[0],",").concat(l[1])}else if("A"===n[0]){var h=a.fromValues(n[6]-i,n[7]-o,0);a.transformMat4(h,h,e),r="".concat(n[0]).concat(n[1],",").concat(n[2],",").concat(n[3],",").concat(n[4],",").concat(n[5],",").concat(h[0],",").concat(h[1])}return t+r}),"")}(n,e,0,t.parsedStyle)}var Eu=n(21),Tu=Eu.b,Ou=Eu.a;function Mu(t,e){Tu=t,Ou=e}var wu=Tu,_u=Ou,Pu=!!globalThis.TouchEvent,Au=!!globalThis.PointerEvent,xu=1,Nu={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Su(t){return Pu&&t instanceof TouchEvent}function Cu(t){return!globalThis.MouseEvent||t instanceof MouseEvent&&(!Au||!(t instanceof globalThis.PointerEvent))}function Iu(t){var e=[];if(Su(t))for(var n=0;n<t.changedTouches.length;n++){var r=t.changedTouches[n];It(r.button)&&(r.button=t.touches.length?1:0),It(r.buttons)&&(r.buttons=t.touches.length?1:0),It(r.isPrimary)&&(r.isPrimary=1===t.touches.length&&"touchstart"===t.type),It(r.width)&&(r.width=r.radiusX||1),It(r.height)&&(r.height=r.radiusY||1),It(r.tiltX)&&(r.tiltX=0),It(r.tiltY)&&(r.tiltY=0),It(r.pointerType)&&(r.pointerType="touch"),It(r.pointerId)&&(r.pointerId=r.identifier||0),It(r.pressure)&&(r.pressure=r.force||.5),It(r.twist)&&(r.twist=0),It(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,r.type=t.type,e.push(r)}else if(Cu(t)){var i=t;It(i.isPrimary)&&(i.isPrimary=!0),It(i.width)&&(i.width=1),It(i.height)&&(i.height=1),It(i.tiltX)&&(i.tiltX=0),It(i.tiltY)&&(i.tiltY=0),It(i.pointerType)&&(i.pointerType="mouse"),It(i.pointerId)&&(i.pointerId=xu),It(i.pressure)&&(i.pressure=.5),It(i.twist)&&(i.twist=0),It(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,e.push(i)}else e.push(t);return e}var ju={},Ru=0;function Du(t,e){if(t){var n="string"==typeof t?t:t.id||Ru++;ju[n]&&ju[n].destroy(),ju[n]=e}}var ku="undefined"!=typeof window&&void 0!==window.document,Lu=0,Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=wh.get(sa),e.entity=Lu++,e.renderable=new Wa,e.cullable=new Ha,e.transformable=new za,e.sortable=new Ya,e.geometry=new qa,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.parsedStyle={},e.attributes={},e}return Object(ct.d)(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter((function(t){return""!==t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.emit(Fo.CHILD_INSERTED,{child:t}),t.dispatchEvent(new Qo.a(Fo.INSERTED,this,"","","",0,"","")),t},e.prototype.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new Qo.a(Fo.REMOVED,this,"","","",0,"","")),e&&(t.emit(Fo.DESTROY,{}),t.destroyed=!0),this.emit(Fo.CHILD_REMOVED,{child:t}),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.prototype.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},e.prototype.matches=function(t){return this.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return this.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach((function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)}))}},e.prototype.before=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this),i=Object(ct.g)(e),o=i[0],a=i.slice(1);this.parentNode.appendChild(o,r),(t=o).after.apply(t,Object(ct.i)([],Object(ct.g)(a),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,Object(ct.i)([],Object(ct.g)(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){return t.appendChild(e)}))},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e,n){return t.appendChild(e,n)}))},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,Object(ct.i)([],Object(ct.g)(t),!1))},e.prototype.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.prototype.destroy=function(){this.emit(Fo.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){var e=Object(ct.g)($s(t,""),1)[0],n=this.attributes[e];return yt(n)?null:n},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.prototype.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},e}(Ua),Fu=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return Object(ct.d)(e,t),e}(Ba.a),Gu=0,Vu=function(){function t(t,e){this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(Gu++),this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},t.prototype.persist=function(){throw new Error("Method not implemented.")},t.prototype.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},t.prototype.commitStyles=function(){throw new Error("Method not implemented.")},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new Fu(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new Fu(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function Uu(t,e){return Number(t.id)-Number(e.id)}var qu=function(){function t(){var t=this;this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(e){t.currentTime=e,t.discardAnimations(),0===t.animations.length?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(e){var n=t.rafCallbacks;t.rafCallbacks=[],e<Number(t.currentTime)&&(e=Number(t.currentTime)),t.animations.sort(Uu),t.animations=t.tick(e,!0,t.animations)[0],n.forEach((function(t){t[1](e)})),t.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t){var e=new Vu(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(Uu),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){_u(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=wu(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,Object(ct.i)([],Object(ct.g)(a),!1)),(i=this.pendingEffects).push.apply(i,Object(ct.i)([],Object(ct.g)(s),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),Wu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Is,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=Bs(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function zu(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(null!=a){if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}else r=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var s=Number(n[a].computedOffset);if(null!=s&&null!=o){for(var u=1;u<a-i;u++)n[i+u].computedOffset=o+(s-o)*u/(a-i);i=a,o=s}}}(),n}var Hu="backwards|forwards|both|none".split("|"),Yu="reverse|alternate|alternate-reverse".split("|");function $u(t,e){var n=new Wu;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===Hu.indexOf(t[e]))return;if("direction"===e&&-1===Yu.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function Xu(t,e){return $u(t=Ku(null!=t?t:{duration:"auto"}),e)}function Ku(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var Ju=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=Xu(n,!1),this.timing.effect=this,this.timing.activeDuration=Fs(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=zu(e,this.timing),this.interpolations=qs(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=Gs(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=zu(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),Zu={anchor:[0,0,0],origin:[0,0,0],opacity:1,fillOpacity:1,strokeOpacity:1,fill:"transparent",stroke:"transparent"},Qu=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this)||this).activeAnimations=[],o.config=e,o.config.interactive=null!==(n=o.config.capture)&&void 0!==n?n:o.config.interactive,o.id=o.config.id||"",o.name=o.config.name||"",(o.config.className||o.config.class)&&(o.className=o.config.className||o.config.class),o.interactive=null===(r=o.config.interactive)||void 0===r||r,o.nodeName=o.config.type||na.GROUP,o.config.style=Object(ct.a)(Object(ct.a)(Object(ct.a)(Object(ct.a)({},Zu),{zIndex:null!==(i=o.config.zIndex)&&void 0!==i?i:0,visibility:!1===o.config.visible?"hidden":"visible"}),o.config.style),o.config.attrs),o.style=new Proxy(Object(ct.a)(Object(ct.a)({},o.attributes),{setProperty:function(t,e){o.setAttribute(t,e)},getPropertyValue:function(t){return o.getAttribute(t)},removeProperty:function(t){o.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),wh.get(lt).add(o.entity,o),o}return Object(ct.d)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),wh.get(lt).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},e.prototype.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:Object(ct.a)({},this.attributes)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){var e=this;void 0===t&&(t={});var n=this.renderable;for(var r in t){var i=Object(ct.g)($s(r,t[r]),2),o=i[0],a=i[1];this.attributes[o]=a,this.parseStyleProperty(o,a)}var s={x:1/0,y:1/0};Object.keys(t).sort((function(t,e){return(s[t]||0)-(s[e]||0)})).forEach((function(t){var n=Object(ct.g)($s(t,""),1)[0];e.updateStyleProperty(n,void 0,e.parsedStyle[n])})),n.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1);var i=Object(ct.g)($s(e,n),2),o=i[0],a=i[1];!r&&Dt(a,this.attributes[o])&&"transformOrigin"!==o&&"visibility"!==o||("visibility"===o?this.forEach((function(t){t.changeAttribute(o,a)})):this.changeAttribute(o,a),t.prototype.setAttribute.call(this,o,a))},e.prototype.parseStyleProperty=function(t,e){var n=Ph[t];this.parsedStyle[t]=n?n(e,this,t):e},e.prototype.updateStyleProperty=function(t,e,n){var r=this,i=Ah[t];i&&i.forEach((function(i){i(e,n,r,r.sceneGraphService,t)}))},e.prototype.changeAttribute=function(t,e){var n=this,r=this.renderable,i=this.attributes[t],o=this.parsedStyle[t];this.attributes[t]=e,this.parseStyleProperty(t,e);var a=this.parsedStyle[t];this.updateStyleProperty(t,o,a),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){ea(t),t.dispatchEvent(new Qo.a(Fo.ATTR_MODIFIED,t,n,n,"clipPath",Qo.a.MODIFICATION,n,n))})),r.dirty=!0,this.dispatchEvent(new Qo.a(Fo.ATTR_MODIFIED,this,i,e,t,Qo.a.MODIFICATION,o,a))},e.prototype.getBBox=function(){var t=this.getBounds(),e=Object(ct.g)(t.getMin(),2),n=e[0],r=e[1],i=Object(ct.g)(t.getMax(),2),o=i[0],a=i[1];return new $o(n,r,o-n,a-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,Xa(t,e,n)),this.attributes.origin=this.getOrigin(),this},e.prototype.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,Xa(t,e,n)),this.syncLocalPosition(),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,Xa(t,e,n)),this.syncLocalPosition(),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,Xa(t,e,n)),this.syncLocalPosition(),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,Xa(t,e,n)),this.syncLocalPosition(),this},e.prototype.getPosition=function(){return this.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Xa(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Xa(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return this.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var t=Object(ct.g)(es(a.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return Ja(t[2])},e.prototype.getLocalEulerAngles=function(){var t=Object(ct.g)(es(a.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return Ja(t[2])},e.prototype.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return yt(e)&&yt(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return yt(e)&&yt(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.getRotation=function(){return this.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},e.prototype.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.syncLocalPosition=function(){var t=this.getLocalPosition();this.attributes.x=t[0],this.attributes.y=t[1]},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(i=null===(r=this.attributes.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return this.parsedStyle.transform=void 0,i?i.play(new Ju(this,t,e)):null},e.prototype.show=function(){this.style.visibility="visible"},e.prototype.hide=function(){this.style.visibility="hidden"},e.prototype.isVisible=function(){var t=this.cullable;return"visible"===this.getAttribute("visibility")&&(!t||t&&!t.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,Object(ct.i)([],Object(ct.g)(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Object(ct.i)([],Object(ct.g)(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))-1),this},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.getClip=function(){return this.style.clipPath||null},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Object(ct.g)(e,2),i=r[0],o=r[1];return i?gt(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e.prototype.getMatrix=function(){var t=this.getWorldTransform(),e=Object(ct.g)(o.getTranslation(a.create(),t),2),n=e[0],r=e[1],i=Object(ct.g)(o.getScaling(a.create(),t),2),s=i[0],c=i[1],l=o.getRotation(u.create(),t),h=Object(ct.g)(es(a.create(),l),3),f=h[0],p=(h[1],h[2]);return ns(f||p,n,r,s,c)},e.prototype.setMatrix=function(t){var e=t[0],n=t[3],r=t[1],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=Math.atan2(n,e);this.setEulerAngles(s).setPosition(t[6],t[7]).setLocalScale(o,a)},e}(Bu),tc=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.handleMounted=function(t){t.target===t.currentTarget&&n.connectedCallback&&n.connectedCallback()},n.handleUnmounted=function(t){t.target===t.currentTarget&&n.disconnectedCallback&&n.disconnectedCallback()},n.handleAttributeChanged=function(t){if(t.target===n){var e=t.attrName,r=t.prevValue,i=t.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(e,r,i)}},n.attributeChangedCallback&&n.addEventListener(Fo.ATTR_MODIFIED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(Fo.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(Fo.UNMOUNTED,n.handleUnmounted),n}return Object(ct.d)(e,t),e}(Qu),ec=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.CIRCLE,style:Object(ct.a)({r:0,anchor:[.5,.5],lineWidth:0},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),nc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.ELLIPSE,style:Object(ct.a)({rx:0,ry:0,anchor:[.5,.5],lineWidth:0},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),rc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.GROUP,style:Object(ct.a)({width:"auto",height:"auto",textAlign:"inherit",fontSize:"inherit"},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),ic=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.IMAGE,style:Object(ct.a)({img:"",width:"auto",height:"auto",lineWidth:0},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),oc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.LINE,style:Object(ct.a)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineJoin:ia.MITER,lineCap:ra.BUTT,lineWidth:1,isBillboard:!1},n)},r))||this}return Object(ct.d)(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=Qs.pointAt(n,r,i,o,t);return new Yo.a(a.x,a.y)},e.prototype.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,i=t.y2;return Qs.length(e,n,r,i)},e}(Qu),ac=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.PATH,style:Object(ct.a)({path:"",lineJoin:ia.MITER,lineCap:ra.BUTT,lineWidth:1,miterLimit:4},n)},r))||this}return Object(ct.d)(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.prototype.getPoint=function(t){var e=0,n=0,r=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return r?new Yo.a(r[0][1],r[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var i=r[n];if(yt(i)||yt(n))return null;var o=i.length,a=r[n+1],s=au.pointAt(i[o-2],i[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e),u=s.x,c=s.y;return new Yo.a(u,c)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},e}(Qu),sc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.POLYGON,style:Object(ct.a)({points:[],miterLimit:4,lineWidth:1},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),uc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.POLYLINE,style:Object(ct.a)({points:[],lineJoin:ia.MITER,lineCap:ra.BUTT,lineWidth:1,miterLimit:4},n)},r))||this}return Object(ct.d)(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,r=e.segments,i=0,o=0;r.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}));var a=Qs.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],i),s=a.x,u=a.y;return new Yo.a(s,u)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(Qu),cc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=Object(ct.h)(e,["style"]);return t.call(this,Object(ct.a)({type:na.RECT,style:Object(ct.a)({width:"auto",height:"auto",lineWidth:0},n)},r))||this}return Object(ct.d)(e,t),e}(Qu),lc=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=Object(ct.h)(e,["style"]);return(n=t.call(this,Object(ct.a)({type:na.TEXT,style:Object(ct.a)({text:"",fontSize:"inherit",fontFamily:"inherit",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"inherit",textBaseline:"alphabetic",dropShadow:!1,dropShadowDistance:5,fill:"#000",letterSpacing:0,lineHeight:0,lineJoin:ia.MITER,lineCap:ra.BUTT,lineWidth:0,miterLimit:10,stroke:"#000",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0},r)},i))||this).LENGTHADJUST_SPACING=1,n.LENGTHADJUST_SPACINGANDGLYPHS=2,n.LENGTHADJUST_UNKNOWN=0,n}return Object(ct.d)(e,t),e.prototype.getCharNumAtPosition=function(t){throw new Error("Method not implemented.")},e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getEndPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getExtentOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getNumberOfChars=function(){throw new Error("Method not implemented.")},e.prototype.getRotationOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getStartPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getSubStringLength=function(t,e){throw new Error("Method not implemented.")},e.prototype.selectSubString=function(t,e){throw new Error("Method not implemented.")},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}(Qu),hc=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=Object(ct.h)(e,["style"]);return(n=t.call(this,Object(ct.a)({type:na.HTML,style:Object(ct.a)({innerHTML:"",className:"",style:""},r)},i))||this).cullable.enable=!1,n}return Object(ct.d)(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,s=new Do;return s.setMinMax(a.fromValues(i,o,0),a.fromValues(i+n.width,o+n.height,0)),s}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=o.invert(o.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Do.isEmpty(e)){var n=new Do;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(Qu),fc=function(t){function e(){var e=t.call(this)||this;return e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new qu,e.documentElement=new rc({id:"g-root",style:{textAlign:aa.START,fontSize:"16px",fontFamily:"sans-serif"}}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return Object(ct.d)(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?lc:rc),new n(e)},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},e.prototype.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(Ua),pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.client=new Yo.a,e.movement=new Yo.a,e.offset=new Yo.a,e.global=new Yo.a,e.screen=new Yo.a,e}return Object(ct.d)(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw new Error("Method not implemented.")},e}(Ba.a),dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return Object(ct.d)(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e}(pc),yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return Object(ct.d)(e,t),e}(pc),vc=n(31),gc=n(17),mc=function(){function t(){this.registry={},this.define(na.CIRCLE,ec),this.define(na.ELLIPSE,nc),this.define(na.RECT,cc),this.define(na.IMAGE,ic),this.define(na.LINE,oc),this.define(na.GROUP,rc),this.define(na.PATH,ac),this.define(na.POLYGON,sc),this.define(na.POLYLINE,uc),this.define(na.TEXT,lc),this.define(na.HTML,hc)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),bc=l.defineToken("RenderingPluginContribution"),Ec=function(){function t(){this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new La.AsyncParallelHook,prepare:new La.SyncWaterfallHook(["object"]),beginFrame:new La.SyncHook([]),beforeRender:new La.SyncHook(["objectToRender"]),render:new La.SyncHook(["objectToRender"]),afterRender:new La.SyncHook(["objectToRender"]),endFrame:new La.SyncHook([]),destroy:new La.SyncHook([]),pick:new La.AsyncSeriesWaterfallHook(["result"]),pointerDown:new La.SyncHook(["event"]),pointerUp:new La.SyncHook(["event"]),pointerMove:new La.SyncHook(["event"]),pointerOut:new La.SyncHook(["event"]),pointerOver:new La.SyncHook(["event"]),pointerWheel:new La.SyncHook(["event"])}}return t.prototype.init=function(){return Object(ct.b)(this,void 0,void 0,(function(){var t=this;return Object(ct.e)(this,(function(e){switch(e.label){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(e){e.apply(t)})),[4,this.hooks.init.promise()];case 1:return e.sent(),this.inited=!0,[2]}}))}))},t.prototype.getStats=function(){return this.stats},t.prototype.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this,n=this.hooks.prepare.call(t);t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,n&&(this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(n),this.hooks.render.call(n),this.hooks.afterRender.call(n),t.renderable.dirty=!1);var r=t.sortable,i=!1;r.dirty&&(r.sorted=t.childNodes.slice().sort(ta),i=!0,r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)})),i&&t.forEach((function(t){t.emit(Fo.RENDER_ORDER_CHANGED,{renderOrder:t.sortable.renderOrder})}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(ga.DISPLAY_OBJECT_CHANGED)},Object(ct.c)([st(bc),Object(ct.f)("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),Object(ct.c)([C(ka),Object(ct.f)("design:type",Object)],t.prototype,"renderingContext",void 0),Object(ct.c)([C(sa),Object(ct.f)("design:type",Object)],t.prototype,"sceneGraphService",void 0),t=Object(ct.c)([N()],t)}(),Tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.onPointerDown=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n;return Object(ct.e)(this,(function(r){switch(r.label){case 0:return t instanceof dc?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType?this.dispatchEvent(e,"touchstart"):"mouse"!==e.pointerType&&"pen"!==e.pointerType||(n=2===e.button,this.dispatchEvent(e,n?"rightdown":"mousedown")),this.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerUp=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c;return Object(ct.e)(this,(function(l){switch(l.label){case 0:return t instanceof dc?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?this.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.dispatchEvent(n,s?"rightup":"mouseup")),r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[t.button]),o=i,i&&!n.composedPath().includes(i)){for(a=i;a&&!n.composedPath().includes(a);)n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?this.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.notifyTarget(n,s?"rightupoutside":"mouseupoutside")),Ua.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[t.button],o=a}return o&&((u=this.clonePointerEvent(n,"click")).target=o,u.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:u.target,timeStamp:e}),(c=r.clicksByButton[t.button]).target===u.target&&e-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=u.target,c.timeStamp=e,u.detail=c.clickCount,"mouse"===u.pointerType||"touch"===u.pointerType?this.dispatchEvent(u,"click"):this.dispatchEvent(u,"pointertap"),this.freeEvent(u)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h;return Object(ct.e)(this,(function(f){switch(f.label){case 0:return t instanceof dc?[4,this.createPointerEvent(t)]:[2];case 1:return e=f.sent(),n="mouse"===e.pointerType||"pen"===e.pointerType,r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.overTargets),r.overTargets&&i!==e.target?(o="mousemove"===t.type?"mouseout":"pointerout",[4,this.createPointerEvent(t,o,i||void 0)]):[3,5];case 2:return a=f.sent(),this.dispatchEvent(a,"pointerout"),n&&this.dispatchEvent(a,"mouseout"),e.composedPath().includes(i)?[3,4]:[4,this.createPointerEvent(t,"pointerleave",i||void 0)];case 3:for((s=f.sent()).eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseleave"),Ua.isNode(s.target)&&(s.target=s.target.parentNode);this.freeEvent(s),f.label=4;case 4:this.freeEvent(a),f.label=5;case 5:if(i!==e.target){for(u="mousemove"===t.type?"mouseover":"pointerover",c=this.clonePointerEvent(e,u),this.dispatchEvent(c,"pointerover"),n&&this.dispatchEvent(c,"mouseover"),l=i&&Ua.isNode(i)&&i.parentNode;l&&l!==(Ua.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(Ua.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(Ua.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),Ua.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&this.dispatchEvent(e,"touchmove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n,r,i,o;return Object(ct.e)(this,(function(a){switch(a.label){case 0:return t instanceof dc?(e=this.trackingData(t.pointerId)).overTargets?(n="mouse"===t.pointerType||"pen"===t.pointerType,r=this.findMountedTarget(e.overTargets),[4,this.createPointerEvent(t,"pointerout",r||void 0)]):[3,3]:[2];case 1:return i=a.sent(),this.dispatchEvent(i),n&&this.dispatchEvent(i,"mouseout"),[4,this.createPointerEvent(t,"pointerleave",r||void 0)];case 2:for((o=a.sent()).eventPhase=o.AT_TARGET;o.target&&o.target!==(Ua.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),Ua.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,this.freeEvent(i),this.freeEvent(o),a.label=3;case 3:return this.cursor=null,[2]}}))}))},e.onPointerOver=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n,r,i;return Object(ct.e)(this,(function(o){switch(o.label){case 0:return t instanceof dc?(e=this.trackingData(t.pointerId),[4,this.createPointerEvent(t)]):[2];case 1:for(n=o.sent(),r="mouse"===n.pointerType||"pen"===n.pointerType,this.dispatchEvent(n,"pointerover"),r&&this.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(this.cursor=this.getCursor(n.target)),(i=this.clonePointerEvent(n,"pointerenter")).eventPhase=i.AT_TARGET;i.target&&i.target!==(Ua.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),Ua.isNode(i.target)&&(i.target=i.target.parentNode);return e.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i),[2]}}))}))},e.onPointerUpOutside=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e,n,r,i;return Object(ct.e)(this,(function(o){switch(o.label){case 0:return t instanceof dc?(e=this.trackingData(t.pointerId),n=this.findMountedTarget(e.pressTargetsByButton[t.button]),[4,this.createPointerEvent(t)]):[2];case 1:if(r=o.sent(),n){for(i=n;i;)r.currentTarget=i,this.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?this.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Ua.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return Object(ct.b)(e,void 0,void 0,(function(){var e;return Object(ct.e)(this,(function(n){switch(n.label){case 0:return t instanceof yc?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return Object(ct.d)(e,t),e.prototype.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.prototype.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Yo.a(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.prototype.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Yo.a(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,s=i.width,u=i.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=o.multiply(o.create(),l,c),f=a.fromValues(e/s*2-1,2*(1-n/u)-1,0);return a.transformMat4(f,f,h),new Yo.a(f[0],f[1])},e.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=o.multiply(o.create(),n,r),s=a.fromValues(t.x,t.y,0);a.transformMat4(s,s,i);var u=this.canvasConfig,c=u.width,l=u.height;return new Yo.a((s[0]+1)/2*c,(1-(s[1]+1)/2)*l)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)Ua.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return Object(ct.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(ct.e)(this,(function(a){switch(a.label){case 0:return e=t.viewportX,n=t.viewportY,r=this.canvasConfig,i=r.width,o=r.height,e<0||n<0||e>i||n>o?[2,null]:[4,this.pickHandler(t)];case 1:return[2,a.sent()||this.rootTarget||null]}}))}))},e.prototype.createPointerEvent=function(t,e,n){return Object(ct.b)(this,void 0,void 0,(function(){var r,i,o;return Object(ct.e)(this,(function(a){switch(a.label){case 0:return r=this.allocateEvent(dc),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r._originalEvent=t,i=r,null==n?[3,1]:(o=n,[3,3]);case 1:return[4,this.hitTest({clientX:r.clientX,clientY:r.clientY,viewportX:r.viewportX,viewportY:r.viewportY,x:r.global.x,y:r.global.y})];case 2:o=a.sent(),a.label=3;case 3:return i.target=o,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createWheelEvent=function(t){return Object(ct.b)(this,void 0,void 0,(function(){var e,n;return Object(ct.e)(this,(function(r){switch(r.label){case 0:return e=this.allocateEvent(yc),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e._originalEvent=t,n=e,[4,this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.global.x,y:e.global.y})];case 1:return n.target=r.sent(),[2,e]}}))}))},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(dc);return n.nativeEvent=t.nativeEvent,n._originalEvent=t._originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.prototype.copyPointerData=function(t,e){t instanceof dc&&e instanceof dc&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.prototype.copyMouseData=function(t,e){t instanceof pc&&e instanceof pc&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||Ua.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=Bu.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Ua.isNode(e)&&e.parentNode}},Object(ct.c)([C(ka),Object(ct.f)("design:type",Object)],e.prototype,"renderingContext",void 0),Object(ct.c)([C(Ra),Object(ct.f)("design:type",Object)],e.prototype,"contextService",void 0),Object(ct.c)([C(ha),Object(ct.f)("design:type",Object)],e.prototype,"canvasConfig",void 0),Object(ct.c)([Object(f.postConstruct)(),Object(ct.f)("design:type",Function),Object(ct.f)("design:paramtypes",[]),Object(ct.f)("design:returntype",void 0)],e.prototype,"init",null),e=Object(ct.c)([N()],e)}(ut.EventEmitter);function Oc(t,e,n){var r=n.getGeometryBounds();if(!Do.isEmpty(r)){var i=n.geometry;if(i&&i.contentBounds){var o=a.multiply(a.create(),a.fromValues.apply(a,Object(ct.i)([],Object(ct.g)(r.halfExtents.map((function(t){return 2*t}))),!1)),a.subtract(a.create(),Xa(e||a.create()),Xa(t||a.create())));i.contentBounds.update(a.subtract(i.contentBounds.center,i.contentBounds.center,o),i.contentBounds.halfExtents),i.renderBounds.update(a.subtract(i.renderBounds.center,i.renderBounds.center,o),i.renderBounds.halfExtents),ea(n)}}}var Mc=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function wc(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function _c(){}var Pc,Ac="\\s*([+-]?\\d+)\\s*",xc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sc=/^#([0-9a-f]{3,8})$/,Cc=new RegExp("^rgb\\("+[Ac,Ac,Ac]+"\\)$"),Ic=new RegExp("^rgb\\("+[Nc,Nc,Nc]+"\\)$"),jc=new RegExp("^rgba\\("+[Ac,Ac,Ac,xc]+"\\)$"),Rc=new RegExp("^rgba\\("+[Nc,Nc,Nc,xc]+"\\)$"),Dc=new RegExp("^hsl\\("+[xc,Nc,Nc]+"\\)$"),kc=new RegExp("^hsla\\("+[xc,Nc,Nc,xc]+"\\)$"),Lc={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 Bc(){return this.rgb().formatHex()}function Fc(){return this.rgb().formatRgb()}function Gc(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Sc.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Vc(e):3===n?new Wc(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Uc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Uc(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=Cc.exec(t))?new Wc(e[1],e[2],e[3],1):(e=Ic.exec(t))?new Wc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=jc.exec(t))?Uc(e[1],e[2],e[3],e[4]):(e=Rc.exec(t))?Uc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Dc.exec(t))?$c(e[1],e[2]/100,e[3]/100,1):(e=kc.exec(t))?$c(e[1],e[2]/100,e[3]/100,e[4]):Lc.hasOwnProperty(t)?Vc(Lc[t]):"transparent"===t?new Wc(NaN,NaN,NaN,0):null}function Vc(t){return new Wc(t>>16&255,t>>8&255,255&t,1)}function Uc(t,e,n,r){return r<=0&&(t=e=n=NaN),new Wc(t,e,n,r)}function qc(t){return t instanceof _c||(t=Gc(t)),t?new Wc((t=t.rgb()).r,t.g,t.b,t.opacity):new Wc}function Wc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function zc(){return"#"+Yc(this.r)+Yc(this.g)+Yc(this.b)}function Hc(){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 Yc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function $c(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Kc(t,e,n,r)}function Xc(t){if(t instanceof Kc)return new Kc(t.h,t.s,t.l,t.opacity);if(t instanceof _c||(t=Gc(t)),!t)return new Kc;if(t instanceof Kc)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Kc(a,s,u,t.opacity)}function Kc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Jc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Mc(_c,Gc,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Bc,formatHex:Bc,formatHsl:function(){return Xc(this).formatHsl()},formatRgb:Fc,toString:Fc}),Mc(Wc,(function(t,e,n,r){return 1===arguments.length?qc(t):new Wc(t,e,n,null==r?1:r)}),wc(_c,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Wc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wc(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:zc,formatHex:zc,formatRgb:Hc,toString:Hc})),Mc(Kc,(function(t,e,n,r){return 1===arguments.length?Xc(t):new Kc(t,e,n,null==r?1:r)}),wc(_c,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Kc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Kc(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,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Wc(Jc(t>=240?t-240:t+120,i,r),Jc(t,i,r),Jc(t<120?t+240:t-120,i,r),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+")")}})),function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Pc||(Pc={}));var Zc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Qc=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,tl=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,el=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function nl(t){if(void 0===t&&(t=""),"transparent"===t)return{type:Pc.Constant,value:[0,0,0,0],formatted:"rgba(0,0,0,0)"};"currentColor"===t&&(t="black");var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=Zc.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(el))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=Object(ct.g)([1,1],2),a=o[0],s=o[1],u=Object(ct.g)([0,0],2),c=u[0],l=u[1],h=void 0,f=void 0;r>=0&&r<.5*Math.PI?(h={x:c,y:l},f={x:a,y:s}):.5*Math.PI<=r&&r<Math.PI?(h={x:a,y:l},f={x:c,y:s}):Math.PI<=r&&r<1.5*Math.PI?(h={x:a,y:s},f={x:c,y:l}):(h={x:c,y:s},f={x:a,y:l});var p=Math.tan(r),d=p*p,y=(f.x-h.x+p*(f.y-h.y))/(d+1)+h.x,v=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:v,steps:i,hash:t}}return null}(t);if(n)return{type:Pc.LinearGradient,value:n,formatted:""}}else if("r"===e){var r=function(t){var e,n=Qc.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(el))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var s=n[4].match(el);return s[s.length-1].split(":")[1]}return{x0:r,y0:i,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(t);if(r){if(!Mt(r))return{type:Pc.RadialGradient,value:r,formatted:""};t=r}}else if("p"===e){var i=function(t){var e=tl.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{src:r,repetition:n,hash:t}}return null}(t);if(i)return{type:Pc.Pattern,value:i,formatted:""}}var o=Gc(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r/255,a[1]=o.g/255,a[2]=o.b/255,a[3]=o.opacity),{type:Pc.Constant,value:a,formatted:o&&"rgba(".concat(o.r||0,",").concat(o.g||0,",").concat(o.b||0,",").concat(o.opacity,")")||"rgba(0,0,0,0)"}}function rl(t,e){if(t.type===Pc.Constant&&e.type===Pc.Constant)return[t.value,e.value,function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(_t(255*e[n],0,255));return e[3]=_t(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function il(t,e,n){var r=wh.get(ca)(n.nodeName);if(r){var i=n.geometry;i.contentBounds||(i.contentBounds=new Do),i.renderBounds||(i.renderBounds=new Do);var o=r.update(n.parsedStyle,n),s=o.width,u=o.height,c=o.depth,l=void 0===c?0:c,h=o.x,f=void 0===h?0:h,p=o.y,d=void 0===p?0:p,y=o.z,v=void 0===y?0:y,g=o.offsetX,m=void 0===g?0:g,b=o.offsetY,E=void 0===b?0:b,T=o.offsetZ,O=void 0===T?0:T;n.nodeName===na.LINE||n.nodeName===na.POLYLINE||n.nodeName===na.POLYGON||n.nodeName===na.PATH?(n.parsedStyle.offsetX=f-(n.parsedStyle.defX||0),n.parsedStyle.offsetY=d-(n.parsedStyle.defY||0),n.parsedStyle.defX=f,n.parsedStyle.defY=d,n.translateLocal(n.parsedStyle.offsetX,n.parsedStyle.offsetY),n.parsedStyle.x=n.style.x,n.parsedStyle.y=n.style.y,n.parsedStyle.z=v):(n.parsedStyle.x=f,n.parsedStyle.y=d,n.parsedStyle.z=v);var M=a.fromValues(s/2,u/2,l/2),w=n.parsedStyle,_=w.lineWidth,P=w.anchor,A=void 0===P?[0,0]:P,x=w.shadowColor,N=w.filter,S=void 0===N?[]:N;n.nodeName===na.TEXT&&delete n.parsedStyle.anchor;var C=a.fromValues((1-2*A[0])*M[0]+m,(1-2*A[1])*M[1]+E,(1-2*(A[2]||0))*M[2]+O);if(i.contentBounds.update(C,M),_&&a.add(M,M,a.fromValues(_.value/2,_.value/2,0)),i.renderBounds.update(C,M),x&&x.type===Pc.Constant){var I=i.renderBounds,j=I.min,R=I.max,D=n.parsedStyle,k=D.shadowBlur,L=void 0===k?0:k,B=D.shadowOffsetX,F=void 0===B?0:B,G=D.shadowOffsetY,V=void 0===G?0:G,U=j[0]-L+F,q=R[0]+L+F,W=j[1]-L+V,z=R[1]+L+V;j[0]=Math.min(j[0],U),R[0]=Math.max(R[0],q),j[1]=Math.min(j[1],W),R[1]=Math.max(R[1],z),i.renderBounds.setMinMax(j,R)}S.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var r=n[0].value;i.renderBounds.update(i.renderBounds.center,a.add(i.renderBounds.halfExtents,i.renderBounds.halfExtents,a.fromValues(r,r,0)))}else if("drop-shadow"===e){var o=n[0].value,s=n[1].value,u=n[2].value,c=i.renderBounds,l=c.min,h=c.max,f=l[0]-u+o,p=h[0]+u+o,d=l[1]-u+s,y=h[1]+u+s;l[0]=Math.min(l[0],f),h[0]=Math.max(h[0],p),l[1]=Math.min(l[1],d),h[1]=Math.max(h[1],y),i.renderBounds.setMinMax(l,h)}})),ea(n)}}function ol(t,e,n){var r=n.parsedStyle,i=r.x,o=void 0===i?0:i,a=r.y,s=void 0===a?0:a,u=r.z,c=void 0===u?0:u;n.setLocalPosition(o,s,c)}function al(t){return t.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function sl(t){return"number"==typeof t?t:/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Number(t):0}function ul(t,e){return[t,e,al]}function cl(t,e){return function(n,r){return[n,r,function(n){return al(_t(n,t,e))}]}}function ll(t,e){if(t.length==e.length)return[t,e,function(t){return t}]}function hl(t,e,n){if(t&&t!==e&&t.style.offsetPathTargets){var r=t.style.offsetPathTargets.indexOf(n);t.style.offsetPathTargets.splice(r,1)}e&&(e.style.offsetPathTargets||(e.style.offsetPathTargets=[]),e.style.offsetPathTargets.push(n))}function fl(t,e,n){if(n.attributes.offsetPath){var r=n.attributes.offsetPath.nodeName;if(r===na.LINE||r===na.PATH||r===na.POLYLINE){var i=n.attributes.offsetPath.getPoint(e);i&&n.setLocalPosition(i.x,i.y)}}}function pl(t,e,n){if(t&&t!==e&&t.style.clipPathTargets){var r=t.style.clipPathTargets.indexOf(n);t.style.clipPathTargets.splice(r,1)}e&&(e.style.clipPathTargets||(e.style.clipPathTargets=[]),e.style.clipPathTargets.push(n)),ea(n)}function dl(t,e,n){if(n.parentNode){var r=n.parentNode,i=r.renderable,o=r.sortable;i&&(i.dirty=!0),o&&(o.dirty=!0)}}function yl(t,e,n,r,i){n.children.forEach((function(t){if("inherit"===t.getAttribute(i)){t.parsedStyle[i]=e;var n=t.parsedStyle[i];t.updateStyleProperty(i,n,e)}}))}function vl(t,e){for(var n=t.parentElement;n;){if("inherit"!==n.getAttribute(e)&&n.parsedStyle.hasOwnProperty(e))return n.parsedStyle[e];n=n.parentElement}return null}function gl(t){return"px"===t||"%"===t||"em"===t}function ml(t){return"deg"===t||"rad"===t||"turn"===t}function bl(t,e,n,r){if("inherit"===(e="".concat(e).trim().toLowerCase())){var i=vl(n,r);if(!yt(i))return i}if("0"===e){if("px".search(t)>=0)return{unit:"px",value:0};if("%".search(t)>=0)return{unit:"%",value:0}}else if("auto"===e||"inherit"===e)return{unit:"",value:0};if(o=Number(e),Pt(o)&&isFinite(o))return"px".search(t)>=0?{unit:"px",value:Number(e)}:{unit:"",value:Number(e)};var o;if(e.endsWith("em")){var a=0;if(n.parentElement){var s=n.parentElement.parsedStyle.fontSize;s&&s.value&&(a=s.value*Number(e.replace("em","")))}return{unit:"px",value:a}}var u=[];e=e.replace(t,(function(t){return u.push(t),"U"+t}));var c="U("+t.source+")";return u.map((function(t){return{unit:t,value:Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(c,"g"),"*0"))}}))[0]}function El(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=0);var o=t.unit,a=t.value||0,s=e.value||0;return(gl(t.unit)||gl(e.unit))&&(a=_l(t,i,r),s=_l(e,i,r),o="px"),(ml(t.unit)||ml(e.unit))&&(a=Pl(t),s=Pl(e),o="deg"),[a,s,function(t){return n&&(t=Math.max(t,0)),al(t)+o}]}var Tl=bl.bind(null,new RegExp("px","g")),Ol=bl.bind(null,new RegExp("px|%|em","g")),Ml=bl.bind(null,/deg|rad|grad|turn/g);function wl(t){return t.map(Ol)}function _l(t,e,n){if("px"===t.unit)return Number(t.value);if("%"===t.unit&&n){var r=n.getBounds(),i=0;return Do.isEmpty(r)||(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function Pl(t){var e=0;return"deg"===t.unit?e=Number(t.value):"rad"===t.unit?e=Ja(Number(t.value)):"turn"===t.unit&&(e=360*Number(t.value)),e}function Al(t,e,n){n.setOrigin(e[0],e[1],e[2])}function xl(t,e,n){var r,i,o=e.split(" ");if(1===o.length&&("top"===o[0]||"bottom"===o[0]?(o[1]=o[0],o[0]="center"):o[1]="center"),2===o.length){var a=Ol(Nl(o[0])),s=Ol(Nl(o[1]));a&&(r=_l(a,0,n)),s&&(i=_l(s,1,n))}yt(r)||yt(i)||n.setOrigin([r,i])}function Nl(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Sl=null,Cl={unit:"px",value:0},Il={unit:"deg",value:0};function jl(t){return function(e){var n=0;return t.map((function(t){return t===Sl?e[n++]:t}))}}function Rl(t){return t}var Dl={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",jl([Sl,Sl,1]),Rl],scalex:["N",jl([Sl,1,1]),jl([Sl,1])],scaley:["N",jl([1,Sl,1]),jl([1,Sl])],scalez:["N",jl([1,1,Sl])],scale3d:["NNN",Rl],translate:["Tt",jl([Sl,Sl,Cl]),Rl],translatex:["T",jl([Sl,Cl,Cl]),jl([Sl,Cl])],translatey:["T",jl([Cl,Sl,Cl]),jl([Cl,Sl])],translatez:["L",jl([Cl,Cl,Sl])],translate3d:["TTL",Rl]};function kl(t){if("none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=Dl[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(u.length<s.length)return[];for(var c=[],l=0;l<u.length;l++){var h=s[l],f=u[l],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?Il:Ml(t)},N:sl,T:Ol,L:Tl}[f.toUpperCase()](h):{a:Il,n:c[0],t:Cl}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Ll(t){return t.replace(/[xy]/,"")}function Bl(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Fl(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substr(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?a:{unit:t.unit,value:a}}))})},o=0;o<t.length;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length);else for(o=0;o<t.length;o++){var h=t[o].t,f=e[o].t,p=t[o].d,d=e[o].d,y=Dl[h],v=Dl[f],g=void 0;if(s=f,("perspective"!==(a=h)||"perspective"!==s)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){if(h===f)g=h;else if(y[2]&&v[2]&&Ll(h)===Ll(f))g=Ll(h),p=y[2](p),d=v[2](d);else{if(!y[1]||!v[1]||Bl(h)!==Bl(f))break;g=Bl(h),p=y[1](p),d=v[1](d)}for(var m=[],b=[],E=[],T=0;T<p.length;T++){var O=("number"==typeof p[T]?ul:El)(p[T],d[T],!1,n,T);m[T]=O[0],b[T]=O[1],E.push(O[2])}u.push(m),c.push(b),l.push([g,E])}}if(r){var M=u;u=c,c=M}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),l[e][0]+"("+n+")"})).join(" ")}]}function Gl(t,e,n){wt(Object(ct.i)(Object(ct.i)([],Object(ct.g)((t||[]).map((function(t){return t.t}))),!1),Object(ct.g)((e||[]).map((function(t){return t.t}))),!1)).forEach((function(r){var i=(e||[]).find((function(t){return t.t===r})),o=(t||[]).find((function(t){return t.t===r}));if("scale"===r){var a=i&&i.d||[1,1],s=o&&o.d||[1,1];n.scaleLocal(a[0]/s[0],a[1]/s[1],1)}else if("scalex"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(a[0]/s[0],1,1)}else if("scaley"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(1,a[0]/s[0],1)}else if("scalez"===r){a=i&&i.d||[1],s=o&&o.d||[1];n.scaleLocal(1,1,a[0]/s[0])}else if("scale3d"===r){a=i&&i.d||[1,1,1],s=o&&o.d||[1,1,1];n.scaleLocal(a[0]/s[0],a[1]/s[1],a[2]/s[2])}else if("translate"===r){var u=i&&i.d||[Cl,Cl],c=o&&o.d||[Cl,Cl];n.translateLocal(u[0].value-c[0].value,u[1].value-c[1].value,0)}else if("translatex"===r){u=i&&i.d||[Cl],c=o&&o.d||[Cl];n.translateLocal(u[0].value-c[0].value,0,0)}else if("translatey"===r){u=i&&i.d||[Cl],c=o&&o.d||[Cl];n.translateLocal(0,u[0].value-c[0].value,0)}else if("translatez"===r){u=i&&i.d||[Cl],c=o&&o.d||[Cl];n.translateLocal(0,0,u[0].value-c[0].value)}else if("translate3d"===r){u=i&&i.d||[Cl,Cl,Cl],c=o&&o.d||[Cl,Cl,Cl];n.translateLocal(u[0].value-c[0].value,u[1].value-c[1].value,u[2].value-c[2].value)}else if("rotate"===r){var l=i&&i.d||[Il],h=o&&o.d||[Il];n.rotateLocal(0,0,l[0].value-h[0].value)}else if("rotatex"===r){l=i&&i.d||[Il],h=o&&o.d||[Il];n.rotateLocal(l[0].value-h[0].value,0,0)}else if("rotatey"===r){l=i&&i.d||[Il],h=o&&o.d||[Il];n.rotateLocal(0,l[0].value-h[0].value,0)}else if("rotatez"===r){l=i&&i.d||[Il],h=o&&o.d||[Il];n.rotateLocal(0,0,l[0].value-h[0].value)}}))}var Vl=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,Ul=/[^\s\,]+/gi;var ql=function(t){var e=t||[];return vt(e)?e:Mt(e)?(e=e.match(Vl),mt(e,(function(t,n){if((t=t.match(Ul))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}mt(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};var Wl="\t\n\v\f\r   ᠎              \u2028\u2029",zl=new RegExp("([a-z])["+Wl+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Wl+"]*,?["+Wl+"]*)+)","ig"),Hl=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Wl+"]*,?["+Wl+"]*","ig");var Yl=/[a-z]/;function $l(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Xl(t){var e=function(t){if(!t)return null;if(vt(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(zl,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Hl,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(Yl.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,u=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(u=a=+h[1],c=s=+h[2],l++,o[0]=["M",a,s]);r=l;for(var f=e.length;r<f;r++){var p=e[r],d=o[r-1],y=[],v=(i=p[0]).toUpperCase();if(i!==v)switch(y[0]=v,v){case"A":y[1]=p[1],y[2]=p[2],y[3]=p[3],y[4]=p[4],y[5]=p[5],y[6]=+p[6]+a,y[7]=+p[7]+s;break;case"V":y[1]=+p[1]+s;break;case"H":y[1]=+p[1]+a;break;case"M":u=+p[1]+a,c=+p[2]+s,y[1]=u,y[2]=c;break;default:for(var g=1,m=p.length;g<m;g++)y[g]=+p[g]+(g%2?a:s)}else y=e[r];switch(v){case"Z":a=+u,s=+c;break;case"H":y=["L",a=y[1],s];break;case"V":y=["L",a,s=y[1]];break;case"T":a=y[1],s=y[2];var b=$l([d[1],d[2]],[d[3],d[4]]);y=["Q",b[0],b[1],a,s];break;case"S":a=y[y.length-2],s=y[y.length-1];var E=d.length,T=$l([d[E-4],d[E-3]],[d[E-2],d[E-1]]);y=["C",T[0],T[1],y[1],y[2],a,s];break;case"M":u=y[y.length-2],c=y[y.length-1];break;default:a=y[y.length-2],s=y[y.length-1]}o.push(y)}return o}var Kl=2*Math.PI,Jl=function(t,e,n,r,i,o,a){var s=t.x,u=t.y;return{x:r*(s*=e)-i*(u*=n)+o,y:i*s+r*u+a}},Zl=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=Math.cos(t),i=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},Ql=function(t,e,n,r){var i=t*n+e*r;return i>1&&(i=1),i<-1&&(i=-1),(t*r-e*n<0?-1:1)*Math.acos(i)},th=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,u=void 0===s?0:s,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(u*Kl/360),y=Math.cos(u*Kl/360),v=y*(e-r)/2+d*(n-i)/2,g=-d*(e-r)/2+y*(n-i)/2;if(0===v&&0===g)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(v,2)/Math.pow(o,2)+Math.pow(g,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var b=function(t,e,n,r,i,o,a,s,u,c,l,h){var f=Math.pow(i,2),p=Math.pow(o,2),d=Math.pow(l,2),y=Math.pow(h,2),v=f*p-f*y-p*d;v<0&&(v=0),v/=f*y+p*d;var g=(v=Math.sqrt(v)*(a===s?-1:1))*i/o*h,m=v*-o/i*l,b=c*g-u*m+(t+n)/2,E=u*g+c*m+(e+r)/2,T=(l-g)/i,O=(h-m)/o,M=(-l-g)/i,w=(-h-m)/o,_=Ql(1,0,T,O),P=Ql(T,O,M,w);return 0===s&&P>0&&(P-=Kl),1===s&&P<0&&(P+=Kl),[b,E,_,P]}(e,n,r,i,o,a,l,f,d,y,v,g),E=b[0],T=b[1],O=b[2],M=b[3],w=Math.abs(M)/(Kl/4);Math.abs(1-w)<1e-7&&(w=1);var _=Math.max(Math.ceil(w),1);M/=_;for(var P=0;P<_;P++)p.push(Zl(O,M)),O+=M;return p.map((function(t){var e=Jl(t[0],o,a,y,d,E,T),n=e.x,r=e.y,i=Jl(t[1],o,a,y,d,E,T),s=i.x,u=i.y,c=Jl(t[2],o,a,y,d,E,T);return{x1:n,y1:r,x2:s,y2:u,x:c.x,y:c.y}}))};function eh(t,e,n,r,i,o,a,s,u){return th({px:t,py:e,cx:s,cy:u,rx:n,ry:r,xAxisRotation:i,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.x,s=e.y;return t.push(n,r,i,o,a,s),t}),[])}function nh(t,e,n,r,i,o){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*o+2/3*r,i,o]}function rh(t,e,n,r){return[t,e,n,r,n,r]}function ih(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],i=n[1];switch(t[0]){case"M":return e.x=r,e.y=i,t;case"A":return["C"].concat(eh.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(nh.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(rh(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(rh(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(rh(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(rh(e.x1,e.y1,e.x,e.y))}return t}function oh(t,e){void 0===e&&(e=!1);for(var n,r,i=Xl(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],s="",u=i.length,c=[],l=0;l<u;l+=1)i[l]&&(s=i[l][0]),a[l]=s,i[l]=ih(i[l],o),ah(i,a,l),u=i.length,"Z"===s&&c.push(l),r=(n=i[l]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1;return e?[i,c]:i}function ah(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function sh(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function uh(t,e){return sh(t)*sh(e)?(t[0]*e[0]+t[1]*e[1])/(sh(t)*sh(e)):1}function ch(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(uh(t,e))}function lh(t,e){return t[0]===e[0]&&t[1]===e[1]}function hh(t,e){var n=e[1],r=e[2],i=At(Nt(e[3]),2*Math.PI),o=e[4],a=e[5],s=t[0],u=t[1],c=e[6],l=e[7],h=Math.cos(i)*(s-c)/2+Math.sin(i)*(u-l)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(u-l)/2,p=h*h/(n*n)+f*f/(r*r);p>1&&(n*=Math.sqrt(p),r*=Math.sqrt(p));var d=n*n*(f*f)+r*r*(h*h),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var v=r?y*n*f/r:0,g=n?y*-r*h/n:0,m=(s+c)/2+Math.cos(i)*v-Math.sin(i)*g,b=(u+l)/2+Math.sin(i)*v+Math.cos(i)*g,E=[(h-v)/n,(f-g)/r],T=[(-1*h-v)/n,(-1*f-g)/r],O=ch([1,0],E),M=ch(E,T);return uh(E,T)<=-1&&(M=Math.PI),uh(E,T)>=1&&(M=0),0===a&&M>0&&(M-=2*Math.PI),1===a&&M<0&&(M+=2*Math.PI),{cx:m,cy:b,rx:lh(t,[c,l])?0:n,ry:lh(t,[c,l])?0:r,startAngle:O,endAngle:O+M,xRotation:i,arcFlag:o,sweepFlag:a}}function fh(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var ph=function(){function t(t,e,n,r){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,this.width=n,this.height=r,this.x=t,this.y=e}return t.prototype.toJSON=function(){},t}();function dh(t){var e=Xl(t),n=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}(e),r=e.slice(),i=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}r.length>0&&n.push(r);return{polygons:e,polylines:n}}(r),o=i.polygons,a=i.polylines,s=Object(ct.g)(oh(r,!0),2),u=s[0],c=s[1],l=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=ql(t)).length,s=0;s<a;s++){var u=t[s];r=t[s+1];var c=u[0],l={command:c,prePoint:n,params:u,startTangent:null,endTangent:null};switch(c){case"M":i=[u[1],u[2]],o=s;break;case"A":var h=hh(n,u);l.arcParams=h}if("Z"===c)n=i,r=t[o+1];else{var f=u.length;n=[u[f-2],u[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&lh(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint);var p=r?[r[r.length-2],r[r.length-1]]:null;l.nextPoint=p;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){var y=[u[1],u[2]];l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===c){y=fh((m=e[s-1]).currentPoint,d);"Q"===m.command?(l.command="Q",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var v=[u[1],u[2]],g=[u[3],u[4]];l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[v[0]-g[0],v[1]-g[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[g[0]-v[0],g[1]-v[1]])}else if("S"===c){var m;v=fh((m=e[s-1]).currentPoint,d),g=[u[1],u[2]];"C"===m.command?(l.command="C",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]]):(l.command="SQ",l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]])}else if("A"===c){var b=.001,E=l.arcParams||{},T=E.cx,O=void 0===T?0:T,M=E.cy,w=void 0===M?0:M,_=E.rx,P=void 0===_?0:_,A=E.ry,x=void 0===A?0:A,N=E.sweepFlag,S=void 0===N?0:N,C=E.startAngle,I=void 0===C?0:C,j=E.endAngle,R=void 0===j?0:j;0===S&&(b*=-1);var D=P*Math.cos(I-b)+O,k=x*Math.sin(I-b)+w;l.startTangent=[D-i[0],k-i[1]];var L=P*Math.cos(I+R+b)+O,B=x*Math.sin(I+R-b)+w;l.endTangent=[d[0]-L,d[1]-B]}e.push(l)}return e}(r),h=function(t){var e,n,r,i,o=0,a=0,s=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=t[n+1],i=e.length,r&&(o+=au.length(e[i-2],e[i-1],r[1],r[2],r[3],r[4],r[5],r[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(u,c){r=t[c+1],i=u.length,r&&((e=[])[0]=a/o,n=au.length(u[i-2],u[i-1],r[1],r[2],r[3],r[4],r[5],r[6]),a+=n||0,e[1]=a/o,s.push(e))})),{curveSegments:s,totalLength:o}}(u);return{absolutePath:e,hasArc:n,segments:l,polygons:o,polylines:a,curve:u,totalLength:h.totalLength,curveSegments:h.curveSegments,zCommandIndexes:c,rect:yh(u)}}function yh(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=Object(ct.g)(t.slice(-2),2),a=o[0],s=o[1];if("M"===t[0])e=a,n=s,r.push(a),i.push(s);else if("C"===t[0]){var u=au.box.apply(au,Object(ct.i)([],Object(ct.g)([e,n].concat(t.slice(1))),!1));r=r.concat(u.x,u.x+u.width),i=i.concat(u.y,u.y+u.height),e=a,n=s}}));var o=Math.min.apply(0,r),a=Math.min.apply(0,i),s=Math.max.apply(0,r),u=Math.max.apply(0,i);return new ph(o,a,s-o,u-a)}function vh(t,e){var n=t.curve,r=e.curve,i=[n,r];n.length!==r.length&&(i=hu(n,r));var o=fu(i[0])!==fu(i[1])?yu(i[0]):vu(i[0]);return[o,gu(i[1],o),function(t){return t}]}function gh(t){var e,n,r=[],i=0,o=uu(t);return t.forEach((function(a,s){t[s+1]&&((e=[0,0])[0]=i/o,n=Qs.length(a[0],a[1],t[s+1][0],t[s+1][1]),i+=n,e[1]=i/o,r.push(e))})),{points:t,totalLength:o,segments:r}}var mh=bl.bind(null,/deg|rad|grad|turn|px|%/g),bh=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Eh(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];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,bh.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return mh(t)||nl(t)}))}),n.lastIndex===t.length)return r}return[]}function Th(t){var e=[];return Mt(t)?t.split(" ").forEach((function(t){var n=Tl(t);e.push(n.value)})):e.push.apply(e,Object(ct.i)([],Object(ct.g)(t),!1)),e&&1===e.length?[e[0],e[0]]:[e[0],e[1]]}function Oh(t,e,n){n.nodeValue="".concat(e)||""}function Mh(t,e,n){if(n.nodeName===na.TEXT){var r=n;e===oa.CAPITALIZE?r.style.text=r.style.text.charAt(0).toUpperCase()+r.style.text.slice(1):e===oa.LOWERCASE?r.style.text=r.style.text.toLowerCase():e===oa.UPPERCASE&&(r.style.text=r.style.text.toUpperCase())}}var wh=ot,_h=["textAlign","fontSize","fontFamily","fontWeight","fontStyle"],Ph={},Ah={},xh={};function Nh(t,e,n,r){e&&(Ph[t]=e),n&&(xh[t]=n),r&&(Ah[t]||(Ah[t]=[]),Ah[t].push(r))}function Sh(t,e,n,r){for(var i=0;i<t.length;i++)Nh(t[i],e,n,r)}var Ch,Ih,jh,Rh=Q((function(t){Object(f.decorate)(x(),ut.EventEmitter),t(lt),t(Zo),t({token:Ko,useFactory:function(t){return function(){return t.container.get(Jo)}}}),t({token:sa,useClass:ua}),t(ma),t(Ma),t(fa),t(pa),t(da),t(wa),t(_a),t(Pa),t(Aa),t({token:ca,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(la,n)&&(e[n]=t.container.getNamed(la,n)),e[n]}}}),Sh(["opacity","fillOpacity","strokeOpacity","offsetDistance"],sl,cl(0,1),void 0),Sh(["shadowBlur"],sl,cl(0,1/0),void 0),Sh(["r","rx","ry","width","height","fontSize","lineWidth","dx","dy"],Ol,El,void 0),Sh(["lineDash"],Th,ll,void 0),Sh(["x1","x2","y1","y2","lineDashOffset","shadowOffsetX","shadowOffsetY"],sl,ul,void 0),Sh(_h,void 0,void 0,yl),Sh(["x1","x2","y1","y2","r","rx","ry","width","height","path","points","text","shadowBlur","shadowOffsetX","shadowOffsetY","lineWidth","filter","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","whiteSpace"],void 0,void 0,il),Sh(["fill","stroke","shadowColor"],nl,rl,void 0),Nh("clipPath",void 0,void 0,pl),Nh("zIndex",void 0,void 0,dl),Nh("offsetPath",void 0,void 0,hl),Nh("offsetDistance",void 0,void 0,fl),Nh("origin",void 0,void 0,Al),Nh("transformOrigin",void 0,void 0,xl),Nh("transform",kl,Fl,Gl),Nh("text",void 0,void 0,Oh),Nh("textTransform",void 0,void 0,Mh),Nh("path",dh,vh,void 0),Nh("points",gh,void 0,void 0),Sh(["x","y","z","points","path","x1","x2","y1","y2","z1","z2"],void 0,void 0,ol),Nh("filter",Eh,void 0,void 0),Nh("anchor",void 0,void 0,Oc)})),Dh=function(){function t(t){this.plugins=[],this.config=Object(ct.a)({enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableTAA:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),kh=function(){function t(t,e){this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.name=t,this.matrix=o.clone(e.matrix),this.right=a.clone(e.right),this.up=a.clone(e.up),this.forward=a.clone(e.forward),this.position=a.clone(e.position),this.focalPoint=a.clone(e.focalPoint),this.distanceVector=a.clone(e.distanceVector),this.azimuth=e.azimuth,this.elevation=e.elevation,this.roll=e.roll,this.relAzimuth=e.relAzimuth,this.relElevation=e.relElevation,this.relRoll=e.relRoll,this.dollyingStep=e.dollyingStep,this.distance=e.distance}return t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getRoll=function(){return this.roll},t.prototype.retrieve=function(t){t.matrix=o.copy(t.matrix,this.matrix),t.right=a.copy(t.right,this.right),t.up=a.copy(t.up,this.up),t.forward=a.copy(t.forward,this.forward),t.position=a.copy(t.position,this.position),t.focalPoint=a.copy(t.focalPoint,this.focalPoint),t.distanceVector=a.copy(t.distanceVector,this.distanceVector),t.azimuth=this.azimuth,t.elevation=this.elevation,t.roll=this.roll,t.relAzimuth=this.relAzimuth,t.relElevation=this.relElevation,t.relRoll=this.relRoll,t.dollyingStep=this.dollyingStep,t.distance=this.distance},t}(),Lh="DefaultCamera";!function(t){t.ORBITING="ORBITING",t.EXPLORING="EXPLORING",t.TRACKING="TRACKING"}(Ch||(Ch={})),function(t){t.DEFAULT="DEFAULT",t.ROTATIONAL="ROTATIONAL",t.TRANSLATIONAL="TRANSLATIONAL",t.CINEMATIC="CINEMATIC"}(Ih||(Ih={})),function(t){t.ORTHOGRAPHIC="ORTHOGRAPHIC",t.PERSPECTIVE="PERSPECTIVE"}(jh||(jh={}));var Bh,Fh={UPDATED:"updated"},Gh=Math.PI/180,Vh=180/Math.PI,Uh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.matrix=o.create(),e.right=a.fromValues(1,0,0),e.up=a.fromValues(0,1,0),e.forward=a.fromValues(0,0,1),e.position=a.fromValues(0,0,1),e.focalPoint=a.fromValues(0,0,0),e.distanceVector=a.fromValues(0,0,0),e.distance=1,e.azimuth=0,e.elevation=0,e.roll=0,e.relAzimuth=0,e.relElevation=0,e.relRoll=0,e.dollyingStep=0,e.maxDistance=1/0,e.minDistance=-1/0,e.zoom=1,e.rotateWorld=!1,e.fov=30,e.near=.1,e.far=1e3,e.aspect=1,e.projectionMatrix=o.create(),e.projectionMatrixInverse=o.create(),e.jitteredProjectionMatrix=void 0,e.following=void 0,e.type=Ch.EXPLORING,e.trackingMode=Ih.DEFAULT,e.projectionMode=jh.PERSPECTIVE,e.frustum=new Go,e.landmarks=[],e.orthoMatrix=o.create(),e}return Object(ct.d)(e,t),e.prototype.isOrtho=function(){return this.projectionMode===jh.ORTHOGRAPHIC},e.prototype.clone=function(){var t=new e;return t.setType(this.type,void 0),t},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.setType=function(t,e){return this.type=t,this.type===Ch.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Ch.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==Ch.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){this.rotateWorld=t,this._getAngles()},e.prototype.getViewTransform=function(){return o.invert(o.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=o.fromTranslation(o.create(),[t,e,0]);this.jitteredProjectionMatrix=o.multiply(o.create(),n,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===jh.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.prototype.setFar=function(t){return this.projectionMode===jh.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.prototype.setViewOffset=function(t,e,n,r,i,o){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=o,this.projectionMode===jh.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.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===jh.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.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===jh.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===jh.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){this.projectionMode=jh.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i=this.near*Math.tan(.5*Gh*this.fov)/this.zoom,s=2*i,u=this.aspect*s,c=-.5*u;if(void 0!==this.view&&this.view.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,i-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return rs(this.projectionMatrix,c,c+u,i,i-s,t,this.far),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,e,n,r,i,s){this.projectionMode=jh.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=s;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,p=l+u,d=h+c,y=h-c;if(void 0!==this.view&&this.view.enabled){var v=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;p=(f+=v*this.view.offsetX)+v*this.view.width,y=(d-=g*this.view.offsetY)-g*this.view.height}return o.ortho(this.projectionMatrix,f,p,y,d,i,s),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this._setPosition(t,e,n),this.setFocalPoint(this.focalPoint),this},e.prototype.setFocalPoint=function(t,e,n){var r=a.fromValues(0,1,0);if(this.focalPoint=Xa(t,e,n),this.trackingMode===Ih.CINEMATIC){var i=a.subtract(a.create(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var s=a.length(i),u=Math.asin(e/s)*Vh,c=90+Math.atan2(n,t)*Vh,l=o.create();o.rotateY(l,l,c*Gh),o.rotateX(l,l,u*Gh),r=a.transformMat4(a.create(),[0,1,0],l)}return o.invert(this.matrix,o.lookAt(o.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this},e.prototype.setDistance=function(t){if(!(this.distance===t||t<0)){this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=a.create();t=this.distance;var n=this.forward,r=this.focalPoint;return 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}},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.changeAzimuth=function(t){return this.setAzimuth(this.azimuth+t),this},e.prototype.changeElevation=function(t){return this.setElevation(this.elevation+t),this},e.prototype.changeRoll=function(t){return this.setRoll(this.roll+t),this},e.prototype.setAzimuth=function(t){return this.azimuth=$a(t),this.computeMatrix(),this._getAxes(),this.type===Ch.ORBITING||this.type===Ch.EXPLORING?this._getPosition():this.type===Ch.TRACKING&&this._getFocalPoint(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=$a(t),this.computeMatrix(),this._getAxes(),this.type===Ch.ORBITING||this.type===Ch.EXPLORING?this._getPosition():this.type===Ch.TRACKING&&this._getFocalPoint(),this},e.prototype.setRoll=function(t){return this.roll=$a(t),this.computeMatrix(),this._getAxes(),this.type===Ch.ORBITING||this.type===Ch.EXPLORING?this._getPosition():this.type===Ch.TRACKING&&this._getFocalPoint(),this},e.prototype.rotate=function(t,e,n){if(this.relElevation=$a(e),this.relAzimuth=$a(t),this.relRoll=$a(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Ch.EXPLORING){var r=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Gh),i=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Gh),a=u.setAxisAngle(u.create(),[0,0,1],this.relRoll*Gh),s=u.multiply(u.create(),i,r);s=u.multiply(u.create(),s,a);var c=o.fromQuat(o.create(),s);o.translate(this.matrix,this.matrix,[0,0,-this.distance]),o.multiply(this.matrix,this.matrix,c),o.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return;this.computeMatrix()}return this._getAxes(),this.type===Ch.ORBITING||this.type===Ch.EXPLORING?this._getPosition():this.type===Ch.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=Xa(t,e,0),r=a.clone(this.position);return a.add(r,r,a.scale(a.create(),this.right,n[0])),a.add(r,r,a.scale(a.create(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=a.clone(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===Ch.ORBITING||this.type===Ch.EXPLORING?this._getDistance():this.type===Ch.TRACKING&&a.add(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.createLandmark=function(t,e){var n=this.clone();n.setPosition(e.position),n.setFocalPoint(e.focalPoint),void 0!==e.roll&&n.setRoll(e.roll);var r=new kh(t,n);return this.landmarks.push(r),r},e.prototype.setLandmark=function(t){var e=new kh(t,this);return this.landmarks.push(e),this},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e=1e3);var r=this.landmarks.find((function(e){return e.name===t}));if(r){if(0===e)return void r.retrieve(this);void 0!==this.landmarkAnimationID&&_u(this.landmarkAnimationID);var i,o=r.getPosition(),s=r.getFocalPoint(),u=r.getRoll();wu((function t(r){void 0===i&&(i=r);var c,l=r-i,h=(1-Math.cos(l/e*Math.PI))/2,f=a.create(),p=a.create();if(a.lerp(f,n.focalPoint,s,h),a.lerp(p,n.position,o,h),c=n.roll*(1-h)+u*h,n.setFocalPoint(f),n.setPosition(p),n.setRoll(c),n.computeMatrix(),n.triggerUpdate(),!(a.dist(f,s)+a.dist(p,o)>.01))return n.setFocalPoint(f),n.setPosition(p),n.setRoll(c),void n.computeMatrix();l<e&&(n.landmarkAnimationID=wu(t))}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=u.setAxisAngle(u.create(),[0,0,1],this.roll*Gh);o.identity(this.matrix);var e=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld&&this.type!==Ch.TRACKING||this.type===Ch.TRACKING?1:-1)*this.elevation*Gh),n=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld&&this.type!==Ch.TRACKING||this.type===Ch.TRACKING?1:-1)*this.azimuth*Gh),r=u.multiply(u.create(),n,e);r=u.multiply(u.create(),r,t);var i=o.fromQuat(o.create(),r);this.type===Ch.ORBITING||this.type===Ch.EXPLORING?(o.translate(this.matrix,this.matrix,this.focalPoint),o.multiply(this.matrix,this.matrix,i),o.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Ch.TRACKING&&(o.translate(this.matrix,this.matrix,this.position),o.multiply(this.matrix,this.matrix,i))},e.prototype._setPosition=function(t,e,n){this.position=Xa(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){a.copy(this.right,Xa(s.transformMat4(s.create(),[1,0,0,0],this.matrix))),a.copy(this.up,Xa(s.transformMat4(s.create(),[0,1,0,0],this.matrix))),a.copy(this.forward,Xa(s.transformMat4(s.create(),[0,0,1,0],this.matrix))),a.normalize(this.right,this.right),a.normalize(this.up,this.up),a.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=a.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===Ch.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*Vh,this.azimuth=Math.atan2(-t,-n)*Vh):(this.elevation=-Math.asin(e/r)*Vh,this.azimuth=-Math.atan2(-t,-n)*Vh)},e.prototype._getPosition=function(){a.copy(this.position,Xa(s.transformMat4(s.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){a.transformMat3(this.distanceVector,[0,0,-this.distance],i.fromMat4(i.create(),this.matrix)),a.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=a.subtract(a.create(),this.focalPoint,this.position),this.distance=a.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===jh.ORTHOGRAPHIC){var t=this.position,e=u.setAxisAngle(u.create(),[0,0,1],-this.roll*Math.PI/180);o.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,a.fromValues((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),a.fromValues(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){var t=this.getViewTransform(),e=o.multiply(o.create(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(Fh.UPDATED)},e.ProjectionMode={ORTHOGRAPHIC:"ORTHOGRAPHIC",PERSPECTIVE:"PERSPECTIVE"},e}(ut.EventEmitter),qh=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.prepare.tap(e.tag,(function(t){if(t){var e=n.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;return t.renderable.dirty||n.renderingContext.renderReasons.has(ga.CAMERA_CHANGED)||!e?t:null}return t}))},t.tag="DirtyCheckPlugin",Object(ct.c)([C(ha),Object(ct.f)("design:type",Object)],t.prototype,"canvasConfig",void 0),Object(ct.c)([C(ka),Object(ct.f)("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=Object(ct.c)([N({contrib:bc})],t)}(),Wh=l.defineToken("CullingStrategyContribution"),zh=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this.strategyProvider.getContributions();t.hooks.prepare.tap(e.tag,(function(t){if(t){var e=t.cullable;return 0===n.length?e.visible=!0:e.visible=n.every((function(e){return e.isVisible(t)})),t.isVisible()?t:null}return t})),t.hooks.afterRender.tap(e.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},t.tag="CullingPlugin",Object(ct.c)([st(Wh),Object(ct.f)("design:type",Object)],t.prototype,"strategyProvider",void 0),t=e=Object(ct.c)([N({contrib:bc})],t)}(),Hh=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(){n.renderingContext.renderReasons.add(ga.DISPLAY_OBJECT_CHANGED)},i=function(){t.dirtify()},o=function(e){var n=e.target;_h.forEach((function(t){if("inherit"===n.getAttribute(t)){var e=vl(n,t);if(!yt(e)){var r=n.parsedStyle[t];n.parsedStyle[t]=e,n.updateStyleProperty(t,r,e)}}})),ea(n),t.dirtify()},a=function(e){ea(e.target),t.dirtify()};t.hooks.init.tap(e.tag,(function(){n.renderingContext.root.addEventListener(Fo.MOUNTED,o),n.renderingContext.root.addEventListener(Fo.UNMOUNTED,a),n.renderingContext.root.addEventListener(Fo.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(Fo.BOUNDS_CHANGED,i)})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(Fo.MOUNTED,o),n.renderingContext.root.removeEventListener(Fo.UNMOUNTED,a),n.renderingContext.root.removeEventListener(Fo.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(Fo.BOUNDS_CHANGED,i)}))},t.tag="PrepareRendererPlugin",Object(ct.c)([C(ka),Object(ct.f)("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=Object(ct.c)([N({contrib:bc})],t)}(),Yh=[na.CIRCLE,na.ELLIPSE,na.IMAGE,na.RECT,na.LINE,na.POLYLINE,na.POLYGON,na.TEXT,na.PATH,na.HTML],$h=function(){function t(){}return t.prototype.isVisible=function(t){var e,n,r=t.cullable;if(!r.enable)return!0;var i=t.getRenderBounds();if(Do.isEmpty(i))return!1;var o=this.camera.getFrustum(),a=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,a||Po.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==Po.OUTSIDE,r.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Po.OUTSIDE||n===Po.INSIDE)return n;for(var i=Po.INSIDE,o=Yh.indexOf(t.nodeName)>-1,s=0,u=r.length;s<u;++s){var c=1<<s;if(0!=(n&c)&&(!o||4!==s&&5!==s)){var l=r[s],h=l.normal,f=l.distance;if(a.dot(h,e.getPositiveFarPoint(r[s]))+f<0)return Po.OUTSIDE;a.dot(h,e.getNegativeFarPoint(r[s]))+f<0&&(i|=c)}}return i},Object(ct.c)([C(Lh),Object(ct.f)("design:type",Uh)],t.prototype,"camera",void 0),t=Object(ct.c)([N({contrib:Wh})],t)}(),Xh=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new dc(null),this.rootWheelEvent=new yc(null),this.onPointerMove=function(e){var n,r,i,o;if(!Pu||"touch"!==e.pointerType){var a=Iu(e);try{for(var s=Object(ct.k)(a),u=s.next();!u.done;u=s.next()){var c=u.value,l=t.bootstrapEvent(t.rootPointerEvent,c,null===(o=null===(i=t.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView);t.eventService.mapEvent(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.eventService.cursor)}}}var e;return e=t,t.prototype.apply=function(t){var n=this;this.eventService.setPickHandler((function(t){return Object(ct.b)(n,void 0,void 0,(function(){return Object(ct.e)(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.promise({position:t,picked:null})];case 1:return[2,e.sent().picked]}}))}))})),t.hooks.pointerWheel.tap(e.tag,(function(t){var e=n.normalizeWheelEvent(t);n.eventService.mapEvent(e)})),t.hooks.pointerDown.tap(e.tag,(function(t){var e,r,i,o;if(!Pu||"touch"!==t.pointerType){var a=Iu(t);if(n.autoPreventDefault&&a[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var s=Object(ct.k)(a),u=s.next();!u.done;u=s.next()){var c=u.value,l=n.bootstrapEvent(n.rootPointerEvent,c,null===(o=null===(i=n.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView);n.eventService.mapEvent(l)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.eventService.cursor)}})),t.hooks.pointerUp.tap(e.tag,(function(t){var e,r,i,o;if(!Pu||"touch"!==t.pointerType){var a=n.contextService.getDomElement(),s=a&&t.target&&t.target!==a&&a.contains&&!a.contains(t.target)?"outside":"",u=Iu(t);try{for(var c=Object(ct.k)(u),l=c.next();!l.done;l=c.next()){var h=l.value,f=n.bootstrapEvent(n.rootPointerEvent,h,null===(o=null===(i=n.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView);f.type+=s,n.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}n.setCursor(n.eventService.cursor)}})),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.prototype.bootstrapEvent=function(t,e,n){t.view=n,t._originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new Yo.a(e.clientX,e.clientY)),i=r.x,o=r.y;t.viewport.x=i,t.viewport.y=o;var a=this.eventService.viewport2Canvas(t.viewport),s=a.x,u=a.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Nu[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new Yo.a(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.eventService.viewport2Canvas(e.viewport),a=o.x,s=o.y;return e.canvas.x=a,e.canvas.y=s,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},t.tag="EventPlugin",Object(ct.c)([C(ha),Object(ct.f)("design:type",Object)],t.prototype,"canvasConfig",void 0),Object(ct.c)([C(Ra),Object(ct.f)("design:type",Object)],t.prototype,"contextService",void 0),Object(ct.c)([C(Ec),Object(ct.f)("design:type",Ec)],t.prototype,"renderingService",void 0),Object(ct.c)([C(ka),Object(ct.f)("design:type",Object)],t.prototype,"renderingContext",void 0),Object(ct.c)([C(Tc),Object(ct.f)("design:type",Tc)],t.prototype,"eventService",void 0),t=e=Object(ct.c)([N({contrib:bc})],t)}(),Kh=Q((function(t){et.register(t,bc,{cache:!1}),et.register(t,Wh,{cache:!1}),t(Ec),t(Tc),t(Xh),t(Hh),t(qh),t(zh),t($h)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(Bh||(Bh={}));var Jh=function(t){function e(e){var n=t.call(this)||this;n.container=wh.createChild(),n.Element=Qu,n.inited=!1,n.document=new fc,n.document.defaultView=n,n.customElements=new mc;var r=e.container,i=e.canvas,o=e.width,a=e.height,s=e.devicePixelRatio,u=e.renderer,c=e.background,l=e.requestAnimationFrame,h=e.cancelAnimationFrame,f=e.createImage;Du(r,n);var p=o,d=a,y=s;return i&&(y=(y=s||ku&&window.devicePixelRatio||1)>=1?Math.ceil(y):1,p=o||i.width/y,d=a||i.height/y),l&&h&&Mu(l,h),n.initRenderingContext({container:r,canvas:i,width:p,height:d,renderer:u,devicePixelRatio:y,cursor:"default",background:c,createImage:f}),n.initDefaultCamera(p,d),n.initRenderer(u),n}return Object(ct.d)(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:ha,useValue:t}),this.container.register({token:ka,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(Fo.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(Fo.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new Uh).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r=this.container.get(ka);n.on(Fh.UPDATED,(function(){r.renderReasons.add(ga.CAMERA_CHANGED)})),this.container.register({token:Lh,useValue:n})},e.prototype.getConfig=function(){return this.container.get(ha)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get(Lh)},e.prototype.getContextService=function(){return this.container.get(Ra)},e.prototype.getEventService=function(){return this.eventService},e.prototype.getRenderingService=function(){return this.renderingService},e.prototype.getRenderingContext=function(){return this.container.get(ka)},e.prototype.getStats=function(){return this.getRenderingService().getStats()},e.prototype.getComputedStyle=function(t){return t.parsedStyle},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t){(void 0===t&&(t=!0),this.emit(Bh.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||_u)(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(Bh.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(ha);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get(Lh),i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===jh.ORTHOGRAPHIC?r.setOrthographic(t/-2,t/2,e/2,e/-2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(Bh.RESIZE,{width:t,height:e})},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},e.prototype.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},e.prototype.render=function(){(this.emit(Bh.BEFORE_RENDER,{}),this.container.isBound(Ec))&&this.container.get(Ec).render(this.getConfig());this.emit(Bh.AFTER_RENDER,{})},e.prototype.run=function(){var t=this;!function e(){t.render(),t.frameId=wu(e)}()},e.prototype.initRenderer=function(t){var e=this;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get(Ra);this.renderingService=this.container.get(Ec),this.eventService=this.container.get(Tc),n.init(),this.renderingService.init().then((function(){e.emit(Bh.READY,{}),e.readyPromise&&e.resolveReadyPromise(),e.inited=!0})),t.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},e.prototype.loadCommonContainerModule=function(){this.container.unload(Kh),this.container.load(Kh,!0)},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},e.prototype.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var r=n.renderer;n.renderer=t,this.destroy(!1),null==r||r.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=[];t.forEach((function(t){t.isConnected&&e.push(t)})),e.reverse().forEach((function(t){t.emit(Fo.UNMOUNTED,{}),t.ownerDocument=null,t.isConnected=!1}))},e.prototype.mountChildren=function(t){var e=this;t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.emit(Fo.MOUNTED,{}))}))},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(Va);wh.load(Rh)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var r=n(1),i=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=i},function(t,e,n){"use strict";const r=n(30).deprecate(()=>{},"Hook.context is deprecated and will be removed"),i=function(...t){return this.call=this._createCall("sync"),this.call(...t)},o=function(...t){return this.callAsync=this._createCall("async"),this.callAsync(...t)},a=function(...t){return this.promise=this._createCall("promise"),this.promise(...t)};class s{constructor(t=[],e){this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=i,this.call=i,this._callAsync=o,this.callAsync=o,this._promise=a,this.promise=a,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(t){throw new Error("Abstract: should be overridden")}_createCall(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})}_tap(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");void 0!==e.context&&r(),e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)}tap(t,e){this._tap("sync",t,e)}tapAsync(t,e){this._tap("async",t,e)}tapPromise(t,e){this._tap("promise",t,e)}_runRegisterInterceptors(t){for(const e of this.interceptors)if(e.register){const n=e.register(t);void 0!==n&&(t=n)}return t}withOptions(t){const e=e=>Object.assign({},t,"string"==typeof e?{name:e}:e);return{name:this.name,tap:(t,n)=>this.tap(e(t),n),tapAsync:(t,n)=>this.tapAsync(e(t),n),tapPromise:(t,n)=>this.tapPromise(e(t),n),intercept:t=>this.intercept(t),isUsed:()=>this.isUsed(),withOptions:t=>this.withOptions(e(t))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(t){if(this._resetCompilation(),this.interceptors.push(Object.assign({},t)),t.register)for(let e=0;e<this.taps.length;e++)this.taps[e]=t.register(this.taps[e])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(t){let e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;"number"==typeof t.stage&&(n=t.stage);let r=this.taps.length;for(;r>0;){r--;const t=this.taps[r];this.taps[r+1]=t;const i=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(i>n)){r++;break}}this.taps[r]=t}}Object.setPrototypeOf(s.prototype,null),t.exports=s},function(t,e,n){"use strict";t.exports=class{constructor(t){this.config=t,this.options=void 0,this._args=void 0}create(t){let e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`throw ${t};\n`,onResult:t=>`return ${t};\n`,resultReturns:!0,onDone:()=>"",rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`_callback(${t});\n`,onResult:t=>`_callback(null, ${t});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let t=!1;const n=this.contentWithInterceptors({onError:e=>(t=!0,`_error(${e});\n`),onResult:t=>`_resolve(${t});\n`,onDone:()=>"_resolve();\n"});let r="";r+='"use strict";\n',r+=this.header(),r+="return new Promise((function(_resolve, _reject) {\n",t&&(r+="var _sync = true;\n",r+="function _error(_err) {\n",r+="if(_sync)\n",r+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",r+="else\n",r+="_reject(_err);\n",r+="};\n"),r+=n,t&&(r+="_sync = false;\n"),r+="}));\n",e=new Function(this.args(),r)}return this.deinit(),e}setup(t,e){t._x=e.taps.map(t=>t.fn)}init(t){this.options=t,this._args=t.args.slice()}deinit(){this.options=void 0,this._args=void 0}contentWithInterceptors(t){if(this.options.interceptors.length>0){const e=t.onError,n=t.onResult,r=t.onDone;let i="";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.call&&(i+=`${this.getInterceptor(t)}.call(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.content(Object.assign(t,{onError:e&&(t=>{let n="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].error&&(n+=`${this.getInterceptor(e)}.error(${t});\n`)}return n+=e(t),n}),onResult:n&&(t=>{let e="";for(let n=0;n<this.options.interceptors.length;n++){this.options.interceptors[n].result&&(e+=`${this.getInterceptor(n)}.result(${t});\n`)}return e+=n(t),e}),onDone:r&&(()=>{let t="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].done&&(t+=this.getInterceptor(e)+".done();\n")}return t+=r(),t})})),i}return this.content(t)}header(){let t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t}needContext(){for(const t of this.options.taps)if(t.context)return!0;return!1}callTap(t,{onError:e,onResult:n,onDone:r,rethrowIfPossible:i}){let o="",a=!1;for(let e=0;e<this.options.interceptors.length;e++){const n=this.options.interceptors[e];n.tap&&(a||(o+=`var _tap${t} = ${this.getTap(t)};\n`,a=!0),o+=`${this.getInterceptor(e)}.tap(${n.context?"_context, ":""}_tap${t});\n`)}o+=`var _fn${t} = ${this.getTapFn(t)};\n`;const s=this.options.taps[t];switch(s.type){case"sync":i||(o+=`var _hasError${t} = false;\n`,o+="try {\n"),o+=n?`var _result${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`:`_fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,i||(o+="} catch(_err) {\n",o+=`_hasError${t} = true;\n`,o+=e("_err"),o+="}\n",o+=`if(!_hasError${t}) {\n`),n&&(o+=n("_result"+t)),r&&(o+=r()),i||(o+="}\n");break;case"async":let a="";a+=n?`(function(_err${t}, _result${t}) {\n`:`(function(_err${t}) {\n`,a+=`if(_err${t}) {\n`,a+=e("_err"+t),a+="} else {\n",n&&(a+=n("_result"+t)),r&&(a+=r()),a+="}\n",a+="})",o+=`_fn${t}(${this.args({before:s.context?"_context":void 0,after:a})});\n`;break;case"promise":o+=`var _hasResult${t} = false;\n`,o+=`var _promise${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,o+=`if (!_promise${t} || !_promise${t}.then)\n`,o+=` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${t} + ')');\n`,o+=`_promise${t}.then((function(_result${t}) {\n`,o+=`_hasResult${t} = true;\n`,n&&(o+=n("_result"+t)),r&&(o+=r()),o+=`}), function(_err${t}) {\n`,o+=`if(_hasResult${t}) throw _err${t};\n`,o+=e("_err"+t),o+="});\n"}return o}callTapsSeries({onError:t,onResult:e,resultReturns:n,onDone:r,doneReturns:i,rethrowIfPossible:o}){if(0===this.options.taps.length)return r();const a=this.options.taps.findIndex(t=>"sync"!==t.type),s=n||i;let u="",c=r,l=0;for(let n=this.options.taps.length-1;n>=0;n--){const i=n;c!==r&&("sync"!==this.options.taps[i].type||l++>20)&&(l=0,u+=`function _next${i}() {\n`,u+=c(),u+="}\n",c=()=>`${s?"return ":""}_next${i}();\n`);const h=c,f=t=>t?"":r(),p=this.callTap(i,{onError:e=>t(i,e,h,f),onResult:e&&(t=>e(i,t,h,f)),onDone:!e&&h,rethrowIfPossible:o&&(a<0||i<a)});c=()=>p}return u+=c(),u}callTapsLooping({onError:t,onDone:e,rethrowIfPossible:n}){if(0===this.options.taps.length)return e();const r=this.options.taps.every(t=>"sync"===t.type);let i="";r||(i+="var _looper = (function() {\n",i+="var _loopAsync = false;\n"),i+="var _loop;\n",i+="do {\n",i+="_loop = false;\n";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.loop&&(i+=`${this.getInterceptor(t)}.loop(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.callTapsSeries({onError:t,onResult:(t,e,n,i)=>{let o="";return o+=`if(${e} !== undefined) {\n`,o+="_loop = true;\n",r||(o+="if(_loopAsync) _looper();\n"),o+=i(!0),o+="} else {\n",o+=n(),o+="}\n",o},onDone:e&&(()=>{let t="";return t+="if(!_loop) {\n",t+=e(),t+="}\n",t}),rethrowIfPossible:n&&r}),i+="} while(_loop);\n",r||(i+="_loopAsync = true;\n",i+="});\n",i+="_looper();\n"),i}callTapsParallel({onError:t,onResult:e,onDone:n,rethrowIfPossible:r,onTap:i=((t,e)=>e())}){if(this.options.taps.length<=1)return this.callTapsSeries({onError:t,onResult:e,onDone:n,rethrowIfPossible:r});let o="";o+="do {\n",o+=`var _counter = ${this.options.taps.length};\n`,n&&(o+="var _done = (function() {\n",o+=n(),o+="});\n");for(let a=0;a<this.options.taps.length;a++){const s=()=>n?"if(--_counter === 0) _done();\n":"--_counter;",u=t=>t||!n?"_counter = 0;\n":"_counter = 0;\n_done();\n";o+="if(_counter <= 0) break;\n",o+=i(a,()=>this.callTap(a,{onError:e=>{let n="";return n+="if(_counter > 0) {\n",n+=t(a,e,s,u),n+="}\n",n},onResult:e&&(t=>{let n="";return n+="if(_counter > 0) {\n",n+=e(a,t,s,u),n+="}\n",n}),onDone:!e&&(()=>s()),rethrowIfPossible:r}),s,u)}return o+="} while(false);\n",o}args({before:t,after:e}={}){let n=this._args;return t&&(n=[t].concat(n)),e&&(n=n.concat(e)),0===n.length?"":n.join(", ")}getTapFn(t){return`_x[${t}]`}getTap(t){return`_taps[${t}]`}getInterceptor(t){return`_interceptors[${t}]`}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0;var r=n(4),i=n(1);function o(t,e,n,i,o){var a={},s="number"==typeof o,u=void 0!==o&&s?o.toString():n;if(s&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(a=Reflect.getMetadata(t,e));var c=a[u];if(Array.isArray(c))for(var l=0,h=c;l<h.length;l++){var f=h[l];if(f.key===i.key)throw new Error(r.DUPLICATED_METADATA+" "+f.key.toString())}else c=[];c.push(i),a[u]=c,Reflect.defineMetadata(t,a,e)}function a(t,e){Reflect.decorate(t,e)}function s(t,e){return function(n,r){e(n,r,t)}}e.tagParameter=function(t,e,n,r){o(i.TAGGED,t,e,r,n)},e.tagProperty=function(t,e,n){o(i.TAGGED_PROP,t.constructor,e,n)},e.decorate=function(t,e,n){"number"==typeof n?a([s(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):a([t],e)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},c.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){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,o),!0;case 6:return l.fn.call(l.context,e,n,r,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,r);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},c.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||u(this,o);else{for(var s=0,c=[],l=a.length;s<l;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:u(this,o)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&u(this,e)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var r=0;e.id=function(){return r++}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0;var r=n(4);function i(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function o(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}e.getServiceIdentifierAsString=i,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",i=n(t,e);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(t){var e="Object";null!==t.implementationType&&(e=o(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(function t(e,n){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===n||t(e.parentRequest,n))}(e,e.serviceIdentifier)){var n=function(t){return function t(e,n){void 0===n&&(n=[]);var r=i(e.serviceIdentifier);return n.push(r),null!==e.parentRequest?t(e.parentRequest,n):n}(t).reverse().join(" --\x3e ")}(e);throw new Error(r.CIRCULAR_DEPENDENCY+" "+n)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var r=n(20),i=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new r.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var r=n(19),i=n(29),o=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=i.namedConstraint(t),new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=i.taggedConstraint(t)(e),new r.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return i.typeConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return i.namedConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return i.taggedConstraint(t)(e)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=o},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));let i=1;const o="object"==typeof self&&self.self==self?self:"object"==typeof t&&t.global==t?t:{},a=Date.now();let s={},u=Date.now();const c=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-u,r=n>16?0:16-n,c=i++;return s[c]=t,Object.keys(s).length>1||setTimeout(()=>{u=e;const t=s;s={},Object.keys(t).forEach(e=>t[e](o.performance&&"function"==typeof o.performance.now?o.performance.now():Date.now()-a))},r),c},l=t=>{delete s[t]},h=t=>"string"!=typeof t?c:""===t?o.requestAnimationFrame:o[t+"RequestAnimationFrame"],f=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!h(t)),p=h(f),d="string"!=typeof(y=f)?l:""===y?o.cancelAnimationFrame:o[y+"CancelAnimationFrame"]||o[y+"CancelRequestAnimationFrame"];var y;o.requestAnimationFrame=p,o.cancelAnimationFrame=d,r.exports&&(r.exports={requestAnimationFrame:p,cancelAnimationFrame:d})}).call(this,n(18),n(74)(t))},function(t,e,n){(function(t,e){
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G=e():t.G=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=67)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NON_CUSTOM_TAG_KEYS=e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct",e.NON_CUSTOM_TAG_KEYS=[e.INJECT_TAG,e.MULTI_INJECT_TAG,e.NAME_TAG,e.UNMANAGED_TAG,e.NAMED_TAG,e.OPTIONAL_TAG]},function(t,e,n){"use strict";e.__esModule=!0,e.SyncHook=n(54),e.SyncBailHook=n(55),e.SyncWaterfallHook=n(56),e.SyncLoopHook=n(57),e.AsyncParallelHook=n(58),e.AsyncParallelBailHook=n(59),e.AsyncSeriesHook=n(60),e.AsyncSeriesBailHook=n(61),e.AsyncSeriesLoopHook=n(62),e.AsyncSeriesWaterfallHook=n(63),e.HookMap=n(64),e.MultiHook=n(65)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0;var r=n(0);e.METADATA_KEY=r;var i=n(28);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return i.Container}});var o=n(7);Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return o.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return o.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return o.TargetTypeEnum}});var a=n(44);Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return a.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return a.ContainerModule}});var s=n(45);Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return s.injectable}});var u=n(46);Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return u.tagged}});var c=n(47);Object.defineProperty(e,"named",{enumerable:!0,get:function(){return c.named}});var l=n(19);Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return l.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return l.LazyServiceIdentifer}});var h=n(48);Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return h.optional}});var f=n(49);Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return f.unmanaged}});var p=n(50);Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return p.multiInject}});var d=n(51);Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return d.targetName}});var y=n(52);Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return y.postConstruct}});var v=n(17);Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return v.MetadataReader}});var g=n(10);Object.defineProperty(e,"id",{enumerable:!0,get:function(){return g.id}});var m=n(8);Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return m.decorate}});var b=n(22);Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return b.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return b.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return b.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return b.typeConstraint}});var T=n(11);Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return T.getServiceIdentifierAsString}});var w=n(53);Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return w.multiBindToService}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]};e.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},e.STACK_OVERFLOW="Maximum call stack size exceeded"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var r=n(0),i=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},t}();e.Metadata=i},function(t,e,n){"use strict";const r=n(23).deprecate(()=>{},"Hook.context is deprecated and will be removed"),i=function(...t){return this.call=this._createCall("sync"),this.call(...t)},o=function(...t){return this.callAsync=this._createCall("async"),this.callAsync(...t)},a=function(...t){return this.promise=this._createCall("promise"),this.promise(...t)};class s{constructor(t=[],e){this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=i,this.call=i,this._callAsync=o,this.callAsync=o,this._promise=a,this.promise=a,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}compile(t){throw new Error("Abstract: should be overridden")}_createCall(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})}_tap(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");void 0!==e.context&&r(),e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)}tap(t,e){this._tap("sync",t,e)}tapAsync(t,e){this._tap("async",t,e)}tapPromise(t,e){this._tap("promise",t,e)}_runRegisterInterceptors(t){for(const e of this.interceptors)if(e.register){const n=e.register(t);void 0!==n&&(t=n)}return t}withOptions(t){const e=e=>Object.assign({},t,"string"==typeof e?{name:e}:e);return{name:this.name,tap:(t,n)=>this.tap(e(t),n),tapAsync:(t,n)=>this.tapAsync(e(t),n),tapPromise:(t,n)=>this.tapPromise(e(t),n),intercept:t=>this.intercept(t),isUsed:()=>this.isUsed(),withOptions:t=>this.withOptions(e(t))}}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(t){if(this._resetCompilation(),this.interceptors.push(Object.assign({},t)),t.register)for(let e=0;e<this.taps.length;e++)this.taps[e]=t.register(this.taps[e])}_resetCompilation(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}_insert(t){let e;this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;"number"==typeof t.stage&&(n=t.stage);let r=this.taps.length;for(;r>0;){r--;const t=this.taps[r];this.taps[r+1]=t;const i=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(i>n)){r++;break}}this.taps[r]=t}}Object.setPrototypeOf(s.prototype,null),t.exports=s},function(t,e,n){"use strict";t.exports=class{constructor(t){this.config=t,this.options=void 0,this._args=void 0}create(t){let e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`throw ${t};\n`,onResult:t=>`return ${t};\n`,resultReturns:!0,onDone:()=>"",rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:t=>`_callback(${t});\n`,onResult:t=>`_callback(null, ${t});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let t=!1;const n=this.contentWithInterceptors({onError:e=>(t=!0,`_error(${e});\n`),onResult:t=>`_resolve(${t});\n`,onDone:()=>"_resolve();\n"});let r="";r+='"use strict";\n',r+=this.header(),r+="return new Promise((function(_resolve, _reject) {\n",t&&(r+="var _sync = true;\n",r+="function _error(_err) {\n",r+="if(_sync)\n",r+="_resolve(Promise.resolve().then((function() { throw _err; })));\n",r+="else\n",r+="_reject(_err);\n",r+="};\n"),r+=n,t&&(r+="_sync = false;\n"),r+="}));\n",e=new Function(this.args(),r)}return this.deinit(),e}setup(t,e){t._x=e.taps.map(t=>t.fn)}init(t){this.options=t,this._args=t.args.slice()}deinit(){this.options=void 0,this._args=void 0}contentWithInterceptors(t){if(this.options.interceptors.length>0){const e=t.onError,n=t.onResult,r=t.onDone;let i="";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.call&&(i+=`${this.getInterceptor(t)}.call(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.content(Object.assign(t,{onError:e&&(t=>{let n="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].error&&(n+=`${this.getInterceptor(e)}.error(${t});\n`)}return n+=e(t),n}),onResult:n&&(t=>{let e="";for(let n=0;n<this.options.interceptors.length;n++){this.options.interceptors[n].result&&(e+=`${this.getInterceptor(n)}.result(${t});\n`)}return e+=n(t),e}),onDone:r&&(()=>{let t="";for(let e=0;e<this.options.interceptors.length;e++){this.options.interceptors[e].done&&(t+=this.getInterceptor(e)+".done();\n")}return t+=r(),t})})),i}return this.content(t)}header(){let t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",this.options.interceptors.length>0&&(t+="var _taps = this.taps;\n",t+="var _interceptors = this.interceptors;\n"),t}needContext(){for(const t of this.options.taps)if(t.context)return!0;return!1}callTap(t,{onError:e,onResult:n,onDone:r,rethrowIfPossible:i}){let o="",a=!1;for(let e=0;e<this.options.interceptors.length;e++){const n=this.options.interceptors[e];n.tap&&(a||(o+=`var _tap${t} = ${this.getTap(t)};\n`,a=!0),o+=`${this.getInterceptor(e)}.tap(${n.context?"_context, ":""}_tap${t});\n`)}o+=`var _fn${t} = ${this.getTapFn(t)};\n`;const s=this.options.taps[t];switch(s.type){case"sync":i||(o+=`var _hasError${t} = false;\n`,o+="try {\n"),o+=n?`var _result${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`:`_fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,i||(o+="} catch(_err) {\n",o+=`_hasError${t} = true;\n`,o+=e("_err"),o+="}\n",o+=`if(!_hasError${t}) {\n`),n&&(o+=n("_result"+t)),r&&(o+=r()),i||(o+="}\n");break;case"async":let a="";a+=n?`(function(_err${t}, _result${t}) {\n`:`(function(_err${t}) {\n`,a+=`if(_err${t}) {\n`,a+=e("_err"+t),a+="} else {\n",n&&(a+=n("_result"+t)),r&&(a+=r()),a+="}\n",a+="})",o+=`_fn${t}(${this.args({before:s.context?"_context":void 0,after:a})});\n`;break;case"promise":o+=`var _hasResult${t} = false;\n`,o+=`var _promise${t} = _fn${t}(${this.args({before:s.context?"_context":void 0})});\n`,o+=`if (!_promise${t} || !_promise${t}.then)\n`,o+=` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${t} + ')');\n`,o+=`_promise${t}.then((function(_result${t}) {\n`,o+=`_hasResult${t} = true;\n`,n&&(o+=n("_result"+t)),r&&(o+=r()),o+=`}), function(_err${t}) {\n`,o+=`if(_hasResult${t}) throw _err${t};\n`,o+=e("_err"+t),o+="});\n"}return o}callTapsSeries({onError:t,onResult:e,resultReturns:n,onDone:r,doneReturns:i,rethrowIfPossible:o}){if(0===this.options.taps.length)return r();const a=this.options.taps.findIndex(t=>"sync"!==t.type),s=n||i;let u="",c=r,l=0;for(let n=this.options.taps.length-1;n>=0;n--){const i=n;c!==r&&("sync"!==this.options.taps[i].type||l++>20)&&(l=0,u+=`function _next${i}() {\n`,u+=c(),u+="}\n",c=()=>`${s?"return ":""}_next${i}();\n`);const h=c,f=t=>t?"":r(),p=this.callTap(i,{onError:e=>t(i,e,h,f),onResult:e&&(t=>e(i,t,h,f)),onDone:!e&&h,rethrowIfPossible:o&&(a<0||i<a)});c=()=>p}return u+=c(),u}callTapsLooping({onError:t,onDone:e,rethrowIfPossible:n}){if(0===this.options.taps.length)return e();const r=this.options.taps.every(t=>"sync"===t.type);let i="";r||(i+="var _looper = (function() {\n",i+="var _loopAsync = false;\n"),i+="var _loop;\n",i+="do {\n",i+="_loop = false;\n";for(let t=0;t<this.options.interceptors.length;t++){const e=this.options.interceptors[t];e.loop&&(i+=`${this.getInterceptor(t)}.loop(${this.args({before:e.context?"_context":void 0})});\n`)}return i+=this.callTapsSeries({onError:t,onResult:(t,e,n,i)=>{let o="";return o+=`if(${e} !== undefined) {\n`,o+="_loop = true;\n",r||(o+="if(_loopAsync) _looper();\n"),o+=i(!0),o+="} else {\n",o+=n(),o+="}\n",o},onDone:e&&(()=>{let t="";return t+="if(!_loop) {\n",t+=e(),t+="}\n",t}),rethrowIfPossible:n&&r}),i+="} while(_loop);\n",r||(i+="_loopAsync = true;\n",i+="});\n",i+="_looper();\n"),i}callTapsParallel({onError:t,onResult:e,onDone:n,rethrowIfPossible:r,onTap:i=((t,e)=>e())}){if(this.options.taps.length<=1)return this.callTapsSeries({onError:t,onResult:e,onDone:n,rethrowIfPossible:r});let o="";o+="do {\n",o+=`var _counter = ${this.options.taps.length};\n`,n&&(o+="var _done = (function() {\n",o+=n(),o+="});\n");for(let a=0;a<this.options.taps.length;a++){const s=()=>n?"if(--_counter === 0) _done();\n":"--_counter;",u=t=>t||!n?"_counter = 0;\n":"_counter = 0;\n_done();\n";o+="if(_counter <= 0) break;\n",o+=i(a,()=>this.callTap(a,{onError:e=>{let n="";return n+="if(_counter > 0) {\n",n+=t(a,e,s,u),n+="}\n",n},onResult:e&&(t=>{let n="";return n+="if(_counter > 0) {\n",n+=e(a,t,s,u),n+="}\n",n}),onDone:!e&&(()=>s()),rethrowIfPossible:r}),s,u)}return o+="} while(false);\n",o}args({before:t,after:e}={}){let n=this._args;return t&&(n=[t].concat(n)),e&&(n=n.concat(e)),0===n.length?"":n.join(", ")}getTapFn(t){return`_x[${t}]`}getTap(t){return`_taps[${t}]`}getInterceptor(t){return`_interceptors[${t}]`}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=void 0;e.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};e.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};e.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagProperty=e.tagParameter=e.decorate=void 0;var r=n(3),i=n(0);function o(t,e,n,i,o){var a={},s="number"==typeof o,u=void 0!==o&&s?o.toString():n;if(s&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(t,e)&&(a=Reflect.getMetadata(t,e));var c=a[u];if(Array.isArray(c))for(var l=0,h=c;l<h.length;l++){var f=h[l];if(f.key===i.key)throw new Error(r.DUPLICATED_METADATA+" "+f.key.toString())}else c=[];c.push(i),a[u]=c,Reflect.defineMetadata(t,a,e)}function a(t,e){Reflect.decorate(t,e)}function s(t,e){return function(n,r){e(n,r,t)}}e.tagParameter=function(t,e,n,r){o(i.TAGGED,t,e,r,n)},e.tagProperty=function(t,e,n){o(i.TAGGED_PROP,t.constructor,e,n)},e.decorate=function(t,e,n){"number"==typeof n?a([s(n,t)],e):"string"==typeof n?Reflect.decorate([t],e,n):a([t],e)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},c.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){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,o),!0;case 6:return l.fn.call(l.context,e,n,r,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,r);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},c.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||u(this,o);else{for(var s=0,c=[],l=a.length;s<l;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:u(this,o)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&u(this,e)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0;var r=0;e.id=function(){return r++}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.circularDependencyToException=e.listMetadataForTarget=e.listRegisteredBindingsForServiceIdentifier=e.getServiceIdentifierAsString=e.getFunctionName=void 0;var r=n(3);function i(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function o(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}e.getServiceIdentifierAsString=i,e.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="",i=n(t,e);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(t){var e="Object";null!==t.implementationType&&(e=o(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)}))),r},e.circularDependencyToException=function t(e){e.childRequests.forEach((function(e){if(function t(e,n){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===n||t(e.parentRequest,n))}(e,e.serviceIdentifier)){var n=function(t){return function t(e,n){void 0===n&&(n=[]);var r=i(e.serviceIdentifier);return n.push(r),null!==e.parentRequest?t(e.parentRequest,n):n}(t).reverse().join(" --\x3e ")}(e);throw new Error(r.CIRCULAR_DEPENDENCY+" "+n)}t(e)}))},e.listMetadataForTarget=function(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(t){n+=t.toString()+"\n"}))," "+t+"\n "+t+" - "+n}return" "+t},e.getFunctionName=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingOnSyntax=void 0;var r=n(13),i=function(){function t(t){this._binding=t}return t.prototype.onActivation=function(t){return this._binding.onActivation=t,new r.BindingWhenSyntax(this._binding)},t}();e.BindingOnSyntax=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenSyntax=void 0;var r=n(12),i=n(22),o=function(){function t(t){this._binding=t}return t.prototype.when=function(t){return this._binding.constraint=t,new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(t){return this._binding.constraint=i.namedConstraint(t),new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new r.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=i.taggedConstraint(t)(e),new r.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(e){return i.typeConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(t){return this._binding.constraint=function(e){return i.namedConstraint(t)(e.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(t,e){return this._binding.constraint=function(n){return i.taggedConstraint(t)(e)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.typeConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,i.namedConstraint(t))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(t,e){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(t)(e))},new r.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(e){return i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(e){return!i.traverseAncerstors(e,t)},new r.BindingOnSyntax(this._binding)},t}();e.BindingWhenSyntax=o},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));let i=1;const o="object"==typeof self&&self.self==self?self:"object"==typeof t&&t.global==t?t:{},a=Date.now();let s={},u=Date.now();const c=t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=Date.now(),n=e-u,r=n>16?0:16-n,c=i++;return s[c]=t,Object.keys(s).length>1||setTimeout(()=>{u=e;const t=s;s={},Object.keys(t).forEach(e=>t[e](o.performance&&"function"==typeof o.performance.now?o.performance.now():Date.now()-a))},r),c},l=t=>{delete s[t]},h=t=>"string"!=typeof t?c:""===t?o.requestAnimationFrame:o[t+"RequestAnimationFrame"],f=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!h(t)),p=h(f),d="string"!=typeof(y=f)?l:""===y?o.cancelAnimationFrame:o[y+"CancelAnimationFrame"]||o[y+"CancelRequestAnimationFrame"];var y;o.requestAnimationFrame=p,o.cancelAnimationFrame=d,r.exports&&(r.exports={requestAnimationFrame:p,cancelAnimationFrame:d})}).call(this,n(16),n(66)(t))},function(t,e,n){(function(t,e){
17
2
  /*! *****************************************************************************
18
3
  Copyright (C) Microsoft. All rights reserved.
19
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -28,4 +13,18 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
28
13
  See the Apache Version 2.0 License for specific language governing permissions
29
14
  and limitations under the License.
30
15
  ***************************************************************************** */
31
- var n;!function(n){!function(r){var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(n);function a(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(e){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,u=!a&&!s,c={create:a?function(){return j(Object.create(null))}:s?function(){return j({__proto__:null})}:function(){return j({})},has:u?function(t,e){return n.call(t,e)}:function(t,e){return e in t},get:u?function(t,e){return n.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},l=Object.getPrototypeOf(Function),h="object"==typeof t&&t.env&&"true"===t.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,i)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}():Map,p=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new f}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,d=new(h||"function"!=typeof WeakMap?function(){var t=c.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function i(t,r){if(!n.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function y(t,e,n){var r=d.get(t);if(T(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(T(i)){if(!n)return;i=new f,r.set(e,i)}return i}function v(t,e,n){var r=y(e,n,!1);return!T(r)&&!!r.has(t)}function g(t,e,n){var r=y(e,n,!1);if(!T(r))return r.get(t)}function m(t,e,n,r){y(n,r,!0).set(t,e)}function b(t,e){var n=[],r=y(t,e,!1);if(T(r))return n;for(var i=function(t){var e=N(t,o);if(!A(e))throw new TypeError;var n=e.call(t);if(!M(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=S(i);if(!s)return n.length=a,n;var u=s.value;try{n[a]=u}catch(t){try{C(i)}finally{throw t}}a++}}function E(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function T(t){return void 0===t}function O(t){return null===t}function M(t){return"object"==typeof t?null!==t:"function"==typeof t}function w(t,e){switch(E(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=N(t,i);if(void 0!==r){var o=r.call(t,n);if(M(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(A(n))if(!M(i=n.call(t)))return i;if(A(r=t.valueOf))if(!M(i=r.call(t)))return i}else{var r;if(A(r=t.valueOf))if(!M(i=r.call(t)))return i;var i,o=t.toString;if(A(o))if(!M(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function _(t){var e=w(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function P(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function A(t){return"function"==typeof t}function x(t){return"function"==typeof t}function N(t,e){var n=t[e];if(null!=n){if(!A(n))throw new TypeError;return n}}function S(t){var e=t.next();return!e.done&&e}function C(t){var e=t.return;e&&e.call(t)}function I(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===l)return e;if(e!==l)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function j(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(T(n)){if(!P(t))throw new TypeError;if(!x(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!T(r)&&!O(r)){if(!x(r))throw new TypeError;e=r}}return e}(t,e)}if(!P(t))throw new TypeError;if(!M(e))throw new TypeError;if(!M(r)&&!T(r)&&!O(r))throw new TypeError;return O(r)&&(r=void 0),function(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!T(o)&&!O(o)){if(!M(o))throw new TypeError;r=o}}return r}(t,e,n=_(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!M(n))throw new TypeError;if(!T(r)&&!function(t){switch(E(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;m(t,e,n,r)}})),e("defineMetadata",(function(t,e,n,r){if(!M(n))throw new TypeError;return T(r)||(r=_(r)),m(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return T(n)||(n=_(n)),function t(e,n,r){if(v(e,n,r))return!0;var i=I(n);return!O(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return T(n)||(n=_(n)),v(t,e,n)})),e("getMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return T(n)||(n=_(n)),function t(e,n,r){if(v(e,n,r))return g(e,n,r);var i=I(n);return O(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return T(n)||(n=_(n)),g(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return T(e)||(e=_(e)),function t(e,n){var r=b(e,n),i=I(e);if(null===i)return r;var o=t(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new p,s=[],u=0,c=r;u<c.length;u++){var l=c[u];a.has(l)||(a.add(l),s.push(l))}for(var h=0,f=o;h<f.length;h++){l=f[h];a.has(l)||(a.add(l),s.push(l))}return s}(t,e)})),e("getOwnMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return T(e)||(e=_(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!M(e))throw new TypeError;T(n)||(n=_(n));var r=y(e,n,!1);if(T(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}))}(o)}()}(n||(n={}))}).call(this,n(23),n(18))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(1),i=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(r.TAGGED_PROP,t)||[]},t}();e.MetadataReader=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0;var r=n(4);e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===r.STACK_OVERFLOW}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var r=n(4),i=n(1),o=n(9),a=n(13),s=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=s,e.inject=function(t){return function(e,n,s){if(void 0===t)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(e.name));var u=new o.Metadata(i.INJECT_TAG,t);"number"==typeof s?a.tagParameter(e,n,s,u):a.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var r=n(1),i=n(15),o=n(9),a=n(43),s=function(){function t(t,e,n,s){this.id=i.id(),this.type=t,this.serviceIdentifier=n,this.name=new a.QueryableString(e||""),this.metadata=new Array;var u=null;"string"==typeof s?u=new o.Metadata(r.NAMED_TAG,s):s instanceof o.Metadata&&(u=s),null!==u&&this.metadata.push(u)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(r.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===r.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(r.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;r<i.length;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var r=n(19),i=n(20),o=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var r=n(1),i=n(9),o=function(t,e){var n=t.parentRequest;return null!==n&&(!!e(n)||o(n,e))};e.traverseAncerstors=o;var a=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new i.Metadata(t,e),n}};e.taggedConstraint=a;var s=a(r.NAMED_TAG);e.namedConstraint=s;e.typeConstraint=function(t){return function(e){var n=null;if(null!==e){if(n=e.bindings[0],"string"==typeof t)return n.serviceIdentifier===t;var r=e.bindings[0].implementationType;return t===r}return!1}}},function(t,e,n){"use strict";e.deprecate=(t,e)=>{let n=!0;return function(){return n&&(console.warn("DeprecationWarning: "+e),n=!1),t.apply(this,arguments)}}},function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));n(32);var r,i,o=n(8),a=n(7),s=n(17),u=0,c=new WeakMap,l=function(){function e(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return e.prototype.enqueue=function(e){var n,o=this.observer.records,a=o.length;if(o.length>0){var s=function(t,e){return t===e?t:i&&function(t){return t===i||t===r}(t)?i:null}(o[a-1],e);if(s)return void(o[a-1]=s)}else n=this.observer,y.push(n),d||(d=!0,t(v));o[a]=e},e.prototype.addListeners=function(){this.addListeners_(this.target)},e.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(o.ElementEvent.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(o.ElementEvent.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(o.ElementEvent.REMOVED,this,!0)},e.prototype.removeListeners=function(){this.removeListeners_(this.target)},e.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(o.ElementEvent.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(o.ElementEvent.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(o.ElementEvent.REMOVED,this,!0)},e.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=c.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},e.prototype.handleEvent=function(t){var e,n;switch(t.stopImmediatePropagation(),t.type){case o.ElementEvent.ATTR_MODIFIED:var u=t.attrName,c=t.relatedNode.namespaceURI;n=t.target,(e=f("attributes",n)).attributeName=u,e.attributeNamespace=c;var l=t.attrChange===a.a.ADDITION?null:t.prevValue;p(n,(function(t){var n;if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(u)||-1!==t.attributeFilter.indexOf(c)))return t.attributeOldValue?(n=l,i||((i=s.a.copy(r)).oldValue=n,i)):e}));break;case o.ElementEvent.REMOVED:case o.ElementEvent.INSERTED:n=t.relatedNode;var h=t.target,d=void 0,y=void 0;t.type===o.ElementEvent.INSERTED?(d=[h],y=[]):(d=[],y=[h]);var v=h.previousSibling,g=h.nextSibling;(e=f("childList",n)).addedNodes=d,e.removedNodes=y,e.previousSibling=v,e.nextSibling=g,p(n,(function(t){if(t.childList)return e}))}r=i=void 0},e}(),h=function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=u++}return t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=c.get(t);r||c.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new l(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=c.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function f(t,e){return r=new s.a(t,e)}function p(t,e){for(var n=t;n;n=n.parentNode){var r=c.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var d=!1,y=[];function v(){d=!1;var t=y;y=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=c.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&v()}}).call(this,n(75).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},f.clearImmediate=p}function p(t){delete c[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(18),n(23))},,,,function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var a=n(37),s=n(4),u=n(12),c=n(1),l=n(24),h=n(38),f=n(45),p=n(47),d=n(15),y=n(16),v=n(50),g=n(51),m=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+s.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=u.BindingScopeEnum.Transient;else if(e.defaultScope!==u.BindingScopeEnum.Singleton&&e.defaultScope!==u.BindingScopeEnum.Transient&&e.defaultScope!==u.BindingScopeEnum.Request)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=d.id(),this._bindingDictionary=new g.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=new t,s=o([e,n],r).map((function(t){return h.getBindingDictionary(t)})),u=h.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return s.forEach((function(t){c(t,u)})),a},t.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],a=e(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=this.options.defaultScope||u.BindingScopeEnum.Transient,n=new a.Binding(t,e);return this._bindingDictionary.add(t,n),new p.BindingToSyntax(n)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(s.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new g.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,c.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=h.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(v.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(s.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,u.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,c.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,u.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,c.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,u={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(u)))throw new Error(s.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(u);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=h.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),f.resolve(n)}},t}();e.Container=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var r=n(12),i=n(15),o=function(){function t(t,e){this.id=i.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=r.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===r.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0;var r=n(39),i=n(4),o=n(12),a=n(1),s=n(25),u=n(16),c=n(40),l=n(9),h=n(41),f=n(42),p=n(44),d=n(27);function y(t){return t._bindingDictionary}function v(t,e,n,o,a){var s=g(n.container,a.serviceIdentifier),c=[];return s.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&t.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),s=g(n.container,a.serviceIdentifier)),c=e?s:s.filter((function(t){var e=new p.Request(t.serviceIdentifier,n,o,t,a);return t.constraint(e)})),function(t,e,n,o){switch(e.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var a=u.getServiceIdentifierAsString(t),s=i.NOT_REGISTERED;throw s+=u.listMetadataForTarget(a,n),s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;a=u.getServiceIdentifierAsString(t),s=i.AMBIGUOUS_MATCH+" "+a;throw s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s)}}(a.serviceIdentifier,c,a,n.container),c}function g(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=g(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,g,m,b){void 0===b&&(b=!1);var E=new c.Context(e),T=function(t,e,n,r,i,o){var s=t?a.MULTI_INJECT_TAG:a.INJECT_TAG,u=new l.Metadata(s,n),c=new d.Target(e,r,n,u);if(void 0!==i){var h=new l.Metadata(i,o);c.metadata.push(h)}return c}(n,r,y,"",g,m);try{return function t(e,n,r,a,s,u){var c,l;if(null===s){c=v(e,n,a,null,u),l=new p.Request(r,a,null,c,u);var d=new h.Plan(a,l);a.addPlan(d)}else c=v(e,n,a,s,u),l=s.addChildRequest(u.serviceIdentifier,c,u);c.forEach((function(n){var r=null;if(u.isArray())r=l.addChildRequest(n.serviceIdentifier,n,u);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var s=f.getDependencies(e,n.implementationType);if(!a.container.options.skipBaseClassChecks){var c=f.getBaseClassDependencyCount(e,n.implementationType);if(s.length<c){var h=i.ARGUMENTS_LENGTH_MISMATCH(f.getFunctionName(n.implementationType));throw new Error(h)}}s.forEach((function(n){t(e,!1,n.serviceIdentifier,a,r,n)}))}}))}(t,b,y,E,null,T),E}catch(t){throw s.isStackOverflowExeption(t)&&E.plan&&u.circularDependencyToException(E.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new d.Target(o.TargetTypeEnum.Variable,"",e,new l.Metadata(n,r)),a=new c.Context(t);return new p.Request(e,a,null,[],i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var r=n(15),i=function(){function t(t){this.id=r.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0;var r=function(t,e){this.parentContext=t,this.rootRequest=e};e.Plan=r},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var i=n(26),o=n(4),a=n(12),s=n(1),u=n(16);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return u.getFunctionName}});var c=n(27);function l(t,e,n,i){var s=t.getConstructorMetadata(n),u=s.compilerGeneratedMetadata;if(void 0===u){var l=o.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(l)}var p=s.userGeneratedMetadata,d=Object.keys(p),y=0===n.length&&d.length>0,v=d.length>n.length,g=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var s=h(a,t,e,n,r);null!==s&&o.push(s)}return o}(i,e,u,p,y||v?d.length:n.length),m=function t(e,n){for(var i=e.getPropertiesMetadata(n),o=[],s=Object.keys(i),u=0,l=s;u<l.length;u++){var h=l[u],p=i[h],d=f(i[h]),y=d.targetName||h,v=d.inject||d.multiInject,g=new c.Target(a.TargetTypeEnum.ClassProperty,y,v);g.metadata=p,o.push(g)}var m=Object.getPrototypeOf(n.prototype).constructor;if(m!==Object){var b=t(e,m);o=r(r([],o),b)}return o}(t,n);return r(r([],g),m)}function h(t,e,n,r,s){var u=s[t.toString()]||[],l=f(u),h=!0!==l.unmanaged,p=r[t],d=l.inject||l.multiInject;if((p=d||p)instanceof i.LazyServiceIdentifer&&(p=p.unwrap()),h){if(!e&&(p===Object||p===Function||void 0===p)){var y=o.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(y)}var v=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return v.metadata=u,v}return null}function f(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[s.INJECT_TAG],multiInject:e[s.MULTI_INJECT_TAG],targetName:e[s.NAME_TAG],unmanaged:e[s.UNMANAGED_TAG]}}e.getDependencies=function(t,e){return l(t,u.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=l(e,u.getFunctionName(r),r,!0),o=i.map((function(t){return t.metadata.filter((function(t){return t.key===s.UNMANAGED_TAG}))})),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:t(e,r)}return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var r=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var r=n(15),i=function(){function t(t,e,n,i,o){this.id=r.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var r=n(4),i=n(12),o=n(25),a=n(16),s=n(46),u=function(t,e,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},c=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,o=e.childRequests,l=e.target&&e.target.isArray(),h=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(l&&h)return o.map((function(e){return c(t)(e)}));var f=null;if(!e.target.isOptional()||0!==n.length){var p=n[0],d=p.scope===i.BindingScopeEnum.Singleton,y=p.scope===i.BindingScopeEnum.Request;if(d&&p.activated)return p.cache;if(y&&null!==t&&t.has(p.id))return t.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Function)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Constructor)f=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)f=u("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)f=u("toFactory",p.serviceIdentifier,(function(){return p.factory(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)f=u("toProvider",p.serviceIdentifier,(function(){return p.provider(e.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var v=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+v)}f=s.resolveInstance(p.implementationType,o,c(t))}return"function"==typeof p.onActivation&&(f=p.onActivation(e.parentContext,f)),d&&(p.cache=f,p.activated=!0),y&&null!==t&&!t.has(p.id)&&t.set(p.id,f),f}}};e.resolve=function(t){return c(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0;var i=n(4),o=n(12),a=n(1);e.resolveInstance=function(t,e,n){var s,u,c=null;if(e.length>0){var l=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);u=l,c=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value();var o=i[n];t[r]=o})),t}(c=new((s=t).bind.apply(s,r([void 0],u))),e,n)}else c=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(i.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,c),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var r=n(4),i=n(12),o=n(48),a=n(28),s=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=t,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},t.prototype.toConstantValue=function(t){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(r.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var r=n(49),i=n(19),o=n(20),a=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var r=n(12),i=n(28),o=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var r=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var r=n(4),i=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(r.NULL_ARGUMENT);if(null==e)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(r.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(r.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0;var r=n(15),i=function(t){this.id=r.id(),this.registry=t};e.ContainerModule=i;var o=function(t){this.id=r.id(),this.registry=t};e.AsyncContainerModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0;var r=n(4),i=n(1);e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,t))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(i.PARAM_TYPES,e,t),t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0;var r=n(9),i=n(13);e.tagged=function(t,e){return function(n,o,a){var s=new r.Metadata(t,e);"number"==typeof a?i.tagParameter(n,o,a,s):i.tagProperty(n,o,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0;var r=n(1),i=n(9),o=n(13);e.named=function(t){return function(e,n,a){var s=new i.Metadata(r.NAMED_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0;var r=n(1),i=n(9),o=n(13);e.optional=function(){return function(t,e,n){var a=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(t,e,n,a):o.tagProperty(t,e,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0;var r=n(1),i=n(9),o=n(13);e.unmanaged=function(){return function(t,e,n){var a=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(t,e,n,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0;var r=n(1),i=n(9),o=n(13);e.multiInject=function(t){return function(e,n,a){var s=new i.Metadata(r.MULTI_INJECT_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0;var r=n(1),i=n(9),o=n(13);e.targetName=function(t){return function(e,n,a){var s=new i.Metadata(r.NAME_TAG,t);o.tagParameter(e,n,a,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0;var r=n(4),i=n(1),o=n(9);e.postConstruct=function(){return function(t,e,n){var a=new o.Metadata(i.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,t.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,t.constructor)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsSeries({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r,rethrowIfPossible:i}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)};\n} else {\n${r()}}\n`,resultReturns:n,onDone:r,rethrowIfPossible:i})}},a=()=>{throw new Error("tapAsync is not supported on a SyncBailHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncBailHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,rethrowIfPossible:r}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0]),doneReturns:n,rethrowIfPossible:r})}},a=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsLooping({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncLoopHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncLoopHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsParallel({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){let r="";return r+=`var _results = new Array(${this.options.taps.length});\n`,r+="var _checkDone = function() {\n",r+="for(var i = 0; i < _results.length; i++) {\n",r+="var item = _results[i];\n",r+="if(item === undefined) return false;\n",r+="if(item.result !== undefined) {\n",r+=e("item.result"),r+="return true;\n",r+="}\n",r+="if(item.error) {\n",r+=t("item.error"),r+="return true;\n",r+="}\n",r+="}\n",r+="return false;\n",r+="}\n",r+=this.callTapsParallel({onError:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && ((_results.length = ${t+1}), (_results[${t}] = { error: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onResult:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && (${e} !== undefined && (_results.length = ${t+1}), (_results[${t}] = { result: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onTap:(t,e,n,r)=>{let i="";return t>0&&(i+=`if(${t} >= _results.length) {\n`,i+=n(),i+="} else {\n"),i+=e(),t>0&&(i+="}\n"),i},onDone:n}),r}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)}\n} else {\n${r()}}\n`,resultReturns:n,onDone:r})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsLooping({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(10),i=n(11);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0])})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(30),i=(t,e)=>e;class o{constructor(t,e){this._map=new Map,this.name=e,this._factory=t,this._interceptors=[]}get(t){return this._map.get(t)}for(t){const e=this.get(t);if(void 0!==e)return e;let n=this._factory(t);const r=this._interceptors;for(let e=0;e<r.length;e++)n=r[e].factory(t,n);return this._map.set(t,n),n}intercept(t){this._interceptors.push(Object.assign({factory:i},t))}}o.prototype.tap=r.deprecate((function(t,e,n){return this.for(t).tap(e,n)}),"HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."),o.prototype.tapAsync=r.deprecate((function(t,e,n){return this.for(t).tapAsync(e,n)}),"HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."),o.prototype.tapPromise=r.deprecate((function(t,e,n){return this.for(t).tapPromise(e,n)}),"HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."),t.exports=o},function(t,e,n){"use strict";n(10);class r{constructor(t,e){this.hooks=t,this.name=e}tap(t,e){for(const n of this.hooks)n.tap(t,e)}tapAsync(t,e){for(const n of this.hooks)n.tapAsync(t,e)}tapPromise(t,e){for(const n of this.hooks)n.tapPromise(t,e)}isUsed(){for(const t of this.hooks)if(t.isUsed())return!0;return!1}intercept(t){for(const e of this.hooks)e.intercept(t)}withOptions(t){return new r(this.hooks.map(e=>e.withOptions(t)),this.name)}}t.exports=r},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(32),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(18))}])}));
16
+ var n;!function(n){!function(r){var i="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),o=a(n);function a(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===i.Reflect?i.Reflect=n:o=a(i.Reflect,o),function(e){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,u=!a&&!s,c={create:a?function(){return I(Object.create(null))}:s?function(){return I({__proto__:null})}:function(){return I({})},has:u?function(t,e){return n.call(t,e)}:function(t,e){return e in t},get:u?function(t,e){return n.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},l=Object.getPrototypeOf(Function),h="object"==typeof t&&t.env&&"true"===t.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,i)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}():Map,p=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new f}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,d=new(h||"function"!=typeof WeakMap?function(){var t=c.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function i(t,r){if(!n.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function a(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}():WeakMap);function y(t,e,n){var r=d.get(t);if(w(r)){if(!n)return;r=new f,d.set(t,r)}var i=r.get(e);if(w(i)){if(!n)return;i=new f,r.set(e,i)}return i}function v(t,e,n){var r=y(e,n,!1);return!w(r)&&!!r.has(t)}function g(t,e,n){var r=y(e,n,!1);if(!w(r))return r.get(t)}function m(t,e,n,r){y(n,r,!0).set(t,e)}function b(t,e){var n=[],r=y(t,e,!1);if(w(r))return n;for(var i=function(t){var e=N(t,o);if(!S(e))throw new TypeError;var n=e.call(t);if(!M(n))throw new TypeError;return n}(r.keys()),a=0;;){var s=A(i);if(!s)return n.length=a,n;var u=s.value;try{n[a]=u}catch(t){try{O(i)}finally{throw t}}a++}}function T(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function w(t){return void 0===t}function E(t){return null===t}function M(t){return"object"==typeof t?null!==t:"function"==typeof t}function k(t,e){switch(T(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",r=N(t,i);if(void 0!==r){var o=r.call(t,n);if(M(o))throw new TypeError;return o}return function(t,e){if("string"===e){var n=t.toString;if(S(n))if(!M(i=n.call(t)))return i;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i}else{var r;if(S(r=t.valueOf))if(!M(i=r.call(t)))return i;var i,o=t.toString;if(S(o))if(!M(i=o.call(t)))return i}throw new TypeError}(t,"default"===n?"number":n)}function P(t){var e=k(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function x(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function S(t){return"function"==typeof t}function _(t){return"function"==typeof t}function N(t,e){var n=t[e];if(null!=n){if(!S(n))throw new TypeError;return n}}function A(t){var e=t.next();return!e.done&&e}function O(t){var e=t.return;e&&e.call(t)}function C(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===l)return e;if(e!==l)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function I(t){return t.__=void 0,delete t.__,t}e("decorate",(function(t,e,n,r){if(w(n)){if(!x(t))throw new TypeError;if(!_(e))throw new TypeError;return function(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!w(r)&&!E(r)){if(!_(r))throw new TypeError;e=r}}return e}(t,e)}if(!x(t))throw new TypeError;if(!M(e))throw new TypeError;if(!M(r)&&!w(r)&&!E(r))throw new TypeError;return E(r)&&(r=void 0),function(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!w(o)&&!E(o)){if(!M(o))throw new TypeError;r=o}}return r}(t,e,n=P(n),r)})),e("metadata",(function(t,e){return function(n,r){if(!M(n))throw new TypeError;if(!w(r)&&!function(t){switch(T(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;m(t,e,n,r)}})),e("defineMetadata",(function(t,e,n,r){if(!M(n))throw new TypeError;return w(r)||(r=P(r)),m(t,e,n,r)})),e("hasMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return w(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return!0;var i=C(n);return!E(i)&&t(e,i,r)}(t,e,n)})),e("hasOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return w(n)||(n=P(n)),v(t,e,n)})),e("getMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return w(n)||(n=P(n)),function t(e,n,r){if(v(e,n,r))return g(e,n,r);var i=C(n);return E(i)?void 0:t(e,i,r)}(t,e,n)})),e("getOwnMetadata",(function(t,e,n){if(!M(e))throw new TypeError;return w(n)||(n=P(n)),g(t,e,n)})),e("getMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return w(e)||(e=P(e)),function t(e,n){var r=b(e,n),i=C(e);if(null===i)return r;var o=t(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new p,s=[],u=0,c=r;u<c.length;u++){var l=c[u];a.has(l)||(a.add(l),s.push(l))}for(var h=0,f=o;h<f.length;h++){l=f[h];a.has(l)||(a.add(l),s.push(l))}return s}(t,e)})),e("getOwnMetadataKeys",(function(t,e){if(!M(t))throw new TypeError;return w(e)||(e=P(e)),b(t,e)})),e("deleteMetadata",(function(t,e,n){if(!M(e))throw new TypeError;w(n)||(n=P(n));var r=y(e,n,!1);if(w(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}))}(o)}()}(n||(n={}))}).call(this,n(27),n(16))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReader=void 0;var r=n(0),i=function(){function t(){}return t.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,t)||{}}},t.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(r.TAGGED_PROP,t)||[]},t}();e.MetadataReader=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStackOverflowExeption=void 0;var r=n(3);e.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===r.STACK_OVERFLOW}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inject=e.LazyServiceIdentifer=void 0;var r=n(3),i=n(0),o=n(4),a=n(8),s=function(){function t(t){this._cb=t}return t.prototype.unwrap=function(){return this._cb()},t}();e.LazyServiceIdentifer=s,e.inject=function(t){return function(e,n,s){if(void 0===t)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(e.name));var u=new o.Metadata(i.INJECT_TAG,t);"number"==typeof s?a.tagParameter(e,n,s,u):a.tagProperty(e,n,u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Target=void 0;var r=n(0),i=n(10),o=n(4),a=n(35),s=function(){function t(t,e,n,s){this.id=i.id(),this.type=t,this.serviceIdentifier=n,this.name=new a.QueryableString(e||""),this.metadata=new Array;var u=null;"string"==typeof s?u=new o.Metadata(r.NAMED_TAG,s):s instanceof o.Metadata&&(u=s),null!==u&&this.metadata.push(u)}return t.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++){if(n[e].key===t)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(t){return this.matchesTag(r.MULTI_INJECT_TAG)(t)},t.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))}))},t.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(t){return t.key===r.NAMED_TAG}))[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(t){return r.NON_CUSTOM_TAG_KEYS.every((function(e){return t.key!==e}))})):null},t.prototype.matchesNamedTag=function(t){return this.matchesTag(r.NAMED_TAG)(t)},t.prototype.matchesTag=function(t){var e=this;return function(n){for(var r=0,i=e.metadata;r<i.length;r++){var o=i[r];if(o.key===t&&o.value===n)return!0}return!1}},t}();e.Target=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingWhenOnSyntax=void 0;var r=n(12),i=n(13),o=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingWhenOnSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=void 0;var r=n(0),i=n(4),o=function(t,e){var n=t.parentRequest;return null!==n&&(!!e(n)||o(n,e))};e.traverseAncerstors=o;var a=function(t){return function(e){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(t)(e)};return n.metaData=new i.Metadata(t,e),n}};e.taggedConstraint=a;var s=a(r.NAMED_TAG);e.namedConstraint=s;e.typeConstraint=function(t){return function(e){var n=null;if(null!==e){if(n=e.bindings[0],"string"==typeof t)return n.serviceIdentifier===t;var r=e.bindings[0].implementationType;return t===r}return!1}}},function(t,e,n){"use strict";e.deprecate=(t,e)=>{let n=!0;return function(){return n&&(console.warn("DeprecationWarning: "+e),n=!1),t.apply(this,arguments)}}},,,,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var a=n(29),s=n(3),u=n(7),c=n(0),l=n(17),h=n(30),f=n(37),p=n(39),d=n(10),y=n(11),v=n(42),g=n(43),m=function(){function t(t){this._appliedMiddleware=[];var e=t||{};if("object"!=typeof e)throw new Error(""+s.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===e.defaultScope)e.defaultScope=u.BindingScopeEnum.Transient;else if(e.defaultScope!==u.BindingScopeEnum.Singleton&&e.defaultScope!==u.BindingScopeEnum.Transient&&e.defaultScope!==u.BindingScopeEnum.Request)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===e.autoBindInjectable)e.autoBindInjectable=!1;else if("boolean"!=typeof e.autoBindInjectable)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===e.skipBaseClassChecks)e.skipBaseClassChecks=!1;else if("boolean"!=typeof e.skipBaseClassChecks)throw new Error(""+s.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:e.autoBindInjectable,defaultScope:e.defaultScope,skipBaseClassChecks:e.skipBaseClassChecks},this.id=d.id(),this._bindingDictionary=new g.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new l.MetadataReader}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=new t,s=o([e,n],r).map((function(t){return h.getBindingDictionary(t)})),u=h.getBindingDictionary(a);function c(t,e){t.traverse((function(t,n){n.forEach((function(t){e.add(t.serviceIdentifier,t.clone())}))}))}return s.forEach((function(t){c(t,u)})),a},t.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},t.prototype.loadAsync=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],a=e(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.unload=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=function(t){return function(e){return e.moduleId===t}};e.forEach((function(e){var n=r(e.id);t._bindingDictionary.removeByCondition(n)}))},t.prototype.bind=function(t){var e=this.options.defaultScope||u.BindingScopeEnum.Transient,n=new a.Binding(t,e);return this._bindingDictionary.add(t,n),new p.BindingToSyntax(n)},t.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},t.prototype.unbind=function(t){try{this._bindingDictionary.remove(t)}catch(e){throw new Error(s.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(t))}},t.prototype.unbindAll=function(){this._bindingDictionary=new g.Lookup},t.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return!e&&this.parent&&(e=this.parent.isBound(t)),e},t.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,c.NAMED_TAG,e)},t.prototype.isBoundTagged=function(t,e,n){var r=!1;if(this._bindingDictionary.hasKey(t)){var i=this._bindingDictionary.get(t),o=h.createMockRequest(this,t,e,n);r=i.some((function(t){return t.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(t,e,n)),r},t.prototype.snapshot=function(){this._snapshots.push(v.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},t.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(s.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce((function(t,e){return e(t)}),n)},t.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},t.prototype.get=function(t){return this._get(!1,!1,u.TargetTypeEnum.Variable,t)},t.prototype.getTagged=function(t,e,n){return this._get(!1,!1,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getNamed=function(t,e){return this.getTagged(t,c.NAMED_TAG,e)},t.prototype.getAll=function(t){return this._get(!0,!0,u.TargetTypeEnum.Variable,t)},t.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,u.TargetTypeEnum.Variable,t,e,n)},t.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,c.NAMED_TAG,e)},t.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach((function(t){e.applyMiddleware(t)})),e.get(t)},t.prototype._getContainerModuleHelpersFactory=function(){var t=this,e=function(t,e){t._binding.moduleId=e},n=function(n){return function(r){var i=t.rebind.bind(t)(r);return e(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=t.bind.bind(t)(n);return e(r,i),r}),isboundFunction:function(e){return t.isBound.bind(t)(e)},rebindFunction:n(r),unbindFunction:function(e){t.unbind.bind(t)(e)}};var i}},t.prototype._get=function(t,e,n,r,i,o){var a=null,u={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(u)))throw new Error(s.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(u);return a},t.prototype._planAndResolve=function(){var t=this;return function(e){var n=h.plan(t._metadataReader,t,e.isMultiInject,e.targetType,e.serviceIdentifier,e.key,e.value,e.avoidConstraints);return n=e.contextInterceptor(n),f.resolve(n)}},t}();e.Container=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Binding=void 0;var r=n(7),i=n(10),o=function(){function t(t,e){this.id=i.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=r.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===r.BindingScopeEnum.Singleton&&this.activated,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.cache=this.cache,e},t}();e.Binding=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindingDictionary=e.createMockRequest=e.plan=void 0;var r=n(31),i=n(3),o=n(7),a=n(0),s=n(18),u=n(11),c=n(32),l=n(4),h=n(33),f=n(34),p=n(36),d=n(20);function y(t){return t._bindingDictionary}function v(t,e,n,o,a){var s=g(n.container,a.serviceIdentifier),c=[];return s.length===r.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&t.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),s=g(n.container,a.serviceIdentifier)),c=e?s:s.filter((function(t){var e=new p.Request(t.serviceIdentifier,n,o,t,a);return t.constraint(e)})),function(t,e,n,o){switch(e.length){case r.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var a=u.getServiceIdentifierAsString(t),s=i.NOT_REGISTERED;throw s+=u.listMetadataForTarget(a,n),s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s);case r.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return e;case r.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;a=u.getServiceIdentifierAsString(t),s=i.AMBIGUOUS_MATCH+" "+a;throw s+=u.listRegisteredBindingsForServiceIdentifier(o,a,g),new Error(s)}}(a.serviceIdentifier,c,a,n.container),c}function g(t,e){var n=[],r=y(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=g(t.parent,e)),n}e.getBindingDictionary=y,e.plan=function(t,e,n,r,y,g,m,b){void 0===b&&(b=!1);var T=new c.Context(e),w=function(t,e,n,r,i,o){var s=t?a.MULTI_INJECT_TAG:a.INJECT_TAG,u=new l.Metadata(s,n),c=new d.Target(e,r,n,u);if(void 0!==i){var h=new l.Metadata(i,o);c.metadata.push(h)}return c}(n,r,y,"",g,m);try{return function t(e,n,r,a,s,u){var c,l;if(null===s){c=v(e,n,a,null,u),l=new p.Request(r,a,null,c,u);var d=new h.Plan(a,l);a.addPlan(d)}else c=v(e,n,a,s,u),l=s.addChildRequest(u.serviceIdentifier,c,u);c.forEach((function(n){var r=null;if(u.isArray())r=l.addChildRequest(n.serviceIdentifier,n,u);else{if(n.cache)return;r=l}if(n.type===o.BindingTypeEnum.Instance&&null!==n.implementationType){var s=f.getDependencies(e,n.implementationType);if(!a.container.options.skipBaseClassChecks){var c=f.getBaseClassDependencyCount(e,n.implementationType);if(s.length<c){var h=i.ARGUMENTS_LENGTH_MISMATCH(f.getFunctionName(n.implementationType));throw new Error(h)}}s.forEach((function(n){t(e,!1,n.serviceIdentifier,a,r,n)}))}}))}(t,b,y,T,null,w),T}catch(t){throw s.isStackOverflowExeption(t)&&T.plan&&u.circularDependencyToException(T.plan.rootRequest),t}},e.createMockRequest=function(t,e,n,r){var i=new d.Target(o.TargetTypeEnum.Variable,"",e,new l.Metadata(n,r)),a=new c.Context(t);return new p.Request(e,a,null,[],i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingCount=void 0;e.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var r=n(10),i=function(){function t(t){this.id=r.id(),this.container=t}return t.prototype.addPlan=function(t){this.plan=t},t.prototype.setCurrentRequest=function(t){this.currentRequest=t},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plan=void 0;var r=function(t,e){this.parentContext=t,this.rootRequest=e};e.Plan=r},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var i=n(19),o=n(3),a=n(7),s=n(0),u=n(11);Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return u.getFunctionName}});var c=n(20);function l(t,e,n,i){var s=t.getConstructorMetadata(n),u=s.compilerGeneratedMetadata;if(void 0===u){var l=o.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(l)}var p=s.userGeneratedMetadata,d=Object.keys(p),y=0===n.length&&d.length>0,v=d.length>n.length,g=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var s=h(a,t,e,n,r);null!==s&&o.push(s)}return o}(i,e,u,p,y||v?d.length:n.length),m=function t(e,n){for(var i=e.getPropertiesMetadata(n),o=[],s=Object.keys(i),u=0,l=s;u<l.length;u++){var h=l[u],p=i[h],d=f(i[h]),y=d.targetName||h,v=d.inject||d.multiInject,g=new c.Target(a.TargetTypeEnum.ClassProperty,y,v);g.metadata=p,o.push(g)}var m=Object.getPrototypeOf(n.prototype).constructor;if(m!==Object){var b=t(e,m);o=r(r([],o),b)}return o}(t,n);return r(r([],g),m)}function h(t,e,n,r,s){var u=s[t.toString()]||[],l=f(u),h=!0!==l.unmanaged,p=r[t],d=l.inject||l.multiInject;if((p=d||p)instanceof i.LazyServiceIdentifer&&(p=p.unwrap()),h){if(!e&&(p===Object||p===Function||void 0===p)){var y=o.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(y)}var v=new c.Target(a.TargetTypeEnum.ConstructorArgument,l.targetName,p);return v.metadata=u,v}return null}function f(t){var e={};return t.forEach((function(t){e[t.key.toString()]=t.value})),{inject:e[s.INJECT_TAG],multiInject:e[s.MULTI_INJECT_TAG],targetName:e[s.NAME_TAG],unmanaged:e[s.UNMANAGED_TAG]}}e.getDependencies=function(t,e){return l(t,u.getFunctionName(e),e,!1)},e.getBaseClassDependencyCount=function t(e,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=l(e,u.getFunctionName(r),r,!0),o=i.map((function(t){return t.metadata.filter((function(t){return t.key===s.UNMANAGED_TAG}))})),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:t(e,r)}return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryableString=void 0;var r=function(){function t(t){this.str=t}return t.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},t.prototype.endsWith=function(t){var e,n=t.split("").reverse().join("");return e=this.str.split("").reverse().join(""),this.startsWith.call({str:e},n)},t.prototype.contains=function(t){return-1!==this.str.indexOf(t)},t.prototype.equals=function(t){return this.str===t},t.prototype.value=function(){return this.str},t}();e.QueryableString=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=void 0;var r=n(10),i=function(){function t(t,e,n,i,o){this.id=r.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();e.Request=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=void 0;var r=n(3),i=n(7),o=n(18),a=n(11),s=n(38),u=function(t,e,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(t,e.toString())):n}},c=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,o=e.childRequests,l=e.target&&e.target.isArray(),h=!(e.parentRequest&&e.parentRequest.target&&e.target&&e.parentRequest.target.matchesArray(e.target.serviceIdentifier));if(l&&h)return o.map((function(e){return c(t)(e)}));var f=null;if(!e.target.isOptional()||0!==n.length){var p=n[0],d=p.scope===i.BindingScopeEnum.Singleton,y=p.scope===i.BindingScopeEnum.Request;if(d&&p.activated)return p.cache;if(y&&null!==t&&t.has(p.id))return t.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Function)f=p.cache,p.activated=!0;else if(p.type===i.BindingTypeEnum.Constructor)f=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)f=u("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)f=u("toFactory",p.serviceIdentifier,(function(){return p.factory(e.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)f=u("toProvider",p.serviceIdentifier,(function(){return p.provider(e.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var v=a.getServiceIdentifierAsString(e.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+v)}f=s.resolveInstance(p.implementationType,o,c(t))}return"function"==typeof p.onActivation&&(f=p.onActivation(e.parentContext,f)),d&&(p.cache=f,p.activated=!0),y&&null!==t&&!t.has(p.id)&&t.set(p.id,f),f}}};e.resolve=function(t){return c(t.plan.rootRequest.requestScope)(t.plan.rootRequest)}},function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveInstance=void 0;var i=n(3),o=n(7),a=n(0);e.resolveInstance=function(t,e,n){var s,u,c=null;if(e.length>0){var l=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);u=l,c=function(t,e,n){var r=e.filter((function(t){return null!==t.target&&t.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(e,n){var r;r=e.target.name.value();var o=i[n];t[r]=o})),t}(c=new((s=t).bind.apply(s,r([void 0],u))),e,n)}else c=new t;return function(t,e){if(Reflect.hasMetadata(a.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(a.POST_CONSTRUCT,t);try{e[n.value]()}catch(e){throw new Error(i.POST_CONSTRUCT_ERROR(t.name,e.message))}}}(t,c),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingToSyntax=void 0;var r=n(3),i=n(7),o=n(40),a=n(21),s=function(){function t(t){this._binding=t}return t.prototype.to=function(t){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=t,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},t.prototype.toConstantValue=function(t){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(t){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(t){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(r.INVALID_FUNCTION_BINDING);var e=this.toConstantValue(t);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,e},t.prototype.toAutoFactory=function(t){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(e){return function(){return e.container.get(t)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(t){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(t){this.toDynamicValue((function(e){return e.container.get(t)}))},t}();e.BindingToSyntax=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInWhenOnSyntax=void 0;var r=n(41),i=n(12),o=n(13),a=function(){function t(t){this._binding=t,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(t)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},t.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},t.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},t.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},t.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},t.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},t.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},t.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},t.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},t.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},t.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},t.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},t.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},t.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},t}();e.BindingInWhenOnSyntax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingInSyntax=void 0;var r=n(7),i=n(21),o=function(){function t(t){this._binding=t}return t.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},t}();e.BindingInSyntax=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerSnapshot=void 0;var r=function(){function t(){}return t.of=function(e,n){var r=new t;return r.bindings=e,r.middleware=n,r},t}();e.ContainerSnapshot=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lookup=void 0;var r=n(3),i=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(t,e){if(null==t)throw new Error(r.NULL_ARGUMENT);if(null==e)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},t.prototype.get=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);var e=this._map.get(t);if(void 0!==e)return e;throw new Error(r.KEY_NOT_FOUND)},t.prototype.remove=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(r.KEY_NOT_FOUND)},t.prototype.removeByCondition=function(t){var e=this;this._map.forEach((function(n,r){var i=n.filter((function(e){return!t(e)}));i.length>0?e._map.set(r,i):e._map.delete(r)}))},t.prototype.hasKey=function(t){if(null==t)throw new Error(r.NULL_ARGUMENT);return this._map.has(t)},t.prototype.clone=function(){var e=new t;return this._map.forEach((function(t,n){t.forEach((function(t){return e.add(n,t.clone())}))})),e},t.prototype.traverse=function(t){this._map.forEach((function(e,n){t(n,e)}))},t}();e.Lookup=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncContainerModule=e.ContainerModule=void 0;var r=n(10),i=function(t){this.id=r.id(),this.registry=t};e.ContainerModule=i;var o=function(t){this.id=r.id(),this.registry=t};e.AsyncContainerModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectable=void 0;var r=n(3),i=n(0);e.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,t))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(i.PARAM_TYPES,e,t),t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tagged=void 0;var r=n(4),i=n(8);e.tagged=function(t,e){return function(n,o,a){var s=new r.Metadata(t,e);"number"==typeof a?i.tagParameter(n,o,a,s):i.tagProperty(n,o,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.named=void 0;var r=n(0),i=n(4),o=n(8);e.named=function(t){return function(e,n,a){var s=new i.Metadata(r.NAMED_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=void 0;var r=n(0),i=n(4),o=n(8);e.optional=function(){return function(t,e,n){var a=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(t,e,n,a):o.tagProperty(t,e,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unmanaged=void 0;var r=n(0),i=n(4),o=n(8);e.unmanaged=function(){return function(t,e,n){var a=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(t,e,n,a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiInject=void 0;var r=n(0),i=n(4),o=n(8);e.multiInject=function(t){return function(e,n,a){var s=new i.Metadata(r.MULTI_INJECT_TAG,t);"number"==typeof a?o.tagParameter(e,n,a,s):o.tagProperty(e,n,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.targetName=void 0;var r=n(0),i=n(4),o=n(8);e.targetName=function(t){return function(e,n,a){var s=new i.Metadata(r.NAME_TAG,t);o.tagParameter(e,n,a,s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postConstruct=void 0;var r=n(3),i=n(0),o=n(4);e.postConstruct=function(){return function(t,e,n){var a=new o.Metadata(i.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,t.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,t.constructor)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=void 0;e.multiBindToService=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return t.bind(n).toService(e)}))}}}},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsSeries({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r,rethrowIfPossible:i}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)};\n} else {\n${r()}}\n`,resultReturns:n,onDone:r,rethrowIfPossible:i})}},a=()=>{throw new Error("tapAsync is not supported on a SyncBailHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncBailHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,rethrowIfPossible:r}){return this.callTapsSeries({onError:(e,n)=>t(n),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0]),doneReturns:n,rethrowIfPossible:r})}},a=()=>{throw new Error("tapAsync is not supported on a SyncWaterfallHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncWaterfallHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e,rethrowIfPossible:n}){return this.callTapsLooping({onError:(e,n)=>t(n),onDone:e,rethrowIfPossible:n})}},a=()=>{throw new Error("tapAsync is not supported on a SyncLoopHook")},s=()=>{throw new Error("tapPromise is not supported on a SyncLoopHook")},u=function(t){return o.setup(this,t),o.create(t)};function c(t=[],e){const n=new r(t,e);return n.constructor=c,n.tapAsync=a,n.tapPromise=s,n.compile=u,n}c.prototype=null,t.exports=c},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsParallel({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){let r="";return r+=`var _results = new Array(${this.options.taps.length});\n`,r+="var _checkDone = function() {\n",r+="for(var i = 0; i < _results.length; i++) {\n",r+="var item = _results[i];\n",r+="if(item === undefined) return false;\n",r+="if(item.result !== undefined) {\n",r+=e("item.result"),r+="return true;\n",r+="}\n",r+="if(item.error) {\n",r+=t("item.error"),r+="return true;\n",r+="}\n",r+="}\n",r+="return false;\n",r+="}\n",r+=this.callTapsParallel({onError:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && ((_results.length = ${t+1}), (_results[${t}] = { error: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onResult:(t,e,n,r)=>{let i="";return i+=`if(${t} < _results.length && (${e} !== undefined && (_results.length = ${t+1}), (_results[${t}] = { result: ${e} }), _checkDone())) {\n`,i+=r(!0),i+="} else {\n",i+=n(),i+="}\n",i},onTap:(t,e,n,r)=>{let i="";return t>0&&(i+=`if(${t} >= _results.length) {\n`,i+=n(),i+="} else {\n"),i+=e(),t>0&&(i+="}\n"),i},onDone:n}),r}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,resultReturns:n,onDone:r}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,n,r)=>`if(${n} !== undefined) {\n${e(n)}\n} else {\n${r()}}\n`,resultReturns:n,onDone:r})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onDone:e}){return this.callTapsLooping({onError:(e,n,r,i)=>t(n)+i(!0),onDone:e})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(5),i=n(6);const o=new class extends i{content({onError:t,onResult:e,onDone:n}){return this.callTapsSeries({onError:(e,n,r,i)=>t(n)+i(!0),onResult:(t,e,n)=>{let r="";return r+=`if(${e} !== undefined) {\n`,r+=`${this._args[0]} = ${e};\n`,r+="}\n",r+=n(),r},onDone:()=>e(this._args[0])})}},a=function(t){return o.setup(this,t),o.create(t)};function s(t=[],e){if(t.length<1)throw new Error("Waterfall hooks must have at least one argument");const n=new r(t,e);return n.constructor=s,n.compile=a,n._call=void 0,n.call=void 0,n}s.prototype=null,t.exports=s},function(t,e,n){"use strict";const r=n(23),i=(t,e)=>e;class o{constructor(t,e){this._map=new Map,this.name=e,this._factory=t,this._interceptors=[]}get(t){return this._map.get(t)}for(t){const e=this.get(t);if(void 0!==e)return e;let n=this._factory(t);const r=this._interceptors;for(let e=0;e<r.length;e++)n=r[e].factory(t,n);return this._map.set(t,n),n}intercept(t){this._interceptors.push(Object.assign({factory:i},t))}}o.prototype.tap=r.deprecate((function(t,e,n){return this.for(t).tap(e,n)}),"HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."),o.prototype.tapAsync=r.deprecate((function(t,e,n){return this.for(t).tapAsync(e,n)}),"HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."),o.prototype.tapPromise=r.deprecate((function(t,e,n){return this.for(t).tapPromise(e,n)}),"HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."),t.exports=o},function(t,e,n){"use strict";n(5);class r{constructor(t,e){this.hooks=t,this.name=e}tap(t,e){for(const n of this.hooks)n.tap(t,e)}tapAsync(t,e){for(const n of this.hooks)n.tapAsync(t,e)}tapPromise(t,e){for(const n of this.hooks)n.tapPromise(t,e)}isUsed(){for(const t of this.hooks)if(t.isUsed())return!0;return!1}intercept(t){for(const e of this.hooks)e.intercept(t)}withOptions(t){return new r(this.hooks.map(e=>e.withOptions(t)),this.name)}}t.exports=r},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"ManaSyringe",(function(){return r})),n.d(e,"Shape",(function(){return Qs})),n.d(e,"LineCap",(function(){return tu})),n.d(e,"LineJoin",(function(){return eu})),n.d(e,"TextTransform",(function(){return nu})),n.d(e,"TextAlign",(function(){return ru})),n.d(e,"CanvasConfig",(function(){return iu})),n.d(e,"UnitType",(function(){return va})),n.d(e,"UnitCategory",(function(){return ga})),n.d(e,"ValueRange",(function(){return ma})),n.d(e,"Nested",(function(){return ba})),n.d(e,"ParenLess",(function(){return Ta})),n.d(e,"CSSColorValue",(function(){return Sa})),n.d(e,"CSSKeywordValue",(function(){return _a})),n.d(e,"CSSMathOperator",(function(){return Pa})),n.d(e,"isComparison",(function(){return Na})),n.d(e,"CSSMathInvert",(function(){return Ou})),n.d(e,"CSSMathMax",(function(){return Du})),n.d(e,"CSSMathMin",(function(){return Lu})),n.d(e,"CSSMathNegate",(function(){return Vu})),n.d(e,"CSSMathProduct",(function(){return ju})),n.d(e,"CSSMathSum",(function(){return Bu})),n.d(e,"CSSMathValue",(function(){return Au})),n.d(e,"typeCheck",(function(){return Cu})),n.d(e,"CSSMathVariadic",(function(){return Ru})),n.d(e,"CSSNumericValue",(function(){return ku})),n.d(e,"BaseType",(function(){return Iu})),n.d(e,"unitTypeToBaseType",(function(){return Fu})),n.d(e,"baseTypeToString",(function(){return Uu})),n.d(e,"CSSNumericValueType",(function(){return zu})),n.d(e,"CSSRGB",(function(){return Hu})),n.d(e,"GradientPatternType",(function(){return Gu})),n.d(e,"CSSGradientValue",(function(){return Wu})),n.d(e,"CSSStyleValueType",(function(){return Ma})),n.d(e,"CSSStyleValue",(function(){return xa})),n.d(e,"CSSTransformValue",(function(){return Yu})),n.d(e,"CSSTranslate",(function(){return Xu})),n.d(e,"CSSUnitValue",(function(){return $u})),n.d(e,"parseColor",(function(){return _c})),n.d(e,"mergeColors",(function(){return Nc})),n.d(e,"parseDimension",(function(){return Ac})),n.d(e,"parseLength",(function(){return Oc})),n.d(e,"parserPercentage",(function(){return Cc})),n.d(e,"parseLengthOrPercentage",(function(){return Ic})),n.d(e,"parseAngle",(function(){return Rc})),n.d(e,"mergeDimensions",(function(){return Dc})),n.d(e,"convertAngleUnit",(function(){return Lc})),n.d(e,"parseDimensionArray",(function(){return Vc})),n.d(e,"mergeDimensionList",(function(){return jc})),n.d(e,"convertPercentUnit",(function(){return Bc})),n.d(e,"numberToString",(function(){return Fc})),n.d(e,"parseNumber",(function(){return Uc})),n.d(e,"parseNumberList",(function(){return Gc})),n.d(e,"mergeNumbers",(function(){return zc})),n.d(e,"clampedMergeNumbers",(function(){return Hc})),n.d(e,"mergeNumberLists",(function(){return qc})),n.d(e,"parsePath",(function(){return ml})),n.d(e,"mergePaths",(function(){return Tl})),n.d(e,"parsePoints",(function(){return wl})),n.d(e,"parseParam",(function(){return El})),n.d(e,"parseFilter",(function(){return kl})),n.d(e,"Opx",(function(){return xl})),n.d(e,"Odeg",(function(){return Sl})),n.d(e,"parseTransform",(function(){return Ol})),n.d(e,"mergeTransforms",(function(){return Rl})),n.d(e,"parseTransformOrigin",(function(){return Dl})),n.d(e,"CSSPropertyLengthOrPercentage",(function(){return jl})),n.d(e,"CSSPropertyLocalPosition",(function(){return Bl})),n.d(e,"CSSPropertyOpacity",(function(){return Fl})),n.d(e,"CSSPropertyColor",(function(){return Ul})),n.d(e,"CSSPropertyFilter",(function(){return Gl})),n.d(e,"CSSPropertyLineDash",(function(){return zl})),n.d(e,"CSSPropertyShadowBlur",(function(){return Hl})),n.d(e,"CSSPropertyOffsetPath",(function(){return ql})),n.d(e,"CSSPropertyOffsetDistance",(function(){return Wl})),n.d(e,"CSSPropertyAnchor",(function(){return Yl})),n.d(e,"CSSPropertyZIndex",(function(){return Xl})),n.d(e,"CSSPropertyTransform",(function(){return $l})),n.d(e,"CSSPropertyTransformOrigin",(function(){return Kl})),n.d(e,"CSSPropertyPath",(function(){return Zl})),n.d(e,"CSSPropertyPoints",(function(){return Jl})),n.d(e,"CSSPropertyClipPath",(function(){return Ql})),n.d(e,"CSSPropertyText",(function(){return th})),n.d(e,"CSSPropertyTextTransform",(function(){return eh})),n.d(e,"CSS",(function(){return ih})),n.d(e,"LayoutRegistry",(function(){return oh})),n.d(e,"BUILT_IN_PROPERTIES",(function(){return nh})),n.d(e,"StyleValueRegistry",(function(){return rh})),n.d(e,"ElementEvent",(function(){return Xo})),n.d(e,"DELEGATION_SPLITTER",(function(){return sh})),n.d(e,"EventTarget",(function(){return uh})),n.d(e,"Node",(function(){return ch})),n.d(e,"Element",(function(){return vh})),n.d(e,"Document",(function(){return Wh})),n.d(e,"FederatedEvent",(function(){return ua})),n.d(e,"FederatedMouseEvent",(function(){return Yh})),n.d(e,"FederatedPointerEvent",(function(){return Xh})),n.d(e,"FederatedWheelEvent",(function(){return $h})),n.d(e,"Animation",(function(){return bh})),n.d(e,"AnimationEvent",(function(){return gh})),n.d(e,"AnimationEffectTiming",(function(){return Eh})),n.d(e,"CustomEvent",(function(){return ah})),n.d(e,"MutationEvent",(function(){return ca})),n.d(e,"Registration",(function(){return Qh})),n.d(e,"MutationObserver",(function(){return tf})),n.d(e,"MutationRecord",(function(){return Kh})),n.d(e,"makeTiming",(function(){return xh})),n.d(e,"normalizeTimingInput",(function(){return Sh})),n.d(e,"numericTimingToObject",(function(){return _h})),n.d(e,"KeyframeEffect",(function(){return Oh})),n.d(e,"normalizeKeyframes",(function(){return Mh})),n.d(e,"compareAnimations",(function(){return Th})),n.d(e,"AnimationTimeline",(function(){return wh})),n.d(e,"CustomElementRegistry",(function(){return lf})),n.d(e,"DefaultCamera",(function(){return Of})),n.d(e,"CAMERA_TYPE",(function(){return sf})),n.d(e,"CAMERA_TRACKING_MODE",(function(){return uf})),n.d(e,"CAMERA_PROJECTION_MODE",(function(){return cf})),n.d(e,"CameraEvent",(function(){return If})),n.d(e,"Camera",(function(){return Lf})),n.d(e,"Landmark",(function(){return Af})),n.d(e,"DisplayObject",(function(){return Ih})),n.d(e,"CustomElement",(function(){return Rh})),n.d(e,"Circle",(function(){return Dh})),n.d(e,"Ellipse",(function(){return Lh})),n.d(e,"Group",(function(){return Vh})),n.d(e,"Image",(function(){return jh})),n.d(e,"Line",(function(){return Bh})),n.d(e,"Path",(function(){return Fh})),n.d(e,"Polygon",(function(){return Uh})),n.d(e,"Polyline",(function(){return Gh})),n.d(e,"Rect",(function(){return zh})),n.d(e,"Text",(function(){return Hh})),n.d(e,"HTML",(function(){return qh})),n.d(e,"Geometry",(function(){return lh})),n.d(e,"Renderable",(function(){return hh})),n.d(e,"Transform",(function(){return fh})),n.d(e,"Strategy",(function(){return Vl})),n.d(e,"Cullable",(function(){return ph})),n.d(e,"Sortable",(function(){return dh})),n.d(e,"AbstractRenderer",(function(){return Vf})),n.d(e,"CanvasEvent",(function(){return Cf})),n.d(e,"Canvas",(function(){return Yf})),n.d(e,"DisplayObjectPool",(function(){return Tt})),n.d(e,"sortByZIndex",(function(){return la})),n.d(e,"dirtifyToRoot",(function(){return ha})),n.d(e,"SceneGraphService",(function(){return pa})),n.d(e,"DefaultSceneGraphService",(function(){return da})),n.d(e,"ContextService",(function(){return ya})),n.d(e,"RenderReason",(function(){return fa})),n.d(e,"RenderingContext",(function(){return wa})),n.d(e,"RenderingPluginContribution",(function(){return hf})),n.d(e,"RenderingService",(function(){return ff})),n.d(e,"EventService",(function(){return pf})),n.d(e,"SceneGraphSelectorFactory",(function(){return ia})),n.d(e,"SceneGraphSelector",(function(){return oa})),n.d(e,"DefaultSceneGraphSelector",(function(){return sa})),n.d(e,"TextService",(function(){return bf})),n.d(e,"OffscreenCanvasCreator",(function(){return df})),n.d(e,"GeometryUpdaterFactory",(function(){return Tf})),n.d(e,"GeometryAABBUpdater",(function(){return wf})),n.d(e,"CircleUpdater",(function(){return Ef})),n.d(e,"EllipseUpdater",(function(){return Mf})),n.d(e,"RectUpdater",(function(){return kf})),n.d(e,"TextUpdater",(function(){return Pf})),n.d(e,"LineUpdater",(function(){return xf})),n.d(e,"PolylineUpdater",(function(){return Sf})),n.d(e,"PathUpdater",(function(){return _f})),n.d(e,"AABB",(function(){return Ho})),n.d(e,"BoundingSphere",(function(){return Wo})),n.d(e,"Mask",(function(){return Do})),n.d(e,"Frustum",(function(){return $o})),n.d(e,"Plane",(function(){return Yo})),n.d(e,"Ray",(function(){return ea})),n.d(e,"Point",(function(){return na})),n.d(e,"Rectangle",(function(){return ra})),n.d(e,"DCHECK",(function(){return Aa})),n.d(e,"DCHECK_EQ",(function(){return Oa})),n.d(e,"DCHECK_NE",(function(){return Ca})),n.d(e,"getAngle",(function(){return Ia})),n.d(e,"createVec3",(function(){return Ra})),n.d(e,"deg2rad",(function(){return Da})),n.d(e,"rad2deg",(function(){return La})),n.d(e,"grad2deg",(function(){return Va})),n.d(e,"deg2turn",(function(){return ja})),n.d(e,"turn2deg",(function(){return Ba})),n.d(e,"getScaling",(function(){return Fa})),n.d(e,"getTranslation",(function(){return Ua})),n.d(e,"getRotationInRadians",(function(){return Ga})),n.d(e,"getEuler",(function(){return za})),n.d(e,"fromRotationTranslationScale",(function(){return Ha})),n.d(e,"makePerspective",(function(){return qa})),n.d(e,"blend",(function(){return Wa})),n.d(e,"decompose",(function(){return Ya})),n.d(e,"convertEffectInput",(function(){return Is})),n.d(e,"formatAttribute",(function(){return js})),n.d(e,"equalizeSegments",(function(){return su})),n.d(e,"getDrawDirection",(function(){return uu})),n.d(e,"getPathArea",(function(){return lu})),n.d(e,"reverseCurve",(function(){return hu})),n.d(e,"clonePath",(function(){return fu})),n.d(e,"getRotatedCurve",(function(){return pu})),n.d(e,"convertToPath",(function(){return yu})),n.d(e,"toFontString",(function(){return gu})),n.d(e,"camelCase",(function(){return Cs})),n.d(e,"MOUSE_POINTER_ID",(function(){return mu})),n.d(e,"TOUCH_TO_POINTER",(function(){return bu})),n.d(e,"cleanExistedCanvas",(function(){return Eu})),n.d(e,"isBrowser",(function(){return Mu}));var r={};n.r(r),n.d(r,"injectable",(function(){return _})),n.d(r,"singleton",(function(){return N})),n.d(r,"transient",(function(){return A})),n.d(r,"inject",(function(){return O})),n.d(r,"named",(function(){return C})),n.d(r,"postConstruct",(function(){return f.postConstruct})),n.d(r,"optional",(function(){return f.optional})),n.d(r,"unmanaged",(function(){return f.unmanaged})),n.d(r,"decorate",(function(){return f.decorate})),n.d(r,"Container",(function(){return it})),n.d(r,"GlobalContainer",(function(){return ot})),n.d(r,"register",(function(){return at})),n.d(r,"SyringeModule",(function(){return Z})),n.d(r,"isSyringeModule",(function(){return J})),n.d(r,"Module",(function(){return Q})),n.d(r,"Provider",(function(){return F})),n.d(r,"DefaultContributionProvider",(function(){return Y})),n.d(r,"contrib",(function(){return st})),n.d(r,"Contribution",(function(){return et})),n.d(r,"Syringe",(function(){return l})),n.d(r,"Utils",(function(){return h})),n.d(r,"OptionSymbol",(function(){return I})),n.d(r,"registerSideOption",(function(){return R}));var i={};n.r(i),n.d(i,"create",(function(){return Xt})),n.d(i,"fromMat4",(function(){return $t})),n.d(i,"clone",(function(){return Kt})),n.d(i,"copy",(function(){return Zt})),n.d(i,"fromValues",(function(){return Jt})),n.d(i,"set",(function(){return Qt})),n.d(i,"identity",(function(){return te})),n.d(i,"transpose",(function(){return ee})),n.d(i,"invert",(function(){return ne})),n.d(i,"adjoint",(function(){return re})),n.d(i,"determinant",(function(){return ie})),n.d(i,"multiply",(function(){return oe})),n.d(i,"translate",(function(){return ae})),n.d(i,"rotate",(function(){return se})),n.d(i,"scale",(function(){return ue})),n.d(i,"fromTranslation",(function(){return ce})),n.d(i,"fromRotation",(function(){return le})),n.d(i,"fromScaling",(function(){return he})),n.d(i,"fromMat2d",(function(){return fe})),n.d(i,"fromQuat",(function(){return pe})),n.d(i,"normalFromMat4",(function(){return de})),n.d(i,"projection",(function(){return ye})),n.d(i,"str",(function(){return ve})),n.d(i,"frob",(function(){return ge})),n.d(i,"add",(function(){return me})),n.d(i,"subtract",(function(){return be})),n.d(i,"multiplyScalar",(function(){return Te})),n.d(i,"multiplyScalarAndAdd",(function(){return we})),n.d(i,"exactEquals",(function(){return Ee})),n.d(i,"equals",(function(){return Me})),n.d(i,"mul",(function(){return ke})),n.d(i,"sub",(function(){return Pe}));var o={};n.r(o),n.d(o,"create",(function(){return xe})),n.d(o,"clone",(function(){return Se})),n.d(o,"copy",(function(){return _e})),n.d(o,"fromValues",(function(){return Ne})),n.d(o,"set",(function(){return Ae})),n.d(o,"identity",(function(){return Oe})),n.d(o,"transpose",(function(){return Ce})),n.d(o,"invert",(function(){return Ie})),n.d(o,"adjoint",(function(){return Re})),n.d(o,"determinant",(function(){return De})),n.d(o,"multiply",(function(){return Le})),n.d(o,"translate",(function(){return Ve})),n.d(o,"scale",(function(){return je})),n.d(o,"rotate",(function(){return Be})),n.d(o,"rotateX",(function(){return Fe})),n.d(o,"rotateY",(function(){return Ue})),n.d(o,"rotateZ",(function(){return Ge})),n.d(o,"fromTranslation",(function(){return ze})),n.d(o,"fromScaling",(function(){return He})),n.d(o,"fromRotation",(function(){return qe})),n.d(o,"fromXRotation",(function(){return We})),n.d(o,"fromYRotation",(function(){return Ye})),n.d(o,"fromZRotation",(function(){return Xe})),n.d(o,"fromRotationTranslation",(function(){return $e})),n.d(o,"fromQuat2",(function(){return Ke})),n.d(o,"getTranslation",(function(){return Ze})),n.d(o,"getScaling",(function(){return Je})),n.d(o,"getRotation",(function(){return Qe})),n.d(o,"fromRotationTranslationScale",(function(){return tn})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return en})),n.d(o,"fromQuat",(function(){return nn})),n.d(o,"frustum",(function(){return rn})),n.d(o,"perspectiveNO",(function(){return on})),n.d(o,"perspective",(function(){return an})),n.d(o,"perspectiveZO",(function(){return sn})),n.d(o,"perspectiveFromFieldOfView",(function(){return un})),n.d(o,"orthoNO",(function(){return cn})),n.d(o,"ortho",(function(){return ln})),n.d(o,"orthoZO",(function(){return hn})),n.d(o,"lookAt",(function(){return fn})),n.d(o,"targetTo",(function(){return pn})),n.d(o,"str",(function(){return dn})),n.d(o,"frob",(function(){return yn})),n.d(o,"add",(function(){return vn})),n.d(o,"subtract",(function(){return gn})),n.d(o,"multiplyScalar",(function(){return mn})),n.d(o,"multiplyScalarAndAdd",(function(){return bn})),n.d(o,"exactEquals",(function(){return Tn})),n.d(o,"equals",(function(){return wn})),n.d(o,"mul",(function(){return En})),n.d(o,"sub",(function(){return Mn}));var a={};n.r(a),n.d(a,"create",(function(){return kn})),n.d(a,"clone",(function(){return Pn})),n.d(a,"length",(function(){return xn})),n.d(a,"fromValues",(function(){return Sn})),n.d(a,"copy",(function(){return _n})),n.d(a,"set",(function(){return Nn})),n.d(a,"add",(function(){return An})),n.d(a,"subtract",(function(){return On})),n.d(a,"multiply",(function(){return Cn})),n.d(a,"divide",(function(){return In})),n.d(a,"ceil",(function(){return Rn})),n.d(a,"floor",(function(){return Dn})),n.d(a,"min",(function(){return Ln})),n.d(a,"max",(function(){return Vn})),n.d(a,"round",(function(){return jn})),n.d(a,"scale",(function(){return Bn})),n.d(a,"scaleAndAdd",(function(){return Fn})),n.d(a,"distance",(function(){return Un})),n.d(a,"squaredDistance",(function(){return Gn})),n.d(a,"squaredLength",(function(){return zn})),n.d(a,"negate",(function(){return Hn})),n.d(a,"inverse",(function(){return qn})),n.d(a,"normalize",(function(){return Wn})),n.d(a,"dot",(function(){return Yn})),n.d(a,"cross",(function(){return Xn})),n.d(a,"lerp",(function(){return $n})),n.d(a,"hermite",(function(){return Kn})),n.d(a,"bezier",(function(){return Zn})),n.d(a,"random",(function(){return Jn})),n.d(a,"transformMat4",(function(){return Qn})),n.d(a,"transformMat3",(function(){return tr})),n.d(a,"transformQuat",(function(){return er})),n.d(a,"rotateX",(function(){return nr})),n.d(a,"rotateY",(function(){return rr})),n.d(a,"rotateZ",(function(){return ir})),n.d(a,"angle",(function(){return or})),n.d(a,"zero",(function(){return ar})),n.d(a,"str",(function(){return sr})),n.d(a,"exactEquals",(function(){return ur})),n.d(a,"equals",(function(){return cr})),n.d(a,"sub",(function(){return hr})),n.d(a,"mul",(function(){return fr})),n.d(a,"div",(function(){return pr})),n.d(a,"dist",(function(){return dr})),n.d(a,"sqrDist",(function(){return yr})),n.d(a,"len",(function(){return vr})),n.d(a,"sqrLen",(function(){return gr})),n.d(a,"forEach",(function(){return mr}));var s={};n.r(s),n.d(s,"create",(function(){return br})),n.d(s,"clone",(function(){return Tr})),n.d(s,"fromValues",(function(){return wr})),n.d(s,"copy",(function(){return Er})),n.d(s,"set",(function(){return Mr})),n.d(s,"add",(function(){return kr})),n.d(s,"subtract",(function(){return Pr})),n.d(s,"multiply",(function(){return xr})),n.d(s,"divide",(function(){return Sr})),n.d(s,"ceil",(function(){return _r})),n.d(s,"floor",(function(){return Nr})),n.d(s,"min",(function(){return Ar})),n.d(s,"max",(function(){return Or})),n.d(s,"round",(function(){return Cr})),n.d(s,"scale",(function(){return Ir})),n.d(s,"scaleAndAdd",(function(){return Rr})),n.d(s,"distance",(function(){return Dr})),n.d(s,"squaredDistance",(function(){return Lr})),n.d(s,"length",(function(){return Vr})),n.d(s,"squaredLength",(function(){return jr})),n.d(s,"negate",(function(){return Br})),n.d(s,"inverse",(function(){return Fr})),n.d(s,"normalize",(function(){return Ur})),n.d(s,"dot",(function(){return Gr})),n.d(s,"cross",(function(){return zr})),n.d(s,"lerp",(function(){return Hr})),n.d(s,"random",(function(){return qr})),n.d(s,"transformMat4",(function(){return Wr})),n.d(s,"transformQuat",(function(){return Yr})),n.d(s,"zero",(function(){return Xr})),n.d(s,"str",(function(){return $r})),n.d(s,"exactEquals",(function(){return Kr})),n.d(s,"equals",(function(){return Zr})),n.d(s,"sub",(function(){return Jr})),n.d(s,"mul",(function(){return Qr})),n.d(s,"div",(function(){return ti})),n.d(s,"dist",(function(){return ei})),n.d(s,"sqrDist",(function(){return ni})),n.d(s,"len",(function(){return ri})),n.d(s,"sqrLen",(function(){return ii})),n.d(s,"forEach",(function(){return oi}));var u={};n.r(u),n.d(u,"create",(function(){return ai})),n.d(u,"identity",(function(){return si})),n.d(u,"setAxisAngle",(function(){return ui})),n.d(u,"getAxisAngle",(function(){return ci})),n.d(u,"getAngle",(function(){return li})),n.d(u,"multiply",(function(){return hi})),n.d(u,"rotateX",(function(){return fi})),n.d(u,"rotateY",(function(){return pi})),n.d(u,"rotateZ",(function(){return di})),n.d(u,"calculateW",(function(){return yi})),n.d(u,"exp",(function(){return vi})),n.d(u,"ln",(function(){return gi})),n.d(u,"pow",(function(){return mi})),n.d(u,"slerp",(function(){return bi})),n.d(u,"random",(function(){return Ti})),n.d(u,"invert",(function(){return wi})),n.d(u,"conjugate",(function(){return Ei})),n.d(u,"fromMat3",(function(){return Mi})),n.d(u,"fromEuler",(function(){return ki})),n.d(u,"str",(function(){return Pi})),n.d(u,"clone",(function(){return Ci})),n.d(u,"fromValues",(function(){return Ii})),n.d(u,"copy",(function(){return Ri})),n.d(u,"set",(function(){return Di})),n.d(u,"add",(function(){return Li})),n.d(u,"mul",(function(){return Vi})),n.d(u,"scale",(function(){return ji})),n.d(u,"dot",(function(){return Bi})),n.d(u,"lerp",(function(){return Fi})),n.d(u,"length",(function(){return Ui})),n.d(u,"len",(function(){return Gi})),n.d(u,"squaredLength",(function(){return zi})),n.d(u,"sqrLen",(function(){return Hi})),n.d(u,"normalize",(function(){return qi})),n.d(u,"exactEquals",(function(){return Wi})),n.d(u,"equals",(function(){return Yi})),n.d(u,"rotationTo",(function(){return Xi})),n.d(u,"sqlerp",(function(){return $i})),n.d(u,"setAxes",(function(){return Ki}));var c={};n.r(c),n.d(c,"create",(function(){return Zi})),n.d(c,"clone",(function(){return Ji})),n.d(c,"fromValues",(function(){return Qi})),n.d(c,"copy",(function(){return to})),n.d(c,"set",(function(){return eo})),n.d(c,"add",(function(){return no})),n.d(c,"subtract",(function(){return ro})),n.d(c,"multiply",(function(){return io})),n.d(c,"divide",(function(){return oo})),n.d(c,"ceil",(function(){return ao})),n.d(c,"floor",(function(){return so})),n.d(c,"min",(function(){return uo})),n.d(c,"max",(function(){return co})),n.d(c,"round",(function(){return lo})),n.d(c,"scale",(function(){return ho})),n.d(c,"scaleAndAdd",(function(){return fo})),n.d(c,"distance",(function(){return po})),n.d(c,"squaredDistance",(function(){return yo})),n.d(c,"length",(function(){return vo})),n.d(c,"squaredLength",(function(){return go})),n.d(c,"negate",(function(){return mo})),n.d(c,"inverse",(function(){return bo})),n.d(c,"normalize",(function(){return To})),n.d(c,"dot",(function(){return wo})),n.d(c,"cross",(function(){return Eo})),n.d(c,"lerp",(function(){return Mo})),n.d(c,"random",(function(){return ko})),n.d(c,"transformMat2",(function(){return Po})),n.d(c,"transformMat2d",(function(){return xo})),n.d(c,"transformMat3",(function(){return So})),n.d(c,"transformMat4",(function(){return _o})),n.d(c,"rotate",(function(){return No})),n.d(c,"angle",(function(){return Ao})),n.d(c,"zero",(function(){return Oo})),n.d(c,"str",(function(){return Co})),n.d(c,"exactEquals",(function(){return Io})),n.d(c,"equals",(function(){return Ro})),n.d(c,"len",(function(){return Lo})),n.d(c,"sub",(function(){return Vo})),n.d(c,"mul",(function(){return jo})),n.d(c,"div",(function(){return Bo})),n.d(c,"dist",(function(){return Fo})),n.d(c,"sqrDist",(function(){return Uo})),n.d(c,"sqrLen",(function(){return Go})),n.d(c,"forEach",(function(){return zo}));n(15);var l,h,f=n(2);function p(t){return(p="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 d(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,r.key,r)}}function y(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t){return(g="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 m(t,e){return e.lifecycle===l.Lifecycle.singleton?function(t){return t.inSingletonScope()}(t):function(t){return t.inTransientScope()}(t)}function b(t,e){t.whenTargetNamed(E(e))}function T(t,e){return e.bind(M(t))}function w(t,e){if(e.isBound(M(t)))try{return e.rebind(M(t))}catch(n){return e.bind(M(t))}return e.bind(M(t))}function E(t){return h.isDefinedToken(t)?t.symbol:t}function M(t){return h.isDefinedToken(t)?t.symbol:t}!function(t){t.defineToken=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{multiple:!0};return new t.DefinedToken(e,n)};var e,n=y((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,t),this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;var r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}));t.DefinedToken=n,t.isModule=function(t){return!!t&&"object"===p(t)&&"id"in t},function(t){t.singleton="singleton",t.transient="transient"}(e=t.Lifecycle||(t.Lifecycle={})),t.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),t.DefaultOption={lifecycle:e.transient}}(l||(l={})),function(t){t.toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},t.isClass=function(t){return!(!t||"function"!=typeof t||!("prototype"in t))},t.isDefinedToken=function(t){return!!(t&&"object"===p(t)&&"symbol"in t&&"multiple"in t)},t.isInjectOption=function(t){return!(!t||"object"!==p(t)||!("token"in t))},t.isNamedToken=function(t){return!!(t&&"object"===p(t)&&"token"in t&&"named"in t)},t.isMultipleEnabled=function(e){return t.isDefinedToken(e)&&e.multiple}}(h||(h={}));var k=new f.Container;function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(f.injectable)();return function(n){Reflect.defineMetadata(l.ClassOptionSymbol,x(x({},t),{},{target:n}),n),e(n)}}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _(x(x({},t),{},{lifecycle:l.Lifecycle.singleton}))}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _(x(x({},t),{},{lifecycle:l.Lifecycle.transient}))}function O(t){return Object(f.inject)(M(t))}function C(t){return Object(f.named)(E(t))}var I=Symbol("SyringeOptionSymbol"),R=function(t,e){Reflect.defineMetadata(I,t,e)};function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){V(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j(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,r.key,r)}}var B=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=e,this.token=n,this.option=r,this.rawToken=h.isNamedToken(n)?n.token:n,this.named=h.isNamedToken(n)?n.named:void 0,this.mutiple=!!this.named||h.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var e,n,r;return e=t,r=[{key:"resolveTarget",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{try{var i=Reflect.getMetadata(I,n);i&&t.resolveOption(e,i)}catch(t){}if(h.isClass(n))if(r.useClass){var o=h.toArray(r.useClass);o.unshift(n),r.useClass=o}else r.useClass=[n];var a;try{a=Reflect.getMetadata(l.ClassOptionSymbol,n)}catch(t){}if((a=L(L({},a||{}),r)).token){var s=h.toArray(a.token);s.unshift(n),a.token=s}else a.token=[n];t.resolveOption(e,a)}catch(t){}}},{key:"resolveOption",value:function(e,n){var r,i,o,a,s,u,c,f,p=(r=L(L({},t.globalConfig),n),i=h.toArray(r.token),o=h.toArray(r.useClass),a=h.toArray(r.useDynamic),s=h.toArray(r.useFactory),u=h.toArray(r.contrib),c=r.lifecycle||l.Lifecycle.transient,f={token:i,useClass:o,lifecycle:u.length>0?l.Lifecycle.singleton:c,contrib:u,useDynamic:a,useFactory:s},"useValue"in r&&(f.useValue=r.useValue),f);(0!==p.useClass.length||0!==p.useDynamic.length||0!==p.useFactory.length||"useValue"in p)&&p.token.forEach((function(n){new t(e,n,L({},p)).resolve()}))}}],(n=[{key:"resolve",value:function(){var t,e=this,n=this.register;(t=n)&&"object"===g(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&this.option.contrib.length>0&&this.option.contrib.forEach((function(t){h.isMultipleEnabled(t)?T(t,n).toService(e.generalToken):w(t,n).toService(e.generalToken)}))))}},{key:"resolveMono",value:function(t){if("useValue"in this.option)return w(this.generalToken,t).toConstantValue(this.option.useValue);if(this.option.useDynamic.length>0){var e=this.option.useDynamic[this.option.useDynamic.length-1];return m(w(this.generalToken,t).toDynamicValue((function(t){var n=it.getContainer(t.container);return e({container:n})})),this.option)}if(this.option.useFactory.length>0){var n=this.option.useFactory[this.option.useFactory.length-1];return w(this.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))}if(this.option.useClass.length>0){var r=this.option.useClass[this.option.useClass.length-1];return m(w(this.generalToken,t).to(r),this.option)}}},{key:"resolveMutilple",value:function(t){var e=this,n=this.option.useClass.map((function(n){return m(T(e.generalToken,t).to(n),e.option)})),r=this.option.useDynamic.map((function(n){return m(T(e.generalToken,t).toDynamicValue((function(t){var e=it.getContainer(t.container);return n({container:e})})),e.option)})),i=this.option.useFactory.map((function(n){return T(e.generalToken,t).toFactory((function(t){var e=it.getContainer(t.container);return n({container:e})}))})),o="useValue"in this.option?T(this.generalToken,t).toConstantValue(this.option.useValue):void 0;this.named&&(n.forEach((function(t){return e.named&&b(t,e.named)})),r.forEach((function(t){return e.named&&b(t,e.named)})),i.forEach((function(t){return e.named&&b(t,e.named)})),o&&b(o,this.named))}}])&&j(e.prototype,n),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();B.globalConfig=l.DefaultOption;var F=l.defineToken("ContributionProvider");function U(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return G(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(t,e)}(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 G(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 z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W(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,r.key,r)}}var Y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=n,this.serviceIdentifier=e,r&&(this.option=H(H({},this.option),r))}var e,n,r;return e=t,(n=[{key:"setServices",value:function(t){for(var e=[],n=this.container;n;){if(n.isBound(this.serviceIdentifier)){var r=n.getAll(this.serviceIdentifier);e.push.apply(e,U(r))}n=t?n.parent:void 0}return e}},{key:"getContributions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=H(H({},this.option),t),n=e.cache,r=e.recursive;return n&&void 0!==this.services||(this.services=this.setServices(!!r)),this.services}}])&&W(e.prototype,n),r&&W(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function X(t,e){return{token:{token:F,named:t},useDynamic:function(n){return new Y(t,n.container,e)},lifecycle:l.Lifecycle.singleton}}function $(t,e,n){t({token:{token:F,named:e},useDynamic:function(t){return new Y(e,t.container,n)},lifecycle:l.Lifecycle.singleton})}function K(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,r.key,r)}}var Z=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,r,i){var o={bind:t,unbind:e,isBound:r,rebind:i},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?B.resolveOption(o,t):B.resolveTarget(o,t,e)};n.baseRegistry&&n.baseRegistry(a),n.optionCollection&&n.optionCollection.forEach((function(t){return a(t)}))},this.baseRegistry=e,this.inversifyModule=new f.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var e,n,r;return e=t,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(e)})),this}},{key:"contribution",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.options.push(X(e))})),this}}])&&K(e.prototype,n),r&&K(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function J(t){return t&&"inversifyModule"in t}function Q(t){return new Z(t)}function tt(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,r.key,r)}}var et,nt,rt=new Map,it=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=e||new f.Container,t.setContainer(this.container,this)}var e,n,r;return e=t,r=[{key:"setContainer",value:function(t,e){return rt.set(t.id,e)}},{key:"getContainer",value:function(e){var n=rt.get(e.id);if(!n){var r=new t(e);return t.setContainer(e,r),r}return n}},{key:"config",value:function(t){B.globalConfig=t}}],(n=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(J(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(t){J(t)&&(this.container.unload(t.inversifyModule),this.loadedModules=this.loadedModules.filter((function(e){return e!==t.id})))}},{key:"remove",value:function(t){return this.container.unbind(M(t))}},{key:"get",value:function(t){return this.container.get(M(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(M(t),E(e))}},{key:"getAll",value:function(t){return this.container.getAll(M(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(M(t),E(e))}},{key:"isBound",value:function(t){return this.container.isBound(M(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(M(t),E(e))}},{key:"createChild",value:function(){var e=new t(this.container.createChild());return e.parent=this,e}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.isInjectOption(t)?B.resolveOption(this.container,t):B.resolveTarget(this.container,t,e)}}])&&tt(e.prototype,n),r&&tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ot=new it(k),at=ot.register.bind(ot),st=function(t){return function(e,n,r){C(t)(e,n,r),O(F)(e,n,r)}};(nt=et||(et={})).Provider=F,nt.register=$;var ut=n(9),ct=function(t,e){return(ct=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)};
17
+ /*! *****************************************************************************
18
+ Copyright (c) Microsoft Corporation.
19
+
20
+ Permission to use, copy, modify, and/or distribute this software for any
21
+ purpose with or without fee is hereby granted.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
24
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
25
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
26
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
27
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
+ PERFORMANCE OF THIS SOFTWARE.
30
+ ***************************************************************************** */function lt(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}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ht=function(){return(ht=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 ft(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function pt(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function dt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function yt(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function vt(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function gt(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 t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function mt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function bt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var Tt=function(){function t(){this.pool={}}return t.prototype.getByEntity=function(t){return this.pool[t]},t.prototype.add=function(t,e){this.pool[t]=e},t.prototype.remove=function(t){delete this.pool[t]},t=pt([N()],t)}(),wt=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Et={}.toString,Mt=function(t,e){return Et.call(t)==="[object "+e+"]"},kt=function(t){return Mt(t,"Function")},Pt=function(t){return null==t},xt=function(t){return Array.isArray?Array.isArray(t):Mt(t,"Array")},St=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var _t=function(t,e){if(t)if(xt(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(St(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break};Object.keys;var Nt=function(t){return"object"==typeof t&&null!==t};var At=function(t){if(xt(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},Ot=function(t){if(xt(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},Ct=Array.prototype,It=(Ct.splice,Ct.indexOf,Array.prototype.splice,function(t){return Mt(t,"String")});Object.prototype.hasOwnProperty;var Rt=function(t,e,n){return t<e?e:t>n?n:t},Dt=function(t){return Mt(t,"Number")};Number.isInteger&&Number.isInteger;var Lt=function(t,e){return(t%e+e)%e},Vt=(Math.PI,parseInt,Math.PI/180),jt=function(t){return Vt*t},Bt=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return _t(t,(function(n,r){kt(t)&&"prototype"===r||e.push(n)})),e};var Ft=function(t){return Mt(t,"Boolean")},Ut=(Object.prototype,function(t){return void 0===t});Object.prototype.hasOwnProperty;var Gt,zt=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(It(t)||It(e))return!1;if(wt(t)||wt(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=zt(t[r],e[r]));r++);return n}if(Nt(t)||Nt(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=zt(t[i[r]],e[i[r]]));r++);return n}return!1},Ht=zt;Object.prototype.hasOwnProperty;(function(t,e){if(!kt(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s};n.cache=new Map})((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Gt||(Gt=document.createElement("canvas").getContext("2d")),Gt.font=[o,a,i,n+"px",r].join(" "),Gt.measureText(It(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],Bt(e)).join("")})),function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();var qt=1e-6,Wt="undefined"!=typeof Float32Array?Float32Array:Array,Yt=Math.random;Math.PI;function Xt(){var t=new Wt(9);return Wt!=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}function $t(t,e){return 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}function Kt(t){var e=new Wt(9);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}function Zt(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}function Jt(t,e,n,r,i,o,a,s,u){var c=new Wt(9);return c[0]=t,c[1]=e,c[2]=n,c[3]=r,c[4]=i,c[5]=o,c[6]=a,c[7]=s,c[8]=u,c}function Qt(t,e,n,r,i,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t}function te(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ee(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function ne(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,f=-l*o+s*u,p=c*o-a*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*a)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*o)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(a*n-r*o)*d,t):null}function re(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*a,t[3]=s*u-o*l,t[4]=n*l-i*u,t[5]=i*o-n*s,t[6]=o*c-a*u,t[7]=r*u-n*c,t[8]=n*a-r*o,t}function ie(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*i+a*s)+r*(u*i-o*s)}function oe(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],y=n[3],v=n[4],g=n[5],m=n[6],b=n[7],T=n[8];return t[0]=f*r+p*a+d*c,t[1]=f*i+p*s+d*l,t[2]=f*o+p*u+d*h,t[3]=y*r+v*a+g*c,t[4]=y*i+v*s+g*l,t[5]=y*o+v*u+g*h,t[6]=m*r+b*a+T*c,t[7]=m*i+b*s+T*l,t[8]=m*o+b*u+T*h,t}function ae(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+p*a+c,t[7]=f*i+p*s+l,t[8]=f*o+p*u+h,t}function se(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*a,t[1]=p*i+f*s,t[2]=p*o+f*u,t[3]=p*a-f*r,t[4]=p*s-f*i,t[5]=p*u-f*o,t[6]=c,t[7]=l,t[8]=h,t}function ue(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function ce(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function le(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function he(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function fe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function pe(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[3]=l-g,t[6]=f+v,t[1]=l+g,t[4]=1-c-d,t[7]=p-y,t[2]=f-v,t[5]=p+y,t[8]=1-c-h,t}function de(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,w=r*u-i*s,E=r*c-o*s,M=i*c-o*u,k=l*y-h*d,P=l*v-f*d,x=l*g-p*d,S=h*v-f*y,_=h*g-p*y,N=f*g-p*v,A=m*N-b*_+T*S+w*x-E*P+M*k;return A?(A=1/A,t[0]=(s*N-u*_+c*S)*A,t[1]=(u*x-a*N-c*P)*A,t[2]=(a*_-s*x+c*k)*A,t[3]=(i*_-r*N-o*S)*A,t[4]=(n*N-i*x+o*P)*A,t[5]=(r*x-n*_-o*k)*A,t[6]=(y*M-v*E+g*w)*A,t[7]=(v*T-d*M-g*b)*A,t[8]=(d*E-y*T+g*m)*A,t):null}function ye(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function ve(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function ge(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function me(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}function be(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}function Te(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}function we(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}function Ee(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]}function Me(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=e[0],f=e[1],p=e[2],d=e[3],y=e[4],v=e[5],g=e[6],m=e[7],b=e[8];return Math.abs(n-h)<=qt*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-f)<=qt*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-p)<=qt*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-d)<=qt*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-y)<=qt*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-v)<=qt*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-g)<=qt*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-m)<=qt*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-b)<=qt*Math.max(1,Math.abs(l),Math.abs(b))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ke=oe,Pe=be;function xe(){var t=new Wt(16);return Wt!=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 Se(t){var e=new Wt(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}function _e(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 Ne(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y){var v=new Wt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=s,v[8]=u,v[9]=c,v[10]=l,v[11]=h,v[12]=f,v[13]=p,v[14]=d,v[15]=y,v}function Ae(t,e,n,r,i,o,a,s,u,c,l,h,f,p,d,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=p,t[13]=d,t[14]=y,t[15]=v,t}function Oe(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 Ce(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else 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];return t}function Ie(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15],m=n*s-r*a,b=n*u-i*a,T=n*c-o*a,w=r*u-i*s,E=r*c-o*s,M=i*c-o*u,k=l*y-h*d,P=l*v-f*d,x=l*g-p*d,S=h*v-f*y,_=h*g-p*y,N=f*g-p*v,A=m*N-b*_+T*S+w*x-E*P+M*k;return A?(A=1/A,t[0]=(s*N-u*_+c*S)*A,t[1]=(i*_-r*N-o*S)*A,t[2]=(y*M-v*E+g*w)*A,t[3]=(f*E-h*M-p*w)*A,t[4]=(u*x-a*N-c*P)*A,t[5]=(n*N-i*x+o*P)*A,t[6]=(v*T-d*M-g*b)*A,t[7]=(l*M-f*T+p*b)*A,t[8]=(a*_-s*x+c*k)*A,t[9]=(r*x-n*_-o*k)*A,t[10]=(d*E-y*T+g*m)*A,t[11]=(h*T-l*E-p*m)*A,t[12]=(s*P-a*S-u*k)*A,t[13]=(n*S-r*P+i*k)*A,t[14]=(y*b-d*w-v*m)*A,t[15]=(l*w-h*b+f*m)*A,t):null}function Re(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],y=e[13],v=e[14],g=e[15];return t[0]=s*(f*g-p*v)-h*(u*g-c*v)+y*(u*p-c*f),t[1]=-(r*(f*g-p*v)-h*(i*g-o*v)+y*(i*p-o*f)),t[2]=r*(u*g-c*v)-s*(i*g-o*v)+y*(i*c-o*u),t[3]=-(r*(u*p-c*f)-s*(i*p-o*f)+h*(i*c-o*u)),t[4]=-(a*(f*g-p*v)-l*(u*g-c*v)+d*(u*p-c*f)),t[5]=n*(f*g-p*v)-l*(i*g-o*v)+d*(i*p-o*f),t[6]=-(n*(u*g-c*v)-a*(i*g-o*v)+d*(i*c-o*u)),t[7]=n*(u*p-c*f)-a*(i*p-o*f)+l*(i*c-o*u),t[8]=a*(h*g-p*y)-l*(s*g-c*y)+d*(s*p-c*h),t[9]=-(n*(h*g-p*y)-l*(r*g-o*y)+d*(r*p-o*h)),t[10]=n*(s*g-c*y)-a*(r*g-o*y)+d*(r*c-o*s),t[11]=-(n*(s*p-c*h)-a*(r*p-o*h)+l*(r*c-o*s)),t[12]=-(a*(h*v-f*y)-l*(s*v-u*y)+d*(s*f-u*h)),t[13]=n*(h*v-f*y)-l*(r*v-i*y)+d*(r*f-i*h),t[14]=-(n*(s*v-u*y)-a*(r*v-i*y)+d*(r*u-i*s)),t[15]=n*(s*f-u*h)-a*(r*f-i*h)+l*(r*u-i*s),t}function De(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(e*a-n*o)*(h*v-f*y)-(e*s-r*o)*(l*v-f*d)+(e*u-i*o)*(l*y-h*d)+(n*s-r*a)*(c*v-f*p)-(n*u-i*a)*(c*y-h*p)+(r*u-i*s)*(c*d-l*p)}function Le(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15],b=n[0],T=n[1],w=n[2],E=n[3];return t[0]=b*r+T*s+w*h+E*y,t[1]=b*i+T*u+w*f+E*v,t[2]=b*o+T*c+w*p+E*g,t[3]=b*a+T*l+w*d+E*m,b=n[4],T=n[5],w=n[6],E=n[7],t[4]=b*r+T*s+w*h+E*y,t[5]=b*i+T*u+w*f+E*v,t[6]=b*o+T*c+w*p+E*g,t[7]=b*a+T*l+w*d+E*m,b=n[8],T=n[9],w=n[10],E=n[11],t[8]=b*r+T*s+w*h+E*y,t[9]=b*i+T*u+w*f+E*v,t[10]=b*o+T*c+w*p+E*g,t[11]=b*a+T*l+w*d+E*m,b=n[12],T=n[13],w=n[14],E=n[15],t[12]=b*r+T*s+w*h+E*y,t[13]=b*i+T*u+w*f+E*v,t[14]=b*o+T*c+w*p+E*g,t[15]=b*a+T*l+w*d+E*m,t}function Ve(t,e,n){var r,i,o,a,s,u,c,l,h,f,p,d,y=n[0],v=n[1],g=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*g+e[12],t[13]=e[1]*y+e[5]*v+e[9]*g+e[13],t[14]=e[2]*y+e[6]*v+e[10]*g+e[14],t[15]=e[3]*y+e[7]*v+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=p,t[11]=d,t[12]=r*y+s*v+h*g+e[12],t[13]=i*y+u*v+f*g+e[13],t[14]=o*y+c*v+p*g+e[14],t[15]=a*y+l*v+d*g+e[15]),t}function je(t,e,n){var r=n[0],i=n[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Be(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d,y,v,g,m,b,T,w,E,M,k,P,x,S,_=r[0],N=r[1],A=r[2],O=Math.hypot(_,N,A);return O<qt?null:(_*=O=1/O,N*=O,A*=O,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],p=e[6],d=e[7],y=e[8],v=e[9],g=e[10],m=e[11],b=_*_*a+o,T=N*_*a+A*i,w=A*_*a-N*i,E=_*N*a-A*i,M=N*N*a+o,k=A*N*a+_*i,P=_*A*a+N*i,x=N*A*a-_*i,S=A*A*a+o,t[0]=s*b+h*T+y*w,t[1]=u*b+f*T+v*w,t[2]=c*b+p*T+g*w,t[3]=l*b+d*T+m*w,t[4]=s*E+h*M+y*k,t[5]=u*E+f*M+v*k,t[6]=c*E+p*M+g*k,t[7]=l*E+d*M+m*k,t[8]=s*P+h*x+y*S,t[9]=u*P+f*x+v*S,t[10]=c*P+p*x+g*S,t[11]=l*P+d*x+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function Fe(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=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]=o*i+c*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function Ue(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],l=e[9],h=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]=o*i-c*r,t[1]=a*i-l*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=a*r+l*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function Ge(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],l=e[5],h=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]=o*i+c*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t}function ze(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 He(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}function qe(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],c=Math.hypot(a,s,u);return c<qt?null:(a*=c=1/c,s*=c,u*=c,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function We(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ye(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,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]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Xe(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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 $e(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,p=i*u,d=i*c,y=o*c,v=a*s,g=a*u,m=a*c;return t[0]=1-(p+y),t[1]=h+m,t[2]=f-g,t[3]=0,t[4]=h-m,t[5]=1-(l+y),t[6]=d+v,t[7]=0,t[8]=f+g,t[9]=d-v,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ke(t,e){var n=new Wt(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+l*r+u*o-c*i)/h,n[1]=2*(u*a+l*i+c*r-s*o)/h,n[2]=2*(c*a+l*o+s*i-u*r)/h):(n[0]=2*(s*a+l*r+u*o-c*i),n[1]=2*(u*a+l*i+c*r-s*o),n[2]=2*(c*a+l*o+s*i-u*r)),$e(t,e,n),t}function Ze(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Je(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,c,l),t}function Qe(t,e){var n=new Wt(3);Je(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,u=e[2]*o,c=e[4]*r,l=e[5]*i,h=e[6]*o,f=e[8]*r,p=e[9]*i,d=e[10]*o,y=a+l+d,v=0;return y>0?(v=2*Math.sqrt(y+1),t[3]=.25*v,t[0]=(h-p)/v,t[1]=(f-u)/v,t[2]=(s-c)/v):a>l&&a>d?(v=2*Math.sqrt(1+a-l-d),t[3]=(h-p)/v,t[0]=.25*v,t[1]=(s+c)/v,t[2]=(f+u)/v):l>d?(v=2*Math.sqrt(1+l-a-d),t[3]=(f-u)/v,t[0]=(s+c)/v,t[1]=.25*v,t[2]=(h+p)/v):(v=2*Math.sqrt(1+d-a-l),t[3]=(s-c)/v,t[0]=(f+u)/v,t[1]=(h+p)/v,t[2]=.25*v),t}function tn(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,p=i*l,d=o*c,y=o*l,v=a*l,g=s*u,m=s*c,b=s*l,T=r[0],w=r[1],E=r[2];return t[0]=(1-(d+v))*T,t[1]=(f+b)*T,t[2]=(p-m)*T,t[3]=0,t[4]=(f-b)*w,t[5]=(1-(h+v))*w,t[6]=(y+g)*w,t[7]=0,t[8]=(p+m)*E,t[9]=(y-g)*E,t[10]=(1-(h+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function en(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=o*l,d=o*h,y=a*l,v=a*h,g=s*h,m=u*c,b=u*l,T=u*h,w=r[0],E=r[1],M=r[2],k=i[0],P=i[1],x=i[2],S=(1-(y+g))*w,_=(p+T)*w,N=(d-b)*w,A=(p-T)*E,O=(1-(f+g))*E,C=(v+m)*E,I=(d+b)*M,R=(v-m)*M,D=(1-(f+y))*M;return t[0]=S,t[1]=_,t[2]=N,t[3]=0,t[4]=A,t[5]=O,t[6]=C,t[7]=0,t[8]=I,t[9]=R,t[10]=D,t[11]=0,t[12]=n[0]+k-(S*k+A*P+I*x),t[13]=n[1]+P-(_*k+O*P+R*x),t[14]=n[2]+x-(N*k+C*P+D*x),t[15]=1,t}function nn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,y=o*a,v=o*s,g=o*u;return t[0]=1-h-d,t[1]=l+g,t[2]=f-v,t[3]=0,t[4]=l-g,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=f+v,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function rn(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function on(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var an=on;function sn(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,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?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function un(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.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}function cn(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,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)*u,t[14]=(a+o)*c,t[15]=1,t}var ln=cn;function hn(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*c,t[15]=1,t}function fn(t,e,n,r){var i,o,a,s,u,c,l,h,f,p,d=e[0],y=e[1],v=e[2],g=r[0],m=r[1],b=r[2],T=n[0],w=n[1],E=n[2];return Math.abs(d-T)<qt&&Math.abs(y-w)<qt&&Math.abs(v-E)<qt?Oe(t):(l=d-T,h=y-w,f=v-E,i=m*(f*=p=1/Math.hypot(l,h,f))-b*(h*=p),o=b*(l*=p)-g*f,a=g*h-m*l,(p=Math.hypot(i,o,a))?(i*=p=1/p,o*=p,a*=p):(i=0,o=0,a=0),s=h*a-f*o,u=f*i-l*a,c=l*o-h*i,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),t[0]=i,t[1]=s,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*d+o*y+a*v),t[13]=-(s*d+u*y+c*v),t[14]=-(l*d+h*y+f*v),t[15]=1,t)}function pn(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],c=r[2],l=i-n[0],h=o-n[1],f=a-n[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=u*f-c*h,y=c*l-s*f,v=s*h-u*l;return(p=d*d+y*y+v*v)>0&&(d*=p=1/Math.sqrt(p),y*=p,v*=p),t[0]=d,t[1]=y,t[2]=v,t[3]=0,t[4]=h*v-f*y,t[5]=f*d-l*v,t[6]=l*y-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function dn(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]+")"}function yn(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])}function vn(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}function gn(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}function mn(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}function bn(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}function Tn(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]}function wn(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],y=t[13],v=t[14],g=t[15],m=e[0],b=e[1],T=e[2],w=e[3],E=e[4],M=e[5],k=e[6],P=e[7],x=e[8],S=e[9],_=e[10],N=e[11],A=e[12],O=e[13],C=e[14],I=e[15];return Math.abs(n-m)<=qt*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=qt*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-T)<=qt*Math.max(1,Math.abs(i),Math.abs(T))&&Math.abs(o-w)<=qt*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=qt*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-M)<=qt*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-k)<=qt*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-P)<=qt*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(l-x)<=qt*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-S)<=qt*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=qt*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(p-N)<=qt*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(d-A)<=qt*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(y-O)<=qt*Math.max(1,Math.abs(y),Math.abs(O))&&Math.abs(v-C)<=qt*Math.max(1,Math.abs(v),Math.abs(C))&&Math.abs(g-I)<=qt*Math.max(1,Math.abs(g),Math.abs(I))}var En=Le,Mn=gn;function kn(){var t=new Wt(3);return Wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Pn(t){var e=new Wt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function xn(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Sn(t,e,n){var r=new Wt(3);return r[0]=t,r[1]=e,r[2]=n,r}function _n(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Nn(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function An(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function On(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Cn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function In(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Rn(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Dn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Ln(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function Vn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function jn(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function Bn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Fn(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}function Un(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Gn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function zn(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Hn(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function qn(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Wn(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Yn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Xn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function $n(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Kn(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t}function Zn(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,f=u*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t}function Jn(t,e){e=e||1;var n=2*Yt()*Math.PI,r=2*Yt()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function Qn(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function tr(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function er(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*s-r*c,f=r*u-i*s,p=i*f-o*h,d=o*l-r*f,y=r*h-i*l,v=2*a;return l*=v,h*=v,f*=v,p*=2,d*=2,y*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+y,t}function nr(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function rr(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function ir(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function or(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),c=u&&Yn(t,e)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function ar(t){return t[0]=0,t[1]=0,t[2]=0,t}function sr(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function ur(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function cr(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=qt*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=qt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=qt*Math.max(1,Math.abs(i),Math.abs(s))}var lr,hr=On,fr=Cn,pr=In,dr=Un,yr=Gn,vr=xn,gr=zn,mr=(lr=kn(),function(t,e,n,r,i,o){var a,s;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a<s;a+=e)lr[0]=t[a],lr[1]=t[a+1],lr[2]=t[a+2],i(lr,lr,o),t[a]=lr[0],t[a+1]=lr[1],t[a+2]=lr[2];return t});function br(){var t=new Wt(4);return Wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Tr(t){var e=new Wt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function wr(t,e,n,r){var i=new Wt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Er(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Mr(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function kr(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}function Pr(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}function xr(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}function Sr(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}function _r(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Nr(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function Ar(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function Or(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function Cr(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function Ir(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}function Rr(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}function Dr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function Lr(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function Vr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function jr(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function Br(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function Fr(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function Ur(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function Gr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function zr(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],o=n[0]*r[2]-n[2]*r[0],a=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],u=n[1]*r[3]-n[3]*r[1],c=n[2]*r[3]-n[3]*r[2],l=e[0],h=e[1],f=e[2],p=e[3];return t[0]=h*c-f*u+p*s,t[1]=-l*c+f*a-p*o,t[2]=l*u-h*a+p*i,t[3]=-l*s+h*o-f*i,t}function Hr(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function qr(t,e){var n,r,i,o,a,s;e=e||1;do{a=(n=2*Yt()-1)*n+(r=2*Yt()-1)*r}while(a>=1);do{s=(i=2*Yt()-1)*i+(o=2*Yt()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t}function Wr(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Yr(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,h=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+h*-u-f*-s,t[1]=h*c+p*-s+f*-a-l*-u,t[2]=f*c+p*-u+l*-s-h*-a,t[3]=e[3],t}function Xr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function $r(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function Kr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function Zr(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],c=e[3];return Math.abs(n-a)<=qt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=qt*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=qt*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=qt*Math.max(1,Math.abs(o),Math.abs(c))}var Jr=Pr,Qr=xr,ti=Sr,ei=Dr,ni=Lr,ri=Vr,ii=jr,oi=function(){var t=br();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function ai(){var t=new Wt(4);return Wt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function si(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function ui(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 ci(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>qt?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function li(t,e){var n=Bi(t,e);return Math.acos(2*n*n-1)}function hi(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function fi(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t}function pi(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t}function di(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t}function yi(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function vi(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function gi(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function mi(t,e,n){return gi(t,e),ji(t,t,n),vi(t,t),t}function bi(t,e,n,r){var i,o,a,s,u,c=e[0],l=e[1],h=e[2],f=e[3],p=n[0],d=n[1],y=n[2],v=n[3];return(o=c*p+l*d+h*y+f*v)<0&&(o=-o,p=-p,d=-d,y=-y,v=-v),1-o>qt?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*c+u*p,t[1]=s*l+u*d,t[2]=s*h+u*y,t[3]=s*f+u*v,t}function Ti(t){var e=Yt(),n=Yt(),r=Yt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function wi(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Ei(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Mi(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function ki(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t}function Pi(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var xi,Si,_i,Ni,Ai,Oi,Ci=Tr,Ii=wr,Ri=Er,Di=Mr,Li=kr,Vi=hi,ji=Ir,Bi=Gr,Fi=Hr,Ui=Vr,Gi=Ui,zi=jr,Hi=zi,qi=Ur,Wi=Kr,Yi=Zr,Xi=(xi=kn(),Si=Sn(1,0,0),_i=Sn(0,1,0),function(t,e,n){var r=Yn(e,n);return r<-.999999?(Xn(xi,Si,e),vr(xi)<1e-6&&Xn(xi,_i,e),Wn(xi,xi),ui(t,xi,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Xn(xi,e,n),t[0]=xi[0],t[1]=xi[1],t[2]=xi[2],t[3]=1+r,qi(t,t))}),$i=(Ni=ai(),Ai=ai(),function(t,e,n,r,i,o){return bi(Ni,e,i,o),bi(Ai,n,r,o),bi(t,Ni,Ai,2*o*(1-o)),t}),Ki=(Oi=Xt(),function(t,e,n,r){return Oi[0]=n[0],Oi[3]=n[1],Oi[6]=n[2],Oi[1]=r[0],Oi[4]=r[1],Oi[7]=r[2],Oi[2]=-e[0],Oi[5]=-e[1],Oi[8]=-e[2],qi(t,Mi(t,Oi))});function Zi(){var t=new Wt(2);return Wt!=Float32Array&&(t[0]=0,t[1]=0),t}function Ji(t){var e=new Wt(2);return e[0]=t[0],e[1]=t[1],e}function Qi(t,e){var n=new Wt(2);return n[0]=t,n[1]=e,n}function to(t,e){return t[0]=e[0],t[1]=e[1],t}function eo(t,e,n){return t[0]=e,t[1]=n,t}function no(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ro(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function io(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function oo(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function ao(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function so(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function uo(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function co(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function lo(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function ho(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function fo(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function po(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function yo(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function vo(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function go(t){var e=t[0],n=t[1];return e*e+n*n}function mo(t,e){return t[0]=-e[0],t[1]=-e[1],t}function bo(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function To(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function wo(t,e){return t[0]*e[0]+t[1]*e[1]}function Eo(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function Mo(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function ko(t,e){e=e||1;var n=2*Yt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function Po(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function xo(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function So(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function _o(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function No(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t}function Ao(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function Oo(t){return t[0]=0,t[1]=0,t}function Co(t){return"vec2("+t[0]+", "+t[1]+")"}function Io(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ro(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=qt*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=qt*Math.max(1,Math.abs(r),Math.abs(o))}var Do,Lo=vo,Vo=ro,jo=io,Bo=oo,Fo=po,Uo=yo,Go=go,zo=function(){var t=Zi();return function(e,n,r,i,o,a){var s,u;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s<u;s+=n)t[0]=e[s],t[1]=e[s+1],o(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}}(),Ho=function(){function t(t,e){this.min=a.create(),this.max=a.create(),this.update(t,e)}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){this.center=a.copy(a.create(),t||a.create()),this.halfExtents=a.copy(a.create(),e||a.fromValues(0,0,0)),this.min=a.sub(this.min,this.center,this.halfExtents),this.max=a.add(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){a.add(this.center,e,t),a.scale(this.center,this.center,.5),a.sub(this.halfExtents,e,t),a.scale(this.halfExtents,this.halfExtents,.5),a.copy(this.min,t),a.copy(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e))if(t.isEmpty(this))this.setMinMax(e.getMin(),e.getMax());else{var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,s=a[0],u=a[1],c=a[2],l=r-s,h=r+s,f=i-u,p=i+u,d=o-c,y=o+c,v=e.center,g=v[0],m=v[1],b=v[2],T=e.halfExtents,w=T[0],E=T[1],M=T[2],k=g-w,P=g+w,x=m-E,S=m+E,_=b-M,N=b+M;k<l&&(l=k),P>h&&(h=P),x<f&&(f=x),S>p&&(p=S),_<d&&(d=_),N>y&&(y=N),n[0]=.5*(l+h),n[1]=.5*(f+p),n[2]=.5*(d+y),a[0]=.5*(h-l),a[1]=.5*(p-f),a[2]=.5*(y-d),this.min[0]=l,this.min[1]=f,this.min[2]=d,this.max[0]=h,this.max[1]=p,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,s=e[0],u=e[4],c=e[8],l=e[1],h=e[5],f=e[9],p=e[2],d=e[6],y=e[10],v=Math.abs(s),g=Math.abs(u),m=Math.abs(c),b=Math.abs(l),T=Math.abs(h),w=Math.abs(f),E=Math.abs(p),M=Math.abs(d),k=Math.abs(y);a.set(n,e[12]+s*i[0]+u*i[1]+c*i[2],e[13]+l*i[0]+h*i[1]+f*i[2],e[14]+p*i[0]+d*i[1]+y*i[2]),a.set(r,v*o[0]+g*o[1]+m*o[2],b*o[0]+T*o[1]+w*o[2],E*o[0]+M*o[1]+k*o[2]),this.min=a.sub(this.min,n,r),this.max=a.add(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=a.max(a.create(),this.getMin(),e.getMin()),i=a.min(a.create(),this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.prototype.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.min):272===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):a.fromValues(this.max[0],this.max[1],this.max[2])},t.prototype.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?a.copy(a.create(),this.max):272===t.pnVertexFlag?a.fromValues(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?a.fromValues(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?a.fromValues(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?a.fromValues(this.min[0],this.min[1],this.max[2]):a.fromValues(this.min[0],this.min[1],this.min[2])},t}(),qo=a.create(),Wo=function(){function t(t,e){this.center=t||a.create(),this.radius=e||.5}return t.prototype.containsPoint=function(t){return a.sub(qo,t,this.center),a.length(qo)<this.radius*this.radius},t.prototype.intersects=function(t){a.sub(qo,t.center,this.center);var e=t.radius+this.radius;return a.length(qo)<=e*e},t}(),Yo=function(){function t(t,e){this.distance=t||0,this.normal=e||a.fromValues(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return a.dot(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/a.len(this.normal);a.scale(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&a.lerp(n,t,e,i),o},t}();!function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"}(Do||(Do={}));var Xo,$o=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Yo)}return t.prototype.extractFromVPMatrix=function(t){var e=mt(t,16),n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],y=e[12],v=e[13],g=e[14],m=e[15];a.set(this.planes[0].normal,o-n,l-s,d-h),this.planes[0].distance=m-y,a.set(this.planes[1].normal,o+n,l+s,d+h),this.planes[1].distance=m+y,a.set(this.planes[2].normal,o+r,l+u,d+f),this.planes[2].distance=m+v,a.set(this.planes[3].normal,o-r,l-u,d-f),this.planes[3].distance=m-v,a.set(this.planes[4].normal,o-i,l-c,d-p),this.planes[4].distance=m-g,a.set(this.planes[5].normal,o+i,l+c,d+p),this.planes[5].distance=m+g,this.planes.forEach((function(t){t.normalize(),t.updatePNVertexFlag()}))},t}(),Ko=a.create(),Zo=a.create(),Jo=a.create(),Qo=a.create(),ta=a.create(),ea=function(){function t(t,e){this.origin=t||a.create(),this.direction=e||a.fromValues(0,0,-1)}return t.prototype.intersectsAABB=function(t,e){return e?this.intersectAABBWithIntersection(t,e):this.intersectsAABBWithoutIntersection(t)},t.prototype.intersectsSphere=function(t,e){var n=a.sub(Ko,this.origin,t.center);a.normalize(Zo,a.copy(Zo,this.direction));var r=a.dot(n,Zo),i=a.dot(n,n)-t.radius*t.radius;if(i>0&&r>0)return null;var o=r*r-i;if(o<0)return!1;var s=Math.abs(-r-Math.sqrt(o));return e&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,s)),!0},t.prototype.intersectsPlane=function(t,e){var n=(t.distance-a.dot(t.normal,this.origin))/a.dot(t.normal,this.direction),r=n>=0;return r&&e&&a.scaleAndAdd(e,this.origin,this.direction,n),r},t.prototype.intersectsAABBWithoutIntersection=function(t){var e=Ko,n=Zo,r=Jo,i=Qo,o=ta,s=this.direction;return a.sub(e,this.origin,t.center),a.set(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])),a.mul(r,e,s),!(i[0]>t.halfExtents[0]&&r[0]>=0||i[1]>t.halfExtents[1]&&r[1]>=0||i[2]>t.halfExtents[2]&&r[2]>=0)&&(a.set(o,Math.abs(s[0]),Math.abs(s[1]),Math.abs(s[2])),a.cross(n,s,e),a.set(n,Math.abs(n[0]),Math.abs(n[1]),Math.abs(n[2])),!(n[0]>t.halfExtents[1]*o[2]+t.halfExtents[2]*o[1]||n[1]>t.halfExtents[0]*o[2]+t.halfExtents[2]*o[0]||n[2]>t.halfExtents[0]*o[1]+t.halfExtents[1]*o[0]))},t.prototype.intersectAABBWithIntersection=function(t,e){var n=a.copy(a.create(),t.getMin());a.sub(n,n,this.origin);var r=a.copy(a.create(),t.getMax());a.sub(r,r,this.origin);var i=this.direction;0===i[0]?(n[0]=n[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[0]=r[0]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[0]/=i[0],r[0]/=i[0]),0===i[1]?(n[1]=n[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[1]=r[1]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[1]/=i[1],r[1]/=i[1]),0===i[2]?(n[2]=n[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE,r[2]=r[2]<0?-Number.MAX_VALUE:Number.MAX_VALUE):(n[2]/=i[2],r[2]/=i[2]);var o=a.set(Jo,Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.min(n[2],r[2])),s=a.set(Qo,Math.max(n[0],r[0]),Math.max(n[1],r[1]),Math.max(n[2],r[2])),u=Math.min(Math.min(s[0],s[1]),s[2]),c=Math.max(Math.max(o[0],o[1]),o[2]),l=u>=c&&c>=0;return l&&(a.copy(e,this.direction),a.scaleAndAdd(e,this.origin,e,c)),l},t}(),na=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}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),ra=function(){function t(t,e,n,r){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}(),ia=l.defineToken("SceneGraphSelectorFactory"),oa=l.defineToken("SceneGraphSelector",{multiple:!1}),aa=/\[\s*name=(.*)\s*\]/,sa=function(){function t(){}return t.prototype.selectOne=function(t,e){if(t.startsWith("."))return e.find((function(e){return e.className===t.substring(1)}));if(t.startsWith("#"))return e.find((function(e){return e.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(aa);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.find((function(t){return e!==t&&t.name===r}))}return null}return e.find((function(n){return e!==n&&n.nodeName===t}))},t.prototype.selectAll=function(t,e){if(t.startsWith("."))return e.findAll((function(n){return e!==n&&n.className===t.substring(1)}));if(t.startsWith("#"))return e.findAll((function(n){return e!==n&&n.id===t.substring(1)}));if(t.startsWith("[name=")){var n=t.match(aa);if(n&&n.length>1){var r=n[1].replace(/"/g,"");return e.findAll((function(t){return e!==t&&t.name===r}))}return[]}return e.findAll((function(n){return e!==n&&n.nodeName===t}))},t.prototype.is=function(){return!0},t=pt([N({token:oa})],t)}();!function(t){t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.CHILD_INSERTED="child-inserted",t.REMOVED="removed",t.CHILD_REMOVED="child-removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.GEOMETRY_BOUNDS_CHANGED="geometry-bounds-changed",t.RENDER_ORDER_CHANGED="render-order-changed"}(Xo||(Xo={}));var ua=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new na,this.page=new na,this.canvas=new na,this.viewport=new na,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t}(),ca=function(t){function e(e,n,r,i,o,a,s,u){var c=t.call(this,null)||this;return c.relatedNode=n,c.prevValue=r,c.newValue=i,c.attrName=o,c.attrChange=a,c.prevParsedValue=s,c.newParsedValue=u,c.type=e,c}return lt(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(ua);function la(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function ha(t,e){void 0===e&&(e=!1);for(var n=t;n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),n=n.parentNode}t.emit(Xo.BOUNDS_CHANGED,{affectChildren:e})}var fa,pa=l.defineToken("SceneGraphService"),da=function(){function t(){var t,e,n,r,i,s=this;this.rotate=(t=u.create(),function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var c=u.create();u.fromEuler(c,n[0],n[1],n[2]);var l=s.getRotation(e),h=s.getRotation(e.parentNode);u.copy(t,h),u.invert(t,t),u.multiply(c,t,c),u.multiply(o.localRotation,c,l),u.normalize(o.localRotation,o.localRotation),s.dirtifyLocal(e,o)}else s.rotateLocal(e,n)}),this.rotateLocal=(e=u.create(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=a.fromValues(n,r,i));var o=t.transformable;u.fromEuler(e,n[0],n[1],n[2]),u.mul(o.localRotation,o.localRotation,e),s.dirtifyLocal(t,o)}),this.setEulerAngles=(n=u.create(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=a.fromValues(e,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){u.fromEuler(o.localRotation,e[0],e[1],e[2]);var c=s.getRotation(t.parentNode);u.copy(n,u.invert(u.create(),c)),u.mul(o.localRotation,o.localRotation,n),s.dirtifyLocal(t,o)}else s.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;a.equals(e,a.create())||(a.transformQuat(e,e,i.localRotation),a.add(i.localPosition,i.localPosition,e),s.dirtifyLocal(t,i))},this.setPosition=(r=o.create(),function(t,e){var n=t.transformable;if(e=a.fromValues(e[0],e[1],e[2]||0),!a.equals(s.getPosition(t),e)){if(n.position=e,null!==t.parentNode&&t.parentNode.transformable){var i=t.parentNode.transformable;o.copy(r,i.worldTransform),o.invert(r,r),a.transformMat4(n.localPosition,e,r)}else a.copy(n.localPosition,e);s.dirtifyLocal(t,n)}}),this.translate=(i=a.create(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r)),a.equals(e,a.create())||(a.add(i,s.getPosition(t),e),s.setPosition(t,i))}),this.setRotation=function(){var t=u.create();return function(e,n,r,i,o){var a=e.transformable;if("number"==typeof n&&(n=u.fromValues(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable){var c=s.getRotation(e.parentNode);u.copy(t,c),u.invert(t,t),u.multiply(a.localRotation,t,n),u.normalize(a.localRotation,a.localRotation),s.dirtifyLocal(e,a)}else s.setLocalRotation(e,n)}}}return t.prototype.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},t.prototype.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},t.prototype.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Pt(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var r=e.sortable;r&&(r.dirty=!0);var i=t.transformable;i&&this.dirtifyWorld(t,i),i.frozen&&this.unfreezeParentToRoot(t)},t.prototype.detach=function(t){if(t.parentNode){var e=t.transformable,n=t.parentNode.sortable;n&&(n.dirty=!0);var r=t.parentNode.childNodes.indexOf(t);r>-1&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;if(!a.equals(e,i.origin)){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=a.fromValues(e,n,r));var i=t.transformable;u.fromEuler(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.setLocalPosition=function(t,e){var n=t.transformable;e=a.fromValues(e[0],e[1],e[2]||0),a.equals(n.localPosition,e)||(a.copy(n.localPosition,e),this.dirtifyLocal(t,n))},t.prototype.scaleLocal=function(t,e){var n=t.transformable;a.multiply(n.localScale,n.localScale,a.fromValues(e[0],e[1],e[2]||1)),this.dirtifyLocal(t,n)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=a.fromValues(e[0],e[1],e[2]||n.localScale[2]);a.equals(r,n.localScale)||(a.copy(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=u.fromValues(e,n,r,i));var o=t.transformable;u.copy(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),ha(t,!0)},t.prototype.getPosition=function(t){var e=t.transformable;return o.getTranslation(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return o.getRotation(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return o.getScaling(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.localTransform},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0])},t.prototype.getTransformedGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=this.getGeometryBounds(t,e);if(Ho.isEmpty(n))return null;var r=new Ho;return r.setFromTransformedAABB(n,this.getWorldTransform(t)),r},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry,r=e?n.renderBounds:n.contentBounds||null;return r&&new Ho(r.center,r.halfExtents)||new Ho},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=this.getTransformedGeometryBounds(t,e);t.childNodes.forEach((function(t){var r=n.getBounds(t,e);r&&(i?i.add(r):(i=new Ho).update(r.center,r.halfExtents))}));var o=t.style.clipPath;if(o){var a=this.getTransformedGeometryBounds(o,!0),s=void 0;a&&(s=new Ho).setFromTransformedAABB(a,this.getWorldTransform(t)),i?s&&(i=s.intersection(i)):i=s}return i&&(e?r.renderBounds=i:r.bounds=i),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,i||new Ho},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=o.create();t.parentNode.transformable&&(e=o.invert(o.create(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!Ho.isEmpty(n)){var r=new Ho;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);Ho.isEmpty(i)||(r=new Ho).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=mt(r.getMin(),2),s=a[0],u=a[1],c=mt(r.getMax(),2),l=c[0],h=c[1];return new ra(s+((null==o?void 0:o.left)||0),u+((null==o?void 0:o.top)||0),l-s,h-u)}return new ra((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach((function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}));var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0),t.dispatchEvent(new ca(Xo.ATTR_MODIFIED,t,null,null,"modelMatrix",ca.MODIFICATION,null,null))}},t.prototype.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])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(o.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,e.localScale,e.origin),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?o.multiply(e.worldTransform,r.worldTransform,e.localTransform):o.copy(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},pt([O(ia),dt("design:type",Function)],t.prototype,"sceneGraphSelectorFactory",void 0),t=pt([N()],t)}(),ya=l.defineToken("ContextService",{multiple:!1});!function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"}(fa||(fa={}));var va,ga,ma,ba,Ta,wa=l.defineToken("RenderingContext"),Ea=n(1);!function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kExs=4]="kExs",t[t.kPixels=5]="kPixels",t[t.kCentimeters=6]="kCentimeters",t[t.kMillimeters=7]="kMillimeters",t[t.kInches=8]="kInches",t[t.kPoints=9]="kPoints",t[t.kPicas=10]="kPicas",t[t.kQuarterMillimeters=11]="kQuarterMillimeters",t[t.kViewportWidth=12]="kViewportWidth",t[t.kViewportHeight=13]="kViewportHeight",t[t.kViewportInlineSize=14]="kViewportInlineSize",t[t.kViewportBlockSize=15]="kViewportBlockSize",t[t.kViewportMin=16]="kViewportMin",t[t.kViewportMax=17]="kViewportMax",t[t.kSmallViewportWidth=18]="kSmallViewportWidth",t[t.kSmallViewportHeight=19]="kSmallViewportHeight",t[t.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",t[t.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",t[t.kSmallViewportMin=22]="kSmallViewportMin",t[t.kSmallViewportMax=23]="kSmallViewportMax",t[t.kLargeViewportWidth=24]="kLargeViewportWidth",t[t.kLargeViewportHeight=25]="kLargeViewportHeight",t[t.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",t[t.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",t[t.kLargeViewportMin=28]="kLargeViewportMin",t[t.kLargeViewportMax=29]="kLargeViewportMax",t[t.kDynamicViewportWidth=30]="kDynamicViewportWidth",t[t.kDynamicViewportHeight=31]="kDynamicViewportHeight",t[t.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",t[t.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",t[t.kDynamicViewportMin=34]="kDynamicViewportMin",t[t.kDynamicViewportMax=35]="kDynamicViewportMax",t[t.kContainerWidth=36]="kContainerWidth",t[t.kContainerHeight=37]="kContainerHeight",t[t.kContainerInlineSize=38]="kContainerInlineSize",t[t.kContainerBlockSize=39]="kContainerBlockSize",t[t.kContainerMin=40]="kContainerMin",t[t.kContainerMax=41]="kContainerMax",t[t.kRems=42]="kRems",t[t.kChs=43]="kChs",t[t.kUserUnits=44]="kUserUnits",t[t.kDegrees=45]="kDegrees",t[t.kRadians=46]="kRadians",t[t.kGradians=47]="kGradians",t[t.kTurns=48]="kTurns",t[t.kMilliseconds=49]="kMilliseconds",t[t.kSeconds=50]="kSeconds",t[t.kHertz=51]="kHertz",t[t.kKilohertz=52]="kKilohertz",t[t.kDotsPerPixel=53]="kDotsPerPixel",t[t.kDotsPerInch=54]="kDotsPerInch",t[t.kDotsPerCentimeter=55]="kDotsPerCentimeter",t[t.kFraction=56]="kFraction",t[t.kInteger=57]="kInteger",t[t.kQuirkyEms=58]="kQuirkyEms"}(va||(va={})),function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUFrequency=5]="kUFrequency",t[t.kUResolution=6]="kUResolution",t[t.kUOther=7]="kUOther"}(ga||(ga={})),function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"}(ma||(ma={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(ba||(ba={})),function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"}(Ta||(Ta={}));var Ma,ka=[{name:"em",unit_type:va.kEms},{name:"px",unit_type:va.kPixels},{name:"deg",unit_type:va.kDegrees},{name:"rad",unit_type:va.kRadians},{name:"grad",unit_type:va.kGradians},{name:"ms",unit_type:va.kMilliseconds},{name:"s",unit_type:va.kSeconds},{name:"rem",unit_type:va.kRems},{name:"turn",unit_type:va.kTurns}];!function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"}(Ma||(Ma={}));var Pa,xa=function(){function t(){}return t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?va.kNumber:"percent"===t||"%"===t?va.kPercentage:this.stringToUnitType(t):va.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case va.kNumber:case va.kInteger:return ga.kUNumber;case va.kPercentage:return ga.kUPercent;case va.kPixels:case va.kCentimeters:case va.kMillimeters:case va.kQuarterMillimeters:case va.kInches:case va.kPoints:case va.kPicas:case va.kUserUnits:return ga.kULength;case va.kMilliseconds:case va.kSeconds:return ga.kUTime;case va.kDegrees:case va.kRadians:case va.kGradians:case va.kTurns:return ga.kUAngle;case va.kHertz:case va.kKilohertz:return ga.kUFrequency;case va.kDotsPerPixel:case va.kDotsPerInch:case va.kDotsPerCentimeter:return ga.kUResolution;default:return ga.kUOther}},t.unitTypeToString=function(t){switch(t){case va.kNumber:case va.kInteger:case va.kUserUnits:return"";case va.kPercentage:return"%";case va.kEms:case va.kQuirkyEms:return"em";case va.kRems:return"rem";case va.kPixels:return"px";case va.kDegrees:return"deg";case va.kRadians:return"rad";case va.kGradians:return"grad";case va.kMilliseconds:return"ms";case va.kSeconds:return"s";case va.kTurns:return"turn"}return""},t.stringToUnitType=function(t){return ka.find((function(e){return e.name===t})).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case ga.kUNumber:return va.kNumber;case ga.kULength:return va.kPixels;case ga.kUPercent:return va.kUnknown;case ga.kUTime:return va.kSeconds;case ga.kUAngle:return va.kDegrees;case ga.kUFrequency:return va.kHertz;case ga.kUResolution:return va.kDotsPerPixel;default:return va.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case va.kPixels:case va.kUserUnits:case va.kDegrees:case va.kSeconds:case va.kHertz:break;case va.kMilliseconds:e=.001;break;case va.kCentimeters:case va.kDotsPerCentimeter:case va.kMillimeters:case va.kQuarterMillimeters:case va.kInches:case va.kDotsPerInch:case va.kPoints:case va.kPicas:break;case va.kRadians:e=180/Math.PI;break;case va.kGradians:e=.9;break;case va.kTurns:e=360;break;case va.kKilohertz:e=1e3}return e},t.isAngle=function(t){return t===va.kDegrees||t===va.kRadians||t===va.kGradians||t===va.kTurns},t.isViewportPercentageLength=function(t){return t>=va.kViewportWidth&&t<=va.kDynamicViewportMax},t.isContainerPercentageLength=function(t){return t>=va.kContainerWidth&&t<=va.kContainerMax},t.isLength=function(t){return t>=va.kEms&&t<=va.kUserUnits||t==va.kQuirkyEms},t.isRelativeUnit=function(t){return t===va.kPercentage||t===va.kEms||t===va.kExs||t===va.kRems||t===va.kChs||this.isViewportPercentageLength(t)||this.isContainerPercentageLength(t)},t.isTime=function(t){return t===va.kSeconds||t===va.kMilliseconds},t.isFrequency=function(t){return t==va.kHertz||t==va.kKilohertz},t.isResolution=function(t){return t>=va.kDotsPerPixel&&t<=va.kDotsPerCentimeter},t.isFlex=function(t){return t===va.kFraction},t.prototype.toString=function(){return this.buildCSSText(ba.kNo,Ta.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=Ma.kUnitType&&this.getType()<=Ma.kClampType},t}(),Sa=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return lt(e,t),e.prototype.getType=function(){return Ma.kColorType},e.prototype.to=function(t){return this},e}(xa),_a=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return lt(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return Ma.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(xa);function Na(t){return t===Pa.kMin||t===Pa.kMax||t===Pa.kClamp}function Aa(t){if(!t)throw new Error}function Oa(t,e){if(t!==e)throw new Error}function Ca(t,e){if(t===e)throw new Error}function Ia(t){return void 0===t?0:t>360||t<-360?t%360:t}function Ra(t,e,n){return Dt(t)?a.fromValues(t,e,n):3===t.length?a.clone(t):a.fromValues(t[0],t[1],t[2]||0)}function Da(t){return t*(Math.PI/180)}function La(t){return t*(180/Math.PI)}function Va(t){return(t%=400)<0&&(t+=400),t/400*360}function ja(t){return t/360}function Ba(t){return 360*t}function Fa(t,e){var n=e[0],r=e[1],i=e[3],o=e[4];return t[0]=Math.hypot(n,r),t[1]=Math.hypot(i,o),t}function Ua(t,e){return t[0]=e[6],t[1]=e[7],t}function Ga(t){return Math.atan2(t[1],t[4])}function za(t,e){return 16===e.length?function(t,e){var n,r,i=.5*Math.PI,s=mt(o.getScaling(a.create(),e),3),u=s[0],c=s[1],l=s[2],h=Math.asin(-e[2]/u);return h<i?h>-i?(n=Math.atan2(e[6]/c,e[10]/l),r=Math.atan2(e[1]/u,e[0]/u)):(r=0,n=-Math.atan2(e[4]/c,e[5]/c)):(r=0,n=Math.atan2(e[4]/c,e[5]/c)),t[0]=n,t[1]=h,t[2]=r,t}(t,e):function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=r*r,s=i*i,u=o*o,c=n*n+a+s+u,l=n*o-r*i;return l>.499995*c?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):l<-.499995*c?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-o*r)),t[1]=Math.atan2(2*(n*o+r*i),1-2*(s+u)),t[2]=Math.atan2(2*(n*r+i*o),1-2*(a+s))),t}(t,e)}function Ha(t,e,n,r,o){var a=Math.cos(t),s=Math.sin(t);return i.fromValues(r*a,o*s,0,-r*s,o*a,0,e,n,1)}function qa(t,e,n,r,i,o,a){var s=2*o/(n-e),u=2*o/(r-i),c=(n+e)/(n-e),l=(r+i)/(r-i),h=-(a+o)/(a-o),f=-2*a*o/(a-o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=c,t[9]=l,t[10]=h,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}function Wa(t,e,n){return t+(e-t)*n}function Ya(t){var e=t[0],n=t[3],r=t[1],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var s=Math.atan2(n,e);return[t[6],t[7],o,a,s]}!function(t){t.kAdd="+",t.kSubtract="-",t.kMultiply="*",t.kDivide="/",t.kMin="min",t.kMax="max",t.kClamp="clamp",t.kInvalid=""}(Pa||(Pa={}));var Xa="function"==typeof Float32Array,$a=function(t,e){return 1-3*e+3*t},Ka=function(t,e){return 3*e-6*t},Za=function(t){return 3*t},Ja=function(t,e,n){return(($a(e,n)*t+Ka(e,n))*t+Za(e))*t},Qa=function(t,e,n){return 3*$a(e,n)*t*t+2*Ka(e,n)*t+Za(e)},ts=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=Xa?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Ja(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var a=r+.1*((e-i[o])/(i[o+1]-i[o])),s=Qa(a,t,n);return s>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=Qa(e,n,r);if(0===o)return e;e-=(Ja(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,i){var o,a,s=0;do{(o=Ja(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:Ja(a(t),e,r)}},es=function(t){return"-"===(t=t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?t.substr(1):t},ns=function(t,e,n){return Math.min(Math.max(t,e),n)},rs=function(t){return Math.pow(t,2)},is=function(t){return Math.pow(t,3)},os=function(t){return Math.pow(t,4)},as=function(t){return Math.pow(t,5)},ss=function(t){return Math.pow(t,6)},us=function(t){return 1-Math.cos(t*Math.PI/2)},cs=function(t){return 1-Math.sqrt(1-t*t)},ls=function(t){return t*t*(3*t-2)},hs=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},fs=function(t,e){void 0===e&&(e=[]);var n=mt(e,2),r=n[0],i=void 0===r?1:r,o=n[1],a=void 0===o?.5:o,s=ns(Number(i),1,10),u=ns(Number(a),.1,2);return 0===t||1===t?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-u/(2*Math.PI)*Math.asin(1/s))*(2*Math.PI)/u)},ps=function(t,e,n){void 0===e&&(e=[]);var r=mt(e,4),i=r[0],o=void 0===i?1:i,a=r[1],s=void 0===a?100:a,u=r[2],c=void 0===u?10:u,l=r[3],h=void 0===l?0:l;o=ns(o,.1,1e3),s=ns(s,.1,1e3),c=ns(c,.1,1e3),h=ns(h,.1,1e3);var f=Math.sqrt(s/o),p=c/(2*Math.sqrt(s*o)),d=p<1?f*Math.sqrt(1-p*p):0,y=p<1?(p*f-h)/d:-h+f,v=n?n*t/1e3:t;return v=p<1?Math.exp(-v*p*f)*(1*Math.cos(d*v)+y*Math.sin(d*v)):(1+y*v)*Math.exp(-v*f),0===t||1===t?t:1-v},ds=(new Map,function(t,e){void 0===e&&(e=[]);var n=mt(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(ns(t,0,1)*i)/i}),ys=function(t,e){void 0===e&&(e=[]);var n=mt(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return ts(r,i,o,a)(t)},vs=ts(.42,0,1,1),gs=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},ms=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},bs=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},Ts={steps:ds,"step-start":function(t){return ds(t,[1,"start"])},"step-end":function(t){return ds(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":ys,ease:function(t){return ys(t,[.25,.1,.25,1])},in:vs,out:gs(vs),"in-out":ms(vs),"out-in":bs(vs),"in-quad":rs,"out-quad":gs(rs),"in-out-quad":ms(rs),"out-in-quad":bs(rs),"in-cubic":is,"out-cubic":gs(is),"in-out-cubic":ms(is),"out-in-cubic":bs(is),"in-quart":os,"out-quart":gs(os),"in-out-quart":ms(os),"out-in-quart":bs(os),"in-quint":as,"out-quint":gs(as),"in-out-quint":ms(as),"out-in-quint":bs(as),"in-expo":ss,"out-expo":gs(ss),"in-out-expo":ms(ss),"out-in-expo":bs(ss),"in-sine":us,"out-sine":gs(us),"in-out-sine":ms(us),"out-in-sine":bs(us),"in-circ":cs,"out-circ":gs(cs),"in-out-circ":ms(cs),"out-in-circ":bs(cs),"in-back":ls,"out-back":gs(ls),"in-out-back":ms(ls),"out-in-back":bs(ls),"in-bounce":hs,"out-bounce":gs(hs),"in-out-bounce":ms(hs),"out-in-bounce":bs(hs),"in-elastic":fs,"out-elastic":gs(fs),"in-out-elastic":ms(fs),"out-in-elastic":bs(fs),spring:ps,"spring-in":ps,"spring-out":gs(ps),"spring-in-out":ms(ps),"spring-out-in":bs(ps)},ws=function(t){return Ts[function(t){return es(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(t)]||Ts.linear},Es=function(t){return t};function Ms(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var ks="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Ps=new RegExp("cubic-bezier\\("+ks+","+ks+","+ks+","+ks+"\\)"),xs=/steps\(\s*(\d+)\s*\)/,Ss=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function _s(t){var e=Ps.exec(t);if(e)return ts.apply(void 0,bt([],mt(e.slice(1).map(Number)),!1));var n=xs.exec(t);if(n)return Ms(Number(n[1]),0);var r=Ss.exec(t);return r?Ms(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):ws(t)}function Ns(t){return Math.abs(function(t){var e;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(t)/(t.playbackRate||1))}function As(t,e,n){var r=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),i=function(t,e,n,r,i){switch(r){case 1:return"backwards"===e||"both"===e?0:null;case 3:return n-i;case 2:return"forwards"===e||"both"===e?t:null;case 0:return null}}(t,n.fill,e,r,n.delay);if(null===i)return null;var o="auto"===n.duration?0:n.duration,a=function(t,e,n,r,i){var o=i;return 0===t?1!==e&&(o+=n):o+=r/t,o}(o,r,n.iterations,i,n.iterationStart),s=function(t,e,n,r,i,o){var a=t===1/0?e%1:t%1;return 0!==a||2!==n||0===r||0===i&&0!==o||(a=1),a}(a,n.iterationStart,r,n.iterations,i,o),u=function(t,e,n,r){return 2===t&&e===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,s,a),c=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,u,s);return n.currentIteration=u,n.progress=c,n.easingFunction(c)}var Os={in:"ease-in",out:"ease-out","in-out":"ease-in-out","in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};Object.keys(Os);function Cs(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function Is(t,e,n){var r=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(Rs(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:_s(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(t,e),i=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,s=o+1,u=i[a].computedOffset,c=i[s].computedOffset,l=u,h=c;0===o&&(l=-1/0,0===c&&(s=a)),o===i.length-2&&(h=1/0,1===u&&(a=s)),n.push({applyFrom:l,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:Ls(r,i[a].value,i[s].value,e)})}return n.sort((function(t,e){return t.startOffset-e.startOffset})),n}(r,n);return function(t,e){if(null!==e)i.filter((function(t){return e>=t.applyFrom&&e<t.applyTo})).forEach((function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.style[n.property]=n.interpolation(o)}));else for(var n in r)Rs(n)&&(t.style[n]=null)}}function Rs(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var Ds=function(t,e,n){return function(r){return n(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r))}};function Ls(t,e,n,r){var i=e,o=n,a=ot.get(rh).getMetadata(t);if(a&&a.handler&&a.interpolable){var s=ot.get(a.handler);if(s){s.parser&&(i=s.parser(e),o=s.parser(n));var u=s.mixer(i,o,r);if(u){var c=Ds.apply(void 0,bt([],mt(u),!1));return function(t){return 0===t?e:1===t?n:c(t)}}}}return Ds(!1,!0,(function(t){return t?n:e}))}var Vs={d:{alias:"path"},cx:{alias:"x"},cy:{alias:"y"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}};function js(t,e){var n,r=Cs(t),i=Vs[r];return[r=(null==i?void 0:i.alias)||r,(null===(n=null==i?void 0:i.values)||void 0===n?void 0:n[e])||e]}function Bs(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Fs(t,e){return Math.abs(t-e)<.001}function Us(t,e){var n=Ot(t),r=Ot(e);return{x:n,y:r,width:At(t)-n,height:At(e)-r}}function Gs(t){return(t+2*Math.PI)%(2*Math.PI)}var zs={box:function(t,e,n,r){return Us([t,n],[e,r])},length:function(t,e,n,r){return Bs(t,e,n,r)},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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Bs(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Bs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];c.normalize(s,s);var u=[i-t,o-e];return Math.abs(c.dot(u,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Hs(t,e,n,r,i,o){var a=-1,s=1/0,u=[n,r],c=20;o&&o>200&&(c=o/10);for(var l=1/c,h=l/10,f=0;f<=c;f++){var p=f*l,d=[i.apply(void 0,bt([],mt(t.concat([p])),!1)),i.apply(void 0,bt([],mt(e.concat([p])),!1))];(m=Bs(u[0],u[1],d[0],d[1]))<s&&(a=p,s=m)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}s=1/0;for(f=0;f<32&&!(h<1e-4);f++){var v=a-h,g=a+h,m=(d=[i.apply(void 0,bt([],mt(t.concat([v])),!1)),i.apply(void 0,bt([],mt(e.concat([v])),!1))],Bs(u[0],u[1],d[0],d[1]));if(v>=0&&m<s)a=v,s=m;else{var b=[i.apply(void 0,bt([],mt(t.concat([g])),!1)),i.apply(void 0,bt([],mt(e.concat([g])),!1))],T=Bs(u[0],u[1],b[0],b[1]);g<=1&&T<s?(a=g,s=T):h*=.5}}return{x:i.apply(void 0,bt([],mt(t.concat([a])),!1)),y:i.apply(void 0,bt([],mt(e.concat([a])),!1))}}function qs(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Ws(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Ys(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,u=6*t-12*e+6*n,c=3*e-3*t,l=[];if(Fs(s,0))Fs(u,0)||(i=-c/u)>=0&&i<=1&&l.push(i);else{var h=u*u-4*s*c;Fs(h,0)?l.push(-u/(2*s)):h>0&&(o=(-u-(a=Math.sqrt(h)))/(2*s),(i=(-u+a)/(2*s))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function Xs(t,e,n,r,i,o,a,s,u){var c=qs(t,n,i,a,u),l=qs(e,r,o,s,u),h=zs.pointAt(t,e,n,r,u),f=zs.pointAt(n,r,i,o,u),p=zs.pointAt(i,o,a,s,u),d=zs.pointAt(h.x,h.y,f.x,f.y,u),y=zs.pointAt(f.x,f.y,p.x,p.y,u);return[[t,e,h.x,h.y,d.x,d.y,c,l],[c,l,y.x,y.y,p.x,p.y,a,s]]}function $s(t,e,n,r,i,o,a,s,u){if(0===u)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){n+=Bs(t[i],e[i],t[(i+1)%r],e[(i+1)%r])}return n/2}([t,n,i,a],[e,r,o,s]);var c=Xs(t,e,n,r,i,o,a,s,.5),l=bt(bt([],mt(c[0]),!1),[u-1],!1),h=bt(bt([],mt(c[1]),!1),[u-1],!1);return $s.apply(void 0,bt([],mt(l),!1))+$s.apply(void 0,bt([],mt(h),!1))}var Ks={extrema:Ys,box:function(t,e,n,r,i,o,a,s){for(var u=[t,a],c=[e,s],l=Ys(t,n,i,a),h=Ys(e,r,o,s),f=0;f<l.length;f++)u.push(qs(t,n,i,a,l[f]));for(f=0;f<h.length;f++)c.push(qs(e,r,o,s,h[f]));return Us(u,c)},length:function(t,e,n,r,i,o,a,s){return $s(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,u,c,l){return Hs([t,n,i,a],[e,r,o,s],u,c,qs,l)},pointDistance:function(t,e,n,r,i,o,a,s,u,c,l){var h=this.nearestPoint(t,e,n,r,i,o,a,s,u,c,l);return Bs(h.x,h.y,u,c)},interpolationAt:qs,pointAt:function(t,e,n,r,i,o,a,s,u){return{x:qs(t,n,i,a,u),y:qs(e,r,o,s,u)}},divide:function(t,e,n,r,i,o,a,s,u){return Xs(t,e,n,r,i,o,a,s,u)},tangentAngle:function(t,e,n,r,i,o,a,s,u){var c=Ws(t,n,i,a,u),l=Ws(e,r,o,s,u);return Gs(Math.atan2(l,c))}};function Zs(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Bs(r[0],r[1],i[0],i[1])}return e}var Js=function(t){return Zs(t)};var Qs,tu,eu,nu,ru;!function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html"}(Qs||(Qs={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(tu||(tu={})),function(t){t.BEVEL="bevel",t.ROUND="round",t.MITER="miter"}(eu||(eu={})),function(t){t.CAPITALIZE="capitalize",t.UPPERCASE="uppercase",t.LOWERCASE="lowercase",t.NONE="none"}(nu||(nu={})),function(t){t.START="start",t.CENTER="center",t.END="end",t.LEFT="left",t.RIGHT="right"}(ru||(ru={}));var iu=l.defineToken("CanvasConfig");function ou(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function au(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?Ks.length.apply(Ks,bt([],mt(r),!1)):0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=ou(n,r,e),s=ou(r,i,e),u=ou(i,o,e),c=ou(a,s,e),l=ou(s,u,e),h=ou(c,l,e);return[["C"].concat(a,c,h),["C"].concat(l,u,o)]}(r):[t,t]:[t],l:i}}))}function su(t,e,n){var r=au(t),i=au(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(o,a),f=[c,l],p=[h-o,h-a],d=0,y=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&p[e]&&t.l>=f[e],p[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return y[0].length===y[1].length?y:su(y[0],y[1],h)}function uu(t){return lu(t)>=0}function cu(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}function lu(t){var e=0,n=0,r=0,i=0,o=0;return t.map((function(t){var a;switch(t[0]){case"M":case"Z":return r="M"===t[0]?t[1]:r,i="M"===t[0]?t[2]:i,e=r,n=i,0;default:return o=cu.apply(0,[e,n].concat(t.slice(1))),a=mt(t.slice(-2),2),e=a[0],n=a[1],o}})).reduce((function(t,e){return t+e}),0)}function hu(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function fu(t){return t.map((function(t){return Array.isArray(t)?fu(t):Number.isNaN(+t)?t:+t}))}function pu(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map((function(r,i){return t.map((function(r,o){var a,s=i+o;return 0===o||t[s]&&"M"===t[s][0]?(a=t[s],["M"].concat(a.slice(-2))):(s>=e&&(s-=n),t[s])}))}))}(t);return o.forEach((function(o,a){t.slice(1).forEach((function(r,o){i+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(a+o)%n].slice(-2),e[o%n].slice(-2))})),r[a]=i,i=0})),o[r.indexOf(Math.min.apply(null,r))]}function du(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,s=n-t,u=n+t,c=r-e,l=r+e;return[["M",s,r],["C",s,r-a,n-o,c,n,c],["C",n+o,c,u,r-a,u,r],["C",u,r+a,n+o,l,n,l],["C",n-o,l,s,r+a,s,r],["Z"]]}function yu(t){var e=t.getLocalTransform(),n=(t.style.anchor,[]);switch(t.nodeName){case Qs.LINE:var r=t.parsedStyle,i=r.x1,o=r.y1,s=r.x2,u=r.y2;n=function(t,e,n,r){return[["M",t,e],["L",n,r]]}(i.value,o.value,s.value,u.value);break;case Qs.CIRCLE:var c=t.parsedStyle,l=c.r,h=c.x,f=c.y;n=du(l.value,l.value,h.value,f.value);break;case Qs.ELLIPSE:var p=t.parsedStyle,d=p.rx,y=p.ry,v=p.x,g=p.y;n=du(d.value,y.value,v.value,g.value);break;case Qs.POLYLINE:case Qs.POLYGON:n=function(t){return t.map((function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t.parsedStyle.points.points);break;case Qs.RECT:var m=t.parsedStyle,b=m.width,T=m.height,w=m.x,E=m.y,M=m.radius;n=function(t,e,n,r,i){return i?[["M",n,i+r],["A",i,i,0,0,1,i+n,r],["L",t-i+n,r],["A",i,i,0,0,1,t+n,i+r],["L",t+n,e-i+r],["A",i,i,0,0,1,t-i+n,e+r],["L",i+n,e+r],["A",i,i,0,0,1,n,e-i+r],["Z"]]:[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(b.value,T.value,w.value,E.value,(null==M?void 0:M.value)||0);break;case Qs.PATH:n=t.parsedStyle.path.curve}if(n.length)return function(t,e,n,r){var i=r.defX,o=void 0===i?0:i,s=r.defY,u=void 0===s?0:s;return t.reduce((function(t,n){var r="";if("M"===n[0]||"L"===n[0]){var i=a.fromValues(n[1]-o,n[2]-u,0);a.transformMat4(i,i,e),r="".concat(n[0]).concat(i[0],",").concat(i[1])}else if("Z"===n[0])r=n[0];else if("C"===n[0]){var s=a.fromValues(n[1]-o,n[2]-u,0),c=a.fromValues(n[3]-o,n[4]-u,0),l=a.fromValues(n[5]-o,n[6]-u,0);a.transformMat4(s,s,e),a.transformMat4(c,c,e),a.transformMat4(l,l,e),r="".concat(n[0]).concat(s[0],",").concat(s[1],",").concat(c[0],",").concat(c[1],",").concat(l[0],",").concat(l[1])}else if("A"===n[0]){var h=a.fromValues(n[6]-o,n[7]-u,0);a.transformMat4(h,h,e),r="".concat(n[0]).concat(n[1],",").concat(n[2],",").concat(n[3],",").concat(n[4],",").concat(n[5],",").concat(h[0],",").concat(h[1])}return t+r}),"")}(n,e,0,t.parsedStyle)}var vu=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function gu(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=Dt(e)?"".concat(e,"px"):e.toString(),s=It(n)?n.split(","):[n.value],u=s.length-1;u>=0;u--){var c=s[u].trim();!/([\"\'])[^\'\"]+\1/.test(c)&&vu.indexOf(c)<0&&(c='"'.concat(c,'"')),s[u]=c}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(s.join(","))}var mu=1,bu={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Tu={},wu=0;function Eu(t,e){if(t){var n="string"==typeof t?t:t.id||wu++;Tu[n]&&Tu[n].destroy(),Tu[n]=e}}var Mu="undefined"!=typeof window&&void 0!==window.document,ku=function(t){function e(e){var n=t.call(this)||this;return n.type_=e,n}return lt(e,t),e.fromNumberish=function(t){return"number"==typeof t?new $u(t,va.kNumber):t},e.fromPercentish=function(t){return"number"==typeof t?new $u(100*t,va.kPercentage):t},e.prototype.getType=function(){return Ma.kUnknownType},e.prototype.equals=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Pu(e);return r.every((function(e){return t.equals(e)}))},e.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);xu(Ma.kSumType,n,this);var r=_u(n,Pa.kAdd);return r||Bu.create(n)},e.prototype.sub=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);n=n.map((function(t){return t.negate()})),xu(Ma.kSumType,n,this);var r=_u(n,Pa.kAdd);return r||Bu.create(n)},e.prototype.mul=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);xu(Ma.kProductType,n,this);var r=Nu(n);return r||ju.create(n)},e.prototype.div=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);n=n.map((function(t){return t.invert()})),xu(Ma.kProductType,n,this);var r=Nu(n);return r||ju.create(n)},e.prototype.min=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);xu(Ma.kMinType,n,this);var r=_u(n,Pa.kMin);return r||Lu.create(n)},e.prototype.max=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pu(t);xu(Ma.kMaxType,n,this);var r=_u(n,Pa.kMax);return r||Du.create(n)},e.prototype.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;var n,r=Su(e[0]);return r?(n="string"==typeof t?$u.unitFromName(t):t,r.convertTo(n)):null},e.prototype.toSum=function(){for(var t,n,r,i,o,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];try{for(var c=gt(s),l=c.next();!l.done;l=c.next()){var h=l.value;if(!e.isValidUnit(e.unitFromName(h)))return null}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}var f=this.sumValue();if(!f.length)return null;var p=[];try{for(var d=gt(f),y=d.next();!y.done;y=d.next()){var v=y.value,g=Su(v);if(!g)return null;p.push(g)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(0===s.length){p.sort((function(t,e){return t.unit-e.unit}));var m=Bu.create(p);return Aa(!!m),m}var b=[],T=function(t){var n=e.unitFromName(t);Aa(e.isValidUnit(n));var r=p.reduce((function(t,e,r){if(e){var i=e.convertTo(n);i&&(t+=i.value,p[r]=null)}return t}),0);b.push(new $u(r,n))};try{for(var w=gt(s),E=w.next();!E.done;E=w.next()){T(h=E.value)}}catch(t){o={error:t}}finally{try{E&&!E.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}if(p.some((function(t){return!!t})))throw new Error("There were leftover terms that were not converted");return Bu.create(b)},e.prototype.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(Iu.kLength);return e&&(t.length=e),(e=this.type_.exponent(Iu.kAngle))&&(t.angle=e),(e=this.type_.exponent(Iu.kTime))&&(t.time=e),(e=this.type_.exponent(Iu.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(Iu.kResolution))&&(t.resolution=e),(e=this.type_.exponent(Iu.kFlex))&&(t.flex=e),(e=this.type_.exponent(Iu.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=Uu(this.type_.percentHint)),t},e.isValidUnit=function(t){return t!==va.kUserUnits&&!!(t===va.kNumber||t==va.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t)||this.isFrequency(t)||this.isResolution(t)||this.isFlex(t))},e.prototype.negate=function(){return Vu.create(this)},e.prototype.invert=function(){return Ou.create(this)},e}(xa);function Pu(t){return t.map(ku.fromNumberish)}function xu(t,e,n){Aa(!!n),n.getType()===t?e.unshift.apply(e,bt([],mt(n.numericValues()),!1)):e.unshift(n)}function Su(t){return 0===Object.keys(t.units).length?new $u(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new $u(t.value,Number(Object.keys(t.units)[0])):null}function _u(t,e){Aa(!!t.length);var n=t[0]instanceof $u?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof $u?t[i]:null;if(!o||o.unit!==n.unit)return null;e===Pa.kAdd?r+=o.value:e===Pa.kMax?r=Math.max(r,o.value):e===Pa.kMin&&(r=Math.min(r,o.value))}return new $u(r,n.unit)}function Nu(t){Aa(!!t.length);for(var e=va.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof $u?t[r]:null;if(!i)return null;if(i.unit!==va.kNumber){if(e!==va.kNumber)return null;e=i.unit}n*=i.value}return new $u(n,e)}var Au=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.isUnitValue=function(){return!1},e}(ku),Ou=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="invert",r}return lt(e,t),e.create=function(t){return new e(t,zu.negateExponents(t.type_))},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return Ma.kInvertType},e.prototype.equals=function(t){if(t.getType()!==Ma.kInvertType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length||1!==t.length||0===t[0].value?null:(Object.keys(t[0].units).forEach((function(e){t[0].units[e]*=-1})),t[0].value=1/t[0].value,t)},e.prototype.buildCSSText=function(t,e,n){return e==Ta.kNo&&(n+=t===ba.kYes?"(":"calc("),n+="1 / ",n=this.value.buildCSSText(ba.kYes,Ta.kNo,n),e===Ta.kNo&&(n+=")"),n},e}(Au);function Cu(t,e,n){for(var r=t[0].type_,i=1;i<t.length;i++)r=e(r,t[i].type_,!1);return r}var Iu,Ru=function(t){function e(e,n){var r=t.call(this,n)||this;return r.values=e,r}return lt(e,t),e.prototype.numericValues=function(){return this.values},e.prototype.equals=function(t){return this.getType()===t.getType()&&this.values.every((function(e,n){return e.equals(t.values[n])}))},e}(Au),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="max",e}return lt(e,t),e.create=function(t){return new e(t,Cu(t,zu.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return Ma.kMaxType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=gt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="max(";var o=!0;try{for(var a=gt(this.numericValues()),s=a.next();!s.done;s=a.next()){var u=s.value;o||(n+=", "),o=!1,n=u.buildCSSText(ba.kYes,Ta.kYes,n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ru),Lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="min",e}return lt(e,t),e.create=function(t){return new e(t,Cu(t,zu.add))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return Ma.kMinType},e.prototype.sumValue=function(){var t,e,n=this.numericValues()[0].sumValue();if(!n.length)return null;try{for(var r=gt(this.numericValues()),i=r.next();!i.done;i=r.next()){var o=i.value.sumValue();if(!o.length||JSON.stringify(o[0].units)!==JSON.stringify(n[0].units))return null;o[0].value<n[0].value&&(n=o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},e.prototype.buildCSSText=function(t,e,n){var r,i;n+="min(";var o=!0;try{for(var a=gt(this.numericValues()),s=a.next();!s.done;s=a.next()){var u=s.value;o||(n+=", "),o=!1,n=u.buildCSSText(ba.kYes,Ta.kYes,n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n+=")"},e}(Ru),Vu=function(t){function e(e,n){var r=t.call(this,n)||this;return r.value=e,r.operator="negate",r}return lt(e,t),e.create=function(t){return new e(t,t.type_)},e.prototype.clone=function(){return new e(this.value,this.type_)},e.prototype.getType=function(){return Ma.kNegateType},e.prototype.equals=function(t){if(t.getType()!==Ma.kNegateType)return!1;var e=t;return this.value.equals(e.value)},e.prototype.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach((function(t){t.value*=-1})),t)},e.prototype.buildCSSText=function(t,e,n){return e==Ta.kNo&&(n+=t===ba.kYes?"(":"calc("),n+="-",n=this.value.buildCSSText(ba.kYes,Ta.kNo,n),e===Ta.kNo&&(n+=")"),n},e}(Au),ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="product",e}return lt(e,t),e.create=function(t){return new e(t,Cu(t,zu.multiply))},e.multiplyUnitMaps=function(t,e){return Object.keys(e).forEach((function(n){Ca(e[n].value,0);var r=n in t?t[n].value:0;r+e[n].value===0?delete t[n]:t[n]=r+e[n].value})),t},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return Ma.kProductType},e.prototype.sumValue=function(){var t=[{value:1,units:{}}];return this.numericValues().forEach((function(n){var r=n.sumValue();if(!r.length)return null;var i=[];t.forEach((function(t){r.forEach((function(n){i.push({value:t.value*n.value,units:e.multiplyUnitMaps(t.units,n.units)})}))})),t=i})),t},e.prototype.buildCSSText=function(t,e,n){e==Ta.kNo&&(n+=t===ba.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ba.kYes,Ta.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===Ma.kInvertType?(n+=" / ",n=o.value.buildCSSText(ba.kYes,Ta.kNo,n)):(n+=" * ",n=o.buildCSSText(ba.kYes,Ta.kNo,n))}return e===Ta.kNo&&(n+=")"),n},e}(Ru),Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operator="sum",e}return lt(e,t),e.create=function(t){return new e(t,Cu(t,zu.add))},e.numericTypeFromUnitMap=function(t){var e=new zu;return Object.keys(t).forEach((function(n){var r=t[n];e=zu.multiply(e,new zu(Number(n),r),!1),Aa(!0)})),e},e.canCreateNumericTypeFromSumValue=function(t){var e=this;Aa(!!t.length);var n=this.numericTypeFromUnitMap(t[0].units);return t.every((function(t){return zu.add(n,e.numericTypeFromUnitMap(t.units),!1),!0}))},e.prototype.clone=function(){return new e(this.values,this.type_)},e.prototype.getType=function(){return Ma.kSumType},e.prototype.sumValue=function(){var t=[];return this.numericValues().forEach((function(e){var n=e.sumValue();if(!n.length)return null;n.forEach((function(e){var n=t.findIndex((function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)}));-1===n?t.push(ht({},e)):t[n].value+=e.value}))})),e.canCreateNumericTypeFromSumValue(t)?t:null},e.prototype.buildCSSText=function(t,e,n){e==Ta.kNo&&(n+=t===ba.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ba.kYes,Ta.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];o.getType()===Ma.kNegateType?(n+=" - ",n=o.value.buildCSSText(ba.kYes,Ta.kNo,n)):(n+=" + ",n=o.buildCSSText(ba.kYes,Ta.kNo,n))}return e===Ta.kNo&&(n+=")"),n},e}(Ru);function Fu(t){switch(Ca(t,va.kNumber),t){case va.kEms:case va.kExs:case va.kPixels:case va.kCentimeters:case va.kMillimeters:case va.kQuarterMillimeters:case va.kInches:case va.kPoints:case va.kPicas:case va.kUserUnits:case va.kViewportWidth:case va.kViewportHeight:case va.kViewportInlineSize:case va.kViewportBlockSize:case va.kViewportMin:case va.kViewportMax:case va.kSmallViewportWidth:case va.kSmallViewportHeight:case va.kSmallViewportInlineSize:case va.kSmallViewportBlockSize:case va.kSmallViewportMin:case va.kSmallViewportMax:case va.kLargeViewportWidth:case va.kLargeViewportHeight:case va.kLargeViewportInlineSize:case va.kLargeViewportBlockSize:case va.kLargeViewportMin:case va.kLargeViewportMax:case va.kDynamicViewportWidth:case va.kDynamicViewportHeight:case va.kDynamicViewportInlineSize:case va.kDynamicViewportBlockSize:case va.kDynamicViewportMin:case va.kDynamicViewportMax:case va.kContainerWidth:case va.kContainerHeight:case va.kContainerInlineSize:case va.kContainerBlockSize:case va.kContainerMin:case va.kContainerMax:case va.kRems:case va.kChs:return Iu.kLength;case va.kMilliseconds:case va.kSeconds:return Iu.kTime;case va.kDegrees:case va.kRadians:case va.kGradians:case va.kTurns:return Iu.kAngle;case va.kHertz:case va.kKilohertz:return Iu.kFrequency;case va.kDotsPerPixel:case va.kDotsPerInch:case va.kDotsPerCentimeter:return Iu.kResolution;case va.kFraction:return Iu.kFlex;case va.kPercentage:return Iu.kPercent;default:return Iu.kLength}}function Uu(t){switch(t){case Iu.kLength:return"length";case Iu.kAngle:return"angle";case Iu.kTime:return"time";case Iu.kFrequency:return"frequency";case Iu.kResolution:return"resolution";case Iu.kFlex:return"flex";case Iu.kPercent:return"percent"}return""}!function(t){t[t.kLength=0]="kLength",t[t.kAngle=1]="kAngle",t[t.kTime=2]="kTime",t[t.kFrequency=3]="kFrequency",t[t.kResolution=4]="kResolution",t[t.kFlex=5]="kFlex",t[t.kPercent=6]="kPercent",t[t.kNumBaseTypes=7]="kNumBaseTypes"}(Iu||(Iu={}));var Gu,zu=function(){function t(t,e){void 0===t&&(t=va.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=Iu.kPercent,this.hasPercentHint=!1,this.exponents=new Array(Iu.kNumBaseTypes).fill(0),t!==va.kNumber&&this.setExponent(Fu(t),e)}return t.prototype.applyPercentHint=function(t){Ca(t,Iu.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(Iu.kPercent)),this.setExponent(Iu.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},t.prototype.hasNonZeroEntries=function(){return this.numNonZeroEntries>0},t.prototype.isOnlyNonZeroEntry=function(t,e){return Ca(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},t.prototype.exponent=function(t){return this.exponents[t]},t.prototype.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach((function(t){return-1*t})),t},t.prototype.matchesBaseType=function(t){return Ca(t,Iu.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},t.prototype.matchesPercentage=function(){return this.isOnlyNonZeroEntry(Iu.kPercent,1)},t.prototype.matchesBaseTypePercentage=function(t){return Ca(t,Iu.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(Iu.kPercent,1)},t.prototype.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},t.prototype.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(Iu.kPercent,1)},t.add=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint),Oa(t.percentHint,e.percentHint);for(var r=0;r<Iu.kNumBaseTypes;++r){var i=r;if(t.exponents[r]!==e.exponents[r]&&(i!==Iu.kPercent&&(t.applyPercentHint(i),e.applyPercentHint(i)),t.exponents[r]!==e.exponents[r]))return!0,t}return!1,t},t.multiply=function(t,e,n){if(t.hasPercentHint&&e.hasPercentHint&&t.percentHint!=e.percentHint)return!0,t;t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<Iu.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}return!1,t},t}(),Hu=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return lt(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(Sa);!function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient",t[t.Pattern=3]="Pattern"}(Gu||(Gu={}));var qu,Wu=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return lt(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){var r="";return this.type===Gu.LinearGradient?r="linear-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Gu.RadialGradient?r="radial-gradient(".concat(this.value.steps.map((function(t){return t.join(",")})).join(","),")"):this.type===Gu.Pattern&&(r="url(".concat(this.value.src,")")),n+r},e.prototype.getType=function(){return Ma.kColorType},e}(xa),Yu=function(t){function e(e){var n=t.call(this)||this;return n.transforms=e,n.is2D=e.every((function(t){return t.is2D})),n.length=e.length,n}return lt(e,t),e.prototype.clone=function(){return new e(this.transforms)},e.prototype.getType=function(){return Ma.kTransformType},e.prototype.buildCSSText=function(t,e,n){return n+""},e.prototype.toMatrix=function(){},e}(xa);!function(t){t[t.kMatrixType=0]="kMatrixType",t[t.kPerspectiveType=1]="kPerspectiveType",t[t.kRotationType=2]="kRotationType",t[t.kScaleType=3]="kScaleType",t[t.kSkewType=4]="kSkewType",t[t.kSkewXType=5]="kSkewXType",t[t.kSkewYType=6]="kSkewYType",t[t.kTranslationType=7]="kTranslationType"}(qu||(qu={}));var Xu=function(t){function e(e,n,r,i){var o=t.call(this,i)||this;return o.x=e,o.y=n,o.z=r,o}return lt(e,t),e.prototype.toMatrix=function(){return null},e}((function(t){this.is2D=t})),$u=function(t){function e(n,r){void 0===r&&(r=va.kNumber);var i,o=this;return i="string"==typeof r?e.unitFromName(r):r,Aa(e.isValidUnit(i)),(o=t.call(this,new zu(i))||this).unit=i,o.value=n,o}return lt(e,t),e.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},e.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===va.kUnknown?t:e},e.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(Aa(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},e.formatNumber=function(t,e){return void 0===e&&(e=""),t+e},e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=e.toCanonicalUnit(this.unit);if(n!==e.toCanonicalUnit(t)||n===va.kUnknown)return null;var r=xa.conversionToCanonicalUnitsScaleFactor(this.unit)/xa.conversionToCanonicalUnitsScaleFactor(t);return new e(this.value*r,t)},e.prototype.equals=function(t){var e=t;return this.value===e.value&&this.unit===e.unit},e.prototype.getType=function(){return Ma.kUnitType},e.prototype.sumValue=function(){var t=[],n={};return this.unit!==va.kNumber&&(n[e.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*xa.conversionToCanonicalUnitsScaleFactor(this.unit),units:n}),t},e.prototype.negate=function(){return new e(-this.value,this.unit)},e.prototype.invert=function(){return this.unit===va.kNumber?0===this.value?null:new e(1/this.value,this.unit):Ou.create(this)},e.prototype.buildCSSText=function(t,n,r){var i;switch(this.unit){case va.kUnknown:break;case va.kInteger:i=Number(this.value).toFixed(0);break;case va.kNumber:case va.kPercentage:case va.kEms:case va.kQuirkyEms:case va.kExs:case va.kRems:case va.kChs:case va.kPixels:case va.kCentimeters:case va.kDotsPerPixel:case va.kDotsPerInch:case va.kDotsPerCentimeter:case va.kMillimeters:case va.kQuarterMillimeters:case va.kInches:case va.kPoints:case va.kPicas:case va.kUserUnits:case va.kDegrees:case va.kRadians:case va.kGradians:case va.kMilliseconds:case va.kSeconds:case va.kHertz:case va.kKilohertz:case va.kTurns:case va.kFraction:case va.kViewportWidth:case va.kViewportHeight:case va.kViewportInlineSize:case va.kViewportBlockSize:case va.kViewportMin:case va.kViewportMax:case va.kSmallViewportWidth:case va.kSmallViewportHeight:case va.kSmallViewportInlineSize:case va.kSmallViewportBlockSize:case va.kSmallViewportMin:case va.kSmallViewportMax:case va.kLargeViewportWidth:case va.kLargeViewportHeight:case va.kLargeViewportInlineSize:case va.kLargeViewportBlockSize:case va.kLargeViewportMin:case va.kLargeViewportMax:case va.kDynamicViewportWidth:case va.kDynamicViewportHeight:case va.kDynamicViewportInlineSize:case va.kDynamicViewportBlockSize:case va.kDynamicViewportMin:case va.kDynamicViewportMax:case va.kContainerWidth:case va.kContainerHeight:case va.kContainerInlineSize:case va.kContainerBlockSize:case va.kContainerMin:case va.kContainerMax:var o=this.value,a=e.unitTypeToString(this.unit);if(o<-999999||o>999999){var s=e.unitTypeToString(this.unit);i=!Number.isFinite(o)||Number.isNaN(o)?e.formatInfinityOrNaN(o,s):e.formatNumber(o,s)}else i="".concat(o).concat(a)}return r+=i},e}(ku),Ku=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Zu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ju(){}var Qu="\\s*([+-]?\\d+)\\s*",tc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ec="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nc=/^#([0-9a-f]{3,8})$/,rc=new RegExp("^rgb\\("+[Qu,Qu,Qu]+"\\)$"),ic=new RegExp("^rgb\\("+[ec,ec,ec]+"\\)$"),oc=new RegExp("^rgba\\("+[Qu,Qu,Qu,tc]+"\\)$"),ac=new RegExp("^rgba\\("+[ec,ec,ec,tc]+"\\)$"),sc=new RegExp("^hsl\\("+[tc,ec,ec]+"\\)$"),uc=new RegExp("^hsla\\("+[tc,ec,ec,tc]+"\\)$"),cc={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 lc(){return this.rgb().formatHex()}function hc(){return this.rgb().formatRgb()}function fc(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=nc.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pc(e):3===n?new vc(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?dc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?dc(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=rc.exec(t))?new vc(e[1],e[2],e[3],1):(e=ic.exec(t))?new vc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=oc.exec(t))?dc(e[1],e[2],e[3],e[4]):(e=ac.exec(t))?dc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=sc.exec(t))?Tc(e[1],e[2]/100,e[3]/100,1):(e=uc.exec(t))?Tc(e[1],e[2]/100,e[3]/100,e[4]):cc.hasOwnProperty(t)?pc(cc[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function pc(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function dc(t,e,n,r){return r<=0&&(t=e=n=NaN),new vc(t,e,n,r)}function yc(t){return t instanceof Ju||(t=fc(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}function vc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function gc(){return"#"+bc(this.r)+bc(this.g)+bc(this.b)}function mc(){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 bc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Tc(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ec(t,e,n,r)}function wc(t){if(t instanceof Ec)return new Ec(t.h,t.s,t.l,t.opacity);if(t instanceof Ju||(t=fc(t)),!t)return new Ec;if(t instanceof Ec)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ec(a,s,u,t.opacity)}function Ec(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ku(Ju,fc,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:lc,formatHex:lc,formatHsl:function(){return wc(this).formatHsl()},formatRgb:hc,toString:hc}),Ku(vc,(function(t,e,n,r){return 1===arguments.length?yc(t):new vc(t,e,n,null==r?1:r)}),Zu(Ju,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(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:gc,formatHex:gc,formatRgb:mc,toString:mc})),Ku(Ec,(function(t,e,n,r){return 1===arguments.length?wc(t):new Ec(t,e,n,null==r?1:r)}),Zu(Ju,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ec(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ec(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,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new vc(Mc(t>=240?t-240:t+120,i,r),Mc(t,i,r),Mc(t<120?t+240:t-120,i,r),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 kc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Pc=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,xc=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Sc=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function _c(t){if(void 0===t&&(t=""),"transparent"===t)return new Hu(0,0,0,0);"currentColor"===t&&(t="black");var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=function(t){var e,n=kc.exec(t);if(n){var r=parseFloat(n[1])%360*(Math.PI/180),i=(null===(e=n[2].match(Sc))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[],o=mt([1,1],2),a=o[0],s=o[1],u=mt([0,0],2),c=u[0],l=u[1],h=void 0,f=void 0;r>=0&&r<.5*Math.PI?(h={x:c,y:l},f={x:a,y:s}):.5*Math.PI<=r&&r<Math.PI?(h={x:a,y:l},f={x:c,y:s}):Math.PI<=r&&r<1.5*Math.PI?(h={x:a,y:s},f={x:c,y:l}):(h={x:c,y:s},f={x:a,y:l});var p=Math.tan(r),d=p*p,y=(f.x-h.x+p*(f.y-h.y))/(d+1)+h.x,v=p*(f.x-h.x+p*(f.y-h.y))/(d+1)+h.y;return{x0:h.x,y0:h.y,x1:y,y1:v,steps:i,hash:t}}return null}(t);if(n)return new Wu(Gu.LinearGradient,n)}else if("r"===e){var r=function(t){var e,n=Pc.exec(t);if(n){var r=parseFloat(n[1]),i=parseFloat(n[2]),o=parseFloat(n[3]),a=(null===(e=n[4].match(Sc))||void 0===e?void 0:e.map((function(t){return t.split(":")})))||[];if(0===o){var s=n[4].match(Sc);return s[s.length-1].split(":")[1]}return{x0:r,y0:i,r0:0,x1:.5,y1:.5,r1:o,steps:a,hash:t}}return null}(t);if(r){if(!It(r))return new Wu(Gu.RadialGradient,r);t=r}}else if("p"===e){var i=function(t){var e=xc.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{src:r,repetition:n,hash:t}}return null}(t);if(i)return new Wu(Gu.Pattern,i)}var o=fc(t),a=[0,0,0,0];return null!==o&&(a[0]=o.r||0,a[1]=o.g||0,a[2]=o.b||0,a[3]=o.opacity),new(Hu.bind.apply(Hu,bt([void 0],mt(a),!1)))}function Nc(t,e){if(t instanceof Hu&&e instanceof Hu)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(Rt(e[n],0,255));return e[3]=Rt(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Ac(t,e){if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))&&"px".search(t)>=0)return new $u(Number(e),"px");var n=[];e=e.replace(t,(function(t){return n.push(t),"U"+t}));var r="U("+t.source+")";return n.map((function(t){return new $u(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)}))[0]}var Oc=Ac.bind(null,new RegExp("px","g")),Cc=Ac.bind(null,new RegExp("%","g")),Ic=Ac.bind(null,new RegExp("px|%|em","g")),Rc=Ac.bind(null,new RegExp("deg|rad|grad|turn","g"));function Dc(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0;return($u.isLength(t.unit)||$u.isLength(e.unit))&&(a=Bc(t,i,n),s=Bc(e,i,n),o="px"),($u.isAngle(t.unit)||$u.isAngle(e.unit))&&(a=Lc(t),s=Lc(e),o="deg"),[a,s,function(t){return r&&(t=Math.max(t,0)),t+o}]}function Lc(t){var e=0;return t.unit===va.kDegrees?e=t.value:t.unit===va.kRadians?e=La(Number(t.value)):t.unit===va.kTurns&&(e=Ba(Number(t.value))),e}function Vc(t){return It(t)?t.split(" ").map((function(t){return Ic(t)})):t.map((function(t){return Ic(t.toString())}))}function jc(t,e,n){if(t.length===e.length){var r=t[0].unit;return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t.map((function(t){return new $u(t,r)})).join(" ")}]}}function Bc(t,e,n){if(t.unit===va.kPixels)return Number(t.value);if(t.unit===va.kPercentage&&n){var r=n.getGeometryBounds(),i=0;return Ho.isEmpty(r)||(i=2*r.halfExtents[e]),Number(t.value)/100*i}return 0}function Fc(t){return t.toString()}function Uc(t){return"number"==typeof t?new $u(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new $u(Number(t)):new $u(0)}function Gc(t){return It(t)?t.split(" ").map(Uc):t.map(Uc)}function zc(t,e){return[t.value,e.value,Fc]}function Hc(t,e){return function(n,r){return[n.value,r.value,function(n){return Fc(Rt(n,t,e))}]}}function qc(t,e){if(t.length==e.length)return[t.map((function(t){return t.value})),e.map((function(t){return t.value})),function(t){return t}]}var Wc=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,Yc=/[^\s\,]+/gi;var Xc=function(t){var e=t||[];return xt(e)?e:It(e)?(e=e.match(Wc),_t(e,(function(t,n){if((t=t.match(Yc))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}_t(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};var $c="\t\n\v\f\r   ᠎              \u2028\u2029",Kc=new RegExp("([a-z])["+$c+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+$c+"]*,?["+$c+"]*)+)","ig"),Zc=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+$c+"]*,?["+$c+"]*","ig");var Jc=/[a-z]/;function Qc(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function tl(t){var e=function(t){if(!t)return null;if(xt(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Kc,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Zc,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(Jc.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,u=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(u=a=+h[1],c=s=+h[2],l++,o[0]=["M",a,s]);r=l;for(var f=e.length;r<f;r++){var p=e[r],d=o[r-1],y=[],v=(i=p[0]).toUpperCase();if(i!==v)switch(y[0]=v,v){case"A":y[1]=p[1],y[2]=p[2],y[3]=p[3],y[4]=p[4],y[5]=p[5],y[6]=+p[6]+a,y[7]=+p[7]+s;break;case"V":y[1]=+p[1]+s;break;case"H":y[1]=+p[1]+a;break;case"M":u=+p[1]+a,c=+p[2]+s,y[1]=u,y[2]=c;break;default:for(var g=1,m=p.length;g<m;g++)y[g]=+p[g]+(g%2?a:s)}else y=e[r];switch(v){case"Z":a=+u,s=+c;break;case"H":y=["L",a=y[1],s];break;case"V":y=["L",a,s=y[1]];break;case"T":a=y[1],s=y[2];var b=Qc([d[1],d[2]],[d[3],d[4]]);y=["Q",b[0],b[1],a,s];break;case"S":a=y[y.length-2],s=y[y.length-1];var T=d.length,w=Qc([d[T-4],d[T-3]],[d[T-2],d[T-1]]);y=["C",w[0],w[1],y[1],y[2],a,s];break;case"M":u=y[y.length-2],c=y[y.length-1];break;default:a=y[y.length-2],s=y[y.length-1]}o.push(y)}return o}var el=2*Math.PI,nl=function(t,e,n,r,i,o,a){var s=t.x,u=t.y;return{x:r*(s*=e)-i*(u*=n)+o,y:i*s+r*u+a}},rl=function(t,e){var n=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=Math.cos(t),i=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},il=function(t,e,n,r){var i=t*n+e*r;return i>1&&(i=1),i<-1&&(i=-1),(t*r-e*n<0?-1:1)*Math.acos(i)},ol=function(t){var e=t.px,n=t.py,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,u=void 0===s?0:s,c=t.largeArcFlag,l=void 0===c?0:c,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(u*el/360),y=Math.cos(u*el/360),v=y*(e-r)/2+d*(n-i)/2,g=-d*(e-r)/2+y*(n-i)/2;if(0===v&&0===g)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(v,2)/Math.pow(o,2)+Math.pow(g,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var b=function(t,e,n,r,i,o,a,s,u,c,l,h){var f=Math.pow(i,2),p=Math.pow(o,2),d=Math.pow(l,2),y=Math.pow(h,2),v=f*p-f*y-p*d;v<0&&(v=0),v/=f*y+p*d;var g=(v=Math.sqrt(v)*(a===s?-1:1))*i/o*h,m=v*-o/i*l,b=c*g-u*m+(t+n)/2,T=u*g+c*m+(e+r)/2,w=(l-g)/i,E=(h-m)/o,M=(-l-g)/i,k=(-h-m)/o,P=il(1,0,w,E),x=il(w,E,M,k);return 0===s&&x>0&&(x-=el),1===s&&x<0&&(x+=el),[b,T,P,x]}(e,n,r,i,o,a,l,f,d,y,v,g),T=b[0],w=b[1],E=b[2],M=b[3],k=Math.abs(M)/(el/4);Math.abs(1-k)<1e-7&&(k=1);var P=Math.max(Math.ceil(k),1);M/=P;for(var x=0;x<P;x++)p.push(rl(E,M)),E+=M;return p.map((function(t){var e=nl(t[0],o,a,y,d,T,w),n=e.x,r=e.y,i=nl(t[1],o,a,y,d,T,w),s=i.x,u=i.y,c=nl(t[2],o,a,y,d,T,w);return{x1:n,y1:r,x2:s,y2:u,x:c.x,y:c.y}}))};function al(t,e,n,r,i,o,a,s,u){return ol({px:t,py:e,cx:s,cy:u,rx:n,ry:r,xAxisRotation:i,largeArcFlag:o,sweepFlag:a}).reduce((function(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.x,s=e.y;return t.push(n,r,i,o,a,s),t}),[])}function sl(t,e,n,r,i,o){return[1/3*t+2/3*n,1/3*e+2/3*r,1/3*i+2/3*n,1/3*o+2/3*r,i,o]}function ul(t,e,n,r){return[t,e,n,r,n,r]}function cl(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],i=n[1];switch(t[0]){case"M":return e.x=r,e.y=i,t;case"A":return["C"].concat(al.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=i,["C"].concat(sl.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(ul(e.x1,e.y1,t[1],t[2]));case"H":return["C"].concat(ul(e.x1,e.y1,t[1],e.y1));case"V":return["C"].concat(ul(e.x1,e.y1,e.x1,t[1]));case"Z":return["C"].concat(ul(e.x1,e.y1,e.x,e.y))}return t}function ll(t,e){void 0===e&&(e=!1);for(var n,r,i=tl(t),o={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},a=[],s="",u=i.length,c=[],l=0;l<u;l+=1)i[l]&&(s=i[l][0]),a[l]=s,i[l]=cl(i[l],o),hl(i,a,l),u=i.length,"Z"===s&&c.push(l),r=(n=i[l]).length,o.x1=+n[r-2],o.y1=+n[r-1],o.x2=+n[r-4]||o.x1,o.y2=+n[r-3]||o.y1;return e?[i,c]:i}function hl(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function fl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function pl(t,e){return fl(t)*fl(e)?(t[0]*e[0]+t[1]*e[1])/(fl(t)*fl(e)):1}function dl(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(pl(t,e))}function yl(t,e){return t[0]===e[0]&&t[1]===e[1]}function vl(t,e){var n=e[1],r=e[2],i=Lt(jt(e[3]),2*Math.PI),o=e[4],a=e[5],s=t[0],u=t[1],c=e[6],l=e[7],h=Math.cos(i)*(s-c)/2+Math.sin(i)*(u-l)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(u-l)/2,p=h*h/(n*n)+f*f/(r*r);p>1&&(n*=Math.sqrt(p),r*=Math.sqrt(p));var d=n*n*(f*f)+r*r*(h*h),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var v=r?y*n*f/r:0,g=n?y*-r*h/n:0,m=(s+c)/2+Math.cos(i)*v-Math.sin(i)*g,b=(u+l)/2+Math.sin(i)*v+Math.cos(i)*g,T=[(h-v)/n,(f-g)/r],w=[(-1*h-v)/n,(-1*f-g)/r],E=dl([1,0],T),M=dl(T,w);return pl(T,w)<=-1&&(M=Math.PI),pl(T,w)>=1&&(M=0),0===a&&M>0&&(M-=2*Math.PI),1===a&&M<0&&(M+=2*Math.PI),{cx:m,cy:b,rx:yl(t,[c,l])?0:n,ry:yl(t,[c,l])?0:r,startAngle:E,endAngle:E+M,xRotation:i,arcFlag:o,sweepFlag:a}}function gl(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ml(t){var e=tl(t),n=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}(e),r=e.slice(),i=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}r.length>0&&n.push(r);return{polygons:e,polylines:n}}(r),o=i.polygons,a=i.polylines,s=mt(ll(r,!0),2),u=s[0],c=s[1],l=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=(t=Xc(t)).length,s=0;s<a;s++){var u=t[s];r=t[s+1];var c=u[0],l={command:c,prePoint:n,params:u,startTangent:null,endTangent:null};switch(c){case"M":i=[u[1],u[2]],o=s;break;case"A":var h=vl(n,u);l.arcParams=h}if("Z"===c)n=i,r=t[o+1];else{var f=u.length;n=[u[f-2],u[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),l.currentPoint=n,e[o]&&yl(n,e[o].currentPoint)&&(e[o].prePoint=l.prePoint);var p=r?[r[r.length-2],r[r.length-1]]:null;l.nextPoint=p;var d=l.prePoint;if(["L","H","V"].includes(c))l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===c){var y=[u[1],u[2]];l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===c){y=gl((m=e[s-1]).currentPoint,d);"Q"===m.command?(l.command="Q",l.startTangent=[d[0]-y[0],d[1]-y[1]],l.endTangent=[n[0]-y[0],n[1]-y[1]]):(l.command="TL",l.startTangent=[d[0]-n[0],d[1]-n[1]],l.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===c){var v=[u[1],u[2]],g=[u[3],u[4]];l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]],0===l.startTangent[0]&&0===l.startTangent[1]&&(l.startTangent=[v[0]-g[0],v[1]-g[1]]),0===l.endTangent[0]&&0===l.endTangent[1]&&(l.endTangent=[g[0]-v[0],g[1]-v[1]])}else if("S"===c){var m;v=gl((m=e[s-1]).currentPoint,d),g=[u[1],u[2]];"C"===m.command?(l.command="C",l.startTangent=[d[0]-v[0],d[1]-v[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]]):(l.command="SQ",l.startTangent=[d[0]-g[0],d[1]-g[1]],l.endTangent=[n[0]-g[0],n[1]-g[1]])}else if("A"===c){var b=.001,T=l.arcParams||{},w=T.cx,E=void 0===w?0:w,M=T.cy,k=void 0===M?0:M,P=T.rx,x=void 0===P?0:P,S=T.ry,_=void 0===S?0:S,N=T.sweepFlag,A=void 0===N?0:N,O=T.startAngle,C=void 0===O?0:O,I=T.endAngle,R=void 0===I?0:I;0===A&&(b*=-1);var D=x*Math.cos(C-b)+E,L=_*Math.sin(C-b)+k;l.startTangent=[D-i[0],L-i[1]];var V=x*Math.cos(C+R+b)+E,j=_*Math.sin(C+R-b)+k;l.endTangent=[d[0]-V,d[1]-j]}e.push(l)}return e}(r),h=function(t){var e,n,r,i,o=0,a=0,s=[];if(!t)return{curveSegments:[],totalLength:o};if(t.forEach((function(e,n){r=t[n+1],i=e.length,r&&(o+=Ks.length(e[i-2],e[i-1],r[1],r[2],r[3],r[4],r[5],r[6])||0)})),0===o)return{curveSegments:[],totalLength:o};return t.forEach((function(u,c){r=t[c+1],i=u.length,r&&((e=[])[0]=a/o,n=Ks.length(u[i-2],u[i-1],r[1],r[2],r[3],r[4],r[5],r[6]),a+=n||0,e[1]=a/o,s.push(e))})),{curveSegments:s,totalLength:o}}(u);return{absolutePath:e,hasArc:n,segments:l,polygons:o,polylines:a,curve:u,totalLength:h.totalLength,curveSegments:h.curveSegments,zCommandIndexes:c,rect:bl(u)}}function bl(t){var e=0,n=0,r=[],i=[];t.forEach((function(t){var o=mt(t.slice(-2),2),a=o[0],s=o[1];if("M"===t[0])e=a,n=s,r.push(a),i.push(s);else if("C"===t[0]){var u=Ks.box.apply(Ks,bt([],mt([e,n].concat(t.slice(1))),!1));r=r.concat(u.x,u.x+u.width),i=i.concat(u.y,u.y+u.height),e=a,n=s}}));var o=Math.min.apply(0,r),a=Math.min.apply(0,i),s=Math.max.apply(0,r),u=Math.max.apply(0,i);return new ra(o,a,s-o,u-a)}function Tl(t,e,n){var r=t.curve,i=e.curve,o=[r,i];r.length!==i.length&&(o=su(r,i));var a=uu(o[0])!==uu(o[1])?hu(o[0]):fu(o[0]);return[a,pu(o[1],a),function(t){return t}]}function wl(t){if(It(t))return null;var e,n,r=[],i=0,o=Js(t);return t.forEach((function(a,s){t[s+1]&&((e=[0,0])[0]=i/o,n=zs.length(a[0],a[1],t[s+1][0],t[s+1][1]),i+=n,e[1]=i/o,r.push(e))})),{points:t,totalLength:o,segments:r}}var El=Ac.bind(null,/deg|rad|grad|turn|px|%/g),Ml=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function kl(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];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,Ml.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map((function(t){return El(t)||_c(t)}))}),n.lastIndex===t.length)return r}return[]}var Pl=null,xl=new $u(0,"px"),Sl=new $u(0,"deg");function _l(t){return function(e){var n=0;return t.map((function(t){return t===Pl?e[n++]:t}))}}function Nl(t){return t}var Al={rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],scale:["Nn",_l([Pl,Pl,new $u(1)]),Nl],scalex:["N",_l([Pl,new $u(1),new $u(1)]),_l([Pl,new $u(1)])],scaley:["N",_l([new $u(1),Pl,new $u(1)]),_l([new $u(1),Pl])],scalez:["N",_l([new $u(1),new $u(1),Pl])],scale3d:["NNN",Nl],translate:["Tt",_l([Pl,Pl,xl]),Nl],translatex:["T",_l([Pl,xl,xl]),_l([Pl,xl])],translatey:["T",_l([xl,Pl,xl]),_l([xl,Pl])],translatez:["L",_l([xl,xl,Pl])],translate3d:["TTL",Nl]};function Ol(t){if("none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];i=e.index+e[0].length;var o=e[1],a=Al[o];if(!a)return[];var s=e[2].split(","),u=a[0];if(u.length<s.length)return[];for(var c=[],l=0;l<u.length;l++){var h=s[l],f=u[l],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?Sl:Rc(t)},N:Uc,T:Ic,L:Oc}[f.toUpperCase()](h):{a:Sl,n:c[0],t:xl}[f]))return[];c.push(p)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function Cl(t){return t.replace(/[xy]/,"")}function Il(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Rl(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substr(0,5)?1:0;e.push({t:i,d:o.map((function(t){return"number"==typeof t?new $u(a):new $u(a,t.unit)}))})},o=0;o<t.length;o++)i(o)}var a,s,u=[],c=[],l=[];if(t.length!==e.length);else for(o=0;o<t.length;o++){var h=t[o].t,f=e[o].t,p=t[o].d,d=e[o].d,y=Al[h],v=Al[f],g=void 0;if(s=f,("perspective"!==(a=h)||"perspective"!==s)&&("matrix"!==a&&"matrix3d"!==a||"matrix"!==s&&"matrix3d"!==s)){if(h===f)g=h;else if(y[2]&&v[2]&&Cl(h)===Cl(f))g=Cl(h),p=y[2](p),d=v[2](d);else{if(!y[1]||!v[1]||Il(h)!==Il(f))break;g=Il(h),p=y[1](p),d=v[1](d)}for(var m=[],b=[],T=[],w=0;w<p.length;w++){var E=(p[w].unit===va.kNumber?zc:Dc)(p[w],d[w],n,!1,w);m[w]=E[0],b[w]=E[1],T.push(E[2])}u.push(m),c.push(b),l.push([g,T])}}if(r){var M=u;u=c,c=M}return[u,c,function(t){return t.map((function(t,e){var n=t.map((function(t,n){return l[e][1][n](t)})).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),l[e][0]+"("+n+")"})).join(" ")}]}function Dl(t){if(It(t)){var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Ic(Ll(e[0])),Ic(Ll(e[1]))]}return[new $u(t[0]||0,"px"),new $u(t[1]||0,"px")]}function Ll(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var Vl,jl=function(){function t(){this.parser=Ic,this.mixer=Dc}return t.prototype.calculator=function(t,e,n,r,i){return $u.isRelativeUnit(n.unit)?n.unit===va.kPercentage||n.unit===va.kEms?new $u(0,"px"):void 0:n.clone()},t.prototype.nameToBoundsIndex=function(t){return"x"===t||"cx"===t||"width"===t?0:"y"===t||"cy"===t||"height"===t?1:2},t.prototype.calculateUsedValueWithParentBounds=function(t,e){var n=t.parentElement.getGeometryBounds(),r=t.computedStyle[e].value;return new $u(2*n.halfExtents[this.nameToBoundsIndex(e)]*r/100,"px")},t=pt([N()],t)}(),Bl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.parser=Ic,e.mixer=Dc,e}return lt(e,t),e.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},e=pt([N()],e)}(jl),Fl=function(){function t(){this.parser=Uc,this.mixer=Hc(0,1)}return t=pt([N()],t)}(),Ul=function(){function t(){this.parser=_c,this.mixer=Nc}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof _a?new Hu(0,0,0,0,"none"===n.value):n},t=pt([N()],t)}(),Gl=function(){function t(){this.parser=kl}return t=pt([N()],t)}(),zl=function(){function t(){this.parser=Vc,this.mixer=jc}return t.prototype.calculator=function(t,e,n,r){return n&&1===n.length?[n[0],n[0]]:[n[0],n[1]]},t=pt([N()],t)}(),Hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mixer=Hc(0,1/0),e}return lt(e,t),e=pt([N()],e)}(jl),ql=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.offsetPathTargets){var i=e.style.offsetPathTargets.indexOf(r);e.style.offsetPathTargets.splice(i,1)}return n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t=pt([N()],t)}(),Wl=function(){function t(){this.parser=Uc,this.mixer=Hc(0,1)}return t.prototype.postProcessor=function(t){if(t.attributes.offsetPath){var e=t.attributes.offsetPath.nodeName;if(e===Qs.LINE||e===Qs.PATH||e===Qs.POLYLINE){var n=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance.value);n&&t.setLocalPosition(n.x,n.y)}}},t=pt([N()],t)}(),Yl=function(){function t(){this.parser=Gc}return t.prototype.calculator=function(t,e,n,r){return 2===n.length?[n[0],n[1],new $u(0)]:n},t=pt([N()],t)}(),Xl=function(){function t(){this.parser=Uc}return t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0)}},t=pt([N()],t)}(),$l=function(){function t(){this.parser=Ol,this.mixer=Rl}return t.prototype.calculator=function(t,e,n,r){return n instanceof _a&&(n=[]),n.forEach((function(t){var i=t.t,o=(n||[]).find((function(t){return t.t===i})),a=(e||[]).find((function(t){return t.t===i}));if("scale"===i){var s=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1],u=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1];r.scaleLocal(s[0]/u[0],s[1]/u[1],1)}else if("scalex"===i){s=o&&o.d&&o.d.map((function(t){return t.value}))||[1],u=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(s[0]/u[0],1,1)}else if("scaley"===i){s=o&&o.d&&o.d.map((function(t){return t.value}))||[1],u=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,s[0]/u[0],1)}else if("scalez"===i){s=o&&o.d&&o.d.map((function(t){return t.value}))||[1],u=a&&a.d&&a.d.map((function(t){return t.value}))||[1];r.scaleLocal(1,1,s[0]/u[0])}else if("scale3d"===i){s=o&&o.d&&o.d.map((function(t){return t.value}))||[1,1,1],u=a&&a.d&&a.d.map((function(t){return t.value}))||[1,1,1];r.scaleLocal(s[0]/u[0],s[1]/u[1],s[2]/u[2])}else if("translate"===i){var c=o&&o.d||[xl,xl],l=a&&a.d||[xl,xl];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,0)}else if("translatex"===i){c=o&&o.d||[xl],l=a&&a.d||[xl];r.translateLocal(c[0].value-l[0].value,0,0)}else if("translatey"===i){c=o&&o.d||[xl],l=a&&a.d||[xl];r.translateLocal(0,c[0].value-l[0].value,0)}else if("translatez"===i){c=o&&o.d||[xl],l=a&&a.d||[xl];r.translateLocal(0,0,c[0].value-l[0].value)}else if("translate3d"===i){c=o&&o.d||[xl,xl,xl],l=a&&a.d||[xl,xl,xl];r.translateLocal(c[0].value-l[0].value,c[1].value-l[1].value,c[2].value-l[2].value)}else if("rotate"===i){var h=o&&o.d||[Sl],f=a&&a.d||[Sl];r.rotateLocal(0,0,h[0].value-f[0].value)}else if("rotatex"===i){h=o&&o.d||[Sl],f=a&&a.d||[Sl];r.rotateLocal(h[0].value-f[0].value,0,0)}else if("rotatey"===i){h=o&&o.d||[Sl],f=a&&a.d||[Sl];r.rotateLocal(0,h[0].value-f[0].value,0)}else if("rotatez"===i){h=o&&o.d||[Sl],f=a&&a.d||[Sl];r.rotateLocal(0,0,h[0].value-f[0].value)}})),n},t=pt([N()],t)}(),Kl=function(){function t(){this.parser=Dl}return t=pt([N()],t)}(),Zl=function(){function t(){this.parser=ml,this.mixer=Tl}return t.prototype.calculator=function(t,e,n){return n instanceof _a?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,curveSegments:[],zCommandIndexes:[],rect:new ra(0,0,0,0)}:n},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([N()],t)}(),Jl=function(){function t(){this.parser=wl}return t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.x,r=e.y,i=e.z;t.setLocalPosition(n&&n.value||0,r&&r.value||0,i&&i.value||0)},t=pt([N()],t)}(),Ql=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(e&&e!==n&&e.style.clipPathTargets){var i=e.style.clipPathTargets.indexOf(r);e.style.clipPathTargets.splice(i,1)}return n&&(n.style.clipPathTargets||(n.style.clipPathTargets=[]),n.style.clipPathTargets.push(r)),ha(r),n},t=pt([N()],t)}(),th=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof _a?"unset"===n.value?"":n.value:n},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t=pt([N()],t)}(),eh=function(){function t(){}return t.prototype.postProcessor=function(t){if(t.nodeName===Qs.TEXT){var e=t,n=e.parsedStyle.textTransform.value;n===nu.CAPITALIZE?e.style.text=e.style.text.charAt(0).toUpperCase()+e.style.text.slice(1):n===nu.LOWERCASE?e.style.text=e.style.text.toLowerCase():n===nu.UPPERCASE&&(e.style.text=e.style.text.toUpperCase())}},t=pt([N()],t)}(),nh=[{name:"display",keywords:["none"]},{name:"x",interpolable:!0,alias:["cx"],defaultValue:"0",syntax:"<length> | <percentage>",handler:Bl},{name:"y",interpolable:!0,alias:["cy"],defaultValue:"0",syntax:"<length> | <percentage>",handler:Bl},{name:"z",interpolable:!0,defaultValue:"0",syntax:"<length> | <percentage>",handler:Bl},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:"<number>",handler:Fl},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:"<number>",handler:Fl},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:"<number>",handler:Fl},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:"<paint>",handler:Ul},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:"<paint>",handler:Ul},{name:"shadowColor",interpolable:!0,syntax:"<color>",handler:Ul},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,syntax:"<length> | <percentage>",handler:jl},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,syntax:"<length> | <percentage>",handler:jl},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,handler:Hl},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:"<length> | <percentage>",handler:jl},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],handler:zl},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],handler:jl},{name:"offsetPath",handler:ql},{name:"offsetDistance",interpolable:!0,handler:Wl},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:jl},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:jl},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],handler:Xl},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,handler:Gl},{name:"clipPath",handler:Ql},{name:"transform",interpolable:!0,keywords:["none"],defaultValue:"none",handler:$l},{name:"transformOrigin",parsePriority:100,defaultValue:"left top",layoutDependent:!0,handler:Kl},{name:"anchor",parsePriority:99,layoutDependent:!0,handler:Yl},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:jl},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:jl},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",handler:jl},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:jl},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",handler:jl},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",handler:jl},{name:"x1",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"y1",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"z1",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"x2",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"y2",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"z2",interpolable:!0,layoutDependent:!0,handler:Bl},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",handler:Zl},{name:"points",layoutDependent:!0,handler:Jl},{name:"text",layoutDependent:!0,handler:th,defaultValue:""},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",handler:eh},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,handler:jl},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0},{name:"letterSpacing",layoutDependent:!0},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0}],rh=function(){function t(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.cascadeProperties={}}return t.prototype.init=function(){var t=this;nh.forEach((function(e){t.registerMetadata(e)}))},t.prototype.registerMetadata=function(t){var e=this;bt([t.name],mt(t.alias||[]),!1).forEach((function(n){e.cache[n]=t}))},t.prototype.getMetadata=function(t){return this.cache[t]},t.prototype.processProperties=function(t,e,n){var r=this;void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1});var i=n.skipUpdateAttribute,o=n.skipParse,a=!1;Object.keys(e).forEach((function(n){var o,s=mt(js(n,e[n]),2),u=s[0],c=s[1];i||(t.attributes[u]=c),!a&&(null===(o=r.getMetadata(u))||void 0===o?void 0:o.layoutDependent)&&(a=!0)}));var s=Object.keys(e).sort((function(t,e){var n,i;return((null===(n=r.getMetadata(t))||void 0===n?void 0:n.parsePriority)||0)-((null===(i=r.getMetadata(e))||void 0===i?void 0:i.parsePriority)||0)}));o||s.forEach((function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e])}));var u=!1;s.forEach((function(e){e in t.computedStyle&&(u=r.computeProperty(e,t.computedStyle[e],t))})),u?this.dirty=!0:(a&&this.updateGeometry(t),s.forEach((function(e){e in t.parsedStyle&&r.postProcessProperty(e,t)})),s.forEach((function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach((function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})}))})))},t.prototype.parseProperty=function(t,e){var n=this.getMetadata(t),r=e;if(""===e&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)r=new _a(e);else if(n){var i=n.keywords,o=n.handler;if(i&&i.indexOf(e)>-1)r=new _a(e);else if(o){var a=ot.get(o);a&&a.parser&&(r=a.parser(e))}}return r},t.prototype.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof xa?e.clone():e;if(r){var a=r.handler,s=r.inherited,u=r.defaultValue;if(e instanceof _a){var c=e.value;if("unset"===c&&(c=s&&!i?"inherit":"initial"),"initial"===c)u&&(e=this.parseProperty(t,u));else if("inherit"===c){var l=this.tryToResolveProperty(n,t,{inherited:!0});return l?(n.parsedStyle[t]=l,!1):(this.addUnresolveProperty(n,t),!0)}}if(a){var h=ot.get(a);if(h&&h.calculator){var f=n.parsedStyle[t];o=h.calculator(t,f,e,n,this)}else o=e}else o=e}return n.parsedStyle[t]=o,!1},t.prototype.postProcessProperty=function(t,e){var n=this.getMetadata(t);if(n&&n.handler){var r=ot.get(n.handler);r&&r.postProcessor&&r.postProcessor(e)}},t.prototype.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},t.prototype.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&this.isPropertyResolved(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];return(!(r instanceof _a)||"unset"!==r.value&&"initial"!==r.value&&"inherit"!==r.value)&&(!(r instanceof $u&&$u.isRelativeUnit(r.unit))&&r)}return!1},t.prototype.recalc=function(t){var e=this.unresolvedProperties[t.entity];if(e&&e.length){var n={};e.forEach((function(e){n[e]=t.attributes[e]})),this.processProperties(t,n),delete this.unresolvedProperties[t.entity]}},t.prototype.updateGeometry=function(t){var e,n=ot.get(Tf)(t.nodeName);if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new Ho),r.renderBounds||(r.renderBounds=new Ho);var i=t.parsedStyle,o=n.update(i,t),s=o.width,u=o.height,c=o.depth,l=void 0===c?0:c,h=o.x,f=void 0===h?0:h,p=o.y,d=void 0===p?0:p,y=o.offsetX,v=void 0===y?0:y,g=o.offsetY,m=void 0===g?0:g,b=o.offsetZ,T=void 0===b?0:b;t.nodeName!==Qs.LINE&&t.nodeName!==Qs.POLYLINE&&t.nodeName!==Qs.POLYGON&&t.nodeName!==Qs.PATH||(i.offsetX=f-(i.defX||0),i.offsetY=d-(i.defY||0),i.defX=f,i.defY=d,t.attributes.x+=i.offsetX,t.attributes.y+=i.offsetY,i.x=i.x.add(new $u(i.offsetX,"px")),i.y=i.y.add(new $u(i.offsetY,"px")));var w=a.fromValues(s/2,u/2,l/2),E=i,M=E.lineWidth,k=E.shadowColor,P=E.filter,x=void 0===P?[]:P,S=E.transformOrigin,_=i.anchor;t.nodeName===Qs.TEXT&&delete i.anchor;var N=a.fromValues((1-2*(_&&_[0].value||0))*w[0]+v,(1-2*(_&&_[1].value||0))*w[1]+m,(1-2*(_&&(null===(e=_[2])||void 0===e?void 0:e.value)||0))*w[2]+T);if(r.contentBounds.update(N,w),M&&a.add(w,w,a.fromValues(M.value/2,M.value/2,0)),r.renderBounds.update(N,w),k){var A=r.renderBounds,O=A.min,C=A.max,I=i,R=I.shadowBlur,D=I.shadowOffsetX,L=I.shadowOffsetY,V=R&&R.value||0,j=D&&D.value||0,B=L&&L.value||0,F=O[0]-V+j,U=C[0]+V+j,G=O[1]-V+B,z=C[1]+V+B;O[0]=Math.min(O[0],F),C[0]=Math.max(C[0],U),O[1]=Math.min(O[1],G),C[1]=Math.max(C[1],z),r.renderBounds.setMinMax(O,C)}x.forEach((function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,a.add(r.renderBounds.halfExtents,r.renderBounds.halfExtents,a.fromValues(i,i,0)))}else if("drop-shadow"===e){var o=n[0].value,s=n[1].value,u=n[2].value,c=r.renderBounds,l=c.min,h=c.max,f=l[0]-u+o,p=h[0]+u+o,d=l[1]-u+s,y=h[1]+u+s;l[0]=Math.min(l[0],f),h[0]=Math.max(h[0],p),l[1]=Math.min(l[1],d),h[1]=Math.max(h[1],y),r.renderBounds.setMinMax(l,h)}})),_=i.anchor;var H=Bc(S[0],0,t),q=Bc(S[1],1,t);H-=(_&&_[0].value||0)*r.contentBounds.halfExtents[0]*2,q-=(_&&_[1].value||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(H,q),t.emit(Xo.GEOMETRY_BOUNDS_CHANGED,{}),ha(t)}},t.prototype.isPropertyInheritable=function(t){var e=this.getMetadata(t);return!!e&&e.inherited},pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],t.prototype,"init",null),t=pt([N()],t)}(),ih={number:function(t){return new $u(t)},percent:function(t){return new $u(t,"%")},px:function(t){return new $u(t,"px")},em:function(t){return new $u(t,"em")},deg:function(t){return new $u(t,"deg")},grad:function(t){return new $u(t,"grad")},rad:function(t){return new $u(t,"rad")},turn:function(t){return new $u(t,"turn")},s:function(t){return new $u(t,"s")},ms:function(t){return new $u(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.initialValue;ot.get(rh).registerMetadata({name:e,inherited:n,defaultValue:r})},registerLayout:function(t){}},oh=function(){function t(){}return t=pt([N()],t)}(),ah=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return lt(e,t),e}(ua),sh=":",uh=function(){function t(){this.emitter=new ut.EventEmitter}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=Ft(n)&&n||St(n)&&n.capture,i=St(n)&&n.once,o=kt(e)?void 0:e,a=!1,s="";if(t.indexOf(sh)>-1){var u=mt(t.split(sh),2),c=u[0];t=u[1],s=c,a=!0}if(t=r?"".concat(t,"capture"):t,e=kt(e)?e:e.handleEvent,a){var l=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null===(t=e[0].target)||void 0===t?void 0:t.name)===s&&l.apply(void 0,bt([],mt(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=Ft(n)&&n||St(n)&&n.capture,i=kt(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=kt(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new ah(t,e))},t.prototype.dispatchEvent=function(t){var e,n;if(!(t instanceof ua))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var r=this.ownerDocument||this.document;return r&&(t.manager=(null===(e=r.defaultView)||void 0===e?void 0:e.getEventService())||null,t.defaultPrevented=!1,t.path=[],t.target=this,null===(n=t.manager)||void 0===n||n.dispatchEvent(t)),!t.defaultPrevented},t}(),ch=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return lt(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===Qs.TEXT&&(n+=this.style.text);try{for(var r=gt(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===Qs.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach((function(t){e.removeChild(t,!0)})),this.nodeName===Qs.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw new Error("Method not implemented.")},e.prototype.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},e.prototype.lookupPrefix=function(t){throw new Error("Method not implemented.")},e.prototype.normalize=function(){throw new Error("Method not implemented.")},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){var n;if(t===this)return 0;if(!(t instanceof e))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var s=o.length>a.length?o:a,u=s===o?a:o;if(s[s.length-u.length]===u[0])return s===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var c=s.length-u.length,l=u.length-1;l>=0;l--){var h=u[l],f=s[c+l];if(f!==h){var p=h.parentNode.childNodes;return p.indexOf(h)<p.indexOf(f)?u===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:s===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t){t(this)||this.childNodes.forEach((function(e){e.forEach(t)}))},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(uh),lh=function(){function t(){}return t.tag="c-geometry",t}(),hh=function(){function t(){this.boundsDirty=!0,this.renderBoundsDirty=!0,this.dirty=!1}return t.tag="c-renderable",t}(),fh=function(){function t(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=a.fromValues(0,0,0),this.localRotation=u.fromValues(0,0,0,1),this.localScale=a.fromValues(1,1,1),this.localTransform=o.create(),this.position=a.fromValues(0,0,0),this.rotation=u.fromValues(0,0,0,1),this.scaling=a.fromValues(1,1,1),this.worldTransform=o.create(),this.origin=a.fromValues(0,0,0)}return t.tag="c-transform",t}();!function(t){t[t.Standard=0]="Standard"}(Vl||(Vl={}));var ph=function(){function t(){this.strategy=Vl.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t.tag="c-cullable",t}(),dh=function(){function t(){this.dirty=!1,this.renderOrder=0}return t.tag="c-sortable",t}(),yh=0,vh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sceneGraphService=ot.get(pa),e.entity=yh++,e.renderable=new hh,e.cullable=new ph,e.transformable=new fh,e.sortable=new dh,e.geometry=new lh,e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return lt(e,t),e.isElement=function(t){return!!t.getAttribute},Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter((function(t){return""!==t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.emit(Xo.CHILD_INSERTED,{child:t}),t.dispatchEvent(new ca(Xo.INSERTED,this,"","","",0,"","")),t},e.prototype.insertBefore=function(t,e){if(e){var n=this.childNodes.indexOf(e);this.appendChild(t,n-1)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new ca(Xo.REMOVED,this,"","","",0,"","")),e&&(t.emit(Xo.DESTROY,{}),t.destroyed=!0),this.emit(Xo.CHILD_REMOVED,{child:t}),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.prototype.removeChildren=function(t){var e=this;void 0===t&&(t=!0),this.childNodes.slice().forEach((function(n){e.removeChild(n,t)}))},e.prototype.matches=function(t){return this.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return this.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.prototype.find=function(t){var e=this,n=null;return this.forEach((function(r){return!(r===e||!t(r))&&(n=r,!0)})),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach((function(r){r!==e&&t(r)&&n.push(r)})),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach((function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)}))}},e.prototype.before=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this),i=mt(e),o=i[0],a=i.slice(1);this.parentNode.appendChild(o,r),(t=o).after.apply(t,bt([],mt(a),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,bt([],mt(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){return t.appendChild(e)}))},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e,n){return t.appendChild(e,n)}))},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,bt([],mt(t),!1))},e.prototype.remove=function(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.prototype.destroy=function(){this.emit(Xo.DESTROY,{}),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return this.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){var e=mt(js(t.toString(),""),1)[0],n=this.attributes[e];return Pt(n)?null:n},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){void 0===n&&(n=!1),this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.prototype.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.prototype.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.prototype.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},e}(ch),gh=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return lt(e,t),e}(ua),mh=0,bh=function(){function t(t,e){this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(mh++),this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),t=Number(t),isNaN(t))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){var t;return Number(null===(t=this.effect)||void 0===t?void 0:t.getComputedTiming().endTime)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},t.prototype.persist=function(){throw new Error("Method not implemented.")},t.prototype.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},t.prototype.commitStyles=function(){throw new Error("Method not implemented.")},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this.totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new gh(null,this,this.currentTime,t);setTimeout((function(){e.onfinish&&e.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new gh(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}();function Th(t,e){return Number(t.id)-Number(e.id)}var wh=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(Th),e.animations=e.tick(t,!0,e.animations)[0],n.forEach((function(e){e[1](t)})),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t){var e=new bh(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(Th),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF((function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()}))},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],s=[],u=[],c=[];return n.forEach((function(n){n.tick(t,e),n._inEffect?(s.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?u.push(n):c.push(n)})),(r=this.pendingEffects).push.apply(r,bt([],mt(a),!1)),(i=this.pendingEffects).push.apply(i,bt([],mt(s),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,c]},t}(),Eh=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Es,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=_s(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function Mh(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort((function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)})),e}(t));for(var n=t.map((function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(null!=a){if(a<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}else r=!1}return n=n.filter((function(t){return Number(t.offset)>=0&&Number(t.offset)<=1})),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var s=Number(n[a].computedOffset);if(null!=s&&null!=o){for(var u=1;u<a-i;u++)n[i+u].computedOffset=o+(s-o)*u/(a-i);i=a,o=s}}}(),n}var kh="backwards|forwards|both|none".split("|"),Ph="reverse|alternate|alternate-reverse".split("|");function xh(t,e){var n=new Eh;return e&&(n.fill="both",n.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(e){if(void 0!==t[e]&&null!==t[e]&&"auto"!==t[e]){if(("number"==typeof n[e]||"duration"===e)&&("number"!=typeof t[e]||isNaN(t[e])))return;if("fill"===e&&-1===kh.indexOf(t[e]))return;if("direction"===e&&-1===Ph.indexOf(t[e]))return;n[e]=t[e]}})):n.duration=t,n}function Sh(t,e){return xh(t=_h(null!=t?t:{duration:"auto"}),e)}function _h(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var Nh,Ah,Oh=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=Sh(n,!1),this.timing.effect=this,this.timing.activeDuration=Ns(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Mh(e,this.timing),this.interpolations=Is(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=As(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=Mh(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach((function(n){e.timing=t[n]}))},t}(),Ch={x:"",y:"",z:"",anchor:[0,0],opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transformOrigin:"",visibility:"",pointerEvents:"",lineCap:"",lineJoin:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:""},Ih=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this)||this).styleValueRegistry=ot.get(rh),o.activeAnimations=[],o.config=e,o.config.interactive=null!==(n=o.config.capture)&&void 0!==n?n:o.config.interactive,o.id=o.config.id||"",o.name=o.config.name||"",(o.config.className||o.config.class)&&(o.className=o.config.className||o.config.class),o.nodeName=o.config.type||Qs.GROUP,o.config.style=ht(ht(ht(ht({},Ch),{zIndex:null!==(r=o.config.zIndex)&&void 0!==r?r:0,interactive:null===(i=o.config.interactive)||void 0===i||i}),o.config.style),o.config.attrs),Pt(o.config.visible)||(o.config.style.visibility=!1===o.config.visible?"hidden":"visible"),Pt(o.config.interactive)||(o.config.style.pointerEvents=!1===o.config.interactive?"none":"auto"),o.style=new Proxy(ht(ht({},o.attributes),{setProperty:function(t,e){o.setAttribute(t,e)},getPropertyValue:function(t){return o.getAttribute(t)},removeProperty:function(t){o.removeAttribute(t)},item:function(){return""}}),{get:function(t,e){return e in t?t[e]:o.getAttribute(e)},set:function(t,e,n){return o.setAttribute(e,n),!0}}),o.initAttributes(o.config.style),ot.get(Tt).add(o.entity,o),o}return lt(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),ot.get(Tt).remove(this.entity),this.getAnimations().forEach((function(t){t.cancel()}))},e.prototype.cloneNode=function(t){var e=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:ht({},this.attributes)});return t&&this.children.forEach((function(n){var r=n.cloneNode(t);e.appendChild(r)})),e},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable;this.styleValueRegistry.processProperties(this,t),e.dirty=!0},e.prototype.setAttribute=function(e,n,r){void 0===r&&(r=!1);var i=mt(js(e,n),2),o=i[0],a=i[1];Ut(n)||!r&&Ht(a,this.attributes[o])||(this.internalSetAttribute(o,a),t.prototype.setAttribute.call(this,o,a))},e.prototype.internalSetAttribute=function(t,e,n){var r,i=this;void 0===n&&(n={});var o=this.renderable,a=this.attributes[t],s=this.parsedStyle[t];this.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&this.attributes.clipPathTargets.forEach((function(t){ha(t),t.dispatchEvent(new ca(Xo.ATTR_MODIFIED,t,i,i,"clipPath",ca.MODIFICATION,i,i))})),o.dirty=!0,this.dispatchEvent(new ca(Xo.ATTR_MODIFIED,this,a,e,t,ca.MODIFICATION,s,this.parsedStyle[t]))},e.prototype.getBBox=function(){var t=this.getBounds(),e=mt(t.getMin(),2),n=e[0],r=e[1],i=mt(t.getMax(),2),o=i[0],a=i[1];return new ra(n,r,o-n,a-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setOrigin(this,Ra(t,e,n)),this},e.prototype.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setPosition(this,Ra(t,e,n)),this.syncLocalPosition(),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.setLocalPosition(this,Ra(t,e,n)),this.syncLocalPosition(),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translate(this,Ra(t,e,n)),this.syncLocalPosition(),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.sceneGraphService.translateLocal(this,Ra(t,e,n)),this.syncLocalPosition(),this},e.prototype.getPosition=function(){return this.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return this.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Ra(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Ra(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return this.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var t=mt(za(a.create(),this.sceneGraphService.getWorldTransform(this)),3);t[0],t[1];return La(t[2])},e.prototype.getLocalEulerAngles=function(){var t=mt(za(a.create(),this.sceneGraphService.getLocalRotation(this)),3);t[0],t[1];return La(t[2])},e.prototype.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return Pt(e)&&Pt(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return Pt(e)&&Pt(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.getRotation=function(){return this.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},e.prototype.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},e.prototype.syncLocalPosition=function(){var t=this.getLocalPosition();this.attributes.x=t[0],this.attributes.y=t[1],this.attributes.z=t[2],this.parsedStyle.x=new $u(this.attributes.x,"px"),this.parsedStyle.y=new $u(this.attributes.y,"px"),this.parsedStyle.z=new $u(this.attributes.z,"px")},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;this.attributes.clipPathTargets&&this.attributes.clipPathTargets.length&&(i=null===(r=this.attributes.clipPathTargets[0].ownerDocument)||void 0===r?void 0:r.timeline);return delete this.parsedStyle.transform,i?i.play(new Oh(this,t,e)):null},e.prototype.show=function(){this.style.visibility="visible"},e.prototype.hide=function(){this.style.visibility="hidden"},e.prototype.isVisible=function(){var t,e;return"visible"===(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)||void 0===e?void 0:e.value)},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t,e;return"none"!==(null===(e=null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)||void 0===e?void 0:e.value)},e.prototype.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,bt([],mt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,bt([],mt(this.parentNode.children.map((function(t){return Number(t.style.zIndex)}))),!1))-1),this},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.getClip=function(){return this.style.clipPath||null},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=mt(e,2),i=r[0],o=r[1];return i?St(i)?(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e.prototype.getMatrix=function(t){var e=t||this.getWorldTransform(),n=mt(o.getTranslation(a.create(),e),2),r=n[0],i=n[1],s=mt(o.getScaling(a.create(),e),2),c=s[0],l=s[1],h=o.getRotation(u.create(),e),f=mt(za(a.create(),h),3),p=f[0],d=(f[1],f[2]);return Ha(p||d,r,i,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=mt(Ya(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=mt(Ya(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e}(vh),Rh=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.handleMounted=function(t){t.target===t.currentTarget&&n.connectedCallback&&n.connectedCallback()},n.handleUnmounted=function(t){t.target===t.currentTarget&&n.disconnectedCallback&&n.disconnectedCallback()},n.handleAttributeChanged=function(t){if(t.target===n){var e=t.attrName,r=t.prevValue,i=t.newValue;n.attributeChangedCallback&&n.attributeChangedCallback(e,r,i)}},n.attributeChangedCallback&&n.addEventListener(Xo.ATTR_MODIFIED,n.handleAttributeChanged),n.connectedCallback&&n.addEventListener(Xo.MOUNTED,n.handleMounted),n.disconnectedCallback&&n.addEventListener(Xo.UNMOUNTED,n.handleUnmounted),n}return lt(e,t),e}(Ih),Dh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.CIRCLE,style:ht({r:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(Ih),Lh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.ELLIPSE,style:ht({rx:"",ry:"",anchor:[.5,.5],transformOrigin:"center",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(Ih),Vh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.GROUP,style:ht({width:"",height:""},n)},r))||this}return lt(e,t),e}(Ih),jh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.IMAGE,style:ht({img:"",width:"",height:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(Ih),Bh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.LINE,style:ht({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,lineWidth:1,isBillboard:!1},n)},r))||this}return lt(e,t),e.prototype.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=zs.pointAt(n.value,r.value,i.value,o.value,t);return new na(a.x,a.y)},e.prototype.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,i=t.y2;return zs.length(e.value,n.value,r.value,i.value)},e}(Ih),Fh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.PATH,style:ht({path:"",lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.prototype.getPoint=function(t){var e=0,n=0,r=this.parsedStyle.path.curve;if(!this.parsedStyle.path.curveSegments.length)return r?new na(r[0][1],r[0][2]):null;this.parsedStyle.path.curveSegments.forEach((function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var i=r[n];if(Pt(i)||Pt(n))return null;var o=i.length,a=r[n+1],s=Ks.pointAt(i[o-2],i[o-1],a[1],a[2],a[3],a[4],a[5],a[6],e),u=s.x,c=s.y;return new na(u,c)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?(e.push([n[0]-i[0],n[1]-i[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([r[0],r[1]]),n.push([i[0],i[1]]))}return n},e}(Ih),Uh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.POLYGON,style:ht({points:[],miterLimit:4,lineWidth:1},n)},r))||this}return lt(e,t),e}(Ih),Gh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.POLYLINE,style:ht({points:[],lineWidth:1,miterLimit:4},n)},r))||this}return lt(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPoint=function(t){var e=this.parsedStyle.points,n=e.points,r=e.segments,i=0,o=0;r.forEach((function(e,n){t>=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),o=n)}));var a=zs.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],i),s=a.x,u=a.y;return new na(s,u)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(Ih),zh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=ft(e,["style"]);return t.call(this,ht({type:Qs.RECT,style:ht({width:"",height:"",radius:"",lineWidth:"0"},n)},r))||this}return lt(e,t),e}(Ih),Hh=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Qs.TEXT,style:ht({text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",stroke:"black",letterSpacing:0,lineHeight:0,lineWidth:0,miterLimit:10,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0},r)},i))||this).LENGTHADJUST_SPACING=1,n.LENGTHADJUST_SPACINGANDGLYPHS=2,n.LENGTHADJUST_UNKNOWN=0,n}return lt(e,t),e.prototype.getCharNumAtPosition=function(t){throw new Error("Method not implemented.")},e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getEndPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getExtentOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getNumberOfChars=function(){throw new Error("Method not implemented.")},e.prototype.getRotationOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getStartPositionOfChar=function(t){throw new Error("Method not implemented.")},e.prototype.getSubStringLength=function(t,e){throw new Error("Method not implemented.")},e.prototype.selectSubString=function(t,e){throw new Error("Method not implemented.")},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e}(Ih),qh=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=ft(e,["style"]);return(n=t.call(this,ht({type:Qs.HTML,style:ht({innerHTML:"",className:"",style:""},r)},i))||this).cullable.enable=!1,n}return lt(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect();if(r){var i=n.left-r.left,o=n.top-r.top,s=new Ho;return s.setMinMax(a.fromValues(i,o,0),a.fromValues(i+n.width,o+n.height,0)),s}return null},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=o.invert(o.create(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!Ho.isEmpty(e)){var n=new Ho;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(Ih),Wh=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document",e.timeline=new wh(e);var n={};return nh.forEach((function(t){var e=t.name,r=t.inherited,i=t.defaultValue;r&&i&&(n[e]=i)})),e.documentElement=new Vh({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return lt(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){var n=this.defaultView.customElements.get(t);return n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Hh:Vh),new n(e)},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw new Error("Method not implemented.")},e.prototype.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},e.prototype.elementFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,r<0||i<0||r>a||i>s?[2,null]:(u=this.defaultView.viewport2Client({x:r,y:i}),c=u.x,l=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return[2,(h=f.sent().picked)&&h[0]||this.documentElement]}}))}))},e.prototype.elementsFromPoint=function(t,e){return yt(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,r<0||i<0||r>a||i>s?[2,[]]:(u=this.defaultView.viewport2Client({x:r,y:i}),c=u.x,l=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:c,clientY:l},picked:[]})]);case 1:return(h=f.sent().picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}}))}))},e.prototype.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},e.prototype.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];throw new Error("Use document.documentElement instead.")},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(ch),Yh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.client=new na,e.movement=new na,e.offset=new na,e.global=new na,e.screen=new na,e}return lt(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw new Error("Method not implemented.")},e}(ua),Xh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return lt(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e}(Yh),$h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DOM_DELTA_LINE=0,e.DOM_DELTA_PAGE=1,e.DOM_DELTA_PIXEL=2,e}return lt(e,t),e}(Yh),Kh=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),Zh=0,Jh=new WeakMap,Qh=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:Ah&&function(t){return t===Ah||t===Nh}(t)?Ah:null}(n[r-1],t);if(i)return void(n[r-1]=i)}else e=this.observer,of.push(e),rf||(rf=!0,"undefined"!=typeof globalThis?globalThis.setTimeout(af):af());n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(Xo.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(Xo.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(Xo.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(Xo.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(Xo.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(Xo.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=Jh.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}}),this)},t.prototype.handleEvent=function(t){var e,n;switch(t.stopImmediatePropagation(),t.type){case Xo.ATTR_MODIFIED:var r=t.attrName,i=t.relatedNode.namespaceURI;n=t.target,(e=ef("attributes",n)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===ca.ADDITION?null:t.prevValue;nf(n,(function(t){var n;if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i)))return t.attributeOldValue?(n=o,Ah||((Ah=Kh.copy(Nh)).oldValue=n,Ah)):e}));break;case Xo.REMOVED:case Xo.INSERTED:n=t.relatedNode;var a=t.target,s=void 0,u=void 0;t.type===Xo.INSERTED?(s=[a],u=[]):(s=[],u=[a]);var c=a.previousSibling,l=a.nextSibling;(e=ef("childList",n)).addedNodes=s,e.removedNodes=u,e.previousSibling=c,e.nextSibling=l,nf(n,(function(t){if(t.childList)return e}))}Nh=Ah=void 0},t}(),tf=function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=Zh++}return t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=Jh.get(t);r||Jh.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new Qh(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach((function(e){for(var n=Jh.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}}),this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t},t}();function ef(t,e){return Nh=new Kh(t,e)}function nf(t,e){for(var n=t;n;n=n.parentNode){var r=Jh.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var s=e(a);s&&o.enqueue(s)}}}}var rf=!1,of=[];function af(){rf=!1;var t=of;of=[],t.sort((function(t,e){return t.uid-e.uid}));var e=!1;t.forEach((function(t){var n=t.takeRecords();!function(t){t.nodes.forEach((function(e){var n=Jh.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),n.length&&(t.callback(n,t),e=!0)})),e&&af()}var sf,uf,cf,lf=function(){function t(){this.registry={},this.define(Qs.CIRCLE,Dh),this.define(Qs.ELLIPSE,Lh),this.define(Qs.RECT,zh),this.define(Qs.IMAGE,jh),this.define(Qs.LINE,Bh),this.define(Qs.GROUP,Vh),this.define(Qs.PATH,Fh),this.define(Qs.POLYGON,Uh),this.define(Qs.POLYLINE,Gh),this.define(Qs.TEXT,Hh),this.define(Qs.HTML,qh)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),hf=l.defineToken("RenderingPluginContribution"),ff=function(){function t(){this.inited=!1,this.stats={total:0,rendered:0,renderedOnscreen:0},this.zIndexCounter=0,this.hooks={init:new Ea.AsyncParallelHook,dirtycheck:new Ea.SyncWaterfallHook(["object"]),cull:new Ea.SyncWaterfallHook(["object"]),beginFrame:new Ea.SyncHook([]),beforeRender:new Ea.SyncHook(["objectToRender"]),render:new Ea.SyncHook(["objectToRender"]),afterRender:new Ea.SyncHook(["objectToRender"]),endFrame:new Ea.SyncHook([]),destroy:new Ea.SyncHook([]),pick:new Ea.AsyncSeriesWaterfallHook(["result"]),pointerDown:new Ea.SyncHook(["event"]),pointerUp:new Ea.SyncHook(["event"]),pointerMove:new Ea.SyncHook(["event"]),pointerOut:new Ea.SyncHook(["event"]),pointerOver:new Ea.SyncHook(["event"]),pointerWheel:new Ea.SyncHook(["event"])}}return t.prototype.init=function(){return yt(this,void 0,void 0,(function(){var t=this;return vt(this,(function(e){switch(e.label){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach((function(e){e.apply(t)})),[4,this.hooks.init.promise()];case 1:return e.sent(),this.inited=!0,[2]}}))}))},t.prototype.getStats=function(){return this.stats},t.prototype.render=function(t){this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root),(this.renderingContext.dirty||t.renderer.getConfig().enableDirtyRectangleRendering&&1===this.stats.total)&&(this.renderingContext.dirty||this.hooks.beginFrame.call(),this.stats.renderedOnscreen=this.stats.rendered,this.hooks.endFrame.call(),this.renderingContext.dirty=!1),this.renderingContext.renderReasons.clear())},t.prototype.renderDisplayObject=function(t){var e=this;this.styleValueRegistry.recalc(t);var n=this.hooks.dirtycheck.call(t);n&&(this.hooks.cull.call(n),this.stats.rendered++,this.renderingContext.dirty||(this.renderingContext.dirty=!0,this.hooks.beginFrame.call()),this.hooks.beforeRender.call(n),this.hooks.render.call(n),this.hooks.afterRender.call(n),t.renderable.dirty=!1),t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var r=t.sortable,i=!1;r.dirty&&(r.sorted=t.childNodes.slice().sort(la),i=!0,r.dirty=!1),(r.sorted||t.childNodes).forEach((function(t){e.renderDisplayObject(t)})),i&&t.forEach((function(t){t.emit(Xo.RENDER_ORDER_CHANGED,{renderOrder:t.sortable.renderOrder})}))},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call()},t.prototype.dirtify=function(){this.renderingContext.renderReasons.add(fa.DISPLAY_OBJECT_CHANGED)},pt([st(hf),dt("design:type",Object)],t.prototype,"renderingPluginProvider",void 0),pt([O(wa),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([O(pa),dt("design:type",Object)],t.prototype,"sceneGraphService",void 0),pt([O(rh),dt("design:type",rh)],t.prototype,"styleValueRegistry",void 0),t=pt([N()],t)}(),pf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cursor="default",e.mappingTable={},e.mappingState={trackingData:{}},e.eventPool=new Map,e.onPointerDown=function(t){return yt(e,void 0,void 0,(function(){var e,n;return vt(this,(function(r){switch(r.label){case 0:return t instanceof Xh?[4,this.createPointerEvent(t)]:[2];case 1:return e=r.sent(),this.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType?this.dispatchEvent(e,"touchstart"):"mouse"!==e.pointerType&&"pen"!==e.pointerType||(n=2===e.button,this.dispatchEvent(e,n?"rightdown":"mousedown")),this.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerUp=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c;return vt(this,(function(l){switch(l.label){case 0:return t instanceof Xh?(e=performance.now(),[4,this.createPointerEvent(t)]):[2];case 1:if(n=l.sent(),this.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?this.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.dispatchEvent(n,s?"rightup":"mouseup")),r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[t.button]),o=i,i&&!n.composedPath().includes(i)){for(a=i;a&&!n.composedPath().includes(a);)n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?this.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(s=2===n.button,this.notifyTarget(n,s?"rightupoutside":"mouseupoutside")),ch.isNode(a)&&(a=a.parentNode);delete r.pressTargetsByButton[t.button],o=a}return o&&((u=this.clonePointerEvent(n,"click")).target=o,u.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:u.target,timeStamp:e}),(c=r.clicksByButton[t.button]).target===u.target&&e-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=u.target,c.timeStamp=e,u.detail=c.clickCount,"mouse"===u.pointerType||"touch"===u.pointerType?this.dispatchEvent(u,"click"):this.dispatchEvent(u,"pointertap"),this.freeEvent(u)),this.freeEvent(n),[2]}}))}))},e.onPointerMove=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h;return vt(this,(function(f){switch(f.label){case 0:return t instanceof Xh?[4,this.createPointerEvent(t)]:[2];case 1:return e=f.sent(),n="mouse"===e.pointerType||"pen"===e.pointerType,r=this.trackingData(t.pointerId),i=this.findMountedTarget(r.overTargets),r.overTargets&&i!==e.target?(o="mousemove"===t.type?"mouseout":"pointerout",[4,this.createPointerEvent(t,o,i||void 0)]):[3,5];case 2:return a=f.sent(),this.dispatchEvent(a,"pointerout"),n&&this.dispatchEvent(a,"mouseout"),e.composedPath().includes(i)?[3,4]:[4,this.createPointerEvent(t,"pointerleave",i||void 0)];case 3:for((s=f.sent()).eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseleave"),ch.isNode(s.target)&&(s.target=s.target.parentNode);this.freeEvent(s),f.label=4;case 4:this.freeEvent(a),f.label=5;case 5:if(i!==e.target){for(u="mousemove"===t.type?"mouseover":"pointerover",c=this.clonePointerEvent(e,u),this.dispatchEvent(c,"pointerover"),n&&this.dispatchEvent(c,"mouseover"),l=i&&ch.isNode(i)&&i.parentNode;l&&l!==(ch.isNode(this.rootTarget)&&this.rootTarget.parentNode)&&l!==e.target;)l=l.parentNode;if(!l||l===(ch.isNode(this.rootTarget)&&this.rootTarget.parentNode)){for((h=this.clonePointerEvent(e,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(ch.isNode(this.rootTarget)&&this.rootTarget.parentNode);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseenter"),ch.isNode(h.target)&&(h.target=h.target.parentNode);this.freeEvent(h)}this.freeEvent(c)}return this.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&this.dispatchEvent(e,"touchmove"),n&&(this.dispatchEvent(e,"mousemove"),this.cursor=this.getCursor(e.target)),r.overTargets=e.composedPath(),this.freeEvent(e),[2]}}))}))},e.onPointerOut=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return t instanceof Xh?(e=this.trackingData(t.pointerId)).overTargets?(n="mouse"===t.pointerType||"pen"===t.pointerType,r=this.findMountedTarget(e.overTargets),[4,this.createPointerEvent(t,"pointerout",r||void 0)]):[3,3]:[2];case 1:return i=a.sent(),this.dispatchEvent(i),n&&this.dispatchEvent(i,"mouseout"),[4,this.createPointerEvent(t,"pointerleave",r||void 0)];case 2:for((o=a.sent()).eventPhase=o.AT_TARGET;o.target&&o.target!==(ch.isNode(this.rootTarget)&&this.rootTarget.parentNode);)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),ch.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=null,this.freeEvent(i),this.freeEvent(o),a.label=3;case 3:return this.cursor=null,[2]}}))}))},e.onPointerOver=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof Xh?(e=this.trackingData(t.pointerId),[4,this.createPointerEvent(t)]):[2];case 1:for(n=o.sent(),r="mouse"===n.pointerType||"pen"===n.pointerType,this.dispatchEvent(n,"pointerover"),r&&this.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(this.cursor=this.getCursor(n.target)),(i=this.clonePointerEvent(n,"pointerenter")).eventPhase=i.AT_TARGET;i.target&&i.target!==(ch.isNode(this.rootTarget)&&this.rootTarget.parentNode);)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,"mouseenter"),ch.isNode(i.target)&&(i.target=i.target.parentNode);return e.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i),[2]}}))}))},e.onPointerUpOutside=function(t){return yt(e,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return t instanceof Xh?(e=this.trackingData(t.pointerId),n=this.findMountedTarget(e.pressTargetsByButton[t.button]),[4,this.createPointerEvent(t)]):[2];case 1:if(r=o.sent(),n){for(i=n;i;)r.currentTarget=i,this.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?this.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),ch.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}return this.freeEvent(r),[2]}}))}))},e.onWheel=function(t){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(n){switch(n.label){case 0:return t instanceof $h?[4,this.createWheelEvent(t)]:[2];case 1:return e=n.sent(),this.dispatchEvent(e),this.freeEvent(e),[2]}}))}))},e}return lt(e,t),e.prototype.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.prototype.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new na(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.prototype.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new na(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.canvasConfig,s=i.width,u=i.height,c=r.getPerspectiveInverse(),l=r.getWorldTransform(),h=o.multiply(o.create(),l,c),f=a.fromValues(e/s*2-1,2*(1-n/u)-1,0);return a.transformMat4(f,f,h),new na(f[0],f[1])},e.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=o.multiply(o.create(),n,r),s=a.fromValues(t.x,t.y,0);a.transformMat4(s,s,i);var u=this.canvasConfig,c=u.width,l=u.height;return new na((s[0]+1)/2*c,(1-(s[1]+1)/2)*l)},e.prototype.setPickHandler=function(t){this.pickHandler=t},e.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((function(t,e){return t.priority-e.priority}))},e.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},e.prototype.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)ch.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},e.prototype.hitTest=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i,o;return vt(this,(function(a){switch(a.label){case 0:return e=t.viewportX,n=t.viewportY,r=this.canvasConfig,i=r.width,o=r.height,e<0||n<0||e>i||n>o?[2,null]:[4,this.pickHandler(t)];case 1:return[2,a.sent()||this.rootTarget||null]}}))}))},e.prototype.isNativeEventFromCanvas=function(t){var e,n=this.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},e.prototype.createPointerEvent=function(t,e,n){return yt(this,void 0,void 0,(function(){var r,i,o,a,s;return vt(this,(function(u){switch(u.label){case 0:return r=this.allocateEvent(Xh),this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,i=this.isNativeEventFromCanvas(r),r.originalEvent=t,o=r,null==n?[3,1]:(a=n,[3,4]);case 1:return(s=i)?[4,this.hitTest({clientX:r.clientX,clientY:r.clientY,viewportX:r.viewportX,viewportY:r.viewportY,x:r.global.x,y:r.global.y})]:[3,3];case 2:s=u.sent(),u.label=3;case 3:a=s,u.label=4;case 4:return o.target=a,"string"==typeof e&&(r.type=e),[2,r]}}))}))},e.prototype.createWheelEvent=function(t){return yt(this,void 0,void 0,(function(){var e,n,r,i;return vt(this,(function(o){switch(o.label){case 0:return e=this.allocateEvent($h),this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,n=this.isNativeEventFromCanvas(e),r=e,(i=n)?[4,this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.global.x,y:e.global.y})]:[3,2];case 1:i=o.sent(),o.label=2;case 2:return r.target=i,[2,e]}}))}))},e.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(Xh);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.prototype.copyPointerData=function(t,e){t instanceof Xh&&e instanceof Xh&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.prototype.copyMouseData=function(t,e){t instanceof Yh&&e instanceof Yh&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},e.prototype.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(!(r===this.rootTarget||ch.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.prototype.getCursor=function(t){for(var e=t;e;){var n=vh.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=ch.isNode(e)&&e.parentNode}},pt([O(wa),dt("design:type",Object)],e.prototype,"renderingContext",void 0),pt([O(ya),dt("design:type",Object)],e.prototype,"contextService",void 0),pt([O(iu),dt("design:type",Object)],e.prototype,"canvasConfig",void 0),pt([Object(f.postConstruct)(),dt("design:type",Function),dt("design:paramtypes",[]),dt("design:returntype",void 0)],e.prototype,"init",null),e=pt([N()],e)}(ut.EventEmitter),df=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t){if(this.canvas)return this.canvas;if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),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")}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t=pt([N()],t)}(),yf={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]},vf=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,gf=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),mf=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),bf=function(){function t(){var t=this;this.cache={},this.shouldBreakByKinsokuShorui=function(e,n){return!t.isBreakingSpace(n)&&!(!e||!mf.exec(n)&&!gf.exec(e))},this.trimByKinsokuShorui=function(t){var e=bt([],mt(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.cache[t])return this.cache[t];var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),i=this.offscreenCanvas.getOrCreateContext(e);i.font=t;var o=yf.MetricsString+yf.BaselineSymbol,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(yf.BaselineSymbol).width),u=yf.HeightMultiplier*s;s=s*yf.BaselineMultiplier|0,r.width=a,r.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var c=i.getImageData(0,0,a||1,u||1).data,l=c.length,h=4*a,f=0,p=0,d=!1;for(f=0;f<s;++f){for(var y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p+=h}for(n.ascent=s-f,p=l-h,d=!1,f=u;f>s;--f){for(y=0;y<h;y+=4)if(255!==c[p+y]){d=!0;break}if(d)break;p-=h}return n.descent=f-s,n.fontSize=n.ascent+n.descent,this.cache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=void 0===o?0:o,s=e.lineWidth,u=e.textBaseline,c=e.textAlign,l=e.letterSpacing,h=void 0===l?0:l,f=e.leading,p=void 0===f?0:f,d=gu(e),y=this.measureFont(d,n);0===y.fontSize&&(y.fontSize=r.value,y.ascent=r.value);var v=this.offscreenCanvas.getOrCreateContext(n);v.font=d;for(var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),m=new Array(g.length),b=0,T=0;T<g.length;T++){var w=v.measureText(g[T]).width+(g[T].length-1)*h;m[T]=w,b=Math.max(b,w)}var E=b+s.value,M=a||y.fontSize+s.value,k=Math.max(M,y.fontSize+s.value)+(g.length-1)*(M+p);M+=p;var P=0;return"middle"===u.value?P=-k/2:"bottom"===u.value||"alphabetic"===u.value||"ideographic"===u.value?P=-k:"top"!==u.value&&"hanging"!==u.value||(P=0),{font:d,width:E,height:k,lines:g,lineWidths:m,lineHeight:M,maxLineWidth:b,fontProperties:y,lineMetrics:m.map((function(t,e){var n=0;return"center"===c.value?n-=t/2:"right"!==c.value&&"end"!==c.value||(n-=t),new ra(n-s.value/2,P+e*M,t+s.value,M)}))}},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=void 0===i?0:i,a=e.letterSpacing,s=void 0===a?0:a,u=this.offscreenCanvas.getOrCreateContext(n),c=o+s,l=[],h=0,f=0,p={},d=function(t){return r.getFromCache(t,s,p,u)};return Array.from(t).forEach((function(e,n){var i=t[n-1],o=t[n+1],a=d(e);if(r.isNewline(e))return h++,f=0,void(l[h]="");if(f>0&&f+a>c){if(h++,f=0,l[h]="",r.isBreakingSpace(e))return;r.canBreakInLastChar(e)||(l=r.trimToBreakable(l),f=r.sumTextWidthByCache(l[h]||"",p)),r.shouldBreakByKinsokuShorui(e,o)&&(l=r.trimByKinsokuShorui(l),f+=d(i||""))}f+=a,l[h]=(l[h]||"")+e})),l.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&yf.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&yf.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=bt([],mt(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=r+1,a=r+(this.isBreakingSpace(i)?0:1);return e[e.length-1]+=n.slice(o,n.length),e[e.length-2]=n.slice(0,a),e},t.prototype.canBreakInLastChar=function(t){return!t||!vf.test(t)},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce((function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]}),0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!vf.test(t[e]))return e;return-1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},pt([O(df),dt("design:type",df)],t.prototype,"offscreenCanvas",void 0),t=pt([N()],t)}(),Tf=l.defineToken("GeometryUpdaterFactory"),wf=l.defineToken("GeometryAABBUpdater"),Ef=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r,r=t.x,i=t.y;return{width:2*n.value,height:2*n.value,x:r.value||0,y:i.value||0}},t=pt([N({token:{token:wf,named:Qs.CIRCLE}})],t)}(),Mf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry,i=t.x,o=t.y;return{width:2*n.value,height:2*r.value,x:i.value||0,y:o.value||0}},t=pt([N({token:{token:wf,named:Qs.ELLIPSE}})],t)}(),kf=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.x,i=t.y,o=t.width,a=t.height,s=0,u=0;return o instanceof $u&&o.unit===va.kPixels&&(s=o.value),a instanceof $u&&a.unit===va.kPixels&&(u=a.value),n&&!It(n)&&(s||(s=n.width),u||(u=n.height)),o instanceof $u&&(o.value=s),a instanceof $u&&(a.value=u),{width:s,height:u,x:r.value||0,y:i.value||0}},t=pt([N({token:[{token:wf,named:Qs.RECT},{token:wf,named:Qs.IMAGE},{token:wf,named:Qs.GROUP}]})],t)}(),Pf=function(){function t(){}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,u=t.fontVariant;return n&&o&&a&&s&&u&&r&&i},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,s=t.lineWidth,u=t.textBaseline,c=t.x,l=t.y,h=t.dx,f=t.dy,p=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return 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};var d=this.textService.measureText(i,t,p);t.metrics=d;var y=d.width,v=d.height,g=d.lineHeight,m=d.fontProperties,b=a.fromValues(y/2,v/2,0),T=[0,1],w=0;"center"===o.value?(w=s.value/2,T=[.5,1]):"right"!==o.value&&"end"!==o.value||(w=s.value,T=[1,1]);var E=0;return"middle"===u.value?E=b[1]:"top"===u.value||"hanging"===u.value?E=2*b[1]:"alphabetic"===u.value?E=g-m.ascent:"bottom"!==u.value&&"ideographic"!==u.value||(E=0),h&&(w+=h.value),f&&(E+=f.value),t.anchor=[new $u(T[0]),new $u(T[1]),new $u(0)],{width:2*b[0],height:2*b[1],x:c.value||0,y:l.value||0,offsetX:w,offsetY:E}},pt([O(bf),dt("design:type",bf)],t.prototype,"textService",void 0),t=pt([N({token:{token:wf,named:Qs.TEXT}})],t)}(),xf=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e.value,r.value),a=Math.max(e.value,r.value),s=Math.min(n.value,i.value);return{width:a-o,height:Math.max(n.value,i.value)-s,x:o,y:s}},t=pt([N({token:{token:wf,named:Qs.LINE}})],t)}(),Sf=function(){function t(){}return t.prototype.update=function(t){var e=t.points.points,n=Math.min.apply(Math,bt([],mt(e.map((function(t){return t[0]}))),!1)),r=Math.max.apply(Math,bt([],mt(e.map((function(t){return t[0]}))),!1)),i=Math.min.apply(Math,bt([],mt(e.map((function(t){return t[1]}))),!1));return{width:r-n,height:Math.max.apply(Math,bt([],mt(e.map((function(t){return t[1]}))),!1))-i,x:n,y:i}},t=pt([N({token:[{token:wf,named:Qs.POLYLINE},{token:wf,named:Qs.POLYGON}]})],t)}(),_f=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect,n=e.x,r=e.y;return{width:e.width,height:e.height,x:n,y:r}},t=pt([N({token:{token:wf,named:Qs.PATH}})],t)}(),Nf=Q((function(t){Object(f.decorate)(_(),ut.EventEmitter),t(Tt),t(sa),t({token:ia,useFactory:function(t){return function(){return t.container.get(oa)}}}),t({token:pa,useClass:da}),t(df),t(bf),t(Ef),t(Mf),t(kf),t(Pf),t(xf),t(Sf),t(_f),t({token:Tf,useFactory:function(t){var e={};return function(n){return e[n]||t.container.isBoundNamed(wf,n)&&(e[n]=t.container.getNamed(wf,n)),e[n]}}}),t(oh),t(rh),t(jl),t(Bl),t(Fl),t(Ul),t(Gl),t(zl),t(Hl),t(ql),t(Wl),t(Yl),t(Xl),t($l),t(Kl),t(Zl),t(Jl),t(Ql),t(th),t(eh)})),Af=function(){function t(t,e){this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.zoom=1,this.name=t,this.matrix=o.clone(e.matrix),this.right=a.clone(e.right),this.up=a.clone(e.up),this.forward=a.clone(e.forward),this.position=a.clone(e.position),this.focalPoint=a.clone(e.focalPoint),this.distanceVector=a.clone(e.distanceVector),this.azimuth=e.azimuth,this.elevation=e.elevation,this.roll=e.roll,this.relAzimuth=e.relAzimuth,this.relElevation=e.relElevation,this.relRoll=e.relRoll,this.dollyingStep=e.dollyingStep,this.distance=e.distance,this.zoom=e.zoom}return t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getRoll=function(){return this.roll},t.prototype.getZoom=function(){return this.zoom},t.prototype.retrieve=function(t){t.matrix=o.copy(t.matrix,this.matrix),t.right=a.copy(t.right,this.right),t.up=a.copy(t.up,this.up),t.forward=a.copy(t.forward,this.forward),t.position=a.copy(t.position,this.position),t.focalPoint=a.copy(t.focalPoint,this.focalPoint),t.distanceVector=a.copy(t.distanceVector,this.distanceVector),t.azimuth=this.azimuth,t.elevation=this.elevation,t.roll=this.roll,t.relAzimuth=this.relAzimuth,t.relElevation=this.relElevation,t.relRoll=this.relRoll,t.dollyingStep=this.dollyingStep,t.distance=this.distance,t.zoom=this.zoom},t}(),Of=l.defineToken("DefaultCamera");!function(t){t.ORBITING="ORBITING",t.EXPLORING="EXPLORING",t.TRACKING="TRACKING"}(sf||(sf={})),function(t){t.DEFAULT="DEFAULT",t.ROTATIONAL="ROTATIONAL",t.TRANSLATIONAL="TRANSLATIONAL",t.CINEMATIC="CINEMATIC"}(uf||(uf={})),function(t){t.ORTHOGRAPHIC="ORTHOGRAPHIC",t.PERSPECTIVE="PERSPECTIVE"}(cf||(cf={}));var Cf,If={UPDATED:"updated"},Rf=Math.PI/180,Df=180/Math.PI,Lf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.matrix=o.create(),e.right=a.fromValues(1,0,0),e.up=a.fromValues(0,1,0),e.forward=a.fromValues(0,0,1),e.position=a.fromValues(0,0,1),e.focalPoint=a.fromValues(0,0,0),e.distanceVector=a.fromValues(0,0,0),e.distance=1,e.azimuth=0,e.elevation=0,e.roll=0,e.relAzimuth=0,e.relElevation=0,e.relRoll=0,e.dollyingStep=0,e.maxDistance=1/0,e.minDistance=-1/0,e.zoom=1,e.rotateWorld=!1,e.fov=30,e.near=.1,e.far=1e3,e.aspect=1,e.projectionMatrix=o.create(),e.projectionMatrixInverse=o.create(),e.jitteredProjectionMatrix=void 0,e.type=sf.EXPLORING,e.trackingMode=uf.DEFAULT,e.projectionMode=cf.PERSPECTIVE,e.frustum=new $o,e.landmarks=[],e.orthoMatrix=o.create(),e}return lt(e,t),e.prototype.isOrtho=function(){return this.projectionMode===cf.ORTHOGRAPHIC},e.prototype.clone=function(){var t=new e;return t.setType(this.type,void 0),t},e.prototype.getProjectionMode=function(){return this.projectionMode},e.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.prototype.getFrustum=function(){return this.frustum},e.prototype.getPosition=function(){return this.position},e.prototype.getFocalPoint=function(){return this.focalPoint},e.prototype.getNear=function(){return this.near},e.prototype.getFar=function(){return this.far},e.prototype.getZoom=function(){return this.zoom},e.prototype.getOrthoMatrix=function(){return this.orthoMatrix},e.prototype.setType=function(t,e){return this.type=t,this.type===sf.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===sf.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},e.prototype.setTrackingMode=function(t){if(this.type!==sf.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.prototype.setWorldRotation=function(t){this.rotateWorld=t,this._getAngles()},e.prototype.getViewTransform=function(){return o.invert(o.create(),this.matrix)},e.prototype.getWorldTransform=function(){return this.matrix},e.prototype.jitterProjectionMatrix=function(t,e){var n=o.fromTranslation(o.create(),[t,e,0]);this.jitteredProjectionMatrix=o.multiply(o.create(),n,this.projectionMatrix)},e.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},e.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.prototype.setNear=function(t){return this.projectionMode===cf.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.prototype.setFar=function(t){return this.projectionMode===cf.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.prototype.setViewOffset=function(t,e,n,r,i,o){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=o,this.projectionMode===cf.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.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===cf.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.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===cf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===cf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.prototype.setPerspective=function(t,e,n,r){this.projectionMode=cf.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i=this.near*Math.tan(.5*Rf*this.fov)/this.zoom,s=2*i,u=this.aspect*s,c=-.5*u;if(void 0!==this.view&&this.view.enabled){var l=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/l,i-=this.view.offsetY*s/h,u*=this.view.width/l,s*=this.view.height/h}return qa(this.projectionMatrix,c,c+u,i,i-s,t,this.far),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.prototype.setOrthographic=function(t,e,n,r,i,s){this.projectionMode=cf.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=s;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=l-u,p=l+u,d=h+c,y=h-c;if(void 0!==this.view&&this.view.enabled){var v=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;p=(f+=v*this.view.offsetX)+v*this.view.width,y=(d-=g*this.view.offsetY)-g*this.view.height}return o.ortho(this.projectionMatrix,f,p,y,d,i,s),o.scale(this.projectionMatrix,this.projectionMatrix,a.fromValues(1,-1,1)),o.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this._setPosition(t,e,n),this.setFocalPoint(this.focalPoint),this},e.prototype.setFocalPoint=function(t,e,n){var r=a.fromValues(0,1,0);if(this.focalPoint=Ra(t,e,n),this.trackingMode===uf.CINEMATIC){var i=a.subtract(a.create(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var s=a.length(i),u=Math.asin(e/s)*Df,c=90+Math.atan2(n,t)*Df,l=o.create();o.rotateY(l,l,c*Rf),o.rotateX(l,l,u*Rf),r=a.transformMat4(a.create(),[0,1,0],l)}return o.invert(this.matrix,o.lookAt(o.create(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this},e.prototype.setDistance=function(t){if(!(this.distance===t||t<0)){this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=a.create();t=this.distance;var n=this.forward,r=this.focalPoint;return 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}},e.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},e.prototype.setMinDistance=function(t){return this.minDistance=t,this},e.prototype.changeAzimuth=function(t){return this.setAzimuth(this.azimuth+t),this},e.prototype.changeElevation=function(t){return this.setElevation(this.elevation+t),this},e.prototype.changeRoll=function(t){return this.setRoll(this.roll+t),this},e.prototype.setAzimuth=function(t){return this.azimuth=Ia(t),this.computeMatrix(),this._getAxes(),this.type===sf.ORBITING||this.type===sf.EXPLORING?this._getPosition():this.type===sf.TRACKING&&this._getFocalPoint(),this},e.prototype.getAzimuth=function(){return this.azimuth},e.prototype.setElevation=function(t){return this.elevation=Ia(t),this.computeMatrix(),this._getAxes(),this.type===sf.ORBITING||this.type===sf.EXPLORING?this._getPosition():this.type===sf.TRACKING&&this._getFocalPoint(),this},e.prototype.setRoll=function(t){return this.roll=Ia(t),this.computeMatrix(),this._getAxes(),this.type===sf.ORBITING||this.type===sf.EXPLORING?this._getPosition():this.type===sf.TRACKING&&this._getFocalPoint(),this},e.prototype.rotate=function(t,e,n){if(this.relElevation=Ia(e),this.relAzimuth=Ia(t),this.relRoll=Ia(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===sf.EXPLORING){var r=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*Rf),i=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*Rf),a=u.setAxisAngle(u.create(),[0,0,1],this.relRoll*Rf),s=u.multiply(u.create(),i,r);s=u.multiply(u.create(),s,a);var c=o.fromQuat(o.create(),s);o.translate(this.matrix,this.matrix,[0,0,-this.distance]),o.multiply(this.matrix,this.matrix,c),o.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return;this.computeMatrix()}return this._getAxes(),this.type===sf.ORBITING||this.type===sf.EXPLORING?this._getPosition():this.type===sf.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=Ra(t,e,0),r=a.clone(this.position);return a.add(r,r,a.scale(a.create(),this.right,n[0])),a.add(r,r,a.scale(a.create(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=a.clone(this.position),r=this.dollyingStep,i=this.distance+t*this.dollyingStep;return r=Math.max(Math.min(i,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===sf.ORBITING||this.type===sf.EXPLORING?this._getDistance():this.type===sf.TRACKING&&a.add(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n=e.position,r=e.focalPoint,i=e.roll,o=e.zoom,s=this.clone();s.setPosition(a.fromValues(n[0],n[1],n[2]||this.position[2])),s.setFocalPoint(a.fromValues(r[0],r[1],r[2]||this.focalPoint[2])),Ut(i)||s.setRoll(i),Ut(o)||s.setZoom(o);var u=new Af(t,s);return this.landmarks.push(u),u},e.prototype.setLandmark=function(t){var e=new Af(t,this);return this.landmarks.push(e),this},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=It(t)?this.landmarks.find((function(e){return e.name===t})):t;if(r){var i=Dt(e)?{duration:e}:e,o=i.easing,s=void 0===o?"ease":o,u=i.duration,c=void 0===u?1e3:u;if(0===c)return void r.retrieve(this);void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID);var l,h=r.getPosition(),f=r.getFocalPoint(),p=r.getZoom(),d=r.getRoll(),y=_s(s);this.canvas.requestAnimationFrame((function t(e){void 0===l&&(l=e);var r,i,o=e-l,s=y(o/c),u=a.create(),v=a.create();if(a.lerp(u,n.focalPoint,f,s),a.lerp(v,n.position,h,s),i=n.roll*(1-s)+d*s,r=n.zoom*(1-s)+p*s,n.setFocalPoint(u),n.setPosition(v),n.setRoll(i),n.setZoom(r),n.computeMatrix(),n.triggerUpdate(),a.dist(u,f)+a.dist(v,h)<=.01)return n.setFocalPoint(f),n.setPosition(h),n.setRoll(d),n.setZoom(p),void n.computeMatrix();o<c&&(n.landmarkAnimationID=n.canvas.requestAnimationFrame(t))}))}},e.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.prototype.computeMatrix=function(){var t=u.setAxisAngle(u.create(),[0,0,1],this.roll*Rf);o.identity(this.matrix);var e=u.setAxisAngle(u.create(),[1,0,0],(this.rotateWorld&&this.type!==sf.TRACKING||this.type===sf.TRACKING?1:-1)*this.elevation*Rf),n=u.setAxisAngle(u.create(),[0,1,0],(this.rotateWorld&&this.type!==sf.TRACKING||this.type===sf.TRACKING?1:-1)*this.azimuth*Rf),r=u.multiply(u.create(),n,e);r=u.multiply(u.create(),r,t);var i=o.fromQuat(o.create(),r);this.type===sf.ORBITING||this.type===sf.EXPLORING?(o.translate(this.matrix,this.matrix,this.focalPoint),o.multiply(this.matrix,this.matrix,i),o.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===sf.TRACKING&&(o.translate(this.matrix,this.matrix,this.position),o.multiply(this.matrix,this.matrix,i))},e.prototype._setPosition=function(t,e,n){this.position=Ra(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},e.prototype._getAxes=function(){a.copy(this.right,Ra(s.transformMat4(s.create(),[1,0,0,0],this.matrix))),a.copy(this.up,Ra(s.transformMat4(s.create(),[0,1,0,0],this.matrix))),a.copy(this.forward,Ra(s.transformMat4(s.create(),[0,0,1,0],this.matrix))),a.normalize(this.right,this.right),a.normalize(this.up,this.up),a.normalize(this.forward,this.forward)},e.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=a.length(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===sf.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*Df,this.azimuth=Math.atan2(-t,-n)*Df):(this.elevation=-Math.asin(e/r)*Df,this.azimuth=-Math.atan2(-t,-n)*Df)},e.prototype._getPosition=function(){a.copy(this.position,Ra(s.transformMat4(s.create(),[0,0,0,1],this.matrix))),this._getDistance()},e.prototype._getFocalPoint=function(){a.transformMat3(this.distanceVector,[0,0,-this.distance],i.fromMat4(i.create(),this.matrix)),a.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e.prototype._getDistance=function(){this.distanceVector=a.subtract(a.create(),this.focalPoint,this.position),this.distance=a.length(this.distanceVector),this.dollyingStep=this.distance/100},e.prototype._getOrthoMatrix=function(){if(this.projectionMode===cf.ORTHOGRAPHIC){var t=this.position,e=u.setAxisAngle(u.create(),[0,0,1],-this.roll*Math.PI/180);o.fromRotationTranslationScaleOrigin(this.orthoMatrix,e,a.fromValues((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),a.fromValues(this.zoom,this.zoom,1),t)}},e.prototype.triggerUpdate=function(){var t=this.getViewTransform(),e=o.multiply(o.create(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.emit(If.UPDATED)},e.ProjectionMode={ORTHOGRAPHIC:"ORTHOGRAPHIC",PERSPECTIVE:"PERSPECTIVE"},e}(ut.EventEmitter),Vf=function(){function t(t){this.plugins=[],this.config=ht({enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableTAA:!1},t)}return t.prototype.registerPlugin=function(t){this.plugins.push(t)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}(),jf=n(14),Bf=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.dirtycheck.tap(e.tag,(function(t){return t?t.renderable.dirty||n.renderingContext.renderReasons.has(fa.CAMERA_CHANGED)?t:null:t}))},t.tag="DirtyCheckPlugin",pt([O(wa),dt("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=pt([N({contrib:hf})],t)}(),Ff=l.defineToken("CullingStrategyContribution"),Uf=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this.strategyProvider.getContributions();t.hooks.cull.tap(e.tag,(function(t){if(t){var e=t.cullable;return 0===n.length?e.visible=!0:e.visible=n.every((function(e){return e.isVisible(t)})),!e.isCulled()&&t.isVisible()?t:null}return t})),t.hooks.afterRender.tap(e.tag,(function(t){t.cullable.visibilityPlaneMask=-1}))},t.tag="CullingPlugin",pt([st(Ff),dt("design:type",Object)],t.prototype,"strategyProvider",void 0),t=e=pt([N({contrib:hf})],t)}(),Gf=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(e){e.target.renderable.dirty=!0,t.dirtify()},i=function(){t.dirtify()},o=function(e){var r=e.target;n.styleValueRegistry.recalc(r),ha(r),t.dirtify()},a=function(e){ha(e.target),t.dirtify()};t.hooks.init.tap(e.tag,(function(){n.renderingContext.root.addEventListener(Xo.MOUNTED,o),n.renderingContext.root.addEventListener(Xo.UNMOUNTED,a),n.renderingContext.root.addEventListener(Xo.ATTR_MODIFIED,r),n.renderingContext.root.addEventListener(Xo.BOUNDS_CHANGED,i)})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(Xo.MOUNTED,o),n.renderingContext.root.removeEventListener(Xo.UNMOUNTED,a),n.renderingContext.root.removeEventListener(Xo.ATTR_MODIFIED,r),n.renderingContext.root.removeEventListener(Xo.BOUNDS_CHANGED,i)}))},t.tag="PrepareRendererPlugin",pt([O(wa),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([O(rh),dt("design:type",rh)],t.prototype,"styleValueRegistry",void 0),t=e=pt([N({contrib:hf})],t)}(),zf=[Qs.CIRCLE,Qs.ELLIPSE,Qs.IMAGE,Qs.RECT,Qs.LINE,Qs.POLYLINE,Qs.POLYGON,Qs.TEXT,Qs.PATH,Qs.HTML],Hf=function(){function t(){}return t.prototype.isVisible=function(t){var e,n,r=t.cullable;if(!r.enable)return!0;var i=t.getRenderBounds();if(Ho.isEmpty(i))return!1;var o=this.camera.getFrustum(),a=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,a||Do.INDETERMINATE,o.planes),r.visible=r.visibilityPlaneMask!==Do.OUTSIDE,r.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Do.OUTSIDE||n===Do.INSIDE)return n;for(var i=Do.INSIDE,o=zf.indexOf(t.nodeName)>-1,s=0,u=r.length;s<u;++s){var c=1<<s;if(0!=(n&c)&&(!o||4!==s&&5!==s)){var l=r[s],h=l.normal,f=l.distance;if(a.dot(h,e.getPositiveFarPoint(r[s]))+f<0)return Do.OUTSIDE;a.dot(h,e.getNegativeFarPoint(r[s]))+f<0&&(i|=c)}}return i},pt([O(Of),dt("design:type",Lf)],t.prototype,"camera",void 0),t=pt([N({contrib:Ff})],t)}(),qf=function(){function t(){var t=this;this.autoPreventDefault=!0,this.rootPointerEvent=new Xh(null),this.rootWheelEvent=new $h(null),this.onPointerMove=function(e){var n,r,i,o,a=null===(o=null===(i=t.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView;if(!a.supportTouchEvent||"touch"!==e.pointerType){var s=t.normalizeToPointerEvent(e,a);try{for(var u=gt(s),c=u.next();!c.done;c=u.next()){var l=c.value,h=t.bootstrapEvent(t.rootPointerEvent,l,a);t.eventService.mapEvent(h)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}t.setCursor(t.eventService.cursor)}}}var e;return e=t,t.prototype.apply=function(t){var n=this,r=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler((function(t){return yt(n,void 0,void 0,(function(){return vt(this,(function(e){switch(e.label){case 0:return[4,this.renderingService.hooks.pick.promise({position:t,picked:[],topmost:!0})];case 1:return[2,e.sent().picked[0]||null]}}))}))})),t.hooks.pointerWheel.tap(e.tag,(function(t){var e=n.normalizeWheelEvent(t);n.eventService.mapEvent(e)})),t.hooks.pointerDown.tap(e.tag,(function(t){var e,i;if(!r.supportTouchEvent||"touch"!==t.pointerType){var o=n.normalizeToPointerEvent(t,r);if(n.autoPreventDefault&&o[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var a=gt(o),s=a.next();!s.done;s=a.next()){var u=s.value,c=n.bootstrapEvent(n.rootPointerEvent,u,r);n.eventService.mapEvent(c)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}n.setCursor(n.eventService.cursor)}})),t.hooks.pointerUp.tap(e.tag,(function(t){var e,i;if(!r.supportTouchEvent||"touch"!==t.pointerType){var o=n.contextService.getDomElement(),a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":"",s=n.normalizeToPointerEvent(t,r);try{for(var u=gt(s),c=u.next();!c.done;c=u.next()){var l=c.value,h=n.bootstrapEvent(n.rootPointerEvent,l,r);h.type+=a,n.eventService.mapEvent(h)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}n.setCursor(n.eventService.cursor)}})),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.prototype.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var r=this.eventService.client2Viewport(new na(e.clientX,e.clientY)),i=r.x,o=r.y;t.viewport.x=i,t.viewport.y=o;var a=this.eventService.viewport2Canvas(t.viewport),s=a.x,u=a.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=bu[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.eventService.client2Viewport(new na(t.clientX,t.clientY)),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.eventService.viewport2Canvas(e.viewport),a=o.x,s=o.y;return e.canvas.x=a,e.canvas.y=s,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];Ut(i.button)&&(i.button=t.touches.length?1:0),Ut(i.buttons)&&(i.buttons=t.touches.length?1:0),Ut(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Ut(i.width)&&(i.width=i.radiusX||1),Ut(i.height)&&(i.height=i.radiusY||1),Ut(i.tiltX)&&(i.tiltX=0),Ut(i.tiltY)&&(i.tiltY=0),Ut(i.pointerType)&&(i.pointerType="touch"),Ut(i.pointerId)&&(i.pointerId=i.identifier||0),Ut(i.pressure)&&(i.pressure=i.force||.5),Ut(i.twist)&&(i.twist=0),Ut(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else if(e.isMouseEvent(t)){var o=t;Ut(o.isPrimary)&&(o.isPrimary=!0),Ut(o.width)&&(o.width=1),Ut(o.height)&&(o.height=1),Ut(o.tiltX)&&(o.tiltX=0),Ut(o.tiltY)&&(o.tiltY=0),Ut(o.pointerType)&&(o.pointerType="mouse"),Ut(o.pointerId)&&(o.pointerId=mu),Ut(o.pressure)&&(o.pressure=.5),Ut(o.twist)&&(o.twist=0),Ut(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,n.push(o)}else n.push(t);return n},t.tag="EventPlugin",pt([O(iu),dt("design:type",Object)],t.prototype,"canvasConfig",void 0),pt([O(ya),dt("design:type",Object)],t.prototype,"contextService",void 0),pt([O(ff),dt("design:type",ff)],t.prototype,"renderingService",void 0),pt([O(wa),dt("design:type",Object)],t.prototype,"renderingContext",void 0),pt([O(pf),dt("design:type",pf)],t.prototype,"eventService",void 0),t=e=pt([N({contrib:hf})],t)}(),Wf=Q((function(t){et.register(t,hf,{cache:!1}),et.register(t,Ff,{cache:!1}),t(ff),t(pf),t(qf),t(Gf),t(Bf),t(Uf),t(Hf)}));!function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize"}(Cf||(Cf={}));var Yf=function(t){function e(e){var n=t.call(this)||this;n.container=ot.createChild(),n.Element=Ih,n.inited=!1,n.document=new Wh,n.document.defaultView=n,n.customElements=new lf;var r=e.container,i=e.canvas,o=e.offscreenCanvas,a=e.width,s=e.height,u=e.devicePixelRatio,c=e.renderer,l=e.background,h=e.requestAnimationFrame,f=e.cancelAnimationFrame,p=e.createImage,d=e.supportPointerEvent,y=e.supportTouchEvent,v=e.isTouchEvent,g=e.isMouseEvent;Eu(r,n);var m=a,b=s,T=u;return i&&(T=(T=u||Mu&&window.devicePixelRatio||1)>=1?Math.ceil(T):1,m=a||i.width/T,b=s||i.height/T),n.devicePixelRatio=T,n.requestAnimationFrame=null!=h?h:jf.b.bind(globalThis),n.cancelAnimationFrame=null!=f?f:jf.a.bind(globalThis),n.supportTouchEvent=null!=y?y:"ontouchstart"in globalThis,n.supportPointerEvent=null!=d?d:!!globalThis.PointerEvent,n.isTouchEvent=null!=v?v:function(t){return n.supportTouchEvent&&t instanceof globalThis.TouchEvent},n.isMouseEvent=null!=g?g:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!n.supportPointerEvent||!(t instanceof globalThis.PointerEvent))},n.initRenderingContext({container:r,canvas:i,width:m,height:b,renderer:c,offscreenCanvas:o,devicePixelRatio:T,cursor:"default",background:l,createImage:p}),n.initDefaultCamera(m,b),n.initRenderer(c),n}return lt(e,t),e.prototype.initRenderingContext=function(t){var e=this;this.container.register({token:iu,useValue:t}),this.container.register({token:wa,useValue:{root:this.document.documentElement,renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(Xo.CHILD_INSERTED,(function(t){e.mountChildren(t.detail.child)})),this.document.documentElement.addEventListener(Xo.CHILD_REMOVED,(function(t){e.unmountChildren(t.detail.child)}))},e.prototype.initDefaultCamera=function(t,e){var n=(new Lf).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3);n.canvas=this;var r=this.container.get(wa);n.on(If.UPDATED,(function(){r.renderReasons.add(fa.CAMERA_CHANGED)})),this.container.register({token:Of,useValue:n})},e.prototype.getConfig=function(){return this.container.get(iu)},e.prototype.getContainer=function(){return this.container},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.container.get(Of)},e.prototype.getContextService=function(){return this.container.get(ya)},e.prototype.getEventService=function(){return this.eventService},e.prototype.getRenderingService=function(){return this.renderingService},e.prototype.getRenderingContext=function(){return this.container.get(wa)},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(this.readyPromise=new Promise((function(e){t.resolveReadyPromise=function(){e(t)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t){(void 0===t&&(t=!0),this.emit(Cf.BEFORE_DESTROY,(function(){})),this.frameId)&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var e=this.getRoot();this.unmountChildren(e),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),this.emit(Cf.AFTER_DESTROY,{})},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.container.get(iu);n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.container.get(Of),i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===cf.ORTHOGRAPHIC?r.setOrthographic(t/-2,t/2,e/2,e/-2,r.getNear(),r.getFar()):r.setAspect(t/e),this.emit(Cf.RESIZE,{width:t,height:e})},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t,e){return void 0===e&&(e=!0),this.document.documentElement.removeChild(t,e)},e.prototype.removeChildren=function(t){void 0===t&&(t=!0),this.document.documentElement.removeChildren(t)},e.prototype.render=function(){(this.emit(Cf.BEFORE_RENDER,{}),this.container.isBound(ff))&&this.container.get(ff).render(this.getConfig());this.emit(Cf.AFTER_RENDER,{})},e.prototype.run=function(){var t=this;!function e(){t.render(),t.frameId=requestAnimationFrame(e)}()},e.prototype.initRenderer=function(t){var e=this;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(t);var n=this.container.get(ya);this.renderingService=this.container.get(ff),this.eventService=this.container.get(pf),n.init(),this.renderingService.init().then((function(){e.emit(Cf.READY,{}),e.readyPromise&&e.resolveReadyPromise(),e.inited=!0})),t.getConfig().enableAutoRendering&&this.run(),this.getRoot().forEach((function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)})),this.mountChildren(this.getRoot())},e.prototype.loadCommonContainerModule=function(){this.container.unload(Wf),this.container.load(Wf,!0)},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach((function(t){t.init(e.container)}))},e.prototype.setRenderer=function(t){var e=this,n=this.getConfig();if(n.renderer!==t){var r=n.renderer;n.renderer=t,this.destroy(!1),null==r||r.getPlugins().reverse().forEach((function(t){t.destroy(e.container)})),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this,n=[];t.forEach((function(t){t.isConnected&&n.push(t)})),n.reverse().forEach((function(t){t.emit(Xo.UNMOUNTED,{}),t!==e.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.prototype.mountChildren=function(t){var e=this;t.forEach((function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.emit(Xo.MOUNTED,{}))}))},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(uh);ot.load(Nf)}])}));