@zyzgroup/core-web 0.1.90 → 0.1.93

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 (330) hide show
  1. package/dist/css/better.css +5 -0
  2. package/dist/css/font.css +108 -0
  3. package/dist/css/theme.css +85 -56
  4. package/dist/zyzgroup_core_web.iife.js +115 -36
  5. package/dist/zyzgroup_core_web.iife.js.map +1 -1
  6. package/dist/zyzgroup_core_web.js +25535 -20837
  7. package/dist/zyzgroup_core_web.js.map +1 -1
  8. package/dist/zyzgroup_core_web.umd.cjs +115 -36
  9. package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
  10. package/package.json +10 -2
  11. package/types/Pagination.d.ts +1 -1
  12. package/types/Pagination.d.ts.map +1 -1
  13. package/types/WebMonitor.d.ts +6 -0
  14. package/types/WebMonitor.d.ts.map +1 -1
  15. package/types/WebSocketClient.d.ts.map +1 -1
  16. package/types/animate/Timeline.d.ts.map +1 -1
  17. package/types/animate/index.d.ts +0 -1
  18. package/types/animate/index.d.ts.map +1 -1
  19. package/types/canvas/html-in-canvas.d.ts +1 -0
  20. package/types/canvas/html-in-canvas.d.ts.map +1 -0
  21. package/types/components/SideEffectTags.d.ts +25 -0
  22. package/types/components/SideEffectTags.d.ts.map +1 -0
  23. package/types/components/angular/demoAngular.d.ts +1 -0
  24. package/types/components/angular/demoAngular.d.ts.map +1 -0
  25. package/types/components/component-core.d.ts +34 -0
  26. package/types/components/component-core.d.ts.map +1 -0
  27. package/types/components/index.d.ts +3 -0
  28. package/types/components/index.d.ts.map +1 -0
  29. package/types/components/react/CatFriends.d.ts +2 -0
  30. package/types/components/react/CatFriends.d.ts.map +1 -0
  31. package/types/components/react/DemoForm.d.ts +2 -0
  32. package/types/components/react/DemoForm.d.ts.map +1 -0
  33. package/types/components/react/ErrorBoundary.d.ts +16 -0
  34. package/types/components/react/ErrorBoundary.d.ts.map +1 -0
  35. package/types/components/react/TravelPlan.d.ts +2 -0
  36. package/types/components/react/TravelPlan.d.ts.map +1 -0
  37. package/types/components/react/VideoPlayer.d.ts +5 -0
  38. package/types/components/react/VideoPlayer.d.ts.map +1 -0
  39. package/types/components/react/demoReact.d.ts +4 -0
  40. package/types/components/react/demoReact.d.ts.map +1 -0
  41. package/types/components/react/motion/Refresh.d.ts +4 -0
  42. package/types/components/react/motion/Refresh.d.ts.map +1 -0
  43. package/types/components/react/motion/demo/AddToBasket.d.ts +12 -0
  44. package/types/components/react/motion/demo/AddToBasket.d.ts.map +1 -0
  45. package/types/components/react/motion/demo/Cursor.d.ts +4 -0
  46. package/types/components/react/motion/demo/Cursor.d.ts.map +1 -0
  47. package/types/components/react/motion/demo/LayoutAnchor.d.ts +6 -0
  48. package/types/components/react/motion/demo/LayoutAnchor.d.ts.map +1 -0
  49. package/types/components/react/motion/demo/LayoutAnimation.d.ts +2 -0
  50. package/types/components/react/motion/demo/LayoutAnimation.d.ts.map +1 -0
  51. package/types/components/react/motion/demo/LayoutGroup.d.ts +2 -0
  52. package/types/components/react/motion/demo/LayoutGroup.d.ts.map +1 -0
  53. package/types/components/react/motion/demo/MotionDemo.d.ts +2 -0
  54. package/types/components/react/motion/demo/MotionDemo.d.ts.map +1 -0
  55. package/types/components/react/motion/demo/Navigation.d.ts +2 -0
  56. package/types/components/react/motion/demo/Navigation.d.ts.map +1 -0
  57. package/types/components/react/motion/demo/Reordering.d.ts +2 -0
  58. package/types/components/react/motion/demo/Reordering.d.ts.map +1 -0
  59. package/types/components/react/motion/demo/ScrollLinked.d.ts +2 -0
  60. package/types/components/react/motion/demo/ScrollLinked.d.ts.map +1 -0
  61. package/types/components/react/motion/demo/ScrollTriggered.d.ts +2 -0
  62. package/types/components/react/motion/demo/ScrollTriggered.d.ts.map +1 -0
  63. package/types/components/react/motion/demo/SharedLayoutAnimation.d.ts +2 -0
  64. package/types/components/react/motion/demo/SharedLayoutAnimation.d.ts.map +1 -0
  65. package/types/components/react/motion/demo/StateAnimations.d.ts +2 -0
  66. package/types/components/react/motion/demo/StateAnimations.d.ts.map +1 -0
  67. package/types/components/react/motion/demo/UseTransform.d.ts +2 -0
  68. package/types/components/react/motion/demo/UseTransform.d.ts.map +1 -0
  69. package/types/components/react/ssr/Html.d.ts +7 -0
  70. package/types/components/react/ssr/Html.d.ts.map +1 -0
  71. package/types/components/vnode.d.ts +12 -0
  72. package/types/components/vnode.d.ts.map +1 -0
  73. package/types/components/vue/demoVue.d.ts +16 -0
  74. package/types/components/vue/demoVue.d.ts.map +1 -0
  75. package/types/{hooks/useCookie.d.ts → createCookie.d.ts} +2 -2
  76. package/types/createCookie.d.ts.map +1 -0
  77. package/types/{hooks/useIndexDB.d.ts → createIndexDB.d.ts} +1 -1
  78. package/types/createIndexDB.d.ts.map +1 -0
  79. package/types/{hooks/useLocalStorage.d.ts → createLocalStorage.d.ts} +2 -2
  80. package/types/createLocalStorage.d.ts.map +1 -0
  81. package/types/{hooks/useSessionStorage.d.ts → createSessionStorage.d.ts} +2 -2
  82. package/types/createSessionStorage.d.ts.map +1 -0
  83. package/types/{hooks/useAttribute.d.ts → dom/attribute.d.ts} +3 -3
  84. package/types/dom/attribute.d.ts.map +1 -0
  85. package/types/dom/coords.d.ts +6 -0
  86. package/types/dom/coords.d.ts.map +1 -0
  87. package/types/{hooks/useElementEventBus.d.ts → dom/createElementEventBus.d.ts} +8 -8
  88. package/types/dom/createElementEventBus.d.ts.map +1 -0
  89. package/types/{hooks/useEventListener.d.ts → dom/createEventListener.d.ts} +7 -7
  90. package/types/dom/createEventListener.d.ts.map +1 -0
  91. package/types/dom/dataset.d.ts +7 -0
  92. package/types/dom/dataset.d.ts.map +1 -0
  93. package/types/{hooks/useElement.d.ts → dom/dom.d.ts} +10 -9
  94. package/types/dom/dom.d.ts.map +1 -0
  95. package/types/{hooks/useElementEvents.d.ts → dom/elementEvents.d.ts} +25 -85
  96. package/types/dom/elementEvents.d.ts.map +1 -0
  97. package/types/{hooks/useFeRouteChange.d.ts → dom/feRouteChange.d.ts} +6 -6
  98. package/types/dom/feRouteChange.d.ts.map +1 -0
  99. package/types/dom/index.d.ts +15 -0
  100. package/types/dom/index.d.ts.map +1 -1
  101. package/types/dom/intersection.d.ts +4 -0
  102. package/types/dom/intersection.d.ts.map +1 -0
  103. package/types/dom/matchMedia.d.ts +3 -0
  104. package/types/dom/matchMedia.d.ts.map +1 -0
  105. package/types/{hooks/useMutation.d.ts → dom/mutation.d.ts} +2 -2
  106. package/types/dom/mutation.d.ts.map +1 -0
  107. package/types/dom/resize.d.ts +9 -0
  108. package/types/dom/resize.d.ts.map +1 -0
  109. package/types/{hooks/useSafeArea.d.ts → dom/safeArea.d.ts} +2 -2
  110. package/types/dom/safeArea.d.ts.map +1 -0
  111. package/types/{hooks/useStyle.d.ts → dom/style.d.ts} +1 -1
  112. package/types/dom/style.d.ts.map +1 -0
  113. package/types/dom/visible.d.ts +7 -0
  114. package/types/dom/visible.d.ts.map +1 -0
  115. package/types/file.d.ts +9 -15
  116. package/types/file.d.ts.map +1 -1
  117. package/types/hooks/alimini/createAliMiniControllableState.d.ts +12 -0
  118. package/types/hooks/alimini/createAliMiniControllableState.d.ts.map +1 -0
  119. package/types/hooks/core/index.d.ts +3 -0
  120. package/types/hooks/core/index.d.ts.map +1 -0
  121. package/types/hooks/core/reduxStore.d.ts +30 -0
  122. package/types/hooks/core/reduxStore.d.ts.map +1 -0
  123. package/types/hooks/core/stateStore.d.ts +10 -0
  124. package/types/hooks/core/stateStore.d.ts.map +1 -0
  125. package/types/hooks/index.d.ts +3 -22
  126. package/types/hooks/index.d.ts.map +1 -1
  127. package/types/hooks/react/index.d.ts +5 -0
  128. package/types/hooks/react/index.d.ts.map +1 -0
  129. package/types/hooks/react/useAnimationLoop.d.ts +2 -0
  130. package/types/hooks/react/useAnimationLoop.d.ts.map +1 -0
  131. package/types/hooks/react/useAppState.d.ts +15 -0
  132. package/types/hooks/react/useAppState.d.ts.map +1 -0
  133. package/types/hooks/react/useDelayedValue.d.ts +2 -0
  134. package/types/hooks/react/useDelayedValue.d.ts.map +1 -0
  135. package/types/hooks/react/useDimensions.d.ts +5 -0
  136. package/types/hooks/react/useDimensions.d.ts.map +1 -0
  137. package/types/hooks/react/useDoublePress.d.ts +3 -0
  138. package/types/hooks/react/useDoublePress.d.ts.map +1 -0
  139. package/types/hooks/react/useFadeIn.d.ts +3 -0
  140. package/types/hooks/react/useFadeIn.d.ts.map +1 -0
  141. package/types/hooks/react/useFetch.d.ts +2 -0
  142. package/types/hooks/react/useFetch.d.ts.map +1 -0
  143. package/types/hooks/react/useFormInput.d.ts +5 -0
  144. package/types/hooks/react/useFormInput.d.ts.map +1 -0
  145. package/types/hooks/react/useImmer.d.ts +9 -0
  146. package/types/hooks/react/useImmer.d.ts.map +1 -0
  147. package/types/hooks/react/useMailbox.d.ts +4 -0
  148. package/types/hooks/react/useMailbox.d.ts.map +1 -0
  149. package/types/hooks/react/useMinDisplayTime.d.ts +2 -0
  150. package/types/hooks/react/useMinDisplayTime.d.ts.map +1 -0
  151. package/types/hooks/react/useOnlineStatus.d.ts +2 -0
  152. package/types/hooks/react/useOnlineStatus.d.ts.map +1 -0
  153. package/types/hooks/react/usePointerPosition.d.ts +5 -0
  154. package/types/hooks/react/usePointerPosition.d.ts.map +1 -0
  155. package/types/hooks/react/useProgressBar.d.ts +1 -0
  156. package/types/hooks/react/useProgressBar.d.ts.map +1 -0
  157. package/types/hooks/react/useQuery.d.ts +12 -0
  158. package/types/hooks/react/useQuery.d.ts.map +1 -0
  159. package/types/hooks/react/useReactControllableState.d.ts +10 -0
  160. package/types/hooks/react/useReactControllableState.d.ts.map +1 -0
  161. package/types/hooks/react/useTimeout.d.ts +2 -0
  162. package/types/hooks/react/useTimeout.d.ts.map +1 -0
  163. package/types/hooks/react/useTimer.d.ts +2 -0
  164. package/types/hooks/react/useTimer.d.ts.map +1 -0
  165. package/types/hooks/useDraw/DrawContext.d.ts +3 -3
  166. package/types/hooks/useDraw/DrawContext.d.ts.map +1 -1
  167. package/types/hooks/useDraw/Shape.d.ts +2 -2
  168. package/types/hooks/useDraw/Shape.d.ts.map +1 -1
  169. package/types/hooks/useDraw/line/Arc.d.ts +1 -1
  170. package/types/hooks/useDraw/line/Arc.d.ts.map +1 -1
  171. package/types/hooks/useDraw/line/CubicBezier.d.ts +1 -1
  172. package/types/hooks/useDraw/line/CubicBezier.d.ts.map +1 -1
  173. package/types/hooks/useDraw/line/L.d.ts +1 -1
  174. package/types/hooks/useDraw/line/L.d.ts.map +1 -1
  175. package/types/hooks/useDraw/line/PathD.d.ts +1 -1
  176. package/types/hooks/useDraw/line/PathD.d.ts.map +1 -1
  177. package/types/hooks/useDraw/line/QuadraticBezier.d.ts +1 -1
  178. package/types/hooks/useDraw/line/QuadraticBezier.d.ts.map +1 -1
  179. package/types/hooks/useDraw/shapes/ArrowShape.d.ts +1 -1
  180. package/types/hooks/useDraw/shapes/ArrowShape.d.ts.map +1 -1
  181. package/types/hooks/useDraw/shapes/BallShape.d.ts +1 -1
  182. package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -1
  183. package/types/hooks/useDraw/shapes/ConfettiShapeCombo.d.ts.map +1 -1
  184. package/types/hooks/useDraw/shapes/CurveShape.d.ts +1 -1
  185. package/types/hooks/useDraw/shapes/CurveShape.d.ts.map +1 -1
  186. package/types/hooks/useDraw/shapes/EllipseShape.d.ts +1 -1
  187. package/types/hooks/useDraw/shapes/EllipseShape.d.ts.map +1 -1
  188. package/types/hooks/useDraw/shapes/FoxShape.d.ts +1 -1
  189. package/types/hooks/useDraw/shapes/FoxShape.d.ts.map +1 -1
  190. package/types/hooks/useDraw/shapes/HeartShape.d.ts +1 -1
  191. package/types/hooks/useDraw/shapes/HeartShape.d.ts.map +1 -1
  192. package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts +1 -1
  193. package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts.map +1 -1
  194. package/types/hooks/useDraw/shapes/LineShape.d.ts +1 -1
  195. package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -1
  196. package/types/hooks/useDraw/shapes/PointsShape.d.ts +1 -1
  197. package/types/hooks/useDraw/shapes/PointsShape.d.ts.map +1 -1
  198. package/types/hooks/useDraw/shapes/RabbitShape.d.ts +1 -1
  199. package/types/hooks/useDraw/shapes/RabbitShape.d.ts.map +1 -1
  200. package/types/hooks/useDraw/shapes/RectShape.d.ts +1 -1
  201. package/types/hooks/useDraw/shapes/RectShape.d.ts.map +1 -1
  202. package/types/hooks/useDraw/shapes/RingShape.d.ts +1 -1
  203. package/types/hooks/useDraw/shapes/RingShape.d.ts.map +1 -1
  204. package/types/hooks/useDraw/shapes/StarShape.d.ts +1 -1
  205. package/types/hooks/useDraw/shapes/StarShape.d.ts.map +1 -1
  206. package/types/hooks/useDraw/shapes/TextShape.d.ts +1 -1
  207. package/types/hooks/useDraw/shapes/TextShape.d.ts.map +1 -1
  208. package/types/hooks/useLocale/useLocale.d.ts +2 -2
  209. package/types/hooks/useLocale/useLocale.d.ts.map +1 -1
  210. package/types/hooks/vue/index.d.ts +3 -0
  211. package/types/hooks/vue/index.d.ts.map +1 -0
  212. package/types/hooks/vue/useAppState.d.ts +13 -0
  213. package/types/hooks/vue/useAppState.d.ts.map +1 -0
  214. package/types/hooks/vue/useVueControllableState.d.ts +11 -0
  215. package/types/hooks/vue/useVueControllableState.d.ts.map +1 -0
  216. package/types/hooks/wxmini/createWxMiniControllableState.d.ts +12 -0
  217. package/types/hooks/wxmini/createWxMiniControllableState.d.ts.map +1 -0
  218. package/types/index.d.ts +7 -8
  219. package/types/index.d.ts.map +1 -1
  220. package/types/math/BufferAttribute.d.ts +0 -71
  221. package/types/math/BufferAttribute.d.ts.map +1 -1
  222. package/types/math/Euler.d.ts +0 -32
  223. package/types/math/Euler.d.ts.map +1 -1
  224. package/types/math/Matrix.d.ts +0 -6
  225. package/types/math/Matrix.d.ts.map +1 -1
  226. package/types/math/Quaternion.d.ts +0 -51
  227. package/types/math/Quaternion.d.ts.map +1 -1
  228. package/types/math/Shape.d.ts +5 -4
  229. package/types/math/Shape.d.ts.map +1 -1
  230. package/types/math/Vector.d.ts +0 -11
  231. package/types/math/Vector.d.ts.map +1 -1
  232. package/types/math/core/Box3.d.ts +0 -45
  233. package/types/math/core/Box3.d.ts.map +1 -1
  234. package/types/math/core/Frustum.d.ts +0 -22
  235. package/types/math/core/Frustum.d.ts.map +1 -1
  236. package/types/math/core/Object3D.d.ts +0 -95
  237. package/types/math/core/Object3D.d.ts.map +1 -1
  238. package/types/math/core/Plane.d.ts +0 -30
  239. package/types/math/core/Plane.d.ts.map +1 -1
  240. package/types/math/core/Ray.d.ts +0 -31
  241. package/types/math/core/Ray.d.ts.map +1 -1
  242. package/types/math/core/Sphere.d.ts +0 -28
  243. package/types/math/core/Sphere.d.ts.map +1 -1
  244. package/types/math/core/Triangle.d.ts +0 -33
  245. package/types/math/core/Triangle.d.ts.map +1 -1
  246. package/types/math/index.d.ts +0 -1
  247. package/types/math/index.d.ts.map +1 -1
  248. package/types/math/line/Arc.d.ts +2 -2
  249. package/types/math/line/Arc.d.ts.map +1 -1
  250. package/types/math/line/CubicBezier.d.ts +2 -2
  251. package/types/math/line/CubicBezier.d.ts.map +1 -1
  252. package/types/math/line/L.d.ts +2 -2
  253. package/types/math/line/L.d.ts.map +1 -1
  254. package/types/math/line/PathD.d.ts +6 -6
  255. package/types/math/line/PathD.d.ts.map +1 -1
  256. package/types/math/line/QuadraticBezier.d.ts +2 -2
  257. package/types/math/line/QuadraticBezier.d.ts.map +1 -1
  258. package/types/math/shapes/Light3D.d.ts +2 -2
  259. package/types/math/shapes/Light3D.d.ts.map +1 -1
  260. package/types/math/shapes/Point3D.d.ts +2 -2
  261. package/types/math/shapes/Point3D.d.ts.map +1 -1
  262. package/types/math/shapes/Point3Ds.d.ts +2 -2
  263. package/types/math/shapes/Point3Ds.d.ts.map +1 -1
  264. package/types/motion.d.ts +7 -0
  265. package/types/motion.d.ts.map +1 -0
  266. package/types/{hooks/useServiceWorker.d.ts → serviceWorker.d.ts} +1 -1
  267. package/types/serviceWorker.d.ts.map +1 -0
  268. package/types/svg/SVGParse.d.ts +1 -1
  269. package/types/svg/SVGParse.d.ts.map +1 -1
  270. package/types/svg/SVGUtil.d.ts.map +1 -0
  271. package/types/svg/index.d.ts +2 -1
  272. package/types/svg/index.d.ts.map +1 -1
  273. package/types/theme.d.ts +57 -0
  274. package/types/theme.d.ts.map +1 -0
  275. package/types/Context.d.ts +0 -36
  276. package/types/Context.d.ts.map +0 -1
  277. package/types/MVVM.d.ts +0 -12
  278. package/types/MVVM.d.ts.map +0 -1
  279. package/types/animate/schedule.d.ts +0 -15
  280. package/types/animate/schedule.d.ts.map +0 -1
  281. package/types/color.d.ts +0 -111
  282. package/types/color.d.ts.map +0 -1
  283. package/types/env.d.ts +0 -23
  284. package/types/env.d.ts.map +0 -1
  285. package/types/hooks/useAttribute.d.ts.map +0 -1
  286. package/types/hooks/useCookie.d.ts.map +0 -1
  287. package/types/hooks/useCoords.d.ts +0 -6
  288. package/types/hooks/useCoords.d.ts.map +0 -1
  289. package/types/hooks/useDataset.d.ts +0 -4
  290. package/types/hooks/useDataset.d.ts.map +0 -1
  291. package/types/hooks/useDraw/svg/SVGParse.d.ts +0 -16
  292. package/types/hooks/useDraw/svg/SVGParse.d.ts.map +0 -1
  293. package/types/hooks/useDraw/svg/SVGUtil.d.ts.map +0 -1
  294. package/types/hooks/useDraw/svg/index.d.ts +0 -4
  295. package/types/hooks/useDraw/svg/index.d.ts.map +0 -1
  296. package/types/hooks/useDraw/svg/line2c.d.ts +0 -5
  297. package/types/hooks/useDraw/svg/line2c.d.ts.map +0 -1
  298. package/types/hooks/useElement.d.ts.map +0 -1
  299. package/types/hooks/useElementEventBus.d.ts.map +0 -1
  300. package/types/hooks/useElementEvents.d.ts.map +0 -1
  301. package/types/hooks/useEventListener.d.ts.map +0 -1
  302. package/types/hooks/useFeRouteChange.d.ts.map +0 -1
  303. package/types/hooks/useFetch.d.ts +0 -14
  304. package/types/hooks/useFetch.d.ts.map +0 -1
  305. package/types/hooks/useIndexDB.d.ts.map +0 -1
  306. package/types/hooks/useIntersection.d.ts +0 -4
  307. package/types/hooks/useIntersection.d.ts.map +0 -1
  308. package/types/hooks/useLocalStorage.d.ts.map +0 -1
  309. package/types/hooks/useMatchMedia.d.ts +0 -3
  310. package/types/hooks/useMatchMedia.d.ts.map +0 -1
  311. package/types/hooks/useMutation.d.ts.map +0 -1
  312. package/types/hooks/useResize.d.ts +0 -9
  313. package/types/hooks/useResize.d.ts.map +0 -1
  314. package/types/hooks/useSafeArea.d.ts.map +0 -1
  315. package/types/hooks/useServiceWorker.d.ts.map +0 -1
  316. package/types/hooks/useSessionStorage.d.ts.map +0 -1
  317. package/types/hooks/useStyle.d.ts.map +0 -1
  318. package/types/hooks/useTheme.d.ts +0 -9
  319. package/types/hooks/useTheme.d.ts.map +0 -1
  320. package/types/hooks/useVisible.d.ts +0 -10
  321. package/types/hooks/useVisible.d.ts.map +0 -1
  322. package/types/hooks/useVnode.d.ts +0 -7
  323. package/types/hooks/useVnode.d.ts.map +0 -1
  324. package/types/signature.d.ts +0 -30
  325. package/types/signature.d.ts.map +0 -1
  326. package/types/svg/DOMSVGUtil.d.ts +0 -20
  327. package/types/svg/DOMSVGUtil.d.ts.map +0 -1
  328. package/types/vnode.d.ts +0 -18
  329. package/types/vnode.d.ts.map +0 -1
  330. /package/types/{hooks/useDraw/svg → svg}/SVGUtil.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- var ZYZGroupCoreWeb=function(m){"use strict";const ef=Function("return this")();function nf(){const s=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,t=typeof window=="object"&&window&&window.Object===Object&&window,e=typeof global=="object"&&global&&global.Object===Object&&global,n=typeof self=="object"&&self&&self.Object===Object&&self;return s||t||e||n||ef}const ht=nf(),_a="@YZ/";function sf(s,t=_a){return s.startsWith(t)}function Ca(s,t=_a){return sf(s,t)?s:`${t}${s}`}function Ea(s){return typeof s=="string"&&s.startsWith("Symbol(")&&s.endsWith(")")}function Pa(s){return Ea(s)&&(s=s.slice(7,-1)),s}function Ei(s){return s=Pa(s),s=Ca(s),typeof Symbol=="function"?Symbol(s):`Symbol(${s})`}const rf=Ei("META");function Ta(s){if(!Ea(s))return s;switch(s=Pa(s),s){case Ca("META"):return rf;default:return Ei(s)}}function Pi(s){if(Array.isArray(s))return s.map(Pi);if(s&&typeof s=="object"){const t={};for(const e of Reflect.ownKeys(s)){const n=s[e];t[typeof e=="symbol"?e.toString():e]=typeof n=="symbol"?n.toString():Pi(n)}return t}return typeof s=="symbol"?s.toString():s}function Ti(s){if(Array.isArray(s))return s.map(Ti);if(s&&typeof s=="object"){const t={};for(const e of Object.keys(s))t[Ta(e)]=Ti(s[e]);return t}return Ta(s)}function Ai(s){return JSON.stringify(Pi(s))}const Mi=Ai;function Aa(s){return Ti(JSON.parse(s))}var Et=(s=>(s.UNKNOWN="",s.TEXT="text/plain",s.MD="text/plain",s.HTML="text/html",s.XML_TEXT="text/xml",s.CSS="text/css",s.JPEG="image/jpeg",s.PNG="image/png",s.GIF="image/gif",s.BMP="image/bmp",s.WEBP="image/webp",s.SVG="image/svg+xml",s.ICON="image/x-icon",s.MICROSOFT_ICON="image/vnd.microsoft.icon",s.MPEG="audio/mpeg",s.MP3="audio/mpeg",s.MP4="video/mp4",s.OGG="audio/ogg",s.WAV="audio/wav",s.MIDI="audio/midi",s.WEBM="video/webm",s.VIDEO_OGG="video/ogg",s.OCTET_STREAM="application/octet-stream",s.JAVASCRIPT="application/javascript",s.ECMASCRIPT="application/ecmascript",s.JSON="application/json",s.XML="application/xml",s.XHTML="application/xhtml+xml",s.XWWW="application/x-www-form-urlencoded",s.DOC="application/msword",s.CSV="application/x-csv",s.EXCEL="application/vnb.ms-excel",s.PPT="application/vnb.mspowerpoint",s.PDF="application/pdf",s.ZIP="application/zip",s.TGZ="application/x-gtar",s.TAR_GZ="application/x-gzip",s.EOT="appliaction/vnd.ms-fontobject",s.TTF="aplication/font-sfnt",s.PKCS12="aplication/pkcs12",s))(Et||{}),ps=(s=>(s.ascii="ascii",s.utf8="utf8",s.utf16le="utf16le",s.ucs2="ucs2",s.base64="base64",s.base64url="base64url",s.latin1="latin1",s.binary="binary",s.hex="hex",s))(ps||{}),Ut=(s=>(s.text="text",s.dataURL="dataURL",s.binaryString="binaryString",s.arraybuffer="arraybuffer",s))(Ut||{}),An=(s=>(s.md5="md5",s.sha1="sha1",s.sha256="sha256",s.SHA256="SHA-256",s.sha512="sha512",s.SHA512="SHA-512",s.AESGCM="AES-GCM",s.ECDSA="ECDSA",s))(An||{});const gs=s=>{let t=null;switch(s){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(gs("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
1
+ var ZYZGroupCoreWeb=function(y){"use strict";function Ip(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in n)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Rp=Function("return this")();function kp(){const n=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,t=typeof window=="object"&&window&&window.Object===Object&&window,e=typeof global=="object"&&global&&global.Object===Object&&global,r=typeof self=="object"&&self&&self.Object===Object&&self;return n||t||e||r||this||Rp}const K=kp(),Oo={env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:"",versions:{node:void 0,bun:void 0},...typeof process=="object"&&process?process:{}};({...Oo.env});const au="@YZ/";function Lp(n,t=au){return n.startsWith(t)}function Np(n,t=au){return Lp(n,t)?n:`${t}${n}`}function zp(n){return typeof n=="string"&&n.startsWith("Symbol(")&&n.endsWith(")")}function Fp(n){return zp(n)&&(n=n.slice(7,-1)),n}function Bp(n){return n=Fp(n),n=Np(n),typeof Symbol=="function"?Symbol(n):`Symbol(${n})`}Bp("META");const Io=NaN,$p=Symbol("NO_VALUE"),Rs={immediate:0,high:100,normal:200,low:300,idle:400};function ks(n){return"dispatch"in n}var Ne=(n=>(n[n["text/plain"]=0]="text/plain",n[n["text/html"]=1]="text/html",n[n["text/xml"]=2]="text/xml",n[n["text/css"]=3]="text/css",n[n["image/jpeg"]=4]="image/jpeg",n[n["image/png"]=5]="image/png",n[n["image/gif"]=6]="image/gif",n[n["image/bmp"]=7]="image/bmp",n[n["image/webp"]=8]="image/webp",n[n["image/svg+xml"]=9]="image/svg+xml",n[n["image/x-icon"]=10]="image/x-icon",n[n["image/vnd.microsoft.icon"]=11]="image/vnd.microsoft.icon",n[n["image/octet-stream"]=12]="image/octet-stream",n[n["audio/mpeg"]=13]="audio/mpeg",n[n["video/mp4"]=14]="video/mp4",n[n["audio/ogg"]=15]="audio/ogg",n[n["audio/wav"]=16]="audio/wav",n[n["audio/midi"]=17]="audio/midi",n[n["video/webm"]=18]="video/webm",n[n["video/ogg"]=19]="video/ogg",n[n["application/octet-stream"]=20]="application/octet-stream",n[n["application/javascript"]=21]="application/javascript",n[n["application/ecmascript"]=22]="application/ecmascript",n[n["application/json"]=23]="application/json",n[n["application/xml"]=24]="application/xml",n[n["application/xhtml+xml"]=25]="application/xhtml+xml",n[n["application/x-www-form-urlencoded"]=26]="application/x-www-form-urlencoded",n[n["application/msword"]=27]="application/msword",n[n["application/x-csv"]=28]="application/x-csv",n[n["application/vnb.ms-excel"]=29]="application/vnb.ms-excel",n[n["application/vnb.mspowerpoint"]=30]="application/vnb.mspowerpoint",n[n["application/pdf"]=31]="application/pdf",n[n["application/zip"]=32]="application/zip",n[n["application/x-gtar"]=33]="application/x-gtar",n[n["application/x-gzip"]=34]="application/x-gzip",n[n["appliaction/vnd.ms-fontobject"]=35]="appliaction/vnd.ms-fontobject",n[n["aplication/font-sfnt"]=36]="aplication/font-sfnt",n[n["aplication/pkcs12"]=37]="aplication/pkcs12",n))(Ne||{}),ve=(n=>(n[n.text=0]="text",n[n.dataURL=1]="dataURL",n[n.binaryString=2]="binaryString",n[n.arraybuffer=3]="arraybuffer",n))(ve||{});const Ls={ascii:"ascii",utf8:"utf8","utf-8":"utf-8",utf16le:"utf16le","utf-16le":"utf-16le",ucs2:"ucs2","ucs-2":"ucs-2",base64:"base64",base64url:"base64url",latin1:"latin1",binary:"binary",hex:"hex"},Ns=n=>{let t=null;switch(n){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(Ns("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
2
2
  [\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
3
3
  |[\u{4E00}-\u{9FCC}]
4
4
  |[\u{3400}-\u{4DB5}]
@@ -7,38 +7,124 @@ var ZYZGroupCoreWeb=function(m){"use strict";const ef=Function("return this")();
7
7
  |[\u{2B740}-\u{2B81D}]
8
8
  |[\u{2B820}-\u{2CEAF}]
9
9
  |[\u{2CEB0}-\u{2EBEF}]
10
- `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},ue=(s,t)=>(typeof s=="string"&&(s=gs(s)||new RegExp(s)),s.test(t)),Ma=(s,t)=>{typeof s=="string"&&(s=gs(s)||new RegExp(s));const e=t.match(s);return e?s.flags.toLowerCase().indexOf("g")>=0?e.map(n=>({matchIndex:-1,fullMatch:n,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},Ia=(s,t)=>{typeof s=="string"&&(s=gs(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const i of n)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function of(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function ka(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}function Mn(s=12,t="all"){let e="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789";t=="number"&&(e="0123456789");const n=e.length;let i="";for(let r=0;r<s;r++)i+=e[Math.floor(Math.random()*n)];return i}function af(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const mt=(s,t="-")=>{let e=s.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const n=new RegExp(`^${t}`);return n.test(s)||(e=e.replace(n,"")),e};function hf(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Da(s){return af(hf(s))}function La(s){let t="";for(let e=0,n=s.length;e<n;e++){const i=s.charCodeAt(e);i>=1&&i<=127?t+=s.charAt(e):i>2047?(t+=String.fromCharCode(224|i>>12&15),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|i>>0&63)):(t+=String.fromCharCode(192|i>>6&31),t+=String.fromCharCode(128|i>>0&63))}return t}function cf(s){return s.slice(0)}function lf(s,t=!0){const e=t?cf(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}const In={THROW:1,DROP:2,SLIDE:3,EXPAND:4};class uf{queue;limit;overflow;constructor(t=10,e=In.EXPAND){this.queue=[],this.limit=t,this.overflow=e}length(){return this.queue.length}isEmpty(){return this.length()===0}findIndex(t){return this.queue.findIndex(t)}deleteIndex(t){return!!this.queue.splice(t,1).length}delete(t){const e=this.findIndex(t);return e>-1?this.deleteIndex(e):!1}enqueue(t){if(this.length()<this.limit){this.queue.push(t);return}switch(this.overflow){case In.EXPAND:this.limit*=2,this.queue.push(t);break;case In.SLIDE:this.deleteIndex(0),this.queue.push(t);break;case In.THROW:throw new Error(`Queue limit(${this.limit}) overflow!`)}}push(t){this.enqueue(t)}put(t){this.enqueue(t)}dequeue(){return this.queue.shift()}pop(){return this.dequeue()}take(){return this.dequeue()}peek(){return this.queue[0]}index(t){return this.queue[t]}clear(){this.queue=[]}flush(){const t=[];let e;for(;e=this.dequeue();)t.push(e);return t}}const ff=s=>new uf(s,In.EXPAND);function df(s){return Number.isNaN(s)}function mf(s){if(s<=1)return!1;for(let t=2;t<=Math.sqrt(s);t++)if(s%t===0)return!1;return!0}function pf(s){for(;!mf(s);)s++;return s}function Wt(s,t){const e=parseFloat(s);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}function Ii(s=1e-6){return function(t,e){return Math.abs(t-e)<s}}function B(s,t,e){const n=Math.min(t,e),i=Math.max(t,e);return s<n?n:s>i?i:s}function gf(s,t){return(s%t+t)%t}function ys(s,t,e){return typeof s=="number"&&typeof t=="number"?(1-e)*s+e*t:typeof s=="number"?s:typeof t=="number"?t:0}function yf(s,t,e){const n=Math.max(s.length,t.length),i=new Array(n);for(let r=0;r<n;r++)i[r]=ys(s[r],t[r],e);return i}function wf(s,t,e){return n=>{const i=B(n,s,t);return e==0?i:t-i<e?t:Math.round(i/e)*e}}function bf(s,t=12){return Wt(s,0).toFixed(t)}function F(s,t=12){return+bf(s,t)}function ki(s,t){const e=Ma("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Uf(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(e.matchIndex+e.fullMatch.length):""}}function Di(s){const t=Ma("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const Ra={SLIDE:1,EXPAND:2};class xf{size;table;objectSignature;overflow;ttl;constructor(t){this.table=new Array(t?.size||137),this.size=this.table.length,this.objectSignature=t?.objectSignature||(e=>String(e)),this.overflow=t?.overflow||Ra.EXPAND,this.ttl=t?.ttl||6e4}hash(t){if(t==null||t==null)throw new Error("HashTable can't put undefined or null");const e=this.objectSignature(t),n=31;let i=0;for(let r=0,o=e.length;r<o;r++)i+=n*i+e.charCodeAt(r);return i%this.size}resize(){const t=this.size,e=pf(this.size*2),n=new Array(e),i=this.table;this.table=n,this.size=e;for(let r=0,o=t;r<o;r++)if(i[r]!==void 0&&!this.isOutdated(i[r])){let a=this.hash(i[r].value);for(;n[a]!==void 0;)a=(a+1)%e;n[a]=i[r]}i.length=0}put(t){this.size>200&&Math.random()<.1&&this.clean();let e=this.hash(t);const n=e;for(;this.table[e]!==void 0&&!this.isOutdated(this.table[e]);)if(e=(e+1)%this.size,n==e){if(this.overflow==Ra.EXPAND)return this.resize(),this.put(t);break}return this.table[e]={value:t,timestamp:Date.now()},e}traverse(t){for(let e=0,n=this.size;e<n;e++)if(this.table[e]!==void 0&&!t(this.table[e].value,e))return e;return-1}update(t){this.traverse((e,n)=>(t(e)===!1&&this.deleteIndex(n),!0))}getIndex(t){let e=this.hash(t);const n=e;for(;this.table[e]?.value!==t;)if(this.table[e]===void 0||(this.isOutdated(this.table[e])&&(this.table[e]=void 0),e=(e+1)%this.size,n==e))return-1;return this.isOutdated(this.table[e])?(this.table[e]=void 0,-1):e}has(t){return this.getIndex(t)>=0}find(t){const e=this.traverse(n=>!t(n));return e>=0?this.table[e]?.value:void 0}deleteIndex(t){return t>=0&&t<this.size&&this.table[t]!==void 0?(this.table[t]=void 0,!0):!1}delete(t){return this.deleteIndex(this.getIndex(t))}clear(){this.table=[]}isOutdated(t){return Date.now()-t.timestamp>this.ttl}clean(){for(let t=0,e=this.size;t<e;t++)this.table[t]!==void 0&&this.isOutdated(this.table[t])&&(this.table[t]=void 0)}}class kn{maps=new Map;constructor(){}entries(){return[...this.maps.entries()]}keys(){return[...this.maps.keys()]}values(){return[...this.maps.values()]}json(){const t={};for(const e of this.maps)t[e[0]]=e[1];return t}get length(){return this.maps.size}set(t,e){this.maps.set(t,e)}get(t){return this.maps.get(t)}has(t){return this.maps.has(t)}getEntryFromIndex(t){let e=-1;for(const n of this.maps)if(++e==t)return n}getEntry(t){for(const e of this.maps)if(t(e[0],e[1]))return e}firstEntry(){return this.getEntryFromIndex(0)}shift(){const t=this.firstEntry();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.maps.delete(t)}clear(){this.maps.clear()}update(t){const e=this.entries();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];t(r,o)===!1&&this.delete(r)}}}function Oa(s,t){for(let e=0,n=s.length;e<n;e++)if(s[e]==t)return!0;return!1}function vf(s=[],t=[]){const e=s.length,n=t.length;for(let r=0;r<n;r++)s[r]=t[r];let i=Math.max(0,e-n);for(;i>0;)s.pop(),i--;return s}function za(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function Sf(s,...t){return t.forEach(e=>{Oa(s,e)||s.push(e)}),s}function ut(){return(performance||Date).now()}function $t(s=new Date){return s.getTime()}function _f(s=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return Mf(s,t)}function Cf(s){return!df(s.valueOf())}function Ef(s,t=3){const e=Math.max(s.length,6);let n="";for(let r=0;r<e-4;r++)n+=s[r]||"0";const i=[n,""+(s[e-4]||"0")+(s[e-3]||"0"),""+(s[e-2]||"0")+(s[e-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+":"+i[1];case 3:return i[0]+":"+i[1]+":"+i[2]}}function Pf(s){const t=Math.max(s.length,6);let e=0;e+=(s[t-2]||0)*10+(s[t-1]||0),e+=((s[t-4]||0)*10+(s[t-3]||0))*60;let n=0;for(let i=0;i<t-4;i++)n=n*10+(s[i]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function Tf(s,t=!1){let e=0;typeof s=="number"?e=s:e=Pf(s);const n=[],i=e%60;n.unshift(i%10),n.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(n.unshift(o%10),n.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)n.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;n.unshift(o%10),n.unshift(Math.floor(o/10))}return n}function Af(s,t=1,e=!1){return s[s.length-1]+=t,Tf(s,e)}function Mf(s,t="yyyy-mm-dd hh:ii:ss"){if(!Cf(s))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const i=e[1];t=t.replace(i,(s.getFullYear()+"").substring(4-i.length))}const n={"m+":s.getMonth()+1,"d+":s.getDate(),"h+":s.getHours(),"i+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),"S+":s.getMilliseconds()};for(const i in n){const r=new RegExp("("+i+")").exec(t);if(r&&r[1]){const o=r[1];t=t.replace(o,o.length===1?""+n[i]:("00"+n[i]).slice(-o.length))}}return t}function If(){ht.OPEN_LOG=!0}function kf(){ht.OPEN_LOG=!1}function Df(s){ht.LOG_UPLOAD_FN=s}function Na(){return!!ht.OPEN_LOG}function Ba(s){ht.LOG_UPLOAD_FN&&ht.LOG_UPLOAD_FN(s)}function ie(s){Ba({level:"info",msg:s}),Na()&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(s))}function ws(s){Ba({level:"warn",msg:s}),Na()&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(s))}const Fa=()=>{};function Ya(s=0,t){const e=t?.min||300,n=t?.max||6e4,i=t?.exponent||2,r=t?.factor||.5;let o=e*Math.pow(i,s);if(r){const a=Math.random(),h=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+h:o-h}return Math.min(o,n)|0}function Li(s,t=3,e,n){return async function(...i){const r=`retry(${s.name})(${i.map(a=>Xe(a))})`;let o;for(let a=0;a<t;a++)try{return await s.call(n||this,...i)}catch(h){ie(`(${r}) 第 ${a+1} 次尝试失败, retrying...`),o=h,await new Promise(c=>setTimeout(c,typeof e=="number"?e:Ya(a)))}throw ie(`(${r}) 已 ${t} 次失败,不再重试。 Last error: ${Xe(o)}`),o}}function Ri(s,t=60,e=new kn,n){return async function(...i){const r=`cache(${s.name})(${i.map(c=>Xe(c))})`,o=Date.now();t&&e.update((c,l)=>o-l.timestamp<t*1e3);const a=Mi(i),h=e.get(a);if(h){if(!t||o-h.timestamp<t*1e3)return ie(`${r} 击中缓存`),h.value;e.delete(a)}try{ie(`${r} 没有缓存, 尝试立即执行...`);const c=await s.call(n||this,...i);return ie(`${r} 缓存设置成功`),e.set(a,{value:c,timestamp:Date.now()}),c}catch(c){throw ie(`${r} 执行失败 : ${Xe(c)}`),c}}}const Lf="[object Undefined]",Rf="[object Null]",Of="[object Boolean]",zf="[object Number]",Nf="[object BigInt]",Xa="[object String]",Bf="[object Symbol]",Ff="[object Function]",Yf="[object GeneratorFunction]",Xf="[object Array]";function bs(s){return Object.prototype.toString.call(s)}function Uf(s){return s!=null}function $f(s){return bs(s)===Xa}function Ua(s){const t=bs(s);return t===Lf||t===Rf||t===Of||t===zf||t===Xa||t===Bf||t===Nf}function Oi(s){const t=bs(s);return t==Ff||t==Yf}function Gf(s){if(!jf(s))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,n=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(Oi(s)?n:e).test(qf(s))}function Vf(s,t){return s?.[t]}function $a(s,t){const e=Vf(s,t);return Gf(e)?e:void 0}$a(ht,"Map"),$a(ht,"WeakMap");function xs(s){return bs(s)===Xf}function jf(s){const t=typeof s;return!!s&&(t=="object"||t=="function")}function vs(s){return!!s&&typeof s=="object"}function Dn(s){return vs(s)&&!xs(s)}const Ga=s=>{for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t))return!1;return!0};function Va(s){const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&t.push(e);return t}function cn(s,t,e=!0){if(Dn(s)&&Dn(t))for(const n of Va(t))(e||typeof s[n]>"u")&&(Dn(s[n])&&Dn(t[n])?cn(s[n],t[n],e):s[n]=t[n]);return s}function ja(s,...t){return new s.constructor(...t)}function Xe(s,t=`\r
11
- `,e=6,n=1){if($f(s))return`"${s}"`;if(Ua(s))return""+s;if(Oi(s))return"[Fn]";if(n>e)return xs(s)?"[...]":"{...}";let i="",r="";for(let o=0;o<n;o++)i+=" ",o>0&&(r+=" ");return xs(s)?`[${s.map(o=>t+i+Xe(o,t,e,n+1)).join(", ")}${t}${r}]`:`{${Va(s).map(o=>`${t}${i}${o}: ${Xe(s[o],t,e,n+1)}`).join(", ")}${t}${r}}`}function qf(s){if(s!=null){try{return Function.prototype.toString.call(s)}catch{}try{return""+s}catch{}}return""}function Hf(s,t="",e=["","sign","key"]){return Dn(s)?Object.keys(s).filter(n=>{for(let i=0,r=e.length;i<r;i++)if(s[n]==e[i])return!1;return!0}).sort().map(n=>`${n}=${s[n]}`).join("&")+t:String(s)}function qa(s,t,e=""){let n=[];return s===t?n:typeof s!="object"||typeof t!="object"||!s||!t?(n.push({path:e,newValue:t,oldValue:s}),n):(new Set([...Object.keys(s),...Object.keys(t)]).forEach(i=>{const r=e?`${e}.${i}`:i;n=n.concat(qa(s[i],t[i],r))}),n)}function Ss(s,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,n=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function i(o,a=!1){return Ua(o)||xs(o)||Oi(o)?{value:o,timestamp:$t()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:$t()}}let r=i(s,!0);return{get:()=>{let o=!1;return(e>=0&&$t()>r.timestamp+e*1e3||n>=0&&$t()>n)&&(o=!0),o&&(r.value=void 0),r},set:o=>r=i(o,!1)}}const Wf=typeof window<"u";!!(ht.Worker&&ht.Blob&&ht.Promise&&ht.OffscreenCanvas&&ht.OffscreenCanvasRenderingContext2D&&ht.HTMLCanvasElement&&ht.HTMLCanvasElement.prototype.transferControlToOffscreen&&ht.URL&&ht.URL.createObjectURL);const Jf=(()=>{if(!ht.OffscreenCanvas)return!1;const s=new OffscreenCanvas(1,1),t=s.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=s.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),ln=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(n||i||r)&&(e=e.slice(2)),n&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(isNaN(o))throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function zi(s){return new TextEncoder().encode(s)}function Ha(s){return String.fromCharCode.apply(null,new Uint16Array(s))}function Ni(s,t){const e=t?.mime,n=t?.encode,i=t?.type;return i?new Blob([s],{type:i}):e?n===ps.base64?new Blob([s],{type:`${e};${n}`}):n===ps.utf8?new Blob([s],{type:`${e};charset=${n}`}):new Blob([s],{type:`${e}`}):new Blob([s])}const Zf=s=>{let t=Et.UNKNOWN;switch(new DataView(s).getUint32(0,Kf()).toString(16).toUpperCase()){case"FFD8FFDB":t=Et.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Et.JPEG;break;case"89504E47":t=Et.PNG;break;case"47494638":t=Et.GIF;break;case"52494646":t=Et.WEBP;break;case"25504446":t=Et.PDF;break;case"504B0304":t=Et.ZIP;break}return t};function Kf(){const s=Uint32Array.of(305419896),t=new Uint8Array(s.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}var Bi=function(s,t){return Bi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Bi(s,t)};function Fi(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bi(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Wa(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yi(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Xi(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function fe(s){return typeof s=="function"}function Qf(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ui=Qf(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
12
- `+t.map(function(e,n){return n+1+") "+e.toString()}).join(`
13
- `):"",this.name="UnsubscriptionError",this.errors=t}});function Ja(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var $i=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Wa(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(g){t={error:g}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(fe(l))try{l()}catch(g){r=g instanceof Ui?g.errors:[g]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Wa(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ka(p)}catch(g){r=r??[],g instanceof Ui?r=Xi(Xi([],Yi(r)),Yi(g.errors)):r.push(g)}}}catch(g){n={error:g}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new Ui(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ka(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ja(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Ja(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}();$i.EMPTY;function Za(s){return s instanceof $i||s&&"closed"in s&&fe(s.remove)&&fe(s.add)&&fe(s.unsubscribe)}function Ka(s){fe(s)?s():s.unsubscribe()}var Qa={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},td={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,Xi([s,t],Yi(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function ed(s){td.setTimeout(function(){throw s})}function th(){}function nd(s){s()}var Gi=function(s){Fi(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Za(e)&&e.add(n)):n.destination=od,n}return t.create=function(e,n,i){return new ji(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}($i),sd=Function.prototype.bind;function Vi(s,t){return sd.call(s,t)}var id=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){_s(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){_s(n)}else _s(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){_s(e)}},s}(),ji=function(s){Fi(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(fe(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Qa.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&Vi(e.next,a),error:e.error&&Vi(e.error,a),complete:e.complete&&Vi(e.complete,a)}):o=e}return r.destination=new id(o),r}return t}(Gi);function _s(s){ed(s)}function rd(s){throw s}var od={closed:!0,next:th,error:rd,complete:th},ad=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function hd(s){return s}function cd(s){return s.length===0?hd:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}(function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=ud(t)?t:new ji(t,e,n);return nd(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=eh(e),new e(function(i,r){var o=new ji({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[ad]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cd(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=eh(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s})();function eh(s){var t;return(t=s??Qa.Promise)!==null&&t!==void 0?t:Promise}function ld(s){return s&&fe(s.next)&&fe(s.error)&&fe(s.complete)}function ud(s){return s&&s instanceof Gi||ld(s)&&Za(s)}(function(s){Fi(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(l){e.error(l)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(l){e.error(l)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Gi);class fd extends Error{name;response;statusCode;constructor(t,e){super(t),this.name="HttpError",this.response=e,this.statusCode=e.status}toJSON(){return{name:this.name,message:this.message,stack:this.stack,response:this.response,statusCode:this.statusCode}}}let Ln;function Ee(s){Ln=s,s(),Ln=null}class dd{subscribers=new Set;add(){Ln&&!this.subscribers.has(Ln)&&this.subscribers.add(Ln)}notify(t){this.subscribers.forEach(e=>e(t))}}const nh=new WeakMap;function qi(s,t){let e=nh.get(s);e||(e=new Map,nh.set(s,e));let n=e.get(t);return n||(n=new dd,e.set(t,n)),n}const Hi=sh;function sh(s,t){if(!vs(s))return s;const e=typeof t?.deep=="boolean"?t?.deep:!0,n=t?.path||"",i=t?.callback,r={get(o,a,h){const c=n?`${n}.${String(a)}`:String(a);let l=Reflect.get(o,a,h);const u=qi(o,a);if(e&&vs(l)&&!("isYZProxy"in l)){const d=sh(l,{deep:!0,path:c,callback:i});Array.isArray(l)&&(d.YZProxyArrayDep=u),l=d}return u.add(),l},set(o,a,h,c){const l=Reflect.get(o,a,c),u=Reflect.set(o,a,h,c);if(a=="YZProxyArrayDep")return u;if(l!==h){let d;Array.isArray(o)?d=o.YZProxyArrayDep:d=qi(o,a);const f={path:n?`${n}.${String(a)}`:String(a),newValue:h,oldValue:l};d.notify(f),i&&i(f)}return u},deleteProperty(o,a){if(!(a in o))return!1;let h=typeof a=="symbol"?void 0:o[a];vs(h)&&(h=Array.isArray(h)?[...h]:{...h});const c=Reflect.deleteProperty(o,a);if(c){let l;Array.isArray(o)?l=o.YZProxyArrayDep:l=qi(o,a);const u={path:n?`${n}.${String(a)}`:String(a),newValue:void 0,oldValue:h};l.notify(u),i&&i(u)}return c},has(o,a){return a==="isYZProxy"||a in o}};return new Proxy(s,r)}class Cs{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(n?e.bind(n):e),this}addListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n?e.bind(n):e),this}on(t,e,n){return this.addListener(t,e,n),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(n=>{n(...e)}),this}once(t,e,n){const i=(...r)=>{n?e.apply(n,r):e(...r),this.off(t,i)};return this.on(t,i),this}}function md(){const s={};return s.promise=new Promise((t,e)=>{s.resolve=t,s.reject=e}),s}let pd=0;function ih(s){const t=md();let e=!1;return{name:s.name||String(++pd),deadline:typeof s.deadline=="number"?Math.max(s.deadline,0):-1,run:async()=>{if(!e){e=!0;try{let n;const i=s.args||[];s.thisArg?n=await s.fn.call(s.thisArg,...i):n=await s.fn(...i),t.resolve(n)}catch(n){t.reject(n)}}},result:()=>t.promise}}class gd{queue;suspend=!1;semaphore=0;concurrency=1;timeRemaining=-1;timeoutId;constructor(t){this.queue=t?.queue||ff(10),typeof t?.concurrency=="number"&&(this.concurrency=Math.max(t?.concurrency,1)),typeof t?.timeRemaining=="number"&&this.setTimeRemaining(t.timeRemaining)}setTimeRemaining(t){this.timeRemaining=Math.max(0,t)}increaseTimeRemaining(t,e=!1){this.timeRemaining!==-1?this.setTimeRemaining(this.timeRemaining+t):e&&this.setTimeRemaining(t)}decreaseTimeRemaining(t){this.timeRemaining!==-1&&this.setTimeRemaining(this.timeRemaining-t)}_exec(t,e=!0){const n=$t();try{this.semaphore++,t.run()}finally{this.semaphore--,e&&(this.decreaseTimeRemaining($t()-n),this._flush())}}_flush(){for(;!this.suspend&&this.semaphore<this.concurrency&&(this.timeRemaining==-1||this.timeRemaining>0);){const t=this.queue.dequeue();if(!t)break;this._exec(t)}this._timeout()}_timeout(t=0,e=0){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{if(!(this.suspend||this.semaphore>0||!this.queue.length)){for(let n=0;n<this.queue.length();){const i=this.queue.index(n);if(!i)break;i.deadline!=-1&&i.deadline<=$t()?(this._exec(i,!1),this.queue.deleteIndex(n)):n++}this.queue.length()&&(this.timeoutId=setTimeout(()=>{this._timeout(t,++e)},300*Math.pow(2,e)))}},t)}pause(){this.suspend=!0}resume(){this.suspend=!1,this._flush()}addTask(t){this.queue.delete(e=>e.name==t.name),this.queue.enqueue(t)}immediately(t){this._exec(t),this._flush()}asap(t){this.addTask(t),this._flush()}idleCallback(t){this.setTimeRemaining(t.timeRemaining()),this._flush()}clear(){this.queue.clear()}}class rh extends gd{lastResult;constructor(t){super(t)}_exec(t,e=!0){const n=$t();try{this.semaphore++,t.run()}finally{t.result().then(i=>{this.lastResult=i}).finally(()=>{this.semaphore--,e&&(this.decreaseTimeRemaining($t()-n),this._flush())})}}}class yd{schedule;closeLastDialog;constructor(t){this.schedule=new rh(t)}asap(t,e){const n=ih({fn:i=>new Promise(r=>{this.closeLastDialog=t({...i,onClose:()=>{this.closeLastDialog=void 0,i?.onClose?.(),r()}})}),args:[e]});return this.schedule.asap(n),n}immediately(t,e){return this.clear(),this.asap(t,e)}closeLast(){this.closeLastDialog&&this.closeLastDialog()}clear(){this.schedule.clear(),this.closeLast()}}function oh(s){const t=typeof s.immutable=="boolean"?s.immutable:!0,e=s.initState||{};let n=s.reducer;if(s.enhancer)return s.enhancer(oh)({reducer:n,initState:e,immutable:t});const i=[],r=c=>(i.push(c),()=>{const l=i.indexOf(c);l>-1&&i.splice(l,1)});let o=e;t||(o=Hi(o,{callback:c=>{i.forEach(l=>l(c))}}));const a=c=>{if(t){const l=o;o=n(o,c);const u=qa(l,o);for(const d of u)i.forEach(f=>f(d))}else n(o,c)},h=c=>{n=c,a({type:"INIT"})};return a({type:"INIT"}),{getState:()=>o,dispatch:a,subscribe:r,replaceReducer:h}}function wd(s=window.location.href){try{return new URL(s)}catch{const t="(?<protocol>https?:)",e="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",n="(?<pathname>(?:\\/[^/#?]+)*\\/?)",i="(?<search>(?:\\?[^#]*)?)",r="(?<hash>(?:#.*)?)",o=new RegExp(`^${t}//${e}${n}${i}${r}$`).exec(s);return{href:s,protocol:o?.groups?.protocol||"",host:o?.groups?.host||"",hostname:o?.groups?.hostname||"",port:o?.groups?.port||"",pathname:o?.groups?.pathname||"",search:o?.groups?.search||"",hash:o?.groups?.hash||""}}}function bd(s=window.location.href){const t=wd(s),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function xd(s,t){return s+t.replace(/^[&?]/,s.indexOf("?")>=0?"&":"?")}function vd(s){return"?"+Object.entries(s).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Sd(s){return"?"+[...s.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function ah(s,t){return function(){return s.apply(t,arguments)}}const{toString:_d}=Object.prototype,{getPrototypeOf:Wi}=Object,Es=(s=>t=>{const e=_d.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=s=>(s=s.toLowerCase(),t=>Es(t)===s),Ps=s=>t=>typeof t===s,{isArray:un}=Array,Rn=Ps("undefined");function Cd(s){return s!==null&&!Rn(s)&&s.constructor!==null&&!Rn(s.constructor)&&Ot(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const hh=Jt("ArrayBuffer");function Ed(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&hh(s.buffer),t}const Pd=Ps("string"),Ot=Ps("function"),ch=Ps("number"),Ts=s=>s!==null&&typeof s=="object",Td=s=>s===!0||s===!1,As=s=>{if(Es(s)!=="object")return!1;const t=Wi(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Ad=Jt("Date"),Md=Jt("File"),Id=Jt("Blob"),kd=Jt("FileList"),Dd=s=>Ts(s)&&Ot(s.pipe),Ld=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||Ot(s.append)&&((t=Es(s))==="formdata"||t==="object"&&Ot(s.toString)&&s.toString()==="[object FormData]"))},Rd=Jt("URLSearchParams"),[Od,zd,Nd,Bd]=["ReadableStream","Request","Response","Headers"].map(Jt),Fd=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function On(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),un(s))for(n=0,i=s.length;n<i;n++)t.call(null,s[n],n,s);else{const r=e?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let a;for(n=0;n<o;n++)a=r[n],t.call(null,s[a],a,s)}}function lh(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const Ue=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),uh=s=>!Rn(s)&&s!==Ue;function Ji(){const{caseless:s}=uh(this)&&this||{},t={},e=(n,i)=>{const r=s&&lh(t,i)||i;As(t[r])&&As(n)?t[r]=Ji(t[r],n):As(n)?t[r]=Ji({},n):un(n)?t[r]=n.slice():t[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&On(arguments[n],e);return t}const Yd=(s,t,e,{allOwnKeys:n}={})=>(On(t,(i,r)=>{e&&Ot(i)?s[r]=ah(i,e):s[r]=i},{allOwnKeys:n}),s),Xd=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Ud=(s,t,e,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),e&&Object.assign(s.prototype,e)},$d=(s,t,e,n)=>{let i,r,o;const a={};if(t=t||{},s==null)return t;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Wi(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},Gd=(s,t,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=t.length;const n=s.indexOf(t,e);return n!==-1&&n===e},Vd=s=>{if(!s)return null;if(un(s))return s;let t=s.length;if(!ch(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},jd=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Wi(Uint8Array)),qd=(s,t)=>{const e=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=e.next())&&!n.done;){const i=n.value;t.call(s,i[0],i[1])}},Hd=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},Wd=Jt("HTMLFormElement"),Jd=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),fh=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),Zd=Jt("RegExp"),dh=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};On(e,(i,r)=>{let o;(o=t(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},Kd=s=>{dh(s,(t,e)=>{if(Ot(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(Ot(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Qd=(s,t)=>{const e={},n=i=>{i.forEach(r=>{e[r]=!0})};return un(s)?n(s):n(String(s).split(t)),e},tm=()=>{},em=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function nm(s){return!!(s&&Ot(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const sm=s=>{const t=new Array(10),e=(n,i)=>{if(Ts(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const r=un(n)?[]:{};return On(n,(o,a)=>{const h=e(o,i+1);!Rn(h)&&(r[a]=h)}),t[i]=void 0,r}}return n};return e(s,0)},im=Jt("AsyncFunction"),rm=s=>s&&(Ts(s)||Ot(s))&&Ot(s.then)&&Ot(s.catch),mh=((s,t)=>s?setImmediate:t?((e,n)=>(Ue.addEventListener("message",({source:i,data:r})=>{i===Ue&&r===e&&n.length&&n.shift()()},!1),i=>{n.push(i),Ue.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Ot(Ue.postMessage)),om=typeof queueMicrotask<"u"?queueMicrotask.bind(Ue):typeof process<"u"&&process.nextTick||mh,M={isArray:un,isArrayBuffer:hh,isBuffer:Cd,isFormData:Ld,isArrayBufferView:Ed,isString:Pd,isNumber:ch,isBoolean:Td,isObject:Ts,isPlainObject:As,isReadableStream:Od,isRequest:zd,isResponse:Nd,isHeaders:Bd,isUndefined:Rn,isDate:Ad,isFile:Md,isBlob:Id,isRegExp:Zd,isFunction:Ot,isStream:Dd,isURLSearchParams:Rd,isTypedArray:jd,isFileList:kd,forEach:On,merge:Ji,extend:Yd,trim:Fd,stripBOM:Xd,inherits:Ud,toFlatObject:$d,kindOf:Es,kindOfTest:Jt,endsWith:Gd,toArray:Vd,forEachEntry:qd,matchAll:Hd,isHTMLForm:Wd,hasOwnProperty:fh,hasOwnProp:fh,reduceDescriptors:dh,freezeMethods:Kd,toObjectSet:Qd,toCamelCase:Jd,noop:tm,toFiniteNumber:em,findKey:lh,global:Ue,isContextDefined:uh,isSpecCompliantForm:nm,toJSONObject:sm,isAsyncFn:im,isThenable:rm,setImmediate:mh,asap:om};function U(s,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}M.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}});const ph=U.prototype,gh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{gh[s]={value:s}}),Object.defineProperties(U,gh),Object.defineProperty(ph,"isAxiosError",{value:!0}),U.from=(s,t,e,n,i,r)=>{const o=Object.create(ph);return M.toFlatObject(s,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),U.call(o,s.message,t,e,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const am=null;function Zi(s){return M.isPlainObject(s)||M.isArray(s)}function yh(s){return M.endsWith(s,"[]")?s.slice(0,-2):s}function wh(s,t,e){return s?s.concat(t).map(function(n,i){return n=yh(n),!e&&i?"["+n+"]":n}).join(e?".":""):t}function hm(s){return M.isArray(s)&&!s.some(Zi)}const cm=M.toFlatObject(M,{},null,function(s){return/^is[A-Z]/.test(s)});function Ms(s,t,e){if(!M.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=M.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!M.isUndefined(p[f])});const n=e.metaTokens,i=e.visitor||c,r=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(i))throw new TypeError("visitor must be a function");function h(f){if(f===null)return"";if(M.isDate(f))return f.toISOString();if(!a&&M.isBlob(f))throw new U("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(f)||M.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,p,g){let C=f;if(f&&!g&&typeof f=="object"){if(M.endsWith(p,"{}"))p=n?p:p.slice(0,-2),f=JSON.stringify(f);else if(M.isArray(f)&&hm(f)||(M.isFileList(f)||M.endsWith(p,"[]"))&&(C=M.toArray(f)))return p=yh(p),C.forEach(function(y,v){!(M.isUndefined(y)||y===null)&&t.append(o===!0?wh([p],v,r):o===null?p:p+"[]",h(y))}),!1}return Zi(f)?!0:(t.append(wh(g,p,r),h(f)),!1)}const l=[],u=Object.assign(cm,{defaultVisitor:c,convertValue:h,isVisitable:Zi});function d(f,p){if(!M.isUndefined(f)){if(l.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(f),M.forEach(f,function(g,C){(!(M.isUndefined(g)||g===null)&&i.call(t,g,M.isString(C)?C.trim():C,p,u))===!0&&d(g,p?p.concat(C):[C])}),l.pop()}}if(!M.isObject(s))throw new TypeError("data must be an object");return d(s),t}function bh(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ki(s,t){this._pairs=[],s&&Ms(s,this,t)}const xh=Ki.prototype;xh.append=function(s,t){this._pairs.push([s,t])},xh.toString=function(s){const t=s?function(e){return s.call(this,e,bh)}:bh;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function lm(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vh(s,t,e){if(!t)return s;const n=e&&e.encode||lm;M.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=M.isURLSearchParams(t)?t.toString():new Ki(t,e).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class um{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Sh=um,_h={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fm=typeof URLSearchParams<"u"?URLSearchParams:Ki,dm=typeof FormData<"u"?FormData:null,mm=typeof Blob<"u"?Blob:null,pm={isBrowser:!0,classes:{URLSearchParams:fm,FormData:dm,Blob:mm},protocols:["http","https","file","blob","url","data"]},Qi=typeof window<"u"&&typeof document<"u",tr=typeof navigator=="object"&&navigator||void 0,gm=Qi&&(!tr||["ReactNative","NativeScript","NS"].indexOf(tr.product)<0),ym=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),wm=Qi&&window.location.href||"http://localhost",bm=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qi,hasStandardBrowserEnv:gm,hasStandardBrowserWebWorkerEnv:ym,navigator:tr,origin:wm},Symbol.toStringTag,{value:"Module"})),_t={...bm,...pm};function xm(s,t){return Ms(s,new _t.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,r){return _t.isNode&&M.isBuffer(e)?(this.append(n,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function vm(s){return M.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sm(s){const t={},e=Object.keys(s);let n;const i=e.length;let r;for(n=0;n<i;n++)r=e[n],t[r]=s[r];return t}function Ch(s){function t(e,n,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),h=r>=e.length;return o=!o&&M.isArray(i)?i.length:o,h?(M.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!M.isObject(i[o]))&&(i[o]=[]),t(e,n,i[o],r)&&M.isArray(i[o])&&(i[o]=Sm(i[o])),!a)}if(M.isFormData(s)&&M.isFunction(s.entries)){const e={};return M.forEachEntry(s,(n,i)=>{t(vm(n),i,e,0)}),e}return null}function _m(s,t,e){if(M.isString(s))try{return(t||JSON.parse)(s),M.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const er={transitional:_h,adapter:["xhr","http","fetch"],transformRequest:[function(s,t){const e=t.getContentType()||"",n=e.indexOf("application/json")>-1,i=M.isObject(s);if(i&&M.isHTMLForm(s)&&(s=new FormData(s)),M.isFormData(s))return n?JSON.stringify(Ch(s)):s;if(M.isArrayBuffer(s)||M.isBuffer(s)||M.isStream(s)||M.isFile(s)||M.isBlob(s)||M.isReadableStream(s))return s;if(M.isArrayBufferView(s))return s.buffer;if(M.isURLSearchParams(s))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(e.indexOf("application/x-www-form-urlencoded")>-1)return xm(s,this.formSerializer).toString();if((r=M.isFileList(s))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ms(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),_m(s)):s}],transformResponse:[function(s){const t=this.transitional||er.transitional,e=t&&t.forcedJSONParsing,n=this.responseType==="json";if(M.isResponse(s)||M.isReadableStream(s))return s;if(s&&M.isString(s)&&(e&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?U.from(r,U.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_t.classes.FormData,Blob:_t.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],s=>{er.headers[s]={}});const nr=er,Cm=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Em=s=>{const t={};let e,n,i;return s&&s.split(`
14
- `).forEach(function(r){i=r.indexOf(":"),e=r.substring(0,i).trim().toLowerCase(),n=r.substring(i+1).trim(),!(!e||t[e]&&Cm[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Eh=Symbol("internals");function zn(s){return s&&String(s).trim().toLowerCase()}function Is(s){return s===!1||s==null?s:M.isArray(s)?s.map(Is):String(s)}function Pm(s){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(s);)t[n[1]]=n[2];return t}const Tm=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function sr(s,t,e,n,i){if(M.isFunction(n))return n.call(this,t,e);if(i&&(t=e),!!M.isString(t)){if(M.isString(n))return t.indexOf(n)!==-1;if(M.isRegExp(n))return n.test(t)}}function Am(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function Mm(s,t){const e=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+e,{value:function(i,r,o){return this[n].call(this,t,i,r,o)},configurable:!0})})}class ks{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(a,h,c){const l=zn(h);if(!l)throw new Error("header name must be a non-empty string");const u=M.findKey(i,l);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||h]=Is(a))}const o=(a,h)=>M.forEach(a,(c,l)=>r(c,l,h));if(M.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(M.isString(t)&&(t=t.trim())&&!Tm(t))o(Em(t),e);else if(M.isHeaders(t))for(const[a,h]of t.entries())r(h,a,n);else t!=null&&r(e,t,n);return this}get(t,e){if(t=zn(t),t){const n=M.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return Pm(i);if(M.isFunction(e))return e.call(this,i,n);if(M.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=zn(t),t){const n=M.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||sr(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function r(o){if(o=zn(o),o){const a=M.findKey(n,o);a&&(!e||sr(n,n[a],a,e))&&(delete n[a],i=!0)}}return M.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];(!t||sr(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return M.forEach(this,(i,r)=>{const o=M.findKey(n,r);if(o){e[o]=Is(i),delete e[r];return}const a=t?Am(r):String(r).trim();a!==r&&delete e[r],e[a]=Is(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&M.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const e=(this[Eh]=this[Eh]={accessors:{}}).accessors,n=this.prototype;function i(r){const o=zn(r);e[o]||(Mm(n,r),e[o]=!0)}return M.isArray(t)?t.forEach(i):i(t),this}}ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(ks.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),M.freezeMethods(ks);const Zt=ks;function ir(s,t){const e=this||nr,n=t||e,i=Zt.from(n.headers);let r=n.data;return M.forEach(s,function(o){r=o.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function Ph(s){return!!(s&&s.__CANCEL__)}function fn(s,t,e){U.call(this,s??"canceled",U.ERR_CANCELED,t,e),this.name="CanceledError"}M.inherits(fn,U,{__CANCEL__:!0});function Th(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new U("Request failed with status code "+e.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Im(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function km(s,t){s=s||10;const e=new Array(s),n=new Array(s);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(a){const h=Date.now(),c=n[r];o||(o=h),e[i]=a,n[i]=h;let l=r,u=0;for(;l!==i;)u+=e[l++],l=l%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),h-o<t)return;const d=c&&h-c;return d?Math.round(u*1e3/d):void 0}}function Dm(s,t){let e=0,n=1e3/t,i,r;const o=(a,h=Date.now())=>{e=h,i=null,r&&(clearTimeout(r),r=null),s.apply(null,a)};return[(...a)=>{const h=Date.now(),c=h-e;c>=n?o(a,h):(i=a,r||(r=setTimeout(()=>{r=null,o(i)},n-c)))},()=>i&&o(i)]}const Ds=(s,t,e=3)=>{let n=0;const i=km(50,250);return Dm(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,h=o-n,c=i(h),l=o<=a;n=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&l?(a-o)/c:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(u)},e)},Ah=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},Mh=s=>(...t)=>M.asap(()=>s(...t)),Lm=_t.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,_t.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(_t.origin),_t.navigator&&/(msie|trident)/i.test(_t.navigator.userAgent)):()=>!0,Rm=_t.hasStandardBrowserEnv?{write(s,t,e,n,i,r){const o=[s+"="+encodeURIComponent(t)];M.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),M.isString(n)&&o.push("path="+n),M.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Om(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function zm(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function Ih(s,t,e){let n=!Om(t);return s&&(n||e==!1)?zm(s,t):t}const kh=s=>s instanceof Zt?{...s}:s;function $e(s,t){t=t||{};const e={};function n(c,l,u,d){return M.isPlainObject(c)&&M.isPlainObject(l)?M.merge.call({caseless:d},c,l):M.isPlainObject(l)?M.merge({},l):M.isArray(l)?l.slice():l}function i(c,l,u,d){if(M.isUndefined(l)){if(!M.isUndefined(c))return n(void 0,c,u,d)}else return n(c,l,u,d)}function r(c,l){if(!M.isUndefined(l))return n(void 0,l)}function o(c,l){if(M.isUndefined(l)){if(!M.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,u){if(u in t)return n(c,l);if(u in s)return n(void 0,c)}const h={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,l,u)=>i(kh(c),kh(l),u,!0)};return M.forEach(Object.keys(Object.assign({},s,t)),function(c){const l=h[c]||i,u=l(s[c],t[c],c);M.isUndefined(u)&&l!==a||(e[c]=u)}),e}const Dh=s=>{const t=$e({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=Zt.from(o),t.url=vh(Ih(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let h;if(M.isFormData(e)){if(_t.hasStandardBrowserEnv||_t.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((h=o.getContentType())!==!1){const[c,...l]=h?h.split(";").map(u=>u.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...l].join("; "))}}if(_t.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||n!==!1&&Lm(t.url))){const c=i&&r&&Rm.read(r);c&&o.set(i,c)}return t},Nm=typeof XMLHttpRequest<"u",Bm=Nm&&function(s){return new Promise(function(t,e){const n=Dh(s);let i=n.data;const r=Zt.from(n.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:h}=n,c,l,u,d,f;function p(){d&&d(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function C(){if(!g)return;const v=Zt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:v,config:s,request:g};Th(function(x){t(x),p()},function(x){e(x),p()},b),g=null}"onloadend"in g?g.onloadend=C:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(C)},g.onabort=function(){g&&(e(new U("Request aborted",U.ECONNABORTED,s,g)),g=null)},g.onerror=function(){e(new U("Network Error",U.ERR_NETWORK,s,g)),g=null},g.ontimeout=function(){let v=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const b=n.transitional||_h;n.timeoutErrorMessage&&(v=n.timeoutErrorMessage),e(new U(v,b.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,s,g)),g=null},i===void 0&&r.setContentType(null),"setRequestHeader"in g&&M.forEach(r.toJSON(),function(v,b){g.setRequestHeader(b,v)}),M.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),h&&([u,f]=Ds(h,!0),g.addEventListener("progress",u)),a&&g.upload&&([l,d]=Ds(a),g.upload.addEventListener("progress",l),g.upload.addEventListener("loadend",d)),(n.cancelToken||n.signal)&&(c=v=>{g&&(e(!v||v.type?new fn(null,s,g):v),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const y=Im(n.url);if(y&&_t.protocols.indexOf(y)===-1){e(new U("Unsupported protocol "+y+":",U.ERR_BAD_REQUEST,s));return}g.send(i||null)})},Fm=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,i;const r=function(c){if(!i){i=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof U?l:new fn(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,r(new U(`timeout ${t} of ms exceeded`,U.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:h}=n;return h.unsubscribe=()=>M.asap(a),h}},Ym=Fm,Xm=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,i;for(;n<e;)i=n+t,yield s.slice(n,i),n=i},Um=async function*(s,t){for await(const e of $m(s))yield*Xm(e,t)},$m=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Lh=(s,t,e,n)=>{const i=Um(s,t);let r=0,o,a=h=>{o||(o=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:c,value:l}=await i.next();if(c){a(),h.close();return}let u=l.byteLength;if(e){let d=r+=u;e(d)}h.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(h){return a(h),i.return()}},{highWaterMark:2})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rh=Ls&&typeof ReadableStream=="function",Gm=Ls&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Oh=(s,...t)=>{try{return!!s(...t)}catch{return!1}},Vm=Rh&&Oh(()=>{let s=!1;const t=new Request(_t.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),zh=64*1024,rr=Rh&&Oh(()=>M.isReadableStream(new Response("").body)),Rs={stream:rr&&(s=>s.body)};Ls&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Rs[t]&&(Rs[t]=M.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new U(`Response type '${t}' is not supported`,U.ERR_NOT_SUPPORT,n)})})})(new Response);const jm=async s=>{if(s==null)return 0;if(M.isBlob(s))return s.size;if(M.isSpecCompliantForm(s))return(await new Request(_t.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(M.isArrayBufferView(s)||M.isArrayBuffer(s))return s.byteLength;if(M.isURLSearchParams(s)&&(s=s+""),M.isString(s))return(await Gm(s)).byteLength},qm=async(s,t)=>M.toFiniteNumber(s.getContentLength())??jm(t),Hm=Ls&&(async s=>{let{url:t,method:e,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:h,responseType:c,headers:l,withCredentials:u="same-origin",fetchOptions:d}=Dh(s);c=c?(c+"").toLowerCase():"text";let f=Ym([i,r&&r.toAbortSignal()],o),p;const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let C;try{if(h&&Vm&&e!=="get"&&e!=="head"&&(C=await qm(l,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),_;if(M.isFormData(n)&&(_=E.headers.get("content-type"))&&l.setContentType(_),E.body){const[L,N]=Ah(C,Ds(Mh(h)));n=Lh(E.body,zh,L,N)}}M.isString(u)||(u=u?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:y?u:void 0});let v=await fetch(p);const b=rr&&(c==="stream"||c==="response");if(rr&&(a||b&&g)){const E={};["status","statusText","headers"].forEach(Y=>{E[Y]=v[Y]});const _=M.toFiniteNumber(v.headers.get("content-length")),[L,N]=a&&Ah(_,Ds(Mh(a),!0))||[];v=new Response(Lh(v.body,zh,L,()=>{N&&N(),g&&g()}),E)}c=c||"text";let x=await Rs[M.findKey(Rs,c)||"text"](v,s);return!b&&g&&g(),await new Promise((E,_)=>{Th(E,_,{data:x,headers:Zt.from(v.headers),status:v.status,statusText:v.statusText,config:s,request:p})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,s,p),{cause:y.cause||y}):U.from(y,y&&y.code,s,p)}}),or={http:am,xhr:Bm,fetch:Hm};M.forEach(or,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const Nh=s=>`- ${s}`,Wm=s=>M.isFunction(s)||s===null||s===!1,Bh={getAdapter:s=>{s=M.isArray(s)?s:[s];const{length:t}=s;let e,n;const i={};for(let r=0;r<t;r++){e=s[r];let o;if(n=e,!Wm(e)&&(n=or[(o=String(e)).toLowerCase()],n===void 0))throw new U(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([a,h])=>`adapter ${a} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
16
- `+r.map(Nh).join(`
17
- `):" "+Nh(r[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:or};function ar(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new fn(null,s)}function Fh(s){return ar(s),s.headers=Zt.from(s.headers),s.data=ir.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Bh.getAdapter(s.adapter||nr.adapter)(s).then(function(t){return ar(s),t.data=ir.call(s,s.transformResponse,t),t.headers=Zt.from(t.headers),t},function(t){return Ph(t)||(ar(s),t&&t.response&&(t.response.data=ir.call(s,s.transformResponse,t.response),t.response.headers=Zt.from(t.response.headers))),Promise.reject(t)})}const Yh="1.8.4",Os={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{Os[s]=function(e){return typeof e===s||"a"+(t<1?"n ":" ")+s}});const Xh={};Os.transitional=function(s,t,e){function n(i,r){return"[Axios v"+Yh+"] Transitional option '"+i+"'"+r+(e?". "+e:"")}return(i,r,o)=>{if(s===!1)throw new U(n(r," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Xh[r]&&(Xh[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),s?s(i,r,o):!0}},Os.spelling=function(s){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${s}`),!0)};function Jm(s,t,e){if(typeof s!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let i=n.length;for(;i-- >0;){const r=n[i],o=t[r];if(o){const a=s[r],h=a===void 0||o(a,r,s);if(h!==!0)throw new U("option "+r+" must be "+h,U.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new U("Unknown option "+r,U.ERR_BAD_OPTION)}}const zs={assertOptions:Jm,validators:Os},re=zs.validators;class Ns{constructor(t){this.defaults=t,this.interceptors={request:new Sh,response:new Sh}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
18
- `+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=$e(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&zs.assertOptions(n,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1),i!=null&&(M.isFunction(i)?e.paramsSerializer={serialize:i}:zs.assertOptions(i,{encode:re.function,serialize:re.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),zs.assertOptions(e,{baseUrl:re.spelling("baseURL"),withXsrfToken:re.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&M.merge(r.common,r[e.method]);r&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Zt.concat(o,r);const a=[];let h=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(h=h&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let l,u=0,d;if(!h){const p=[Fh.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),d=p.length,l=Promise.resolve(e);u<d;)l=l.then(p[u++],p[u++]);return l}d=a.length;let f=e;for(u=0;u<d;){const p=a[u++],g=a[u++];try{f=p(f)}catch(C){g.call(this,C);break}}try{l=Fh.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(t){t=$e(this.defaults,t);const e=Ih(t.baseURL,t.url,t.allowAbsoluteUrls);return vh(e,t.params,t.paramsSerializer)}}M.forEach(["delete","get","head","options"],function(s){Ns.prototype[s]=function(t,e){return this.request($e(e||{},{method:s,url:t,data:(e||{}).data}))}}),M.forEach(["post","put","patch"],function(s){function t(e){return function(n,i,r){return this.request($e(r||{},{method:s,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ns.prototype[s]=t(),Ns.prototype[s+"Form"]=t(!0)});const Bs=Ns;class hr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{n.subscribe(a),r=a}).then(i);return o.cancel=function(){n.unsubscribe(r)},o},t(function(i,r,o){n.reason||(n.reason=new fn(i,r,o),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=n=>{t.abort(n)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new hr(function(e){t=e}),cancel:t}}}const Zm=hr;function Km(s){return function(t){return s.apply(null,t)}}function Qm(s){return M.isObject(s)&&s.isAxiosError===!0}const cr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cr).forEach(([s,t])=>{cr[t]=s});const tp=cr;function Uh(s){const t=new Bs(s),e=ah(Bs.prototype.request,t);return M.extend(e,Bs.prototype,t,{allOwnKeys:!0}),M.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return Uh($e(s,n))},e}const ct=Uh(nr);ct.Axios=Bs,ct.CanceledError=fn,ct.CancelToken=Zm,ct.isCancel=Ph,ct.VERSION=Yh,ct.toFormData=Ms,ct.AxiosError=U,ct.Cancel=ct.CanceledError,ct.all=function(s){return Promise.all(s)},ct.spread=Km,ct.isAxiosError=Qm,ct.mergeConfig=$e,ct.AxiosHeaders=Zt,ct.formToJSON=s=>Ch(M.isHTMLForm(s)?new FormData(s):s),ct.getAdapter=Bh.getAdapter,ct.HttpStatusCode=tp,ct.default=ct;const ep=ct;class $h{instance;canceler;retryCount=0;cacheTime=0;caches=new kn;constructor(t){this.instance=ep.create(t),this.canceler=new np,this.retryCount=t?.retry||0,this.cacheTime=t?.cache||0,this.instance.interceptors.request.use(e=>(t?.interceptor?.start?.(),this.canceler.pendingRequest(e),t?.interceptor?.request?.(e),e),e=>(t?.interceptor?.end?.(),this.canceler.cancelRequest(e.config),t?.interceptor?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptor?.end?.(),this.canceler.confirmRequest(e.config),t?.interceptor?.response?.(e),e.status==200?Promise.resolve(e):Promise.reject(e)),e=>(t?.interceptor?.end?.(),this.canceler.cancelRequest(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e.response)))}request(t){let e=this.instance.request;const n=t.retry||this.retryCount;n&&(e=Li(e,n));const i=t.cache||this.cacheTime;return i&&(e=Ri(e,i,this.caches)),e(t)}cancel(t){this.canceler.cancelRequest(t)}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,n){return this.request({...n,method:"post",url:t,data:e})}postBlob(t,e,n){return n={...n,headers:{...n?.headers,"Content-Type":"multipart/form-data"}},this.request({...n,method:"post",url:t,data:e})}postForm(t,e,n){return this.instance.postForm(t,e,{...n})}put(t,e,n){return this.request({...n,method:"put",url:t,data:e})}patch(t,e,n){return this.request({...n,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}class np{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}getRequestId(t){const{method:e,url:n,params:i,data:r}=t;return Mi({method:e,url:n,params:i,data:r})}pendingRequest(t){const e=this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const n=new AbortController;t.signal=n.signal,this.pendingRequestMap.set(e,n)}}confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}function sp(s,t=(e,n)=>e<=n){const e=s.length;let n=Math.floor(e/2);for(;n>0;){for(let i=n;i<e;i++){const r=s[i];let o=i;for(;o>=n&&!t(s[o-n],r);)s[o]=s[o-n],o-=n;s[o]=r}n=Math.floor(n/2)}}const lr=typeof process=="object"&&process?process:{},ip=(s,t,e,n)=>{typeof lr.emitWarning=="function"?lr.emitWarning(s,t,e,n):console.error(`[${e}] ${t}: ${s}`)};let Gh=ht.AbortController,Vh=ht.AbortSignal;if(typeof Gh>"u"){Vh=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,n){this._onabort.push(n)}},Gh=class{constructor(){t()}signal=new Vh;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const n of this.signal._onabort)n(e);this.signal.onabort?.(e)}}};let s=lr.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const t=()=>{s&&(s=!1,ip("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}function jh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var qh={exports:{}};(function(s,t){(function(e){s.exports=e()})(function(e){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(y,v){var b=y[0],x=y[1],E=y[2],_=y[3];b+=(x&E|~x&_)+v[0]-680876936|0,b=(b<<7|b>>>25)+x|0,_+=(b&x|~b&E)+v[1]-389564586|0,_=(_<<12|_>>>20)+b|0,E+=(_&b|~_&x)+v[2]+606105819|0,E=(E<<17|E>>>15)+_|0,x+=(E&_|~E&b)+v[3]-1044525330|0,x=(x<<22|x>>>10)+E|0,b+=(x&E|~x&_)+v[4]-176418897|0,b=(b<<7|b>>>25)+x|0,_+=(b&x|~b&E)+v[5]+1200080426|0,_=(_<<12|_>>>20)+b|0,E+=(_&b|~_&x)+v[6]-1473231341|0,E=(E<<17|E>>>15)+_|0,x+=(E&_|~E&b)+v[7]-45705983|0,x=(x<<22|x>>>10)+E|0,b+=(x&E|~x&_)+v[8]+1770035416|0,b=(b<<7|b>>>25)+x|0,_+=(b&x|~b&E)+v[9]-1958414417|0,_=(_<<12|_>>>20)+b|0,E+=(_&b|~_&x)+v[10]-42063|0,E=(E<<17|E>>>15)+_|0,x+=(E&_|~E&b)+v[11]-1990404162|0,x=(x<<22|x>>>10)+E|0,b+=(x&E|~x&_)+v[12]+1804603682|0,b=(b<<7|b>>>25)+x|0,_+=(b&x|~b&E)+v[13]-40341101|0,_=(_<<12|_>>>20)+b|0,E+=(_&b|~_&x)+v[14]-1502002290|0,E=(E<<17|E>>>15)+_|0,x+=(E&_|~E&b)+v[15]+1236535329|0,x=(x<<22|x>>>10)+E|0,b+=(x&_|E&~_)+v[1]-165796510|0,b=(b<<5|b>>>27)+x|0,_+=(b&E|x&~E)+v[6]-1069501632|0,_=(_<<9|_>>>23)+b|0,E+=(_&x|b&~x)+v[11]+643717713|0,E=(E<<14|E>>>18)+_|0,x+=(E&b|_&~b)+v[0]-373897302|0,x=(x<<20|x>>>12)+E|0,b+=(x&_|E&~_)+v[5]-701558691|0,b=(b<<5|b>>>27)+x|0,_+=(b&E|x&~E)+v[10]+38016083|0,_=(_<<9|_>>>23)+b|0,E+=(_&x|b&~x)+v[15]-660478335|0,E=(E<<14|E>>>18)+_|0,x+=(E&b|_&~b)+v[4]-405537848|0,x=(x<<20|x>>>12)+E|0,b+=(x&_|E&~_)+v[9]+568446438|0,b=(b<<5|b>>>27)+x|0,_+=(b&E|x&~E)+v[14]-1019803690|0,_=(_<<9|_>>>23)+b|0,E+=(_&x|b&~x)+v[3]-187363961|0,E=(E<<14|E>>>18)+_|0,x+=(E&b|_&~b)+v[8]+1163531501|0,x=(x<<20|x>>>12)+E|0,b+=(x&_|E&~_)+v[13]-1444681467|0,b=(b<<5|b>>>27)+x|0,_+=(b&E|x&~E)+v[2]-51403784|0,_=(_<<9|_>>>23)+b|0,E+=(_&x|b&~x)+v[7]+1735328473|0,E=(E<<14|E>>>18)+_|0,x+=(E&b|_&~b)+v[12]-1926607734|0,x=(x<<20|x>>>12)+E|0,b+=(x^E^_)+v[5]-378558|0,b=(b<<4|b>>>28)+x|0,_+=(b^x^E)+v[8]-2022574463|0,_=(_<<11|_>>>21)+b|0,E+=(_^b^x)+v[11]+1839030562|0,E=(E<<16|E>>>16)+_|0,x+=(E^_^b)+v[14]-35309556|0,x=(x<<23|x>>>9)+E|0,b+=(x^E^_)+v[1]-1530992060|0,b=(b<<4|b>>>28)+x|0,_+=(b^x^E)+v[4]+1272893353|0,_=(_<<11|_>>>21)+b|0,E+=(_^b^x)+v[7]-155497632|0,E=(E<<16|E>>>16)+_|0,x+=(E^_^b)+v[10]-1094730640|0,x=(x<<23|x>>>9)+E|0,b+=(x^E^_)+v[13]+681279174|0,b=(b<<4|b>>>28)+x|0,_+=(b^x^E)+v[0]-358537222|0,_=(_<<11|_>>>21)+b|0,E+=(_^b^x)+v[3]-722521979|0,E=(E<<16|E>>>16)+_|0,x+=(E^_^b)+v[6]+76029189|0,x=(x<<23|x>>>9)+E|0,b+=(x^E^_)+v[9]-640364487|0,b=(b<<4|b>>>28)+x|0,_+=(b^x^E)+v[12]-421815835|0,_=(_<<11|_>>>21)+b|0,E+=(_^b^x)+v[15]+530742520|0,E=(E<<16|E>>>16)+_|0,x+=(E^_^b)+v[2]-995338651|0,x=(x<<23|x>>>9)+E|0,b+=(E^(x|~_))+v[0]-198630844|0,b=(b<<6|b>>>26)+x|0,_+=(x^(b|~E))+v[7]+1126891415|0,_=(_<<10|_>>>22)+b|0,E+=(b^(_|~x))+v[14]-1416354905|0,E=(E<<15|E>>>17)+_|0,x+=(_^(E|~b))+v[5]-57434055|0,x=(x<<21|x>>>11)+E|0,b+=(E^(x|~_))+v[12]+1700485571|0,b=(b<<6|b>>>26)+x|0,_+=(x^(b|~E))+v[3]-1894986606|0,_=(_<<10|_>>>22)+b|0,E+=(b^(_|~x))+v[10]-1051523|0,E=(E<<15|E>>>17)+_|0,x+=(_^(E|~b))+v[1]-2054922799|0,x=(x<<21|x>>>11)+E|0,b+=(E^(x|~_))+v[8]+1873313359|0,b=(b<<6|b>>>26)+x|0,_+=(x^(b|~E))+v[15]-30611744|0,_=(_<<10|_>>>22)+b|0,E+=(b^(_|~x))+v[6]-1560198380|0,E=(E<<15|E>>>17)+_|0,x+=(_^(E|~b))+v[13]+1309151649|0,x=(x<<21|x>>>11)+E|0,b+=(E^(x|~_))+v[4]-145523070|0,b=(b<<6|b>>>26)+x|0,_+=(x^(b|~E))+v[11]-1120210379|0,_=(_<<10|_>>>22)+b|0,E+=(b^(_|~x))+v[2]+718787259|0,E=(E<<15|E>>>17)+_|0,x+=(_^(E|~b))+v[9]-343485551|0,x=(x<<21|x>>>11)+E|0,y[0]=b+y[0]|0,y[1]=x+y[1]|0,y[2]=E+y[2]|0,y[3]=_+y[3]|0}function r(y){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=y.charCodeAt(b)+(y.charCodeAt(b+1)<<8)+(y.charCodeAt(b+2)<<16)+(y.charCodeAt(b+3)<<24);return v}function o(y){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=y[b]+(y[b+1]<<8)+(y[b+2]<<16)+(y[b+3]<<24);return v}function a(y){var v=y.length,b=[1732584193,-271733879,-1732584194,271733878],x,E,_,L,N,Y;for(x=64;x<=v;x+=64)i(b,r(y.substring(x-64,x)));for(y=y.substring(x-64),E=y.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<E;x+=1)_[x>>2]|=y.charCodeAt(x)<<(x%4<<3);if(_[x>>2]|=128<<(x%4<<3),x>55)for(i(b,_),x=0;x<16;x+=1)_[x]=0;return L=v*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(L[2],16),Y=parseInt(L[1],16)||0,_[14]=N,_[15]=Y,i(b,_),b}function h(y){var v=y.length,b=[1732584193,-271733879,-1732584194,271733878],x,E,_,L,N,Y;for(x=64;x<=v;x+=64)i(b,o(y.subarray(x-64,x)));for(y=x-64<v?y.subarray(x-64):new Uint8Array(0),E=y.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<E;x+=1)_[x>>2]|=y[x]<<(x%4<<3);if(_[x>>2]|=128<<(x%4<<3),x>55)for(i(b,_),x=0;x<16;x+=1)_[x]=0;return L=v*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(L[2],16),Y=parseInt(L[1],16)||0,_[14]=N,_[15]=Y,i(b,_),b}function c(y){var v="",b;for(b=0;b<4;b+=1)v+=n[y>>b*8+4&15]+n[y>>b*8&15];return v}function l(y){var v;for(v=0;v<y.length;v+=1)y[v]=c(y[v]);return y.join("")}l(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(v,b){return v=v|0||0,v<0?Math.max(v+b,0):Math.min(v,b)}ArrayBuffer.prototype.slice=function(v,b){var x=this.byteLength,E=y(v,x),_=x,L,N,Y,G;return b!==e&&(_=y(b,x)),E>_?new ArrayBuffer(0):(L=_-E,N=new ArrayBuffer(L),Y=new Uint8Array(N),G=new Uint8Array(this,E,L),Y.set(G),N)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function d(y,v){var b=y.length,x=new ArrayBuffer(b),E=new Uint8Array(x),_;for(_=0;_<b;_+=1)E[_]=y.charCodeAt(_);return v?E:x}function f(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function p(y,v,b){var x=new Uint8Array(y.byteLength+v.byteLength);return x.set(new Uint8Array(y)),x.set(new Uint8Array(v),y.byteLength),b?x:x.buffer}function g(y){var v=[],b=y.length,x;for(x=0;x<b-1;x+=2)v.push(parseInt(y.substr(x,2),16));return String.fromCharCode.apply(String,v)}function C(){this.reset()}return C.prototype.append=function(y){return this.appendBinary(u(y)),this},C.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var v=this._buff.length,b;for(b=64;b<=v;b+=64)i(this._hash,r(this._buff.substring(b-64,b)));return this._buff=this._buff.substring(b-64),this},C.prototype.end=function(y){var v=this._buff,b=v.length,x,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_;for(x=0;x<b;x+=1)E[x>>2]|=v.charCodeAt(x)<<(x%4<<3);return this._finish(E,b),_=l(this._hash),y&&(_=g(_)),this.reset(),_},C.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},C.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},C.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},C.prototype._finish=function(y,v){var b=v,x,E,_;if(y[b>>2]|=128<<(b%4<<3),b>55)for(i(this._hash,y),b=0;b<16;b+=1)y[b]=0;x=this._length*8,x=x.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(x[2],16),_=parseInt(x[1],16)||0,y[14]=E,y[15]=_,i(this._hash,y)},C.hash=function(y,v){return C.hashBinary(u(y),v)},C.hashBinary=function(y,v){var b=a(y),x=l(b);return v?g(x):x},C.ArrayBuffer=function(){this.reset()},C.ArrayBuffer.prototype.append=function(y){var v=p(this._buff.buffer,y,!0),b=v.length,x;for(this._length+=y.byteLength,x=64;x<=b;x+=64)i(this._hash,o(v.subarray(x-64,x)));return this._buff=x-64<b?new Uint8Array(v.buffer.slice(x-64)):new Uint8Array(0),this},C.ArrayBuffer.prototype.end=function(y){var v=this._buff,b=v.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,_;for(E=0;E<b;E+=1)x[E>>2]|=v[E]<<(E%4<<3);return this._finish(x,b),_=l(this._hash),y&&(_=g(_)),this.reset(),_},C.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},C.ArrayBuffer.prototype.getState=function(){var y=C.prototype.getState.call(this);return y.buff=f(y.buff),y},C.ArrayBuffer.prototype.setState=function(y){return y.buff=d(y.buff,!0),C.prototype.setState.call(this,y)},C.ArrayBuffer.prototype.destroy=C.prototype.destroy,C.ArrayBuffer.prototype._finish=C.prototype._finish,C.ArrayBuffer.hash=function(y,v){var b=h(new Uint8Array(y)),x=l(b);return v?g(x):x},C})})(qh);var rp=qh.exports;const op=jh(rp),hp=Wf&&window.File&&window.FileReader&&window.FileList&&window.Blob;function cp(s='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(s),t=>t.textContent)}const ur=s=>new XMLSerializer().serializeToString(s),lp=(s,t="text/html")=>new DOMParser().parseFromString(s,t),fr=(s,t={mime:Et.SVG,encode:ps.utf8})=>Ni(ur(s),t);async function dr(s=["*"],t){let e=[];const n=document.createElement("input");return n.setAttribute("type","file"),n.setAttribute("visibility","hidden"),n.setAttribute("accept",s.join(",")),t&&n.setAttribute("multiple","true"),n.addEventListener("click",i=>{n.value=""},!1),new Promise((i,r)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(i=>(n.remove(),i)).catch(i=>{throw n.remove(),i})}function Nn(s,t=Ut.text,e){return new Promise((n,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{n(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case Ut.dataURL:r.readAsDataURL(s);break;case Ut.binaryString:r.readAsBinaryString(s);break;case Ut.arraybuffer:r.readAsArrayBuffer(s);break;case Ut.text:default:r.readAsText(s)}})}async function up(s){const t=await Nn(s,Ut.arraybuffer);return Zf(t)}const fp=s=>{let t;return s instanceof File?t=s.name:t=s,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function dp(s){switch(s.toLowerCase()){case"jpg":case"jpeg":return Et.JPEG;case"gif":return Et.GIF;case"svg":return Et.SVG;case"pdf":return Et.PDF;case"png":default:return Et.PNG}}function Hh(s,t,e,n,i,r,o){const a=new FileReader;a.addEventListener("load",h=>{if(!h.target||!h.target.result)return t(h);if(e.append(h.target.result),o<n.size)Hh(s,t,e,n,i,o,Math.min(o+i,n.size));else return s(e.end())}),a.addEventListener("error",h=>t(h)),a.readAsArrayBuffer(n.slice(r,o))}async function Wh(s,t=1048576){return await new Promise((e,n)=>Hh(e,n,new op.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class mp{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new $h({baseURL:t.baseURL,interceptor:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await Wh(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{Af(this.time,1),this.onTime?.(Ef(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var Jh={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
19
- * http://hammerjs.github.io/
20
- *
21
- * Copyright (c) 2016 Jorik Tangelder;
22
- * Licensed under the MIT license */(function(s){(function(t,e,n,i){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",h=Math.round,c=Math.abs,l=Date.now;function u(w,S,P){return setTimeout(b(w,P),S)}function d(w,S,P){return Array.isArray(w)?(f(w,P[S],P),!0):!1}function f(w,S,P){var A;if(w)if(w.forEach)w.forEach(S,P);else if(w.length!==i)for(A=0;A<w.length;)S.call(P,w[A],A,w),A++;else for(A in w)w.hasOwnProperty(A)&&S.call(P,w[A],A,w)}function p(w,S,P){var A="DEPRECATED METHOD: "+S+`
23
- `+P+` AT
24
- `;return function(){var k=new Error("get-stack-trace"),z=k&&k.stack?k.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",q=t.console&&(t.console.warn||t.console.log);return q&&q.call(t.console,A,z),w.apply(this,arguments)}}var g;typeof Object.assign!="function"?g=function(S){if(S===i||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),A=1;A<arguments.length;A++){var k=arguments[A];if(k!==i&&k!==null)for(var z in k)k.hasOwnProperty(z)&&(P[z]=k[z])}return P}:g=Object.assign;var C=p(function(S,P,A){for(var k=Object.keys(P),z=0;z<k.length;)(!A||A&&S[k[z]]===i)&&(S[k[z]]=P[k[z]]),z++;return S},"extend","Use `assign`."),y=p(function(S,P){return C(S,P,!0)},"merge","Use `assign`.");function v(w,S,P){var A=S.prototype,k;k=w.prototype=Object.create(A),k.constructor=w,k._super=A,P&&g(k,P)}function b(w,S){return function(){return w.apply(S,arguments)}}function x(w,S){return typeof w==a?w.apply(S&&S[0]||i,S):w}function E(w,S){return w===i?S:w}function _(w,S,P){f(G(S),function(A){w.addEventListener(A,P,!1)})}function L(w,S,P){f(G(S),function(A){w.removeEventListener(A,P,!1)})}function N(w,S){for(;w;){if(w==S)return!0;w=w.parentNode}return!1}function Y(w,S){return w.indexOf(S)>-1}function G(w){return w.trim().split(/\s+/g)}function V(w,S,P){if(w.indexOf&&!P)return w.indexOf(S);for(var A=0;A<w.length;){if(P&&w[A][P]==S||!P&&w[A]===S)return A;A++}return-1}function J(w){return Array.prototype.slice.call(w,0)}function rt(w,S,P){for(var A=[],k=[],z=0;z<w.length;){var q=S?w[z][S]:w[z];V(k,q)<0&&A.push(w[z]),k[z]=q,z++}return P&&(S?A=A.sort(function(St,It){return St[S]>It[S]}):A=A.sort()),A}function tt(w,S){for(var P,A,k=S[0].toUpperCase()+S.slice(1),z=0;z<r.length;){if(P=r[z],A=P?P+k:S,A in w)return A;z++}return i}var te=1;function Xt(){return te++}function jt(w){var S=w.ownerDocument||w;return S.defaultView||S.parentWindow||t}var ee=/mobile|tablet|ip(ad|hone|od)|android/i,R="ontouchstart"in t,D=tt(t,"PointerEvent")!==i,$=R&&ee.test(navigator.userAgent),Z="touch",Mt="pen",ne="mouse",mi="kinect",pi=25,wt=1,he=2,ot=4,Ct=8,Pn=1,rn=2,on=4,Fe=8,I=16,at=rn|on,an=Fe|I,zu=at|an,Nu=["x","y"],gi=["clientX","clientY"];function qt(w,S){var P=this;this.manager=w,this.callback=S,this.element=w.element,this.target=w.options.inputTarget,this.domHandler=function(A){x(w.options.enable,[w])&&P.handler(A)},this.init()}qt.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(jt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(jt(this.element),this.evWin,this.domHandler)}};function C2(w){var S,P=w.options.inputClass;return P?S=P:D?S=da:$?S=bi:R?S=ma:S=wi,new S(w,E2)}function E2(w,S,P){var A=P.pointers.length,k=P.changedPointers.length,z=S&wt&&A-k===0,q=S&(ot|Ct)&&A-k===0;P.isFirst=!!z,P.isFinal=!!q,z&&(w.session={}),P.eventType=S,P2(w,P),w.emit("hammer.input",P),w.recognize(P),w.session.prevInput=P}function P2(w,S){var P=w.session,A=S.pointers,k=A.length;P.firstInput||(P.firstInput=Bu(S)),k>1&&!P.firstMultiple?P.firstMultiple=Bu(S):k===1&&(P.firstMultiple=!1);var z=P.firstInput,q=P.firstMultiple,bt=q?q.center:z.center,St=S.center=Fu(A);S.timeStamp=l(),S.deltaTime=S.timeStamp-z.timeStamp,S.angle=fa(bt,St),S.distance=yi(bt,St),T2(P,S),S.offsetDirection=Xu(S.deltaX,S.deltaY);var It=Yu(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=It.x,S.overallVelocityY=It.y,S.overallVelocity=c(It.x)>c(It.y)?It.x:It.y,S.scale=q?I2(q.pointers,A):1,S.rotation=q?M2(q.pointers,A):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,A2(P,S);var le=w.element;N(S.srcEvent.target,le)&&(le=S.srcEvent.target),S.target=le}function T2(w,S){var P=S.center,A=w.offsetDelta||{},k=w.prevDelta||{},z=w.prevInput||{};(S.eventType===wt||z.eventType===ot)&&(k=w.prevDelta={x:z.deltaX||0,y:z.deltaY||0},A=w.offsetDelta={x:P.x,y:P.y}),S.deltaX=k.x+(P.x-A.x),S.deltaY=k.y+(P.y-A.y)}function A2(w,S){var P=w.lastInterval||S,A=S.timeStamp-P.timeStamp,k,z,q,bt;if(S.eventType!=Ct&&(A>pi||P.velocity===i)){var St=S.deltaX-P.deltaX,It=S.deltaY-P.deltaY,le=Yu(A,St,It);z=le.x,q=le.y,k=c(le.x)>c(le.y)?le.x:le.y,bt=Xu(St,It),w.lastInterval=S}else k=P.velocity,z=P.velocityX,q=P.velocityY,bt=P.direction;S.velocity=k,S.velocityX=z,S.velocityY=q,S.direction=bt}function Bu(w){for(var S=[],P=0;P<w.pointers.length;)S[P]={clientX:h(w.pointers[P].clientX),clientY:h(w.pointers[P].clientY)},P++;return{timeStamp:l(),pointers:S,center:Fu(S),deltaX:w.deltaX,deltaY:w.deltaY}}function Fu(w){var S=w.length;if(S===1)return{x:h(w[0].clientX),y:h(w[0].clientY)};for(var P=0,A=0,k=0;k<S;)P+=w[k].clientX,A+=w[k].clientY,k++;return{x:h(P/S),y:h(A/S)}}function Yu(w,S,P){return{x:S/w||0,y:P/w||0}}function Xu(w,S){return w===S?Pn:c(w)>=c(S)?w<0?rn:on:S<0?Fe:I}function yi(w,S,P){P||(P=Nu);var A=S[P[0]]-w[P[0]],k=S[P[1]]-w[P[1]];return Math.sqrt(A*A+k*k)}function fa(w,S,P){P||(P=Nu);var A=S[P[0]]-w[P[0]],k=S[P[1]]-w[P[1]];return Math.atan2(k,A)*180/Math.PI}function M2(w,S){return fa(S[1],S[0],gi)+fa(w[1],w[0],gi)}function I2(w,S){return yi(S[0],S[1],gi)/yi(w[0],w[1],gi)}var k2={mousedown:wt,mousemove:he,mouseup:ot},D2="mousedown",L2="mousemove mouseup";function wi(){this.evEl=D2,this.evWin=L2,this.pressed=!1,qt.apply(this,arguments)}v(wi,qt,{handler:function(S){var P=k2[S.type];P&wt&&S.button===0&&(this.pressed=!0),P&he&&S.which!==1&&(P=ot),this.pressed&&(P&ot&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:ne,srcEvent:S}))}});var R2={pointerdown:wt,pointermove:he,pointerup:ot,pointercancel:Ct,pointerout:Ct},O2={2:Z,3:Mt,4:ne,5:mi},Uu="pointerdown",$u="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Uu="MSPointerDown",$u="MSPointerMove MSPointerUp MSPointerCancel");function da(){this.evEl=Uu,this.evWin=$u,qt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}v(da,qt,{handler:function(S){var P=this.store,A=!1,k=S.type.toLowerCase().replace("ms",""),z=R2[k],q=O2[S.pointerType]||S.pointerType,bt=q==Z,St=V(P,S.pointerId,"pointerId");z&wt&&(S.button===0||bt)?St<0&&(P.push(S),St=P.length-1):z&(ot|Ct)&&(A=!0),!(St<0)&&(P[St]=S,this.callback(this.manager,z,{pointers:P,changedPointers:[S],pointerType:q,srcEvent:S}),A&&P.splice(St,1))}});var z2={touchstart:wt,touchmove:he,touchend:ot,touchcancel:Ct},N2="touchstart",B2="touchstart touchmove touchend touchcancel";function Gu(){this.evTarget=N2,this.evWin=B2,this.started=!1,qt.apply(this,arguments)}v(Gu,qt,{handler:function(S){var P=z2[S.type];if(P===wt&&(this.started=!0),!!this.started){var A=F2.call(this,S,P);P&(ot|Ct)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:Z,srcEvent:S})}}});function F2(w,S){var P=J(w.touches),A=J(w.changedTouches);return S&(ot|Ct)&&(P=rt(P.concat(A),"identifier",!0)),[P,A]}var Y2={touchstart:wt,touchmove:he,touchend:ot,touchcancel:Ct},X2="touchstart touchmove touchend touchcancel";function bi(){this.evTarget=X2,this.targetIds={},qt.apply(this,arguments)}v(bi,qt,{handler:function(S){var P=Y2[S.type],A=U2.call(this,S,P);A&&this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:Z,srcEvent:S})}});function U2(w,S){var P=J(w.touches),A=this.targetIds;if(S&(wt|he)&&P.length===1)return A[P[0].identifier]=!0,[P,P];var k,z,q=J(w.changedTouches),bt=[],St=this.target;if(z=P.filter(function(It){return N(It.target,St)}),S===wt)for(k=0;k<z.length;)A[z[k].identifier]=!0,k++;for(k=0;k<q.length;)A[q[k].identifier]&&bt.push(q[k]),S&(ot|Ct)&&delete A[q[k].identifier],k++;if(bt.length)return[rt(z.concat(bt),"identifier",!0),bt]}var $2=2500,Vu=25;function ma(){qt.apply(this,arguments);var w=b(this.handler,this);this.touch=new bi(this.manager,w),this.mouse=new wi(this.manager,w),this.primaryTouch=null,this.lastTouches=[]}v(ma,qt,{handler:function(S,P,A){var k=A.pointerType==Z,z=A.pointerType==ne;if(!(z&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(k)G2.call(this,P,A);else if(z&&V2.call(this,A))return;this.callback(S,P,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function G2(w,S){w&wt?(this.primaryTouch=S.changedPointers[0].identifier,ju.call(this,S)):w&(ot|Ct)&&ju.call(this,S)}function ju(w){var S=w.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var A=this.lastTouches,k=function(){var z=A.indexOf(P);z>-1&&A.splice(z,1)};setTimeout(k,$2)}}function V2(w){for(var S=w.srcEvent.clientX,P=w.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var k=this.lastTouches[A],z=Math.abs(S-k.x),q=Math.abs(P-k.y);if(z<=Vu&&q<=Vu)return!0}return!1}var qu=tt(o.style,"touchAction"),Hu=qu!==i,Wu="compute",Ju="auto",pa="manipulation",hn="none",us="pan-x",fs="pan-y",xi=q2();function ga(w,S){this.manager=w,this.set(S)}ga.prototype={set:function(w){w==Wu&&(w=this.compute()),Hu&&this.manager.element.style&&xi[w]&&(this.manager.element.style[qu]=w),this.actions=w.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var w=[];return f(this.manager.recognizers,function(S){x(S.options.enable,[S])&&(w=w.concat(S.getTouchAction()))}),j2(w.join(" "))},preventDefaults:function(w){var S=w.srcEvent,P=w.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var A=this.actions,k=Y(A,hn)&&!xi[hn],z=Y(A,fs)&&!xi[fs],q=Y(A,us)&&!xi[us];if(k){var bt=w.pointers.length===1,St=w.distance<2,It=w.deltaTime<250;if(bt&&St&&It)return}if(!(q&&z)&&(k||z&&P&at||q&&P&an))return this.preventSrc(S)},preventSrc:function(w){this.manager.session.prevented=!0,w.preventDefault()}};function j2(w){if(Y(w,hn))return hn;var S=Y(w,us),P=Y(w,fs);return S&&P?hn:S||P?S?us:fs:Y(w,pa)?pa:Ju}function q2(){if(!Hu)return!1;var w={},S=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){w[P]=S?t.CSS.supports("touch-action",P):!0}),w}var vi=1,Ht=2,Tn=4,Ye=8,ve=Ye,ds=16,ce=32;function Se(w){this.options=g({},this.defaults,w||{}),this.id=Xt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=vi,this.simultaneous={},this.requireFail=[]}Se.prototype={defaults:{},set:function(w){return g(this.options,w),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(w){if(d(w,"recognizeWith",this))return this;var S=this.simultaneous;return w=Si(w,this),S[w.id]||(S[w.id]=w,w.recognizeWith(this)),this},dropRecognizeWith:function(w){return d(w,"dropRecognizeWith",this)?this:(w=Si(w,this),delete this.simultaneous[w.id],this)},requireFailure:function(w){if(d(w,"requireFailure",this))return this;var S=this.requireFail;return w=Si(w,this),V(S,w)===-1&&(S.push(w),w.requireFailure(this)),this},dropRequireFailure:function(w){if(d(w,"dropRequireFailure",this))return this;w=Si(w,this);var S=V(this.requireFail,w);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(w){return!!this.simultaneous[w.id]},emit:function(w){var S=this,P=this.state;function A(k){S.manager.emit(k,w)}P<Ye&&A(S.options.event+Zu(P)),A(S.options.event),w.additionalEvent&&A(w.additionalEvent),P>=Ye&&A(S.options.event+Zu(P))},tryEmit:function(w){if(this.canEmit())return this.emit(w);this.state=ce},canEmit:function(){for(var w=0;w<this.requireFail.length;){if(!(this.requireFail[w].state&(ce|vi)))return!1;w++}return!0},recognize:function(w){var S=g({},w);if(!x(this.options.enable,[this,S])){this.reset(),this.state=ce;return}this.state&(ve|ds|ce)&&(this.state=vi),this.state=this.process(S),this.state&(Ht|Tn|Ye|ds)&&this.tryEmit(S)},process:function(w){},getTouchAction:function(){},reset:function(){}};function Zu(w){return w&ds?"cancel":w&Ye?"end":w&Tn?"move":w&Ht?"start":""}function Ku(w){return w==I?"down":w==Fe?"up":w==rn?"left":w==on?"right":""}function Si(w,S){var P=S.manager;return P?P.get(w):w}function se(){Se.apply(this,arguments)}v(se,Se,{defaults:{pointers:1},attrTest:function(w){var S=this.options.pointers;return S===0||w.pointers.length===S},process:function(w){var S=this.state,P=w.eventType,A=S&(Ht|Tn),k=this.attrTest(w);return A&&(P&Ct||!k)?S|ds:A||k?P&ot?S|Ye:S&Ht?S|Tn:Ht:ce}});function _i(){se.apply(this,arguments),this.pX=null,this.pY=null}v(_i,se,{defaults:{event:"pan",threshold:10,pointers:1,direction:zu},getTouchAction:function(){var w=this.options.direction,S=[];return w&at&&S.push(fs),w&an&&S.push(us),S},directionTest:function(w){var S=this.options,P=!0,A=w.distance,k=w.direction,z=w.deltaX,q=w.deltaY;return k&S.direction||(S.direction&at?(k=z===0?Pn:z<0?rn:on,P=z!=this.pX,A=Math.abs(w.deltaX)):(k=q===0?Pn:q<0?Fe:I,P=q!=this.pY,A=Math.abs(w.deltaY))),w.direction=k,P&&A>S.threshold&&k&S.direction},attrTest:function(w){return se.prototype.attrTest.call(this,w)&&(this.state&Ht||!(this.state&Ht)&&this.directionTest(w))},emit:function(w){this.pX=w.deltaX,this.pY=w.deltaY;var S=Ku(w.direction);S&&(w.additionalEvent=this.options.event+S),this._super.emit.call(this,w)}});function ya(){se.apply(this,arguments)}v(ya,se,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[hn]},attrTest:function(w){return this._super.attrTest.call(this,w)&&(Math.abs(w.scale-1)>this.options.threshold||this.state&Ht)},emit:function(w){if(w.scale!==1){var S=w.scale<1?"in":"out";w.additionalEvent=this.options.event+S}this._super.emit.call(this,w)}});function wa(){Se.apply(this,arguments),this._timer=null,this._input=null}v(wa,Se,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ju]},process:function(w){var S=this.options,P=w.pointers.length===S.pointers,A=w.distance<S.threshold,k=w.deltaTime>S.time;if(this._input=w,!A||!P||w.eventType&(ot|Ct)&&!k)this.reset();else if(w.eventType&wt)this.reset(),this._timer=u(function(){this.state=ve,this.tryEmit()},S.time,this);else if(w.eventType&ot)return ve;return ce},reset:function(){clearTimeout(this._timer)},emit:function(w){this.state===ve&&(w&&w.eventType&ot?this.manager.emit(this.options.event+"up",w):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function ba(){se.apply(this,arguments)}v(ba,se,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[hn]},attrTest:function(w){return this._super.attrTest.call(this,w)&&(Math.abs(w.rotation)>this.options.threshold||this.state&Ht)}});function xa(){se.apply(this,arguments)}v(xa,se,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|an,pointers:1},getTouchAction:function(){return _i.prototype.getTouchAction.call(this)},attrTest:function(w){var S=this.options.direction,P;return S&(at|an)?P=w.overallVelocity:S&at?P=w.overallVelocityX:S&an&&(P=w.overallVelocityY),this._super.attrTest.call(this,w)&&S&w.offsetDirection&&w.distance>this.options.threshold&&w.maxPointers==this.options.pointers&&c(P)>this.options.velocity&&w.eventType&ot},emit:function(w){var S=Ku(w.offsetDirection);S&&this.manager.emit(this.options.event+S,w),this.manager.emit(this.options.event,w)}});function Ci(){Se.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}v(Ci,Se,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[pa]},process:function(w){var S=this.options,P=w.pointers.length===S.pointers,A=w.distance<S.threshold,k=w.deltaTime<S.time;if(this.reset(),w.eventType&wt&&this.count===0)return this.failTimeout();if(A&&k&&P){if(w.eventType!=ot)return this.failTimeout();var z=this.pTime?w.timeStamp-this.pTime<S.interval:!0,q=!this.pCenter||yi(this.pCenter,w.center)<S.posThreshold;this.pTime=w.timeStamp,this.pCenter=w.center,!q||!z?this.count=1:this.count+=1,this._input=w;var bt=this.count%S.taps;if(bt===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ve,this.tryEmit()},S.interval,this),Ht):ve}return ce},failTimeout:function(){return this._timer=u(function(){this.state=ce},this.options.interval,this),ce},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function _e(w,S){return S=S||{},S.recognizers=E(S.recognizers,_e.defaults.preset),new va(w,S)}_e.VERSION="2.0.7",_e.defaults={domEvents:!1,touchAction:Wu,enable:!0,inputTarget:null,inputClass:null,preset:[[ba,{enable:!1}],[ya,{enable:!1},["rotate"]],[xa,{direction:at}],[_i,{direction:at},["swipe"]],[Ci],[Ci,{event:"doubletap",taps:2},["tap"]],[wa]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var H2=1,Qu=2;function va(w,S){this.options=g({},_e.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||w,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=w,this.input=C2(this),this.touchAction=new ga(this,this.options.touchAction),tf(this,!0),f(this.options.recognizers,function(P){var A=this.add(new P[0](P[1]));P[2]&&A.recognizeWith(P[2]),P[3]&&A.requireFailure(P[3])},this)}va.prototype={set:function(w){return g(this.options,w),w.touchAction&&this.touchAction.update(),w.inputTarget&&(this.input.destroy(),this.input.target=w.inputTarget,this.input.init()),this},stop:function(w){this.session.stopped=w?Qu:H2},recognize:function(w){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(w);var P,A=this.recognizers,k=S.curRecognizer;(!k||k&&k.state&ve)&&(k=S.curRecognizer=null);for(var z=0;z<A.length;)P=A[z],S.stopped!==Qu&&(!k||P==k||P.canRecognizeWith(k))?P.recognize(w):P.reset(),!k&&P.state&(Ht|Tn|Ye)&&(k=S.curRecognizer=P),z++}},get:function(w){if(w instanceof Se)return w;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==w)return S[P];return null},add:function(w){if(d(w,"add",this))return this;var S=this.get(w.options.event);return S&&this.remove(S),this.recognizers.push(w),w.manager=this,this.touchAction.update(),w},remove:function(w){if(d(w,"remove",this))return this;if(w=this.get(w),w){var S=this.recognizers,P=V(S,w);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(w,S){if(w!==i&&S!==i){var P=this.handlers;return f(G(w),function(A){P[A]=P[A]||[],P[A].push(S)}),this}},off:function(w,S){if(w!==i){var P=this.handlers;return f(G(w),function(A){S?P[A]&&P[A].splice(V(P[A],S),1):delete P[A]}),this}},emit:function(w,S){this.options.domEvents&&W2(w,S);var P=this.handlers[w]&&this.handlers[w].slice();if(!(!P||!P.length)){S.type=w,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var A=0;A<P.length;)P[A](S),A++}},destroy:function(){this.element&&tf(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function tf(w,S){var P=w.element;if(P.style){var A;f(w.options.cssProps,function(k,z){A=tt(P.style,z),S?(w.oldCssProps[A]=P.style[A],P.style[A]=k):P.style[A]=w.oldCssProps[A]||""}),S||(w.oldCssProps={})}}function W2(w,S){var P=e.createEvent("Event");P.initEvent(w,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}g(_e,{INPUT_START:wt,INPUT_MOVE:he,INPUT_END:ot,INPUT_CANCEL:Ct,STATE_POSSIBLE:vi,STATE_BEGAN:Ht,STATE_CHANGED:Tn,STATE_ENDED:Ye,STATE_RECOGNIZED:ve,STATE_CANCELLED:ds,STATE_FAILED:ce,DIRECTION_NONE:Pn,DIRECTION_LEFT:rn,DIRECTION_RIGHT:on,DIRECTION_UP:Fe,DIRECTION_DOWN:I,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:an,DIRECTION_ALL:zu,Manager:va,Input:qt,TouchAction:ga,TouchInput:bi,MouseInput:wi,PointerEventInput:da,TouchMouseInput:ma,SingleTouchInput:Gu,Recognizer:Se,AttrRecognizer:se,Tap:Ci,Pan:_i,Swipe:xa,Pinch:ya,Rotate:ba,Press:wa,on:_,off:L,each:f,merge:y,extend:C,assign:g,inherit:v,bindFn:b,prefixed:tt});var J2=typeof t<"u"?t:typeof self<"u"?self:{};J2.Hammer=_e,typeof i=="function"&&i.amd?i(function(){return _e}):s.exports?s.exports=_e:t[n]=_e})(window,document,"Hammer")})(Jh);var pp=Jh.exports;const nt=jh(pp);var mr=function(s,t){return mr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},mr(s,t)};function oe(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mr(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function gp(s,t,e,n){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function h(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?r(l.value):i(l.value).then(a,h)}c((n=n.apply(s,t||[])).next())})}function Zh(s,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return h([c,l])}}function h(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(n=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(s,e)}catch(l){c=[6,l],i=0}finally{n=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ge(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function de(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Pe(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function dn(s){return this instanceof dn?(this.v=s,this):new dn(s)}function yp(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(p){return Promise.resolve(p).then(f,u)}}function a(f,p){n[f]&&(i[f]=function(g){return new Promise(function(C,y){r.push([f,g,C,y])>1||h(f,g)})},p&&(i[f]=p(i[f])))}function h(f,p){try{c(n[f](p))}catch(g){d(r[0][3],g)}}function c(f){f.value instanceof dn?Promise.resolve(f.value.v).then(l,u):d(r[0][2],f)}function l(f){h("next",f)}function u(f){h("throw",f)}function d(f,p){f(p),r.shift(),r.length&&h(r[0][0],r[0][1])}}function wp(s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=s[Symbol.asyncIterator],e;return t?t.call(s):(s=typeof Ge=="function"?Ge(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=s[r]&&function(o){return new Promise(function(a,h){o=s[r](o),i(a,h,o.done,o.value)})}}function i(r,o,a,h){Promise.resolve(h).then(function(c){r({value:c,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function H(s){return typeof s=="function"}function pr(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var gr=pr(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
25
- `+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
26
- `):"",this.name="UnsubscriptionError",this.errors=e}});function Bn(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var mn=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Ge(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(g){t={error:g}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(H(l))try{l()}catch(g){r=g instanceof gr?g.errors:[g]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Ge(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{tc(p)}catch(g){r=r??[],g instanceof gr?r=Pe(Pe([],de(r)),de(g.errors)):r.push(g)}}}catch(g){n={error:g}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new gr(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)tc(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Bn(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Bn(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),Kh=mn.EMPTY;function Qh(s){return s instanceof mn||s&&"closed"in s&&H(s.remove)&&H(s.add)&&H(s.unsubscribe)}function tc(s){H(s)?s():s.unsubscribe()}var ec={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yr={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=yr.delegate;return i?.setTimeout?i.setTimeout.apply(i,Pe([s,t],de(e))):setTimeout.apply(void 0,Pe([s,t],de(e)))},clearTimeout:function(s){var t=yr.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function nc(s){yr.setTimeout(function(){throw s})}function Fn(){}function Fs(s){s()}var wr=function(s){oe(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Qh(e)&&e.add(n)):n.destination=Sp,n}return t.create=function(e,n,i){return new pn(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(mn),bp=Function.prototype.bind;function br(s,t){return bp.call(s,t)}var xp=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){Ys(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Ys(n)}else Ys(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Ys(e)}},s}(),pn=function(s){oe(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(H(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&ec.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&br(e.next,a),error:e.error&&br(e.error,a),complete:e.complete&&br(e.complete,a)}):o=e}return r.destination=new xp(o),r}return t}(wr);function Ys(s){nc(s)}function vp(s){throw s}var Sp={closed:!0,next:Fn,error:vp,complete:Fn},xr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ve(s){return s}function _p(s){return s.length===0?Ve:s.length===1?s[0]:function(e){return s.reduce(function(n,i){return i(n)},e)}}var st=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=Ep(t)?t:new pn(t,e,n);return Fs(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=sc(e),new e(function(i,r){var o=new pn({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[xr]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _p(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=sc(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s}();function sc(s){var t;return(t=s??ec.Promise)!==null&&t!==void 0?t:Promise}function Cp(s){return s&&H(s.next)&&H(s.error)&&H(s.complete)}function Ep(s){return s&&s instanceof wr||Cp(s)&&Qh(s)}function Pp(s){return H(s?.lift)}function kt(s){return function(t){if(Pp(t))return t.lift(function(e){try{return s(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ft(s,t,e,n,i){return new Tp(s,t,e,n,i)}var Tp=function(s){oe(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(l){e.error(l)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(l){e.error(l)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(wr),Ap=pr(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Te=function(s){oe(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var n=new ic(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ap},t.prototype.next=function(e){var n=this;Fs(function(){var i,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=Ge(n.currentObservers),a=o.next();!a.done;a=o.next()){var h=a.value;h.next(e)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var n=this;Fs(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var i=n.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Fs(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var n=e.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var n=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?Kh:(this.currentObservers=null,a.push(e),new mn(function(){n.currentObservers=null,Bn(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,i=n.hasError,r=n.thrownError,o=n.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new st;return e.source=this,e},t.create=function(e,n){return new ic(e,n)},t}(st),ic=function(s){oe(t,s);function t(e,n){var i=s.call(this)||this;return i.destination=e,i.source=n,i}return t.prototype.next=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)},t.prototype.error=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)},t.prototype.complete=function(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)},t.prototype._subscribe=function(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:Kh},t}(Te),rc=function(s){oe(t,s);function t(e){var n=s.call(this)||this;return n._value=e,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var n=s.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},t.prototype.getValue=function(){var e=this,n=e.hasError,i=e.thrownError,r=e._value;if(n)throw i;return this._throwIfClosed(),r},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(Te),vr={now:function(){return(vr.delegate||Date).now()},delegate:void 0},Mp=function(s){oe(t,s);function t(e,n,i){e===void 0&&(e=1/0),n===void 0&&(n=1/0),i===void 0&&(i=vr);var r=s.call(this)||this;return r._bufferSize=e,r._windowTime=n,r._timestampProvider=i,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=n===1/0,r._bufferSize=Math.max(1,e),r._windowTime=Math.max(1,n),r}return t.prototype.next=function(e){var n=this,i=n.isStopped,r=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,h=n._windowTime;i||(r.push(e),!o&&r.push(a.now()+h)),this._trimBuffer(),s.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(e),i=this,r=i._infiniteTimeWindow,o=i._buffer,a=o.slice(),h=0;h<a.length&&!e.closed;h+=r?1:2)e.next(a[h]);return this._checkFinalizedStatuses(e),n},t.prototype._trimBuffer=function(){var e=this,n=e._bufferSize,i=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<r.length&&r.splice(0,r.length-a),!o){for(var h=i.now(),c=0,l=1;l<r.length&&r[l]<=h;l+=2)c=l;c&&r.splice(0,c+1)}},t}(Te),Ip=function(s){oe(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(mn),Xs={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=Xs.delegate;return i?.setInterval?i.setInterval.apply(i,Pe([s,t],de(e))):setInterval.apply(void 0,Pe([s,t],de(e)))},clearInterval:function(s){var t=Xs.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},kp=function(s){oe(t,s);function t(e,n){var i=s.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(e,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,i){return i===void 0&&(i=0),Xs.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Xs.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Bn(r,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(Ip),oc=function(){function s(t,e){e===void 0&&(e=s.now),this.schedulerActionCtor=t,this.now=e}return s.prototype.schedule=function(t,e,n){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},s.now=vr.now,s}(),Dp=function(s){oe(t,s);function t(e,n){n===void 0&&(n=oc.now);var i=s.call(this,e,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}},t}(oc),Sr=new Dp(kp),Lp=Sr,ac=new st(function(s){return s.complete()});function hc(s){return s&&H(s.schedule)}function _r(s){return s[s.length-1]}function Rp(s){return H(_r(s))?s.pop():void 0}function Yn(s){return hc(_r(s))?s.pop():void 0}function Op(s,t){return typeof _r(s)=="number"?s.pop():t}var Cr=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function cc(s){return H(s?.then)}function lc(s){return H(s[xr])}function uc(s){return Symbol.asyncIterator&&H(s?.[Symbol.asyncIterator])}function fc(s){return new TypeError("You provided "+(s!==null&&typeof s=="object"?"an invalid object":"'"+s+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function zp(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var dc=zp();function mc(s){return H(s?.[dc])}function pc(s){return yp(this,arguments,function(){var e,n,i,r;return Zh(this,function(o){switch(o.label){case 0:e=s.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,dn(e.read())];case 3:return n=o.sent(),i=n.value,r=n.done,r?[4,dn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,dn(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function gc(s){return H(s?.getReader)}function pt(s){if(s instanceof st)return s;if(s!=null){if(lc(s))return Np(s);if(Cr(s))return Bp(s);if(cc(s))return Fp(s);if(uc(s))return yc(s);if(mc(s))return Yp(s);if(gc(s))return Xp(s)}throw fc(s)}function Np(s){return new st(function(t){var e=s[xr]();if(H(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Bp(s){return new st(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function Fp(s){return new st(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,nc)})}function Yp(s){return new st(function(t){var e,n;try{for(var i=Ge(s),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function yc(s){return new st(function(t){Up(s,t).catch(function(e){return t.error(e)})})}function Xp(s){return yc(pc(s))}function Up(s,t){var e,n,i,r;return gp(this,void 0,void 0,function(){var o,a;return Zh(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),e=wp(s),h.label=1;case 1:return[4,e.next()];case 2:if(n=h.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=h.sent(),i={error:a},[3,11];case 6:return h.trys.push([6,,9,10]),n&&!n.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function me(s,t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(r),!i)return r}function wc(s,t){return t===void 0&&(t=0),kt(function(e,n){e.subscribe(ft(n,function(i){return me(n,s,function(){return n.next(i)},t)},function(){return me(n,s,function(){return n.complete()},t)},function(i){return me(n,s,function(){return n.error(i)},t)}))})}function Er(s,t){return t===void 0&&(t=0),kt(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function $p(s,t){return pt(s).pipe(Er(t),wc(t))}function Gp(s,t){return pt(s).pipe(Er(t),wc(t))}function Vp(s,t){return new st(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function jp(s,t){return new st(function(e){var n;return me(e,t,function(){n=s[dc](),me(e,t,function(){var i,r,o;try{i=n.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return H(n?.return)&&n.return()}})}function bc(s,t){if(!s)throw new Error("Iterable cannot be null");return new st(function(e){me(e,t,function(){var n=s[Symbol.asyncIterator]();me(e,t,function(){n.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function qp(s,t){return bc(pc(s),t)}function Hp(s,t){if(s!=null){if(lc(s))return $p(s,t);if(Cr(s))return Vp(s,t);if(cc(s))return Gp(s,t);if(uc(s))return bc(s,t);if(mc(s))return jp(s,t);if(gc(s))return qp(s,t)}throw fc(s)}function Xn(s,t){return t?Hp(s,t):pt(s)}function Wp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Yn(s);return Xn(s,e)}var Jp=pr(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function Zp(s,t){var e=typeof t=="object";return new Promise(function(n,i){var r=new pn({next:function(o){n(o),r.unsubscribe()},error:i,complete:function(){e?n(t.defaultValue):i(new Jp)}});s.subscribe(r)})}function Kp(s){return s instanceof Date&&!isNaN(s)}function it(s,t){return kt(function(e,n){var i=0;e.subscribe(ft(n,function(r){n.next(s.call(t,r,i++))}))})}var Qp=Array.isArray;function tg(s,t){return Qp(t)?s.apply(void 0,Pe([],de(t))):s(t)}function Pr(s){return it(function(t){return tg(s,t)})}var eg=Array.isArray,ng=Object.getPrototypeOf,sg=Object.prototype,ig=Object.keys;function rg(s){if(s.length===1){var t=s[0];if(eg(t))return{args:t,keys:null};if(og(t)){var e=ig(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function og(s){return s&&typeof s=="object"&&ng(s)===sg}function ag(s,t){return s.reduce(function(e,n,i){return e[n]=t[i],e},{})}function hg(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Yn(s),n=Rp(s),i=rg(s),r=i.args,o=i.keys;if(r.length===0)return Xn([],e);var a=new st(cg(r,e,o?function(h){return ag(o,h)}:Ve));return n?a.pipe(Pr(n)):a}function cg(s,t,e){return e===void 0&&(e=Ve),function(n){xc(t,function(){for(var i=s.length,r=new Array(i),o=i,a=i,h=function(l){xc(t,function(){var u=Xn(s[l],t),d=!1;u.subscribe(ft(n,function(f){r[l]=f,d||(d=!0,a--),a||n.next(e(r.slice()))},function(){--o||n.complete()}))},n)},c=0;c<i;c++)h(c)},n)}}function xc(s,t,e){s?me(e,s,t):t()}function lg(s,t,e,n,i,r,o,a){var h=[],c=0,l=0,u=!1,d=function(){u&&!h.length&&!c&&t.complete()},f=function(g){return c<n?p(g):h.push(g)},p=function(g){r&&t.next(g),c++;var C=!1;pt(e(g,l++)).subscribe(ft(t,function(y){i?.(y),r?f(y):t.next(y)},function(){C=!0},void 0,function(){if(C)try{c--;for(var y=function(){var v=h.shift();o?me(t,o,function(){return p(v)}):p(v)};h.length&&c<n;)y();d()}catch(v){t.error(v)}}))};return s.subscribe(ft(t,f,function(){u=!0,d()})),function(){a?.()}}function Tr(s,t,e){return e===void 0&&(e=1/0),H(t)?Tr(function(n,i){return it(function(r,o){return t(n,r,i,o)})(pt(s(n,i)))},e):(typeof t=="number"&&(e=t),kt(function(n,i){return lg(n,i,s,e)}))}function vc(s){return s===void 0&&(s=1/0),Tr(Ve,s)}function ug(){return vc(1)}function Sc(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return ug()(Xn(s,Yn(s)))}var fg=["addListener","removeListener"],dg=["addEventListener","removeEventListener"],mg=["on","off"];function Ar(s,t,e,n){if(H(e)&&(n=e,e=void 0),n)return Ar(s,t,e).pipe(Pr(n));var i=de(yg(s)?dg.map(function(a){return function(h){return s[a](t,h,e)}}):pg(s)?fg.map(_c(s,t)):gg(s)?mg.map(_c(s,t)):[],2),r=i[0],o=i[1];if(!r&&Cr(s))return Tr(function(a){return Ar(a,t,e)})(pt(s));if(!r)throw new TypeError("Invalid event target");return new st(function(a){var h=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return a.next(1<c.length?c:c[0])};return r(h),function(){return o(h)}})}function _c(s,t){return function(e){return function(n){return s[e](t,n)}}}function pg(s){return H(s.addListener)&&H(s.removeListener)}function gg(s){return H(s.on)&&H(s.off)}function yg(s){return H(s.addEventListener)&&H(s.removeEventListener)}function et(s,t,e){return e?et(s,t).pipe(Pr(e)):new st(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},r=s(i);return H(t)?function(){return t(i,r)}:void 0})}function wg(s,t,e){s===void 0&&(s=0),e===void 0&&(e=Lp);var n=-1;return t!=null&&(hc(t)?e=t:n=t),new st(function(i){var r=Kp(s)?+s-e.now():s;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},r)})}function Cc(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Yn(s),n=Op(s,1/0),i=s;return i.length?i.length===1?pt(i[0]):vc(n)(Xn(i,e)):ac}var bg=Array.isArray;function xg(s){return s.length===1&&bg(s[0])?s[0]:s}function Ec(s,t){return kt(function(e,n){var i=0;e.subscribe(ft(n,function(r){return s.call(t,r,i++)&&n.next(r)}))})}function Us(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=xg(s),s.length===1?pt(s[0]):new st(vg(s))}function vg(s){return function(t){for(var e=[],n=function(r){e.push(pt(s[r]).subscribe(ft(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},i=0;e&&!t.closed&&i<s.length;i++)n(i)}}function Ae(s,t){return t===void 0&&(t=Ve),s=s??Sg,kt(function(e,n){var i,r=!0;e.subscribe(ft(n,function(o){var a=t(o);(r||!s(i,a))&&(r=!1,i=a,n.next(o))}))})}function Sg(s,t){return s===t}function Pc(s,t){return t?function(e){return e.pipe(Pc(function(n,i){return pt(s(n,i)).pipe(it(function(r,o){return t(n,r,i,o)}))}))}:kt(function(e,n){var i=0,r=null,o=!1;e.subscribe(ft(n,function(a){r||(r=ft(n,void 0,function(){r=null,o&&n.complete()}),pt(s(a,i++)).subscribe(r))},function(){o=!0,!r&&n.complete()}))})}function _g(s){s===void 0&&(s={});var t=s.connector,e=t===void 0?function(){return new Te}:t,n=s.resetOnError,i=n===void 0?!0:n,r=s.resetOnComplete,o=r===void 0?!0:r,a=s.resetOnRefCountZero,h=a===void 0?!0:a;return function(c){var l,u,d,f=0,p=!1,g=!1,C=function(){u?.unsubscribe(),u=void 0},y=function(){C(),l=d=void 0,p=g=!1},v=function(){var b=l;y(),b?.unsubscribe()};return kt(function(b,x){f++,!g&&!p&&C();var E=d=d??e();x.add(function(){f--,f===0&&!g&&!p&&(u=Mr(v,h))}),E.subscribe(x),!l&&f>0&&(l=new pn({next:function(_){return E.next(_)},error:function(_){g=!0,C(),u=Mr(y,i,_),E.error(_)},complete:function(){p=!0,C(),u=Mr(y,o),E.complete()}}),pt(b).subscribe(l))})(c)}}function Mr(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];if(t===!0){s();return}if(t!==!1){var i=new pn({next:function(){i.unsubscribe(),s()}});return pt(t.apply(void 0,Pe([],de(e)))).subscribe(i)}}function Cg(s,t,e){var n,i,r,o,a=!1;return s&&typeof s=="object"?(n=s.bufferSize,o=n===void 0?1/0:n,i=s.windowTime,t=i===void 0?1/0:i,r=s.refCount,a=r===void 0?!1:r,e=s.scheduler):o=s??1/0,_g({connector:function(){return new Mp(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function je(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Yn(s);return kt(function(n,i){(e?Sc(s,n,e):Sc(s,n)).subscribe(i)})}function $s(s,t){return kt(function(e,n){var i=null,r=0,o=!1,a=function(){return o&&!i&&n.complete()};e.subscribe(ft(n,function(h){i?.unsubscribe();var c=0,l=r++;pt(s(h,l)).subscribe(i=ft(n,function(u){return n.next(t?t(h,u,l,c++):u)},function(){i=null,a()}))},function(){o=!0,a()}))})}function Eg(){return $s(Ve)}function Ir(s){return kt(function(t,e){pt(s).subscribe(ft(e,function(){return e.complete()},Fn)),!e.closed&&t.subscribe(e)})}function qe(s,t,e){var n=H(s)||t||e?{next:s,error:t,complete:e}:s;return n?kt(function(i,r){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(ft(r,function(h){var c;(c=n.next)===null||c===void 0||c.call(n,h),r.next(h)},function(){var h;a=!1,(h=n.complete)===null||h===void 0||h.call(n),r.complete()},function(h){var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,h),r.error(h)},function(){var h,c;a&&((h=n.unsubscribe)===null||h===void 0||h.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Ve}function Pg(s,t){return kt(function(e,n){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,h=a===void 0?!1:a,c=!1,l=null,u=null,d=!1,f=function(){u?.unsubscribe(),u=null,h&&(C(),d&&n.complete())},p=function(){u=null,d&&n.complete()},g=function(y){return u=pt(s(y)).subscribe(ft(n,f,p))},C=function(){if(c){c=!1;var y=l;l=null,n.next(y),!d&&g(y)}};e.subscribe(ft(n,function(y){c=!0,l=y,!(u&&!u.closed)&&(o?C():g(y))},function(){d=!0,!(h&&c&&u&&!u.closed)&&n.complete()}))})}function Tg(s,t,e){t===void 0&&(t=Sr);var n=wg(s,t);return Pg(function(){return n},e)}function Ag(s,t){return kt(function(e,n){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};pt(s).subscribe(ft(n,function(o){var a=new Te;i.push(a);var h=new mn,c=function(){Bn(i,a),a.complete(),h.unsubscribe()},l;try{l=pt(t(o))}catch(u){r(u);return}n.next(a.asObservable()),h.add(l.subscribe(ft(n,c,Fn,r)))},Fn)),e.subscribe(ft(n,function(o){var a,h,c=i.slice();try{for(var l=Ge(c),u=l.next();!u.done;u=l.next()){var d=u.value;d.next(o)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(h=l.return)&&h.call(l)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function Mg(s){return s.toElement?s.toElement:s.currentTarget?s.currentTarget:s.srcElement?s.srcElement:null}function W(s,t,e,n=!1){const i=async r=>{await e(r)};try{s.addEventListener(t,i,n)}catch{s.attachEvent("on"+t,i)}return()=>{try{s.removeEventListener(t,i,n)}catch{s.detachEvent("on"+t,i)}}}function Ig(s,t,e,n,i=!1){return W(s||document.body,e,r=>{r.target===t&&n(r)},i)}function kg(s){s.replaceWith(s.cloneNode(!0))}function X(s,t,e=!1){return Ar(s,t,{capture:e})}function Dg(s){const t=et(e=>s.register(e),(e,n)=>{s.unregister?.(e,...n||[])},(...e)=>[...e]);return s.share?t.pipe(Cg({bufferSize:s.bufferSize||1,refCount:!0})):t}function Me(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function kr(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const Lg=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Rg=["keydown","keyup","keypress"],Og=["touchstart","touchend","touchcancel","touchmove"],zg=["pointerdown","pointerup","pointercancel","pointermove"],Ng=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Bg=["change"];function Gs(s,t={bubbles:!0,detail:{}}){let e;try{const n=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);Lg.includes(s)?e=new MouseEvent(s,n):Rg.includes(s)?e=new KeyboardEvent(s,n):Og.includes(s)?e=new TouchEvent(s,n):zg.includes(s)?e=new PointerEvent(s,n):Ng.includes(s)?e=new DragEvent(s,n):Bg.includes(s)?e=new Event(s,n):e=new CustomEvent(s,n)}catch{document.createEvent?e=document.createEvent("Event").initEvent(s,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function Dr(s,t,e){if(s)if(s.dispatchEvent)s.dispatchEvent(e);else if(s.fireEvent&&document.createEventObject)s.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function Fg(s,t){const e=s.target,n=Gs(t);Dr(e,t,n)}function Yg(s){const t=s.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const n=Gs(e);n.view=s.view||window,n.detail=1,n.screenX=t.screenX||0,n.screenY=t.screenY||0,n.clientX=t.clientX||0,n.clientY=t.clientY||0,n.pageX=s.pageX,n.pageY=s.pageY,n.ctrlKey=!!s.ctrlKey,n.altKey=!!s.altKey,n.shiftKey=!!s.shiftKey,n.metaKey=!!s.metaKey,n.button=0,n.relatedTarget=null,n._constructed=!0,Dr(t,e,n)}}function Xg(s,t){const e=s.changedTouches[0];return Gs(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}if(m.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame,m.cAF=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame,!m.rAF){let s=ut();m.rAF=t=>{const e=ut(),n=Math.max(0,16-(e-s)),i=window.setTimeout(()=>{t(e+n)},n);return s=e+n,i}}m.cAF||(m.cAF=s=>{window.clearTimeout(s)});function Lr(s){let t=!1,e=m.rAF(function n(i){!t&&s(i)&&(e=m.rAF(n))});return()=>{m.cAF(e),t=!0}}function Rr(s,t=0){if(t==0)return s(ut()),()=>{};{const e=ut();return Lr(n=>n-e>=t?(s(n),!1):!0)}}function Ug(s,t=0){let e=!1,n=0;const i=ut();let r=Rr(function o(a){if(e)return;n++;const h=a-i-n*t;s(a,n,t<=h),r=Rr(o,Math.max(0,t-h))},t);return()=>{r(),e=!0}}function $g(s,t=20){const e=1e3/t;let n=0,i;return()=>(ut()-n>=e&&(n=ut(),i=s()),i)}window.requestIdleCallback=window.requestIdleCallback||function(s,t){const e=ut();return setTimeout(()=>{const n=ut()-e;s({didTimeout:!0,timeRemaining:()=>Math.max(0,50-n)})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(s){clearTimeout(s)};function Tc(s,t){window.requestIdleCallback(e=>{e.timeRemaining()>0||e.didTimeout?s():Tc(s,t)},{timeout:t?.timeout})}let Vs=0,Or=0,He=33,Ie=33,zr,Nr=-1;const Ac=new MessageChannel,Gg=Ac.port2;Ac.port1.onmessage=s=>{zr&&zr({didTimeout:Nr==-1?!1:ut()-Vs>Nr,timeRemaining:()=>Math.max(0,Or-ut())})};function Vg(s,t){return zr=s,Nr=typeof t?.timeout=="number"?t?.timeout:-1,requestAnimationFrame(e=>{Vs=e;let n=Ie+Vs-Or;n<Ie&&He<Ie?(n<8&&(n=8),Ie=n<He?He:n):n>Ie&&He>Ie?Ie=n<He?He:n:He=n,Or=Vs+Ie,Gg.postMessage(null)})}const Mc=new rh({concurrency:1,timeRemaining:0});let Br=!1;function Ic(s,t){const e=ih({fn:s,name:t?.name,deadline:typeof t?.timeout=="number"?$t()+t.timeout:void 0});Mc.addTask(e),!Br&&(Br=!0,Vg(n=>{Br=!1,Mc.idleCallback(n)}))}class Un{static _nextId=0;static nextId(){return Un._nextId++}}const O={Linear:{None:function(s){return s}},Ease:{In:function(s){return Math.pow(s,1.7)}},Quadratic:{In:function(s){return s*s},Out:function(s){return s*(2-s)},InOut:function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(s){return s*s*s},Out:function(s){return--s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)}},Quartic:{In:function(s){return s*s*s*s},Out:function(s){return 1- --s*s*s*s},InOut:function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)}},Quintic:{In:function(s){return s*s*s*s*s},Out:function(s){return--s*s*s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)}},Sinusoidal:{In:function(s){return 1-Math.sin((1-s)*Math.PI/2)},Out:function(s){return Math.sin(s*Math.PI/2)},InOut:function(s){return .5*(1-Math.sin(Math.PI*(.5-s)))}},Exponential:{In:function(s){return s===0?0:Math.pow(1024,s-1)},Out:function(s){return s===1?1:1-Math.pow(2,-10*s)},InOut:function(s){return s===0?0:s===1?1:(s*=2)<1?.5*Math.pow(1024,s-1):.5*(-Math.pow(2,-10*(s-1))+2)}},Circular:{In:function(s){return 1-Math.sqrt(1-s*s)},Out:function(s){return Math.sqrt(1- --s*s)},InOut:function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(s){return s===0?0:s===1?1:-Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI)},Out:function(s){return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s-.1)*5*Math.PI)+1},InOut:function(s){return s===0?0:s===1?1:(s*=2,s<1?-.5*Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI):.5*Math.pow(2,-10*(s-1))*Math.sin((s-1.1)*5*Math.PI)+1)}},Back:{In:function(s){return s===1?1:s*s*((1.70158+1)*s-1.70158)},Out:function(s){return s===0?0:--s*s*((1.70158+1)*s+1.70158)+1},InOut:function(s){const t=2.5949095;return(s*=2)<1?.5*(s*s*((t+1)*s-t)):.5*((s-=2)*s*((t+1)*s+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(s){return 1-O.Bounce.Out(1-s)},Out:function(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},InOut:function(s){return s<.5?O.Bounce.In(s*2)*.5:O.Bounce.Out(s*2-1)*.5+.5}},generatePow:function(s=4){return s=s<Number.EPSILON?Number.EPSILON:s,s=s>1e4?1e4:s,{In:function(t){return t**s},Out:function(t){return 1-(1-t)**s},InOut:function(t){return t<.5?(t*2)**s/2:(1-(2-t*2)**s)/2+.5}}},random:function(s){return Math.random()},createStep:function(s){return function(t){return Math.floor(t*s)/s}},createNoisyEasing:function(s,t=.1){const e=1-t;return function(n){return t*Math.random()+e*s(n)}},swing:function(s){return s+Math.sin(s*Math.PI*2)/2},causeSeizures:function(s){return s+.2*Math.random()-.1}};function kc(s){switch(s){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return s}}const jg=4,qg=.001,Hg=1e-7,Wg=10,$n=11,js=1/($n-1),Jg=typeof Float32Array=="function";function Dc(s,t){return 1-3*t+3*s}function Lc(s,t){return 3*t-6*s}function Rc(s){return 3*s}function qs(s,t,e){return((Dc(t,e)*s+Lc(t,e))*s+Rc(t))*s}function Oc(s,t,e){return 3*Dc(t,e)*s*s+2*Lc(t,e)*s+Rc(t)}function Zg(s,t,e,n,i){let r,o,a=0;do o=t+(e-t)/2,r=qs(o,n,i)-s,r>0?e=o:t=o;while(Math.abs(r)>Hg&&++a<Wg);return o}function Kg(s,t,e,n){for(let i=0;i<jg;++i){const r=Oc(t,e,n);if(r===0)return t;const o=qs(t,e,n)-s;t-=o/r}return t}function Qg(s){return s}function Fr(s,t,e,n){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===n)return Qg;const i=Jg?new Float32Array($n):new Array($n);for(let o=0;o<$n;++o)i[o]=qs(o*js,s,e);function r(o){let a=0,h=1;const c=$n-1;for(;h!==c&&i[h]<=o;++h)a+=js;--h;const l=(o-i[h])/(i[h+1]-i[h]),u=a+l*js,d=Oc(u,s,e);return d>=qg?Kg(o,u,s,e):d===0?u:Zg(o,a,a+js,s,e)}return o=>o===0||o===1?o:qs(r(o),t,n)}function Yr(s){switch(s){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function zc(s){const[t,e,n,i]=Yr(s);return[1-n,1-i,1-t,1-e]}function t0(s){return Fr(...Yr(s))}function e0(s){return Fr(...zc(s))}const pe={Utils:{Linear:function(s,t,e){return(t-s)*e+s},Factorial:function(){const s=[1];return function(t){let e=1;if(s[t])return s[t];for(let n=t;n>1;n--)e*=n;return s[t]=e,e}}(),Bernstein:function(s,t){const e=pe.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,i){const r=(e-s)*.5,o=(n-t)*.5,a=i*i,h=i*a;return(2*t-2*e+r+o)*h+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(s,t,e,n)=>{const i=1-n;return i*i*s+2*i*n*t+n*n*e},CubicBezier:(s,t,e,n,i)=>{const r=1-i;return r*r*r*s+3*r*r*i*t+3*r*i*i*e+i*i*i*n}},Linear:function(s,t){const e=s.length-1,n=e*t,i=Math.floor(n),r=pe.Utils.Linear;return t<0?r(s[0],s[1],n):t>1?r(s[e],s[e-1],e-n):r(s[i],s[i+1>e?e:i+1],n-i)},Bezier:function(s,t){let e=0;const n=s.length-1,i=Math.pow,r=pe.Utils.Bernstein;for(let o=0;o<=n;o++)e+=i(1-t,n-o)*i(t,o)*s[o]*r(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,i=Math.floor(n);const r=pe.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(i=Math.floor(n=e*(1+t))),r(s[(i-1+e)%e],s[i],s[(i+1)%e],s[(i+2)%e],n-i)):t<0?s[0]-(r(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(r(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):r(s[i?i-1:0],s[i],s[e<i+1?e:i+1],s[e<i+2?e:i+2],n-i)}};class Nc{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=ut(),e=!1){const n=Object.keys(this._tweens);for(let i=0;i<n.length;i++){const r=this._tweens[n[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[n[i]]}return!!Object.keys(this._tweens).length}}const Gt=new Nc;class Xr{constructor(t,e=Gt){this._object=t,this._group=e}_id=Un.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=pe.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=ut()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,i){for(const r in n){const o=t[r],a=Array.isArray(o),h=a?"array":typeof o,c=!a&&Array.isArray(n[r]);if(!(h==="undefined"||h==="function")){if(c){let l=n[r];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(l)}if((h==="object"||a)&&o&&!c){e[r]=a?[]:{};for(const l in o)e[r][l]=o[l];i[r]=a?[]:{},this._setupProperties(o,e[r],n[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),c?i[r]=n[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=ut()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=ut()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Gt){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=pe.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=ut(),e=!0){if(this._isPaused)return!0;let n,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,h=this._chainedTweens.length;a<h;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,i){for(const r in n){if(e[r]===void 0)continue;const o=e[r]||0;let a=n[r];const h=Array.isArray(t[r]),c=Array.isArray(a);!h&&c?t[r]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(t[r],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const n0=Un.nextId,s0=Gt.getAll.bind(Gt),i0=Gt.removeAll.bind(Gt),r0=Gt.add.bind(Gt),o0=Gt.remove.bind(Gt),a0=Gt.update.bind(Gt),h0={now:ut,Sequence:Un,Easing:O,Interpolation:pe,Group:Nc,Tween:Xr,nextId:n0,getAll:s0,removeAll:i0,add:r0,remove:o0,update:a0};class Ur{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ut(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=ut();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Gn{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){sp(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const i={...n};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,n){const i={fromValues:t,toValues:e,frames:typeof n?.frames=="number"?n.frames:1,delay:typeof n?.delay=="number"?n.delay:this.tweens.length,easeFunction:n?.easeFunction||O.Linear.None,interpolationFunction:n?.interpolationFunction||pe.Linear,repeat:typeof n?.repeat=="number"?n.repeat:0,yoyo:n?.yoyo||!1,onStart:n?.onStart||(()=>{}),onUpdate:n?.onUpdate||(()=>{}),onComplete:n?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Ur,n=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=Lr(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),h=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(c=>c.delay*n<=h).forEach(c=>{c.tween||(c.tween=new Xr({...c.fromValues}).to({...c.toValues},c.frames*n).easing(c.easeFunction).interpolation(c.interpolationFunction).repeat(c.repeat).yoyo(c.yoyo).onStart(c.onStart).onUpdate(c.onUpdate).onComplete(c.onComplete),c.tween.start(a)),(c.delay+c.frames*(c.repeat+1))*n>h?c.tween.update(a):(c.tween.isPlaying()&&c.tween.end(),za(t,c))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new Ur;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(n=>{e=Math.max(e,n.delay+n.frames),n.easeFunction=kc(n.easeFunction);const i={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...i}}),t.forEach(n=>{n.delay=e-n.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const Vn=new xf({objectSignature:s=>s.name});function $r(s,t=Vn){let e=t?.find(n=>n.el==s);return e||(e=li(s),t.put(e),e)}function Hs(s,t,e=Vn){const n=$r(s,e);n.alternate||(n.alternate=li(s),cn(n.alternate.props,n.props,!0)),t(n.alternate)}function Bc(s=Vn){s.update(t=>{const e=t.alternate;return e&&(ui(t,e),t.props=e.props,t.alternate=void 0),!0})}function c0(s=Vn){Bc(s)}function Gr(s=Vn){Ic(()=>Bc(s),{name:"PATCH_VNODES",timeout:50})}function l0(s,t,e,n,i){const r=t/e;let o=0,a=0;switch(s){case"aspectFit":r>=1?(o=n,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>n&&(o=n,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=n,a=o/r);break;case"widthFix":o=n,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=n,a=i;break}return{width:o,height:a}}function Fc(s){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=s.width,t.height=s.height,e.drawImage(s,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(s.width,s.height)}}const u0=s=>{const t=s.width,e=s.height,n=t*e*3,i=n+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,h=s.data;let c="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const p=l*(u-1);let g="";for(let C=0;C<t;C++){const y=C<<2;g+=d(h[p+y+2])+d(h[p+y+1])+d(h[p+y])}for(let C=0;C<a;C++)g+=String.fromCharCode(0);c+=g}while(--u);function f(p){if(!window.btoa)throw"btoa undefined";let g="";if(typeof p=="string")g=p;else for(let C=0;C<p.length;C++)g+=String.fromCharCode(p[C]);return btoa(g)}return f(r.concat(o))+f(c)};function f0(s){const{width:t,height:e}=s,n=document.createElement("canvas"),i=n.getContext("2d");return n.width=t,n.height=e,i.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const d0=(s,t,e)=>{const{width:n,height:i}=s,r=document.createElement("canvas"),o=r.getContext("2d");r.width=n,r.height=i,o.putImageData(s,0,0,0,0,n,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(h=>{e?.(null,h)},a,1)};function m0(s,t){return createImageBitmap(s,t)}function p0(s){const t=[],e=[],n=[];let i=0;for(let h=0,c=s.data.length;h<c;h+=4)t[i]=s.data[h],e[i]=s.data[h+1],n[i]=s.data[h+2],i+=1;const r=Vr(t),o=Vr(e),a=Vr(n);return"rgb("+r+","+o+","+a+")"}function Vr(s){const t={},e=[],n=[];for(let a=0;a<s.length;a++)t[s[a]]?e.push(s[a]):t[s[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let h=0;h<e.length;h++)e[a]===e[h]&&(i+=1),n[a]=i}const r=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===r)return;return e[o]}const g0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[(o*e+e-a-1)*4],i[h+1]=t[(o*e+e-a-1)*4+1],i[h+2]=t[(o*e+e-a-1)*4+2],i[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,n)},y0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[((n-o-1)*e+a)*4],i[h+1]=t[((n-o-1)*e+a)*4+1],i[h+2]=t[((n-o-1)*e+a)*4+2],i[h+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(i,e,n)},w0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[(a*e+e-o-1)*4],i[h+1]=t[(a*e+e-o-1)*4+1],i[h+2]=t[(a*e+e-o-1)*4+2],i[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,n,e)},b0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[((n-a-1)*e+o)*4],i[h+1]=t[((n-a-1)*e+o)*4+1],i[h+2]=t[((n-a-1)*e+o)*4+2],i[h+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(i,n,e)},x0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1]+t[h+2])/3;i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},v0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},S0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,l=(t[h]+t[h+1]+t[h+2])/3>127?255:0;i[h]=l,i[h+1]=l,i[h+2]=l,i[h+3]=t[h+3]}return new ImageData(i,e,n)},_0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=255-t[h],i[h+1]=255-t[h+1],i[h+2]=255-t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},C0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},E0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},P0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=0,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},T0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},A0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},M0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},I0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h+1]+t[h+2])/2;i[h]=t[h],i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},k0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+2])/2;i[h]=c,i[h+1]=t[h+1],i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},D0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1])/2;i[h]=c,i[h+1]=c,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},L0=s=>Yc(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),R0=s=>Yc(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),O0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=t[h+2],i[h+3]=255}return new ImageData(i,e,n)},z0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;if(t[h+3]===0)i[h]=255,i[h+1]=255,i[h+2]=255,i[h+3]=255;else{const c=Xc([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);i[h]=c[0],i[h+1]=c[1],i[h+2]=c[2],i[h+3]=c[3]}}return new ImageData(i,e,n)};function N0(s,t,e,n,i,r=!1,o){const{data:a,width:h,height:c}=s;let l=i,u=n,d=t,f=e;if(l<0?l=0:l>h&&(l=h),u<0?u=0:u>c&&(u=c),d<1?d=1:d>h&&(d=h),f<1?f=1:f>c&&(f=c),l+d>h&&(d=h-l),u+f>c&&(f=c-u),r){const p=new Uint8ClampedArray(a.length);for(let C=0;C<c;C++)for(let y=0;y<h;y++){const v=(C*h+y)*4;y>=l&&y<=l+d&&C>=u&&C<=u+f?(p[v]=a[v],p[v+1]=a[v+1],p[v+2]=a[v+2],p[v+3]=a[v+3]):(p[v]=255,p[v+1]=255,p[v+2]=255,p[v+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,h,c)}else{const p=new Uint8ClampedArray(d*f*4);for(let C=u;C<=u+f;C++)for(let y=l;y<=l+d;y++){const v=((C-u)*d+y-l)*4,b=(C*h+y)*4;p[v]=a[b],p[v+1]=a[b+1],p[v+2]=a[b+2],p[v+3]=a[b+3]}return new ImageData(p,d,f)}}function B0(s,t,e,n){const{data:i,width:r,height:o}=s;let a=t;a>Math.floor(r/2)&&(a=Math.floor(r/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const h=new Uint8ClampedArray(i.length);for(let l=0;l<o;l++)for(let u=0;u<r;u++){const d=(l*r+u)*4;let f=-1;u<a?l<a?f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(l-(o-a),2))):u>r-a-1&&(l<a?f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(l-(o-a),2)))),Math.round(f)>a?(h[d]=255,h[d+1]=255,h[d+2]=255,h[d+3]=n||e.toUpperCase()==="PNG"?0:255):(h[d]=i[d],h[d+1]=i[d+1],h[d+2]=i[d+2],h[d+3]=n||e.toUpperCase()==="PNG"?i[d+3]:255)}return new ImageData(h,r,o)}function F0(s,t,e,n,i,r=1e4){const o=new Image;o.src=s;const a=document.createElement("canvas"),h=a.getContext("2d");return a.width=r,a.height=r,h.drawImage(o,0,0,t,e,0,0,n,i),h.getImageData(0,0,n,i)}function Y0(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;r[c]=Math.max(Math.min(e[c]+t,255),0),r[c+1]=Math.max(Math.min(e[c+1]+t,255),0),r[c+2]=Math.max(Math.min(e[c+2]+t,255),0),r[c+3]=e[c+3]}return new ImageData(r,n,i)}function X0(s,t,e=!1){const{data:n,width:i,height:r}=s,o=new Uint8ClampedArray(n.length);for(let h=0;h<r;h++)for(let c=0;c<i;c++){const l=(h*i+c)*4;n[l+3]===0?(o[l]=255,o[l+1]=255,o[l+2]=255):(o[l]=n[l],o[l+1]=n[l+1],o[l+2]=n[l+2]);let u=n[l+3];e?u=Math.max(Math.min(Math.floor(255*t),255),0):u=Math.max(Math.min(Math.floor(u+255*t),255),0),o[l+3]=u}return new ImageData(o,i,r)}function U0(s,t,e,n){const{data:i,width:r,height:o}=s,{data:a,width:h,height:c}=t;let l=e,u=n;e+c>o&&(l=o-c),n+h>r&&(u=r-h);const d=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let g=0;g<r;g++){const C=(p*r+g)*4;if(g<u||g>u+h||p<=l||p>=l+c)d[C]=i[C],d[C+1]=i[C+1],d[C+2]=i[C+2],d[C+3]=i[C+3];else{const y=(p*r+g-((l+1)*r+(p-(l+1))*(r-h))+h-u-1)*4,v=[a[y],a[y+1],a[y+2],a[y+3]],b=[i[C],i[C+1],i[C+2],i[C+3]],x=Xc(v,b);d[C]=x[0],d[C+1]=x[1],d[C+2]=x[2],d[C+3]=x[3]}}return new ImageData(d,r,o)}function $0(s,t,e,n,i,r=10){const{data:o,width:a,height:h}=s;let c=i,l=n,u=t,d=e;c<0?c=0:c>a&&(c=a),l<0?l=0:l>h&&(l=h),u<1?u=1:u>a&&(u=a),d<1?d=1:d>h&&(d=h),c+u>a&&(u=a-c),l+d>h&&(d=h-l);const f=new Uint8ClampedArray(o.length);for(let g=0;g<h;g++)for(let C=0;C<a;C++){const y=(g*a+C)*4;if(C>=c&&C<=c+u&&g>=l&&g<=l+d){const v=Math.floor((C-c)/r),b=Math.floor((g-l)/r);let x=Math.floor(r*(v+1)-r/2+c),E=Math.floor(r*(b+1)-r/2+l);x>a-1&&(x=a-1),E>h-1&&(E=h-1);const _=(E*a+x)*4;f[y]=o[_],f[y+1]=o[_+1],f[y+2]=o[_+2],f[y+3]=o[_+3]}else f[y]=o[y],f[y+1]=o[y+1],f[y+2]=o[y+2],f[y+3]=o[y+3]}return new ImageData(f,a,h)}function G0(s,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:n,width:i,height:r}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:h,changeIntoColor:c}=e;for(let u=0;u<r;u++)for(let d=0;d<i;d++){const f=(u*i+d)*4,p=o[f],g=o[f+1],C=o[f+2],y=o[f+3];p===h.r&&g===h.g&&C===h.b&&y===h.a&&c.a!==0?(a[f]=c.r,a[f+1]=c.g,a[f+2]=c.b,a[f+3]=c.a):(a[f]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,i,r)}return s}function Yc(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;for(let l=0;l<3;l++){const u=c+l;h===0||h===n-1||a===0||a===i-1?r[u]=e[u]:r[u]=t[0]*e[u-n*4-4]+t[1]*e[u-n*4]+t[2]*e[u-n*4+4]+t[3]*e[u-4]+t[4]*e[u]+t[5]*e[u+4]+t[6]*e[u+n*4-4]+t[7]*e[u+n*4]+t[8]*e[u+n*4+4]}r[c+3]=e[c+3]}return new ImageData(r,n,i)}function Xc(s,t){if(s&&s.length===4&&t&&t.length===4){const e=s[3],n=t[3];if(e===255||n===0)return s;if(e===0)return t;{const i=e/255,r=n/255,o=Math.max(Math.min(Math.floor(s[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(s[1]*i+t[1]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor(s[2]*i+t[2]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,h,c]}}return[255,255,255,255]}const jr=function(){const s=[];return{writeByte(t){s.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let i=0;i<n;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return s},toString(){let t="[";for(let e=0,n=s.length;e<n;e++)e>0&&(t+=","),t+=s[e];return t+="]",t}}},Uc=function(){let s=0,t=0,e=0,n="";const i=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},r=function(o){n+=String.fromCharCode(i(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)r(s>>>t-6),t-=6},flush(){if(t>0&&(r(s<<6-t),s=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}},$c=function(s,t,e){const n=new Array(s*s),i=function(a){const h=a;let c=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;c+d>=8;)h.writeByte(255&(u<<c|l)),d-=8-c,u>>>=8-c,l=0,c=0;l=u<<c|l,c=c+d},flush(){c>0&&h.writeByte(l)}}},r=function(a){const h=1<<a,c=(1<<a)+1;let l=a+1;const u=o();for(let C=0;C<h;C++)u.add(String.fromCharCode(C));u.add(String.fromCharCode(h)),u.add(String.fromCharCode(c));const d=jr(),f=i(d);f.write(h,l);let p=0,g=String.fromCharCode(n[p]);for(p+=1;p<n.length;){const C=String.fromCharCode(n[p]);p+=1,u.contains(g+C)?g=g+C:(f.write(u.indexOf(g),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(g+C)),g=C)}return f.write(u.indexOf(g),l),f.write(c,l),f.flush(),d.toByteArray()},o=function(){const a={};let h=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);a[c]=h,h+=1},size(){return h},indexOf(c){return a[c]},contains(c){return typeof a[c]<"u"}}};return{setPixel(a,h,c){n[h*s+a]=c},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(ln("0x"+t[1]+t[2])),a.writeByte(ln("0x"+t[3]+t[4])),a.writeByte(ln("0x"+t[5]+t[6])),a.writeByte(ln("0x"+e[1]+e[2])),a.writeByte(ln("0x"+e[3]+e[4])),a.writeByte(ln("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const h=2,c=r(h);a.writeByte(h);let l=0;for(;c.length-l>255;)a.writeByte(255),a.writeBytes(c,l,255),l+=255;a.writeByte(c.length-l),a.writeBytes(c,l,c.length-l),a.writeByte(0),a.writeString(";")}}},Gc=function(s,t,e,n){const i=$c(s,t,e);for(let c=0;c<s;c++)for(let l=0;l<s;l++)i.setPixel(l,c,n(l,c));const r=jr();i.write(r);const o=Uc(),a=r.toByteArray();for(let c=0,l=a.length;c<l;c++)o.writeByte(a[c]);o.flush();let h="";return h+="data:image/gif;base64,",h+=o,h},zt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},jn={M:0,L:1,H:2,Q:3},ke={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},gt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return gt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return gt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)gt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)gt.EXP_TABLE[s]=gt.EXP_TABLE[s-4]^gt.EXP_TABLE[s-5]^gt.EXP_TABLE[s-6]^gt.EXP_TABLE[s-8];for(let s=0;s<255;s++)gt.LOG_TABLE[gt.EXP_TABLE[s]]=s;const K={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){let t=s<<10;for(;K.getBCHDigit(t)-K.getBCHDigit(K.G15)>=0;)t^=K.G15<<K.getBCHDigit(t)-K.getBCHDigit(K.G15);return(s<<10|t)^K.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;K.getBCHDigit(t)-K.getBCHDigit(K.G18)>=0;)t^=K.G18<<K.getBCHDigit(t)-K.getBCHDigit(K.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return K.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case ke.PATTERN000:return(t+e)%2==0;case ke.PATTERN001:return t%2==0;case ke.PATTERN010:return e%3==0;case ke.PATTERN011:return(t+e)%3==0;case ke.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case ke.PATTERN101:return t*e%2+t*e%3==0;case ke.PATTERN110:return(t*e%2+t*e%3)%2==0;case ke.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new gn([1],0);for(let e=0;e<s;e++)t=t.multiply(new gn([1,gt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case zt.MODE_NUMBER:return 10;case zt.MODE_ALPHA_NUM:return 9;case zt.MODE_8BIT_BYTE:return 8;case zt.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case zt.MODE_NUMBER:return 12;case zt.MODE_ALPHA_NUM:return 11;case zt.MODE_8BIT_BYTE:return 16;case zt.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case zt.MODE_NUMBER:return 14;case zt.MODE_ALPHA_NUM:return 13;case zt.MODE_8BIT_BYTE:return 16;case zt.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+t)},getLostPoint:function(s){const t=s.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const h=s.isDark(r,o);for(let c=-1;c<=1;c++)if(!(r+c<0||t<=r+c))for(let l=-1;l<=1;l++)o+l<0||t<=o+l||c==0&&l==0||h==s.isDark(r+c,o+l)&&a++;a>5&&(e+=3+a-5)}for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let a=0;s.isDark(r,o)&&a++,s.isDark(r+1,o)&&a++,s.isDark(r,o+1)&&a++,s.isDark(r+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(r,o)&&!s.isDark(r,o+1)&&s.isDark(r,o+2)&&s.isDark(r,o+3)&&s.isDark(r,o+4)&&!s.isDark(r,o+5)&&s.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(o,r)&&!s.isDark(o+1,r)&&s.isDark(o+2,r)&&s.isDark(o+3,r)&&s.isDark(o+4,r)&&!s.isDark(o+5,r)&&s.isDark(o+6,r)&&(e+=40);let n=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)s.isDark(o,r)&&n++;const i=Math.abs(100*n/t/t-50)/5;return e+=i*10,e}};class gn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let i=0;i<t.length-n;i++)this.num[i]=t[i+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let i=0;i<t.getLength();i++)e[n+i]^=gt.gexp(gt.glog(this.get(n))+gt.glog(t.get(i)));return new gn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=gt.glog(this.get(0))-gt.glog(t.get(0)),n=new Array(this.getLength());for(let i=0;i<this.getLength();i++)n[i]=this.get(i);for(let i=0;i<t.getLength();i++)n[i]^=gt.gexp(gt.glog(t.get(i))+e);return new gn(n,0).mod(t)}}class ge{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=ge.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=n.length/3,r=[];for(let o=0;o<i;o++){const a=n[o*3+0],h=n[o*3+1],c=n[o*3+2];for(let l=0;l<a;l++)r.push(new ge(h,c))}return r}static getRsBlockTable(t,e){switch(e){case jn.L:return ge.RS_BLOCK_TABLE[(t-1)*4+0];case jn.M:return ge.RS_BLOCK_TABLE[(t-1)*4+1];case jn.Q:return ge.RS_BLOCK_TABLE[(t-1)*4+2];case jn.H:return ge.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Vc{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class V0{mode;data;constructor(t){this.mode=zt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class De{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=jn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new V0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=ge.getRSBlocks(t,this.errorCorrectLevel),n=new Vc;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];n.put(o.mode,4),n.put(o.getLength(),K.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=De.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=n&&n<=6&&(i==0||i==6)||0<=i&&i<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=i&&i<=4?this.modules[t+n][e+i]=!0:this.modules[t+n][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const i=K.getLostPoint(this);(n==0||t>i)&&(t=i,e=n)}return e}createMovieClip(t,e,n){const i=t.createEmptyMovieClip(e,n),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let h=0;h<this.modules[o].length;h++){const c=h*r;this.modules[o][h]&&(i.beginFill(0,100),i.moveTo(c,a),i.lineTo(c+r,a),i.lineTo(c+r,a+r),i.lineTo(c,a+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=K.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const i=t[e],r=t[n];if(this.modules[i][r]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[i+o][r+a]=!0:this.modules[i+o][r+a]=!1}}setupTypeNumber(t){const e=K.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,i=K.getBCHTypeInfo(n);for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,i=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let h=0;h<2;h++)if(this.modules[i][a-h]==null){let c=!1;o<t.length&&(c=(t[o]>>>r&1)==1),K.getMask(e,i,a-h)&&(c=!c),this.modules[i][a-h]=c,r--,r==-1&&(o++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}static createData(t,e,n){const i=ge.getRSBlocks(t,e),r=new Vc;for(let a=0;a<n.length;a++){const h=n[a];r.put(h.mode,4),r.put(h.getLength(),K.getLengthInBits(h.mode,t)),h.write(r)}let o=0;for(let a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>o*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+o*8+")");for(r.getLengthInBits()+4<=o*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=o*8||(r.put(De.PAD0,8),r.getLengthInBits()>=o*8));)r.put(De.PAD1,8);return De.createBytes(r,i)}static createBytes(t,e){let n=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let u=0;u<e.length;u++){const d=e[u].dataCount,f=e[u].totalCount-d;i=Math.max(i,d),r=Math.max(r,f),o[u]=new Array(d);for(let y=0;y<o[u].length;y++)o[u][y]=255&t.buffer[y+n];n+=d;const p=K.getErrorCorrectPolynomial(f),C=new gn(o[u],p.getLength()-1).mod(p);a[u]=new Array(p.getLength()-1);for(let y=0;y<a[u].length;y++){const v=y+C.getLength()-a[u].length;a[u][y]=v>=0?C.get(v):0}}let h=0;for(let u=0;u<e.length;u++)h+=e[u].totalCount;const c=new Array(h);let l=0;for(let u=0;u<i;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(c[l++]=o[d][u]);for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(c[l++]=a[d][u]);return c}}const jc=Math.ceil,qn=Math.floor,qc=Math.round;function j0(s,t){const e=La(s),n=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",h=t?.background||"#ffffff",c=new De(r,n);c.addData(e),c.make();const l=c.getModuleCount(),u=(i-o*2)/l,d=o,f=i-o;return Gc(i,a,h,function(p,g){if(d<=p&&p<f&&d<=g&&g<f){const C=qn((p-d)/u),y=qn((g-d)/u);return c.isDark(y,C)?0:1}else return 1})}function q0(s,t){const e=t.x||0,n=t.y||0,i=La(s),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?qn(t.size):256,h=t.padding||0,c=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new De(c,o);d.addData(i),d.make();const f=d.getModuleCount(),p=(a-h*2)/f;r.fillStyle=u,r.fillRect(e,n,a,a);for(let g=0;g<f;g++)for(let C=0;C<f;C++){const y=jc((C+1)*p)-qn(C*p),v=jc((g+1)*p)-qn(g*p);r.fillStyle=d.isDark(g,C)?l:u,r.fillRect(e+qc(C*p)+h,n+qc(g*p)+h,y,v)}}function j(s){return s*Math.PI/180}function yt(s){return s*180/Math.PI}function yn(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Le(s,t,e,n){return yn(e-s,n-t)}function Nt(s,t,e,n){let i=Math.atan2(n-t,e-s);return i<0&&(i+=Math.PI*2),i}function Re(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function H0(s,t,e){if(typeof e=="number"){const n=yn(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=yn(s,t);return{x:s/=n,y:t/=n}}}function W0(s,t,e,n,i=10){if(Math.abs(e-s)<i&&Math.abs(n-t)<i)return"no";const r=yt(Nt(s,t,e,n));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}class qr{_x;_y;_z;_w;constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,o,a){let h=n[i+0],c=n[i+1],l=n[i+2],u=n[i+3];const d=r[o+0],f=r[o+1],p=r[o+2],g=r[o+3];if(a===0){t[e+0]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u;return}if(a===1){t[e+0]=d,t[e+1]=f,t[e+2]=p,t[e+3]=g;return}if(u!==g||h!==d||c!==f||l!==p){let C=1-a;const y=h*d+c*f+l*p+u*g,v=y>=0?1:-1,b=1-y*y;if(b>Number.EPSILON){const E=Math.sqrt(b),_=Math.atan2(E,y*v);C=Math.sin(C*_)/E,a=Math.sin(a*_)/E}const x=a*v;if(h=h*C+d*x,c=c*C+f*x,l=l*C+p*x,u=u*C+g*x,C===1-a){const E=1/Math.sqrt(h*h+c*c+l*l+u*u);h*=E,c*=E,l*=E,u*=E}}t[e]=h,t[e+1]=c,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,n,i,r,o){const a=n[i],h=n[i+1],c=n[i+2],l=n[i+3],u=r[o],d=r[o+1],f=r[o+2],p=r[o+3];return t[e]=a*p+l*u+h*f-c*d,t[e+1]=h*p+l*d+c*u-a*f,t[e+2]=c*p+l*f+a*d-h*u,t[e+3]=l*p-a*u-h*d-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,n=this._z,i=this._w){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new qr(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t.x,i=t.y,r=t.z,o=t.order,a=Math.cos,h=Math.sin,c=a(n/2),l=a(i/2),u=a(r/2),d=h(n/2),f=h(i/2),p=h(r/2);switch(o){case"XYZ":this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case"YXZ":this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case"ZXY":this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case"ZYX":this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case"YZX":this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case"XZY":this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,n=e[0],i=e[4],r=e[8],o=e[1],a=e[5],h=e[9],c=e[2],l=e[6],u=e[10],d=n+a+u;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(l-h)*f,this._y=(r-c)*f,this._z=(o-i)*f}else if(n>a&&n>u){const f=2*Math.sqrt(1+n-a-u);this._w=(l-h)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+c)/f}else if(a>u){const f=2*Math.sqrt(1+a-n-u);this._w=(r-c)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(h+l)/f}else{const f=2*Math.sqrt(1+u-n-a);this._w=(o-i)/f,this._x=(r+c)/f,this._y=(h+l)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(B(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,h=e._y,c=e._z,l=e._w;return this._x=n*l+o*a+i*c-r*h,this._y=i*l+o*h+r*a-n*c,this._z=r*l+o*c+n*h-i*a,this._w=o*l-n*a-i*h-r*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const h=1-a*a;if(h<=Number.EPSILON){const f=1-e;return this._w=f*o+e*this._w,this._x=f*n+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const c=Math.sqrt(h),l=Math.atan2(c,a),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=i*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Hn{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Hn(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y;return this.x=t.m11*e+t.m21*n+t.m31,this.y=t.m12*e+t.m22*n+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return Hc.copy(this).projectOnVector(t),this.sub(Hc)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(B(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Bt{x=0;y=0;z=0;constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t=0,e=0,n=0){return this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Bt(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Wc.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Wc.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,h=t.w,c=2*(o*i-a*n),l=2*(a*e-r*i),u=2*(r*n-o*e);return this.x=e+h*c+o*u-a*l,this.y=n+h*l+a*c-r*u,this.z=i+h*u+r*l-o*c,this}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this.z=B(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this.z=B(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,h=e.z;return this.x=i*h-r*a,this.y=r*o-n*h,this.z=n*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return Wr.copy(this).projectOnVector(t),this.sub(Wr)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Wr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(B(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),n=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Hr{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,n=0,i=1){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Hr(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,n,i,r;const h=t.value,c=h[0],l=h[4],u=h[8],d=h[1],f=h[5],p=h[9],g=h[2],C=h[6],y=h[10];if(Math.abs(l-d)<.01&&Math.abs(u-g)<.01&&Math.abs(p-C)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+g)<.1&&Math.abs(p+C)<.1&&Math.abs(c+f+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const b=(c+1)/2,x=(f+1)/2,E=(y+1)/2,_=(l+d)/4,L=(u+g)/4,N=(p+C)/4;return b>x&&b>E?b<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(b),i=_/n,r=L/n):x>E?x<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(x),n=_/i,r=N/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=L/r,i=N/r),this.set(n,i,r,e),this}let v=Math.sqrt((C-p)*(C-p)+(u-g)*(u-g)+(d-l)*(d-l));return Math.abs(v)<.001&&(v=1),this.x=(C-p)/v,this.y=(u-g)/v,this.z=(d-l)/v,this.w=Math.acos((c+f+y-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this.z=B(this.z,t.z,e.z),this.w=B(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this.z=B(this.z,t,e),this.w=B(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const Hc=new Hn,Wr=new Bt,Wc=new qr,Jc=J0("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function J0(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function Pt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function Ws(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function Z0(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function K0(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Wn={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let Js=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Pt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},Jr=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},Zc=class Sa{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Wn);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Wn[i].canvas}}__getStyleState(){const t={},e=Object.keys(Wn);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Wn);for(let r=0;r<i.length;r++){const o=Wn[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Jr){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Js)e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,Pt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let l=parseFloat(c[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(Jc);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=Jc[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Pt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Pt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Pt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const l=h[0]*c[0]+h[1]*c[1],u=Math.acos(Math.abs(l)),d=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(u/2),p=t+f*d[0],g=e+f*d[1],C=[-h[1],h[0]],y=[c[1],-c[0]],v=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},b=v(C),x=v(y);this.lineTo(p+C[0]*r,g+C[1]*r),this.arc(p,g,r,b,x)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:Ws(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Js(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:Ws(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Js(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":Z0(this.textAlign),"dominant-baseline":K0(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),l=e+n*Math.sin(i),u=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(Pt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Ws(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Pt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,l,u,d,f,p,g,C;if(t.length===3)n=t[1],i=t[2],c=e.width,l=e.height,r=c,o=l;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,l=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],l=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const v="translate("+n+", "+i+")";if(e instanceof Sa){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)C=d.childNodes[0].getAttribute("id"),this.__ids[C]=C,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const b=f.getAttribute("transform");let x;b?x=b+" "+v:x=v,f.setAttribute("transform",x),y.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||l!==e.height)&&(g=this.__document.createElement("canvas"),g.width=r,g.height=o,g.getContext("2d")?.drawImage(e,a,h,c,l,0,0,r,o),e=g),p.setAttribute("transform",v),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=Ws(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof Sa&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Jr(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Zr=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new Zc({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,l])=>{h.addColorStop(parseFloat(c),l)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],l=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,l)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Kr=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Nt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const l=(-c*i+r+h*e-n)/(h-c),u=h*(l-e)+n;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const Q0=class extends Kr{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const l=a/180*Math.PI,u=(t-n)/2,d=(e-i)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,g=f*f/(r*r)+p*p/(o*o);if(g>1){const V=Math.sqrt(g);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const C=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),y=h!=c?1:-1,v=y*C*r*p/o,b=y*C*-o*f/r,x=(t+n)/2,E=(e+i)/2,_=Math.cos(l)*v-Math.sin(l)*b+x,L=Math.sin(l)*v+Math.cos(l)*b+E,N=(V,J,rt,tt)=>(V*tt>=J*rt?1:-1)*Math.acos((V*rt+J*tt)/(Math.sqrt(V*V+J*J)*Math.sqrt(rt*rt+tt*tt))),Y=N(1,0,t-_,e-L)-l,G=N(t-_,e-L,n-_,i-L);return[_,L,r,o,l,Y,Y+G]}},ty=class extends Kr{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let c=0;c<2;++c)n=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][c].push(n*o*o+i*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},h={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:h.x-a.x,height:h.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},Oe=class ms extends Kr{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y}));const l=[],u=c.length;for(let p=0;p<u;p++){for(let g=p+1;g<u;g++)c[p].X===c[g].X&&c[p].Y===c[g].Y&&(g=++p);l.push({X:c[p].X,Y:c[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:l}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const l=c/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const g=l*u[p]+l,C=this.base3(g,t,n,r,a),y=this.base3(g,e,i,o,h);f+=d[p]*Math.sqrt(C*C+y*y)}return l*f}length(t=1){return ms.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||ms.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,f=ms.bezlen(e,n,i,r,o,a,h,c,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=ms.bezlen(e,n,i,r,o,a,h,c,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,g=n*this.y+e*this.c1y,C=n*this.c2x+e*this.toX,y=n*this.c2y+e*this.toY,v=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:h,y:c,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:g},end:{x:C,y},alpha:v}}},Jn=Math.PI*2;function Kc(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function ey(s,t,e,n,i,r,o,a,h,c){const l=c*(s-e)/2+h*(t-n)/2,u=-h*(s-e)/2+c*(t-n)/2,d=o*o,f=a*a,p=l*l,g=u*u;let C=d*f-d*g-f*p;C<0&&(C=0),C/=d*g+f*p,C=Math.sqrt(C)*(i===r?-1:1);const y=C*o/a*u,v=C*-a/o*l,b=c*y-h*v+(s+e)/2,x=h*y+c*v+(t+n)/2,E=(l-y)/o,_=(u-v)/a,L=(-l-y)/o,N=(-u-v)/a,Y=Kc(1,0,E,_);let G=Kc(E,_,L,N);return r===0&&G>0&&(G-=Jn),r===1&&G<0&&(G+=Jn),[b,x,Y,G]}function ny(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function Qc(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*Jn/360),l=Math.cos(h*Jn/360),u=l*(s-e)/2+c*(t-n)/2,d=-c*(s-e)/2+l*(t-n)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=u*u/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=ey(s,t,e,n,i,r,o,a,c,l),g=[];let C=p[2],y=p[3];const v=Math.max(Math.ceil(Math.abs(y)/(Jn/4)),1);y/=v;for(let b=0;b<v;b++)g.push(ny(C,y)),C+=y;return g.map(b=>{for(let x=0;x<b.length;x+=2){let E=b[x+0],_=b[x+1];E*=o,_*=a;const L=l*E-c*_,N=c*E+l*_;b[x+0]=L+p[0],b[x+1]=N+p[1]}return b})}function Qr(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function Zn(s,t,e,n){return[s,t,e,n,e,n]}const Kn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class We{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&we(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||Mn()})}static downloadFromSVGElement(t,e="shape"){return ti(fr(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return ti(Ni(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return ur(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return We.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,i,r)=>{let o=i.toLowerCase();const a=Di(r);for(o=="m"&&a.length>Kn[o]&&(e.push([i,...a.splice(0,Kn[o])]),o="l",i=i=="m"?"l":"L");a.length;){if(a.length<Kn[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${i} } args:{ ${a} }`);e.push([i,...a.splice(0,Kn[o])])}return o=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toUpperCase();if(a!=h)switch(o[0]=h,a){case"a":o[6]+=i,o[7]+=r;break;case"v":o[1]+=r;break;case"h":o[1]+=i;break;default:for(let c=1;c<o.length;)o[c++]+=i,o[c++]+=r}switch(h){case"Z":i=e,r=n;break;case"H":i=o[1];break;case"V":r=o[1];break;case"M":i=e=o[1],r=n=o[2];break;default:i=o[o.length-2],r=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toLowerCase();if(a!=h)switch(o[0]=h,a){case"A":o[6]-=i,o[7]-=r;break;case"V":o[1]-=r;break;case"H":o[1]-=i;break;default:for(let c=1;c<o.length;)o[c++]-=i,o[c++]-=r}switch(h){case"z":i=e,r=n;break;case"h":i+=o[1];break;case"v":r+=o[1];break;case"m":i+=o[1],r+=o[2],e+=o[1],n+=o[2];break;default:i+=o[o.length-2],r+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,i=0,r=0,o=0,a=0,h=0,c=0,l=0,u;for(let d=0,f=t.length;d<f;d++){let p=t[d];const g=p[0];switch(g){case"M":n=p[1],i=p[2];break;case"A":const C=Qc(r,o,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!C.length)continue;C.forEach((b,x)=>{const[E,_,L,N,Y,G,V,J]=b;p=["C",L,N,Y,G,V,J],x<C.length-1&&e.push(p)});break;case"S":let y=r,v=o;(u=="C"||u=="S")&&(y+=y-c,v+=v-l),p=["C",y,v,p[1],p[2],p[3],p[4]];break;case"T":u=="Q"||u=="T"?(a=r*2-a,h=o*2-h):(a=r,h=o),p=["C",...Qr(r,o,a,h,p[1],p[2])];break;case"Q":a=p[1],h=p[2],p=["C",...Qr(r,o,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...Zn(r,o,p[1],p[2])];break;case"H":p=["C",...Zn(r,o,p[1],o)];break;case"V":p=["C",...Zn(r,o,r,p[1])];break;case"Z":p=["C",...Zn(r,o,n,i)];break}u=g,r=p[p.length-2],o=p[p.length-1],p.length>4?(c=p[p.length-4],l=p[p.length-3]):(c=r,l=o),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,i=t.length;i-2>n;n+=2){let r;n==0?r=[{x:t[n],y:t[n+1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}]:i-4==n?r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+2],y:t[n+3]}]:r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}];const o=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y])}return e}static zvhToLSVGPath(t){const e=[];let n=["L",0,0],i;for(let r=0,o=t.length;r<o;r++){const a=t[r];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",a[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],a[1]]);break;default:e.push(a)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let n,i=0,r=0;for(let o=0,a=t.length;o<a;o++){const h=t[o],c=e[h[0]];c&&(h[0]=c.to,n&&(n[0]===c.to?(i=2*Number(n[c.x+2])-Number(n[c.x]),r=2*Number(n[c.x+3])-Number(n[c.x+1])):(i=Number(n[n.length-2]),r=Number(n[n.length-1]))),h.splice(1,0,i,r)),n=h}return t}}let sy=class Ce{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(We.parseSVGPath(t),e):t instanceof Ce?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=We.normalizeSVGPath(We.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a[0]=="M"){i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new Oe({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new Ce;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e.appendLine(new Oe({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new Ce;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof Q0){Qc(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[l,u,d,f,p,g,C,y]=c;this.normalizedLines.push(new Oe({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:g,toX:C,toY:y})),this.prevPathX=C,this.prevPathY=y});return}let e,n,i,r,o,a;t instanceof Oe?(e=t.c1x,n=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof ty?[e,n,i,r,o,a]=Qr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=Zn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Oe({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=n.length;r<o;r++)i.push(...n[r].toSVGPathData());return i}toSVGPathD(){return We.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,n),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:i,y:r,width:o-i,height:a-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new xt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,n=this.startPathY;({x:e,y:n}=t.transformPoint({x:e,y:n}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,h=r.c1x,c=r.c1y,l=r.c2x,u=r.c2y,d=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:h,y:c}=t.transformPoint({x:h,y:c}),{x:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:f}=t.transformPoint({x:d,y:f}),i.push(new Oe({x:o,y:a,c1x:h,c1y:c,c2x:l,c2y:u,toX:d,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,n)=>e+=n.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let n=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:n};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let h=1;h<r&&(a=i[h],o>1);h++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,h=0;const c=new Ce;c.prevPathX=c.startPathX=i,c.prevPathY=c.startPathY=r;for(let l=0,u=o.length;l<u;l++){const d=o[l],f=d.length();if(h+f>e&&!a){const p=d.getPointAtSegmentLength(e-h);if(c.appendLine(new Oe({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),n)return c;a=c,c.appendLine(new Oe({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),h+=f;continue}h+=f,c.appendLine(d)}return c}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const l=this.getPointAtLength(c),u=Math.pow(Le(l.x,l.y,t,e),2);u<o&&(i=l,r=c,o=u)}for(a/=2;a>.5;){const c=r-a,l=this.getPointAtLength(c),u=Math.pow(Le(l.x,l.y,t,e),2),d=r+a,f=this.getPointAtLength(d),p=Math.pow(Le(f.x,f.y,t,e),2);c>=0&&u<o?(i=l,r=c,o=u):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Nt(h.x,h.y,i.x,i.y):Nt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Le(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const h=e[a++],c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++];o.push(["C",h,c,l,u,d,f]);let p=0;for(;p<r&&i>0;)o.push(["C",d,f,d,f,d,f]),i-=6,p++}return o}static mixPoints(t,e,n){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=F(t[o]+(e[o]-t[o])*n,6);return r}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:Ce.fromPolymorphPoints(Ce.mixPoints(new Ce({d:t}).polymorphPoints,new Ce({d:e}).polymorphPoints,n)).toSVGPathData()}},iy=class extends Cs{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=Mn(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const n=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",n),this.strokeDashTotalLength=Di(n).reduce((i,r)=>i+r,0)}return Hi(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new sy,Ee(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(n=>{const i=n.originMatrix?n.originMatrix.clone():new xt;i.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new xt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Zr)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,n){if(n instanceof Zr)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return ja(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([n,i])=>[mt(n),i]))):e&&(this.attrs[mt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[mt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[mt(t)]}distance(t){return Le(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=yt(Nt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:i}=Re(j(this.degree),e);this.vx=n,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:i}=Re(j(this.degree),e);this.ax=n,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=Wt(t?.gravity,0);this.vy+=e;const n=Wt(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=Wt(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*n,this.vy=r*n,this.run(e)}runSpringTo(t,e){const n=Wt(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,o=i.y-this.cY-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.run({friction:.9,...e})}springMassTo(t,e){const n=Wt(e?.springLength,100),i=Wt(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const n=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*n),this.getPointAtLength(e*n)}strokeDashTween(t=1e3,e){const n=this.initPathD(),i=F(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new Gn({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,h)=>{this.setAttr("strokeDashoffset",""+F(a.offset,2)),r?.(a,h)}})),o.play()}};class ry extends iy{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){({x:this.y,y:this.z}=Qt(j(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Qt(j(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Qt(j(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return yn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y,i=this.z;return{x:n*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const Zs=ry,Qn=2e3,to=2001,tl=[1,0,0,1],el=[1,0,0,1,0,0],nl=[1,0,0,0,1,0,0,0,1],sl=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class eo{value;constructor(t=tl){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,n=0,i=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=i,this}identity(){return this.value=Array.from(tl),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new eo(this.value)}fromArray(t,e=0){for(let n=0;n<4;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[2],h=n[1],c=n[3],l=i[0],u=i[2],d=i[1],f=i[3];return r[0]=o*l+a*d,r[2]=o*u+a*f,r[1]=h*l+c*d,r[3]=h*u+c*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class wn{value;constructor(t=nl){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,n=0,i=0,r=1,o=0,a=0,h=0,c=1){const l=this.value;return l[0]=t,l[1]=i,l[2]=a,l[3]=e,l[4]=r,l[5]=h,l[6]=n,l[7]=o,l[8]=c,this}identity(){return this.value=Array.from(nl),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new wn(this.value)}fromArray(t,e=0){for(let n=0;n<9;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[3],h=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],g=i[0],C=i[3],y=i[6],v=i[1],b=i[4],x=i[7],E=i[2],_=i[5],L=i[8];return r[0]=o*g+a*v+h*E,r[3]=o*C+a*b+h*_,r[6]=o*y+a*x+h*L,r[1]=c*g+l*v+u*E,r[4]=c*C+l*b+u*_,r[7]=c*y+l*x+u*L,r[2]=d*g+f*v+p*E,r[5]=d*C+f*b+p*_,r[8]=d*y+f*x+p*L,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],l=t[8];return e*o*l-e*a*c-n*r*l+n*a*h+i*r*c-i*o*h}inverse(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],l=t[8],u=l*o-a*c,d=a*h-l*r,f=c*r-o*h,p=e*u+n*d+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/p;return t[0]=u*g,t[1]=(i*c-l*n)*g,t[2]=(a*n-i*o)*g,t[3]=d*g,t[4]=(l*e-i*h)*g,t[5]=(i*r-a*e)*g,t[6]=f*g,t[7]=(n*h-c*e)*g,t[8]=(o*e-n*r)*g,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).inverse().transpose()}transposeIntoArray(t){const e=this.value;return 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],this}setUvTransform(t,e,n,i,r,o,a){const h=Math.cos(r),c=Math.sin(r);return this.set(n*h,n*c,-n*(h*o+c*a)+o+t,-i*c,i*h,-i*(-c*o+h*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(no.makeScale(t,e)),this}rotate(t){return this.premultiply(no.makeRotation(-t)),this}translate(t,e){return this.premultiply(no.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class Dt{value;is3dSpecial=!1;constructor(t=sl){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,n=0,i=0,r=0,o=1,a=0,h=0,c=0,l=0,u=1,d=0,f=0,p=0,g=0,C=1){const y=this.value;return y[0]=t,y[4]=e,y[8]=n,y[12]=i,y[1]=r,y[5]=o,y[9]=a,y[13]=h,y[2]=c,y[6]=l,y[10]=u,y[14]=d,y[3]=f,y[7]=p,y[11]=g,y[15]=C,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(sl),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new Dt(this.value)}static fromString(t){const e=new Dt,n=Ia("number",t);return n.length===16&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let n=0;n<16;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.value;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}copyPosition(t){const e=this.value,n=t.value;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),n.setFromMatrix4Column(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,n=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+n*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+n*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+n*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+n*this.m44}}toMatrix(t){const{scalarX:e,scalarY:n,skewX:i,skewY:r,x:o,y:a}=this.split(),h=[e,r,i,n,o,a];return t?(t.value=h,t):new xt(h)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>F(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),n=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=yt(B(Math.asin(-this.m13),-1,1));let r=yt(Math.atan2(this.m23,this.m33));Math.cos(j(i))===0&&(r=yt(Math.atan2(-this.m31,this.m22)));let o=yt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:n,degreeX:r,degreeY:i,degreeZ:o,skewX:yt(this.m14),skewY:yt(this.m24),skewZ:yt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,i=1/bn.setFromMatrix4Column(t,0).length(),r=1/bn.setFromMatrix4Column(t,1).length(),o=1/bn.setFromMatrix4Column(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),h=Math.cos(i),c=Math.sin(i),l=Math.cos(r),u=Math.sin(r);if(t.order==="XYZ"){const d=o*l,f=o*u,p=a*l,g=a*u;e[0]=h*l,e[4]=-h*u,e[8]=c,e[1]=f+p*c,e[5]=d-g*c,e[9]=-a*h,e[2]=g-d*c,e[6]=p+f*c,e[10]=o*h}else if(t.order==="YXZ"){const d=h*l,f=h*u,p=c*l,g=c*u;e[0]=d+g*a,e[4]=p*a-f,e[8]=o*c,e[1]=o*u,e[5]=o*l,e[9]=-a,e[2]=f*a-p,e[6]=g+d*a,e[10]=o*h}else if(t.order==="ZXY"){const d=h*l,f=h*u,p=c*l,g=c*u;e[0]=d-g*a,e[4]=-o*u,e[8]=p+f*a,e[1]=f+p*a,e[5]=o*l,e[9]=g-d*a,e[2]=-o*c,e[6]=a,e[10]=o*h}else if(t.order==="ZYX"){const d=o*l,f=o*u,p=a*l,g=a*u;e[0]=h*l,e[4]=p*c-f,e[8]=d*c+g,e[1]=h*u,e[5]=g*c+d,e[9]=f*c-p,e[2]=-c,e[6]=a*h,e[10]=o*h}else if(t.order==="YZX"){const d=o*h,f=o*c,p=a*h,g=a*c;e[0]=h*l,e[4]=g-d*u,e[8]=p*u+f,e[1]=u,e[5]=o*l,e[9]=-a*l,e[2]=-c*l,e[6]=f*u+p,e[10]=d-g*u}else if(t.order==="XZY"){const d=o*h,f=o*c,p=a*h,g=a*c;e[0]=h*l,e[4]=-u,e[8]=c*l,e[1]=d*u+g,e[5]=o*l,e[9]=f*u-p,e[2]=p*u-f,e[6]=a*l,e[10]=g*u+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(oy,t,ay)}lookAt(t,e,n){const i=this.value;return Ft.subVectors(t,e),Ft.lengthSq()===0&&(Ft.z=1),Ft.normalize(),ze.crossVectors(n,Ft),ze.lengthSq()===0&&(Math.abs(n.z)===1?Ft.x+=1e-4:Ft.z+=1e-4,Ft.normalize(),ze.crossVectors(n,Ft)),ze.normalize(),Ks.crossVectors(Ft,ze),i[0]=ze.x,i[4]=Ks.x,i[8]=Ft.x,i[1]=ze.y,i[5]=Ks.y,i[9]=Ft.y,i[2]=ze.z,i[6]=Ks.z,i[10]=Ft.z,this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[4],h=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],g=n[6],C=n[10],y=n[14],v=n[3],b=n[7],x=n[11],E=n[15],_=i[0],L=i[4],N=i[8],Y=i[12],G=i[1],V=i[5],J=i[9],rt=i[13],tt=i[2],te=i[6],Xt=i[10],jt=i[14],ee=i[3],R=i[7],D=i[11],$=i[15];return r[0]=o*_+a*G+h*tt+c*ee,r[4]=o*L+a*V+h*te+c*R,r[8]=o*N+a*J+h*Xt+c*D,r[12]=o*Y+a*rt+h*jt+c*$,r[1]=l*_+u*G+d*tt+f*ee,r[5]=l*L+u*V+d*te+f*R,r[9]=l*N+u*J+d*Xt+f*D,r[13]=l*Y+u*rt+d*jt+f*$,r[2]=p*_+g*G+C*tt+y*ee,r[6]=p*L+g*V+C*te+y*R,r[10]=p*N+g*J+C*Xt+y*D,r[14]=p*Y+g*rt+C*jt+y*$,r[3]=v*_+b*G+x*tt+E*ee,r[7]=v*L+b*V+x*te+E*R,r[11]=v*N+b*J+x*Xt+E*D,r[15]=v*Y+b*rt+x*jt+E*$,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],h=t[9],c=t[13],l=t[2],u=t[6],d=t[10],f=t[14],p=t[3],g=t[7],C=t[11],y=t[15];return p*(+r*h*u-i*c*u-r*a*d+n*c*d+i*a*f-n*h*f)+g*(+e*h*f-e*c*d+r*o*d-i*o*f+i*c*l-r*h*l)+C*(+e*c*u-e*a*f-r*o*u+n*o*f+r*a*l-n*c*l)+y*(-i*a*l-e*h*u+e*a*d+i*o*u-n*o*d+n*h*l)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.value;return t instanceof Bt?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(i[12]=t,i[13]=e,i[14]=n),this}inverse(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],g=t[13],C=t[14],y=t[15],v=u*C*c-g*d*c+g*h*f-a*C*f-u*h*y+a*d*y,b=p*d*c-l*C*c-p*h*f+o*C*f+l*h*y-o*d*y,x=l*g*c-p*u*c+p*a*f-o*g*f-l*a*y+o*u*y,E=p*u*h-l*g*h-p*a*d+o*g*d+l*a*C-o*u*C,_=e*v+n*b+i*x+r*E;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/_;return t[0]=v*L,t[1]=(g*d*r-u*C*r-g*i*f+n*C*f+u*i*y-n*d*y)*L,t[2]=(a*C*r-g*h*r+g*i*c-n*C*c-a*i*y+n*h*y)*L,t[3]=(u*h*r-a*d*r-u*i*c+n*d*c+a*i*f-n*h*f)*L,t[4]=b*L,t[5]=(l*C*r-p*d*r+p*i*f-e*C*f-l*i*y+e*d*y)*L,t[6]=(p*h*r-o*C*r-p*i*c+e*C*c+o*i*y-e*h*y)*L,t[7]=(o*d*r-l*h*r+l*i*c-e*d*c-o*i*f+e*h*f)*L,t[8]=x*L,t[9]=(p*u*r-l*g*r-p*n*f+e*g*f+l*n*y-e*u*y)*L,t[10]=(o*g*r-p*a*r+p*n*c-e*g*c-o*n*y+e*a*y)*L,t[11]=(l*a*r-o*u*r-l*n*c+e*u*c+o*n*f-e*a*f)*L,t[12]=E*L,t[13]=(l*g*i-p*u*i+p*n*d-e*g*d-l*n*C+e*u*C)*L,t[14]=(p*a*i-o*g*i-p*n*h+e*g*h+o*n*C-e*a*C)*L,t[15]=(o*u*i-l*a*i+l*n*h-e*u*h-o*n*d+e*a*d)*L,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t instanceof Bt?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,h=t.z,c=r*o,l=r*a;return this.set(c*o+n,c*a-i*h,c*h+i*a,0,c*a+i*h,l*a+n,l*h-i*o,0,c*h-i*a,l*h+i*o,r*h*h+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,o){return this.set(1,n,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,n,i,r,o,a=Qn){const h=this.value,c=2*r/(e-t),l=2*r/(n-i),u=(e+t)/(e-t),d=(n+i)/(n-i);let f,p;if(a===Qn)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===to)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return h[0]=c,h[4]=0,h[8]=u,h[12]=0,h[1]=0,h[5]=l,h[9]=d,h[13]=0,h[2]=0,h[6]=0,h[10]=f,h[14]=p,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,n,i,r,o,a=Qn){const h=this.value,c=1/(e-t),l=1/(n-i),u=1/(o-r),d=(e+t)*c,f=(n+i)*l;let p,g;if(a===Qn)p=(o+r)*u,g=-2*u;else if(a===to)p=r*u,g=-1*u;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return h[0]=2*c,h[4]=0,h[8]=0,h[12]=-d,h[1]=0,h[5]=2*l,h[9]=0,h[13]=-f,h[2]=0,h[6]=0,h[10]=g,h[14]=-p,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}compose(t,e,n){const i=this.value,r=e.x,o=e.y,a=e.z,h=e.w,c=r+r,l=o+o,u=a+a,d=r*c,f=r*l,p=r*u,g=o*l,C=o*u,y=a*u,v=h*c,b=h*l,x=h*u,E=n.x,_=n.y,L=n.z;return i[0]=(1-(g+y))*E,i[1]=(f+x)*E,i[2]=(p-b)*E,i[3]=0,i[4]=(f-x)*_,i[5]=(1-(d+y))*_,i[6]=(C+v)*_,i[7]=0,i[8]=(p+b)*L,i[9]=(C-v)*L,i[10]=(1-(d+g))*L,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.value;let r=bn.set(i[0],i[1],i[2]).length();const o=bn.set(i[4],i[5],i[6]).length(),a=bn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Kt.copy(this);const c=1/r,l=1/o,u=1/a;return Kt.value[0]*=c,Kt.value[1]*=c,Kt.value[2]*=c,Kt.value[4]*=l,Kt.value[5]*=l,Kt.value[6]*=l,Kt.value[8]*=u,Kt.value[9]*=u,Kt.value[10]*=u,e.setFromRotationMatrix4(Kt),n.x=r,n.y=o,n.z=a,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,n=0){return this.multiply(new Dt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new Dt([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}scaleVector3(t){const e=this.value,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}rotateX(t){const e=j(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1]))}rotateY(t){const e=j(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=j(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new Dt([1,0,0,j(t),0,1,0,j(e),0,0,1,j(n),0,0,0,1]))}perspective(t){return this.multiply(new Dt([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,n=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=n+this.m32,h=i+this.m33,c=r+this.m34;r==0&&(r=1e-4),e/=r,n/=r,i/=r,c==0&&(c=1e-4),o/=c,a/=c,h/=c;const l=h-i;if(l==0)return{x:e,y:n,z:i,mass:r};const u=-i/l;return e+=u*(o-e),n+=u*(a-n),{x:e,y:n,z:i,mass:r}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),n/=r,i/=r,r<0&&(n-=this.m41,i-=this.m42,n*=1/r,i*=1/r,n+=this.m41,i+=this.m42),{x:n,y:i,z:e,mass:r}}bounds(t,e,n,i){const r=new Zs({x:t,y:e}),o=new Zs({x:t+n,y:e}),a=new Zs({x:t+n,y:e+i}),h=new Zs({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:h.x,y:h.y,z:h.z,mass:h.mass}=this.project(h);const c=Math.min(r.x,o.x,a.x,h.x),l=Math.min(r.y,o.y,a.y,h.y),u=Math.max(r.x,o.x,a.x,h.x)-c,d=Math.max(r.y,o.y,a.y,h.y)-l;return{x:c,y:l,width:u,height:d}}}class xt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=el){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new xt,n=Ia("number",t);return n.length===6&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new Dt(e)}identity(){return this.value=Array.from(el),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new xt(this.value)}multiply(t){const e=this.clone(),n=t instanceof xt?t:new xt(t);return this.m11=n.m11*e.m11+n.m12*e.m21+n.m13*e.m31,this.m12=n.m11*e.m12+n.m12*e.m22+n.m13*e.m32,this.m13=n.m11*e.m13+n.m12*e.m23+n.m13*e.m33,this.m21=n.m21*e.m11+n.m22*e.m21+n.m23*e.m31,this.m22=n.m21*e.m12+n.m22*e.m22+n.m23*e.m32,this.m23=n.m21*e.m13+n.m22*e.m23+n.m23*e.m33,this.m31=n.m31*e.m11+n.m32*e.m21+n.m33*e.m31,this.m32=n.m31*e.m12+n.m32*e.m22+n.m33*e.m32,this.m33=n.m31*e.m13+n.m32*e.m23+n.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,n=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,h=this.m32,c=this.m33,l=c*r-o*h,u=-c*i+o*a,d=h*i-r*a;let f=t*l+e*u+n*d;return f?(f=1/f,this.m11=l*f,this.m12=(-c*e+n*h)*f,this.m13=(o*e-n*r)*f,this.m21=u*f,this.m22=(c*t-n*a)*f,this.m23=(-o*t+n*i)*f,this.m31=d*f,this.m32=(-h*t+e*a)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new xt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=yt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:yt(Math.atan2(-this.m21,this.m22)),skewY:yt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],i=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],h=t.value[0],c=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],f=t.value[5],p=h*u,g=c*l,C=(l*n-e*u)/(g-p),y=(h*n-e*c)/(p-g),v=(l*r-i*u)/(g-p),b=(h*r-i*c)/(p-g),x=(l*(a-f)+u*(d-o))/(g-p),E=(h*(a-f)+c*(d-o))/(p-g),_=[C,y,v,b,x,E];return new xt(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>F(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,n){return this.matrix4.translate(t,e,n),this.matrix4.toMatrix(this),this}translate3dTo(t,e,n){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,n-this.matrix4.m43),this}rotate(t,e=0,n=0){const i=j(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,n),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:i}=this.split();return this.rotate(t-i,e,n),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,n){return this.matrix4.rotateX(t).rotateY(e).rotateZ(n),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,n){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,n-o),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.multiply([t,0,0,e,0,0]),this.translate(-n,-i),this.toMatrix4(),this}scaleTo(t,e=t,n=0,i=0){return this.scale(t/this.m11,e/this.m22,n,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,n=t){return this.matrix4.scale(t,e,n),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,n=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,n/o),this}skew(t,e=t){return this.multiply([Math.cos(j(e)),Math.sin(j(e)),-Math.sin(j(t)),Math.cos(j(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:i}=this.split();return this.skew(t-n,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const oy=new Bt(0,0,0),ay=new Bt(1,1,1),ze=new Bt,Ks=new Bt,Ft=new Bt,bn=new Bt,no=new wn,Kt=new Dt;function il(s){const t=new xt;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let o=0,a=i.length;o<a;o++)i[o].trim()&&r.push(parseFloat(""+i[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new Dt(r)),t.matrix4.toMatrix(t);break}return""}),t}function Qt(s,t,e){const n=new xt;return n.rotate(yt(s)),n.transformPoint({x:t,y:e})}function so(s){const t=typeof s?.x=="number"?s?.x:0,e=typeof s?.y=="number"?s?.y:0,n=typeof s?.degree=="number"?s?.degree:0,i=typeof s?.scalarX=="number"?s?.scalarX:1,r=typeof s?.scalarY=="number"?s?.scalarY:1,o=j(n),a=Math.cos(o),h=Math.sin(o),c=new DOMMatrix([a*i,h*i,-h*r,a*r,t,e]);return c.multiplySelf(new DOMMatrix(s?.originMatrix||"")),c}function hy(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,so(t)),n}const Qs=new Hn,lt=new Bt;function ts(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Lt(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}class ye{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=n,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=lf(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)Qs.fromBufferAttribute(this,e),Qs.applyMatrix3(t),this.setXY(e,Qs.x,Qs.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)lt.fromBufferAttribute(this,e),lt.applyMatrix3(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)lt.fromBufferAttribute(this,e),lt.applyMatrix4(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)lt.fromBufferAttribute(this,e),lt.applyNormalMatrix(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)lt.fromBufferAttribute(this,e),lt.transformDirection(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=ts(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Lt(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ts(e,this.array)),e}setX(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ts(e,this.array)),e}setY(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=ts(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=ts(e,this.array)),e}setW(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array),i=Lt(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array),i=Lt(i,this.array),r=Lt(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return ja(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class cy extends ye{constructor(t,e,n=!1){super(new Int8Array(t),e,n)}}class ly extends ye{constructor(t,e,n=!1){super(new Uint8Array(t),e,n)}}class uy extends ye{constructor(t,e,n=!1){super(new Uint8ClampedArray(t),e,n)}}class fy extends ye{constructor(t,e,n=!1){super(new Int16Array(t),e,n)}}class dy extends ye{constructor(t,e,n=!1){super(new Uint16Array(t),e,n)}}class my extends ye{constructor(t,e,n=!1){super(new Int32Array(t),e,n)}}class py extends ye{constructor(t,e,n=!1){super(new Uint32Array(t),e,n)}}class gy extends ye{constructor(t,e,n=!1){super(new Float32Array(t),e,n)}}const rl={map:new Map,transform:function(s){if(Jf)return s;if(this.map.has(s))return this.map.get(s);const t=new OffscreenCanvas(s.width,s.height);return t.getContext("2d")?.drawImage(s,0,0),this.map.set(s,t),t},clear:function(){this.map.clear()}};function yy(s,t,e){const n=new OffscreenCanvas(s,t),i=n.getContext("2d");if(i)return e(i),n.transferToImageBitmap()}function wy(s,t,e){const n=s.createPattern(rl.transform(t),"no-repeat");if(n){const i=so(e);n.setTransform(i),s.fillStyle=n}}const io=["","-webkit-","-moz-","-o-","-ms-"];function ro(s,t){const e=t.x||0,n=t.y||0,i=t.z||0;ss(s,"transform",`translate(${e}px, ${n}px) translateZ(${i}px)`)}function by(s,t){const e=t?.easingFn||O.Linear.None,n=t?.duration||0,i=t?.delay||0,r=$t(),o=r+n;let a=0,h=0;const c=t.deltaX,l=t.deltaY;function u(){const d=$t();if(d>=o){ro(s,{x:c-a,y:l-h});return}const f=(d-r)/n,p=e(f),g=c*p,C=l*p;ro(s,{x:g-a,y:C-h}),a=g,h=C,m.rAF(u)}setTimeout(()=>{u()},i)}const xy=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function ol(s){return window.URL.createObjectURL(s)}function vy(s){return window.URL.revokeObjectURL(s)}function oo(s){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),s(),t=!0)}const n=W(document,"DOMContentLoaded",e),i=W(window,"load",e),r=setInterval(e,100),o=()=>{clearInterval(r),n?.(),i?.()};return o}function al(s){return W(window,"beforeunload",t=>{s(t)})}async function Sy(s,t=6e4){return new Promise((e,n)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=o=>{clearTimeout(r),e(o),i.onerror=i.onload=null},i.onerror=o=>{clearTimeout(r),n(o)},i.src=s;const r=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(i)})}function ti(s,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof s=="string"?e.href=s:e.href=window.URL.createObjectURL(s),e.click()}async function _y(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),n(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",s);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function Cy(){return new Promise(s=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const n=()=>e>=t.length?(s(),!0):!1;n()||t.forEach(i=>{i.onload=()=>{e+=1,n()}})})}const hl=new kn;async function cl(s,t=6e4){return new Promise((e,n)=>{const i=typeof s=="string"?s:ol(s),r=hl.get(i);if(r)return e(r);const o=setTimeout(()=>{n("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const h=a.naturalWidth||a.width,c=a.naturalHeight||a.height,l={width:h,height:c,aspectRatio:h/c,element:a,imageData:Fc(a)};hl.set(i,l),e(l)},a.onerror=h=>{clearTimeout(o),n(h)},a.src=i})}async function ll(s=Ut.text,t=["*"]){const n=(await dr(t))[0],i=await Nn(n,s);return{type:n.type,name:n.name,size:n.size,data:i}}async function Ey(s=["image/*"]){const e=(await dr(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await Nn(e,Ut.arraybuffer),i=Ni(n),r=await cl(i);return{type:e.type,name:e.name,size:e.size,data:n,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function Py(){return window.getSelection()?.toString()||""}function Ty(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function Ay(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function My(s){if(navigator.clipboard)return await navigator.clipboard.writeText(s);{const t=document.createElement("textarea");return t.value=s,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function Iy(s=0,t=0){window.scrollTo(s,t)}function ky(){let s=Fa,t=Fa;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=al(()=>{window.history.scrollRestoration="auto"}),t=oo(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function Dy(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const Ly=s=>s===document.activeElement&&(s.type||s.href);function ao(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function Ry(s){return s*ao()}function Oy(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):ao()}const zy=s=>{let t=s;for(;t&&t.nodeType!==1;){const e=t.parentElement||s.parentNode;if(!e)break;t=e}return t},Ny=s=>s.parentElement,ho=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:ho(s.parentElement,t.concat([s]));function By(s){const t=ho(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test(ns(t[e],"overflow")+ns(t[e],"overflow-y")+ns(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const Fy=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),Yy=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),Xy=s=>s.nextElementSibling,Uy=s=>s.previousElementSibling,$y=(s,t)=>s.closest(t),Gy=s=>s.shadowRoot,es=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,co=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,Vy=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,lo=s=>es(s)&&s.getAttribute("type")==="checkbox",uo=s=>es(s)&&s.getAttribute("type")==="radio",jy=s=>es(s)&&s.getAttribute("type")==="text",qy=s=>es(s)&&s.getAttribute("type")==="number";function Hy(s,t){if(co(s)){const e=s.options;for(let n=0,i=e.length;n<i;n++)e[n].selected=e[n].value==t}}function Wy(s,t){if(uo(s)){const e=document.getElementsByName(s.name);for(let n=0,i=e.length;n<i;n++){const r=e[n];r.checked=r.value==t}}}function Jy(s,t){lo(s)&&(s.checked=t)}function xn(s,t,e="append"){typeof t=="string"?s[e](pl(t)):s[e](t)}function ul(s,t){if(typeof t=="string"){s.innerHTML=t;const e=yl(s);e!=s&&(s=e)}else xn(t,"replaceWith")}const fl=function(s){ul(s,"")},Zy=(s,t)=>{s.textContent=t},Ky=s=>{if(s instanceof SVGElement)return"";let t=s.innerText;if(!t){const e=s.querySelector("slot")?.assignedNodes()||[];let n=0;for(;!t&&n<=e.length-1;)"innerText"in e[n]&&(t=e[n].innerText),n++}return t},Qy=s=>s.remove();function t1(s,t){ns(s,"display")=="none"&&t===void 0||t===!0?dl(s):ml(s)}function dl(s){vn(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function ml(s){vn(s,"display","none")}function fo(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(i=>{const r=i.trim();r!==""&&s.classList[e](r)});else{const i=s.className.split(/ +/);let r=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const h=i.indexOf(a);switch(e){case"add":h===-1&&(i.push(a),r=!0);break;case"remove":h!==-1&&(i.splice(h,1),r=!0);break;case"toggle":h===-1?i.push(a):i.splice(h,1),r=!0;break}}}),r&&Je(s,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function e1(s,t){fo(s,t,"add")}function n1(s,t){fo(s,t,"remove")}function s1(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)}function pl(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const i=yl(n);i!=n&&e.content.replaceChild(i,n)}),e.content}function gl(s){return document.createElement.call(document,s)}function i1(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function r1(s){return document.createTextNode.call(document,s)}function yl(s){return s.tagName=="SCRIPT"&&(s=wl(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(wl(t),t)}),s}function wl(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,i=e.length;n<i;n++)t.setAttribute(e[n].name,e[n].value);return t}function o1(s,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(s,t)},4e3),setTimeout(function(){e.remove()},6e3)}function a1(s){const t=new Proxy(window,{get(e,n,i){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,i)},set(e,n,i,r){return Reflect.set(e,n,i,r)}});new Function("window",`with(window) { ${s} }`)(t,null)}function bl(){let s=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,n=t.length;e<n;e++)try{s=new window.ActiveXObject(t[e]);break}catch{continue}}else s=new XMLHttpRequest;return s}function xl(s,t){return new Promise((e,n)=>{const{method:i="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:h={},withCredentials:c=!1,responseType:l="json",timeout:u=3e4}=t||{},d=bl();d.timeout=u,d.responseType=l,d.onreadystatechange=function(v){d.readyState===4&&(d.status===200?e(d.response):n(d.statusText))},d.ontimeout=()=>{n(`${s} is timed out for ${u}ms.`)},d.addEventListener("load",v=>t?.load?.(v,d),!1),d.addEventListener("loadstart",v=>t?.loadstart?.(v,d),!1),d.addEventListener("loadend",v=>t?.loadend?.(v,d),!1),d.addEventListener("progress",v=>{if(v.lengthComputable){const b=Math.round(v.loaded*100/v.total);t?.progress?.(v,d,b)}},!1),d.addEventListener("error",v=>t?.error?.(v,d),!1),d.addEventListener("abort",v=>t?.abort?.(v,d),!1);const f=i.toUpperCase();Object.assign(h,{Accept:"*/*"});let p=!1,g=!1,C=!1;function y(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),c&&(d.withCredentials=!0);for(const v in h)mt(v).toLowerCase()=="content-type"&&h[v].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(mt(v).toLowerCase()=="content-type"&&(h[v].toLowerCase().indexOf("text/plain")>=0?g=!0:h[v].toLowerCase().indexOf("application/json")>=0&&(C=!0)),d.setRequestHeader(v,h[v]))}switch(f){case"GET":let v="";r instanceof FormData?v=Sd(r):v=vd(r),d.open("GET",xd(s,v),!0),y(),d.send(null);break;default:d.open(f,s,!0),y(),p?d.sendAsBinary(o):C?d.send(JSON.stringify(r)):g?d.send(Object.entries(r).map(([b,x])=>`${b}=${x}`).join(`\r
27
- `)):d.send(Object.entries(r).map(([b,x])=>`${encodeURIComponent(b)}=${encodeURIComponent(x)}`).join("&"));break}})}async function h1(s){const t={url:s.action||"",data:{},contentType:s.method.toLowerCase()==="post"&&s.enctype?s.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],n=t.contentType=="multipart/form-data";for(let i=0;i<s.elements.length;i++){const r=s.elements[i];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const h=r;if(n)for(let u=0,d=h.files?.length||0;u<d;u++){const f=h.files?.[u];if(f){const p=await Nn(f,Ut.binaryString);e.push('Content-Disposition: form-data; name="'+h.name+'"; filename="'+f.name+`"\r
10
+ `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},Xe=(n,t)=>(typeof n=="string"&&(n=Ns(n)||new RegExp(n)),n.test(t)),cu=(n,t)=>{typeof n=="string"&&(n=Ns(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(r=>({matchIndex:-1,fullMatch:r,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},hu=(n,t)=>{typeof n=="string"&&(n=Ns(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const s of r)e.push({matchIndex:typeof s.index=="number"?s.index:-1,fullMatch:s[0],groupMatchs:s.slice(1)});return e};function Up(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function uu(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const Yp="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",jp="0123456789";function lu(n=12,t=Yp){let e="";for(let r=0;r<n;r++)e+=t[Math.floor(Math.random()*t.length)];return e}function Vp(n=12){return lu(n,jp)}function Gp(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const jt=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const r=new RegExp(`^${t}`);return r.test(n)||(e=e.replace(r,"")),e};function Xp(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function fu(n){return Gp(Xp(n))}function du(n){let t="";for(let e=0,r=n.length;e<r;e++){const s=n.charCodeAt(e);s>=1&&s<=127?t+=n.charAt(e):s>2047?(t+=String.fromCharCode(224|s>>12&15),t+=String.fromCharCode(128|s>>6&63),t+=String.fromCharCode(128|s>>0&63)):(t+=String.fromCharCode(192|s>>6&31),t+=String.fromCharCode(128|s>>0&63))}return t}function Hp(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:default:return!0}}const ir=(n,t=16)=>{let e=n.toLowerCase();const r=e.indexOf("0b")==0,s=e.indexOf("0o")==0,i=e.indexOf("0x")==0;(r||s||i)&&(e=e.slice(2)),r&&(t=2),s&&(t=8),i&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function Ro(n,t){let e=t?.type;const r=t?.mime,s=t?.encode;if(!e&&r)switch(s){case Ls.utf8:case Ls["utf-8"]:e=`${r};charset=${s}`;break;case Ls.base64:e=`${r};${s}`;break;default:e=`${r}`;break}return new Blob([n],{type:e})}function Wp(n){let t=Ne["text/plain"];switch(new DataView(n).getUint32(0,Hp()).toString(16).toUpperCase()){case"FFD8FFDB":t=Ne["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Ne["image/jpeg"];break;case"89504E47":t=Ne["image/png"];break;case"47494638":t=Ne["image/gif"];break;case"52494646":t=Ne["image/webp"];break;case"25504446":t=Ne["application/pdf"];break;case"504B0304":t=Ne["application/zip"];break}return t}const qp="[object Undefined]",Jp="[object Null]",Kp="[object Boolean]",Zp="[object Number]",Qp="[object BigInt]",tg="[object String]",eg="[object Symbol]",ng="[object Function]",rg="[object GeneratorFunction]",sg="[object Array]";function ko(n){return Object.prototype.toString.call(n)}function ig(n){const t=ko(n);return t===qp||t===Jp||t===Kp||t===Zp||t===tg||t===eg||t===Qp}function mu(n){const t=ko(n);return t==ng||t==rg}function pu(n){if(!bu(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,r=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(mu(n)?r:e).test(lg(n))}function og(n,t){return n?.[t]}function gu(n,t){const e=og(n,t);return pu(e)?e:void 0}gu(K,"Map"),gu(K,"WeakMap");function yu(n){return ko(n)===sg}function bu(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function Fn(n){return!!n&&typeof n=="object"}function zs(n){return Fn(n)&&!yu(n)}const wu=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function ag(n){return typeof Promise<"u"&&n instanceof Promise||bu(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function cg(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function or(n,t,e=!0){if(zs(n)&&zs(t))for(const r of cg(t))(e||typeof n[r]>"u")&&(zs(n[r])&&zs(t[r])?or(n[r],t[r],e):n[r]=t[r]);return n}function hg(n,...t){return new n.constructor(...t)}function ug(n,t){return n===t||n!==n&&t!==t}function lg(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function fg(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((r,s)=>r!=null&&r!=null?r[s]:r,n)}function He(n,t){try{return fg(n,t)}catch{return}}function Lo(n,t,e){if(!n||!t)return n;let r;typeof t=="string"?r=t.split("."):r=t;let s=n;for(let i=0,o=r.length-1;i<o;i++){const a=r[i];(!(a in s)||typeof s[a]!="object"||s[a]===null)&&(s[a]=Number.isNaN(Number(r[i+1]))?{}:[]),s=s[a]}return s[r[r.length-1]]=e,n}function Dr(n){return n!=null}function dg(n){return Dr(n)&&n!==$p&&n!==Io}function mg(n){return typeof n=="number"&&!Number.isNaN(n)}const pg=2**31-1;function xe(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const gg=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),yg=n=>gg(n)&&n>0,We=n=>yg(n)&&n===Math.floor(n),No=n=>n===1/0||We(n);function zo(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function Z(n,t,e){const r=Math.min(t,e),s=Math.max(t,e);return n<r?r:n>s?s:n}function bg(n,t){return(n%t+t)%t}function Fs(n,t,e){return typeof n=="number"&&typeof t=="number"?(1-e)*n+e*t:typeof n=="number"?n:typeof t=="number"?t:0}function wg(n,t,e){const r=Math.max(n.length,t.length),s=new Array(r);for(let i=0;i<r;i++)s[i]=Fs(n[i],t[i],e);return s}function vg(n,t,e){return r=>{const s=Z(r,n,t);return e==0?s:t-s<e?t:Math.round(s/e)*e}}function xg(n,t=2){return xe(n,0).toFixed(t)}function tt(n,t=2){return+xg(n,t)}function Fo(n,t){const e=cu("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):dg(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function vu(n){const t=cu("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function xu(n,t){for(let e=0,r=n.length;e<r;e++)if(n[e]==t)return!0;return!1}function _g(n=[],t=[]){const e=n.length,r=t.length;for(let i=0;i<r;i++)n[i]=t[i];let s=Math.max(0,e-r);for(;s>0;)n.pop(),s--;return n}function _u(n,t){const e=n.findIndex(r=>r===t);return e>=0&&n.splice(e,1),n}function Sg(n,...t){return t.forEach(e=>{xu(n,e)||n.push(e)}),n}class Bs extends Array{constructor(t){super(t),this.fill(0)}}const Su=n=>We(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Bs:null:null;function $s(n,t){let e=n.length;for(;e--;)if(ug(n[e][0],t))return e;return-1}function Dt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function ar(n=new Date){return n.getTime()}function Eg(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return Dg(n,t)}function Cg(n){const t=n.valueOf();return!Number.isNaN(t)}function Tg(n,t=3,e=":"){const r=Math.max(n.length,6);let s="";for(let o=0;o<r-4;o++)s+=n[o]||"0";const i=[s,""+(n[r-4]||"0")+(n[r-3]||"0"),""+(n[r-2]||"0")+(n[r-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+e+i[1];case 3:return i[0]+e+i[1]+e+i[2]}}function Pg(n){const t=Math.max(n.length,6);let e=0;e+=(n[t-2]||0)*10+(n[t-1]||0),e+=((n[t-4]||0)*10+(n[t-3]||0))*60;let r=0;for(let s=0;s<t-4;s++)r=r*10+(n[s]||0);return e+=r*60*60,Math.floor(Math.max(0,e))}function Ag(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=Pg(n),e<=0)return[0,0,0,0,0,0];const r=[],s=e%60;r.unshift(s%10),r.unshift(Math.floor(s/10)),e=Math.floor(e/60);const i=e%60;if(r.unshift(i%10),r.unshift(Math.floor(i/10)),e=Math.floor(e/60),t){const o=e%100;for(r.unshift(o%10),r.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)r.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;r.unshift(o%10),r.unshift(Math.floor(o/10))}return r}function Mg(n,t=1,e=!1){return n[n.length-1]+=t,Ag(n,e)}function Dg(n,t="yyyy-mm-dd hh:ii:ss"){if(!Cg(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const s=e[1];t=t.replace(s,(n.getFullYear()+"").substring(4-s.length))}const r={"m+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"i+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds()};for(const s in r){const i=new RegExp("("+s+")").exec(t);if(i&&i[1]){const o=i[1];t=t.replace(o,o.length===1?""+r[s]:("00"+r[s]).slice(-o.length))}}return t}const Eu=()=>{};function Og(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...r)=>t(e(...r)))}function Ig(n=0,t){const e=t?.min??300,r=t?.max??6e4,s=t?.exponent??2,i=t?.factor??.5;let o=e*Math.pow(s,n);if(i){const a=Math.random(),c=Math.floor(a*i*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,r)|0}function Rg(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...r){const s=t?.thisArg||this,i=t?.cacheKeyResolver?t.cacheKeyResolver.apply(s,r):r[0],o=e.cache;if(o.has(i))return o.get(i);const a=n.apply(s,r);return a instanceof Promise&&a.catch(()=>o.delete(i)),e.cache=o.set(i,a)||o,a};return e.cache=t?.createCache?t.createCache():new Map,e}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};function kg(){let n,t;return{promise:new Promise((e,r)=>{n=e,t=r}),resolve:n,reject:t}}function Bn(n,t=e=>console.error(e)){try{const e=n();return ag(e)?Promise.resolve(e).catch(r=>{t(r)}):e}catch(e){t(e)}}const Lg=2147483647;function Cu(n,t,e){if(typeof t!="number"||t<=0)return n;let r;const s=new Promise((i,o)=>{r=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,Lg),o,e)});return Promise.race([n,s]).finally(()=>{r!==void 0&&(clearTimeout(r),r=void 0)})}function Ng(n,t,e){if(!t)return n;const r=e||"Aborted!";return t.aborted?Promise.reject(new Error(r)):new Promise((s,i)=>{const o=()=>{i(new Error(r))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(s,i)})}class zg{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let r=-1;for(;++r<e;){const s=t[r];this.set(s[0],s[1])}}set(t,e){const r=this.__data__,s=$s(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}get(t){const e=this.__data__,r=$s(e,t);return r<0?void 0:e[r][1]}has(t){return $s(this.__data__,t)>-1}delete(t){const e=this.__data__,r=$s(e,t);if(r<0)return!1;const s=e.length-1;return r==s?e.pop():Array.prototype.splice.call(e,r,1),--this.size,!0}clear(){this.__data__=[],this.size=0}*entries(){for(const t of this.__data__)yield t}*keys(){for(const t of this.__data__)yield t[0]}*values(){for(const t of this.__data__)yield t[1]}[Symbol.iterator](){return this.entries()}}const Fg=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Tu=new Set,Bg=(n,t,e,r)=>{typeof Oo.emitWarning=="function"?Oo.emitWarning(n,t,e,r):console.error(`[${e}] ${t}: ${n}`)},$g=n=>!Tu.has(n);class cr{heap;length;static#a=!1;static create(t){const e=Su(t);if(!e)return[];cr.#a=!0;const r=new cr(t,e);return cr.#a=!1,r}constructor(t,e){if(!cr.#a)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Bo{#a;#l;#g;#D;#y;#L;#N;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#w;#r;#n;#t;#h;#f;#c;#i;#v;#o;#x;#_;#d;#m;#S;#A;#u;#z;static unsafeExposeInternals(t){return{starts:t.#_,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#r,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#i},free:t.#v,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,r,s,i)=>t.#$(e,r,s,i),moveToTail:e=>t.#k(e),indexes:e=>t.#E(e),rindexes:e=>t.#C(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#l}get calculatedSize(){return this.#w}get size(){return this.#s}get fetchMethod(){return this.#L}get memoMethod(){return this.#N}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:r,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:u,disposeAfter:l,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:v,fetchMethod:g,memoMethod:b,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:E,ignoreFetchAbort:O,perf:U}=t;if(U!==void 0&&typeof U?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=U??Fg,e!==0&&!We(e))throw new TypeError("max option must be a nonnegative integer");const R=e?Su(e):Array;if(!R)throw new Error("invalid max value: "+e);if(this.#a=e,this.#l=p,this.maxEntrySize=m||this.#l,this.sizeCalculation=v,this.sizeCalculation){if(!this.#l&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#N=b,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=g,this.#A=!!g,this.#r=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new R(e),this.#f=new R(e),this.#c=0,this.#i=0,this.#v=cr.create(e),this.#s=0,this.#w=0,typeof h=="function"&&(this.#g=h),typeof u=="function"&&(this.#D=u),typeof l=="function"?(this.#y=l,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#S=!!this.#g,this.#z=!!this.#D,this.#u=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!O,this.maxEntrySize!==0){if(this.#l!==0&&!We(this.#l))throw new TypeError("maxSize must be a positive integer if specified");if(!We(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=We(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=r||0,this.ttl){if(!We(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#a===0&&this.ttl===0&&this.#l===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#l){const j="LRU_CACHE_UNBOUNDED";$g(j)&&(Tu.add(j),Bg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,Bo))}}getRemainingTTL(t){return this.#r.has(t)?1/0:0}#U(){const t=new Bs(this.#a),e=new Bs(this.#a);this.#d=t,this.#_=e;const r=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=r,this.#Y=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,s(a,c)},this.#O=a=>{e[a]=t[a]!==0?this.#b.now():0,s(a,t[a])};const s=this.ttlAutopurge?(a,c)=>{if(r?.[a]&&(clearTimeout(r[a]),r[a]=void 0),c&&c!==0&&r){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),r[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],u=e[c];if(!h||!u)return;a.ttl=h,a.start=u,a.now=i||o();const l=a.now-u;a.remainingTTL=h-l}};let i=0;const o=()=>{const a=this.#b.now();if(this.ttlResolution>0){i=a;const c=setTimeout(()=>i=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#r.get(a);if(c===void 0)return 0;const h=t[c],u=e[c];if(!h||!u)return 1/0;const l=(i||o())-u;return h-l},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(i||o())-c>h}}#O=()=>{};#P=()=>{};#Y=()=>{};#p=()=>!1;#W(){const t=new Bs(this.#a);this.#w=0,this.#x=t,this.#I=e=>{this.#w-=t[e],t[e]=0},this.#j=(e,r,s,i)=>{if(this.#e(r))return 0;if(!We(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(r,e),!We(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s||0},this.#F=(e,r,s)=>{if(t[e]=r,this.#l){const i=this.#l-t[e];for(;this.#w>i;)this.#B(!0)}this.#w+=t[e],s&&(s.entrySize=r,s.totalCalculatedSize=this.#w)}}#I=t=>{};#F=(t,e,r)=>{};#j=(t,e,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#i;this.#V(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#c;this.#V(e)&&((t||!this.#p(e))&&(yield e),e!==this.#i);)e=this.#h[e]}#V(t){return t!==void 0&&this.#r.get(this.#n[t])===t}*entries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*rentries(){for(const t of this.#C())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*keys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;if(i!==void 0&&t(i,this.#n[r],this))return this.#R(this.#n[r],e)}}forEach(t,e=this){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}rforEach(t,e=this){for(const r of this.#C()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}purgeStale(){let t=!1;for(const e of this.#C({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#r.get(t);if(e===void 0)return;const r=this.#t[e],s=this.#e(r)?r.__staleWhileFetching:r;if(s===void 0)return;const i={value:s};if(this.#d&&this.#_){const o=this.#d[e],a=this.#_[e];if(o&&a){const c=o-(this.#b.now()-a);i.ttl=c,i.start=Date.now()}}return this.#x&&(i.size=this.#x[e]),i}dump(){const t=[];for(const e of this.#E({allowStale:!0})){const r=this.#n[e],s=this.#t[e],i=this.#e(s)?s.__staleWhileFetching:s;if(i===void 0||r===void 0)continue;const o={value:i};if(this.#d&&this.#_){o.ttl=this.#d[e];const a=this.#b.now()-this.#_[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([r,o])}return t}load(t){this.clear();for(const[e,r]of t){if(r.start){const s=Date.now()-r.start;r.start=this.#b.now()-s}this.#M(e,r.value,r)}}set(t,e,r={}){const{status:s=void 0}=r;return r.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e)),this.#M(t,e,r)}#M(t,e,r={}){const{ttl:s=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=r;c&&!this.#e(e)&&(c.value=e);const u=this.#j(t,e,r.size||0,a,c);if(this.maxEntrySize&&u>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let l=this.#s===0?void 0:this.#r.get(t);if(l===void 0)l=this.#s===0?this.#i:this.#v.length!==0?this.#v.pop():this.#s===this.#a?this.#B(!1):this.#s,this.#n[l]=t,this.#t[l]=e,this.#r.set(t,l),this.#h[this.#i]=l,this.#f[l]=this.#i,this.#i=l,this.#s++,this.#F(l,u,c),c&&(c.set="add"),h=!1,this.#z&&this.#D?.(e,t,"add");else{this.#k(l);const d=this.#t[l];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#S&&this.#g?.(f,t,"set"),this.#u&&this.#o?.push([f,t,"set"]))}else o||(this.#S&&this.#g?.(d,t,"set"),this.#u&&this.#o?.push([d,t,"set"]));if(this.#I(l),this.#F(l,u,c),this.#t[l]=e,c){c.set="replace";const f=d&&this.#e(d)?d.__staleWhileFetching:d;f!==void 0&&(c.oldValue=f)}}else c&&(c.set="update");this.#z&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#U(),this.#d&&(h||this.#Y(l,s,i),c&&this.#P(c,l)),!o&&this.#u&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#s;){const t=this.#t[this.#c];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#u&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#B(t){const e=this.#c,r=this.#n[e],s=this.#t[e];return this.#A&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#S||this.#u)&&(this.#S&&this.#g?.(s,r,"evict"),this.#u&&this.#o?.push([s,r,"evict"])),this.#I(e),this.#m?.[e]&&(clearTimeout(this.#m[e]),this.#m[e]=void 0),t&&(this.#n[e]=void 0,this.#t[e]=void 0,this.#v.push(e)),this.#s===1?(this.#c=this.#i=0,this.#v.length=0):this.#c=this.#h[e],this.#r.delete(r),this.#s--,e}has(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&(r.op="has",r.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=e,i=this.#r.get(t);if(i!==void 0){const o=this.#t[i];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(i))s&&(s.has="stale",this.#P(s,i));else return r&&this.#O(i),s&&(s.has="hit",this.#P(s,i)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{status:r=void 0}=e;return r&&(r.op="peek",r.key=t),e.status=r,this.#J(t,e)}#J(t,e){const{status:r,allowStale:s=this.allowStale}=e,i=this.#r.get(t);if(i===void 0||!s&&this.#p(i)){r&&(r.peek=i===void 0?"miss":"stale");return}const o=this.#t[i],a=this.#e(o)?o.__staleWhileFetching:o;return r&&(a!==void 0?(r.peek="hit",r.value=a):r.peek="miss"),a}#$(t,e,r,s){const i=e===void 0?void 0:this.#t[e];if(this.#e(i))return i;const o=new AbortController,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:r,context:s},h=(m,v=!1)=>{const{aborted:g}=o.signal,b=r.ignoreFetchAbort&&m!==void 0,x=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&m!==void 0);if(r.status&&(g&&!v?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,b&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),g&&!b&&!v)return l(o.signal.reason,x);const w=f,C=this.#t[e];return(C===f||C===void 0&&b&&v)&&(m===void 0?w.__staleWhileFetching!==void 0?this.#t[e]=w.__staleWhileFetching:this.#T(t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},u=m=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=m),l(m,!1)),l=(m,v)=>{const{aborted:g}=o.signal,b=g&&r.allowStaleOnFetchAbort,x=b||r.allowStaleOnFetchRejection,w=x||r.noDeleteOnFetchRejection,C=f;if(this.#t[e]===f&&(!w||!v&&C.__staleWhileFetching===void 0?this.#T(t,"fetch"):b||(this.#t[e]=C.__staleWhileFetching)),x)return r.status&&C.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),C.__staleWhileFetching;if(C.__returned===C)throw m},d=(m,v)=>{const g=this.#L?.(t,i,c);g&&g instanceof Promise&&g.then(b=>m(b===void 0?void 0:b),v),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(m(void 0),r.allowStaleOnFetchAbort&&(m=b=>h(b,!0)))})};r.status&&(r.status.fetchDispatched=!0);const f=new Promise(d).then(h,u),p=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#r.get(t)):this.#t[e]=p,p}#e(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#G(t,e)}async#G(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:v=!1,status:g,signal:b}=e;if(g&&(g.op="fetch",g.key=t,v&&(g.forceRefresh=!0)),!this.#A)return g&&(g.fetch="get"),this.#R(t,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:g});const x={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:b},w=this.#r.get(t);if(w===void 0){g&&(g.fetch="miss");const C=this.#$(t,w,x,m);return C.__returned=C}else{const C=this.#t[w];if(this.#e(C)){const R=r&&C.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",R&&(g.returnedStale=!0)),R?C.__staleWhileFetching:C.__returned=C}const E=this.#p(w);if(!v&&!E)return g&&(g.fetch="hit"),this.#k(w),s&&this.#O(w),g&&this.#P(g,w),C;const O=this.#$(t,w,x,m),U=O.__staleWhileFetching!==void 0&&r;return g&&(g.fetch=E?"stale":"refresh",U&&E&&(g.returnedStale=!0)),U?O.__staleWhileFetching:O.__returned=O}}forceFetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#K(t,e)}async#K(t,e={}){const r=await this.#G(t,e);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="memo",r.key=t,e.context&&(r.context=e.context));const s=this.#Z(t,e);return r&&(r.value=s),s}#Z(t,e={}){const r=this.#N;if(!r)throw new Error("no memoMethod provided to constructor");const{context:s,status:i,forceRefresh:o,...a}=e;i&&o&&(i.forceRefresh=!0);const c=this.#R(t,a),h=o||c===void 0;if(i&&(i.memo=h?"miss":"hit",h||(i.value=c)),!h)return c;const u=r(t,c,{options:a,context:s});return i&&(i.value=u),this.#M(t,u,a),u}get(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="get",r.key=t);const s=this.#R(t,e);return r&&s!==void 0&&(r.value=s),s}#R(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=e,a=this.#r.get(t);if(a===void 0){o&&(o.get="miss");return}const c=this.#t[a],h=this.#e(c);return o&&this.#P(o,a),this.#p(a)?h?(o&&(o.get="stale-fetching"),r&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(i||this.#T(t,"expire"),o&&(o.get="stale"),r?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#k(a),s&&this.#O(a),h?c.__staleWhileFetching:c)}#X(t,e){this.#f[e]=t,this.#h[t]=e}#k(t){t!==this.#i&&(t===this.#c?this.#c=this.#h[t]:this.#X(this.#f[t],this.#h[t]),this.#X(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let r=!1;if(this.#s!==0){const s=this.#r.get(t);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),r=!0,this.#s===1)this.#H(e);else{this.#I(s);const i=this.#t[s];if(this.#e(i)?i.__abortController.abort(new Error("deleted")):(this.#S||this.#u)&&(this.#S&&this.#g?.(i,t,e),this.#u&&this.#o?.push([i,t,e])),this.#r.delete(t),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#i)this.#i=this.#f[s];else if(s===this.#c)this.#c=this.#h[s];else{const o=this.#f[s];this.#h[o]=this.#h[s];const a=this.#h[s];this.#f[a]=this.#f[s]}this.#s--,this.#v.push(s)}}if(this.#u&&this.#o?.length){const s=this.#o;let i;for(;i=s?.shift();)this.#y?.(...i)}return r}clear(){return this.#H("delete")}#H(t){for(const e of this.#C({allowStale:!0})){const r=this.#t[e];if(this.#e(r))r.__abortController.abort(new Error("deleted"));else{const s=this.#n[e];this.#S&&this.#g?.(r,s,t),this.#u&&this.#o?.push([r,s,t])}}if(this.#r.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#_){this.#d.fill(0),this.#_.fill(0);for(const e of this.#m??[])e!==void 0&&clearTimeout(e);this.#m?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#c=0,this.#i=0,this.#v.length=0,this.#w=0,this.#s=0,this.#u&&this.#o){const e=this.#o;let r;for(;r=e?.shift();)this.#y?.(...r)}}}class $o{data;expirationMap=new Map;immortalKeys=new Set;expirations=Object.create(null);ttl;max;updateAgeOnGet;checkAgeOnGet;updateAgeOnHas;checkAgeOnHas;noUpdateTTL;dispose;noDisposeOnSet;timer;timerExpiration;constructor({ttl:t=1/0,max:e=1/0,updateAgeOnGet:r=!1,checkAgeOnGet:s=!1,updateAgeOnHas:i=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},u=new Map){if(t!==void 0&&!No(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!No(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=u,this.ttl=t,this.max=e,this.updateAgeOnGet=!!r,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!i,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!a,this.noDisposeOnSet=!!h,c!==void 0){if(typeof c!="function")throw new TypeError("dispose must be function if set");this.dispose=c}else this.dispose=(l,d,f)=>{};this.timer=void 0,this.timerExpiration=void 0}get size(){return this.data.size}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);const r=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const s in this.expirations){const i=Number(s);this.setTimer(i,i-Dt());break}},Math.min(pg,Math.max(0,e)));r.unref&&r.unref(),this.timerExpiration=t,this.timer=r}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==$o.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,r]of t)this.dispose(r,e,"delete")}setTTL(t,e=this.ttl){const r=this.expirationMap.get(t);if(r!==void 0){const s=this.expirations[r];!s||s.length<=1?delete this.expirations[r]:this.expirations[r]=s.filter(i=>i!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const s=Math.floor(Dt()+e);this.expirationMap.set(t,s),this.expirations[s]||(this.expirations[s]=[],this.setTimer(s,e)),this.expirations[s].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:r=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:i=this.noDisposeOnSet}={}){if(!No(r))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,r);const o=this.data.get(t),a=!i&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,r),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:r=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(s&&this.setTTL(t,r),!0):!1}getRemainingTTL(t){const e=this.expirationMap.get(t);return e===1/0?1/0:e!==void 0?Math.max(0,Math.ceil(e-Dt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:r=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){const i=this.data.get(t);if(s&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,r),i}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const r=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(i=>i!==t)),this.dispose(r,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){if(!(this.size<=this.max))for(const t in this.expirations){const e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];const r=[];for(const s of e)r.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(const[s,i]of r)this.dispose(i,s,"evict")}else{const r=this.size-this.max,s=[];for(const i of e.splice(0,r))s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"evict")}}}purgeStale(){const t=Math.ceil(Dt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const r=[...this.expirations[e]||[]],s=[];delete this.expirations[e];for(const i of r)s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"expire")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const e of this.expirations[t])yield[e,this.data.get(e)];for(const t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(const t in this.expirations)for(const e of this.expirations[t])yield e;for(const t of this.immortalKeys)yield t}*values(){for(const t in this.expirations)for(const e of this.expirations[t])yield this.data.get(e);for(const t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}firstKey(){return this.keys().next().value}}const $n={branch:"├",lastBranch:"└",line:"│",empty:" "};function Us(n,t={}){const{showValues:e=!0,hideFunctions:r=!1,lineBreak:s=`\r
11
+ `,maxDeep:i}=t,o=[],a=new WeakSet;function c(u,l="",d=0){if(typeof u=="string"){o.push(l+'"'+u+'"');return}if(typeof u!="object"||u===null){e&&o.push(l+String(u));return}if(i&&d>=i){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(u)){o.push(l+"[Circular]");return}a.add(u);const f=Object.keys(u).filter(p=>!(r&&typeof u[p]=="function"));f.forEach((p,m)=>{const v=u[p],g=m===f.length-1,b=d===0&&m===0?"":l,x=g?$n.lastBranch:$n.branch,w=p.trim()===""?"":p;let C=b+x+(w?" "+w:"");const E=p.trim()!=="";if(v&&typeof v=="object"&&a.has(v))o.push(C+(E?": ":C?" ":"")+"[Circular]");else if(v&&typeof v=="object"&&!Array.isArray(v)){o.push(C);const O=g?$n.empty:$n.line,U=b+O+" ";c(v,U,d+1)}else if(Array.isArray(v)){o.push(C+(E?": ":C?" ":"")+"[Array("+v.length+")]");const O=g?$n.empty:$n.line,U=b+O+" ";c(v,U,d+1)}else if(e){const O=typeof v=="function"?"[Function]":typeof v=="string"?'"'+String(v)+'"':String(v);C+=(E?": ":C?" ":"")+O,o.push(C)}else o.push(C)})}const h=Object.keys(n);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof n[h[0]]=="string"){const u=h[0],l=$n.lastBranch,d=n[u],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return l+" "+f}return c(n),s+o.join(s)}function Pu(n="verbose"){let t=-1;switch(n){case"verbose":t=0;break;case"debug":t=1;break;case"info":t=2;break;case"warn":t=3;break;case"error":t=4;break}return t}function Ug(n="verbose"){K.OPEN_LOG_LEVEL=Pu(n)}function Au(){K.OPEN_LOG_LEVEL=-1}function Yg(n){K.LOG_UPLOAD_FN=n}Au();function Or(n="verbose"){return K.OPEN_LOG_LEVEL<=Pu(n)}function Uo(n){K.LOG_UPLOAD_FN&&K.LOG_UPLOAD_FN(n)}function gn(n,t=""){try{if(Uo({level:"info",msg:n,type:t}),!Or("info"))return;console.log(n)}catch{}}function _e(n,t=""){try{if(Uo({level:"warn",msg:n,type:t}),!Or("warn"))return;console.warn(n)}catch{}}function jg(n,t=""){try{if(Uo({level:"error",msg:n,type:t}),!Or("error"))return;console.error(n)}catch{}}const Mu={start:n=>{Or("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},Du={start:n=>{Or("verbose")&&(!console||typeof console!="object"||typeof console.time!="function"||console.time(n))},end:n=>{!console||typeof console!="object"||typeof console.timeEnd!="function"||console.timeEnd(n)}};function Ys(n){if(typeof MessageChannel<"u"&&(pu(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,n()},e.postMessage(null)}else setTimeout(n,0)}async function Vg(){return new Promise(n=>{Ys(n)})}if(K.requestAnimationFrame=K.requestAnimationFrame||K.webkitRequestAnimationFrame||K.mozRequestAnimationFrame||K.oRequestAnimationFrame||K.msRequestAnimationFrame,K.cancelAnimationFrame=K.cancelAnimationFrame||K.webkitCancelAnimationFrame||K.mozCancelAnimationFrame||K.oCancelAnimationFrame||K.msCancelAnimationFrame,!K.requestAnimationFrame){let n=Dt();K.requestAnimationFrame=t=>{const e=Dt(),r=Math.max(0,16-(e-n)),s=K.setTimeout(()=>{t(e+r)},r);return n=e+r,s}}K.cancelAnimationFrame||(K.cancelAnimationFrame=n=>{K.clearTimeout(n)});const js=K.requestAnimationFrame,Gg=K.cancelAnimationFrame;function Xg(n){let t=!0,e=js(function r(s){t&&n(s)&&(e=js(r))});return()=>{t=!1,Gg(e)}}K.requestIdleCallback=K.requestIdleCallback||function(n,t){const e=Dt();return setTimeout(()=>{const r=Dt()-e,s={didTimeout:typeof t?.timeout!="number"?!1:r>t.timeout,timeRemaining:()=>Math.max(0,50-r)};n(s)},t?.timeout)},K.cancelIdleCallback=K.cancelIdleCallback||function(n){clearTimeout(n)},K.requestIdleCallback,K.cancelIdleCallback;let Ir=33,qe=33,Vs=0,Rr=0,Yo=!1;function Ou(n){Yo||(Yo=!0,js(t=>{Yo=!1,Vs=t,Rr===0&&(Rr=Vs+qe);let e=qe+Vs-Rr;e<qe&&Ir<qe?(e<8&&(e=8),qe=Math.max(e,Ir)):e>qe&&Ir>qe&&(qe=Math.min(e,Ir)),Ir=e,Rr=Vs+qe,Ys(()=>{n(Rr),Ou(n)})}))}function jo(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,r=n?.onTrace||(f=>{const p=" ".repeat(f.depth);console.log(`${p}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),s=[];let i=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function u(f,p){const m=h,v={id:String(++i),dataset:f,source:p,createdAt:Dt(),parentId:m?.id,depth:m?m.depth+1:0};s.push(v)}let l=!1;function d(){if(l)return;l=!0;let f=0;try{for(;o<s.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const p=s[o],m=h;h=p,e&&r(p);const v=Array.from(a);for(const g of v)try{g(...p.dataset)}catch(b){Ys(()=>{throw b})}h=m,o++}}finally{l=!1,o>=s.length&&(s.length=0,o=0)}}return{subscribe:c,once(f){const p=c((...m)=>{p(),f(...m)});return p},emit(...f){u(f),d()},emitFrom(f,...p){u(p,f),d()},clear(){a.clear()}}}function Hg(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let r=1/0;const s=()=>r===1/0||Dt()<r,i=R=>{r=Dt()+R,h()};let o=s()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,O()},u=()=>!a()&&!s(),l=async()=>{u()&&await Vg()};let d=0,f=[];const p=new Set,m=new Set;let v=0,g=[],b=[];const x=()=>{v===0&&(g.forEach(R=>R()),g=[],f.length===0&&(b.forEach(R=>R()),b=[]))},w=R=>{if(R.signal){if(R.signal.aborted)return R.resultReject("Cancel by Aborted!"),R;R.abortHandler=()=>{R.resultReject("Cancel by Abort!"),f=f.filter(j=>j.id!==R.id),x()},R.signal.addEventListener("abort",R.abortHandler,{once:!0})}if(f.filter(j=>R.invalidates?.includes(j.id)).forEach(j=>{j.resultReject("Cancel by invalidates!")}),f=f.filter(j=>!R.invalidates?.includes(j.id)),R.fold){const j=f.findIndex(H=>H.id===R.id);if(j!==-1){const H=f[j],V=R.fold(H,R);return H.dataset=V.dataset,H}else return f.push(R),R}else return f.push(R),R},C=()=>{if(f.length===0)return;let R=-1,j;for(let H=0,V=f.length;H<V;H++){const lt=f[H];(!j||lt.niceness<j.niceness)&&(R=H,j=lt)}return f.splice(R,1),j};let E=!1;const O=()=>{E||a()||(E=!0,Ys(()=>{for(E=!1;f.length>0&&m.size>0&&v<t&&!a();){const R=C(),j=mg(R.deadline)&&Dt()>=R.deadline,H=R.niceness==Rs.immediate;if(!s()&&!j&&!H){w(R),O();break}if(R.signal?.aborted){R.resultReject("Cancel by Aborted!"),x();continue}v++;const V=m.values().next().value;m.delete(V),Ng(Cu(Promise.resolve(V(...R.dataset)),e),R.signal).then(lt=>{R.resultResolve(lt)}).catch(lt=>{R.retry>0?(R.retry--,w(R)):R.resultReject(lt)}).finally(async()=>{p.has(V)&&m.add(V),R.signal&&R.abortHandler&&R.signal.removeEventListener("abort",R.abortHandler),v--,x(),O()})}}))},U=R=>(p.add(R),m.add(R),O(),()=>{p.delete(R),m.delete(R)});return{put(...R){const j=R[R.length-1]||{};let H={};("niceness"in j||"deadline"in j||"retry"in j||"signal"in j||"invalidates"in j||"fold"in j)&&(H=R.pop());const V=kg(),lt=w({id:String(++d),dataset:R,createdAt:Dt(),result:V.promise,resultResolve:V.resolve,resultReject:V.reject,niceness:H.niceness??Rs.normal,deadline:H.deadline??Io,retry:H.retry??0,signal:H.signal});return O(),lt},cancel(R){f=f.filter(j=>j.id!==R.id),R.signal&&R.abortHandler&&R.signal.removeEventListener("abort",R.abortHandler),x()},clear(){for(const R of f)R.signal&&R.abortHandler&&R.signal.removeEventListener("abort",R.abortHandler),R.resultReject(new Error("Cleared"));f.length=0,x()},run:U,once(R){const j=U((...H)=>{try{return R(...H)}finally{j()}});return j},async onDrain(){if(!(v===0&&f.length===0))return new Promise(R=>{b.push(R)})},async onIdle(){if(v!==0)return new Promise(R=>{g.push(R)})},pause:c,resume:h,get paused(){return a()},startFrame:i,yieldIfNeeded:l}}class Wg{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=Hg({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(r){return await r()})}cancel(t){this.pool.cancel(t)}clear(){this.pool.clear()}get paused(){return this.pool.paused}startFrame(t){this.pool.startFrame(t)}async immediate(t){try{return this.pool.pause(),await this.pool.onIdle(),await Cu(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??Rs.normal,deadline:typeof e?.timeout=="number"?Dt()+e?.timeout:Io})}}class qg{pool;started=!1;constructor(t={concurrency:1}){this.pool=new Wg(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,Ou(t=>{this.pool.startFrame(t-Dt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:Rs.idle,timeout:e}).result}}const Iu=new qg,Jg=Iu.idle.bind(Iu);class Vo{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(r?e.bind(r):e),this}addListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r?e.bind(r):e),this}on(t,e,r){return this.addListener(t,e,r),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(r=>r!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(r=>{r(...e)}),this}once(t,e,r){const s=(...i)=>{r?e.apply(r,i):e(...i),this.off(t,s)};return this.on(t,s),this}}var Go=function(n,t){return Go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},Go(n,t)};function Xo(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Go(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Ru(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ho(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function Wo(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function Je(n){return typeof n=="function"}function Kg(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var qo=Kg(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
12
+ `+t.map(function(e,r){return r+1+") "+e.toString()}).join(`
13
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function ku(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Jo=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Ru(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(Je(u))try{u()}catch(m){i=m instanceof qo?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Ru(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Nu(p)}catch(m){i=i??[],m instanceof qo?i=Wo(Wo([],Ho(i)),Ho(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new qo(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Nu(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&ku(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&ku(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();Jo.EMPTY;function Lu(n){return n instanceof Jo||n&&"closed"in n&&Je(n.remove)&&Je(n.add)&&Je(n.unsubscribe)}function Nu(n){Je(n)?n():n.unsubscribe()}var zu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Zg={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Wo([n,t],Ho(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Qg(n){Zg.setTimeout(function(){throw n})}function Fu(){}function t0(n){n()}var Ko=function(n){Xo(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Lu(e)&&e.add(r)):r.destination=s0,r}return t.create=function(e,r,s){return new Qo(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Jo),e0=Function.prototype.bind;function Zo(n,t){return e0.call(n,t)}var n0=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Gs(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Gs(r)}else Gs(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Gs(e)}},n}(),Qo=function(n){Xo(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(Je(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&zu.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Zo(e.next,a),error:e.error&&Zo(e.error,a),complete:e.complete&&Zo(e.complete,a)}):o=e}return i.destination=new n0(o),i}return t}(Ko);function Gs(n){Qg(n)}function r0(n){throw n}var s0={closed:!0,next:Fu,error:r0,complete:Fu},i0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function o0(n){return n}function a0(n){return n.length===0?o0:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}(function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=h0(t)?t:new Qo(t,e,r);return t0(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Bu(e),new e(function(s,i){var o=new Qo({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[i0]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a0(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Bu(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n})();function Bu(n){var t;return(t=n??zu.Promise)!==null&&t!==void 0?t:Promise}function c0(n){return n&&Je(n.next)&&Je(n.error)&&Je(n.complete)}function h0(n){return n&&n instanceof Ko||c0(n)&&Lu(n)}(function(n){Xo(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ko);function u0(){const n=K.navigator?.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}u0(),K.document&&K.document.documentMode&&K.document.documentMode,K.document&&K.document.documentMode&&K.document.documentMode,K.document&&K.document.documentMode&&K.document.documentMode,!!(K.Worker&&K.Blob&&K.Promise&&K.OffscreenCanvas&&K.OffscreenCanvasRenderingContext2D&&K.HTMLCanvasElement&&K.HTMLCanvasElement.prototype.transferControlToOffscreen&&K.URL&&K.URL.createObjectURL);const l0=(()=>{if(!K.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),$u=K.crypto;$u?.subtle;function Uu(){try{return $u.randomUUID()}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?e:e&3|8).toString(16)})}}const f0="\uFEFF";function d0(n){return n.startsWith(f0)?n.slice(1):n}function m0(n){try{return{ok:!0,value:JSON.parse(d0(n))}}catch{return{ok:!1}}}Rg(m0,{createCache:()=>new Bo({max:50}),cacheKeyResolver:n=>n});const ta=10,Yu=(n=0)=>t=>`\x1B[${t+n}m`,ju=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,Vu=(n=0)=>(t,e,r)=>`\x1B[${38+n};2;${t};${e};${r}m`,Pt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Pt.modifier);const p0=Object.keys(Pt.color),g0=Object.keys(Pt.bgColor);[...p0,...g0];function y0(){const n=new Map;for(const[t,e]of Object.entries(Pt)){for(const[r,s]of Object.entries(e))Pt[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},e[r]=Pt[r],n.set(s[0],s[1]);Object.defineProperty(Pt,t,{value:e,enumerable:!1})}return Object.defineProperty(Pt,"codes",{value:n,enumerable:!1}),Pt.color.close="\x1B[39m",Pt.bgColor.close="\x1B[49m",Pt.color.ansi=Yu(),Pt.color.ansi256=ju(),Pt.color.ansi16m=Vu(),Pt.bgColor.ansi=Yu(ta),Pt.bgColor.ansi256=ju(ta),Pt.bgColor.ansi16m=Vu(ta),Object.defineProperties(Pt,{rgbToAnsi256:{value(t,e,r){return t===e&&e===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[r]=e;r.length===3&&(r=[...r].map(i=>i+i).join(""));const s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Pt.rgbToAnsi256(...Pt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,r,s;if(t>=232)e=((t-232)*10+8)/255,r=e,s=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,r=Math.floor(a/6)/5,s=a%6/5}const i=Math.max(e,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(e));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,r)=>Pt.ansi256ToAnsi(Pt.rgbToAnsi256(t,e,r)),enumerable:!1},hexToAnsi:{value:t=>Pt.ansi256ToAnsi(Pt.hexToAnsi256(t)),enumerable:!1}}),Pt}const b0=y0(),w0=0;new Set(b0.codes.values()).delete(w0);const kr={1:"rgb(10,194,210)",2:"rgb(123,183,250)",3:"rgb(96,215,169)",4:"rgb(253,193,98)",5:"rgb(253,106,98)",6:"rgb(246,141,187)",7:"rgb(38,204,255)",8:"rgb(162,90,253)",9:"rgb(255,94,126)",10:"rgb(136,255,90)",11:"rgb(252,255,66)",12:"rgb(255,166,45)",13:"rgb(255,54,255)",14:"rgb(220,73,22)",15:"rgb(104,113,177)",16:"rgb(209,185,53)",17:"rgb(27,188,155)",18:"rgb(255,127,80)",19:"rgb(75,191,195)",20:"rgb(255,153,0)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",brightblue:"rgb(59,142,234)",terminalblue:"rgb(36,114,200)",red:"rgb(255,0,0)",brightred:"rgb(241,76,76)",terminalred:"rgb(205,49,49)",white:"rgb(255,255,255)",terminalwhite:"rgb(229,229,229)",yellow:"rgb(255,255,0)",brightyellow:"rgb(245,245,67)",terminalyellow:"rgb(229,229,16)",yellowgreen:"rgb(154,205,50)",aliceblue:"rgb(240,248,255)",antiquewhite:"rgb(250,235,215)",aqua:"rgb(0,255,255)",aquamarine:"rgb(127,255,212)",azure:"rgb(240,255,255)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)",blanchedalmond:"rgb(255,235,205)",blueviolet:"rgb(138,43,226)",brown:"rgb(165,42,42)",burlywood:"rgb(222,184,135)",cadetblue:"rgb(95,158,160)",chartreuse:"rgb(127,255,0)",chocolate:"rgb(210,105,30)",coral:"rgb(255,127,80)",cornflowerblue:"rgb(100,149,237)",cornsilk:"rgb(255,248,220)",crimson:"rgb(220,20,60)",cyan:"rgb(0,255,255)",brightcyan:"rgb(41,184,219)",terminalcyan:"rgb(17,168,205)",darkblue:"rgb(0,0,139)",darkcyan:"rgb(0,139,139)",darkgoldenrod:"rgb(184,134,11)",darkgray:"rgb(169,169,169)",darkgreen:"rgb(0,100,0)",darkgrey:"rgb(30,30,30)",darkkhaki:"rgb(189,183,107)",darkmagenta:"rgb(139,0,139)",darkolivegreen:"rgb(85,107,47)",darkorange:"rgb(255,140,0)",darkorchid:"rgb(153,50,204)",darkred:"rgb(139,0,0)",darksalmon:"rgb(233,150,122)",darkseagreen:"rgb(143,188,143)",darkslateblue:"rgb(72,61,139)",darkslategray:"rgb(47,79,79)",darkslategrey:"rgb(47,79,79)",darkturquoise:"rgb(0,206,209)",darkviolet:"rgb(148,0,211)",deeppink:"rgb(255,20,147)",deepskyblue:"rgb(0,191,255)",dimgray:"rgb(105,105,105)",dodgerblue:"rgb(30,144,255)",firebrick:"rgb(178,34,34)",floralwhite:"rgb(255,250,240)",forestgreen:"rgb(34,139,34)",fuchsia:"rgb(255,0,255)",gainsboro:"rgb(220,220,220)",ghostwhite:"rgb(248,248,255)",gold:"rgb(255,215,0)",goldenrod:"rgb(218,165,32)",grey:"rgb(128,128,128)",green:"rgb(0,128,0)",brightgreen:"rgb(35,209,139)",terminalgreen:"rgb(13,188,121)",greenyellow:"rgb(173,255,47)",honeydew:"rgb(240,255,240)",hotpink:"rgb(255,105,180)",indianred:"rgb(205,92,92)",indigo:"rgb(75,0,130)",ivory:"rgb(255,255,240)",khaki:"rgb(240,230,140)",lavender:"rgb(230,230,250)",lavenderblush:"rgb(255,240,245)",lawngreen:"rgb(124,252,0)",lemonchiffon:"rgb(255,250,205)",lightblue:"rgb(173,216,230)",lightcoral:"rgb(240,128,128)",lightcyan:"rgb(224,255,255)",lightgoldenrodyellow:"rgb(250,250,210)",lightgreen:"rgb(144,238,144)",lightgrey:"rgb(229,229,229)",lightpink:"rgb(255,182,193)",lightsalmon:"rgb(255,160,122)",lightseagreen:"rgb(32,178,170)",lightskyblue:"rgb(135,206,250)",lightslategray:"rgb(119,136,153)",lightslategrey:"rgb(119,136,153)",lightsteelblue:"rgb(176,196,222)",lightyellow:"rgb(255,255,224)",lime:"rgb(0,255,0)",limegreen:"rgb(50,205,50)",linen:"rgb(250,240,230)",magenta:"rgb(255,0,255)",brightmagenta:"rgb(214,112,214)",terminalmagenta:"rgb(188,63,188)",maroon:"rgb(128,0,0)",mediumaquamarine:"rgb(102,205,170)",mediumblue:"rgb(0,0,205)",mediumorchid:"rgb(186,85,211)",mediumpurple:"rgb(147,112,219)",mediumseagreen:"rgb(60,179,113)",mediumslateblue:"rgb(123,104,238)",mediumspringgreen:"rgb(0,250,154)",mediumturquoise:"rgb(72,209,204)",mediumvioletred:"rgb(199,21,133)",midnightblue:"rgb(25,25,112)",mintcream:"rgb(245,255,250)",mistyrose:"rgb(255,228,225)",moccasin:"rgb(255,228,181)",navajowhite:"rgb(255,222,173)",navy:"rgb(0,0,128)",oldlace:"rgb(253,245,230)",olive:"rgb(128,128,0)",olivedrab:"rgb(107,142,35)",orange:"rgb(255,165,0)",orangered:"rgb(255,69,0)",orchid:"rgb(218,112,214)",palegoldenrod:"rgb(238,232,170)",palegreen:"rgb(152,251,152)",paleturquoise:"rgb(175,238,238)",palevioletred:"rgb(219,112,147)",papayawhip:"rgb(255,239,213)",peachpuff:"rgb(255,218,185)",peru:"rgb(205,133,63)",pink:"rgb(255,192,203)",plum:"rgb(221,160,221)",powderblue:"rgb(176,224,230)",purple:"rgb(128,0,128)",rebeccapurple:"rgb(102,51,153)",rosybrown:"rgb(188,143,143)",royalblue:"rgb(65,105,225)",saddlebrown:"rgb(139,69,19)",salmon:"rgb(250,128,114)",sandybrown:"rgb(244,164,96)",seagreen:"rgb(46,139,87)",seashell:"rgb(255,245,238)",sienna:"rgb(160,82,45)",silver:"rgb(192,192,192)",skyblue:"rgb(135,206,235)",slateblue:"rgb(106,90,205)",slategray:"rgb(112,128,144)",slategrey:"rgb(112,128,144)",snow:"rgb(255,250,250)",springgreen:"rgb(0,255,127)",steelblue:"rgb(70,130,180)",tan:"rgb(210,180,140)",teal:"rgb(0,128,128)",thistle:"rgb(216,191,216)",tomato:"rgb(255,99,71)",turquoise:"rgb(64,224,208)",violet:"rgb(238,130,238)",wheat:"rgb(245,222,179)"},v0=Array.from(Object.values(kr));Object.entries(kr).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:x0(e)}}).sort((n,t)=>n.brightness-t.brightness);function x0(n){const[t,e,r]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*r}class Pe{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color Set Unknown Error: color(${t}) type(${typeof t})`;if(t instanceof Pe)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let r;if(r=/^(\w+)\(([^)]*)\)/.exec(t)){const s=r[2];let i;switch(r[1]){case"rgb":case"rgba":(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=parseInt(i[1],10),this.g=parseInt(i[2],10),this.b=parseInt(i[3],10),this.a=i[4]?parseFloat(i[4]):1):(i=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=Z(parseFloat(i[1]),0,100)*255/100,this.g=Z(parseFloat(i[2]),0,100)*255/100,this.b=Z(parseFloat(i[3]),0,100)*255/100,this.a=i[4]?parseFloat(i[4]):1):_e(e);break;case"hsl":case"hsla":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):_e(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSV(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):_e(e);break;default:_e(e)}}else if(r=/#([A-Fa-f0-9]+)/.exec(t)){const s=r[1],i=s.length;i===3?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),1):i===4?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),Z(parseInt(s.charAt(3),16)/16,0,1)):i===6||i===8?this.setHEX(parseInt(s,16)):_e(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{_e(e)}else _e(e)}else Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):_e(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=Z(Math.round(xe(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=Z(Math.round(xe(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=Z(Math.round(xe(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=Z(xe(t,this.a),0,1)}setAlpha(t){return this.a=t,this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${tt(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Pe(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=na(t.r),this.g=na(t.g),this.b=na(t.b),this}copyLinearToSRGB(t){return this.r=ra(t.r),this.g=ra(t.g),this.b=ra(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",r="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:r);{const{r:s,g:i,b:o}=this.color;return this.r=255-s,this.g=255-i,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=Z(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e+(255-e)*t,this.g=r+(255-r)*t,this.b=s+(255-s)*t),this}darken(t){t=Z(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e*(1-t),this.g=r*(1-t),this.b=s*(1-t)),this}lerp(t,e){e=Z(e,0,1);const{r,g:s,b:i}=this.color;return this.r=r+(t.r-r)*e,this.g=s+(t.g-s)*e,this.b=i+(t.b-i)*e,this}lerpColors(t,e,r){return r=Z(r,0,1),this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}static gradient(t,e,r){try{return ea.lerpColors(new Pe(t),new Pe(e),r).toString()}catch{return e}}static random(){return ea.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Pe.nextIndex){Pe.nextIndex=t;const e=Object.keys(kr),r=e.length;return ea.set(kr[e[Pe.nextIndex++%r]]).toString()}setColorName(t){const e=kr[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,_e("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,r,s=1){return this.r=t,this.g=e,this.b=r,this.a=s,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,r,s=1){const i=bg(t,1),o=Z(e,0,1),a=Z(r,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=sa(h,c,i+.3333333333333333)*255,this.g=sa(h,c,i)*255,this.b=sa(h,c,i-.3333333333333333)*255}return this.a=s,this}getHSL(t){const e=this.r,r=this.g,s=this.b,i=Math.max(e,r,s)/255,o=Math.min(e,r,s)/255;let a,c;const h=(o+i)/2;if(o===i)a=0,c=0;else{const u=i-o;switch(c=h<=.5?u/(i+o):u/(2-i-o),i){case e:a=(r-s)/u+(r<s?6:0);break;case r:a=(s-e)/u+2;break;case s:default:a=(e-r)/u+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,r){const s=this.getHSL();return this.setHSL(s.h+t,s.s+e,s.l+r)}lerpHSL(t,e){const r=this.getHSL(),s=t.getHSL(),i=Fs(r.h,s.h,e),o=Fs(r.s,s.s,e),a=Fs(r.l,s.l,e);return this.setHSL(i,o,a),this}setHSV(t,e,r,s=1){const i=Z(t,0,1)*360,o=Z(e,0,1),a=Z(r,0,1),c=Math.floor(i/60)%6,h=i/60-Math.floor(i/60),u=a*(1-o),l=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,u],[l,a,u],[u,a,d],[u,l,a],[d,u,a],[a,u,l]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=s,this}setHSB(t,e,r,s=1){this.setHSV(t,e,r,s)}getHSV(t){const{r:e,g:r,b:s,a:i}=this.color,o=Math.max(e,r,s),a=Math.min(e,r,s),c=o-a;let h;e===o?h=(r-s)/c:r===o?h=2+(s-e)/c:h=4+(e-r)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,d=o/255;return t&&t.setHSV(u,l,d,i),{h:u,s:l,v:d,a:i}}getHSB(t){const{h:e,s:r,v:s,a:i}=this.getHSV(t);return{h:e,s:r,b:s,a:i}}}const ea=new Pe;function na(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function ra(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function sa(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?n+(t-n)*6*e:e<.5?t:e<.6666666666666666?n+(t-n)*6*(.6666666666666666-e):n}function _0(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",r="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",s="(?<pathname>(?:\\/[^/#?]+)*\\/?)",i="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${r}${s}${i}${o}$`).exec(n);return{href:n,protocol:a?.groups?.protocol||"",host:a?.groups?.host||"",hostname:a?.groups?.hostname||"",port:a?.groups?.port||"",pathname:a?.groups?.pathname||"",search:a?.groups?.search||"",hash:a?.groups?.hash||""}}}function S0(n=window.location.href){const t=_0(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function E0(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function C0(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function T0(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function Gu(n,t){return function(){return n.apply(t,arguments)}}const{toString:P0}=Object.prototype,{getPrototypeOf:ia}=Object,Xs=(n=>t=>{const e=P0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ae=n=>(n=n.toLowerCase(),t=>Xs(t)===n),Hs=n=>t=>typeof t===n,{isArray:hr}=Array,Lr=Hs("undefined");function A0(n){return n!==null&&!Lr(n)&&n.constructor!==null&&!Lr(n.constructor)&&me(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Xu=Ae("ArrayBuffer");function M0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Xu(n.buffer),t}const D0=Hs("string"),me=Hs("function"),Hu=Hs("number"),Ws=n=>n!==null&&typeof n=="object",O0=n=>n===!0||n===!1,qs=n=>{if(Xs(n)!=="object")return!1;const t=ia(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},I0=Ae("Date"),R0=Ae("File"),k0=Ae("Blob"),L0=Ae("FileList"),N0=n=>Ws(n)&&me(n.pipe),z0=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||me(n.append)&&((t=Xs(n))==="formdata"||t==="object"&&me(n.toString)&&n.toString()==="[object FormData]"))},F0=Ae("URLSearchParams"),[B0,$0,U0,Y0]=["ReadableStream","Request","Response","Headers"].map(Ae),j0=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nr(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),hr(n))for(r=0,s=n.length;r<s;r++)t.call(null,n[r],r,n);else{const i=e?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,n[a],a,n)}}function Wu(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,s;for(;r-- >0;)if(s=e[r],t===s.toLowerCase())return s;return null}const Un=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),qu=n=>!Lr(n)&&n!==Un;function oa(){const{caseless:n}=qu(this)&&this||{},t={},e=(r,s)=>{const i=n&&Wu(t,s)||s;qs(t[i])&&qs(r)?t[i]=oa(t[i],r):qs(r)?t[i]=oa({},r):hr(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Nr(arguments[r],e);return t}const V0=(n,t,e,{allOwnKeys:r}={})=>(Nr(t,(s,i)=>{e&&me(s)?n[i]=Gu(s,e):n[i]=s},{allOwnKeys:r}),n),G0=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),X0=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},H0=(n,t,e,r)=>{let s,i,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),i=s.length;i-- >0;)o=s[i],(!r||r(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&ia(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},W0=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},q0=n=>{if(!n)return null;if(hr(n))return n;let t=n.length;if(!Hu(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},J0=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&ia(Uint8Array)),K0=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},Z0=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},Q0=Ae("HTMLFormElement"),ty=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Ju=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),ey=Ae("RegExp"),Ku=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Nr(e,(s,i)=>{let o;(o=t(s,i,n))!==!1&&(r[i]=o||s)}),Object.defineProperties(n,r)},ny=n=>{Ku(n,(t,e)=>{if(me(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(me(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},ry=(n,t)=>{const e={},r=s=>{s.forEach(i=>{e[i]=!0})};return hr(n)?r(n):r(String(n).split(t)),e},sy=()=>{},iy=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function oy(n){return!!(n&&me(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const ay=n=>{const t=new Array(10),e=(r,s)=>{if(Ws(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=hr(r)?[]:{};return Nr(r,(o,a)=>{const c=e(o,s+1);!Lr(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return e(n,0)},cy=Ae("AsyncFunction"),hy=n=>n&&(Ws(n)||me(n))&&me(n.then)&&me(n.catch),Zu=((n,t)=>n?setImmediate:t?((e,r)=>(Un.addEventListener("message",({source:s,data:i})=>{s===Un&&i===e&&r.length&&r.shift()()},!1),s=>{r.push(s),Un.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",me(Un.postMessage)),uy=typeof queueMicrotask<"u"?queueMicrotask.bind(Un):typeof process<"u"&&process.nextTick||Zu,k={isArray:hr,isArrayBuffer:Xu,isBuffer:A0,isFormData:z0,isArrayBufferView:M0,isString:D0,isNumber:Hu,isBoolean:O0,isObject:Ws,isPlainObject:qs,isReadableStream:B0,isRequest:$0,isResponse:U0,isHeaders:Y0,isUndefined:Lr,isDate:I0,isFile:R0,isBlob:k0,isRegExp:ey,isFunction:me,isStream:N0,isURLSearchParams:F0,isTypedArray:J0,isFileList:L0,forEach:Nr,merge:oa,extend:V0,trim:j0,stripBOM:G0,inherits:X0,toFlatObject:H0,kindOf:Xs,kindOfTest:Ae,endsWith:W0,toArray:q0,forEachEntry:K0,matchAll:Z0,isHTMLForm:Q0,hasOwnProperty:Ju,hasOwnProp:Ju,reduceDescriptors:Ku,freezeMethods:ny,toObjectSet:ry,toCamelCase:ty,noop:sy,toFiniteNumber:iy,findKey:Wu,global:Un,isContextDefined:qu,isSpecCompliantForm:oy,toJSONObject:ay,isAsyncFn:cy,isThenable:hy,setImmediate:Zu,asap:uy};function ot(n,t,e,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Qu=ot.prototype,tl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{tl[n]={value:n}}),Object.defineProperties(ot,tl),Object.defineProperty(Qu,"isAxiosError",{value:!0}),ot.from=(n,t,e,r,s,i)=>{const o=Object.create(Qu);return k.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ot.call(o,n.message,t,e,r,s),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const ly=null;function aa(n){return k.isPlainObject(n)||k.isArray(n)}function el(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function nl(n,t,e){return n?n.concat(t).map(function(r,s){return r=el(r),!e&&s?"["+r+"]":r}).join(e?".":""):t}function fy(n){return k.isArray(n)&&!n.some(aa)}const dy=k.toFlatObject(k,{},null,function(n){return/^is[A-Z]/.test(n)});function Js(n,t,e){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=k.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!k.isUndefined(p[f])});const r=e.metaTokens,s=e.visitor||h,i=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(k.isDate(f))return f.toISOString();if(!a&&k.isBlob(f))throw new ot("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(f)||k.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,p,m){let v=f;if(f&&!m&&typeof f=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(k.isArray(f)&&fy(f)||(k.isFileList(f)||k.endsWith(p,"[]"))&&(v=k.toArray(f)))return p=el(p),v.forEach(function(g,b){!(k.isUndefined(g)||g===null)&&t.append(o===!0?nl([p],b,i):o===null?p:p+"[]",c(g))}),!1}return aa(f)?!0:(t.append(nl(m,p,i),c(f)),!1)}const u=[],l=Object.assign(dy,{defaultVisitor:h,convertValue:c,isVisitable:aa});function d(f,p){if(!k.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(f),k.forEach(f,function(m,v){(!(k.isUndefined(m)||m===null)&&s.call(t,m,k.isString(v)?v.trim():v,p,l))===!0&&d(m,p?p.concat(v):[v])}),u.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return d(n),t}function rl(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ca(n,t){this._pairs=[],n&&Js(n,this,t)}const sl=ca.prototype;sl.append=function(n,t){this._pairs.push([n,t])},sl.toString=function(n){const t=n?function(e){return n.call(this,e,rl)}:rl;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function my(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function il(n,t,e){if(!t)return n;const r=e&&e.encode||my;k.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let i;if(s?i=s(t,e):i=k.isURLSearchParams(t)?t.toString():new ca(t,e).toString(r),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class py{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(e){e!==null&&t(e)})}}const ol=py,al={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gy=typeof URLSearchParams<"u"?URLSearchParams:ca,yy=typeof FormData<"u"?FormData:null,by=typeof Blob<"u"?Blob:null,wy={isBrowser:!0,classes:{URLSearchParams:gy,FormData:yy,Blob:by},protocols:["http","https","file","blob","url","data"]},ha=typeof window<"u"&&typeof document<"u",ua=typeof navigator=="object"&&navigator||void 0,vy=ha&&(!ua||["ReactNative","NativeScript","NS"].indexOf(ua.product)<0),xy=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),_y=ha&&window.location.href||"http://localhost",Sy=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ha,hasStandardBrowserEnv:vy,hasStandardBrowserWebWorkerEnv:xy,navigator:ua,origin:_y},Symbol.toStringTag,{value:"Module"})),Zt={...Sy,...wy};function Ey(n,t){return Js(n,new Zt.classes.URLSearchParams,Object.assign({visitor:function(e,r,s,i){return Zt.isNode&&k.isBuffer(e)?(this.append(r,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Cy(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ty(n){const t={},e=Object.keys(n);let r;const s=e.length;let i;for(r=0;r<s;r++)i=e[r],t[i]=n[i];return t}function cl(n){function t(e,r,s,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=e.length;return o=!o&&k.isArray(s)?s.length:o,c?(k.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!k.isObject(s[o]))&&(s[o]=[]),t(e,r,s[o],i)&&k.isArray(s[o])&&(s[o]=Ty(s[o])),!a)}if(k.isFormData(n)&&k.isFunction(n.entries)){const e={};return k.forEachEntry(n,(r,s)=>{t(Cy(r),s,e,0)}),e}return null}function Py(n,t,e){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const la={transitional:al,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,s=k.isObject(n);if(s&&k.isHTMLForm(n)&&(n=new FormData(n)),k.isFormData(n))return r?JSON.stringify(cl(n)):n;if(k.isArrayBuffer(n)||k.isBuffer(n)||k.isStream(n)||k.isFile(n)||k.isBlob(n)||k.isReadableStream(n))return n;if(k.isArrayBufferView(n))return n.buffer;if(k.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let i;if(s){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Ey(n,this.formSerializer).toString();if((i=k.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Js(i?{"files[]":n}:n,o&&new o,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),Py(n)):n}],transformResponse:[function(n){const t=this.transitional||la.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(k.isResponse(n)||k.isReadableStream(n))return n;if(n&&k.isString(n)&&(e&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(i){if(s)throw i.name==="SyntaxError"?ot.from(i,ot.ERR_BAD_RESPONSE,this,null,this.response):i}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{la.headers[n]={}});const fa=la,Ay=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),My=n=>{const t={};let e,r,s;return n&&n.split(`
14
+ `).forEach(function(i){s=i.indexOf(":"),e=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!e||t[e]&&Ay[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},hl=Symbol("internals");function zr(n){return n&&String(n).trim().toLowerCase()}function Ks(n){return n===!1||n==null?n:k.isArray(n)?n.map(Ks):String(n)}function Dy(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const Oy=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function da(n,t,e,r,s){if(k.isFunction(r))return r.call(this,t,e);if(s&&(t=e),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function Iy(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Ry(n,t){const e=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class Zs{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function i(a,c,h){const u=zr(c);if(!u)throw new Error("header name must be a non-empty string");const l=k.findKey(s,u);(!l||s[l]===void 0||h===!0||h===void 0&&s[l]!==!1)&&(s[l||c]=Ks(a))}const o=(a,c)=>k.forEach(a,(h,u)=>i(h,u,c));if(k.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(k.isString(t)&&(t=t.trim())&&!Oy(t))o(My(t),e);else if(k.isHeaders(t))for(const[a,c]of t.entries())i(c,a,r);else t!=null&&i(e,t,r);return this}get(t,e){if(t=zr(t),t){const r=k.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return Dy(s);if(k.isFunction(e))return e.call(this,s,r);if(k.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=zr(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||da(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function i(o){if(o=zr(o),o){const a=k.findKey(r,o);a&&(!e||da(r,r[a],a,e))&&(delete r[a],s=!0)}}return k.isArray(t)?t.forEach(i):i(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const i=e[r];(!t||da(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const e=this,r={};return k.forEach(this,(s,i)=>{const o=k.findKey(r,i);if(o){e[o]=Ks(s),delete e[i];return}const a=t?Iy(i):String(i).trim();a!==i&&delete e[i],e[a]=Ks(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&k.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[hl]=this[hl]={accessors:{}}).accessors,r=this.prototype;function s(i){const o=zr(i);e[o]||(Ry(r,i),e[o]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}}Zs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(Zs.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),k.freezeMethods(Zs);const Me=Zs;function ma(n,t){const e=this||fa,r=t||e,s=Me.from(r.headers);let i=r.data;return k.forEach(n,function(o){i=o.call(e,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ul(n){return!!(n&&n.__CANCEL__)}function ur(n,t,e){ot.call(this,n??"canceled",ot.ERR_CANCELED,t,e),this.name="CanceledError"}k.inherits(ur,ot,{__CANCEL__:!0});function ll(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new ot("Request failed with status code "+e.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function ky(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function Ly(n,t){n=n||10;const e=new Array(n),r=new Array(n);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=r[i];o||(o=c),e[s]=a,r[s]=c;let u=i,l=0;for(;u!==s;)l+=e[u++],u=u%n;if(s=(s+1)%n,s===i&&(i=(i+1)%n),c-o<t)return;const d=h&&c-h;return d?Math.round(l*1e3/d):void 0}}function Ny(n,t){let e=0,r=1e3/t,s,i;const o=(a,c=Date.now())=>{e=c,s=null,i&&(clearTimeout(i),i=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=r?o(a,c):(s=a,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const Qs=(n,t,e=3)=>{let r=0;const s=Ly(50,250);return Ny(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,h=s(c),u=o<=a;r=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(l)},e)},fl=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},dl=n=>(...t)=>k.asap(()=>n(...t)),zy=Zt.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Zt.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,Fy=Zt.hasStandardBrowserEnv?{write(n,t,e,r,s,i){const o=[n+"="+encodeURIComponent(t)];k.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function By(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function $y(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ml(n,t,e){let r=!By(t);return n&&(r||e==!1)?$y(n,t):t}const pl=n=>n instanceof Me?{...n}:n;function Yn(n,t){t=t||{};const e={};function r(h,u,l,d){return k.isPlainObject(h)&&k.isPlainObject(u)?k.merge.call({caseless:d},h,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function s(h,u,l,d){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h,l,d)}else return r(h,u,l,d)}function i(h,u){if(!k.isUndefined(u))return r(void 0,u)}function o(h,u){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function a(h,u,l){if(l in t)return r(h,u);if(l in n)return r(void 0,h)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,l)=>s(pl(h),pl(u),l,!0)};return k.forEach(Object.keys(Object.assign({},n,t)),function(h){const u=c[h]||s,l=u(n[h],t[h],h);k.isUndefined(l)&&u!==a||(e[h]=l)}),e}const gl=n=>{const t=Yn({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Me.from(o),t.url=il(ml(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(k.isFormData(e)){if(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...u]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(Zt.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&zy(t.url))){const h=s&&i&&Fy.read(i);h&&o.set(s,h)}return t},Uy=typeof XMLHttpRequest<"u",Yy=Uy&&function(n){return new Promise(function(t,e){const r=gl(n);let s=r.data;const i=Me.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=r,h,u,l,d,f;function p(){d&&d(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function v(){if(!m)return;const b=Me.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:n,request:m};ll(function(w){t(w),p()},function(w){e(w),p()},x),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(e(new ot("Request aborted",ot.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new ot("Network Error",ot.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||al;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new ot(b,x.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,n,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&k.forEach(i.toJSON(),function(b,x){m.setRequestHeader(x,b)}),k.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),o&&o!=="json"&&(m.responseType=r.responseType),c&&([l,f]=Qs(c,!0),m.addEventListener("progress",l)),a&&m.upload&&([u,d]=Qs(a),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(h=b=>{m&&(e(!b||b.type?new ur(null,n,m):b),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const g=ky(r.url);if(g&&Zt.protocols.indexOf(g)===-1){e(new ot("Unsupported protocol "+g+":",ot.ERR_BAD_REQUEST,n));return}m.send(s||null)})},jy=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,s;const i=function(h){if(!s){s=!0,a();const u=h instanceof Error?h:this.reason;r.abort(u instanceof ot?u:new ur(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new ot(`timeout ${t} of ms exceeded`,ot.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),n=null)};n.forEach(h=>h.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>k.asap(a),c}},Vy=jy,Gy=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let r=0,s;for(;r<e;)s=r+t,yield n.slice(r,s),r=s},Xy=async function*(n,t){for await(const e of Hy(n))yield*Gy(e,t)},Hy=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},yl=(n,t,e,r)=>{const s=Xy(n,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await s.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let d=i+=l;e(d)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},ti=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bl=ti&&typeof ReadableStream=="function",Wy=ti&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),wl=(n,...t)=>{try{return!!n(...t)}catch{return!1}},qy=bl&&wl(()=>{let n=!1;const t=new Request(Zt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),vl=64*1024,pa=bl&&wl(()=>k.isReadableStream(new Response("").body)),ei={stream:pa&&(n=>n.body)};ti&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ei[t]&&(ei[t]=k.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new ot(`Response type '${t}' is not supported`,ot.ERR_NOT_SUPPORT,r)})})})(new Response);const Jy=async n=>{if(n==null)return 0;if(k.isBlob(n))return n.size;if(k.isSpecCompliantForm(n))return(await new Request(Zt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(k.isArrayBufferView(n)||k.isArrayBuffer(n))return n.byteLength;if(k.isURLSearchParams(n)&&(n=n+""),k.isString(n))return(await Wy(n)).byteLength},Ky=async(n,t)=>k.toFiniteNumber(n.getContentLength())??Jy(t),Zy=ti&&(async n=>{let{url:t,method:e,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:d}=gl(n);h=h?(h+"").toLowerCase():"text";let f=Vy([s,i&&i.toAbortSignal()],o),p;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(c&&qy&&e!=="get"&&e!=="head"&&(v=await Ky(u,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(k.isFormData(r)&&(E=C.headers.get("content-type"))&&u.setContentType(E),C.body){const[O,U]=fl(v,Qs(dl(c)));r=yl(C.body,vl,O,U)}}k.isString(l)||(l=l?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?l:void 0});let b=await fetch(p);const x=pa&&(h==="stream"||h==="response");if(pa&&(a||x&&m)){const C={};["status","statusText","headers"].forEach(R=>{C[R]=b[R]});const E=k.toFiniteNumber(b.headers.get("content-length")),[O,U]=a&&fl(E,Qs(dl(a),!0))||[];b=new Response(yl(b.body,vl,O,()=>{U&&U(),m&&m()}),C)}h=h||"text";let w=await ei[k.findKey(ei,h)||"text"](b,n);return!x&&m&&m(),await new Promise((C,E)=>{ll(C,E,{data:w,headers:Me.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:p})})}catch(g){throw m&&m(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new ot("Network Error",ot.ERR_NETWORK,n,p),{cause:g.cause||g}):ot.from(g,g&&g.code,n,p)}}),ga={http:ly,xhr:Yy,fetch:Zy};k.forEach(ga,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const xl=n=>`- ${n}`,Qy=n=>k.isFunction(n)||n===null||n===!1,_l={getAdapter:n=>{n=k.isArray(n)?n:[n];const{length:t}=n;let e,r;const s={};for(let i=0;i<t;i++){e=n[i];let o;if(r=e,!Qy(e)&&(r=ga[(o=String(e)).toLowerCase()],r===void 0))throw new ot(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
16
+ `+i.map(xl).join(`
17
+ `):" "+xl(i[0]):"as no adapter specified";throw new ot("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ga};function ya(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ur(null,n)}function Sl(n){return ya(n),n.headers=Me.from(n.headers),n.data=ma.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),_l.getAdapter(n.adapter||fa.adapter)(n).then(function(t){return ya(n),t.data=ma.call(n,n.transformResponse,t),t.headers=Me.from(t.headers),t},function(t){return ul(t)||(ya(n),t&&t.response&&(t.response.data=ma.call(n,n.transformResponse,t.response),t.response.headers=Me.from(t.response.headers))),Promise.reject(t)})}const El="1.8.4",ni={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{ni[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Cl={};ni.transitional=function(n,t,e){function r(s,i){return"[Axios v"+El+"] Transitional option '"+s+"'"+i+(e?". "+e:"")}return(s,i,o)=>{if(n===!1)throw new ot(r(i," has been removed"+(t?" in "+t:"")),ot.ERR_DEPRECATED);return t&&!Cl[i]&&(Cl[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(s,i,o):!0}},ni.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function t1(n,t,e){if(typeof n!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new ot("option "+i+" must be "+c,ot.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new ot("Unknown option "+i,ot.ERR_BAD_OPTION)}}const ri={assertOptions:t1,validators:ni},ze=ri.validators;class si{constructor(t){this.defaults=t,this.interceptors={request:new ol,response:new ol}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
18
+ `+i):r.stack=i}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Yn(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:i}=e;r!==void 0&&ri.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),s!=null&&(k.isFunction(s)?e.paramsSerializer={serialize:s}:ri.assertOptions(s,{encode:ze.function,serialize:ze.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ri.assertOptions(e,{baseUrl:ze.spelling("baseURL"),withXsrfToken:ze.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&k.merge(i.common,i[e.method]);i&&k.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Me.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let u,l=0,d;if(!c){const p=[Sl.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,u=Promise.resolve(e);l<d;)u=u.then(p[l++],p[l++]);return u}d=a.length;let f=e;for(l=0;l<d;){const p=a[l++],m=a[l++];try{f=p(f)}catch(v){m.call(this,v);break}}try{u=Sl.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,d=h.length;l<d;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=Yn(this.defaults,t);const e=ml(t.baseURL,t.url,t.allowAbsoluteUrls);return il(e,t.params,t.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(n){si.prototype[n]=function(t,e){return this.request(Yn(e||{},{method:n,url:t,data:(e||{}).data}))}}),k.forEach(["post","put","patch"],function(n){function t(e){return function(r,s,i){return this.request(Yn(i||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}si.prototype[n]=t(),si.prototype[n+"Form"]=t(!0)});const ii=si;class ba{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(s,i,o){r.reason||(r.reason=new ur(s,i,o),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new ba(function(e){t=e}),cancel:t}}}const e1=ba;function n1(n){return function(t){return n.apply(null,t)}}function r1(n){return k.isObject(n)&&n.isAxiosError===!0}const wa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wa).forEach(([n,t])=>{wa[t]=n});const s1=wa;function Tl(n){const t=new ii(n),e=Gu(ii.prototype.request,t);return k.extend(e,ii.prototype,t,{allOwnKeys:!0}),k.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Tl(Yn(n,r))},e}const zt=Tl(fa);zt.Axios=ii,zt.CanceledError=ur,zt.CancelToken=e1,zt.isCancel=ul,zt.VERSION=El,zt.toFormData=Js,zt.AxiosError=ot,zt.Cancel=zt.CanceledError,zt.all=function(n){return Promise.all(n)},zt.spread=n1,zt.isAxiosError=r1,zt.mergeConfig=Yn,zt.AxiosHeaders=Me,zt.formToJSON=n=>cl(k.isHTMLForm(n)?new FormData(n):n),zt.getAdapter=_l.getAdapter,zt.HttpStatusCode=s1,zt.default=zt;const i1=zt;class o1{instance;constructor(t){this.instance=i1.create(t),this.instance.interceptors.request.use(e=>(t?.interceptors?.request?.(e),e),e=>(t?.interceptors?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptors?.response?.(e),e.status==200,Promise.resolve(e)),e=>(t?.interceptors?.responseError?.(e),Promise.reject(e)))}request(t){let e=!1;const r=this.instance.request;return r.cancel=()=>{e=!0},r(t).then(s=>{if(e)throw new Error("Canceled!");return s})}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,r){return this.request({...r,method:"post",url:t,data:e})}postFormData(t,e,r){return r={...r,headers:{...r?.headers,"Content-Type":"multipart/form-data"}},this.request({...r,method:"post",url:t,data:e})}postForm(t,e,r){return this.instance.postForm(t,e,{...r})}put(t,e,r){return this.request({...r,method:"put",url:t,data:e})}patch(t,e,r){return this.request({...r,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function a1(n,t=(e,r)=>e<=r){const e=n.length;let r=Math.floor(e/2);for(;r>0;){for(let s=r;s<e;s++){const i=n[s];let o=s;for(;o>=r&&!t(n[o-r],i);)n[o]=n[o-r],o-=r;n[o]=i}r=Math.floor(r/2)}}function oi(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,r=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function s(o,a=!1){return ig(o)||yu(o)||mu(o)?{value:o,timestamp:ar()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:ar()}}let i=s(n,!0);return{get:()=>{let o=!1;return(e>=0&&ar()>xe(i.timestamp,0)+e*1e3||r>=0&&ar()>r)&&(o=!0),o&&(i.value=void 0),i},set:o=>i=s(o,!1)}}function va(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function c1(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var Pl={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(g,b){var x=g[0],w=g[1],C=g[2],E=g[3];x+=(w&C|~w&E)+b[0]-680876936|0,x=(x<<7|x>>>25)+w|0,E+=(x&w|~x&C)+b[1]-389564586|0,E=(E<<12|E>>>20)+x|0,C+=(E&x|~E&w)+b[2]+606105819|0,C=(C<<17|C>>>15)+E|0,w+=(C&E|~C&x)+b[3]-1044525330|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&E)+b[4]-176418897|0,x=(x<<7|x>>>25)+w|0,E+=(x&w|~x&C)+b[5]+1200080426|0,E=(E<<12|E>>>20)+x|0,C+=(E&x|~E&w)+b[6]-1473231341|0,C=(C<<17|C>>>15)+E|0,w+=(C&E|~C&x)+b[7]-45705983|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&E)+b[8]+1770035416|0,x=(x<<7|x>>>25)+w|0,E+=(x&w|~x&C)+b[9]-1958414417|0,E=(E<<12|E>>>20)+x|0,C+=(E&x|~E&w)+b[10]-42063|0,C=(C<<17|C>>>15)+E|0,w+=(C&E|~C&x)+b[11]-1990404162|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&E)+b[12]+1804603682|0,x=(x<<7|x>>>25)+w|0,E+=(x&w|~x&C)+b[13]-40341101|0,E=(E<<12|E>>>20)+x|0,C+=(E&x|~E&w)+b[14]-1502002290|0,C=(C<<17|C>>>15)+E|0,w+=(C&E|~C&x)+b[15]+1236535329|0,w=(w<<22|w>>>10)+C|0,x+=(w&E|C&~E)+b[1]-165796510|0,x=(x<<5|x>>>27)+w|0,E+=(x&C|w&~C)+b[6]-1069501632|0,E=(E<<9|E>>>23)+x|0,C+=(E&w|x&~w)+b[11]+643717713|0,C=(C<<14|C>>>18)+E|0,w+=(C&x|E&~x)+b[0]-373897302|0,w=(w<<20|w>>>12)+C|0,x+=(w&E|C&~E)+b[5]-701558691|0,x=(x<<5|x>>>27)+w|0,E+=(x&C|w&~C)+b[10]+38016083|0,E=(E<<9|E>>>23)+x|0,C+=(E&w|x&~w)+b[15]-660478335|0,C=(C<<14|C>>>18)+E|0,w+=(C&x|E&~x)+b[4]-405537848|0,w=(w<<20|w>>>12)+C|0,x+=(w&E|C&~E)+b[9]+568446438|0,x=(x<<5|x>>>27)+w|0,E+=(x&C|w&~C)+b[14]-1019803690|0,E=(E<<9|E>>>23)+x|0,C+=(E&w|x&~w)+b[3]-187363961|0,C=(C<<14|C>>>18)+E|0,w+=(C&x|E&~x)+b[8]+1163531501|0,w=(w<<20|w>>>12)+C|0,x+=(w&E|C&~E)+b[13]-1444681467|0,x=(x<<5|x>>>27)+w|0,E+=(x&C|w&~C)+b[2]-51403784|0,E=(E<<9|E>>>23)+x|0,C+=(E&w|x&~w)+b[7]+1735328473|0,C=(C<<14|C>>>18)+E|0,w+=(C&x|E&~x)+b[12]-1926607734|0,w=(w<<20|w>>>12)+C|0,x+=(w^C^E)+b[5]-378558|0,x=(x<<4|x>>>28)+w|0,E+=(x^w^C)+b[8]-2022574463|0,E=(E<<11|E>>>21)+x|0,C+=(E^x^w)+b[11]+1839030562|0,C=(C<<16|C>>>16)+E|0,w+=(C^E^x)+b[14]-35309556|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^E)+b[1]-1530992060|0,x=(x<<4|x>>>28)+w|0,E+=(x^w^C)+b[4]+1272893353|0,E=(E<<11|E>>>21)+x|0,C+=(E^x^w)+b[7]-155497632|0,C=(C<<16|C>>>16)+E|0,w+=(C^E^x)+b[10]-1094730640|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^E)+b[13]+681279174|0,x=(x<<4|x>>>28)+w|0,E+=(x^w^C)+b[0]-358537222|0,E=(E<<11|E>>>21)+x|0,C+=(E^x^w)+b[3]-722521979|0,C=(C<<16|C>>>16)+E|0,w+=(C^E^x)+b[6]+76029189|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^E)+b[9]-640364487|0,x=(x<<4|x>>>28)+w|0,E+=(x^w^C)+b[12]-421815835|0,E=(E<<11|E>>>21)+x|0,C+=(E^x^w)+b[15]+530742520|0,C=(C<<16|C>>>16)+E|0,w+=(C^E^x)+b[2]-995338651|0,w=(w<<23|w>>>9)+C|0,x+=(C^(w|~E))+b[0]-198630844|0,x=(x<<6|x>>>26)+w|0,E+=(w^(x|~C))+b[7]+1126891415|0,E=(E<<10|E>>>22)+x|0,C+=(x^(E|~w))+b[14]-1416354905|0,C=(C<<15|C>>>17)+E|0,w+=(E^(C|~x))+b[5]-57434055|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~E))+b[12]+1700485571|0,x=(x<<6|x>>>26)+w|0,E+=(w^(x|~C))+b[3]-1894986606|0,E=(E<<10|E>>>22)+x|0,C+=(x^(E|~w))+b[10]-1051523|0,C=(C<<15|C>>>17)+E|0,w+=(E^(C|~x))+b[1]-2054922799|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~E))+b[8]+1873313359|0,x=(x<<6|x>>>26)+w|0,E+=(w^(x|~C))+b[15]-30611744|0,E=(E<<10|E>>>22)+x|0,C+=(x^(E|~w))+b[6]-1560198380|0,C=(C<<15|C>>>17)+E|0,w+=(E^(C|~x))+b[13]+1309151649|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~E))+b[4]-145523070|0,x=(x<<6|x>>>26)+w|0,E+=(w^(x|~C))+b[11]-1120210379|0,E=(E<<10|E>>>22)+x|0,C+=(x^(E|~w))+b[2]+718787259|0,C=(C<<15|C>>>17)+E|0,w+=(E^(C|~x))+b[9]-343485551|0,w=(w<<21|w>>>11)+C|0,g[0]=x+g[0]|0,g[1]=w+g[1]|0,g[2]=C+g[2]|0,g[3]=E+g[3]|0}function i(g){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=g.charCodeAt(x)+(g.charCodeAt(x+1)<<8)+(g.charCodeAt(x+2)<<16)+(g.charCodeAt(x+3)<<24);return b}function o(g){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=g[x]+(g[x+1]<<8)+(g[x+2]<<16)+(g[x+3]<<24);return b}function a(g){var b=g.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,E,O,U,R;for(w=64;w<=b;w+=64)s(x,i(g.substring(w-64,w)));for(g=g.substring(w-64),C=g.length,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)E[w>>2]|=g.charCodeAt(w)<<(w%4<<3);if(E[w>>2]|=128<<(w%4<<3),w>55)for(s(x,E),w=0;w<16;w+=1)E[w]=0;return O=b*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),U=parseInt(O[2],16),R=parseInt(O[1],16)||0,E[14]=U,E[15]=R,s(x,E),x}function c(g){var b=g.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,E,O,U,R;for(w=64;w<=b;w+=64)s(x,o(g.subarray(w-64,w)));for(g=w-64<b?g.subarray(w-64):new Uint8Array(0),C=g.length,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)E[w>>2]|=g[w]<<(w%4<<3);if(E[w>>2]|=128<<(w%4<<3),w>55)for(s(x,E),w=0;w<16;w+=1)E[w]=0;return O=b*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),U=parseInt(O[2],16),R=parseInt(O[1],16)||0,E[14]=U,E[15]=R,s(x,E),x}function h(g){var b="",x;for(x=0;x<4;x+=1)b+=r[g>>x*8+4&15]+r[g>>x*8&15];return b}function u(g){var b;for(b=0;b<g.length;b+=1)g[b]=h(g[b]);return g.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function g(b,x){return b=b|0||0,b<0?Math.max(b+x,0):Math.min(b,x)}ArrayBuffer.prototype.slice=function(b,x){var w=this.byteLength,C=g(b,w),E=w,O,U,R,j;return x!==e&&(E=g(x,w)),C>E?new ArrayBuffer(0):(O=E-C,U=new ArrayBuffer(O),R=new Uint8Array(U),j=new Uint8Array(this,C,O),R.set(j),U)}}();function l(g){return/[\u0080-\uFFFF]/.test(g)&&(g=unescape(encodeURIComponent(g))),g}function d(g,b){var x=g.length,w=new ArrayBuffer(x),C=new Uint8Array(w),E;for(E=0;E<x;E+=1)C[E]=g.charCodeAt(E);return b?C:w}function f(g){return String.fromCharCode.apply(null,new Uint8Array(g))}function p(g,b,x){var w=new Uint8Array(g.byteLength+b.byteLength);return w.set(new Uint8Array(g)),w.set(new Uint8Array(b),g.byteLength),x?w:w.buffer}function m(g){var b=[],x=g.length,w;for(w=0;w<x-1;w+=2)b.push(parseInt(g.substr(w,2),16));return String.fromCharCode.apply(String,b)}function v(){this.reset()}return v.prototype.append=function(g){return this.appendBinary(l(g)),this},v.prototype.appendBinary=function(g){this._buff+=g,this._length+=g.length;var b=this._buff.length,x;for(x=64;x<=b;x+=64)s(this._hash,i(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(g){var b=this._buff,x=b.length,w,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E;for(w=0;w<x;w+=1)C[w>>2]|=b.charCodeAt(w)<<(w%4<<3);return this._finish(C,x),E=u(this._hash),g&&(E=m(E)),this.reset(),E},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(g){return this._buff=g.buff,this._length=g.length,this._hash=g.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(g,b){var x=b,w,C,E;if(g[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,g),x=0;x<16;x+=1)g[x]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),C=parseInt(w[2],16),E=parseInt(w[1],16)||0,g[14]=C,g[15]=E,s(this._hash,g)},v.hash=function(g,b){return v.hashBinary(l(g),b)},v.hashBinary=function(g,b){var x=a(g),w=u(x);return b?m(w):w},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(g){var b=p(this._buff.buffer,g,!0),x=b.length,w;for(this._length+=g.byteLength,w=64;w<=x;w+=64)s(this._hash,o(b.subarray(w-64,w)));return this._buff=w-64<x?new Uint8Array(b.buffer.slice(w-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(g){var b=this._buff,x=b.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C,E;for(C=0;C<x;C+=1)w[C>>2]|=b[C]<<(C%4<<3);return this._finish(w,x),E=u(this._hash),g&&(E=m(E)),this.reset(),E},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var g=v.prototype.getState.call(this);return g.buff=f(g.buff),g},v.ArrayBuffer.prototype.setState=function(g){return g.buff=d(g.buff,!0),v.prototype.setState.call(this,g)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(g,b){var x=c(new Uint8Array(g)),w=u(x);return b?m(w):w},v})})(Pl);var h1=Pl.exports;const u1=va(h1);function l1(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const xa=n=>new XMLSerializer().serializeToString(n),f1=(n,t="text/html")=>new DOMParser().parseFromString(n,t),Al=(n,t={mime:Ne["image/svg+xml"],encode:Ls.utf8})=>Ro(xa(n),t);async function _a(n=["*"],t){let e=[];const r=document.createElement("input");return r.setAttribute("type","file"),r.setAttribute("visibility","hidden"),r.setAttribute("accept",n.join(",")),t&&r.setAttribute("multiple","true"),r.addEventListener("click",s=>{r.value=""},!1),new Promise((s,i)=>{r.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?i(new Error("Cancel")):s(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&i(new Error("Cancel"))},1e3)},{once:!0}),r.click()}).then(s=>(r.remove(),s)).catch(s=>{throw r.remove(),s})}function Fr(n,t=ve.text,e){return new Promise((r,s)=>{const i=new FileReader;switch(i.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),i.addEventListener("load",o=>{r(o.target?.result)}),i.addEventListener("error",o=>{s(o)}),t){case ve.dataURL:i.readAsDataURL(n);break;case ve.binaryString:i.readAsBinaryString(n);break;case ve.arraybuffer:i.readAsArrayBuffer(n);break;case ve.text:default:i.readAsText(n)}})}async function d1(n){const t=await Fr(n,ve.arraybuffer);return Wp(t)}function Ml(n,t,e,r,s,i,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<r.size)Ml(n,t,e,r,s,o,Math.min(o+s,r.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(r.slice(i,o))}async function Dl(n,t=1048576){return await new Promise((e,r)=>Ml(e,r,new u1.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class m1{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new o1({baseURL:t.baseURL,interceptors:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await Dl(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postFormData(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{Mg(this.time,1),this.onTime?.(Tg(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function Ol(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,r=t.length;e<r;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function Il(n,t){return new Promise((e,r)=>{const{method:s="GET",data:i={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:u="json",timeout:l=3e4}=t||{},d=Ol();d.timeout=l,d.responseType=u,d.onreadystatechange=function(b){d.readyState===4&&(d.status===200?e(d.response):r(d.statusText))},d.ontimeout=()=>{r(`${n} is timed out for ${l}ms.`)},d.addEventListener("load",b=>t?.load?.(b,d),!1),d.addEventListener("loadstart",b=>t?.loadstart?.(b,d),!1),d.addEventListener("loadend",b=>t?.loadend?.(b,d),!1),d.addEventListener("progress",b=>{if(b.lengthComputable){const x=Math.round(b.loaded*100/b.total);t?.progress?.(b,d,x)}},!1),d.addEventListener("error",b=>t?.error?.(b,d),!1),d.addEventListener("abort",b=>t?.abort?.(b,d),!1);const f=s.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,v=!1;function g(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const b in c)jt(b).toLowerCase()=="content-type"&&c[b].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(jt(b).toLowerCase()=="content-type"&&(c[b].toLowerCase().indexOf("text/plain")>=0?m=!0:c[b].toLowerCase().indexOf("application/json")>=0&&(v=!0)),d.setRequestHeader(b,c[b]))}switch(f){case"GET":let b="";i instanceof FormData?b=T0(i):b=C0(i),d.open("GET",E0(n,b),!0),g(),d.send(null);break;default:d.open(f,n,!0),g(),p?d.sendAsBinary(o):v?d.send(JSON.stringify(i)):m?d.send(Object.entries(i).map(([x,w])=>`${x}=${w}`).join(`\r
19
+ `)):d.send(Object.entries(i).map(([x,w])=>`${encodeURIComponent(x)}=${encodeURIComponent(w)}`).join("&"));break}})}async function p1(n){const t={url:n.action||"",data:{},contentType:n.method.toLowerCase()==="post"&&n.enctype?n.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],r=t.contentType=="multipart/form-data";for(let s=0;s<n.elements.length;s++){const i=n.elements[s];if(!i.hasAttribute("name"))continue;const o=i.getAttribute("type");switch(i.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=i;if(r)for(let l=0,d=c.files?.length||0;l<d;l++){const f=c.files?.[l];if(f){const p=await Fr(f,ve.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
28
20
  Content-Type: `+f.type+`\r
29
21
  \r
30
22
  `+p+`\r
31
- `)}}break;case"RADIO":case"CHECKBOX":if(!r.checked)break;default:const l=r;n?e.push('Content-Disposition: form-data; name="'+l.name+`"\r
23
+ `)}}break;case"RADIO":case"CHECKBOX":if(!i.checked)break;default:const u=i;r?e.push('Content-Disposition: form-data; name="'+u.name+`"\r
32
24
  \r
33
- `+l.value+`\r
34
- `):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
25
+ `+u.value+`\r
26
+ `):t.data[u.name]=u.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
35
27
  `+e.join("--"+t.boundary+`\r
36
28
  `)+"--"+t.boundary+`--\r
37
- `,t}function vl(s){const t=[];for(let e=0,n=io.length;e<n;e++){const i=mt(io[e]+s);t.push(i)}return t}function ns(s,t,e){const n=$r(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[Da(t)]||n.props.style[mt(t)]||"":n.props.style}function vn(s,t,e){Hs(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{n.props.style[i]=t[i]})}),Gr()}function mo(s,t=!1){const e={};if(!t)if(getComputedStyle){const n=getComputedStyle(s);for(let i=0,r=n.length;i<r;i++){const o=n[i];e[o]=n.getPropertyValue(o)}}else{const n=s.style||s.currentStyle;for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return s.style.cssText&&s.style.cssText.split(";").filter(n=>!!n).forEach(n=>{const[i,r]=n.split(":").map(o=>o.trim());i&&r&&(e[i]=r)}),e}function c1(s,t){const e=vl(t),n=e.length;let i="";for(let r=0;r<n;r++){const o=e[r];if(i=s[o]||"",i)return i}return i}function l1(s,t,e){const n=vl(t),i=n.length;let r="";for(let o=0;o<i;o++){const a=n[o];if(r="style"in s&&s.style[a]||"currentStyle"in s&&s.currentStyle[a]||"",r)return r}if(getComputedStyle){const o=getComputedStyle(s,e);for(let a=0;a<i;a++){const h=n[a];if(r=o.getPropertyValue(h).trim(),r)return r}}return r}function ss(s,t,e){if(t)if(typeof t=="string"&&e)try{s.style.setProperty(t,e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":"")}catch{s.style[t]=e}else t instanceof Object&&Object.keys(t).forEach(n=>{ss(s,n,t[n])})}function po(s,t){typeof t=="string"?s.style.removeProperty(mt(t)):Object.keys(t).forEach(e=>{po(s,e)})}function Sl(s,t){let e;if(typeof t=="string"){const n=document.querySelector(t)?.shadowRoot;n?e=n:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const n=document.createElement("style");return n.innerHTML=s,e.appendChild(n),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(n)}}else{const n=document.styleSheets[0].insertRule(s);return()=>{document.styleSheets[0].deleteRule(n)}}}class u1{selector;name;value;constructor(t,e,n){this.selector=t,this.name=e,this.value=n}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class f1{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new u1(t,this.propertyName,e))}}async function _l(){const s=[],t=document.querySelectorAll("style, link");for(let e=0,n=t.length;e<n;e++){const i=t[e];let r=i.innerHTML;switch(i.nodeName.toLowerCase()){case"style":break;case"link":r=await xl(i.href,{method:"GET",responseType:"text"});break}r=r.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),s.push(r)}return s}async function d1(){const s={},t=await _l();for(let e=0,n=t.length;e<n;e++){const r=t[e].match(/[^{]*{[^}]*}/g);if(r)for(let o=0,a=r.length;o<a;o++){const h=r[o].split(/[{}]/g),c=h[0].trim(),u=h[1].split(";");for(let d=0;d<u.length;d++)if(u[d].trim()!=""){const f=u[d].split(":"),p=f[0].trim().toLowerCase(),g=f[1];s[p]||(s[p]=new f1(p)),g&&s[p].add(c,g.trim())}}}return s}function we(s,t,e){if(t===void 0&&e===void 0)return go(s);if(typeof t=="string"&&e===void 0)return Cl(s,t);typeof t=="object"?Hs(s,n=>{for(const i in t)i=="style"?vn(s,i,t[i]):Object.prototype.hasOwnProperty.call(t,i)&&(n.props[i]=""+t[i])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?vn(s,t,e):Hs(s,n=>{n.props[t]=""+e})),Gr()}function go(s){const t={};for(let e=0,n=s.attributes,i=n.length;e<i;e++){const r=n[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=mo(s,!0):t[r.nodeName]=r.nodeValue)}return t}function Cl(s,t){return t==="style"?mo(s,!0):s.getAttribute(mt(t))}function Je(s,t,e){return s.setAttribute(mt(t),""+e)}function m1(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=mt(e.trim());n!=""&&s.removeAttribute(n)})}function El(s,t){for(const e in t){const n=t[e];switch(e){case"fill":n!=="none"&&(s.fillStyle=n);break;case"stroke":n!=="none"&&(s.strokeStyle=n);break;case"stroke-width":case"strokeWidth":s.lineWidth=Number(n);break;case"stroke-linecap":case"strokeLinecap":s.lineCap=n;break;case"stroke-linejoin":case"strokeLinejoin":switch(n){case"round":case"bevel":case"miter":s.lineJoin=n;break;default:s.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":s.miterLimit=Number(n);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":s.lineDashOffset=Number(n);break;case"stroke-dasharray":case"strokeDasharray":typeof n=="string"&&s.setLineDash(n.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof n=="string"&&(s.font=n);break;case"font-size":case"fontSize":s.font+=` ${n}`;break;case"font-family":case"fontFamily":s.font+=` ${n}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(n){case"middle":s.textAlign="center";break;case"end":s.textAlign="end";break;case"start":s.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(n){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":s.textBaseline=n;break;default:s.textBaseline="alphabetic";break}break}}}function p1(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function g1(){return!!window.PointerEvent}function y1(s,t){let e=document.createElement(s);t="on"+t;let n=t in e;return n||(e.setAttribute(t,"return;"),n=typeof e[t]=="function"),e=null,n}function yo(){return{x:0,y:0,isDown:!1}}function Ze(){const s=yo(),t=yo();return{start:s,current:t,setStart:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,n)},setCurrent:(e,n)=>{t.x=e.x,t.y=e.y,t.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1}}}function ei(s=document.documentElement,t=!1){return X(s,"mousemove",t)}function Pl(s=document.documentElement,t=!1){return X(s,"mousedown",t)}function Tl(s=document.documentElement,t=!1){return X(s,"mouseup",t)}function w1(s=document.documentElement,t=!1){return X(s,"mouseover",t)}function b1(s=document.documentElement,t=!1){return X(s,"mouseout",t)}function x1(s=document.documentElement,t=!1){return X(s,"mouseenter",t)}function v1(s=document.documentElement,t=!1){return X(s,"mouseleave",t)}function S1(s=document.documentElement,t=!1){return X(s,"click",t)}function _1(s=document.documentElement,t=!1){return X(s,"dblclick",t)}function C1(s=document.documentElement,t=!1){return X(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function E1(s=document.documentElement,t=!1){return X(s,"contextmenu",t)}function Al(s=document.documentElement,t=!1){return X(s,"touchmove",t)}function Ml(s=document.documentElement,t=!1){return X(s,"touchstart",t)}function Il(s=document.documentElement,t=!1){return X(s,"touchend",t)}function kl(s=document.documentElement,t=!1){return X(s,"touchcancel",t)}function wo(s=document.documentElement,t=!1){return X(s,"pointermove",t)}function bo(s=document.documentElement,t=!1){return X(s,"pointerdown",t)}function xo(s=document.documentElement,t=!1){return X(s,"pointerup",t)}function vo(s=document.documentElement,t=!1){return X(s,"pointercancel",t)}function P1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function T1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function A1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function M1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function I1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function k1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function D1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function L1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function R1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function O1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function z1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function N1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function B1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("press",e)},e=>{t.off("press",e)})}function F1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function Y1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function X1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function U1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function $1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function G1(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function Dl(s=document.documentElement){const t=new nt(s);return et(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function V1(s=document.documentElement){const t=new nt(document.documentElement);return et(e=>{const n=i=>{!i.target||s==i.target||s.contains(i.target)||e(i)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function j1(s=document.documentElement,t=!1){return X(s,"transitionstart",t)}function q1(s=document.documentElement,t=!1){return Cc(X(s,"transitionend",t),X(s,"webkitTransitionEnd",t),X(s,"oTransitionEnd",t),X(s,"MSTransitionEnd",t))}function H1(s=document.documentElement,t=!1){return X(s,"animationstart",t)}function W1(s=document.documentElement,t=!1){return X(s,"animationend",t)}function Ll(s=document.documentElement,t=!1){return X(s,"drag",t)}function Rl(s=document.documentElement,t=!1){return X(s,"dragstart",t)}function Ol(s=document.documentElement,t=!1){return X(s,"dragend",t)}function zl(s=document.documentElement,t=!1){return X(s,"drop",t)}function Nl(s=document.documentElement,t=!1){return X(s,"dragenter",t)}function Bl(s=document.documentElement,t=!1){return X(s,"dragleave",t)}function Fl(s=document.documentElement,t=!1){return X(s,"dragover",t)}function Yl(s=document.documentElement,t=!1){return X(s,"keydown",t)}function Xl(s=document.documentElement,t=!1){return X(s,"keyup",t)}function J1(s=document.documentElement,t=!1){return X(s,"keypress",t)}function Z1(s=document.documentElement,t){const e=t?.useMousePoint||Ze();return ei(s).pipe(it(n=>(e.setCurrent(dt(n,s)),e)))}function Ul(s=document.documentElement,t){const e=t?.useMousePoint||Ze();return ei(s).pipe(Ag(Pl(s).pipe(qe(n=>{e.setStart(dt(n,s),!0),t?.start?.(n,e)})),()=>Tl(s).pipe(qe(n=>{e.setCurrent(dt(n,s),!1),t?.end?.(n,e)}))),Eg(),it(n=>(e.setCurrent(dt(n,s),!0),e)))}function $l(s=document.documentElement,t){const e=t?.useMousePoint||Ze();return Ml(s).pipe(qe(n=>{const i=n.changedTouches[0];e.setStart(dt(i,s),!0),t?.start?.(i,e)}),$s(()=>Al(s).pipe(Ir(Us(Il(s),kl(s)).pipe(qe(n=>{const i=n.changedTouches[0];e.setCurrent(dt(i,s),!1),t?.end?.(i,e)}))))),it(n=>{const i=n.changedTouches[0];return e.setCurrent(dt(i,s),!0),e}))}function ni(s=document.documentElement,t){const e=t?.useMousePoint||Ze();return bo(s).pipe(qe(n=>{e.setStart(dt(n,s),!0),t?.start?.(n,e)}),$s(()=>wo(s).pipe(Ir(Us(xo(s),vo(s)).pipe(qe(n=>{e.setCurrent(dt(n,s),!1),t?.end?.(n,e)}))))),it(n=>(e.setCurrent(dt(n,s),!0),e)))}function K1(s=document.documentElement,t){return Us(Ul(s,t),$l(s,t))}function Gl(s=document.documentElement,t){const e=t?.useMousePoint||Ze();return Cc(ei(s),bo(s)).pipe(Pc(n=>n instanceof PointerEvent?(e.setStart(dt(n,s),!0),t?.start?.(n,e),wo(s).pipe(Ir(Us(xo(s),vo(s)).pipe(qe(i=>{e.setCurrent(dt(i,s),!1),t?.end?.(i,e)}))))):n instanceof MouseEvent?Wp(n):ac),it(n=>(e.setCurrent(dt(n,s),n instanceof PointerEvent),e)))}function Q1(s){return new st(t=>ni(s,{start:()=>{t.next(0)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(Ae())}function tw(s,t){Je(s,"draggable","true");const e=Rl(s,!0).subscribe(r=>{Me(r),kr(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),n=Ll(s).subscribe(r=>{Me(r),t?.onDrag?.(r)}),i=Ol(s).subscribe(r=>{Me(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe()}}function ew(s,t){const e=Nl(s).subscribe(o=>{Me(o),t?.onEnter?.(o)}),n=Fl(s).subscribe(o=>{Me(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=Bl(s).subscribe(o=>{Me(o),t?.onLeave?.(o)}),r=zl(s).subscribe(o=>{Me(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function Vl(s=10){return X(window,"scroll",!0).pipe(Tg(s))}function nw(){return X(document,"visibilitychange",!0).pipe(it(()=>document.visibilityState==="visible"),Ae())}function sw(){return X(window,"storage",!1)}function iw(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function Sn(){const s=document.documentElement||document.body;return{el:s,clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function So(){const{clientWidth:s,clientHeight:t,scrollLeft:e,scrollTop:n}=Sn();return{width:window.innerWidth||s,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||n}}function rw(){const{scrollWidth:s,scrollHeight:t,scrollLeft:e,scrollTop:n}=Sn();return{width:s,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||n}}function _o(s){return s.getBoundingClientRect()}function ow(s){return{x:s.offsetLeft,y:s.offsetTop,width:s.offsetWidth,height:s.offsetHeight}}function Co(s){const{top:t,left:e,width:n,height:i}=s.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=Sn();return{x:e+r,y:t+o,width:n,height:i}}function aw(s){let t=s,e=0,n=0;for(;t!==null;)e+=t.offsetLeft,n+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:n,width:s.offsetWidth,height:s.offsetHeight}}function hw(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Sn(),n=e-s;return n<=0?0:t/n*100}function cw(s){const t=So(),e=_o(s);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function lw(s){if("center"in s){const t=s.center,e=_o(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function Eo(s){if("center"in s)return s.center;if(typeof s.pageX=="number"&&typeof s.pageY=="number")return{x:s.pageX,y:s.pageY};const{scrollLeft:t,scrollTop:e}=Sn();return{x:s.clientX+t,y:s.clientY+e}}function dt(s,t){const e={x:0,y:0};if(t){const n=Eo(s),i=Co(t);e.x=B(n.x-i.x,0,i.width),e.y=B(n.y-i.y,0,i.height)}else{let n=0,i=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const r=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-r.left,i=o.top-r.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+i;else{const r=Eo(s),o=Co(s.target);e.x=B(r.x-o.x+n,0,o.width),e.y=B(r.y-o.y+i,0,o.height)}}return e}function uw(s){let t=0;return s||(s=window.event),s.wheelDelta?(t=s.wheelDelta/120,window.opera&&(t=-t)):s.detail&&(t=-s.detail/3),t}function fw(s){if(document.implementation.hasFeature("MouseEvents","2.0"))return s.button;switch(s.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const dw={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32},mw={NULL:"",CANCEL:"",HELP:"",BACK_SPACE:"",TAB:"",CLEAR:"",RETURN:"",ENTER:"",SHIFT:"",CONTROL:"",ALT:"",PAUSE:"",ESCAPE:"",SPACE:"",PAGE_UP:"",PAGE_DOWN:"",END:"",HOME:"",ARROW_LEFT:"",LEFT:"",ARROW_UP:"",UP:"",ARROW_RIGHT:"",RIGHT:"",ARROW_DOWN:"",DOWN:"",INSERT:"",DELETE:"",SEMICOLON:"",EQUALS:"",NUMPAD0:"",NUMPAD1:"",NUMPAD2:"",NUMPAD3:"",NUMPAD4:"",NUMPAD5:"",NUMPAD6:"",NUMPAD7:"",NUMPAD8:"",NUMPAD9:"",MULTIPLY:"",ADD:"",SEPARATOR:"",SUBTRACT:"",DECIMAL:"",DIVIDE:"",F1:"",F2:"",F3:"",F4:"",F5:"",F6:"",F7:"",F8:"",F9:"",F10:"",F11:"",F12:"",COMMAND:"",META:"",ZENKAKU_HANKAKU:""};function pw(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function jl(s,t){const e=t.ctrl||!1,n=t.shift||!1,i=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&i===s.altKey&&t.keys.map(r=>r.toLowerCase()).includes(s.key.toLowerCase())}function ql(s){return Yl(s.target||document||window).pipe(Ec(t=>jl(t,s)),it(t=>{t.stopPropagation(),t.preventDefault()}))}function gw(s){return Xl(s.target||document||window).pipe(Ec(t=>jl(t,s)),it(t=>{t.stopPropagation(),t.preventDefault()}))}function Hl(s={keys:["o"]},t=Ut.text){return ql(s).pipe($s(async()=>await ll(t)))}async function yw(s={keys:["o"]},t=Ut.text){return Zp(Hl(s,t))}async function Wl(s,t){return new Promise(e=>{const n=new ResizeObserver(i=>{const r=s.getBoundingClientRect();t(r),e(()=>{n.unobserve(s)})});n.observe(s)})}function Po(s=document.documentElement,t){return new st(e=>{const n=s.getBoundingClientRect();let i=n.x,r=n.y,o=n.width,a=n.height;e.next(n);const h=new ResizeObserver(c=>{const l=s.getBoundingClientRect();(i!=l.x||r!=l.y||o!=l.width||a!=l.height)&&(i=l.x,r=l.y,o=l.width,a=l.height,e.next(l))});return h.observe(s,t),()=>{h.unobserve(s),h.disconnect()}})}function ww(){return X(window,"orientationchange"in window?"orientationchange":"resize").pipe(it(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),je({width:window.innerWidth,height:window.innerHeight}))}function bw(){const s={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:!1,this.setCurrentMousePoint(e,n)},setCurrentMousePoint:(e,n)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function xw(s=document.documentElement){const t=new Cs,e=new nt(s);let n=[];const i=bw(),r=i.mousePoint,o=I=>{t.emit("mouseDown",I)},a=I=>{t.emit("mouseUp",I)},h=I=>{r.isDown||i.setCurrentMousePoint(dt(I,s)),t.emit("mouseMove",I)},c=I=>{t.emit("mouseOver",I)},l=I=>{t.emit("mouseOut",I)},u=I=>{t.emit("mouseEnter",I)},d=I=>{t.emit("mouseLeave",I)},f=I=>{t.emit("mouseClick",I)},p=I=>{t.emit("mouseDoubleClick",I)},g=I=>{t.emit("mouseWheel",I)},C=I=>{t.emit("mouseContextMenu",I)},y=I=>{t.emit("touchStart",I)},v=I=>{t.emit("touchEnd",I)},b=I=>{t.emit("touchCancel",I)},x=I=>{const at=I.changedTouches[0];r.isDown||i.setCurrentMousePoint(dt(at,s)),t.emit("touchMove",I)},E=I=>{t.emit("pointerDown",I)},_=I=>{t.emit("pointerUp",I)},L=I=>{t.emit("pointerCancel",I)},N=I=>{t.emit("pointerMove",I)},Y=I=>{t.emit("pan",I)},G=I=>{t.emit("panStart",I)},V=I=>{t.emit("panMove",I)},J=I=>{t.emit("panEnd",I)},rt=I=>{t.emit("panCancel",I)},tt=I=>{t.emit("panLeft",I)},te=I=>{t.emit("panRight",I)},Xt=I=>{t.emit("panUp",I)},jt=I=>{t.emit("panDown",I)},ee=I=>{t.emit("pinch",I)},R=I=>{t.emit("pinchin",I)},D=I=>{t.emit("pinchout",I)},$=I=>{t.emit("press",I)},Z=I=>{t.emit("rotate",I)},Mt=I=>{t.emit("swipe",I)},ne=I=>{t.emit("swipeLeft",I)},mi=I=>{t.emit("swipeRight",I)},pi=I=>{t.emit("swipeUp",I)},wt=I=>{t.emit("swipeDown",I)},he=I=>{t.emit("tap",I)},ot=I=>{!I.target||s==I.target||s.contains(I.target)||t.emit("tapOutSide",I)},Ct=I=>{t.emit("transitionstart",I)},Pn=I=>{t.emit("transitionend",I)},rn=I=>{t.emit("animationstart",I)},on=I=>{t.emit("animationend",I)};let Fe={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return Fe},mousePoint:r,eb:t,start:async function(){n.push(W(s,"mousedown",o)),n.push(W(s,"mouseup",a)),n.push(W(s,"mousemove",h)),n.push(W(s,"mouseover",c)),n.push(W(s,"mouseout",l)),n.push(W(s,"mouseenter",u)),n.push(W(s,"mouseleave",d)),n.push(W(s,"click",f)),n.push(W(s,"dblclick",p)),n.push(W(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",g)),n.push(W(s,"contextmenu",C)),n.push(W(s,"touchstart",y)),n.push(W(s,"touchend",v)),n.push(W(s,"touchcancel",b)),n.push(W(s,"touchmove",x)),n.push(W(s,"pointerdown",E)),n.push(W(s,"pointerup",_)),n.push(W(s,"pointercancel",L)),n.push(W(s,"pointermove",N)),e.on("pan",Y),e.on("panstart",G),e.on("panmove",V),e.on("panend",J),e.on("pancancel",rt),e.on("panleft",tt),e.on("panright",te),e.on("panup",Xt),e.on("pandown",jt),e.on("pinch",ee),e.on("pinchin",R),e.on("pinchout",D),e.on("press",$),e.on("rotate",Z),e.on("swipe",Mt),e.on("swipeleft",ne),e.on("swiperight",mi),e.on("swipeup",pi),e.on("swipedown",wt),e.on("tap",he),n.push(W(document,"pointerdown",ot)),n.push(W(s,"transitionstart",Ct)),n.push(W(s,"transitionend",Pn)),n.push(W(s,"animationstart",rn)),n.push(W(s,"animationend",on));const I=await Wl(s,at=>{Fe=at,t.emit("resize",at)});n.push(I),n.push(Jl(this,{start:at=>{i.setStartMousePoint(dt(at,s),!0)},move:at=>{i.setCurrentMousePoint(dt(at,s))},end:at=>{i.setCurrentMousePoint(dt(at,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(I=>I()),n=[],e.off("pan",Y),e.off("panstart",G),e.off("panmove",V),e.off("panend",J),e.off("pancancel",rt),e.off("panleft",tt),e.off("panright",te),e.off("panup",Xt),e.off("pandown",jt),e.off("pinch",ee),e.off("pinchin",R),e.off("pinchout",D),e.off("press",$),e.off("rotate",Z),e.off("swipe",Mt),e.off("swipeleft",ne),e.off("swiperight",mi),e.off("swipeup",pi),e.off("swipedown",wt),e.off("tap",he)}}}function Jl(s,t){return Zl(s,t)}function Zl(s,t){const e=s.eb,n=o=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(o)},i=o=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function vw(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(o)},i=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function Sw(s,t){const e=s.eb,n=o=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const a=o.changedTouches[0];t?.start?.(a)},i=o=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}let To=class{x;y;toX;toY;constructor(t){this.x=F(t?.x||0,2),this.y=F(t?.y||0,2),this.toX=F(t?.toX||0,2),this.toY=F(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=Nt(this.x,this.y,this.toX,this.toY);if(e===0){const n=Math.min(this.x,this.toX),i=Math.min(this.y,this.toY),r=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:n,y:i,width:r-n,height:o-i}}else{const n=Math.sin(e),i=Math.cos(e),r=i*this.x-n*this.y,o=i*this.toX-n*this.toY,a=i*this.y+n*this.x,h=i*this.toY+n*this.toX;return{x:F(Math.min(r,o),t),y:F(Math.min(a,h),t),width:F(Math.max(r,o)-Math.min(r,o),t),height:F(Math.max(a,h)-Math.min(a,h),t)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const l=(-c*i+r+h*e-n)/(h-c),u=h*(l-e)+n;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};class Ao extends To{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=F(t.rx,2),this.ry=F(t.ry,2),this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const l=a/180*Math.PI,u=(t-n)/2,d=(e-i)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,g=f*f/(r*r)+p*p/(o*o);if(g>1){const V=Math.sqrt(g);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const C=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),y=h!=c?1:-1,v=y*C*r*p/o,b=y*C*-o*f/r,x=(t+n)/2,E=(e+i)/2,_=Math.cos(l)*v-Math.sin(l)*b+x,L=Math.sin(l)*v+Math.cos(l)*b+E,N=(V,J,rt,tt)=>(V*tt>=J*rt?1:-1)*Math.acos((V*rt+J*tt)/(Math.sqrt(V*V+J*J)*Math.sqrt(rt*rt+tt*tt))),Y=N(1,0,t-_,e-L)-l,G=N(t-_,e-L,n-_,i-L);return[_,L,r,o,l,Y,Y+G]}}class _w extends To{cx;cy;isLineThrough;constructor(t){super(t),this.cx=F(t.cx,2),this.cy=F(t.cy,2),this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],n=[this.y,this.toY];let i,r,o,a;for(let l=0;l<2;++l)i=l==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,r=l==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=l==0?this.x:this.y,Math.abs(i)>1e-12&&(a=-r/(2*i),0<a&&a<1&&[e,n][l].push(i*a*a+r*a+o));const h={x:Math.min(0,...e),y:Math.min(0,...n)},c={x:Math.max(0,...e),y:Math.max(0,...n)};return{x:F(h.x,t),y:F(h.y,t),width:F(c.x-h.x,t),height:F(c.y-h.y,t)}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const Cw=_w;class vt extends To{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=F(t.c1x,2),this.c1y=F(t.c1y,2),this.c2x=F(t.c2x,2),this.c2y=F(t.c2y,2)}clone(){return new vt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),n=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),i=this.x-this.c1x,r=(-n+Math.sqrt(n*n-4*e*i))/2/e,o=(-n-Math.sqrt(n*n-4*e*i))/2/e;const a=[this.y,this.toY],h=[this.x,this.toX];let c;const l=[];Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(c=this.interpolate(r),h.push(c.x),a.push(c.y),l.push({X:c.x,Y:c.y})),o>=0&&o<=1&&(c=this.interpolate(o),h.push(c.x),a.push(c.y),l.push({X:c.x,Y:c.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),n=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),i=this.y-this.c1y,r=(-n+Math.sqrt(n*n-4*e*i))/2/e,o=(-n-Math.sqrt(n*n-4*e*i))/2/e,Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(c=this.interpolate(r),h.push(c.x),a.push(c.y),l.push({X:c.x,Y:c.y})),o>=0&&o<=1&&(c=this.interpolate(o),h.push(c.x),a.push(c.y),l.push({X:c.x,Y:c.y}));const u=[],d=l.length;for(let g=0;g<d;g++){for(let C=g+1;C<d;C++)l[g].X===l[C].X&&l[g].Y===l[C].Y&&(C=++g);u.push({X:l[g].X,Y:l[g].Y})}const f={x:Math.min(...h),y:Math.min(...a)},p={x:Math.max(...h),y:Math.max(...a)};return{x:F(f.x,t),y:F(f.y,t),width:F(p.x-f.x,t),height:F(p.y-f.y,t),dots:u}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const l=c/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const g=l*u[p]+l,C=vt.base3(g,t,n,r,a),y=vt.base3(g,e,i,o,h);f+=d[p]*Math.sqrt(C*C+y*y)}return l*f}length(t=1){return vt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,g=n*this.y+e*this.c1y,C=n*this.c2x+e*this.toX,y=n*this.c2y+e*this.toY,v=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:h,y:c,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:g},end:{x:C,y},alpha:v}}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||vt.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const l=1;let u=l/2,d=l-u,f=vt.bezlen(e,n,i,r,o,a,h,c,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=vt.bezlen(e,n,i,r,o,a,h,c,d);return d}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}}const is=Math.PI*2;function Kl(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Ew(s,t,e,n,i,r,o,a,h,c){const l=c*(s-e)/2+h*(t-n)/2,u=-h*(s-e)/2+c*(t-n)/2,d=o*o,f=a*a,p=l*l,g=u*u;let C=d*f-d*g-f*p;C<0&&(C=0),C/=d*g+f*p,C=Math.sqrt(C)*(i===r?-1:1);const y=C*o/a*u,v=C*-a/o*l,b=c*y-h*v+(s+e)/2,x=h*y+c*v+(t+n)/2,E=(l-y)/o,_=(u-v)/a,L=(-l-y)/o,N=(-u-v)/a,Y=Kl(1,0,E,_);let G=Kl(E,_,L,N);return r===0&&G>0&&(G-=is),r===1&&G<0&&(G+=is),[b,x,Y,G]}function Pw(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function Ql(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*is/360),l=Math.cos(h*is/360),u=l*(s-e)/2+c*(t-n)/2,d=-c*(s-e)/2+l*(t-n)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=u*u/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=Ew(s,t,e,n,i,r,o,a,c,l),g=[];let C=p[2],y=p[3];const v=Math.max(Math.ceil(Math.abs(y)/(is/4)),1);y/=v;for(let b=0;b<v;b++)g.push(Pw(C,y)),C+=y;return g.map(b=>{for(let x=0;x<b.length;x+=2){let E=b[x+0],_=b[x+1];E*=o,_*=a;const L=l*E-c*_,N=c*E+l*_;b[x+0]=L+p[0],b[x+1]=N+p[1]}return b})}function Mo(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function rs(s,t,e,n){return[s,t,e,n,e,n]}const si={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Ke(s="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",s)}function tu(){return Ke("path")}const Tw=s=>s instanceof SVGElement&&s.tagName==="path";function Aw(s,t="shape"){return ti(fr(s),`${t}.svg`)}function eu(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function Mw(s){return s.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function nu(s){const t=[];return eu(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,i)=>{let r=n.toLowerCase();const o=Di(i);for(r=="m"&&o.length>si[r]&&(t.push([n,...o.splice(0,si[r])]),r="l",n=n=="m"?"l":"L");o.length;){if(o.length<si[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,si[r])])}return r=="z"&&t.push([n]),""}),t}function su(s){let t=0,e=0,n=0,i=0;return s.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=n,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=n;break;default:for(let h=1;h<r.length;)r[h++]+=n,r[h++]+=i}switch(a){case"Z":n=t,i=e;break;case"H":n=r[1];break;case"V":i=r[1];break;case"M":n=t=r[1],i=e=r[2];break;default:n=r[r.length-2],i=r[r.length-1]}return r})}function Iw(s){const t=[];let e=0,n=0,i=0,r=0,o=0,a=0,h=0,c=0,l;for(let u=0,d=s.length;u<d;u++){let f=s[u];const p=f[0];switch(p){case"M":e=f[1],n=f[2];break;case"A":const g=Ql(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!g.length)continue;g.forEach((v,b)=>{const[x,E,_,L,N,Y,G,V]=v;f=["C",_,L,N,Y,G,V],b<g.length-1&&t.push(f)});break;case"S":let C=i,y=r;(l=="C"||l=="S")&&(C+=C-h,y+=y-c),f=["C",C,y,f[1],f[2],f[3],f[4]];break;case"T":l=="Q"||l=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),f=["C",...Mo(i,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...Mo(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...rs(i,r,f[1],f[2])];break;case"H":f=["C",...rs(i,r,f[1],r)];break;case"V":f=["C",...rs(i,r,i,f[1])];break;case"Z":f=["C",...rs(i,r,e,n)];break}l=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(h=f[f.length-4],c=f[f.length-3]):(h=i,c=r),t.push(f)}return t}class os{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),n=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",n.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{os.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class Io extends Cs{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=of(this.source);if(t===0){this.emit("finish");return}let e,n,i=ka(this.source,0);for(let r=1;r<t;r++)e=n,n=i,i=ka(this.source,r),this.raw+=n,n&&this.step(n,i,e);i&&this.step(i,void 0,n),this.emit("finish")}step(t,e,n){t==`
38
- `&&this.emit("newline"),this.act(t,e,n)}act(t,e,n){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":ue("whitespace",t)?(this.textchunk+=iu(this.entity),this.mode="text"):t==";"?(this.textchunk+=iu(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(n=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(n=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,n)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&n=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!ue("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,n)}break;case"close tag name start":ue("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,n));break;case"close tag name":if(ue("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(ue("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":ue("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,n));break;case"attr":if(ue("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!ue("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,n)}break;case"attr value":if(ue("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&n!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function iu(s){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return s.charAt(0)=="#"?s.charAt(1).toLowerCase()=="x"?e=parseInt(s.substring(2),16):e=parseInt(s.substring(1),10):e=t[s],e?String.fromCharCode(e):"&"+s}var ru=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function ko(s,t={}){var e=1,n=1;function i(R){var D=R.match(/\n/g);D&&(e+=D.length);var $=R.lastIndexOf(`
39
- `);n=~$?R.length-$:n+R.length}function r(){var R={line:e,column:n};return function(D){return D.position=new o(R),p(),D}}function o(R){this.start=R,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function h(R){var D=new Error(t.source+":"+e+":"+n+": "+R);if(D.reason=R,D.filename=t.source,D.line=e,D.column=n,D.source=s,t.silent)a.push(D);else throw D}function c(){var R=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:R,parsingErrors:a}}}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var R,D=[];for(p(),g(D);s.length&&s.charAt(0)!="}"&&(R=jt()||ee());)R!==!1&&(D.push(R),g(D));return D}function f(R){var D=R.exec(s);if(D){var $=D[0];return i($),s=s.slice($.length),D}}function p(){f(/^\s*/)}function g(R){var D;for(R=R||[];D=C();)D!==!1&&R.push(D);return R}function C(){var R=r();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var D=2;s.charAt(D)!=""&&(s.charAt(D)!="*"||s.charAt(D+1)!="/");)++D;if(D+=2,s.charAt(D-1)==="")return h("End of comment missing");var $=s.slice(2,D-2);return n+=2,i($),s=s.slice(D),n+=2,R({type:"comment",comment:$})}}function y(){var R=f(/^([^{]+)/);if(R)return be(R[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(D){return D.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(D){return D.replace(/\u200C/g,",")})}function v(){var R=r(),D=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(D){if(D=be(D[0]),!f(/^:\s*/))return h("property missing ':'");var $=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),Z=R({type:"declaration",property:D.replace(ru,""),value:$?be($[0]).replace(ru,""):""});return f(/^[;\s]*/),Z}}function b(){var R=[];if(!l())return h("missing '{'");g(R);for(var D;D=v();)D!==!1&&(R.push(D),g(R));return u()?R:h("missing '}'")}function x(){for(var R,D=[],$=r();R=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)D.push(R[1]),f(/^,\s*/);if(D.length)return $({type:"keyframe",values:D,declarations:b()})}function E(){var R=r(),D=f(/^@([-\w]+)?keyframes\s*/);if(D){var $=D[1];if(D=f(/^([-\w]+)\s*/),!D)return h("@keyframes missing name");var Z=D[1];if(!l())return h("@keyframes missing '{'");for(var Mt,ne=g();Mt=x();)ne.push(Mt),ne=ne.concat(g());return u()?R({type:"keyframes",name:Z,vendor:$,keyframes:ne}):h("@keyframes missing '}'")}}function _(){var R=r(),D=f(/^@supports *([^{]+)/);if(D){var $=be(D[1]);if(!l())return h("@supports missing '{'");var Z=g().concat(d());return u()?R({type:"supports",supports:$,rules:Z}):h("@supports missing '}'")}}function L(){var R=r(),D=f(/^@host\s*/);if(D){if(!l())return h("@host missing '{'");var $=g().concat(d());return u()?R({type:"host",rules:$}):h("@host missing '}'")}}function N(){var R=r(),D=f(/^@media *([^{]+)/);if(D){var $=be(D[1]);if(!l())return h("@media missing '{'");var Z=g().concat(d());return u()?R({type:"media",media:$,rules:Z}):h("@media missing '}'")}}function Y(){var R=r(),D=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(D)return R({type:"custom-media",name:be(D[1]),media:be(D[2])})}function G(){var R=r(),D=f(/^@page */);if(D){var $=y()||[];if(!l())return h("@page missing '{'");for(var Z=g(),Mt;Mt=v();)Z.push(Mt),Z=Z.concat(g());return u()?R({type:"page",selectors:$,declarations:Z}):h("@page missing '}'")}}function V(){var R=r(),D=f(/^@([-\w]+)?document *([^{]+)/);if(D){var $=be(D[1]),Z=be(D[2]);if(!l())return h("@document missing '{'");var Mt=g().concat(d());return u()?R({type:"document",document:Z,vendor:$,rules:Mt}):h("@document missing '}'")}}function J(){var R=r(),D=f(/^@font-face\s*/);if(D){if(!l())return h("@font-face missing '{'");for(var $=g(),Z;Z=v();)$.push(Z),$=$.concat(g());return u()?R({type:"font-face",declarations:$}):h("@font-face missing '}'")}}var rt=Xt("import"),tt=Xt("charset"),te=Xt("namespace");function Xt(R){var D=new RegExp("^@"+R+"\\s*([^;]+);");return function(){var $=r(),Z=f(D);if(Z){var Mt={type:R};return Mt[R]=Z[1].trim(),$(Mt)}}}function jt(){if(s[0]=="@")return E()||N()||Y()||_()||rt()||tt()||te()||V()||G()||L()||J()}function ee(){var R=r(),D=y();return D?(g(),R({type:"rule",selectors:D,declarations:b()})):h("selector missing")}return Do(c())}function be(s){return s?s.replace(/^\s+|\s+$/g,""):""}function Do(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var i in s){var r=s[i];Array.isArray(r)?r.forEach(function(o){Do(o,n)}):r&&typeof r=="object"&&Do(r,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let kw=class extends Io{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=ko(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),Ro(this.currentItem.style,this.currentItem,Oo)}switch(this.processAttrs(e,n),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&Ro(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+Lo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(Oo.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&Ro(o,this.currentItem,Oo),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}};function Lo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Lo(s,t,i,r)-Lo(e,n,i,r)}function Ro(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const Oo=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class Tt{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?nu(t):t||[],n=Iw(su(e));for(let i=0,r=n.length;i<r;i++){const o=n[i];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new vt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof Ao){Ql(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[l,u,d,f,p,g,C,y]=c;this.normalizedLines.push(new vt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:g,toX:C,toY:y})),this.prevPathX=C,this.prevPathY=y});return}if(t instanceof vt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,i,r,o,a;t instanceof Cw?[e,n,i,r,o,a]=Mo(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=rs(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new vt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new Tt,n=t.length;if(n){e.prevPathX=t[0],e.prevPathY=t[1];for(let i=2;i+5<n;i+=6)e._appendLine(new vt({x:e.prevPathX,y:e.prevPathY,c1x:t[i],c1y:t[i+1],c2x:t[i+2],c2y:t[i+3],toX:t[i+4],toY:t[i+5]}))}return e}static fromLines(t){const e=new Tt,n=t.length;if(n){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let i=0;i<n;i++)e._appendLine(t[i])}return e}clone(){return Tt.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,n=this.normalizedLines.length;e<n;e++){const i=this.normalizedLines[e];e==0&&t.push(["M",i.x,i.y]),t.push(...i.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=Mw(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,n=this.normalizedLines.length;e<n;e++){const i=this.normalizedLines[e];e==0&&t.moveTo(i.x,i.y),i.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],n=[];if(this.normalizedLines.forEach(i=>{const r=i.getBoundingClientRect(t);e.push(r.x,r.x+r.width),n.push(r.y,r.y+r.height)}),e.length==0||n.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);this.cachedBoundingClientRect={x:F(i,t),y:F(r,t),width:F(o-i,t),height:F(a-r,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:F(e.x+e.width*.5,t),y:F(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new xt,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():Tt.fromLines(this.normalizedLines.map(n=>{let i=n.x,r=n.y,o=n.c1x,a=n.c1y,h=n.c2x,c=n.c2y,l=n.toX,u=n.toY;return{x:i,y:r}=e.transformPoint({x:i,y:r}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:h,y:c}=e.transformPoint({x:h,y:c}),{x:l,y:u}=e.transformPoint({x:l,y:u}),new vt({x:i,y:r,c1x:o,c1y:a,c2x:h,c2y:c,toX:l,toY:u})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,n=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[i-1].getPointAtSegmentLength(n)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let n=t*e,i=this.normalizedLines[0];if(n--,n>1)for(let r=1;r<e&&(i=this.normalizedLines[r],n>1);r++)n-=1;return i.interpolate(n)}}getSubPathD(t,e,n=1e-6){const i=this.getSubPathDAtLength(e,!0);return Ii(n)(t,0)?i:i.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const n=new Tt;let i=0,r=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const h=this.normalizedLines[o];o==0&&(n.prevPathX=h.x,n.prevPathY=h.y);const c=h.length();if(i+c>t&&!r){r=!0;const l=h.getPointAtSegmentLength(t-i);if(n._appendLine(new vt({x:n.prevPathX,y:n.prevPathY,c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),e)return n;n.normalizedLines=[],n._appendLine(new vt({x:n.prevPathX,y:n.prevPathY,c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:h.toX,toY:h.toY})),i+=c;continue}n._appendLine(h),i+=c}return n}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const l=this.getPointAtLength(c),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y);u<o&&(i=l,r=c,o=u)}for(a/=2;a>.5;){const c=r-a,l=this.getPointAtLength(c),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y),d=r+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);c>=0&&u<o?(i=l,r=c,o=u):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Nt(h.x,h.y,i.x,i.y):Nt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,n)=>e.concat([n.c1x,n.c1y,n.c2x,n.c2y,n.toX,n.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),n=e.length;if(n){let i=e[n-2],r=e[n-1];for(let o=0;o<n;o+=6)t+=Le(e[o],e[o+1],i,r),i=e[o],r=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,n=this.getPolymorphPoints(),i=n.length;if(i){const r=[];let o=e-i;const a=Math.ceil(e/i);r.push(["M",n[0],n[1]]);let h=2;for(;h+5<=i-1;){const c=n[h++],l=n[h++],u=n[h++],d=n[h++],f=n[h++],p=n[h++];r.push(["C",c,l,u,d,f,p]);let g=0;for(;g<a&&o>0;)r.push(["C",f,p,f,p,f,p]),o-=6,g++}return new Tt(r)}else return Tt.fromPolymorphPoints(t)}static getInterpolator(t,e){return n=>{const i=Ii(Number.EPSILON);return i(n,0)?t.clone():i(n,1)?e.clone():Tt.fromPolymorphPoints(yf(t.getPolymorphPoints(),e.getPolymorphPoints(),n).map(r=>F(r,2)))}}}const ou=Dw("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Dw(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function At(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function ii(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function Lw(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function Rw(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const as={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class zo{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",At("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class au{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class ri{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=n||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(as);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=as[i].canvas}}__getStyleState(){const t={},e=Object.keys(as);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(as);for(let r=0;r<i.length;r++){const o=as[i[r]],a=this[i[r]];if(o.apply){if(a instanceof au){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,At("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof zo)e.setAttribute(o.apply,At("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,At("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let l=parseFloat(c[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(ou);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=ou[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(At("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(At("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(At("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(At("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(At("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(At("L {x} {y}",this.__currentPosition)):this.__addPathCommand(At("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(At("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(At("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const l=h[0]*c[0]+h[1]*c[1],u=Math.acos(Math.abs(l)),d=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(u/2),p=t+f*d[0],g=e+f*d[1],C=[-h[1],h[0]],y=[c[1],-c[0]],v=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},b=v(C),x=v(y);this.lineTo(p+C[0]*r,g+C[1]*r),this.arc(p,g,r,b,x)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:ii(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new zo(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:ii(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new zo(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":Lw(this.textAlign),"dominant-baseline":Rw(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),l=e+n*Math.sin(i),u=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(At("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=ii(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",At("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,l,u,d,f,p,g,C;if(t.length===3)n=t[1],i=t[2],c=e.width,l=e.height,r=c,o=l;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,l=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],l=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const v="translate("+n+", "+i+")";if(e instanceof ri){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)C=d.childNodes[0].getAttribute("id"),this.__ids[C]=C,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const b=f.getAttribute("transform");let x;b?x=b+" "+v:x=v,f.setAttribute("transform",x),y.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||l!==e.height)&&(g=this.__document.createElement("canvas"),g.width=r,g.height=o,g.getContext("2d")?.drawImage(e,a,h,c,l,0,0,r,o),e=g),p.setAttribute("transform",v),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=ii(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof ri&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new au(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class No{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1,r=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new ri({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height})),this.enablePath2D=typeof r=="boolean"?r:!1}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D),this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.currentPath2D=this.path2Ds.pop()||new Path2D),this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.enablePath2D&&this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.enablePath2D&&this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.enablePath2D&&this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,l])=>{h.addColorStop(parseFloat(c),l)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],l=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,l)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}class Q{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new Te;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Mn(4),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const n=this._x,i=this._y;(n!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-n,dY:e-i}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x!==t&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const n=this._scaleX,i=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/n,dScaleY:this._scaleY/i}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof Tt?this.initD:new Tt(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new Tt(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let n=0,i=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);n=o.x,i=o.y}const r=new xt;r.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),r.rotate(this.degree,t,e),r.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&r.rotate(this.parent.dDegree,n,i),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&r.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,n,i),this.m=r}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new Q(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let n=0,i=0;if(this.parent&&!t){const r=this.parent.combo.getBoundingClientRectCenter(e);n=r.x-this.parent.dX,i=r.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const r=this.getBoundingClientRectCenter(e);n=r.x,i=r.y}else n=this.initCenterX||0,i=this.initCenterY||0;return{x:n,y:i}}isPointInPath(t,e,n){if(t instanceof No)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInFill({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof No)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const n in t){const i=t[n];i&&i!=this.getAttr(n)&&(this.attrs[mt(n)]=i,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[mt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[mt(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const n=t?.friction||1;this.vx*=n,this.vy*=n,this.move(this.vx,this.vy)}animateEaseTo(t,e){const n=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*n,this.vy=r*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const n=e?.springLength||100,i=e?.spring||5e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}followTo(t,e=3){this.rotateTo(yt(Nt(this.x,this.y,t.x,t.y)));const{dx:n,dy:i}=Re(j(this.degree),e);this.vx=n,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(yt(Nt(this.x,this.y,t.x,t.y)));const{dx:n,dy:i}=Re(j(this.degree),e);this.ax=n,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}checkCollision(t){const e=t.x-this.x,n=t.y-this.y,i=Math.sqrt(e*e+n*n),{x:r,y:o,width:a,height:h}=t.getBoundingClientRect(),{x:c,y:l}=t.getBoundingClientRectCenter(),{x:u,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:g,y:C}=this.getBoundingClientRectCenter();if(i<Math.abs(c-r)+Math.abs(g-u)||i<Math.abs(l-o)+Math.abs(C-d)){const y=Math.atan2(n,e),v={x:0,y:0},b=Qt(-y,e,n),x=Qt(-y,this.vx,this.vy),E=Qt(-y,t.vx,t.vy),_=x.x-E.x;x.x=((this.mass-t.mass)*x.x+2*t.mass*E.x)/(this.mass+t.mass),E.x=_+x.x;const L=Math.abs(x.x)+Math.abs(E.x),N=this.ballRadius+t.ballRadius-Math.abs(v.x-b.x);v.x+=x.x/L*N,b.x+=E.x/L*N;const Y=Qt(y,v.x,v.y),G=Qt(y,b.x,b.y);t.moveTo(this.x+G.x,this.y+G.y),this.moveTo(this.x+Y.x,this.y+Y.y);const V=Qt(y,x.x,x.y),J=Qt(y,E.x,E.y);this.vx=V.x,this.vy=V.y,t.vx=J.x,t.vy=J.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,n=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:h,width:c,height:l}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>r?this.moveXTo(n-(a+c)):this.x+a+c<n&&this.moveXTo(r-a),this.y+h>o?this.moveYTo(i-(h+l)):this.y+h+l<i&&this.moveYTo(o-h)):(this.x+a+c>r?(this.moveXTo(r-(a+c)),this.vx*=e):this.x+a<n&&(this.moveXTo(n+(a+c)),this.vx*=e),this.y+h+l>o?(this.moveYTo(o-(h+l)),this.vy*=e):this.y+h<i&&(this.moveYTo(i+(h+l)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const n=this.getTotalLength(),i=t*n,r=e*n;return{subPathD:this.transformPathD().getSubPathD(i,r),point:this.getPointAtLength(r)}}strokeDashTween(t=1e3,e){const n=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const i=e?.onUpdate,r=new Gn({frameDuration:t});r.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+F(o.offset,2)),i?.(o,a)}})),r.play()}static generateRosetta(t,e,n,i,r){if(r==0)throw new Error("no dividing by zero, please");const o=[],a=360/r;for(let h=0;h<r;h+=1){const c=a*h*Math.PI/180,l=t+2*n*Math.cos(c),u=e+2*n*Math.sin(c);o.push(new Ao({x:t,y:e,rx:n,ry:i,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),o.push(new Ao({x:l,y:u,rx:n,ry:i,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Q({initD:Tt.fromLines(o)})}}class Rt{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this.x=t?.x||0,this.y=t?.y||0,this.degree=t?.degree||0,this.scaleX=1,this.scaleY=1,t?.scale!==void 0&&(this.scaleX=t.scale,this.scaleY=t.scale),t?.scaleX!==void 0&&(this.scaleX=t.scaleX),t?.scaleY!==void 0&&(this.scaleY=t.scaleY),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,n=0,i=0,r=0;const o=new kw(t.svg).parse();for(let a=0,h=o.length;a<h;a++){const c=o[a];if(c.type=="viewbox"&&c.width&&c.height){if(e=parseFloat(c.width),n=parseFloat(c.height),t.forceWidth){const p=e/n;i=t.forceWidth,r=i/p}else i=e,r=n;continue}if(c.type!="path"||!eu(c.path))continue;const l={};for(const p in c)p==="type"||p==="path"||p==="transform"||(l[p]=c[p]);const u=su(nu(c.path)),d=[];let f=[];for(let p=0,g=u.length;p<g;p++){const C=u[p];f.push(C),C[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const g=new Q({attrs:l,initD:p});if(c.transform){const y=il(c.transform).split();g.moveTo(y.x,y.y),g.rotateTo(y.degree),g.scaleTo(y.scaleX,y.scaleY)}this.addShape(g)})}i&&e&&r&&n&&this.comboScale(i/e,r/n,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const n=e.clone();return e.parent&&(n.parent={...e.parent,combo:t}),n}),t}cloneShapeCombo(){return new Rt(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,n=!1){n||(this.x+=t,this.y+=e),this.shapes.forEach(i=>{i.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(n=>{n.rotate(t)})}comboScale(t,e,n=!1){n||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(i=>{i.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],n=[];if(this.shapes.forEach(h=>{const c=h.getBoundingClientRect(t);e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:F(i,t),y:F(r,t),width:F(o-i,t),height:F(a-r,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:F(e.x+e.width*.5,t),y:F(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const n in t){const i=t[n];i&&i!=this.getAttr(n)&&(this.attrs[mt(n)]=i)}this.shapes.forEach(n=>{n.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[mt(t)]=e,this.shapes.forEach(n=>{n.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[mt(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,n=this.shapes.length;if(e<n)return t.expendTo(this);for(let i=n;i<e;i++){const r=t.shapes[i];this.addShape(new Q({initD:r.pathD().clone()}),{dX:r.x-this.x,dY:r.y-this.y,dDegree:r.degree-this.degree,dScaleX:r.scaleX/this.scaleX,dScaleY:r.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const n=new Gn({frameDuration:t}),i={},r={};this.shapes.forEach((o,a)=>{const h=o.pathD().getTotalLength();i[`offset_${a}`]=h,r[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${h} ${h}`,strokeDashoffset:`${h}`})}),n.addTween(i,r,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const h in o){const c=ki(h).number;this.shapes[c].setAttr("strokeDashoffset",""+F(o[h],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),n.play();break}}}function Ow(s,t,e=5){const n=Ii(e);(!n(s.x,t.current.x)||!n(s.y,t.current.y))&&s.followTo(t.current)}function zw(s,t,e){s.drag&&s.drag.enable&&!s.isDragging&&s.animateEaseTo(t,e)}function Nw(s,t){const e=[],n=s.length;for(let i=0;i<n;i++){const r=s[i];if(t?.springLength){const o=t?.springLength||100;r.isDragging||s.filter(a=>a.id!==r.id).forEach(a=>{const h=Nt(r.x,r.y,a.x,a.y);r.animateSpringTo({x:a.x-Math.cos(h)*o,y:a.y-Math.sin(h)*o},t)})}else t?.spring?i>0&&r.animateSpringTo(s[i-1],t):r.animate(t);if(t?.wall&&r.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=i+1;o<n;o++)t?.enableCollision&&r.checkCollision(s[o]),t?.enableGravityBetweenObjects&&r.gravitateTo(s[o]),t?.enableSpringMassAlpha&&e.push([r.x,r.y,s[o].x,s[o].y,r.getSpringMassAlphaTo(s[o],t)])}return e}function hu(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let i=0;i<t;i++){const r=s[i].transformPathD(),o=s[i+1].transformPathD(),a=r.getPolymorphPoints(),h=o.getPolymorphPoints(),c=a.length>=h.length?a:h;e[i]=Tt.getInterpolator(r.expendToPolymorphPoints(c),o.expendToPolymorphPoints(c))}const n=new Q({initD:""});return i=>{const r=F(t*i,6),o=Math.min(Math.floor(r),t-1),a=F(r-o,6);return n.pathD(e[o](a)),n.setAttr(s[o+1].attrs),n}}function Bw(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];s.forEach(o=>{let a;o instanceof Rt?(a=o,a.sort()):(a=new Rt,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const n=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((h,c)=>{n[c]=n[c]||[],n[c][a]=h})});const i=[];n.forEach(o=>{i.push(hu(o))});const r=new Rt;return i.forEach(o=>{r.addShape(o(0))}),o=>(i.forEach(a=>{a(o)}),r)}function Fw(s,t=6e3,e){const n=s.findIndex(a=>a instanceof Rt)>=0?Bw(s):hu(s),i=n(0),r=e?.onUpdate,o=new Gn({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,h)=>{r?.(a,h),n(a.t),e?.shapeOrCombo?.(i,a.t)}})),o.play(),i}const hs={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,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};class Yt{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const i=n[2];let r;switch(n[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=B(parseFloat(r[1]),0,100)*255/100,this.g=B(parseFloat(r[2]),0,100)*255/100,this.b=B(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const i=n[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Yt?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=B(Math.round(Wt(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=B(Math.round(Wt(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=B(Math.round(Wt(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=B(Wt(t,this.a),0,1)}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${F(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=Qe){Yo.fromWorkingColorSpace(xe.copy(this),t);const e=xe.r,n=xe.g,i=xe.b;return t!==Qe?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Yt(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=tn(t.r),this.g=tn(t.g),this.b=tn(t.b),this}copyLinearToSRGB(t){return this.r=en(t.r),this.g=en(t.g),this.b=en(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",n="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:n);{const{r:i,g:r,b:o}=this.color;return this.r=255-i,this.g=255-r,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=B(t,0,1);const{r:e,g:n,b:i,a:r}=this.color;return r==0?this.a=t:(this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=i+(255-i)*t),this}darken(t){t=B(t,0,1);const{r:e,g:n,b:i,a:r}=this.color;return r==0?this.a=t:(this.r=e*(1-t),this.g=n*(1-t),this.b=i*(1-t)),this}lerp(t,e){e=B(e,0,1);const{r:n,g:i,b:r}=this.color;return this.r=n+(t.r-n)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,n){return n=B(n,0,1),this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}static gradient(t,e,n){try{return xe.lerpColors(new Yt(t),new Yt(e),n).toString()}catch{return e}}static random(){return xe.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Yt.nextIndex){Yt.nextIndex=t;const e=Object.keys(hs),n=e.length;return xe.setHEX(hs[e[Yt.nextIndex++%n]]).toString()}setColorName(t){const e=hs[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(hs).map(t=>xe.setHEX(t).toString())}setRGB(t,e,n,i=1){return this.r=t,this.g=e,this.b=n,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,n,i=1){const r=gf(t,1),o=B(e,0,1),a=B(n,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const h=a<=.5?a*(1+o):a+o-a*o,c=2*a-h;this.r=Xo(c,h,r+.3333333333333333)*255,this.g=Xo(c,h,r)*255,this.b=Xo(c,h,r-.3333333333333333)*255}return this.a=i,this}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i)/255,o=Math.min(e,n,i)/255;let a,h;const c=(o+r)/2;if(o===r)a=0,h=0;else{const l=r-o;switch(h=c<=.5?l/(r+o):l/(2-r-o),r){case e:a=(n-i)/l+(n<i?6:0);break;case n:a=(i-e)/l+2;break;case i:default:a=(e-n)/l+4;break}a/=6}return t&&t.setHSL(a,h,c,this.a),{h:a,s:h,l:c,a:this.a}}offsetHSL(t,e,n){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+n)}lerpHSL(t,e){const n=this.getHSL(),i=t.getHSL(),r=ys(n.h,i.h,e),o=ys(n.s,i.s,e),a=ys(n.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,n,i=1){const r=B(t,0,1)*360,o=B(e,0,1),a=B(n,0,1),h=Math.floor(r/60)%6,c=r/60-Math.floor(r/60),l=a*(1-o),u=a*(1-c*o),d=a*(1-(1-c)*o),f=[[a,d,l],[u,a,l],[l,a,d],[l,u,a],[d,l,a],[a,l,u]][h];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,n,i=1){this.setHSV(t,e,n,i)}getHSV(t){const{r:e,g:n,b:i,a:r}=this.color,o=Math.max(e,n,i),a=Math.min(e,n,i),h=o-a;let c;e===o?c=(n-i)/h:n===o?c=2+(i-e)/h:c=4+(e-n)/h,c/=6,c<0&&(c+=1);const l=h==0?0:c,u=o===0?0:h/o,d=o/255;return t&&t.setHSV(l,u,d,r),{h:l,s:u,v:d,a:r}}getHSB(t){const{h:e,s:n,v:i,a:r}=this.getHSV(t);return{h:e,s:n,b:i,a:r}}}const xe=new Yt,cu="",Qe="srgb",Bo="srgb-linear",Fo="linear",oi="srgb";function tn(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function en(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const lu=new wn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),uu=new wn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),fu=[.64,.33,.3,.6,.15,.06],du=[.2126,.7152,.0722],mu=[.3127,.329],Yo={enabled:!0,workingColorSpace:Bo,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===oi&&(s.r=tn(s.r),s.g=tn(s.g),s.b=tn(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===oi&&(s.r=en(s.r),s.g=en(s.g),s.b=en(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===cu?Fo:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};Yo.define({[Bo]:{primaries:fu,whitePoint:mu,transfer:Fo,toXYZ:lu,fromXYZ:uu,luminanceCoefficients:du,workingColorSpaceConfig:{unpackColorSpace:Qe},outputColorSpaceConfig:{drawingBufferColorSpace:Qe}},[Qe]:{primaries:fu,whitePoint:mu,transfer:oi,toXYZ:lu,fromXYZ:uu,luminanceCoefficients:du,outputColorSpaceConfig:{drawingBufferColorSpace:Qe}}});function Xo(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?s+(t-s)*6*e:e<.5?t:e<.6666666666666666?s+(t-s)*6*(.6666666666666666-e):s}class Yw{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new rc(null);resizeSubscription;mpg=Ze();mouseSubscription;shapes=[];shapeTap$=new rc(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",n=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&fl(this.PARENT_EL),e=="svg"&&(this.SVG_EL=Ke("svg"),xn(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=gl("canvas"),xn(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=Po(this.PARENT_EL).subscribe(i=>{this.rect.x=i.x,this.rect.y=i.y,this.rect.width=i.width,this.rect.height=i.height,this.SVG_EL&&we(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(we(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new No(this.CANVAS_EL,this.rect.width,this.rect.height,n)),this.size$.next(i)}),this.mouseSubscription=Gl(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{useMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=Dl(this.PARENT_EL).subscribe(i=>{for(const r of this.shapes)if(r.isMouseIn){this.shapeTap$.next(r);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(n=>{n instanceof Rt?e.push(...n.shapes):e.push(n)}),this.SVG_EL&&this.shapes.filter(n=>e.findIndex(i=>i.id==n.id)==-1).forEach(n=>{n.el&&(n.el.remove(),delete n.el)}),vf(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:n,y:i}=e.transformOrigin();let r=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);r=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,xn(this.SVG_EL,e.el),we(e.el,{id:e.id})):(e.el=a||tu(),xn(this.SVG_EL,e.el),we(e.el,{id:e.id})),Tw(e.el)&&we(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(Ga(e.attrs)||we(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(Ga(e.style)||vn(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new xt;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,n,i),a.scale(e.scaleX,e.scaleY,n,i),e.parent?.dDegree&&a.rotate(e.parent.dDegree,r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),we(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(j(e.degree),n,i),this.ctx.scale(e.scaleX,e.scaleY,n,i),e.parent?.dDegree&&this.ctx.rotate(j(e.parent.dDegree),r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),e.m=this.ctx.currentMatrix,El(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,h=this.mpg.current.y-this.mpg.start.y;if(a||h){if(e.drag&&e.drag.enable&&e.drag.alongPath){const c=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=c.point.x-e.x,h=c.point.y-e.y}(a||h)&&(e.move(a,h),e.parent?.combo.shapes.forEach(c=>{c.drag?.followSibling&&c!==e&&c.move(a,h)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,n=t?.brushColor||"#000000";let i=!1;const r=ni(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{i=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=n,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(i?this.ctx.lineTo(o.current.x,o.current.y):(i=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{r.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,n=t?.brushDensity||50,i=t?.brushColor||"#000000",r=new Yt(i),o=r.r,a=r.g,h=r.b,c=ni(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(l=>{if(this.ctx){const u=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=u.data;for(let f=0;f<n;f++){const p=Math.random()*Math.PI*2,g=Math.random()*e,C=l.current.x+Math.cos(p)*g|0,y=l.current.y+Math.sin(p)*g|0,v=(C+y*u.width)*4;d[v]=o,d[v+1]=a,d[v+2]=h,d[v+3]=255}this.ctx.putImageData(u)}});return()=>{c.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&Aw(this.SVG_EL)}}class nn extends Q{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new nn({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=yt(Nt(this.x,this.y,t.x,t.y)),n=Le(this.x,this.y,t.x,t.y);(e!=this.degree||n!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),n!=this.lineLength&&(this.lineLength=n),this.shouldUpdatePathD=!0)}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],n=t.transformPathD().normalizedLines[0];return e.intersection(n)}}class Uo extends Q{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new Uo({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,n=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class ai extends Q{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new ai({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let n=1;n<=e-1;n++)t.push(["l",this.points[n].x-this.points[n-1].x,this.points[n].y-this.points[n-1].y]);t.push(["z"])}else{const n=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;let r=n,o=i;t.push(["m",r,o]);for(let a=0;a<e-1;a++){const h=(this.points[a].x+this.points[a+1].x)/2,c=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-r,this.points[a].y-o,h-r,c-o]),r=h,o=c}t.push(["q",this.points[e-1].x-r,this.points[e-1].y-o,n-r,i-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let n=1;n<=e-1;n++)t.lineTo(this.points[n].x,this.points[n].y);t.closePath()}else{const n=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(n,i);for(let r=0;r<e-1;r++){const o=(this.points[r].x+this.points[r+1].x)/2,a=(this.points[r].y+this.points[r+1].y)/2;t.quadraticCurveTo(this.points[r].x,this.points[r].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,n,i)}}isPointInShape(t){const e=this.points.length;let n=!1;const i=2e-10;for(let r=0,o=e-1;r<e;o=r,r++){const a=this.points[r].x,h=this.points[r].y,c=this.points[o].x,l=this.points[o].y;if(a===t.x&&h===t.y||c===t.x&&l===t.y||t.y===h&&t.y===l)return!0;if(t.y>=h&&t.y<l||t.y<h&&t.y>=l){const u=(c-a)/(l-h),d=a+u*(t.y-h);if(d===t.x||Math.abs(d-t.x)<i)return!0;d>t.x&&(n=!n)}}return n}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,n,i){const r=[];for(let o=0;o<i;o++){const a=o/i*2*Math.PI,{dx:h,dy:c}=Re(a,n);r.push({x:t+h,y:e+c})}return new ai({points:r})}}class $o extends Rt{length=100;constructor(t){super(t);const e=new nn({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const n=new nn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(n,{dX:90-Math.random()*40,dDegree:Math.random()*70});const i=new nn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(i,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new $o(super.getBaseOptions())}}class _n extends Q{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new _n({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=Ke("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return yn(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y;return{x:n*t.x-e*t.y,y:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}}class Go extends Q{constructor(t){super(t)}cloneShape(){return new Go({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class Ne extends Q{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new Ne({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=Ke("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,n,i,r,o,a,h){const l=new vt({x:t,y:e,c1x:n,c1y:i,c2x:r,c2y:o,toX:a,toY:h}).getBoundingClientRect();return new Ne({x:l.x,y:l.y,rectWidth:l.width,rectHeight:l.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class Vo extends Q{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Vo({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class jo extends Q{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new jo({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class qo extends Q{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new qo({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const n=288+e*144,i=this.r*Math.cos(j(n)),r=this.r*Math.sin(j(n));t.push(["l",i,r])}return t}}class Ho extends Q{constructor(t){super(t)}cloneShape(){return new Ho({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class Wo extends Q{constructor(t){super(t)}cloneShape(){return new Wo({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,30],["a",15,15,0,1,1,0,-30]]}}class Jo extends Q{constructor(t){super({...t,initD:"m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"})}cloneShape(){return new Jo({...super.getBaseOptions()})}}class Zo extends Q{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Zo({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGEl(){const t=Ke("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class Ko extends Rt{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new Q({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new Q({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new Ko({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class Qo extends Rt{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new Ne({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const n=new _n({drag:{followSibling:!0},ballRadius:2});this.addShape(n);const i=new _n({drag:{followSibling:!0},ballRadius:2});this.addShape(i,{dX:0+this.width})}cloneShapeCombo(){return new Qo({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(j(t.degree))*this.width,y:t.y+Math.sin(j(t.degree))*this.width}}}class ta extends Rt{options;value$=new Te;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,n=t?.sliderMax||100,i=t?.sliderStep||1,r=wf(e,n,i),o=r(typeof t?.sliderDefaultValue=="number"?B(t.sliderDefaultValue,e,n):e);this.value$.next(o);const a=o/(n-e),h=t?.sliderWidth||100,c=t?.sliderHeight||4,l=c*.5,u=c*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new Ne({rectWidth:h,rectHeight:c,rectBorderRadius:l,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const g=new Ne({rectWidth:h*a,rectHeight:c,rectBorderRadius:l,attrs:{fill:f},drag:{enable:!1}});this.addShape(g);const C=new _n({x:h*a,y:l,ballRadius:u,attrs:{fill:f},drag:{enable:!0,alongPath:new Tt([["m",0,0],["l",h,0]])}});this.addShape(C),this.subscription=C.transform$.subscribe(({dX:y})=>{console.log(y);const v=(C.x-p.x)/h;g.update({rectWidth:h*v}),this.value$.next(r(v*(n-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new ta({...super.getBaseOptions(),...this.options})}}class cs extends Q{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,n=t.height||0,i=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const r=Math.min(e/2,n)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(j(i)))}else this.radius=Math.max(0,Math.min(e/2,n/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=n-this.lineWidth-this.radius*Math.sin(j(i)):this.y=n/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new cs({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=Re(j(this.startDegree),this.radius),{dx:n,dy:i}=Re(j(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,n-t,i-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const n=this.radius-this.radius*Math.cos(Math.PI*this.percent),i=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+n,-i,{0:this.startColor,1:this.endColor})}else{const n=this.radius*Math.sin(2*Math.PI*this.percent),i=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,n,-i,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,j(this.startDegree),j(this.percentDegree),!1)}}class ea extends Rt{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-105,this.endDegree=t?.endDegree||105):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new cs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new cs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=23,this.half){const r=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new nn({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const h=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(j(h))*r,dY:this.ringBg.y+Math.sin(j(h))*r,dDegree:h})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new ea({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent})}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}class Cn extends Q{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=ki(this.getAttr("fontSize"),10).number,n=ki(this.getAttr("fontWeight"),400).number,i=Cn.measureText(this.text,e,n);this.width=i.width,this.height=i.height}cloneShape(){return new Cn({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=Ke("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
40
- `);if(e.length<=1)t.innerHTML=this.text;else{const n=this.getAttr("line-height","1.2em");e.forEach((i,r)=>{if(i.trim()){const o=Ke("tspan");o.setAttribute("x","0"),o.setAttribute("dy",r>0?n:"0"),o.innerHTML=i.trim(),o.style.alignmentBaseline="middle",t.append(o)}})}return t}toSVGPathData(){return[]}toCanvasContext(t){const e=this.text.split(`
41
- `);if(e.length<=1)t.fillText(this.text,0,0);else{const n=t.measureText(this.text),r=(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,h)=>{a.trim()&&(o+=h>0?r:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,n=400){const i=document.createElement("span");i.style.visibility="hidden",i.style.margin="0",i.style.padding="0",i.style.inset="0",i.style.whiteSpace="nowrap",i.style.overflow="visible",i.style.fontSize=e+"px",i.style.fontWeight=n.toString(),i.innerText=t,document.body.appendChild(i);const r=i.offsetWidth,o=i.offsetHeight;return document.body.removeChild(i),{width:r,height:o}}static getFixedWidthText(t,e,n=12,i=400,r="..."){let o="";if(!t||e<n)return o;const a=t.split("");let h=r?Cn.measureText(r,n,i).width:0;for(let c=0,l=a.length;c<l;c++)if(h+=Cn.measureText(a[c],n,i).width,h>e){r&&(o+=r);break}else o+=a[c];return o}}class na extends Rt{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:n,height:i,x:r,y:o,particleCount:a,angle:h,spread:c,startVelocity:l,decay:u,gravity:d,drift:f,ticks:p,colors:g,scalar:C,flat:y}=Object.assign({shapeCreator:()=>new Ne({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:Yt.getColors(),scalar:1,flat:!1},t||{}),v=(_,L)=>{_.x=n*r,_.y=i*o,_.scaleX=C,_.scaleY=C;const N=g[L%g.length];_.setAttr({fill:N}),_.interactive=!1,_.wobble=Math.random()*10,_.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),_.velocity=l*.5+Math.random()*l,_.angle2D=-b+(.5*x-Math.random()*x),_.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,_.tick=0,_.totalTicks=p,_.decay=u,_.drift=f,_.random=Math.random()+2,_.tiltSin=0,_.tiltCos=0,_.wobbleX=0,_.wobbleY=0,_.gravity=d*3,_.scalar=C,_.flat=y,_.color=new Yt(N)},b=j(h),x=j(c);let E=a;for(;E;){const _=e();v(_,E),_.clone=(L=>()=>{const N=e();return v(N,L),N})(E),this.addShape(_),E--}}cloneShapeCombo(){return new na(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,n=t.x+t.random*t.tiltCos,i=t.y+t.random*t.tiltSin,r=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=yt(Math.PI/10*t.wobble),t.scaleX=Math.abs(r-n)*.1,t.scaleY=Math.abs(o-i)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}function pu(s,t={attributes:!0,childList:!0,subtree:!0}){return new st(e=>{const n=new MutationObserver((i,r)=>{e.next(i)});return n.observe(s,t),()=>{n.disconnect()}})}function Xw(s,t){return new Promise(e=>{new MutationObserver((i,r)=>{for(const o of i)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(r.disconnect(),e(!0))})}).observe(s,{childList:!0})})}function gu(s,t={root:null}){return new st(e=>{const n=new IntersectionObserver((i,r)=>{if(i.length){const o=i[i.length-1];o&&e.next(o)}},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function Uw(s,t){return Vl().pipe(je(null),it(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||So(),{top:i,left:r,right:o,bottom:a}=s.getBoundingClientRect();return(i>=0&&i<=n||a>=0&&a<=n)&&(r>=0&&r<=e||o>=0&&o<=e)}),Ae())}function $w(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return gu(s,{threshold:e,root:t?.root}).pipe(it(n=>n.isIntersecting&&n.intersectionRatio>=e),Ae())}let yu=!1;function Gw(){yu||(yu=!0,Sl(`
29
+ `,t}function Rl(n){const t=[];for(let e=0,r=Ch.length;e<r;e++){const s=jt(Ch[e]+n);t.push(s)}return t}function Br(n,t,e){const r=Gh(n);return r.props.style=r.props.style||{},t?r.props.style[t]||r.props.style[fu(t)]||r.props.style[jt(t)]||"":r.props.style}function lr(n,t,e){yo(n,r=>{r.props.style=r.props.style||{},typeof t=="string"&&e?r.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(s=>{r.props.style[s]=t[s]})}),Xh()}function Sa(n,t=!1){const e={};if(!t)if(getComputedStyle){const r=getComputedStyle(n);for(let s=0,i=r.length;s<i;s++){const o=r[s];e[o]=r.getPropertyValue(o)}}else{const r=n.style||n.currentStyle;for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return n.style.cssText&&n.style.cssText.split(";").filter(r=>!!r).forEach(r=>{const[s,i]=r.split(":").map(o=>o.trim());s&&i&&(e[s]=i)}),e}function g1(n,t){const e=Rl(t),r=e.length;let s="";for(let i=0;i<r;i++){const o=e[i];if(s=n[o]||"",s)return s}return s}function y1(n,t,e){const r=Rl(t),s=r.length;let i="";for(let o=0;o<s;o++){const a=r[o];if(i="style"in n&&n.style[a]||"currentStyle"in n&&n.currentStyle[a]||"",i)return i}if(getComputedStyle){const o=getComputedStyle(n,e);for(let a=0;a<s;a++){const c=r[a];if(i=o.getPropertyValue(c).trim(),i)return i}}return i}function $r(n,t,e){if(t)if(typeof t=="string"&&e)try{n.style.setProperty(t,e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":"")}catch{n.style[t]=e}else t instanceof Object&&Object.keys(t).forEach(r=>{$r(n,r,t[r])})}function Ea(n,t){typeof t=="string"?n.style.removeProperty(jt(t)):Object.keys(t).forEach(e=>{Ea(n,e)})}function kl(n,t){let e;if(typeof t=="string"){const r=document.querySelector(t)?.shadowRoot;r?e=r:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const r=document.createElement("style");return r.innerHTML=n,e.appendChild(r),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(r)}}else{const r=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(r)}}}class b1{selector;name;value;constructor(t,e,r){this.selector=t,this.name=e,this.value=r}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class w1{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new b1(t,this.propertyName,e))}}async function Ll(){const n=[],t=document.querySelectorAll("style, link");for(let e=0,r=t.length;e<r;e++){const s=t[e];let i=s.innerHTML;switch(s.nodeName.toLowerCase()){case"style":break;case"link":i=await Il(s.href,{method:"GET",responseType:"text"});break}i=i.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),n.push(i)}return n}async function v1(){const n={},t=await Ll();for(let e=0,r=t.length;e<r;e++){const i=t[e].match(/[^{]*{[^}]*}/g);if(i)for(let o=0,a=i.length;o<a;o++){const c=i[o].split(/[{}]/g),h=c[0].trim(),l=c[1].split(";");for(let d=0;d<l.length;d++)if(l[d].trim()!=""){const f=l[d].split(":"),p=f[0].trim().toLowerCase(),m=f[1];n[p]||(n[p]=new w1(p)),m&&n[p].add(h,m.trim())}}}return n}function yn(n,t,e){if(t===void 0&&e===void 0)return Ca(n);if(typeof t=="string"&&e===void 0)return Nl(n,t);typeof t=="object"?yo(n,r=>{for(const s in t)s=="style"?lr(n,s,t[s]):Object.prototype.hasOwnProperty.call(t,s)&&(r.props[s]=""+t[s])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?lr(n,t,e):yo(n,r=>{r.props[t]=""+e})),Xh()}function Ca(n){const t={};for(let e=0,r=n.attributes,s=r.length;e<s;e++){const i=r[e];i.nodeName&&i.nodeValue&&(i.nodeName==="style"?t[i.nodeName]=Sa(n,!0):t[i.nodeName]=i.nodeValue)}return t}function Nl(n,t){return t==="style"?Sa(n,!0):n.getAttribute(jt(t))}function jn(n,t,e){return n.setAttribute(jt(t),""+e)}function x1(n,t){t.split(/[,\s]+/i).forEach(e=>{const r=jt(e.trim());r!=""&&n.removeAttribute(r)})}function zl(n,t){for(const e in t){const r=t[e];switch(e){case"fill":r!=="none"&&(n.fillStyle=r);break;case"stroke":r!=="none"&&(n.strokeStyle=r);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(r);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=r;break;case"stroke-linejoin":case"strokeLinejoin":switch(r){case"round":case"bevel":case"miter":n.lineJoin=r;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(r);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(r);break;case"stroke-dasharray":case"strokeDasharray":typeof r=="string"&&n.setLineDash(r.split(/\s+/).map(s=>Number(s)));break;case"cursor":break;case"font":typeof r=="string"&&(n.font=r);break;case"font-size":case"fontSize":n.font+=` ${r}`;break;case"font-family":case"fontFamily":n.font+=` ${r}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(r){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(r){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=r;break;default:n.textBaseline="alphabetic";break}break}}}var Ta=function(n,t){return Ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},Ta(n,t)};function Fe(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ta(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function _1(n,t,e,r){function s(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function a(u){try{h(r.next(u))}catch(l){o(l)}}function c(u){try{h(r.throw(u))}catch(l){o(l)}}function h(u){u.done?i(u.value):s(u.value).then(a,c)}h((r=r.apply(n,t||[])).next())})}function Fl(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(u){return c([h,u])}}function c(h){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(r=1,s&&(i=h[0]&2?s.return:h[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,h[1])).done)return i;switch(s=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,s=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){e.label=h[1];break}if(h[0]===6&&e.label<i[1]){e.label=i[1],i=h;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(h);break}i[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(n,e)}catch(u){h=[6,u],s=0}finally{r=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function Vn(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ke(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function bn(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function fr(n){return this instanceof fr?(this.v=n,this):new fr(n)}function S1(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){r[f]&&(s[f]=function(m){return new Promise(function(v,g){i.push([f,m,v,g])>1||c(f,m)})},p&&(s[f]=p(s[f])))}function c(f,p){try{h(r[f](p))}catch(m){d(i[0][3],m)}}function h(f){f.value instanceof fr?Promise.resolve(f.value.v).then(u,l):d(i[0][2],f)}function u(f){c("next",f)}function l(f){c("throw",f)}function d(f,p){f(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function E1(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Vn=="function"?Vn(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=n[i]&&function(o){return new Promise(function(a,c){o=n[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(h){i({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function xt(n){return typeof n=="function"}function Pa(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Aa=Pa(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
30
+ `+e.map(function(r,s){return s+1+") "+r.toString()}).join(`
31
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function Ur(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var dr=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Vn(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(xt(u))try{u()}catch(m){i=m instanceof Aa?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Vn(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ul(p)}catch(m){i=i??[],m instanceof Aa?i=bn(bn([],Ke(i)),Ke(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new Aa(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ul(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ur(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Ur(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Bl=dr.EMPTY;function $l(n){return n instanceof dr||n&&"closed"in n&&xt(n.remove)&&xt(n.add)&&xt(n.unsubscribe)}function Ul(n){xt(n)?n():n.unsubscribe()}var Yl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ma={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=Ma.delegate;return s?.setTimeout?s.setTimeout.apply(s,bn([n,t],Ke(e))):setTimeout.apply(void 0,bn([n,t],Ke(e)))},clearTimeout:function(n){var t=Ma.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function jl(n){Ma.setTimeout(function(){throw n})}function Yr(){}function ai(n){n()}var Da=function(n){Fe(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,$l(e)&&e.add(r)):r.destination=A1,r}return t.create=function(e,r,s){return new mr(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(dr),C1=Function.prototype.bind;function Oa(n,t){return C1.call(n,t)}var T1=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){ci(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){ci(r)}else ci(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ci(e)}},n}(),mr=function(n){Fe(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(xt(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&Yl.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Oa(e.next,a),error:e.error&&Oa(e.error,a),complete:e.complete&&Oa(e.complete,a)}):o=e}return i.destination=new T1(o),i}return t}(Da);function ci(n){jl(n)}function P1(n){throw n}var A1={closed:!0,next:Yr,error:P1,complete:Yr},Ia=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Gn(n){return n}function M1(n){return n.length===0?Gn:n.length===1?n[0]:function(e){return n.reduce(function(r,s){return s(r)},e)}}var Rt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=O1(t)?t:new mr(t,e,r);return ai(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Vl(e),new e(function(s,i){var o=new mr({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Ia]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M1(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Vl(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n}();function Vl(n){var t;return(t=n??Yl.Promise)!==null&&t!==void 0?t:Promise}function D1(n){return n&&xt(n.next)&&xt(n.error)&&xt(n.complete)}function O1(n){return n&&n instanceof Da||D1(n)&&$l(n)}function I1(n){return xt(n?.lift)}function ne(n){return function(t){if(I1(t))return t.lift(function(e){try{return n(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ft(n,t,e,r,s){return new R1(n,t,e,r,s)}var R1=function(n){Fe(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(Da),k1=Pa(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ze=function(n){Fe(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new Gl(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new k1},t.prototype.next=function(e){var r=this;ai(function(){var s,i;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=Vn(r.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;ai(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;ai(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,i=s.hasError,o=s.isStopped,a=s.observers;return i||o?Bl:(this.currentObservers=null,a.push(e),new dr(function(){r.currentObservers=null,Ur(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,i=r.thrownError,o=r.isStopped;s?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new Rt;return e.source=this,e},t.create=function(e,r){return new Gl(e,r)},t}(Rt),Gl=function(n){Fe(t,n);function t(e,r){var s=n.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Bl},t}(Ze),hi=function(n){Fe(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,i=e._value;if(r)throw s;return this._throwIfClosed(),i},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Ze),Ra={now:function(){return(Ra.delegate||Date).now()},delegate:void 0},L1=function(n){Fe(t,n);function t(e,r,s){e===void 0&&(e=1/0),r===void 0&&(r=1/0),s===void 0&&(s=Ra);var i=n.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=s,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return t.prototype.next=function(e){var r=this,s=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,c=r._windowTime;s||(i.push(e),!o&&i.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(e),s=this,i=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=i?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),r},t.prototype._trimBuffer=function(){var e=this,r=e._bufferSize,s=e._timestampProvider,i=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*r;if(r<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=s.now(),h=0,u=1;u<i.length&&i[u]<=c;u+=2)h=u;h&&i.splice(0,h+1)}},t}(Ze),N1=function(n){Fe(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(dr),ui={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=ui.delegate;return s?.setInterval?s.setInterval.apply(s,bn([n,t],Ke(e))):setInterval.apply(void 0,bn([n,t],Ke(e)))},clearInterval:function(n){var t=ui.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},z1=function(n){Fe(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.scheduler=e,s.work=r,s.pending=!1,s}return t.prototype.schedule=function(e,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,r),this},t.prototype.requestAsyncId=function(e,r,s){return s===void 0&&(s=0),ui.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&ui.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var s=!1,i;try{this.work(e)}catch(o){s=!0,i=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,s=e.scheduler,i=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ur(i,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(N1),Xl=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Ra.now,n}(),F1=function(n){Fe(t,n);function t(e,r){r===void 0&&(r=Xl.now);var s=n.call(this,e,r)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var s;this._active=!0;do if(s=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,s){for(;e=r.shift();)e.unsubscribe();throw s}},t}(Xl),ka=new F1(z1),B1=ka,Hl=new Rt(function(n){return n.complete()});function Wl(n){return n&&xt(n.schedule)}function La(n){return n[n.length-1]}function $1(n){return xt(La(n))?n.pop():void 0}function jr(n){return Wl(La(n))?n.pop():void 0}function U1(n,t){return typeof La(n)=="number"?n.pop():t}var Na=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function ql(n){return xt(n?.then)}function Jl(n){return xt(n[Ia])}function Kl(n){return Symbol.asyncIterator&&xt(n?.[Symbol.asyncIterator])}function Zl(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Y1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ql=Y1();function tf(n){return xt(n?.[Ql])}function ef(n){return S1(this,arguments,function(){var e,r,s,i;return Fl(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,fr(e.read())];case 3:return r=o.sent(),s=r.value,i=r.done,i?[4,fr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,fr(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function nf(n){return xt(n?.getReader)}function Ut(n){if(n instanceof Rt)return n;if(n!=null){if(Jl(n))return j1(n);if(Na(n))return V1(n);if(ql(n))return G1(n);if(Kl(n))return rf(n);if(tf(n))return X1(n);if(nf(n))return H1(n)}throw Zl(n)}function j1(n){return new Rt(function(t){var e=n[Ia]();if(xt(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V1(n){return new Rt(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function G1(n){return new Rt(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,jl)})}function X1(n){return new Rt(function(t){var e,r;try{for(var s=Vn(n),i=s.next();!i.done;i=s.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}t.complete()})}function rf(n){return new Rt(function(t){W1(n,t).catch(function(e){return t.error(e)})})}function H1(n){return rf(ef(n))}function W1(n,t){var e,r,s,i;return _1(this,void 0,void 0,function(){var o,a;return Fl(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=E1(n),c.label=1;case 1:return[4,e.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=e.return)?[4,i.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Qe(n,t,e,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var i=t.schedule(function(){e(),s?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(i),!s)return i}function sf(n,t){return t===void 0&&(t=0),ne(function(e,r){e.subscribe(Ft(r,function(s){return Qe(r,n,function(){return r.next(s)},t)},function(){return Qe(r,n,function(){return r.complete()},t)},function(s){return Qe(r,n,function(){return r.error(s)},t)}))})}function za(n,t){return t===void 0&&(t=0),ne(function(e,r){r.add(n.schedule(function(){return e.subscribe(r)},t))})}function q1(n,t){return Ut(n).pipe(za(t),sf(t))}function J1(n,t){return Ut(n).pipe(za(t),sf(t))}function K1(n,t){return new Rt(function(e){var r=0;return t.schedule(function(){r===n.length?e.complete():(e.next(n[r++]),e.closed||this.schedule())})})}function Z1(n,t){return new Rt(function(e){var r;return Qe(e,t,function(){r=n[Ql](),Qe(e,t,function(){var s,i,o;try{s=r.next(),i=s.value,o=s.done}catch(a){e.error(a);return}o?e.complete():e.next(i)},0,!0)}),function(){return xt(r?.return)&&r.return()}})}function of(n,t){if(!n)throw new Error("Iterable cannot be null");return new Rt(function(e){Qe(e,t,function(){var r=n[Symbol.asyncIterator]();Qe(e,t,function(){r.next().then(function(s){s.done?e.complete():e.next(s.value)})},0,!0)})})}function Q1(n,t){return of(ef(n),t)}function tb(n,t){if(n!=null){if(Jl(n))return q1(n,t);if(Na(n))return K1(n,t);if(ql(n))return J1(n,t);if(Kl(n))return of(n,t);if(tf(n))return Z1(n,t);if(nf(n))return Q1(n,t)}throw Zl(n)}function Vr(n,t){return t?tb(n,t):Ut(n)}function eb(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=jr(n);return Vr(n,e)}var nb=Pa(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function rb(n,t){var e=typeof t=="object";return new Promise(function(r,s){var i=new mr({next:function(o){r(o),i.unsubscribe()},error:s,complete:function(){e?r(t.defaultValue):s(new nb)}});n.subscribe(i)})}function sb(n){return n instanceof Date&&!isNaN(n)}function kt(n,t){return ne(function(e,r){var s=0;e.subscribe(Ft(r,function(i){r.next(n.call(t,i,s++))}))})}var ib=Array.isArray;function ob(n,t){return ib(t)?n.apply(void 0,bn([],Ke(t))):n(t)}function Fa(n){return kt(function(t){return ob(n,t)})}var ab=Array.isArray,cb=Object.getPrototypeOf,hb=Object.prototype,ub=Object.keys;function lb(n){if(n.length===1){var t=n[0];if(ab(t))return{args:t,keys:null};if(fb(t)){var e=ub(t);return{args:e.map(function(r){return t[r]}),keys:e}}}return{args:n,keys:null}}function fb(n){return n&&typeof n=="object"&&cb(n)===hb}function db(n,t){return n.reduce(function(e,r,s){return e[r]=t[s],e},{})}function mb(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=jr(n),r=$1(n),s=lb(n),i=s.args,o=s.keys;if(i.length===0)return Vr([],e);var a=new Rt(pb(i,e,o?function(c){return db(o,c)}:Gn));return r?a.pipe(Fa(r)):a}function pb(n,t,e){return e===void 0&&(e=Gn),function(r){af(t,function(){for(var s=n.length,i=new Array(s),o=s,a=s,c=function(u){af(t,function(){var l=Vr(n[u],t),d=!1;l.subscribe(Ft(r,function(f){i[u]=f,d||(d=!0,a--),a||r.next(e(i.slice()))},function(){--o||r.complete()}))},r)},h=0;h<s;h++)c(h)},r)}}function af(n,t,e){n?Qe(e,n,t):t()}function gb(n,t,e,r,s,i,o,a){var c=[],h=0,u=0,l=!1,d=function(){l&&!c.length&&!h&&t.complete()},f=function(m){return h<r?p(m):c.push(m)},p=function(m){i&&t.next(m),h++;var v=!1;Ut(e(m,u++)).subscribe(Ft(t,function(g){s?.(g),i?f(g):t.next(g)},function(){v=!0},void 0,function(){if(v)try{h--;for(var g=function(){var b=c.shift();o?Qe(t,o,function(){return p(b)}):p(b)};c.length&&h<r;)g();d()}catch(b){t.error(b)}}))};return n.subscribe(Ft(t,f,function(){l=!0,d()})),function(){a?.()}}function Ba(n,t,e){return e===void 0&&(e=1/0),xt(t)?Ba(function(r,s){return kt(function(i,o){return t(r,i,s,o)})(Ut(n(r,s)))},e):(typeof t=="number"&&(e=t),ne(function(r,s){return gb(r,s,n,e)}))}function cf(n){return n===void 0&&(n=1/0),Ba(Gn,n)}function yb(){return cf(1)}function hf(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return yb()(Vr(n,jr(n)))}var bb=["addListener","removeListener"],wb=["addEventListener","removeEventListener"],vb=["on","off"];function $a(n,t,e,r){if(xt(e)&&(r=e,e=void 0),r)return $a(n,t,e).pipe(Fa(r));var s=Ke(Sb(n)?wb.map(function(a){return function(c){return n[a](t,c,e)}}):xb(n)?bb.map(uf(n,t)):_b(n)?vb.map(uf(n,t)):[],2),i=s[0],o=s[1];if(!i&&Na(n))return Ba(function(a){return $a(a,t,e)})(Ut(n));if(!i)throw new TypeError("Invalid event target");return new Rt(function(a){var c=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return a.next(1<h.length?h:h[0])};return i(c),function(){return o(c)}})}function uf(n,t){return function(e){return function(r){return n[e](t,r)}}}function xb(n){return xt(n.addListener)&&xt(n.removeListener)}function _b(n){return xt(n.on)&&xt(n.off)}function Sb(n){return xt(n.addEventListener)&&xt(n.removeEventListener)}function Ot(n,t,e){return e?Ot(n,t).pipe(Fa(e)):new Rt(function(r){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return r.next(o.length===1?o[0]:o)},i=n(s);return xt(t)?function(){return t(s,i)}:void 0})}function Eb(n,t,e){n===void 0&&(n=0),e===void 0&&(e=B1);var r=-1;return t!=null&&(Wl(t)?e=t:r=t),new Rt(function(s){var i=sb(n)?+n-e.now():n;i<0&&(i=0);var o=0;return e.schedule(function(){s.closed||(s.next(o++),0<=r?this.schedule(void 0,r):s.complete())},i)})}function li(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=jr(n),r=U1(n,1/0),s=n;return s.length?s.length===1?Ut(s[0]):cf(r)(Vr(s,e)):Hl}var Cb=Array.isArray;function Tb(n){return n.length===1&&Cb(n[0])?n[0]:n}function Ua(n,t){return ne(function(e,r){var s=0;e.subscribe(Ft(r,function(i){return n.call(t,i,s++)&&r.next(i)}))})}function fi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=Tb(n),n.length===1?Ut(n[0]):new Rt(Pb(n))}function Pb(n){return function(t){for(var e=[],r=function(i){e.push(Ut(n[i]).subscribe(Ft(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==i&&e[a].unsubscribe();e=null}t.next(o)})))},s=0;e&&!t.closed&&s<n.length;s++)r(s)}}function lf(n){return ne(function(t,e){var r=null,s=!1,i;r=t.subscribe(Ft(e,void 0,void 0,function(o){i=Ut(n(o,lf(n)(t))),r?(r.unsubscribe(),r=null,i.subscribe(e)):s=!0})),s&&(r.unsubscribe(),r=null,i.subscribe(e))})}function wn(n,t){return t===void 0&&(t=Gn),n=n??Ab,ne(function(e,r){var s,i=!0;e.subscribe(Ft(r,function(o){var a=t(o);(i||!n(s,a))&&(i=!1,s=a,r.next(o))}))})}function Ab(n,t){return n===t}function ff(n,t){return t?function(e){return e.pipe(ff(function(r,s){return Ut(n(r,s)).pipe(kt(function(i,o){return t(r,i,s,o)}))}))}:ne(function(e,r){var s=0,i=null,o=!1;e.subscribe(Ft(r,function(a){i||(i=Ft(r,void 0,function(){i=null,o&&r.complete()}),Ut(n(a,s++)).subscribe(i))},function(){o=!0,!i&&r.complete()}))})}function Mb(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new Ze}:t,r=n.resetOnError,s=r===void 0?!0:r,i=n.resetOnComplete,o=i===void 0?!0:i,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var u,l,d,f=0,p=!1,m=!1,v=function(){l?.unsubscribe(),l=void 0},g=function(){v(),u=d=void 0,p=m=!1},b=function(){var x=u;g(),x?.unsubscribe()};return ne(function(x,w){f++,!m&&!p&&v();var C=d=d??e();w.add(function(){f--,f===0&&!m&&!p&&(l=Ya(b,c))}),C.subscribe(w),!u&&f>0&&(u=new mr({next:function(E){return C.next(E)},error:function(E){m=!0,v(),l=Ya(g,s,E),C.error(E)},complete:function(){p=!0,v(),l=Ya(g,o),C.complete()}}),Ut(x).subscribe(u))})(h)}}function Ya(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];if(t===!0){n();return}if(t!==!1){var s=new mr({next:function(){s.unsubscribe(),n()}});return Ut(t.apply(void 0,bn([],Ke(e)))).subscribe(s)}}function df(n,t,e){var r,s,i,o,a=!1;return n&&typeof n=="object"?(r=n.bufferSize,o=r===void 0?1/0:r,s=n.windowTime,t=s===void 0?1/0:s,i=n.refCount,a=i===void 0?!1:i,e=n.scheduler):o=n??1/0,Mb({connector:function(){return new L1(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Xn(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=jr(n);return ne(function(r,s){(e?hf(n,r,e):hf(n,r)).subscribe(s)})}function di(n,t){return ne(function(e,r){var s=null,i=0,o=!1,a=function(){return o&&!s&&r.complete()};e.subscribe(Ft(r,function(c){s?.unsubscribe();var h=0,u=i++;Ut(n(c,u)).subscribe(s=Ft(r,function(l){return r.next(t?t(c,l,u,h++):l)},function(){s=null,a()}))},function(){o=!0,a()}))})}function Db(){return di(Gn)}function ja(n){return ne(function(t,e){Ut(n).subscribe(Ft(e,function(){return e.complete()},Yr)),!e.closed&&t.subscribe(e)})}function Hn(n,t,e){var r=xt(n)||t||e?{next:n,error:t,complete:e}:n;return r?ne(function(s,i){var o;(o=r.subscribe)===null||o===void 0||o.call(r);var a=!0;s.subscribe(Ft(i,function(c){var h;(h=r.next)===null||h===void 0||h.call(r,c),i.next(c)},function(){var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},function(c){var h;a=!1,(h=r.error)===null||h===void 0||h.call(r,c),i.error(c)},function(){var c,h;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(h=r.finalize)===null||h===void 0||h.call(r)}))}):Gn}function Ob(n,t){return ne(function(e,r){var s=t??{},i=s.leading,o=i===void 0?!0:i,a=s.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,d=!1,f=function(){l?.unsubscribe(),l=null,c&&(v(),d&&r.complete())},p=function(){l=null,d&&r.complete()},m=function(g){return l=Ut(n(g)).subscribe(Ft(r,f,p))},v=function(){if(h){h=!1;var g=u;u=null,r.next(g),!d&&m(g)}};e.subscribe(Ft(r,function(g){h=!0,u=g,!(l&&!l.closed)&&(o?v():m(g))},function(){d=!0,!(c&&h&&l&&!l.closed)&&r.complete()}))})}function Ib(n,t,e){t===void 0&&(t=ka);var r=Eb(n,t);return Ob(function(){return r},e)}function Rb(n,t){return ne(function(e,r){var s=[],i=function(o){for(;0<s.length;)s.shift().error(o);r.error(o)};Ut(n).subscribe(Ft(r,function(o){var a=new Ze;s.push(a);var c=new dr,h=function(){Ur(s,a),a.complete(),c.unsubscribe()},u;try{u=Ut(t(o))}catch(l){i(l);return}r.next(a.asObservable()),c.add(u.subscribe(Ft(r,h,Yr,i)))},Yr)),e.subscribe(Ft(r,function(o){var a,c,h=s.slice();try{for(var u=Vn(h),l=u.next();!l.done;l=u.next()){var d=l.value;d.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();r.complete()},i,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}function kb(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function _t(n,t,e,r=!1){const s=async i=>{await e(i)};try{n.addEventListener(t,s,r)}catch{n.attachEvent("on"+t,s)}return()=>{try{n.removeEventListener(t,s,r)}catch{n.detachEvent("on"+t,s)}}}function Lb(n,t,e,r,s=!1){return _t(n||document.body,e,i=>{i.target===t&&r(i)},s)}function Nb(n){n.replaceWith(n.cloneNode(!0))}function Q(n,t,e=!1){return $a(n,t,{capture:e})}function zb(n){const t=Ot(e=>n.register(e),(e,r)=>{n.unregister?.(e,...r||[])},(...e)=>[...e]);return n.share?t.pipe(df({bufferSize:n.bufferSize||1,refCount:!0})):t}function mf(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function vn(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const Fb=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Bb=["keydown","keyup","keypress"],$b=["touchstart","touchend","touchcancel","touchmove"],Ub=["pointerdown","pointerup","pointercancel","pointermove"],Yb=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],jb=["change"];function mi(n,t={bubbles:!0,detail:{}}){let e;try{const r=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);Fb.includes(n)?e=new MouseEvent(n,r):Bb.includes(n)?e=new KeyboardEvent(n,r):$b.includes(n)?e=new TouchEvent(n,r):Ub.includes(n)?e=new PointerEvent(n,r):Yb.includes(n)?e=new DragEvent(n,r):jb.includes(n)?e=new Event(n,r):e=new CustomEvent(n,r)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function Va(n,t,e){if(n)if(n.dispatchEvent)n.dispatchEvent(e);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function Vb(n,t){const e=n.target,r=mi(t);Va(e,t,r)}function Gb(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const r=mi(e);r.view=n.view||window,r.detail=1,r.screenX=t.screenX||0,r.screenY=t.screenY||0,r.clientX=t.clientX||0,r.clientY=t.clientY||0,r.pageX=n.pageX,r.pageY=n.pageY,r.ctrlKey=!!n.ctrlKey,r.altKey=!!n.altKey,r.shiftKey=!!n.shiftKey,r.metaKey=!!n.metaKey,r.button=0,r.relatedTarget=null,r._constructed=!0,Va(t,e,r)}}function Xb(n,t){const e=n.changedTouches[0];return mi(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function Hb(n,t,e,r,s){const i=t/e;let o=0,a=0;switch(n){case"aspectFit":i>=1?(o=r,a=o/i,a>s&&(a=s,o=a*i)):(a=s,o=a*i,o>r&&(o=r,a=o/i));break;case"aspectFill":i>=1?(a=s,o=a*i):(o=r,a=o/i);break;case"widthFix":o=r,a=o/i;break;case"heightFix":a=s,o=a*i;break;case"scaleToFill":default:o=r,a=s;break}return{width:o,height:a}}function pf(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const Wb=n=>{const t=n.width,e=n.height,r=t*e*3,s=r+54,i=[66,77,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,r&255,r>>8&255,r>>16&255,r>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=n.data;let h="";const u=t<<2;let l=e;const d=String.fromCharCode;do{const p=u*(l-1);let m="";for(let v=0;v<t;v++){const g=v<<2;m+=d(c[p+g+2])+d(c[p+g+1])+d(c[p+g])}for(let v=0;v<a;v++)m+=String.fromCharCode(0);h+=m}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let v=0;v<p.length;v++)m+=String.fromCharCode(p[v]);return btoa(m)}return f(i.concat(o))+f(h)};function qb(n){const{width:t,height:e}=n,r=document.createElement("canvas"),s=r.getContext("2d");return r.width=t,r.height=e,s.putImageData(n,0,0,0,0,t,e),r.toDataURL("image/png")}const Jb=(n,t,e)=>{const{width:r,height:s}=n,i=document.createElement("canvas"),o=i.getContext("2d");i.width=r,i.height=s,o.putImageData(n,0,0,0,0,r,s);const a=`image/${t?t.toLowerCase():"png"}`;i.toBlob(c=>{e?.(null,c)},a,1)};function Kb(n,t){return createImageBitmap(n,t)}function Zb(n){const t=[],e=[],r=[];let s=0;for(let c=0,h=n.data.length;c<h;c+=4)t[s]=n.data[c],e[s]=n.data[c+1],r[s]=n.data[c+2],s+=1;const i=Ga(t),o=Ga(e),a=Ga(r);return"rgb("+i+","+o+","+a+")"}function Ga(n){const t={},e=[],r=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let s=0;for(let a=0;a<e.length;a++){s=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(s+=1),r[a]=s}const i=Math.max.apply(null,r);let o=0;for(;o<r.length;o++)if(r[o]===i)return;return e[o]}const Qb=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[(o*e+e-a-1)*4],s[c+1]=t[(o*e+e-a-1)*4+1],s[c+2]=t[(o*e+e-a-1)*4+2],s[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(s,e,r)},tw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[((r-o-1)*e+a)*4],s[c+1]=t[((r-o-1)*e+a)*4+1],s[c+2]=t[((r-o-1)*e+a)*4+2],s[c+3]=t[((r-o-1)*e+a)*4+3]}return new ImageData(s,e,r)},ew=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[(a*e+e-o-1)*4],s[c+1]=t[(a*e+e-o-1)*4+1],s[c+2]=t[(a*e+e-o-1)*4+2],s[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(s,r,e)},nw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[((r-a-1)*e+o)*4],s[c+1]=t[((r-a-1)*e+o)*4+1],s[c+2]=t[((r-a-1)*e+o)*4+2],s[c+3]=t[((r-a-1)*e+o)*4+3]}return new ImageData(s,r,e)},rw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},sw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},iw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,u=(t[c]+t[c+1]+t[c+2])/3>127?255:0;s[c]=u,s[c+1]=u,s[c+2]=u,s[c+3]=t[c+3]}return new ImageData(s,e,r)},ow=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=255-t[c],s[c+1]=255-t[c+1],s[c+2]=255-t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},aw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},cw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},hw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=0,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},uw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},lw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},fw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},dw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;s[c]=t[c],s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},mw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;s[c]=h,s[c+1]=t[c+1],s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},pw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;s[c]=h,s[c+1]=h,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},gw=n=>gf(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),yw=n=>gf(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),bw=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=t[c+2],s[c+3]=255}return new ImageData(s,e,r)},ww=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)s[c]=255,s[c+1]=255,s[c+2]=255,s[c+3]=255;else{const h=yf([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);s[c]=h[0],s[c+1]=h[1],s[c+2]=h[2],s[c+3]=h[3]}}return new ImageData(s,e,r)};function vw(n,t,e,r,s,i=!1,o){const{data:a,width:c,height:h}=n;let u=s,l=r,d=t,f=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),u+d>c&&(d=c-u),l+f>h&&(f=h-l),i){const p=new Uint8ClampedArray(a.length);for(let v=0;v<h;v++)for(let g=0;g<c;g++){const b=(v*c+g)*4;g>=u&&g<=u+d&&v>=l&&v<=l+f?(p[b]=a[b],p[b+1]=a[b+1],p[b+2]=a[b+2],p[b+3]=a[b+3]):(p[b]=255,p[b+1]=255,p[b+2]=255,p[b+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let v=l;v<=l+f;v++)for(let g=u;g<=u+d;g++){const b=((v-l)*d+g-u)*4,x=(v*c+g)*4;p[b]=a[x],p[b+1]=a[x+1],p[b+2]=a[x+2],p[b+3]=a[x+3]}return new ImageData(p,d,f)}}function xw(n,t,e,r){const{data:s,width:i,height:o}=n;let a=t;a>Math.floor(i/2)&&(a=Math.floor(i/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const c=new Uint8ClampedArray(s.length);for(let u=0;u<o;u++)for(let l=0;l<i;l++){const d=(u*i+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>i-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=r||e.toUpperCase()==="PNG"?0:255):(c[d]=s[d],c[d+1]=s[d+1],c[d+2]=s[d+2],c[d+3]=r||e.toUpperCase()==="PNG"?s[d+3]:255)}return new ImageData(c,i,o)}function _w(n,t,e,r,s,i=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=i,a.height=i,c.drawImage(o,0,0,t,e,0,0,r,s),c.getImageData(0,0,r,s)}function Sw(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;i[h]=Math.max(Math.min(e[h]+t,255),0),i[h+1]=Math.max(Math.min(e[h+1]+t,255),0),i[h+2]=Math.max(Math.min(e[h+2]+t,255),0),i[h+3]=e[h+3]}return new ImageData(i,r,s)}function Ew(n,t,e=!1){const{data:r,width:s,height:i}=n,o=new Uint8ClampedArray(r.length);for(let c=0;c<i;c++)for(let h=0;h<s;h++){const u=(c*s+h)*4;r[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=r[u],o[u+1]=r[u+1],o[u+2]=r[u+2]);let l=r[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,s,i)}function Cw(n,t,e,r){const{data:s,width:i,height:o}=n,{data:a,width:c,height:h}=t;let u=e,l=r;e+h>o&&(u=o-h),r+c>i&&(l=i-c);const d=new Uint8ClampedArray(s.length);for(let p=0;p<o;p++)for(let m=0;m<i;m++){const v=(p*i+m)*4;if(m<l||m>l+c||p<=u||p>=u+h)d[v]=s[v],d[v+1]=s[v+1],d[v+2]=s[v+2],d[v+3]=s[v+3];else{const g=(p*i+m-((u+1)*i+(p-(u+1))*(i-c))+c-l-1)*4,b=[a[g],a[g+1],a[g+2],a[g+3]],x=[s[v],s[v+1],s[v+2],s[v+3]],w=yf(b,x);d[v]=w[0],d[v+1]=w[1],d[v+2]=w[2],d[v+3]=w[3]}}return new ImageData(d,i,o)}function Tw(n,t,e,r,s,i=10){const{data:o,width:a,height:c}=n;let h=s,u=r,l=t,d=e;h<0?h=0:h>a&&(h=a),u<0?u=0:u>c&&(u=c),l<1?l=1:l>a&&(l=a),d<1?d=1:d>c&&(d=c),h+l>a&&(l=a-h),u+d>c&&(d=c-u);const f=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let v=0;v<a;v++){const g=(m*a+v)*4;if(v>=h&&v<=h+l&&m>=u&&m<=u+d){const b=Math.floor((v-h)/i),x=Math.floor((m-u)/i);let w=Math.floor(i*(b+1)-i/2+h),C=Math.floor(i*(x+1)-i/2+u);w>a-1&&(w=a-1),C>c-1&&(C=c-1);const E=(C*a+w)*4;f[g]=o[E],f[g+1]=o[E+1],f[g+2]=o[E+2],f[g+3]=o[E+3]}else f[g]=o[g],f[g+1]=o[g+1],f[g+2]=o[g+2],f[g+3]=o[g+3]}return new ImageData(f,a,c)}function Pw(n,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:r,width:s,height:i}=n,{data:o}=t,a=new Uint8ClampedArray(r.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<i;l++)for(let d=0;d<s;d++){const f=(l*s+d)*4,p=o[f],m=o[f+1],v=o[f+2],g=o[f+3];p===c.r&&m===c.g&&v===c.b&&g===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=r[f],a[f+1]=r[f+1],a[f+2]=r[f+2],a[f+3]=r[f+3])}return new ImageData(a,s,i)}return n}function gf(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===r-1||a===0||a===s-1?i[l]=e[l]:i[l]=t[0]*e[l-r*4-4]+t[1]*e[l-r*4]+t[2]*e[l-r*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+r*4-4]+t[7]*e[l+r*4]+t[8]*e[l+r*4+4]}i[h+3]=e[h+3]}return new ImageData(i,r,s)}function yf(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],r=t[3];if(e===255||r===0)return n;if(e===0)return t;{const s=e/255,i=r/255,o=Math.max(Math.min(Math.floor(n[0]*s+t[0]*i*(1-s)),255),0),a=Math.max(Math.min(Math.floor(n[1]*s+t[1]*i*(1-s)),255),0),c=Math.max(Math.min(Math.floor(n[2]*s+t[2]*i*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+i*(1-s))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const Xa=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,r=t.length){for(let s=0;s<r;s++)this.writeByte(t[s+e])},writeString(t){for(let e=0,r=t.length;e<r;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,r=n.length;e<r;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},bf=function(){let n=0,t=0,e=0,r="";const s=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},i=function(o){r+=String.fromCharCode(s(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)i(n>>>t-6),t-=6},flush(){if(t>0&&(i(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)r+="="}},toString(){return r}}},wf=function(n,t,e){const r=new Array(n*n),s=function(a){const c=a;let h=0,u=0;return{write(l,d){if(l>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(l<<h|u)),d-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+d},flush(){h>0&&c.writeByte(u)}}},i=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let v=0;v<c;v++)l.add(String.fromCharCode(v));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const d=Xa(),f=s(d);f.write(c,u);let p=0,m=String.fromCharCode(r[p]);for(p+=1;p<r.length;){const v=String.fromCharCode(r[p]);p+=1,l.contains(m+v)?m=m+v:(f.write(l.indexOf(m),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(m+v)),m=v)}return f.write(l.indexOf(m),u),f.write(h,u),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){r[c*n+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(n),a.writeShort(n),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(ir("0x"+t[1]+t[2])),a.writeByte(ir("0x"+t[3]+t[4])),a.writeByte(ir("0x"+t[5]+t[6])),a.writeByte(ir("0x"+e[1]+e[2])),a.writeByte(ir("0x"+e[3]+e[4])),a.writeByte(ir("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(n),a.writeShort(n),a.writeByte(0);const c=2,h=i(c);a.writeByte(c);let u=0;for(;h.length-u>255;)a.writeByte(255),a.writeBytes(h,u,255),u+=255;a.writeByte(h.length-u),a.writeBytes(h,u,h.length-u),a.writeByte(0),a.writeString(";")}}},vf=function(n,t,e,r){const s=wf(n,t,e);for(let h=0;h<n;h++)for(let u=0;u<n;u++)s.setPixel(u,h,r(u,h));const i=Xa();s.write(i);const o=bf(),a=i.toByteArray();for(let h=0,u=a.length;h<u;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},pe={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Gr={M:0,L:1,H:2,Q:3},xn={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Vt={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Vt.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Vt.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Vt.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Vt.EXP_TABLE[n]=Vt.EXP_TABLE[n-4]^Vt.EXP_TABLE[n-5]^Vt.EXP_TABLE[n-6]^Vt.EXP_TABLE[n-8];for(let n=0;n<255;n++)Vt.LOG_TABLE[Vt.EXP_TABLE[n]]=n;const At={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){let t=n<<10;for(;At.getBCHDigit(t)-At.getBCHDigit(At.G15)>=0;)t^=At.G15<<At.getBCHDigit(t)-At.getBCHDigit(At.G15);return(n<<10|t)^At.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;At.getBCHDigit(t)-At.getBCHDigit(At.G18)>=0;)t^=At.G18<<At.getBCHDigit(t)-At.getBCHDigit(At.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return At.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case xn.PATTERN000:return(t+e)%2==0;case xn.PATTERN001:return t%2==0;case xn.PATTERN010:return e%3==0;case xn.PATTERN011:return(t+e)%3==0;case xn.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case xn.PATTERN101:return t*e%2+t*e%3==0;case xn.PATTERN110:return(t*e%2+t*e%3)%2==0;case xn.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new pr([1],0);for(let e=0;e<n;e++)t=t.multiply(new pr([1,Vt.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case pe.MODE_NUMBER:return 10;case pe.MODE_ALPHA_NUM:return 9;case pe.MODE_8BIT_BYTE:return 8;case pe.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case pe.MODE_NUMBER:return 12;case pe.MODE_ALPHA_NUM:return 11;case pe.MODE_8BIT_BYTE:return 16;case pe.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case pe.MODE_NUMBER:return 14;case pe.MODE_ALPHA_NUM:return 13;case pe.MODE_8BIT_BYTE:return 16;case pe.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(i,o);for(let h=-1;h<=1;h++)if(!(i+h<0||t<=i+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==n.isDark(i+h,o+u)&&a++;a>5&&(e+=3+a-5)}for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){let a=0;n.isDark(i,o)&&a++,n.isDark(i+1,o)&&a++,n.isDark(i,o+1)&&a++,n.isDark(i+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(i,o)&&!n.isDark(i,o+1)&&n.isDark(i,o+2)&&n.isDark(i,o+3)&&n.isDark(i,o+4)&&!n.isDark(i,o+5)&&n.isDark(i,o+6)&&(e+=40);for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(o,i)&&!n.isDark(o+1,i)&&n.isDark(o+2,i)&&n.isDark(o+3,i)&&n.isDark(o+4,i)&&!n.isDark(o+5,i)&&n.isDark(o+6,i)&&(e+=40);let r=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++)n.isDark(o,i)&&r++;const s=Math.abs(100*r/t/t-50)/5;return e+=s*10,e}};class pr{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let r=0;for(;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(let s=0;s<t.length-r;s++)this.num[s]=t[s+r]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let r=0;r<this.getLength();r++)for(let s=0;s<t.getLength();s++)e[r+s]^=Vt.gexp(Vt.glog(this.get(r))+Vt.glog(t.get(s)));return new pr(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Vt.glog(this.get(0))-Vt.glog(t.get(0)),r=new Array(this.getLength());for(let s=0;s<this.getLength();s++)r[s]=this.get(s);for(let s=0;s<t.getLength();s++)r[s]^=Vt.gexp(Vt.glog(t.get(s))+e);return new pr(r,0).mod(t)}}class tn{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const r=tn.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const s=r.length/3,i=[];for(let o=0;o<s;o++){const a=r[o*3+0],c=r[o*3+1],h=r[o*3+2];for(let u=0;u<a;u++)i.push(new tn(c,h))}return i}static getRsBlockTable(t,e){switch(e){case Gr.L:return tn.RS_BLOCK_TABLE[(t-1)*4+0];case Gr.M:return tn.RS_BLOCK_TABLE[(t-1)*4+1];case Gr.Q:return tn.RS_BLOCK_TABLE[(t-1)*4+2];case Gr.H:return tn.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class xf{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class Aw{mode;data;constructor(t){this.mode=pe.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data.charCodeAt(e),8)}}class _n{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Gr[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new Aw(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=tn.getRSBlocks(t,this.errorCorrectLevel),r=new xf;let s=0;for(let i=0;i<e.length;i++)s+=e[i].dataCount;for(let i=0;i<this.dataList.length;i++){const o=this.dataList[i];r.put(o.mode,4),r.put(o.getLength(),At.getLengthInBits(o.mode,t)),o.write(r)}if(r.getLengthInBits()<=s*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[r][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=_n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(let s=-1;s<=7;s++)e+s<=-1||this.moduleCount<=e+s||(0<=r&&r<=6&&(s==0||s==6)||0<=s&&s<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=s&&s<=4?this.modules[t+r][e+s]=!0:this.modules[t+r][e+s]=!1)}getBestMaskPattern(){let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const s=At.getLostPoint(this);(r==0||t>s)&&(t=s,e=r)}return e}createMovieClip(t,e,r){const s=t.createEmptyMovieClip(e,r),i=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*i;for(let c=0;c<this.modules[o].length;c++){const h=c*i;this.modules[o][c]&&(s.beginFill(0,100),s.moveTo(h,a),s.lineTo(h+i,a),s.lineTo(h+i,a+i),s.lineTo(h,a+i),s.endFill())}}return s}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=At.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let r=0;r<t.length;r++){const s=t[e],i=t[r];if(this.modules[s][i]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[s+o][i+a]=!0:this.modules[s+o][i+a]=!1}}setupTypeNumber(t){const e=At.getBCHTypeNumber(this.typeNumber);for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=s}for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=s}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,s=At.getBCHTypeInfo(r);for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,s=this.moduleCount-1,i=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[s][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>i&1)==1),At.getMask(e,s,a-c)&&(h=!h),this.modules[s][a-c]=h,i--,i==-1&&(o++,i=7)}if(s+=r,s<0||this.moduleCount<=s){s-=r,r=-r;break}}}static createData(t,e,r){const s=tn.getRSBlocks(t,e),i=new xf;for(let a=0;a<r.length;a++){const c=r[a];i.put(c.mode,4),i.put(c.getLength(),At.getLengthInBits(c.mode,t)),c.write(i)}let o=0;for(let a=0;a<s.length;a++)o+=s[a].dataCount;if(i.getLengthInBits()>o*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+o*8+")");for(i.getLengthInBits()+4<=o*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=o*8||(i.put(_n.PAD0,8),i.getLengthInBits()>=o*8));)i.put(_n.PAD1,8);return _n.createBytes(i,s)}static createBytes(t,e){let r=0,s=0,i=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const d=e[l].dataCount,f=e[l].totalCount-d;s=Math.max(s,d),i=Math.max(i,f),o[l]=new Array(d);for(let g=0;g<o[l].length;g++)o[l][g]=255&t.buffer[g+r];r+=d;const p=At.getErrorCorrectPolynomial(f),v=new pr(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let g=0;g<a[l].length;g++){const b=g+v.getLength()-a[l].length;a[l][g]=b>=0?v.get(b):0}}let c=0;for(let l=0;l<e.length;l++)c+=e[l].totalCount;const h=new Array(c);let u=0;for(let l=0;l<s;l++)for(let d=0;d<e.length;d++)l<o[d].length&&(h[u++]=o[d][l]);for(let l=0;l<i;l++)for(let d=0;d<e.length;d++)l<a[d].length&&(h[u++]=a[d][l]);return h}}const _f=Math.ceil,Xr=Math.floor,Sf=Math.round;function Mw(n,t){const e=du(n),r=t?.ecc||"H",s=t?.size||256,i=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new _n(i,r);h.addData(e),h.make();const u=h.getModuleCount(),l=(s-o*2)/u,d=o,f=s-o;return vf(s,a,c,function(p,m){if(d<=p&&p<f&&d<=m&&m<f){const v=Xr((p-d)/l),g=Xr((m-d)/l);return h.isDark(g,v)?0:1}else return 1})}function Dw(n,t){const e=t.x||0,r=t.y||0,s=du(n),i=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Xr(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",d=new _n(h,o);d.addData(s),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;i.fillStyle=l,i.fillRect(e,r,a,a);for(let m=0;m<f;m++)for(let v=0;v<f;v++){const g=_f((v+1)*p)-Xr(v*p),b=_f((m+1)*p)-Xr(m*p);i.fillStyle=d.isDark(m,v)?u:l,i.fillRect(e+Sf(v*p)+c,r+Sf(m*p)+c,g,b)}}function pt(n){return n*Math.PI/180}function Gt(n){return n*180/Math.PI}function gr(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function Sn(n,t,e,r){return gr(e-n,r-t)}function ge(n,t,e,r){let s=Math.atan2(r-t,e-n);return s<0&&(s+=Math.PI*2),s}function En(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function Ow(n,t,e){if(typeof e=="number"){const r=gr(n,t,e);return{x:n/=r,y:t/=r,z:e/=r}}else{const r=gr(n,t);return{x:n/=r,y:t/=r}}}function Iw(n,t,e,r,s=10){if(Math.abs(e-n)<s&&Math.abs(r-t)<s)return"no";const i=Gt(ge(n,t,e,r));return i>=-135&&i<=-45?"up":i>45&&i<135?"down":i>=135&&i<=180||i>=-180&&i<-135?"left":"right"}class pi{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new pi(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y;return this.x=t.m11*e+t.m21*r+t.m31,this.y=t.m12*e+t.m22*r+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Z(this.x,t.x,e.x),this.y=Z(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=Z(this.x,t,e),this.y=Z(this.y,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Z(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return Ef.copy(this).projectOnVector(t),this.sub(Ef)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Z(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}rotateAround(t,e){const r=Math.cos(e),s=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*r-o*s+t.x,this.y=i*s+o*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Be{x=0;y=0;z=0;constructor(t=0,e=0,r=0){this.x=t,this.y=e,this.z=r}set(t=0,e=0,r=0){return this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Be(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyMatrix3(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[3]*r+i[6]*s,this.y=i[1]*e+i[4]*r+i[7]*s,this.z=i[2]*e+i[5]*r+i[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=t.value,o=1/(i[3]*e+i[7]*r+i[11]*s+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*s+i[12])*o,this.y=(i[1]*e+i[5]*r+i[9]*s+i[13])*o,this.z=(i[2]*e+i[6]*r+i[10]*s+i[14])*o,this}transformDirection(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[4]*r+i[8]*s,this.y=i[1]*e+i[5]*r+i[9]*s,this.z=i[2]*e+i[6]*r+i[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Z(this.x,t.x,e.x),this.y=Z(this.y,t.y,e.y),this.z=Z(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=Z(this.x,t,e),this.y=Z(this.y,t,e),this.z=Z(this.z,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Z(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,s=t.y,i=t.z,o=e.x,a=e.y,c=e.z;return this.x=s*c-i*a,this.y=i*o-r*c,this.z=r*a-s*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return Wa.copy(this).projectOnVector(t),this.sub(Wa)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Wa.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(Z(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,s=this.z-t.z;return e*e+r*r+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),r=this.setFromMatrix4Column(t,1).length(),s=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=r,this.z=s,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,r=Math.sqrt(1-e*e);return this.x=r*Math.cos(t),this.y=e,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Ha{x=0;y=0;z=0;w=1;constructor(t=0,e=0,r=0,s=1){this.x=t,this.y=e,this.z=r,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,r=0,s=1){return this.x=t,this.y=e,this.z=r,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Ha(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=this.w,o=t.value;return this.x=o[0]*e+o[4]*r+o[8]*s+o[12]*i,this.y=o[1]*e+o[5]*r+o[9]*s+o[13]*i,this.z=o[2]*e+o[6]*r+o[10]*s+o[14]*i,this.w=o[3]*e+o[7]*r+o[11]*s+o[15]*i,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromRotationMatrix4(t){let e,r,s,i;const c=t.value,h=c[0],u=c[4],l=c[8],d=c[1],f=c[5],p=c[9],m=c[2],v=c[6],g=c[10];if(Math.abs(u-d)<.01&&Math.abs(l-m)<.01&&Math.abs(p-v)<.01){if(Math.abs(u+d)<.1&&Math.abs(l+m)<.1&&Math.abs(p+v)<.1&&Math.abs(h+f+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,w=(f+1)/2,C=(g+1)/2,E=(u+d)/4,O=(l+m)/4,U=(p+v)/4;return x>w&&x>C?x<.01?(r=0,s=.707106781,i=.707106781):(r=Math.sqrt(x),s=E/r,i=O/r):w>C?w<.01?(r=.707106781,s=0,i=.707106781):(s=Math.sqrt(w),r=E/s,i=U/s):C<.01?(r=.707106781,s=.707106781,i=0):(i=Math.sqrt(C),r=O/i,s=U/i),this.set(r,s,i,e),this}let b=Math.sqrt((v-p)*(v-p)+(l-m)*(l-m)+(d-u)*(d-u));return Math.abs(b)<.001&&(b=1),this.x=(v-p)/b,this.y=(l-m)/b,this.z=(d-u)/b,this.w=Math.acos((h+f+g-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Z(this.x,t.x,e.x),this.y=Z(this.y,t.y,e.y),this.z=Z(this.z,t.z,e.z),this.w=Z(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=Z(this.x,t,e),this.y=Z(this.y,t,e),this.z=Z(this.z,t,e),this.w=Z(this.w,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Z(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this.w=t.w+(e.w-t.w)*r,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const Ef=new pi,Wa=new Be,Cf=Rw("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Rw(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function re(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function gi(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function kw(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function Lw(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Hr={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let yi=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",re("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}},qa=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},Tf=class iu{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=r),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Hr);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=Hr[s].canvas}}__getStyleState(){const t={},e=Object.keys(Hr);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(Hr);for(let i=0;i<s.length;i++){const o=Hr[s[i]],a=this[s[i]];if(o.apply){if(a instanceof qa){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,re("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof yi)e.setAttribute(o.apply,re("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,re("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(Cf);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=Cf[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(re("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(re("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(re("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(re("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(re("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(re("L {x} {y}",this.__currentPosition)):this.__addPathCommand(re("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(re("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(re("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],g=[h[1],-h[0]],b=function(C){const E=C[0];return C[1]>=0?Math.acos(E):-Math.acos(E)},x=b(v),w=b(g);this.lineTo(p+v[0]*i,m+v[1]*i),this.arc(p,m,i,x,w)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:gi(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new yi(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:gi(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new yi(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":kw(this.textAlign),"dominant-baseline":Lw(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(re("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=gi(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",re("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,v;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+r+", "+s+")";if(e instanceof iu){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=gi(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof iu&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new qa(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Ja=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Tf({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Ka=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=ge(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),r=Math.min(this.y,this.toY),s=Math.max(this.x,this.toX),i=Math.max(this.y,this.toY);return{x:e,y:r,width:s-e,height:i-r}}else{const e=Math.sin(t),r=Math.cos(t),s=r*this.x-e*this.y,i=r*this.toX-e*this.toY,o=r*this.y+e*this.x,a=r*this.toY+e*this.toX;return{x:Math.min(s,i),y:Math.min(o,a),width:Math.max(s,i)-Math.min(s,i),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const Nw=class extends Ka{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const H=Math.sqrt(m);throw i=H*i,o=H*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const v=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,b=g*v*i*p/o,x=g*v*-o*f/i,w=(t+r)/2,C=(e+s)/2,E=Math.cos(u)*b-Math.sin(u)*x+w,O=Math.sin(u)*b+Math.cos(u)*x+C,U=(H,V,lt,yt)=>(H*yt>=V*lt?1:-1)*Math.acos((H*lt+V*yt)/(Math.sqrt(H*H+V*V)*Math.sqrt(lt*lt+yt*yt))),R=U(1,0,t-E,e-O)-u,j=U(t-E,e-O,r-E,s-O);return[E,O,i,o,u,R,R+j]}},zw=class extends Ka{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let r,s,i,o;for(let h=0;h<2;++h)r=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,s=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,i=h==0?this.x:this.y,Math.abs(r)>1e-12&&(o=-s/(2*r),0<o&&o<1&&[t,e][h].push(r*o*o+s*o+i));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},Cn=class Is extends Ka{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),r=this.x-this.c1x,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),r=this.y-this.c1y,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t,Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let m=p+1;m<l;m++)h[p].X===h[m].X&&h[p].Y===h[m].Y&&(m=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,v=this.base3(m,t,r,i,a),g=this.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+g*g)}return u*f}length(t=1){return Is.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Is.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=Is.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=Is.bezlen(e,r,s,i,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,v=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,b=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y:g},alpha:b}}},Wr=Math.PI*2;function Pf(n,t,e,r){const s=n*r-t*e<0?-1:1;let i=n*e+t*r;return i>1&&(i=1),i<-1&&(i=-1),s*Math.acos(i)}function Fw(n,t,e,r,s,i,o,a,c,h){const u=h*(n-e)/2+c*(t-r)/2,l=-c*(n-e)/2+h*(t-r)/2,d=o*o,f=a*a,p=u*u,m=l*l;let v=d*f-d*m-f*p;v<0&&(v=0),v/=d*m+f*p,v=Math.sqrt(v)*(s===i?-1:1);const g=v*o/a*l,b=v*-a/o*u,x=h*g-c*b+(n+e)/2,w=c*g+h*b+(t+r)/2,C=(u-g)/o,E=(l-b)/a,O=(-u-g)/o,U=(-l-b)/a,R=Pf(1,0,C,E);let j=Pf(C,E,O,U);return i===0&&j>0&&(j-=Wr),i===1&&j<0&&(j+=Wr),[x,w,R,j]}function Bw(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),s=Math.sin(n),i=Math.cos(n+t),o=Math.sin(n+t);return[r,s,r-s*e,s+r*e,i+o*e,o-i*e,i,o]}function bi(n,t,e,r,s,i,o,a,c){const h=Math.sin(c*Wr/360),u=Math.cos(c*Wr/360),l=u*(n-e)/2+h*(t-r)/2,d=-h*(n-e)/2+u*(t-r)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=Fw(n,t,e,r,s,i,o,a,h,u),m=[];let v=p[2],g=p[3];const b=Math.max(Math.ceil(Math.abs(g)/(Wr/4)),1);g/=b;for(let x=0;x<b;x++)m.push(Bw(v,g)),v+=g;return m.map(x=>{for(let w=0;w<x.length;w+=2){let C=x[w+0],E=x[w+1];C*=o,E*=a;const O=u*C-h*E,U=h*C+u*E;x[w+0]=O+p[0],x[w+1]=U+p[1]}return x})}function Af(n,t,e,r,s,i,o,a,c,h){const u=Math.PI*120/180,l=Math.PI/180*(+s||0);let d=[],f;const p=function(mt,ct,st){const Ct=mt*Math.cos(st)-ct*Math.sin(st),$=mt*Math.sin(st)+ct*Math.cos(st);return{x:Ct,y:$}};let m,v,g,b;if(h)m=h[0],v=h[1],g=h[2],b=h[3];else{f=p(n,t,-l),n=f.x,t=f.y,f=p(a,c,-l),a=f.x,c=f.y;const mt=(n-a)/2,ct=(t-c)/2;let st=mt*mt/(e*e)+ct*ct/(r*r);st>1&&(st=Math.sqrt(st),e=st*e,r=st*r);const Ct=e*e,$=r*r,z=(i==o?-1:1)*Math.sqrt(Math.abs((Ct*$-Ct*ct*ct-$*mt*mt)/(Ct*ct*ct+$*mt*mt)));g=z*e*ct/r+(n+a)/2,b=z*-r*mt/e+(t+c)/2,m=Math.asin(Number(((t-b)/r).toFixed(9))),v=Math.asin(Number(((c-b)/r).toFixed(9))),m=n<g?Math.PI-m:m,v=a<g?Math.PI-v:v,m<0&&(m=Math.PI*2+m),v<0&&(v=Math.PI*2+v),o&&m>v&&(m=m-Math.PI*2),!o&&v>m&&(v=v-Math.PI*2)}let x=v-m;if(Math.abs(x)>u){const mt=v,ct=a,st=c;v=m+u*(o&&v>m?1:-1),a=g+e*Math.cos(v),c=b+r*Math.sin(v),d=Af(a,c,e,r,s,0,o,ct,st,[v,mt,g,b])}x=v-m;const w=Math.cos(m),C=Math.sin(m),E=Math.cos(v),O=Math.sin(v),U=Math.tan(x/4),R=4/3*e*U,j=4/3*r*U,H=[n,t],V=[n+R*C,t-j*w],lt=[a+R*O,c-j*E],yt=[a,c];return V[0]=2*H[0]-V[0],V[1]=2*H[1]-V[1],h?[[...V,...lt,...yt]].concat(d):[[...V,...lt,...yt]].concat(d).map(mt=>{const ct=[];for(let st=0,Ct=mt.length;st<Ct;st++)ct[st]=st%2?p(mt[st-1],mt[st],l).y:p(mt[st],mt[st+1],l).x;return ct})}function qr(n,t,e,r,s,i){return[n/3+.6666666666666666*e,t/3+.6666666666666666*r,s/3+.6666666666666666*e,i/3+.6666666666666666*r,s,i]}function Wn(n,t,e,r){return[n,t,e,r,e,r]}const Jr={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Tn(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function Za(){return Tn("path")}const Mf=n=>n instanceof SVGElement&&n.tagName==="path";function Df(n,t="shape"){return Ah(Al(n),`${t}.svg`)}function $w(n,t="shape"){return Ah(Ro(n),`${t}.svg`)}function Uw(n){return xa(n)}function Qa(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function tc(n){return n.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function wi(n){const t=[];return Qa(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,r,s)=>{let i=r.toLowerCase();const o=vu(s);for(i=="m"&&o.length>Jr[i]&&(t.push([r,...o.splice(0,Jr[i])]),i="l",r=r=="m"?"l":"L");o.length;){if(o.length<Jr[i])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${r} } args:{ ${o} }`);t.push([r,...o.splice(0,Jr[i])])}return i=="z"&&t.push([r]),""}),t}function vi(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toUpperCase();if(o!=a)switch(i[0]=a,o){case"a":i[6]+=r,i[7]+=s;break;case"v":i[1]+=s;break;case"h":i[1]+=r;break;default:for(let c=1;c<i.length;)i[c++]+=r,i[c++]+=s}switch(a){case"Z":r=t,s=e;break;case"H":r=i[1];break;case"V":s=i[1];break;case"M":r=t=i[1],s=e=i[2];break;default:r=i[i.length-2],s=i[i.length-1]}return i})}function Yw(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toLowerCase();if(o!=a)switch(i[0]=a,o){case"A":i[6]-=r,i[7]-=s;break;case"V":i[1]-=s;break;case"H":i[1]-=r;break;default:for(let c=1;c<i.length;)i[c++]-=r,i[c++]-=s}switch(a){case"z":r=t,s=e;break;case"h":r+=i[1];break;case"v":s+=i[1];break;case"m":r+=i[1],s+=i[2],t+=i[1],e+=i[2];break;default:r+=i[i.length-2],s+=i[i.length-1]}return i})}function ec(n){const t=[];let e=0,r=0,s=0,i=0,o=0,a=0,c=0,h=0,u;for(let l=0,d=n.length;l<d;l++){let f=n[l];const p=f[0];switch(p){case"M":e=f[1],r=f[2];break;case"A":const m=bi(s,i,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!m.length)continue;m.forEach((b,x)=>{const[w,C,E,O,U,R,j,H]=b;f=["C",E,O,U,R,j,H],x<m.length-1&&t.push(f)});break;case"S":let v=s,g=i;(u=="C"||u=="S")&&(v+=v-c,g+=g-h),f=["C",v,g,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=s*2-o,a=i*2-a):(o=s,a=i),f=["C",...qr(s,i,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...qr(s,i,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...Wn(s,i,f[1],f[2])];break;case"H":f=["C",...Wn(s,i,f[1],i)];break;case"V":f=["C",...Wn(s,i,s,f[1])];break;case"Z":f=["C",...Wn(s,i,e,r)];break}u=p,s=f[f.length-2],i=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=s,h=i),t.push(f)}return t}function jw(n){const t=[];for(let e=0,r=n.length;r-2>e;e+=2){let s;e==0?s=[{x:n[e],y:n[e+1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}]:r-4==e?s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+2],y:n[e+3]}]:s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}];const i=[{x:s[1].x,y:s[1].y},{x:(-s[0].x+6*s[1].x+s[2].x)/6,y:(-s[0].y+6*s[1].y+s[2].y)/6},{x:(s[1].x+6*s[2].x-s[3].x)/6,y:(s[1].y+6*s[2].y-s[3].y)/6},{x:s[2].x,y:s[2].y}];t.push(["C",i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y])}return t}function Vw(n){const t=[];let e=["L",0,0],r;for(let s=0,i=n.length;s<i;s++){const o=n[s];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",o[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],o[1]]);break;default:t.push(o)}}return t}function Gw(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,r=0,s=0;for(let i=0,o=n.length;i<o;i++){const a=n[i],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(r=2*Number(e[c.x+2])-Number(e[c.x]),s=2*Number(e[c.x+3])-Number(e[c.x+1])):(r=Number(e[e.length-2]),s=Number(e[e.length-1]))),a.splice(1,0,r,s)),e=a}return n}let Xw=class pn{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(wi(t),e):t instanceof pn?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const r=ec(vi(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let s=!1;for(let i=0,o=r.length;i<o;i++){const a=r[i];if(a[0]=="M"){s||(s=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new Cn({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(i=>{({x:i.x,y:i.y}=e.transformPoint({x:i.x,y:i.y})),{x:i.c1x,y:i.c1y}=e.transformPoint({x:i.c1x,y:i.c1y}),{x:i.c2x,y:i.c2y}=e.transformPoint({x:i.c2x,y:i.c2y}),{x:i.toX,y:i.toY}=e.transformPoint({x:i.toX,y:i.toY})}))}static fromPolymorphPoints(t){const e=new pn;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let r=2,s=t.length;r+5<s;r+=6)e.appendLine(new Cn({c1x:t[r],c1y:t[r+1],c2x:t[r+2],c2y:t[r+3],toX:t[r+4],toY:t[r+5]}));return e}static fromLines(t){const e=new pn;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let r=0,s=t.length;r<s;r++)e.appendLine(t[r]);return e}appendLine(t){if(t instanceof Nw){bi(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,v,g]=h;this.normalizedLines.push(new Cn({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:g})),this.prevPathX=v,this.prevPathY=g});return}let e,r,s,i,o,a;t instanceof Cn?(e=t.c1x,r=t.c1y,s=t.c2x,i=t.c2y,o=t.toX,a=t.toY):t instanceof zw?[e,r,s,i,o,a]=qr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=Wn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Cn({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform(),s=[];s.push(["M",t,e]);for(let i=0,o=r.length;i<o;i++)s.push(...r[i].toSVGPathData());return s}toSVGPathD(){return tc(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform();t.beginPath(),t.moveTo(e,r),s.forEach(i=>{i.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],r=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min.apply(0,e),i=Math.min.apply(0,r),o=Math.max.apply(0,e),a=Math.max.apply(0,r);return{x:s,y:i,width:o-s,height:a-i}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new qt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,r=this.startPathY;({x:e,y:r}=t.transformPoint({x:e,y:r}));const s=[];return this.normalizedLines.forEach(i=>{let o=i.x,a=i.y,c=i.c1x,h=i.c1y,u=i.c2x,l=i.c2y,d=i.toX,f=i.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:d,y:f}=t.transformPoint({x:d,y:f}),s.push(new Cn({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:d,toY:f}))}),{startPathX:e,startPathY:r,normalizedLines:s}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,r)=>e+=r.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let r=0;const s=e.length;for(let i=0;i<s;i++){const o=e[i],a=o.length();if(r+a>=t)return o.getPointAtSegmentLength(t-r);r+=a}return e[s-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform(),i=s.length;if(i===0)return{x:e,y:r};if(i===1)return s[0].interpolate(t);{let o=t*i,a=s[0];if(o--,o>1)for(let c=1;c<i&&(a=s[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const r=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(r,t):r}}getSubpathsAtLength(t,e,r){const{startPathX:s,startPathY:i,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new pn;h.prevPathX=h.startPathX=s,h.prevPathY=h.startPathY=i;for(let u=0,l=o.length;u<l;u++){const d=o[u],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new Cn({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),r)return h;a=h,h.appendLine(new Cn({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=Math.pow(Sn(u.x,u.y,t,e),2);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=Math.pow(Sn(u.x,u.y,t,e),2),d=i+a,f=this.getPointAtLength(d),p=Math.pow(Sn(f.x,f.y,t,e),2);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ge(c.x,c.y,s.x,s.y):ge(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform();return[t,e].concat(r.reduce((s,i)=>s.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let r=t[e-2],s=t[e-1],i=0;for(let o=0;o<e;o+=6)i+=Sn(t[o],t[o+1],r,s),r=t[o],s=t[o+1];return Math.floor(i)}expendFill(t){const e=this.polymorphPoints,r=e.length;let s=t-r;const i=Math.ceil(t/r),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=r-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<i&&s>0;)o.push(["C",d,f,d,f,d,f]),s-=6,p++}return o}static mixPoints(t,e,r){const s=t.length,i=new Array(s);for(let o=0;o<s;o++)i[o]=tt(t[o]+(e[o]-t[o])*r,6);return i}static getPathInterpolator(t,e){return r=>Math.abs(r-0)<Number.EPSILON?t:Math.abs(r-1)<Number.EPSILON?e:pn.fromPolymorphPoints(pn.mixPoints(new pn({d:t}).polymorphPoints,new pn({d:e}).polymorphPoints,r)).toSVGPathData()}};class Kr{static _nextId=0;static nextId(){return Kr._nextId++}}const G={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(n){return 1-G.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?G.Bounce.In(n*2)*.5:G.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(r){return t*Math.random()+e*n(r)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function Of(n){switch(n){case G.Quadratic.In:return G.Quadratic.Out;case G.Quadratic.Out:return G.Quadratic.In;case G.Quadratic.InOut:return G.Quadratic.InOut;case G.Cubic.In:return G.Cubic.Out;case G.Cubic.Out:return G.Cubic.In;case G.Cubic.InOut:return G.Cubic.InOut;case G.Quartic.In:return G.Quartic.Out;case G.Quartic.Out:return G.Quartic.In;case G.Quartic.InOut:return G.Quartic.InOut;case G.Quintic.In:return G.Quintic.Out;case G.Quintic.Out:return G.Quintic.In;case G.Quintic.InOut:return G.Quintic.InOut;case G.Sinusoidal.In:return G.Sinusoidal.Out;case G.Sinusoidal.Out:return G.Sinusoidal.In;case G.Sinusoidal.InOut:return G.Sinusoidal.InOut;case G.Exponential.In:return G.Exponential.Out;case G.Exponential.Out:return G.Exponential.In;case G.Exponential.InOut:return G.Exponential.InOut;case G.Circular.In:return G.Circular.Out;case G.Circular.Out:return G.Circular.In;case G.Circular.InOut:return G.Circular.InOut;case G.Elastic.In:return G.Elastic.Out;case G.Elastic.Out:return G.Elastic.In;case G.Elastic.InOut:return G.Elastic.InOut;case G.Back.In:return G.Back.Out;case G.Back.Out:return G.Back.In;case G.Back.InOut:return G.Back.InOut;case G.Bounce.In:return G.Bounce.Out;case G.Bounce.Out:return G.Bounce.In;case G.Bounce.InOut:return G.Bounce.InOut;default:return n}}const Hw=4,Ww=.001,qw=1e-7,Jw=10,Zr=11,xi=1/(Zr-1),Kw=typeof Float32Array=="function";function If(n,t){return 1-3*t+3*n}function Rf(n,t){return 3*t-6*n}function kf(n){return 3*n}function _i(n,t,e){return((If(t,e)*n+Rf(t,e))*n+kf(t))*n}function Lf(n,t,e){return 3*If(t,e)*n*n+2*Rf(t,e)*n+kf(t)}function Zw(n,t,e,r,s){let i,o,a=0;do o=t+(e-t)/2,i=_i(o,r,s)-n,i>0?e=o:t=o;while(Math.abs(i)>qw&&++a<Jw);return o}function Qw(n,t,e,r){for(let s=0;s<Hw;++s){const i=Lf(t,e,r);if(i===0)return t;const o=_i(t,e,r)-n;t-=o/i}return t}function tv(n){return n}function nc(n,t,e,r){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===r)return tv;const s=Kw?new Float32Array(Zr):new Array(Zr);for(let o=0;o<Zr;++o)s[o]=_i(o*xi,n,e);function i(o){let a=0,c=1;const h=Zr-1;for(;c!==h&&s[c]<=o;++c)a+=xi;--c;const u=(o-s[c])/(s[c+1]-s[c]),l=a+u*xi,d=Lf(l,n,e);return d>=Ww?Qw(o,l,n,e):d===0?l:Zw(o,a,a+xi,n,e)}return o=>o===0||o===1?o:_i(i(o),t,r)}function rc(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function Nf(n){const[t,e,r,s]=rc(n);return[1-r,1-s,1-t,1-e]}function ev(n){return nc(...rc(n))}function nv(n){return nc(...Nf(n))}const en={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let r=t;r>1;r--)e*=r;return n[t]=e,e}}(),Bernstein:function(n,t){const e=en.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,r,s){const i=(e-n)*.5,o=(r-t)*.5,a=s*s,c=s*a;return(2*t-2*e+i+o)*c+(-3*t+3*e-2*i-o)*a+i*s+t},QuadraticBezier:(n,t,e,r)=>{const s=1-r;return s*s*n+2*s*r*t+r*r*e},CubicBezier:(n,t,e,r,s)=>{const i=1-s;return i*i*i*n+3*i*i*s*t+3*i*s*s*e+s*s*s*r}},Linear:function(n,t){const e=n.length-1,r=e*t,s=Math.floor(r),i=en.Utils.Linear;return t<0?i(n[0],n[1],r):t>1?i(n[e],n[e-1],e-r):i(n[s],n[s+1>e?e:s+1],r-s)},Bezier:function(n,t){let e=0;const r=n.length-1,s=Math.pow,i=en.Utils.Bernstein;for(let o=0;o<=r;o++)e+=s(1-t,r-o)*s(t,o)*n[o]*i(r,o);return e},CatmullRom:function(n,t){const e=n.length-1;let r=e*t,s=Math.floor(r);const i=en.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(r=e*(1+t))),i(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],r-s)):t<0?n[0]-(i(n[0],n[0],n[1],n[1],-r)-n[0]):t>1?n[e]-(i(n[e],n[e],n[e-1],n[e-1],r-e)-n[e]):i(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],r-s)}};class zf{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=Dt(),e=!1){const r=Object.keys(this._tweens);for(let s=0;s<r.length;s++){const i=this._tweens[r[s]],o=!e;i&&i.update(t,o)===!1&&!e&&delete this._tweens[r[s]]}return!!Object.keys(this._tweens).length}}const Se=new zf;class sc{constructor(t,e=Se){this._object=t,this._group=e}_id=Kr.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=G.Linear.None;_interpolationFunction=en.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=Dt()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,r,s){for(const i in r){const o=t[i],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(r[i]);if(!(c==="undefined"||c==="function")){if(h){let u=r[i];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),r[i]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[i]=a?[]:{};for(const u in o)e[i][u]=o[u];s[i]=a?[]:{},this._setupProperties(o,e[i],r[i],s[i])}else typeof e[i]>"u"&&(e[i]=o),a||(e[i]*=1),h?s[i]=r[i].slice().reverse():s[i]=e[i]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=Dt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=Dt()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Se){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=G.Linear.None){return this._easingFunction=t,this}interpolation(t=en.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=Dt(),e=!0){if(this._isPaused)return!0;let r,s;const i=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>i)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),s=(t-this._startTime)/this._durationTime,s=this._durationTime===0||s>1?1:s;const o=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,r,s){for(const i in r){if(e[i]===void 0)continue;const o=e[i]||0;let a=r[i];const c=Array.isArray(t[i]),h=Array.isArray(a);!c&&h?t[i]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[i],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[i]=o+(a-o)*s))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],r=this._valuesEnd[t];typeof r=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(r):this._valuesStartRepeat[t]=r,this._valuesEnd[t]=e}}const rv=Kr.nextId,sv=Se.getAll.bind(Se),iv=Se.removeAll.bind(Se),ov=Se.add.bind(Se),av=Se.remove.bind(Se),cv=Se.update.bind(Se),hv={now:Dt,Sequence:Kr,Easing:G,Interpolation:en,Group:zf,Tween:sc,nextId:rv,getAll:sv,removeAll:iv,add:ov,remove:av,update:cv};class ic{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Dt(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=Dt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Qr{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){a1(this.tweens,(e,r)=>t?e.delay>r.delay:e.delay<=r.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(r=>{const s={...r};delete s.tween,s.fromValues={...s.fromValues},s.toValues={...s.toValues},e.push(s)}),e}addTween(t,e,r){const s={fromValues:t,toValues:e,frames:typeof r?.frames=="number"?r.frames:1,delay:typeof r?.delay=="number"?r.delay:this.tweens.length,easeFunction:r?.easeFunction||G.Linear.None,interpolationFunction:r?.interpolationFunction||en.Linear,repeat:typeof r?.repeat=="number"?r.repeat:0,yoyo:r?.yoyo||!1,onStart:r?.onStart||(()=>{}),onUpdate:r?.onUpdate||(()=>{}),onComplete:r?.onComplete||(()=>{})};return this.tweens.push(s),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new ic,r=this.frameDuration;return new Promise(s=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=Xg(i=>{if(!this.isPaused){const a=Math.max(0,i-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*r<=c).forEach(h=>{h.tween||(h.tween=new sc({...h.fromValues}).to({...h.toValues},h.frames*r).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*r>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),_u(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),s()),o})})}isPaused=!1;pausedClock=new ic;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(r=>{e=Math.max(e,r.delay+r.frames),r.easeFunction=Of(r.easeFunction);const s={...r.toValues};r.toValues={...r.fromValues},r.fromValues={...s}}),t.forEach(r=>{r.delay=e-r.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}var oc={exports:{}},rt={};/**
32
+ * @license React
33
+ * react.production.js
34
+ *
35
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */var Ff;function uv(){if(Ff)return rt;Ff=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),d=Symbol.iterator;function f(A){return A===null||typeof A!="object"?null:(A=d&&A[d]||A["@@iterator"],typeof A=="function"?A:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function g(A,L,W){this.props=A,this.context=L,this.refs=v,this.updater=W||p}g.prototype.isReactComponent={},g.prototype.setState=function(A,L){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,L,"setState")},g.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function b(){}b.prototype=g.prototype;function x(A,L,W){this.props=A,this.context=L,this.refs=v,this.updater=W||p}var w=x.prototype=new b;w.constructor=x,m(w,g.prototype),w.isPureReactComponent=!0;var C=Array.isArray;function E(){}var O={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function R(A,L,W){var q=W.ref;return{$$typeof:n,type:A,key:L,ref:q!==void 0?q:null,props:W}}function j(A,L){return R(A.type,L,A.props)}function H(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function V(A){var L={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(W){return L[W]})}var lt=/\/+/g;function yt(A,L){return typeof A=="object"&&A!==null&&A.key!=null?V(""+A.key):L.toString(36)}function mt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(E,E):(A.status="pending",A.then(function(L){A.status==="pending"&&(A.status="fulfilled",A.value=L)},function(L){A.status==="pending"&&(A.status="rejected",A.reason=L)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function ct(A,L,W,q,ft){var bt=typeof A;(bt==="undefined"||bt==="boolean")&&(A=null);var et=!1;if(A===null)et=!0;else switch(bt){case"bigint":case"string":case"number":et=!0;break;case"object":switch(A.$$typeof){case n:case t:et=!0;break;case u:return et=A._init,ct(et(A._payload),L,W,q,ft)}}if(et)return ft=ft(A),et=q===""?"."+yt(A,0):q,C(ft)?(W="",et!=null&&(W=et.replace(lt,"$&/")+"/"),ct(ft,L,W,"",function(Mt){return Mt})):ft!=null&&(H(ft)&&(ft=j(ft,W+(ft.key==null||A&&A.key===ft.key?"":(""+ft.key).replace(lt,"$&/")+"/")+et)),L.push(ft)),1;et=0;var It=q===""?".":q+":";if(C(A))for(var ht=0;ht<A.length;ht++)q=A[ht],bt=It+yt(q,ht),et+=ct(q,L,W,bt,ft);else if(ht=f(A),typeof ht=="function")for(A=ht.call(A),ht=0;!(q=A.next()).done;)q=q.value,bt=It+yt(q,ht++),et+=ct(q,L,W,bt,ft);else if(bt==="object"){if(typeof A.then=="function")return ct(mt(A),L,W,q,ft);throw L=String(A),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return et}function st(A,L,W){if(A==null)return A;var q=[],ft=0;return ct(A,q,"","",function(bt){return L.call(W,bt,ft++)}),q}function Ct(A){if(A._status===-1){var L=A._result;L=L(),L.then(function(W){(A._status===0||A._status===-1)&&(A._status=1,A._result=W)},function(W){(A._status===0||A._status===-1)&&(A._status=2,A._result=W)}),A._status===-1&&(A._status=0,A._result=L)}if(A._status===1)return A._result.default;throw A._result}var $=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},z={map:st,forEach:function(A,L,W){st(A,function(){L.apply(this,arguments)},W)},count:function(A){var L=0;return st(A,function(){L++}),L},toArray:function(A){return st(A,function(L){return L})||[]},only:function(A){if(!H(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return rt.Activity=l,rt.Children=z,rt.Component=g,rt.Fragment=e,rt.Profiler=s,rt.PureComponent=x,rt.StrictMode=r,rt.Suspense=c,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,rt.__COMPILER_RUNTIME={__proto__:null,c:function(A){return O.H.useMemoCache(A)}},rt.cache=function(A){return function(){return A.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(A,L,W){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var q=m({},A.props),ft=A.key;if(L!=null)for(bt in L.key!==void 0&&(ft=""+L.key),L)!U.call(L,bt)||bt==="key"||bt==="__self"||bt==="__source"||bt==="ref"&&L.ref===void 0||(q[bt]=L[bt]);var bt=arguments.length-2;if(bt===1)q.children=W;else if(1<bt){for(var et=Array(bt),It=0;It<bt;It++)et[It]=arguments[It+2];q.children=et}return R(A.type,ft,q)},rt.createContext=function(A){return A={$$typeof:o,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:i,_context:A},A},rt.createElement=function(A,L,W){var q,ft={},bt=null;if(L!=null)for(q in L.key!==void 0&&(bt=""+L.key),L)U.call(L,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(ft[q]=L[q]);var et=arguments.length-2;if(et===1)ft.children=W;else if(1<et){for(var It=Array(et),ht=0;ht<et;ht++)It[ht]=arguments[ht+2];ft.children=It}if(A&&A.defaultProps)for(q in et=A.defaultProps,et)ft[q]===void 0&&(ft[q]=et[q]);return R(A,bt,ft)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(A){return{$$typeof:a,render:A}},rt.isValidElement=H,rt.lazy=function(A){return{$$typeof:u,_payload:{_status:-1,_result:A},_init:Ct}},rt.memo=function(A,L){return{$$typeof:h,type:A,compare:L===void 0?null:L}},rt.startTransition=function(A){var L=O.T,W={};O.T=W;try{var q=A(),ft=O.S;ft!==null&&ft(W,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(E,$)}catch(bt){$(bt)}finally{L!==null&&W.types!==null&&(L.types=W.types),O.T=L}},rt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},rt.use=function(A){return O.H.use(A)},rt.useActionState=function(A,L,W){return O.H.useActionState(A,L,W)},rt.useCallback=function(A,L){return O.H.useCallback(A,L)},rt.useContext=function(A){return O.H.useContext(A)},rt.useDebugValue=function(){},rt.useDeferredValue=function(A,L){return O.H.useDeferredValue(A,L)},rt.useEffect=function(A,L){return O.H.useEffect(A,L)},rt.useEffectEvent=function(A){return O.H.useEffectEvent(A)},rt.useId=function(){return O.H.useId()},rt.useImperativeHandle=function(A,L,W){return O.H.useImperativeHandle(A,L,W)},rt.useInsertionEffect=function(A,L){return O.H.useInsertionEffect(A,L)},rt.useLayoutEffect=function(A,L){return O.H.useLayoutEffect(A,L)},rt.useMemo=function(A,L){return O.H.useMemo(A,L)},rt.useOptimistic=function(A,L){return O.H.useOptimistic(A,L)},rt.useReducer=function(A,L,W){return O.H.useReducer(A,L,W)},rt.useRef=function(A){return O.H.useRef(A)},rt.useState=function(A){return O.H.useState(A)},rt.useSyncExternalStore=function(A,L,W){return O.H.useSyncExternalStore(A,L,W)},rt.useTransition=function(){return O.H.useTransition()},rt.version="19.2.5",rt}var ts={exports:{}};/**
40
+ * @license React
41
+ * react.development.js
42
+ *
43
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */ts.exports;var Bf;function lv(){return Bf||(Bf=1,function(n,t){({}).NODE_ENV!=="production"&&function(){function e(_,D){Object.defineProperty(i.prototype,_,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",D[0],D[1])}})}function r(_){return _===null||typeof _!="object"?null:(_=Ye&&_[Ye]||_["@@iterator"],typeof _=="function"?_:null)}function s(_,D){_=(_=_.constructor)&&(_.displayName||_.name)||"ReactClass";var B=_+"."+D;je[B]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",D,_),je[B]=!0)}function i(_,D,B){this.props=_,this.context=D,this.refs=Tt,this.updater=B||Re}function o(){}function a(_,D,B){this.props=_,this.context=D,this.refs=Tt,this.updater=B||Re}function c(){}function h(_){return""+_}function u(_){try{h(_);var D=!1}catch{D=!0}if(D){D=console;var B=D.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return B.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),h(_)}}function l(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===bo?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case A:return"Fragment";case W:return"Profiler";case L:return"StrictMode";case et:return"Suspense";case It:return"SuspenseList";case ln:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case z:return"Portal";case ft:return _.displayName||"Context";case q:return(_._context.displayName||"Context")+".Consumer";case bt:var D=_.render;return _=_.displayName,_||(_=D.displayName||D.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case ht:return D=_.displayName||null,D!==null?D:l(_.type)||"Memo";case Mt:D=_._payload,_=_._init;try{return l(_(D))}catch{}}return null}function d(_){if(_===A)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===Mt)return"<...>";try{var D=l(_);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function f(){var _=it.A;return _===null?null:_.getOwner()}function p(){return Error("react-stack-top-frame")}function m(_){if(Jt.call(_,"key")){var D=Object.getOwnPropertyDescriptor(_,"key").get;if(D&&D.isReactWarning)return!1}return _.key!==void 0}function v(_,D){function B(){vo||(vo=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}B.isReactWarning=!0,Object.defineProperty(_,"key",{get:B,configurable:!0})}function g(){var _=l(this.type);return _o[_]||(_o[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function b(_,D,B,Y,J,ut){var at=B.ref;return _={$$typeof:$,type:_,key:D,props:B,_owner:Y},(at!==void 0?at:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:g}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ut}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function x(_,D){return D=b(_.type,D,_.props,_._owner,_._debugStack,_._debugTask),_._store&&(D._store.validated=_._store.validated),D}function w(_){C(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===Mt&&(_._payload.status==="fulfilled"?C(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function C(_){return typeof _=="object"&&_!==null&&_.$$typeof===$}function E(_){var D={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(B){return D[B]})}function O(_,D){return typeof _=="object"&&_!==null&&_.key!=null?(u(_.key),E(""+_.key)):D.toString(36)}function U(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(c,c):(_.status="pending",_.then(function(D){_.status==="pending"&&(_.status="fulfilled",_.value=D)},function(D){_.status==="pending"&&(_.status="rejected",_.reason=D)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function R(_,D,B,Y,J){var ut=typeof _;(ut==="undefined"||ut==="boolean")&&(_=null);var at=!1;if(_===null)at=!0;else switch(ut){case"bigint":case"string":case"number":at=!0;break;case"object":switch(_.$$typeof){case $:case z:at=!0;break;case Mt:return at=_._init,R(at(_._payload),D,B,Y,J)}}if(at){at=_,J=J(at);var St=Y===""?"."+O(at,0):Y;return Es(J)?(B="",St!=null&&(B=St.replace(Ts,"$&/")+"/"),R(J,D,B,"",function(ke){return ke})):J!=null&&(C(J)&&(J.key!=null&&(at&&at.key===J.key||u(J.key)),B=x(J,B+(J.key==null||at&&at.key===J.key?"":(""+J.key).replace(Ts,"$&/")+"/")+St),Y!==""&&at!=null&&C(at)&&at.key==null&&at._store&&!at._store.validated&&(B._store.validated=2),J=B),D.push(J)),1}if(at=0,St=Y===""?".":Y+":",Es(_))for(var dt=0;dt<_.length;dt++)Y=_[dt],ut=St+O(Y,dt),at+=R(Y,D,B,ut,J);else if(dt=r(_),typeof dt=="function")for(dt===_.entries&&(Cs||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Cs=!0),_=dt.call(_),dt=0;!(Y=_.next()).done;)Y=Y.value,ut=St+O(Y,dt++),at+=R(Y,D,B,ut,J);else if(ut==="object"){if(typeof _.then=="function")return R(U(_),D,B,Y,J);throw D=String(_),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return at}function j(_,D,B){if(_==null)return _;var Y=[],J=0;return R(_,Y,"","",function(ut){return D.call(B,ut,J++)}),Y}function H(_){if(_._status===-1){var D=_._ioInfo;D!=null&&(D.start=D.end=performance.now()),D=_._result;var B=D();if(B.then(function(J){if(_._status===0||_._status===-1){_._status=1,_._result=J;var ut=_._ioInfo;ut!=null&&(ut.end=performance.now()),B.status===void 0&&(B.status="fulfilled",B.value=J)}},function(J){if(_._status===0||_._status===-1){_._status=2,_._result=J;var ut=_._ioInfo;ut!=null&&(ut.end=performance.now()),B.status===void 0&&(B.status="rejected",B.reason=J)}}),D=_._ioInfo,D!=null){D.value=B;var Y=B.displayName;typeof Y=="string"&&(D.name=Y)}_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return D=_._result,D===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
48
+
49
+ Your code should look like:
50
+ const MyComponent = lazy(() => import('./MyComponent'))
51
+
52
+ Did you accidentally put curly braces around the import?`,D),"default"in D||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
53
+
54
+ Your code should look like:
55
+ const MyComponent = lazy(() => import('./MyComponent'))`,D),D.default;throw _._result}function V(){var _=it.H;return _===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
56
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
57
+ 2. You might be breaking the Rules of Hooks
58
+ 3. You might have more than one copy of React in the same app
59
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),_}function lt(){it.asyncTransitions--}function yt(_){if(Ln===null)try{var D=("require"+Math.random()).slice(0,7);Ln=(n&&n[D]).call(n,"timers").setImmediate}catch{Ln=function(Y){nr===!1&&(nr=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var J=new MessageChannel;J.port1.onmessage=Y,J.port2.postMessage(void 0)}}return Ln(_)}function mt(_){return 1<_.length&&typeof AggregateError=="function"?new AggregateError(_):_[0]}function ct(_,D){D!==Pr-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Pr=D}function st(_,D,B){var Y=it.actQueue;if(Y!==null)if(Y.length!==0)try{Ct(Y),yt(function(){return st(_,D,B)});return}catch(J){it.thrownErrors.push(J)}else it.actQueue=null;0<it.thrownErrors.length?(Y=mt(it.thrownErrors),it.thrownErrors.length=0,B(Y)):D(_)}function Ct(_){if(!As){As=!0;var D=0;try{for(;D<_.length;D++){var B=_[D];do{it.didUsePromise=!1;var Y=B(!1);if(Y!==null){if(it.didUsePromise){_[D]=B,_.splice(0,D);return}B=Y}else break}while(1)}_.length=0}catch(J){_.splice(0,D+1),it.thrownErrors.push(J)}finally{As=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var $=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),ft=Symbol.for("react.context"),bt=Symbol.for("react.forward_ref"),et=Symbol.for("react.suspense"),It=Symbol.for("react.suspense_list"),ht=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ln=Symbol.for("react.activity"),Ye=Symbol.iterator,je={},Re={isMounted:function(){return!1},enqueueForceUpdate:function(_){s(_,"forceUpdate")},enqueueReplaceState:function(_){s(_,"replaceState")},enqueueSetState:function(_){s(_,"setState")}},N=Object.assign,Tt={};Object.freeze(Tt),i.prototype.isReactComponent={},i.prototype.setState=function(_,D){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,D,"setState")},i.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};var $t={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(rr in $t)$t.hasOwnProperty(rr)&&e(rr,$t[rr]);o.prototype=i.prototype,$t=a.prototype=new o,$t.constructor=a,N($t,i.prototype),$t.isPureReactComponent=!0;var Es=Array.isArray,bo=Symbol.for("react.client.reference"),it={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Jt=Object.prototype.hasOwnProperty,wo=console.createTask?console.createTask:function(){return null};$t={react_stack_bottom_frame:function(_){return _()}};var vo,xo,_o={},Wh=$t.react_stack_bottom_frame.bind($t,p)(),So=wo(d(p)),Cs=!1,Ts=/\/+/g,Ps=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},nr=!1,Ln=null,Pr=0,Ar=!1,As=!1,Eo=typeof queueMicrotask=="function"?function(_){queueMicrotask(function(){return queueMicrotask(_)})}:yt;$t=Object.freeze({__proto__:null,c:function(_){return V().useMemoCache(_)}});var rr={map:j,forEach:function(_,D,B){j(_,function(){D.apply(this,arguments)},B)},count:function(_){var D=0;return j(_,function(){D++}),D},toArray:function(_){return j(_,function(D){return D})||[]},only:function(_){if(!C(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};t.Activity=ln,t.Children=rr,t.Component=i,t.Fragment=A,t.Profiler=W,t.PureComponent=a,t.StrictMode=L,t.Suspense=et,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it,t.__COMPILER_RUNTIME=$t,t.act=function(_){var D=it.actQueue,B=Pr;Pr++;var Y=it.actQueue=D!==null?D:[],J=!1;try{var ut=_()}catch(dt){it.thrownErrors.push(dt)}if(0<it.thrownErrors.length)throw ct(D,B),_=mt(it.thrownErrors),it.thrownErrors.length=0,_;if(ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var at=ut;return Eo(function(){J||Ar||(Ar=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(dt,ke){J=!0,at.then(function(Nn){if(ct(D,B),B===0){try{Ct(Y),yt(function(){return st(Nn,dt,ke)})}catch(Jh){it.thrownErrors.push(Jh)}if(0<it.thrownErrors.length){var qh=mt(it.thrownErrors);it.thrownErrors.length=0,ke(qh)}}else dt(Nn)},function(Nn){ct(D,B),0<it.thrownErrors.length&&(Nn=mt(it.thrownErrors),it.thrownErrors.length=0),ke(Nn)})}}}var St=ut;if(ct(D,B),B===0&&(Ct(Y),Y.length!==0&&Eo(function(){J||Ar||(Ar=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),it.actQueue=null),0<it.thrownErrors.length)throw _=mt(it.thrownErrors),it.thrownErrors.length=0,_;return{then:function(dt,ke){J=!0,B===0?(it.actQueue=Y,yt(function(){return st(St,dt,ke)})):dt(St)}}},t.cache=function(_){return function(){return _.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var _=it.getCurrentStack;return _===null?null:_()},t.cloneElement=function(_,D,B){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Y=N({},_.props),J=_.key,ut=_._owner;if(D!=null){var at;t:{if(Jt.call(D,"ref")&&(at=Object.getOwnPropertyDescriptor(D,"ref").get)&&at.isReactWarning){at=!1;break t}at=D.ref!==void 0}at&&(ut=f()),m(D)&&(u(D.key),J=""+D.key);for(St in D)!Jt.call(D,St)||St==="key"||St==="__self"||St==="__source"||St==="ref"&&D.ref===void 0||(Y[St]=D[St])}var St=arguments.length-2;if(St===1)Y.children=B;else if(1<St){at=Array(St);for(var dt=0;dt<St;dt++)at[dt]=arguments[dt+2];Y.children=at}for(Y=b(_.type,J,Y,ut,_._debugStack,_._debugTask),J=2;J<arguments.length;J++)w(arguments[J]);return Y},t.createContext=function(_){return _={$$typeof:ft,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:q,_context:_},_._currentRenderer=null,_._currentRenderer2=null,_},t.createElement=function(_,D,B){for(var Y=2;Y<arguments.length;Y++)w(arguments[Y]);Y={};var J=null;if(D!=null)for(dt in xo||!("__self"in D)||"key"in D||(xo=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),m(D)&&(u(D.key),J=""+D.key),D)Jt.call(D,dt)&&dt!=="key"&&dt!=="__self"&&dt!=="__source"&&(Y[dt]=D[dt]);var ut=arguments.length-2;if(ut===1)Y.children=B;else if(1<ut){for(var at=Array(ut),St=0;St<ut;St++)at[St]=arguments[St+2];Object.freeze&&Object.freeze(at),Y.children=at}if(_&&_.defaultProps)for(dt in ut=_.defaultProps,ut)Y[dt]===void 0&&(Y[dt]=ut[dt]);J&&v(Y,typeof _=="function"?_.displayName||_.name||"Unknown":_);var dt=1e4>it.recentlyCreatedOwnerStacks++;return b(_,J,Y,f(),dt?Error("react-stack-top-frame"):Wh,dt?wo(d(_)):So)},t.createRef=function(){var _={current:null};return Object.seal(_),_},t.forwardRef=function(_){_!=null&&_.$$typeof===ht?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof _!="function"?console.error("forwardRef requires a render function but was given %s.",_===null?"null":typeof _):_.length!==0&&_.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",_.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),_!=null&&_.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var D={$$typeof:bt,render:_},B;return Object.defineProperty(D,"displayName",{enumerable:!1,configurable:!0,get:function(){return B},set:function(Y){B=Y,_.name||_.displayName||(Object.defineProperty(_,"name",{value:Y}),_.displayName=Y)}}),D},t.isValidElement=C,t.lazy=function(_){_={_status:-1,_result:_};var D={$$typeof:Mt,_payload:_,_init:H},B={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return _._ioInfo=B,D._debugInfo=[{awaited:B}],D},t.memo=function(_,D){_==null&&console.error("memo: The first argument must be a component. Instead received: %s",_===null?"null":typeof _),D={$$typeof:ht,type:_,compare:D===void 0?null:D};var B;return Object.defineProperty(D,"displayName",{enumerable:!1,configurable:!0,get:function(){return B},set:function(Y){B=Y,_.name||_.displayName||(Object.defineProperty(_,"name",{value:Y}),_.displayName=Y)}}),D},t.startTransition=function(_){var D=it.T,B={};B._updatedFibers=new Set,it.T=B;try{var Y=_(),J=it.S;J!==null&&J(B,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&(it.asyncTransitions++,Y.then(lt,lt),Y.then(c,Ps))}catch(ut){Ps(ut)}finally{D===null&&B._updatedFibers&&(_=B._updatedFibers.size,B._updatedFibers.clear(),10<_&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),D!==null&&B.types!==null&&(D.types!==null&&D.types!==B.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),D.types=B.types),it.T=D}},t.unstable_useCacheRefresh=function(){return V().useCacheRefresh()},t.use=function(_){return V().use(_)},t.useActionState=function(_,D,B){return V().useActionState(_,D,B)},t.useCallback=function(_,D){return V().useCallback(_,D)},t.useContext=function(_){var D=V();return _.$$typeof===q&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),D.useContext(_)},t.useDebugValue=function(_,D){return V().useDebugValue(_,D)},t.useDeferredValue=function(_,D){return V().useDeferredValue(_,D)},t.useEffect=function(_,D){return _==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),V().useEffect(_,D)},t.useEffectEvent=function(_){return V().useEffectEvent(_)},t.useId=function(){return V().useId()},t.useImperativeHandle=function(_,D,B){return V().useImperativeHandle(_,D,B)},t.useInsertionEffect=function(_,D){return _==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),V().useInsertionEffect(_,D)},t.useLayoutEffect=function(_,D){return _==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),V().useLayoutEffect(_,D)},t.useMemo=function(_,D){return V().useMemo(_,D)},t.useOptimistic=function(_,D){return V().useOptimistic(_,D)},t.useReducer=function(_,D,B){return V().useReducer(_,D,B)},t.useRef=function(_){return V().useRef(_)},t.useState=function(_){return V().useState(_)},t.useSyncExternalStore=function(_,D,B){return V().useSyncExternalStore(_,D,B)},t.useTransition=function(){return V().useTransition()},t.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(ts,ts.exports)),ts.exports}({}).NODE_ENV==="production"?oc.exports=uv():oc.exports=lv();var Et=oc.exports;const fv=Ip({__proto__:null,default:va(Et)},[Et]);/**
60
+ * @vue/shared v3.5.13
61
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
62
+ * @license MIT
63
+ **//*! #__NO_SIDE_EFFECTS__ */function dv(n){const t=Object.create(null);for(const e of n.split(","))t[e]=1;return e=>e in t}const Ee={}.NODE_ENV!=="production"?Object.freeze({}):{},es=()=>{},De=Object.assign,mv=Object.prototype.hasOwnProperty,Bt=(n,t)=>mv.call(n,t),Qt=Array.isArray,yr=n=>Ei(n)==="[object Map]",pv=n=>Ei(n)==="[object Set]",te=n=>typeof n=="function",Si=n=>typeof n=="string",ns=n=>typeof n=="symbol",$e=n=>n!==null&&typeof n=="object",gv=n=>($e(n)||te(n))&&te(n.then)&&te(n.catch),yv=Object.prototype.toString,Ei=n=>yv.call(n),$f=n=>Ei(n).slice(8,-1),bv=n=>Ei(n)==="[object Object]",ac=n=>Si(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,wv=(n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))})(n=>n.charAt(0).toUpperCase()+n.slice(1)),Pn=(n,t)=>!Object.is(n,t),vv=(n,t,e,r=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:r,value:e})};let Uf;const Ci=()=>Uf||(Uf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});/**
64
+ * @vue/reactivity v3.5.13
65
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
66
+ * @license MIT
67
+ **/function nn(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let vt;const cc=new WeakSet;class xv{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cc.has(this)&&(cc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jf(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Wf(this),Vf(this);const t=vt,e=Oe;vt=this,Oe=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&vt!==this&&nn("Active effect was not restored correctly - this is likely a Vue internal bug."),Gf(this),vt=t,Oe=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)fc(t);this.deps=this.depsTail=void 0,Wf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){lc(this)&&this.run()}get dirty(){return lc(this)}}let Yf=0,rs,ss;function jf(n,t=!1){if(n.flags|=8,t){n.next=ss,ss=n;return}n.next=rs,rs=n}function hc(){Yf++}function uc(){if(--Yf>0)return;if(ss){let t=ss;for(ss=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;rs;){let t=rs;for(rs=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function Vf(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Gf(n){let t,e=n.depsTail,r=e;for(;r;){const s=r.prevDep;r.version===-1?(r===e&&(e=s),fc(r),_v(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}n.deps=t,n.depsTail=e}function lc(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function Xf(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===is))return;n.globalVersion=is;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!lc(n)){n.flags&=-3;return}const e=vt,r=Oe;vt=n,Oe=!0;try{Vf(n);const s=n.fn(n._value);(t.version===0||Pn(s,n._value))&&(n._value=s,t.version++)}catch(s){throw t.version++,s}finally{vt=e,Oe=r,Gf(n),n.flags&=-3}}function fc(n,t=!1){const{dep:e,prevSub:r,nextSub:s}=n;if(r&&(r.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=r,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=s),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let i=e.computed.deps;i;i=i.nextDep)fc(i,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function _v(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let Oe=!0;const Hf=[];function Ti(){Hf.push(Oe),Oe=!1}function Pi(){const n=Hf.pop();Oe=n===void 0?!0:n}function Wf(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=vt;vt=void 0;try{t()}finally{vt=e}}}let is=0;class Sv{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dc{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,{}.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!vt||!Oe||vt===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==vt)e=this.activeLink=new Sv(vt,this),vt.deps?(e.prevDep=vt.depsTail,vt.depsTail.nextDep=e,vt.depsTail=e):vt.deps=vt.depsTail=e,qf(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=vt.depsTail,e.nextDep=void 0,vt.depsTail.nextDep=e,vt.depsTail=e,vt.deps===e&&(vt.deps=r)}return{}.NODE_ENV!=="production"&&vt.onTrack&&vt.onTrack(De({effect:vt},t)),e}trigger(t){this.version++,is++,this.notify(t)}notify(t){hc();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(De({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{uc()}}}function qf(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)qf(r)}const e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),{}.NODE_ENV!=="production"&&n.dep.subsHead===void 0&&(n.dep.subsHead=n),n.dep.subs=n}}const mc=new WeakMap,qn=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),pc=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),os=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function ee(n,t,e){if(Oe&&vt){let r=mc.get(n);r||mc.set(n,r=new Map);let s=r.get(e);s||(r.set(e,s=new dc),s.map=r,s.key=e),{}.NODE_ENV!=="production"?s.track({target:n,type:t,key:e}):s.track()}}function An(n,t,e,r,s,i){const o=mc.get(n);if(!o){is++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:r,oldValue:s,oldTarget:i}):c.trigger())};if(hc(),t==="clear")o.forEach(a);else{const c=Qt(n),h=c&&ac(e);if(c&&e==="length"){const u=Number(r);o.forEach((l,d)=>{(d==="length"||d===os||!ns(d)&&d>=u)&&a(l)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(os)),t){case"add":c?h&&a(o.get("length")):(a(o.get(qn)),yr(n)&&a(o.get(pc)));break;case"delete":c||(a(o.get(qn)),yr(n)&&a(o.get(pc)));break;case"set":yr(n)&&a(o.get(qn));break}}uc()}function br(n){const t=wt(n);return t===n?t:(ee(t,"iterate",os),ue(n)?t:t.map(se))}function gc(n){return ee(n=wt(n),"iterate",os),n}const Ev={__proto__:null,[Symbol.iterator](){return yc(this,Symbol.iterator,se)},concat(...n){return br(this).concat(...n.map(t=>Qt(t)?br(t):t))},entries(){return yc(this,"entries",n=>(n[1]=se(n[1]),n))},every(n,t){return rn(this,"every",n,t,void 0,arguments)},filter(n,t){return rn(this,"filter",n,t,e=>e.map(se),arguments)},find(n,t){return rn(this,"find",n,t,se,arguments)},findIndex(n,t){return rn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return rn(this,"findLast",n,t,se,arguments)},findLastIndex(n,t){return rn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return rn(this,"forEach",n,t,void 0,arguments)},includes(...n){return bc(this,"includes",n)},indexOf(...n){return bc(this,"indexOf",n)},join(n){return br(this).join(n)},lastIndexOf(...n){return bc(this,"lastIndexOf",n)},map(n,t){return rn(this,"map",n,t,void 0,arguments)},pop(){return as(this,"pop")},push(...n){return as(this,"push",n)},reduce(n,...t){return Jf(this,"reduce",n,t)},reduceRight(n,...t){return Jf(this,"reduceRight",n,t)},shift(){return as(this,"shift")},some(n,t){return rn(this,"some",n,t,void 0,arguments)},splice(...n){return as(this,"splice",n)},toReversed(){return br(this).toReversed()},toSorted(n){return br(this).toSorted(n)},toSpliced(...n){return br(this).toSpliced(...n)},unshift(...n){return as(this,"unshift",n)},values(){return yc(this,"values",se)}};function yc(n,t,e){const r=gc(n),s=r[t]();return r!==n&&!ue(n)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=e(i.value)),i}),s}const Cv=Array.prototype;function rn(n,t,e,r,s,i){const o=gc(n),a=o!==n&&!ue(n),c=o[t];if(c!==Cv[t]){const l=c.apply(n,i);return a?se(l):l}let h=e;o!==n&&(a?h=function(l,d){return e.call(this,se(l),d,n)}:e.length>2&&(h=function(l,d){return e.call(this,l,d,n)}));const u=c.call(o,h,r);return a&&s?s(u):u}function Jf(n,t,e,r){const s=gc(n);let i=e;return s!==n&&(ue(n)?e.length>3&&(i=function(o,a,c){return e.call(this,o,a,c,n)}):i=function(o,a,c){return e.call(this,o,se(a),c,n)}),s[t](i,...r)}function bc(n,t,e){const r=wt(n);ee(r,"iterate",os);const s=r[t](...e);return(s===-1||s===!1)&&$v(e[0])?(e[0]=wt(e[0]),r[t](...e)):s}function as(n,t,e=[]){Ti(),hc();const r=wt(n)[t].apply(n,e);return uc(),Pi(),r}const Tv=dv("__proto__,__v_isRef,__isVue"),Kf=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(ns));function Pv(n){ns(n)||(n=String(n));const t=wt(this);return ee(t,"has",n),t.hasOwnProperty(n)}class Zf{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return i;if(e==="__v_raw")return r===(s?i?rd:nd:i?zv:ed).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=Qt(t);if(!s){let c;if(o&&(c=Ev[e]))return c;if(e==="hasOwnProperty")return Pv}const a=Reflect.get(t,e,le(t)?t:r);return(ns(e)?Kf.has(e):Tv(e))||(s||ee(t,"get",e),i)?a:le(a)?o&&ac(e)?a:a.value:$e(a)?s?xc(a):sd(a):a}}class Av extends Zf{constructor(t=!1){super(!1,t)}set(t,e,r,s){let i=t[e];if(!this._isShallow){const c=sn(i);if(!ue(r)&&!sn(r)&&(i=wt(i),r=wt(r)),!Qt(t)&&le(i)&&!le(r))return c?!1:(i.value=r,!0)}const o=Qt(t)&&ac(e)?Number(e)<t.length:Bt(t,e),a=Reflect.set(t,e,r,le(t)?t:s);return t===wt(s)&&(o?Pn(r,i)&&An(t,"set",e,r,i):An(t,"add",e,r)),a}deleteProperty(t,e){const r=Bt(t,e),s=t[e],i=Reflect.deleteProperty(t,e);return i&&r&&An(t,"delete",e,void 0,s),i}has(t,e){const r=Reflect.has(t,e);return(!ns(e)||!Kf.has(e))&&ee(t,"has",e),r}ownKeys(t){return ee(t,"iterate",Qt(t)?"length":qn),Reflect.ownKeys(t)}}class Qf extends Zf{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&nn(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&nn(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const Mv=new Av,Dv=new Qf,Ov=new Qf(!0),wc=n=>n,Ai=n=>Reflect.getPrototypeOf(n);function Iv(n,t,e){return function(...r){const s=this.__v_raw,i=wt(s),o=yr(i),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=s[n](...r),u=e?wc:t?Sc:se;return!t&&ee(i,"iterate",c?pc:qn),{next(){const{value:l,done:d}=h.next();return d?{value:l,done:d}:{value:a?[u(l[0]),u(l[1])]:u(l),done:d}},[Symbol.iterator](){return this}}}}function Mi(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";nn(`${wv(n)} operation ${e}failed: target is readonly.`,wt(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function Rv(n,t){const e={get(s){const i=this.__v_raw,o=wt(i),a=wt(s);n||(Pn(s,a)&&ee(o,"get",s),ee(o,"get",a));const{has:c}=Ai(o),h=t?wc:n?Sc:se;if(c.call(o,s))return h(i.get(s));if(c.call(o,a))return h(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!n&&ee(wt(s),"iterate",qn),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=wt(i),a=wt(s);return n||(Pn(s,a)&&ee(o,"has",s),ee(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,c=wt(a),h=t?wc:n?Sc:se;return!n&&ee(c,"iterate",qn),a.forEach((u,l)=>s.call(i,h(u),h(l),o))}};return De(e,n?{add:Mi("add"),set:Mi("set"),delete:Mi("delete"),clear:Mi("clear")}:{add(s){!t&&!ue(s)&&!sn(s)&&(s=wt(s));const i=wt(this);return Ai(i).has.call(i,s)||(i.add(s),An(i,"add",s,s)),this},set(s,i){!t&&!ue(i)&&!sn(i)&&(i=wt(i));const o=wt(this),{has:a,get:c}=Ai(o);let h=a.call(o,s);h?{}.NODE_ENV!=="production"&&td(o,a,s):(s=wt(s),h=a.call(o,s));const u=c.call(o,s);return o.set(s,i),h?Pn(i,u)&&An(o,"set",s,i,u):An(o,"add",s,i),this},delete(s){const i=wt(this),{has:o,get:a}=Ai(i);let c=o.call(i,s);c?{}.NODE_ENV!=="production"&&td(i,o,s):(s=wt(s),c=o.call(i,s));const h=a?a.call(i,s):void 0,u=i.delete(s);return c&&An(i,"delete",s,void 0,h),u},clear(){const s=wt(this),i=s.size!==0,o={}.NODE_ENV!=="production"?yr(s)?new Map(s):new Set(s):void 0,a=s.clear();return i&&An(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Iv(s,n,t)}),e}function vc(n,t){const e=Rv(n,t);return(r,s,i)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?r:Reflect.get(Bt(e,s)&&s in r?e:r,s,i)}const kv={get:vc(!1,!1)},Lv={get:vc(!0,!1)},Nv={get:vc(!0,!0)};function td(n,t,e){const r=wt(e);if(r!==e&&t.call(n,r)){const s=$f(n);nn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ed=new WeakMap,zv=new WeakMap,nd=new WeakMap,rd=new WeakMap;function Fv(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bv(n){return n.__v_skip||!Object.isExtensible(n)?0:Fv($f(n))}function sd(n){return sn(n)?n:_c(n,!1,Mv,kv,ed)}function xc(n){return _c(n,!0,Dv,Lv,nd)}function Di(n){return _c(n,!0,Ov,Nv,rd)}function _c(n,t,e,r,s){if(!$e(n))return{}.NODE_ENV!=="production"&&nn(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const i=s.get(n);if(i)return i;const o=Bv(n);if(o===0)return n;const a=new Proxy(n,o===2?r:e);return s.set(n,a),a}function wr(n){return sn(n)?wr(n.__v_raw):!!(n&&n.__v_isReactive)}function sn(n){return!!(n&&n.__v_isReadonly)}function ue(n){return!!(n&&n.__v_isShallow)}function $v(n){return n?!!n.__v_raw:!1}function wt(n){const t=n&&n.__v_raw;return t?wt(t):n}function Uv(n){return!Bt(n,"__v_skip")&&Object.isExtensible(n)&&vv(n,"__v_skip",!0),n}const se=n=>$e(n)?sd(n):n,Sc=n=>$e(n)?xc(n):n;function le(n){return n?n.__v_isRef===!0:!1}function id(n){return od(n,!1)}function Yv(n){return od(n,!0)}function od(n,t){return le(n)?n:new jv(n,t)}class jv{constructor(t,e){this.dep=new dc,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:wt(t),this._value=e?t:se(t),this.__v_isShallow=e}get value(){return{}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const e=this._rawValue,r=this.__v_isShallow||ue(t)||sn(t);t=r?t:wt(t),Pn(t,e)&&(this._rawValue=t,this._value=r?t:se(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function Vv(n){return le(n)?n.value:n}const Gv={get:(n,t,e)=>t==="__v_raw"?n:Vv(Reflect.get(n,t,e)),set:(n,t,e,r)=>{const s=n[t];return le(s)&&!le(e)?(s.value=e,!0):Reflect.set(n,t,e,r)}};function Xv(n){return wr(n)?n:new Proxy(n,Gv)}class Hv{constructor(t,e,r){this.fn=t,this.setter=e,this._value=void 0,this.dep=new dc(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=is-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&vt!==this)return jf(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Xf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&nn("Write operation failed: computed value is readonly")}}function Wv(n,t,e=!1){let r,s;te(n)?r=n:(r=n.get,s=n.set);const i=new Hv(r,s,e);return{}.NODE_ENV!=="production"&&t&&!e&&(i.onTrack=t.onTrack,i.onTrigger=t.onTrigger),i}const Oi={},Ii=new WeakMap;let Jn;function qv(n,t=!1,e=Jn){if(e){let r=Ii.get(e);r||Ii.set(e,r=[]),r.push(n)}else({}).NODE_ENV!=="production"&&!t&&nn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Jv(n,t,e=Ee){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:c}=e,h=w=>{(e.onWarn||nn)("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=w=>s?w:ue(w)||s===!1||s===0?Mn(w,1):Mn(w);let l,d,f,p,m=!1,v=!1;if(le(n)?(d=()=>n.value,m=ue(n)):wr(n)?(d=()=>u(n),m=!0):Qt(n)?(v=!0,m=n.some(w=>wr(w)||ue(w)),d=()=>n.map(w=>{if(le(w))return w.value;if(wr(w))return u(w);if(te(w))return c?c(w,2):w();({}).NODE_ENV!=="production"&&h(w)})):te(n)?t?d=c?()=>c(n,2):n:d=()=>{if(f){Ti();try{f()}finally{Pi()}}const w=Jn;Jn=l;try{return c?c(n,3,[p]):n(p)}finally{Jn=w}}:(d=es,{}.NODE_ENV!=="production"&&h(n)),t&&s){const w=d,C=s===!0?1/0:s;d=()=>Mn(w(),C)}const g=()=>{l.stop()};if(i&&t){const w=t;t=(...C)=>{w(...C),g()}}let b=v?new Array(n.length).fill(Oi):Oi;const x=w=>{if(!(!(l.flags&1)||!l.dirty&&!w))if(t){const C=l.run();if(s||m||(v?C.some((E,O)=>Pn(E,b[O])):Pn(C,b))){f&&f();const E=Jn;Jn=l;try{const O=[C,b===Oi?void 0:v&&b[0]===Oi?[]:b,p];c?c(t,3,O):t(...O),b=C}finally{Jn=E}}}else l.run()};return a&&a(x),l=new xv(d),l.scheduler=o?()=>o(x,!1):x,p=w=>qv(w,!1,l),f=l.onStop=()=>{const w=Ii.get(l);if(w){if(c)c(w,4);else for(const C of w)C();Ii.delete(l)}},{}.NODE_ENV!=="production"&&(l.onTrack=e.onTrack,l.onTrigger=e.onTrigger),t?r?x(!0):b=l.run():o?o(x.bind(null,!0),!0):l.run(),g.pause=l.pause.bind(l),g.resume=l.resume.bind(l),g.stop=g,g}function Mn(n,t=1/0,e){if(t<=0||!$e(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,le(n))Mn(n.value,t,e);else if(Qt(n))for(let r=0;r<n.length;r++)Mn(n[r],t,e);else if(pv(n)||yr(n))n.forEach(r=>{Mn(r,t,e)});else if(bv(n)){for(const r in n)Mn(n[r],t,e);for(const r of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Mn(n[r],t,e)}return n}/**
68
+ * @vue/runtime-core v3.5.13
69
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
70
+ * @license MIT
71
+ **/const Kn=[];function Kv(n){Kn.push(n)}function Zv(){Kn.pop()}let Ec=!1;function Ht(n,...t){if(Ec)return;Ec=!0,Ti();const e=Kn.length?Kn[Kn.length-1].component:null,r=e&&e.appContext.config.warnHandler,s=Qv();if(r)Ri(r,e,11,[n+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),e&&e.proxy,s.map(({vnode:i})=>`at <${Cd(e,i.type)}>`).join(`
72
+ `),s]);else{const i=[`[Vue warn]: ${n}`,...t];s.length&&i.push(`
73
+ `,...t2(s)),console.warn(...i)}Pi(),Ec=!1}function Qv(){let n=Kn[Kn.length-1];if(!n)return[];const t=[];for(;n;){const e=t[0];e&&e.vnode===n?e.recurseCount++:t.push({vnode:n,recurseCount:0});const r=n.component&&n.component.parent;n=r&&r.vnode}return t}function t2(n){const t=[];return n.forEach((e,r)=>{t.push(...r===0?[]:[`
74
+ `],...e2(e))}),t}function e2({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",r=n.component?n.component.parent==null:!1,s=` at <${Cd(n.component,n.type,r)}`,i=">"+e;return n.props?[s,...n2(n.props),i]:[s+i]}function n2(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(r=>{t.push(...ad(r,n[r]))}),e.length>3&&t.push(" ..."),t}function ad(n,t,e){return Si(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:le(t)?(t=ad(n,wt(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):te(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=wt(t),e?t:[`${n}=`,t])}const cd={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ri(n,t,e,r){try{return r?n(...r):n()}catch(s){Cc(s,t,e)}}function hd(n,t,e,r){if(te(n)){const s=Ri(n,t,e,r);return s&&gv(s)&&s.catch(i=>{Cc(i,t,e)}),s}if(Qt(n)){const s=[];for(let i=0;i<n.length;i++)s.push(hd(n[i],t,e,r));return s}else({}).NODE_ENV!=="production"&&Ht(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function Cc(n,t,e,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ee;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?cd[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const u=a.ec;if(u){for(let l=0;l<u.length;l++)if(u[l](n,c,h)===!1)return}a=a.parent}if(i){Ti(),Ri(i,null,10,[n,c,h]),Pi();return}}r2(n,e,s,r,o)}function r2(n,t,e,r=!0,s=!1){if({}.NODE_ENV!=="production"){const i=cd[t];if(e&&Kv(e),Ht(`Unhandled error${i?` during execution of ${i}`:""}`),e&&Zv(),r)throw n;console.error(n)}else{if(s)throw n;console.error(n)}}const Ce=[];let on=-1;const vr=[];let Dn=null,xr=0;const ud=Promise.resolve();let ki=null;const s2=100;function ld(n){const t=ki||ud;return n?t.then(this?n.bind(this):n):t}function i2(n){let t=on+1,e=Ce.length;for(;t<e;){const r=t+e>>>1,s=Ce[r],i=cs(s);i<n||i===n&&s.flags&2?t=r+1:e=r}return t}function Tc(n){if(!(n.flags&1)){const t=cs(n),e=Ce[Ce.length-1];!e||!(n.flags&2)&&t>=cs(e)?Ce.push(n):Ce.splice(i2(t),0,n),n.flags|=1,fd()}}function fd(){ki||(ki=ud.then(md))}function dd(n){Qt(n)?vr.push(...n):Dn&&n.id===-1?Dn.splice(xr+1,0,n):n.flags&1||(vr.push(n),n.flags|=1),fd()}function o2(n){if(vr.length){const t=[...new Set(vr)].sort((e,r)=>cs(e)-cs(r));if(vr.length=0,Dn){Dn.push(...t);return}for(Dn=t,{}.NODE_ENV!=="production"&&(n=n||new Map),xr=0;xr<Dn.length;xr++){const e=Dn[xr];({}).NODE_ENV!=="production"&&pd(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}Dn=null,xr=0}}const cs=n=>n.id==null?n.flags&2?-1:1/0:n.id;function md(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>pd(n,e):es;try{for(on=0;on<Ce.length;on++){const e=Ce[on];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),Ri(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;on<Ce.length;on++){const e=Ce[on];e&&(e.flags&=-2)}on=-1,Ce.length=0,o2(n),ki=null,(Ce.length||vr.length)&&md(n)}}function pd(n,t){const e=n.get(t)||0;if(e>s2){const r=t.i,s=r&&Ed(r.type);return Cc(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return n.set(t,e+1),!1}const Pc=new Map;({}).NODE_ENV!=="production"&&(Ci().__VUE_HMR_RUNTIME__={createRecord:Ac(a2),rerender:Ac(c2),reload:Ac(h2)});const Li=new Map;function a2(n,t){return Li.has(n)?!1:(Li.set(n,{initialDef:Ni(t),instances:new Set}),!0)}function Ni(n){return M2(n)?n.__vccOpts:n}function c2(n,t){const e=Li.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(r=>{t&&(r.render=t,Ni(r.type).render=t),r.renderCache=[],r.update()}))}function h2(n,t){const e=Li.get(n);if(!e)return;t=Ni(t),gd(e.initialDef,t);const r=[...e.instances];for(let s=0;s<r.length;s++){const i=r[s],o=Ni(i.type);let a=Pc.get(o);a||(o!==e.initialDef&&gd(o,t),Pc.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(t.styles),a.delete(i)):i.parent?Tc(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}dd(()=>{Pc.clear()})}function gd(n,t){De(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function Ac(n){return(t,e)=>{try{return n(t,e)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let zi=null;Ci().requestIdleCallback,Ci().cancelIdleCallback;const Mc=n=>n?C2(n)?T2(n):Mc(n.parent):null,hs=De(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?Di(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?Di(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?Di(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?Di(n.refs):n.refs,$parent:n=>Mc(n.parent),$root:n=>Mc(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>f2(n),$forceUpdate:n=>n.f||(n.f=()=>{Tc(n.update)}),$nextTick:n=>n.n||(n.n=ld.bind(n.proxy)),$watch:n=>x2.bind(n)}),u2=n=>n==="_"||n==="$",Dc=(n,t)=>n!==Ee&&!n.__isScriptSetup&&Bt(n,t),l2={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return e[t];case 3:return i[t]}else{if(Dc(r,t))return o[t]=1,r[t];if(s!==Ee&&Bt(s,t))return o[t]=2,s[t];if((h=n.propsOptions[0])&&Bt(h,t))return o[t]=3,i[t];if(e!==Ee&&Bt(e,t))return o[t]=4,e[t];o[t]=0}}const u=hs[t];let l,d;if(u)return t==="$attrs"?ee(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&ee(n,"get",t),u(n);if((l=a.__cssModules)&&(l=l[t]))return l;if(e!==Ee&&Bt(e,t))return o[t]=4,e[t];if(d=c.config.globalProperties,Bt(d,t))return d[t];({}).NODE_ENV!=="production"&&zi&&(!Si(t)||t.indexOf("__v")!==0)&&(s!==Ee&&u2(t[0])&&Bt(s,t)?Ht(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):n===zi&&Ht(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:r,setupState:s,ctx:i}=n;return Dc(s,t)?(s[t]=e,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&Bt(s,t)?(Ht(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ee&&Bt(r,t)?(r[t]=e,!0):Bt(n.props,t)?({}.NODE_ENV!=="production"&&Ht(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Ht(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in n.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:e}):i[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!e[o]||n!==Ee&&Bt(n,o)||Dc(t,o)||(a=i[0])&&Bt(a,o)||Bt(r,o)||Bt(hs,o)||Bt(s.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:Bt(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(l2.ownKeys=n=>(Ht("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(n)));function yd(n){return Qt(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function f2(n){const t=n.type,{mixins:e,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=n.appContext,a=i.get(t);let c;return a?c=a:!s.length&&!e&&!r?c=t:(c={},s.length&&s.forEach(h=>Fi(c,h,o,!0)),Fi(c,t,o)),$e(t)&&i.set(t,c),c}function Fi(n,t,e,r=!1){const{mixins:s,extends:i}=t;i&&Fi(n,i,e,!0),s&&s.forEach(o=>Fi(n,o,e,!0));for(const o in t)if(r&&o==="expose")({}).NODE_ENV!=="production"&&Ht('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=d2[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const d2={data:bd,props:vd,emits:vd,methods:us,computed:us,beforeCreate:ie,created:ie,beforeMount:ie,mounted:ie,beforeUpdate:ie,updated:ie,beforeDestroy:ie,beforeUnmount:ie,destroyed:ie,unmounted:ie,activated:ie,deactivated:ie,errorCaptured:ie,serverPrefetch:ie,components:us,directives:us,watch:p2,provide:bd,inject:m2};function bd(n,t){return t?n?function(){return De(te(n)?n.call(this,this):n,te(t)?t.call(this,this):t)}:t:n}function m2(n,t){return us(wd(n),wd(t))}function wd(n){if(Qt(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function ie(n,t){return n?[...new Set([].concat(n,t))]:t}function us(n,t){return n?De(Object.create(null),n,t):t}function vd(n,t){return n?Qt(n)&&Qt(t)?[...new Set([...n,...t])]:De(Object.create(null),yd(n),yd(t??{})):t}function p2(n,t){if(!n)return t;if(!t)return n;const e=De(Object.create(null),n);for(const r in t)e[r]=ie(n[r],t[r]);return e}let g2=null;function xd(n,t,e=!1){const r=ls||zi;if(r||g2){const s=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return e&&te(t)?t.call(r&&r.proxy):t;({}).NODE_ENV!=="production"&&Ht(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Ht("inject() can only be used inside setup() or functional components.")}const y2=S2,b2=Symbol.for("v-scx"),w2=()=>{{const n=xd(b2);return n||{}.NODE_ENV!=="production"&&Ht("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function v2(n,t,e){return{}.NODE_ENV!=="production"&&!te(t)&&Ht("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),_d(n,t,e)}function _d(n,t,e=Ee){const{immediate:r,deep:s,flush:i,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(r!==void 0&&Ht('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Ht('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Ht('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=De({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Ht);const c=t&&r||!t&&i!=="post";let h;if(Bi){if(i==="sync"){const f=w2();h=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=es,f.resume=es,f.pause=es,f}}const u=ls;a.call=(f,p,m)=>hd(f,u,p,m);let l=!1;i==="post"?a.scheduler=f=>{y2(f,u&&u.suspense)}:i!=="sync"&&(l=!0,a.scheduler=(f,p)=>{p?f():Tc(f)}),a.augmentJob=f=>{t&&(f.flags|=4),l&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Jv(n,t,a);return Bi&&(h?h.push(d):c&&d()),d}function x2(n,t,e){const r=this.proxy,s=Si(n)?n.includes(".")?_2(r,n):()=>r[n]:n.bind(r,r);let i;te(t)?i=t:(i=t.handler,e=t);const o=E2(this),a=_d(s,i.bind(r),e);return o(),a}function _2(n,t){const e=t.split(".");return()=>{let r=n;for(let s=0;s<e.length&&r;s++)r=r[e[s]];return r}}function S2(n,t){t&&t.pendingBranch?Qt(n)?t.effects.push(...n):t.effects.push(n):dd(n)}let ls=null;const Sd=()=>ls||zi;let Oc;{const n=Ci(),t=(e,r)=>{let s;return(s=n[e])||(s=n[e]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Oc=t("__VUE_INSTANCE_SETTERS__",e=>ls=e),t("__VUE_SSR_SETTERS__",e=>Bi=e)}const E2=n=>{const t=ls;return Oc(n),n.scope.on(),()=>{n.scope.off(),Oc(t)}};function C2(n){return n.vnode.shapeFlag&4}let Bi=!1;function T2(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(Xv(Uv(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in hs)return hs[e](n)},has(t,e){return e in t||e in hs}})):n.proxy}const P2=/(?:^|[-_])(\w)/g,A2=n=>n.replace(P2,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ed(n,t=!0){return te(n)?n.displayName||n.name:n.name||t&&n.__name}function Cd(n,t,e=!1){let r=Ed(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&n&&n.parent){const s=i=>{for(const o in i)if(i[o]===t)return o};r=s(n.components||n.parent.type.components)||s(n.appContext.components)}return r?A2(r):e?"App":"Anonymous"}function M2(n){return te(n)&&"__vccOpts"in n}const Td=(n,t)=>{const e=Wv(n,t,Bi);if({}.NODE_ENV!=="production"){const r=Sd();r&&r.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function D2(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(l){return $e(l)?l.__isVue?["div",n,"VueInstance"]:le(l)?["div",{},["span",n,u(l)],"<",a("_value"in l?l._value:l),">"]:wr(l)?["div",{},["span",n,ue(l)?"ShallowReactive":"Reactive"],"<",a(l),`>${sn(l)?" (readonly)":""}`]:sn(l)?["div",{},["span",n,ue(l)?"ShallowReadonly":"Readonly"],"<",a(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...i(l.$)]}};function i(l){const d=[];l.type.props&&l.props&&d.push(o("props",wt(l.props))),l.setupState!==Ee&&d.push(o("setup",l.setupState)),l.data!==Ee&&d.push(o("data",wt(l.data)));const f=c(l,"computed");f&&d.push(o("computed",f));const p=c(l,"inject");return p&&d.push(o("injected",p)),d.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),d}function o(l,d){return d=De({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",r,f+": "],a(d[f],!1)])]]:["span",{}]}function a(l,d=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",e,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:$e(l)?["object",{object:d?wt(l):l}]:["span",e,String(l)]}function c(l,d){const f=l.type;if(te(f))return;const p={};for(const m in l.ctx)h(f,m,d)&&(p[m]=l.ctx[m]);return p}function h(l,d,f){const p=l[f];if(Qt(p)&&p.includes(d)||$e(p)&&d in p||l.extends&&h(l.extends,d,f)||l.mixins&&l.mixins.some(m=>h(m,d,f)))return!0}function u(l){return ue(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}/**
75
+ * vue v3.5.13
76
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
77
+ * @license MIT
78
+ **/function O2(){D2()}({}).NODE_ENV!=="production"&&O2();function I2(n){const[t,e]=Et.useState(n),r=Et.useRef(t),s=Et.useRef(jo()),i=Et.useCallback(o=>{e(a=>{const c=typeof o=="function"?o(a):o;return Object.is(a,c)?a:(r.current=c,s.current.emit(c),c)})},[]);return Et.useMemo(()=>({getState:()=>r.current,setState:i,subscribe:o=>{Bn(()=>o(r.current));const a=s.current.subscribe(c=>{Bn(()=>o(c))});return()=>a()}}),[])}function R2(n){const t=id(n),e=jo();return{getState:()=>t.value,setState:s=>{const i=typeof s=="function"?s(t.value):s;Object.is(t.value,i)||(t.value=i,e.emit(i))},subscribe:s=>(Bn(()=>s(t.value)),e.subscribe(i=>{Bn(()=>s(i))}))}}function k2(n){const t=new hi(n);return{getState:()=>t.value,setState:e=>{const r=t.value,s=typeof e=="function"?e(r):e;Object.is(r,s)||t.next(s)},subscribe:e=>{const r=t.subscribe(s=>{Bn(()=>e(s))});return()=>r.unsubscribe()}}}function Ic(n,t){let e=n;const r=jo();return{getState:()=>e,setState:s=>{const i=typeof s=="function"?s(e):s;Object.is(e,i)||t?.beforeChange&&!t.beforeChange(i)||(e=i,r.emit(e))},subscribe:s=>{Bn(()=>s(e));const i=r.subscribe(o=>{Bn(()=>s(o))});return()=>i()}}}function Pd(n){const t=n.initState||{};let e=n.reducer;if(n.enhancer)return n.enhancer(Pd)({reducer:e,initState:t});const r=Ic(t),s=o=>{const a=e(r.getState(),o);r.setState(a)},i=o=>{e=o,s({type:Symbol()})};return s({type:Symbol()}),{getState:r.getState,dispatch:s,subscribe:r.subscribe,replaceReducer:i}}function L2(n,t=!0){const e=Object.keys(n);return(r={},s)=>{const i=t?{...r}:r;for(const o of e){const a=n[o](i[o]??{},s);if(a===void 0)throw new Error(`Reducer "${o}" returned undefined`);i[o]=a}return i}}function N2(...n){return t=>e=>{const r=t(e);let s=r.dispatch;const i={getState:r.getState,dispatch:s},o=n.map(a=>a(i));return s=Og(...o)(s),r.dispatch=s,r}}function z2(n){const t=new hi(void 0),e=new Ze;let r=null,s=!1,i=!1;return{middleware(o){return s?a=>a:(s=!0,t.next(o.getState()),a=>c=>{const h=a(c);return t.next(o.getState()),e.next(c),h})},run(o,a){if(!s)throw new Error("EpicMiddleware should applyMiddleware() to store before");if(i)throw new Error("EpicMiddleware destroyed");return r||(r=o(e,t,{...n?.dependencies??{},dispatch:a.dispatch}).pipe(lf((c,h)=>(jg("[Epic Error]",c),h))).subscribe({next(c){a.dispatch(c)},error(c){console.error("[Epic Fatal Error]",c)}}),r)},destroy(){i=!0,r?.unsubscribe(),r=null,e.complete(),t.complete()}}}function F2(...n){return(t,e,r)=>li(...n.map(s=>s(t,e,r)))}function B2(...n){return Ua(t=>n.includes(t.type))}function $2(){return{middleware(n){return t=>e=>typeof e=="function"?e(n.dispatch,n.getState):t(e)}}}const U2=n=>{let t=0;return e=>r=>{Mu.start(`--- ${++t}: action(${String(r.type)}) ---`),gn(`action: ${Us(r)}`),gn(`old-state: ${Us(n.getState())}`),e(r),gn(`new-state: ${Us(n.getState())}`),Mu.end()}},Y2=n=>t=>e=>{try{t(e)}catch(r){throw gn(`Reducer错误报告: ${r}`),r}},j2=n=>t=>e=>{const r=`dispatch(${String(e.type)}) execute time`;Du.start(r),t(e),Du.end(r)};function V2(n="",t){const{OPERATION_DELIMITER:e="/",KEY_DELIMITER:r=",",KEY_VALUE_DELIMITER:s=":"}=t||{};return n.split(e).filter(i=>i!=="").reduce((i,o)=>{const[a,...c]=o.split(r);if(c.length===0){const[h,u]=a.split(s);i.push({type:h,payload:u!==void 0?decodeURIComponent(u):!0})}else{if(a.indexOf(s)!==-1)throw new Error(`"${a}" is invalid`);i.push(c.reduce((h,u)=>{const[l,d]=u.split(s);return h[l]=d!==void 0?decodeURIComponent(d):!0,h},{type:a}))}return i},[])}var Rc={exports:{}},kc={};const $i=c1(fv);var Ui={exports:{}},Lc={};/**
79
+ * @license React
80
+ * use-sync-external-store-shim.production.js
81
+ *
82
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
83
+ *
84
+ * This source code is licensed under the MIT license found in the
85
+ * LICENSE file in the root directory of this source tree.
86
+ */var Ad;function G2(){if(Ad)return Lc;Ad=1;var n=$i;function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var e=typeof Object.is=="function"?Object.is:t,r=n.useState,s=n.useEffect,i=n.useLayoutEffect,o=n.useDebugValue;function a(l,d){var f=d(),p=r({inst:{value:f,getSnapshot:d}}),m=p[0].inst,v=p[1];return i(function(){m.value=f,m.getSnapshot=d,c(m)&&v({inst:m})},[l,f,d]),s(function(){return c(m)&&v({inst:m}),l(function(){c(m)&&v({inst:m})})},[l]),o(f),f}function c(l){var d=l.getSnapshot;l=l.value;try{var f=d();return!e(l,f)}catch{return!0}}function h(l,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:a;return Lc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:u,Lc}var Nc={};/**
87
+ * @license React
88
+ * use-sync-external-store-shim.development.js
89
+ *
90
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
91
+ *
92
+ * This source code is licensed under the MIT license found in the
93
+ * LICENSE file in the root directory of this source tree.
94
+ */var Md;function X2(){return Md||(Md=1,{}.NODE_ENV!=="production"&&function(){function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||s.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!l){var v=p();i(m,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}v=o({inst:{value:m,getSnapshot:p}});var g=v[0].inst,b=v[1];return c(function(){g.value=m,g.getSnapshot=p,e(g)&&b({inst:g})},[f,m,p]),a(function(){return e(g)&&b({inst:g}),f(function(){e(g)&&b({inst:g})})},[f]),h(m),m}function e(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!i(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=$i,i=typeof Object.is=="function"?Object.is:n,o=s.useState,a=s.useEffect,c=s.useLayoutEffect,h=s.useDebugValue,u=!1,l=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Nc.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Nc}var Dd;function Od(){return Dd||(Dd=1,{}.NODE_ENV==="production"?Ui.exports=G2():Ui.exports=X2()),Ui.exports}/**
95
+ * @license React
96
+ * use-sync-external-store-shim/with-selector.production.js
97
+ *
98
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
99
+ *
100
+ * This source code is licensed under the MIT license found in the
101
+ * LICENSE file in the root directory of this source tree.
102
+ */var Id;function H2(){if(Id)return kc;Id=1;var n=$i,t=Od();function e(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var r=typeof Object.is=="function"?Object.is:e,s=t.useSyncExternalStore,i=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return kc.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(E){if(!b){if(b=!0,x=E,E=d(E),f!==void 0&&m.hasValue){var O=m.value;if(f(O,E))return w=O}return w=E}if(O=w,r(x,E))return O;var U=d(E);return f!==void 0&&f(O,U)?(x=E,O):(x=E,w=U)}var b=!1,x,w,C=l===void 0?null:l;return[function(){return g(u())},C===null?void 0:function(){return g(C())}]},[u,l,d,f]);var v=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},kc}var zc={};/**
103
+ * @license React
104
+ * use-sync-external-store-shim/with-selector.development.js
105
+ *
106
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
107
+ *
108
+ * This source code is licensed under the MIT license found in the
109
+ * LICENSE file in the root directory of this source tree.
110
+ */var Rd;function W2(){return Rd||(Rd=1,{}.NODE_ENV!=="production"&&function(){function n(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=$i,e=Od(),r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;zc.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(E){if(!b){if(b=!0,x=E,E=d(E),f!==void 0&&m.hasValue){var O=m.value;if(f(O,E))return w=O}return w=E}if(O=w,r(x,E))return O;var U=d(E);return f!==void 0&&f(O,U)?(x=E,O):(x=E,w=U)}var b=!1,x,w,C=l===void 0?null:l;return[function(){return g(u())},C===null?void 0:function(){return g(C())}]},[u,l,d,f]);var v=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),zc}({}).NODE_ENV==="production"?Rc.exports=H2():Rc.exports=W2();var q2=Rc.exports;function J2(n){const t=Et.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function r(){const a=Et.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function s(a,c){const h=r(),u=l=>h.subscribe(()=>l());return a?q2.useSyncExternalStoreWithSelector(u,h.getState,h.getState,a,c):Et.useSyncExternalStore(u,h.getState,h.getState)}function i(){const a=r();if(ks(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=r();if(!ks(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:r,useAppState:s,useSetAppState:i,useDispatch:o}}function K2(n){const e=Et.useRef(Dr(n.value)).current;if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const[r,s]=Et.useState(()=>e?n.value:n.defaultValue),i=e?n.value:r,o=Et.useRef(i);o.current=i;const a=Et.useRef(!1);Et.useEffect(()=>{!a.current&&Dr(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=Et.useRef(n.beforeChange);c.current=n.beforeChange;const h=Et.useRef(n.onChange);h.current=n.onChange;const u=Et.useRef(0),l=Et.useCallback(async d=>{const f=++u.current,p=typeof d=="function"?d(o.current):d;c.current&&!await c.current(p)||f===u.current&&(e||s(p),h.current?.(p))},[]);return[i,l]}var kd=Symbol.for("immer-nothing"),Ld=Symbol.for("immer-draftable"),oe=Symbol.for("immer-state"),Z2={}.NODE_ENV!=="production"?[function(n){return`The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`},function(n){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`},"This object has been frozen and should not be mutated",function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(n){return`'current' expects a draft, got: ${n}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(n){return`'original' expects a draft, got: ${n}`}]:[];function ye(n,...t){if({}.NODE_ENV!=="production"){const e=Z2[n],r=Zn(e)?e.apply(null,t):e;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var be=Object,_r=be.getPrototypeOf,Yi="constructor",ji="prototype",Fc="configurable",Vi="enumerable",Gi="writable",fs="value",On=n=>!!n&&!!n[oe];function an(n){return n?zd(n)||Wi(n)||!!n[Ld]||!!n[Yi]?.[Ld]||qi(n)||Ji(n):!1}var Q2=be[ji][Yi].toString(),Nd=new WeakMap;function zd(n){if(!n||!$c(n))return!1;const t=_r(n);if(t===null||t===be[ji])return!0;const e=be.hasOwnProperty.call(t,Yi)&&t[Yi];if(e===Object)return!0;if(!Zn(e))return!1;let r=Nd.get(e);return r===void 0&&(r=Function.toString.call(e),Nd.set(e,r)),r===Q2}function Xi(n,t,e=!0){ds(n)===0?(e?Reflect.ownKeys(n):be.keys(n)).forEach(s=>{t(s,n[s],n)}):n.forEach((r,s)=>t(s,r,n))}function ds(n){const t=n[oe];return t?t.type_:Wi(n)?1:qi(n)?2:Ji(n)?3:0}var Fd=(n,t,e=ds(n))=>e===2?n.has(t):be[ji].hasOwnProperty.call(n,t),Bc=(n,t,e=ds(n))=>e===2?n.get(t):n[t],Hi=(n,t,e,r=ds(n))=>{r===2?n.set(t,e):r===3?n.add(e):n[t]=e};function tx(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var Wi=Array.isArray,qi=n=>n instanceof Map,Ji=n=>n instanceof Set,$c=n=>typeof n=="object",Zn=n=>typeof n=="function",Uc=n=>typeof n=="boolean";function ex(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var cn=n=>n.copy_||n.base_,Yc=n=>n.modified_?n.copy_:n.base_;function jc(n,t){if(qi(n))return new Map(n);if(Ji(n))return new Set(n);if(Wi(n))return Array[ji].slice.call(n);const e=zd(n);if(t===!0||t==="class_only"&&!e){const r=be.getOwnPropertyDescriptors(n);delete r[oe];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a[Gi]===!1&&(a[Gi]=!0,a[Fc]=!0),(a.get||a.set)&&(r[o]={[Fc]:!0,[Gi]:!0,[Vi]:a[Vi],[fs]:n[o]})}return be.create(_r(n),r)}else{const r=_r(n);if(r!==null&&e)return{...n};const s=be.create(r);return be.assign(s,n)}}function ms(n,t=!1){return Zi(n)||On(n)||!an(n)||(ds(n)>1&&be.defineProperties(n,{set:Ki,add:Ki,clear:Ki,delete:Ki}),be.freeze(n),t&&Xi(n,(e,r)=>{ms(r,!0)},!1)),n}function nx(){ye(2)}var Ki={[fs]:nx};function Zi(n){return n===null||!$c(n)?!0:be.isFrozen(n)}var Qi="MapSet",Vc="Patches",Bd="ArrayMethods",$d={};function Qn(n){const t=$d[n];return t||ye(0,n),t}var Ud=n=>!!$d[n],ps,Yd=()=>ps,rx=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ud(Qi)?Qn(Qi):void 0,arrayMethodsPlugin_:Ud(Bd)?Qn(Bd):void 0});function jd(n,t){t&&(n.patchPlugin_=Qn(Vc),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function Gc(n){Xc(n),n.drafts_.forEach(sx),n.drafts_=null}function Xc(n){n===ps&&(ps=n.parent_)}var Vd=n=>ps=rx(ps,n);function sx(n){const t=n[oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gd(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[oe].modified_&&(Gc(t),ye(4)),an(n)&&(n=Xd(t,n));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(e[oe].base_,n,t)}else n=Xd(t,e);return ix(t,n,!0),Gc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==kd?n:void 0}function Xd(n,t){if(Zi(t))return t;const e=t[oe];if(!e)return eo(t,n.handledSet_,n);if(!to(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:r}=e;if(r)for(;r.length>0;)r.pop()(n);qd(e,n)}return e.copy_}function ix(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&ms(t,e)}function Hd(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var to=(n,t)=>n.scope_===t,ox=[];function Wd(n,t,e,r){const s=cn(n),i=n.type_;if(r!==void 0&&Bc(s,r,i)===t){Hi(s,r,e,i);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;Xi(s,(c,h)=>{if(On(h)){const u=a.get(h)||[];u.push(c),a.set(h,u)}})}const o=n.draftLocations_.get(t)??ox;for(const a of o)Hi(s,a,e,i)}function ax(n,t,e){n.callbacks_.push(function(s){const i=t;if(!i||!to(i,s))return;s.mapSetPlugin_?.fixSetContents(i);const o=Yc(i);Wd(n,i.draft_??i,o,e),qd(i,s)})}function qd(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const s=r.getPath(n);s&&r.generatePatches_(n,s,t)}Hd(n)}}function cx(n,t,e){const{scope_:r}=n;if(On(e)){const s=e[oe];to(s,r)&&s.callbacks_.push(function(){ro(n);const o=Yc(s);Wd(n,e,o,t)})}else an(e)&&n.callbacks_.push(function(){const i=cn(n);n.type_===3?i.has(e)&&eo(e,r.handledSet_,r):Bc(i,t,n.type_)===e&&r.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&eo(Bc(n.copy_,t,n.type_),r.handledSet_,r)})}function eo(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||On(n)||t.has(n)||!an(n)||Zi(n)||(t.add(n),Xi(n,(r,s)=>{if(On(s)){const i=s[oe];if(to(i,e)){const o=Yc(i);Hi(n,r,o,n.type_),Hd(i)}}else an(s)&&eo(s,t,e)})),n}function hx(n,t){const e=Wi(n),r={type_:e?1:0,scope_:t?t.scope_:Yd(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,i=no;e&&(s=[r],i=gs);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,[a,r]}var no={get(n,t){if(t===oe)return n;let e=n.scope_.arrayMethodsPlugin_;const r=n.type_===1&&typeof t=="string";if(r&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const s=cn(n);if(!Fd(s,t,n.type_))return ux(n,s,t);const i=s[t];if(n.finalized_||!an(i)||r&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&ex(t))return i;if(i===Hc(n.base_,t)){ro(n);const o=n.type_===1?+t:t,a=qc(n.scope_,i,n,o);return n.copy_[o]=a}return i},has(n,t){return t in cn(n)},ownKeys(n){return Reflect.ownKeys(cn(n))},set(n,t,e){const r=Jd(cn(n),t);if(r?.set)return r.set.call(n.draft_,e),!0;if(!n.modified_){const s=Hc(cn(n),t),i=s?.[oe];if(i&&i.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(tx(e,s)&&(e!==void 0||Fd(n.base_,t,n.type_)))return!0;ro(n),Wc(n)}return n.copy_[t]===e&&(e!==void 0||t in n.copy_)||Number.isNaN(e)&&Number.isNaN(n.copy_[t])||(n.copy_[t]=e,n.assigned_.set(t,!0),cx(n,t,e)),!0},deleteProperty(n,t){return ro(n),Hc(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),Wc(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=cn(n),r=Reflect.getOwnPropertyDescriptor(e,t);return r&&{[Gi]:!0,[Fc]:n.type_!==1||t!=="length",[Vi]:r[Vi],[fs]:e[t]}},defineProperty(){ye(11)},getPrototypeOf(n){return _r(n.base_)},setPrototypeOf(){ye(12)}},gs={};for(let n in no){let t=no[n];gs[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}gs.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ye(13),gs.set.call(this,n,t,void 0)},gs.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ye(14),no.set.call(this,n[0],t,e,n[0])};function Hc(n,t){const e=n[oe];return(e?cn(e):n)[t]}function ux(n,t,e){const r=Jd(t,e);return r?fs in r?r[fs]:r.get?.call(n.draft_):void 0}function Jd(n,t){if(!(t in n))return;let e=_r(n);for(;e;){const r=Object.getOwnPropertyDescriptor(e,t);if(r)return r;e=_r(e)}}function Wc(n){n.modified_||(n.modified_=!0,n.parent_&&Wc(n.parent_))}function ro(n){n.copy_||(n.assigned_=new Map,n.copy_=jc(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var lx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,r)=>{if(Zn(t)&&!Zn(e)){const i=e;e=t;const o=this;return function(c=i,...h){return o.produce(c,u=>e.call(this,u,...h))}}Zn(e)||ye(6),r!==void 0&&!Zn(r)&&ye(7);let s;if(an(t)){const i=Vd(this),o=qc(i,t,void 0);let a=!0;try{s=e(o),a=!1}finally{a?Gc(i):Xc(i)}return jd(i,r),Gd(s,i)}else if(!t||!$c(t)){if(s=e(t),s===void 0&&(s=t),s===kd&&(s=void 0),this.autoFreeze_&&ms(s,!0),r){const i=[],o=[];Qn(Vc).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),r(i,o)}return s}else ye(1,t)},this.produceWithPatches=(t,e)=>{if(Zn(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let r,s;return[this.produce(t,e,(o,a)=>{r=o,s=a}),r,s]},Uc(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),Uc(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),Uc(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){an(n)||ye(8),On(n)&&(n=fx(n));const t=Vd(this),e=qc(t,n,void 0);return e[oe].isManual_=!0,Xc(t),e}finishDraft(n,t){const e=n&&n[oe];(!e||!e.isManual_)&&ye(9);const{scope_:r}=e;return jd(r,t),Gd(void 0,r)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,t){let e;for(e=t.length-1;e>=0;e--){const s=t[e];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}e>-1&&(t=t.slice(e+1));const r=Qn(Vc).applyPatches_;return On(n)?r(n,t):this.produce(n,s=>r(s,t))}};function qc(n,t,e,r){const[s,i]=qi(t)?Qn(Qi).proxyMap_(t,e):Ji(t)?Qn(Qi).proxySet_(t,e):hx(t,e);return(e?.scope_??Yd()).drafts_.push(s),i.callbacks_=e?.callbacks_??[],i.key_=r,e&&r!==void 0?ax(e,i,r):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:h}=c;i.modified_&&h&&h.generatePatches_(i,[],c)}),s}function fx(n){return On(n)||ye(10,n),Kd(n)}function Kd(n){if(!an(n)||Zi(n))return n;const t=n[oe];let e,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=jc(n,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else e=jc(n,!0);return Xi(e,(s,i)=>{Hi(e,s,Kd(i))},r),t&&(t.finalized_=!1),e}var dx=new lx,Zd=dx.produce;function mx(n){const[t,e]=Et.useState(()=>ms(typeof n=="function"?n():n,!0));return[t,Et.useCallback(r=>{e(typeof r=="function"?Zd(r):ms(r))},[])]}function px(n,t,e){const r=Et.useMemo(()=>Zd(n),[n]);return Et.useReducer(r,t,e)}function gx(n){const[t,e]=Et.useState({width:0,height:0});return Et.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}function yx(n){const t=Symbol("AppStore");function e(){const c=Yv(n.getState());n.subscribe(l=>{c.value=l});const h=Sd();if(!h)throw new Error("provideAppStore must be called in setup()");const u={store:n,stateRef:c};h.appContext.provides[t]=u}function r(){const c=xd(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function s(){const{store:c}=r();return c}function i(c){const{stateRef:h}=r();return c?Td(()=>c(h.value)):xc(h)}function o(){const c=s();if(ks(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=s();if(!ks(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:s,useAppState:i,useSetAppState:o,useDispatch:a}}function bx(n){const t=n.value(),e=Dr(t);if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const r=id(e?t:n.defaultValue),s=Td(()=>e?n.value():r.value);let i=!1;v2(n.value,c=>{if(!i&&Dr(c)!==e){i=!0,console.warn("[useVueControllableState] can't switch between controlled and uncontrolled mode.");return}},{});let o=0;async function a(c){const h=++o,u=typeof c=="function"?c(s.value):c;n.beforeChange&&!await n.beforeChange(u)||h===o&&(e||(r.value=u),n.onChange?.(u),await ld())}return[s,a]}let Jc=class{x;y;toX;toY;constructor(t){this.x=tt(t?.x||0,2),this.y=tt(t?.y||0,2),this.toX=tt(t?.toX||0,2),this.toY=tt(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=ge(this.x,this.y,this.toX,this.toY);if(e===0){const r=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:r,y:s,width:i-r,height:o-s}}else{const r=Math.sin(e),s=Math.cos(e),i=s*this.x-r*this.y,o=s*this.toX-r*this.toY,a=s*this.y+r*this.x,c=s*this.toY+r*this.toX;return{x:tt(Math.min(i,o),t),y:tt(Math.min(a,c),t),width:tt(Math.max(i,o)-Math.min(i,o),t),height:tt(Math.max(a,c)-Math.min(a,c),t)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class Kc extends Jc{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=tt(t.rx,2),this.ry=tt(t.ry,2),this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const H=Math.sqrt(m);throw i=H*i,o=H*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const v=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,b=g*v*i*p/o,x=g*v*-o*f/i,w=(t+r)/2,C=(e+s)/2,E=Math.cos(u)*b-Math.sin(u)*x+w,O=Math.sin(u)*b+Math.cos(u)*x+C,U=(H,V,lt,yt)=>(H*yt>=V*lt?1:-1)*Math.acos((H*lt+V*yt)/(Math.sqrt(H*H+V*V)*Math.sqrt(lt*lt+yt*yt))),R=U(1,0,t-E,e-O)-u,j=U(t-E,e-O,r-E,s-O);return[E,O,i,o,u,R,R+j]}}class vx extends Jc{cx;cy;isLineThrough;constructor(t){super(t),this.cx=tt(t.cx,2),this.cy=tt(t.cy,2),this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],r=[this.y,this.toY];let s,i,o,a;for(let u=0;u<2;++u)s=u==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=u==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=u==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-i/(2*s),0<a&&a<1&&[e,r][u].push(s*a*a+i*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...r)},h={x:Math.max(0,...e),y:Math.max(0,...r)};return{x:tt(c.x,t),y:tt(c.y,t),width:tt(h.x-c.x,t),height:tt(h.y-c.y,t)}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const xx=vx;class Wt extends Jc{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=tt(t.c1x,2),this.c1y=tt(t.c1y,2),this.c2x=tt(t.c2x,2),this.c2y=tt(t.c2y,2)}clone(){return new Wt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),r=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const u=[];Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),r=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e,Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y}));const l=[],d=u.length;for(let m=0;m<d;m++){for(let v=m+1;v<d;v++)u[m].X===u[v].X&&u[m].Y===u[v].Y&&(v=++m);l.push({X:u[m].X,Y:u[m].Y})}const f={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:tt(f.x,t),y:tt(f.y,t),width:tt(p.x-f.x,t),height:tt(p.y-f.y,t),dots:l}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,v=Wt.base3(m,t,r,i,a),g=Wt.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+g*g)}return u*f}length(t=1){return Wt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,v=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,b=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y:g},alpha:b}}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Wt.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=Wt.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=Wt.bezlen(e,r,s,i,o,a,c,h,d);return d}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}}class Qd extends Vo{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Up(this.source);if(t===0){this.emit("finish");return}let e,r,s=uu(this.source,0);for(let i=1;i<t;i++)e=r,r=s,s=uu(this.source,i),this.raw+=r,r&&this.step(r,s,e);s&&this.step(s,void 0,r),this.emit("finish")}step(t,e,r){t==`
111
+ `&&this.emit("newline"),this.act(t,e,r)}act(t,e,r){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":Xe("whitespace",t)?(this.textchunk+=tm(this.entity),this.mode="text"):t==";"?(this.textchunk+=tm(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(r=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(r=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,r)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&r=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!Xe("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,r)}break;case"close tag name start":Xe("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,r));break;case"close tag name":if(Xe("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(Xe("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":Xe("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,r));break;case"attr":if(Xe("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!Xe("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,r)}break;case"attr value":if(Xe("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&r!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function tm(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var em=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function nm(n,t={}){var e=1,r=1;function s($){var z=$.match(/\n/g);z&&(e+=z.length);var A=$.lastIndexOf(`
112
+ `);r=~A?$.length-A:r+$.length}function i(){var $={line:e,column:r};return function(z){return z.position=new o($),p(),z}}function o($){this.start=$,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;var a=[];function c($){var z=new Error(t.source+":"+e+":"+r+": "+$);if(z.reason=$,z.filename=t.source,z.line=e,z.column=r,z.source=n,t.silent)a.push(z);else throw z}function h(){var $=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:$,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var $,z=[];for(p(),m(z);n.length&&n.charAt(0)!="}"&&($=st()||Ct());)$!==!1&&(z.push($),m(z));return z}function f($){var z=$.exec(n);if(z){var A=z[0];return s(A),n=n.slice(A.length),z}}function p(){f(/^\s*/)}function m($){var z;for($=$||[];z=v();)z!==!1&&$.push(z);return $}function v(){var $=i();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var z=2;n.charAt(z)!=""&&(n.charAt(z)!="*"||n.charAt(z+1)!="/");)++z;if(z+=2,n.charAt(z-1)==="")return c("End of comment missing");var A=n.slice(2,z-2);return r+=2,s(A),n=n.slice(z),r+=2,$({type:"comment",comment:A})}}function g(){var $=f(/^([^{]+)/);if($)return hn($[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(z){return z.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(z){return z.replace(/\u200C/g,",")})}function b(){var $=i(),z=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(z){if(z=hn(z[0]),!f(/^:\s*/))return c("property missing ':'");var A=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),L=$({type:"declaration",property:z.replace(em,""),value:A?hn(A[0]).replace(em,""):""});return f(/^[;\s]*/),L}}function x(){var $=[];if(!u())return c("missing '{'");m($);for(var z;z=b();)z!==!1&&($.push(z),m($));return l()?$:c("missing '}'")}function w(){for(var $,z=[],A=i();$=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)z.push($[1]),f(/^,\s*/);if(z.length)return A({type:"keyframe",values:z,declarations:x()})}function C(){var $=i(),z=f(/^@([-\w]+)?keyframes\s*/);if(z){var A=z[1];if(z=f(/^([-\w]+)\s*/),!z)return c("@keyframes missing name");var L=z[1];if(!u())return c("@keyframes missing '{'");for(var W,q=m();W=w();)q.push(W),q=q.concat(m());return l()?$({type:"keyframes",name:L,vendor:A,keyframes:q}):c("@keyframes missing '}'")}}function E(){var $=i(),z=f(/^@supports *([^{]+)/);if(z){var A=hn(z[1]);if(!u())return c("@supports missing '{'");var L=m().concat(d());return l()?$({type:"supports",supports:A,rules:L}):c("@supports missing '}'")}}function O(){var $=i(),z=f(/^@host\s*/);if(z){if(!u())return c("@host missing '{'");var A=m().concat(d());return l()?$({type:"host",rules:A}):c("@host missing '}'")}}function U(){var $=i(),z=f(/^@media *([^{]+)/);if(z){var A=hn(z[1]);if(!u())return c("@media missing '{'");var L=m().concat(d());return l()?$({type:"media",media:A,rules:L}):c("@media missing '}'")}}function R(){var $=i(),z=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(z)return $({type:"custom-media",name:hn(z[1]),media:hn(z[2])})}function j(){var $=i(),z=f(/^@page */);if(z){var A=g()||[];if(!u())return c("@page missing '{'");for(var L=m(),W;W=b();)L.push(W),L=L.concat(m());return l()?$({type:"page",selectors:A,declarations:L}):c("@page missing '}'")}}function H(){var $=i(),z=f(/^@([-\w]+)?document *([^{]+)/);if(z){var A=hn(z[1]),L=hn(z[2]);if(!u())return c("@document missing '{'");var W=m().concat(d());return l()?$({type:"document",document:L,vendor:A,rules:W}):c("@document missing '}'")}}function V(){var $=i(),z=f(/^@font-face\s*/);if(z){if(!u())return c("@font-face missing '{'");for(var A=m(),L;L=b();)A.push(L),A=A.concat(m());return l()?$({type:"font-face",declarations:A}):c("@font-face missing '}'")}}var lt=ct("import"),yt=ct("charset"),mt=ct("namespace");function ct($){var z=new RegExp("^@"+$+"\\s*([^;]+);");return function(){var A=i(),L=f(z);if(L){var W={type:$};return W[$]=L[1].trim(),A(W)}}}function st(){if(n[0]=="@")return C()||U()||R()||E()||lt()||yt()||mt()||H()||j()||O()||V()}function Ct(){var $=i(),z=g();return z?(m(),$({type:"rule",selectors:z,declarations:x()})):c("selector missing")}return Zc(h())}function hn(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Zc(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var s in n){var i=n[s];Array.isArray(i)?i.forEach(function(o){Zc(o,r)}):i&&typeof i=="object"&&Zc(i,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class rm extends Qd{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,r)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,r)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const r=nm(e);for(const s of r.stylesheet.rules)for(const i of s.declarations)for(const o of s.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${i.property}:${i.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,r)=>{let s=this.groups.length;for(;s--;)if(this.groups[s]!=this.currentItem){let i="",o="";for(const a in this.groups[s])a=="transform"?i=this.groups[s].transform:a=="class"&&this.globalStyles["."+this.groups[s][a]]?o=this.globalStyles["."+this.groups[s][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[s][a]]?o=this.globalStyles["#"+this.groups[s][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[s][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=i:this.currentItem.transform+=" "+i,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),th(this.currentItem.style,this.currentItem,eh)}switch(this.processAttrs(e,r),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let r=[],s;switch(t){case"svg":let i="",o="";if(e.width&&e.height)i=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(i=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}i&&o&&this.items.push({type:"viewbox",width:i,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":s={},e.style&&th(e.style,s),s.offset=s.offset||e.offset,s.color=s["stop-color"]||e["stop-color"],s.opacity=s["stop-opacity"]||e["stop-opacity"],~(s.offset+"").indexOf("%")?s.offset=parseFloat(s.offset):s.offset=parseFloat(s.offset)*100,s.offset=+s.offset.toFixed(2),this.grad.stops.push(s);break;case"linearGradient":this.grad.angle=(360+Qc(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),r=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":r=[];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const i in e){const o=e[i];if(eh.includes(i)&&(this.currentItem[i]=o),i==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:i,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:i,stops:[]})),i==="style"&&th(o,this.currentItem,eh),i==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),i==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}i==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),i==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),i==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function Qc(n,t,e,r,s,i){if(typeof s>"u"||typeof i>"u"){const o=n-e,a=t-r;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Qc(n,t,s,i)-Qc(e,r,s,i)}function th(n,t,e){const r=(n+"").split(";"),s=/^\s+|\s+$/g;for(let i=0,o=r.length;i<o;i++){const a=r[i].split(":"),c=a[0].replace(s,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(s,""))}}const eh=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class ae{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?wi(t):t||[],r=ec(vi(e));for(let s=0,i=r.length;s<i;s++){const o=r[s];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Wt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof Kc){bi(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,v,g]=h;this.normalizedLines.push(new Wt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:g})),this.prevPathX=v,this.prevPathY=g});return}if(t instanceof Wt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,r,s,i,o,a;t instanceof xx?[e,r,s,i,o,a]=qr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=Wn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Wt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new ae,r=t.length;if(r){e.prevPathX=t[0],e.prevPathY=t[1];for(let s=2;s+5<r;s+=6)e._appendLine(new Wt({x:e.prevPathX,y:e.prevPathY,c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}))}return e}static fromLines(t){const e=new ae,r=t.length;if(r){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let s=0;s<r;s++)e._appendLine(t[s])}return e}clone(){return ae.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.push(["M",s.x,s.y]),t.push(...s.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=tc(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.moveTo(s.x,s.y),s.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],r=[];if(this.normalizedLines.forEach(s=>{const i=s.getBoundingClientRect(t);e.push(i.x,i.x+i.width),r.push(i.y,i.y+i.height)}),e.length==0||r.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);this.cachedBoundingClientRect={x:tt(s,t),y:tt(i,t),width:tt(o-s,t),height:tt(a-i,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:tt(e.x+e.width*.5,t),y:tt(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new qt,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():ae.fromLines(this.normalizedLines.map(r=>{let s=r.x,i=r.y,o=r.c1x,a=r.c1y,c=r.c2x,h=r.c2y,u=r.toX,l=r.toY;return{x:s,y:i}=e.transformPoint({x:s,y:i}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:u,y:l}=e.transformPoint({x:u,y:l}),new Wt({x:s,y:i,c1x:o,c1y:a,c2x:c,c2y:h,toX:u,toY:l})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,r=0;const s=this.normalizedLines.length;for(let i=0;i<s;i++){const o=this.normalizedLines[i];if(r=o.length(),e+r>=t)return o.getPointAtSegmentLength(t-e);e+=r}return this.normalizedLines[s-1].getPointAtSegmentLength(r)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let r=t*e,s=this.normalizedLines[0];if(r--,r>1)for(let i=1;i<e&&(s=this.normalizedLines[i],r>1);i++)r-=1;return s.interpolate(r)}}getSubPathD(t,e,r=1e-6){const s=this.getSubPathDAtLength(e,!0);return zo(r)(t,0)?s:s.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const r=new ae;let s=0,i=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(r.prevPathX=c.x,r.prevPathY=c.y);const h=c.length();if(s+h>t&&!i){i=!0;const u=c.getPointAtSegmentLength(t-s);if(r._appendLine(new Wt({x:r.prevPathX,y:r.prevPathY,c1x:u.start.x,c1y:u.start.y,c2x:u.m.x,c2y:u.m.y,toX:u.x,toY:u.y})),e)return r;r.normalizedLines=[],r._appendLine(new Wt({x:r.prevPathX,y:r.prevPathY,c1x:u.n.x,c1y:u.n.y,c2x:u.end.x,c2y:u.end.y,toX:c.toX,toY:c.toY})),s+=h;continue}r._appendLine(c),s+=h}return r}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),d=i+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ge(c.x,c.y,s.x,s.y):ge(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,r)=>e.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),r=e.length;if(r){let s=e[r-2],i=e[r-1];for(let o=0;o<r;o+=6)t+=Sn(e[o],e[o+1],s,i),s=e[o],i=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,r=this.getPolymorphPoints(),s=r.length;if(s){const i=[];let o=e-s;const a=Math.ceil(e/s);i.push(["M",r[0],r[1]]);let c=2;for(;c+5<=s-1;){const h=r[c++],u=r[c++],l=r[c++],d=r[c++],f=r[c++],p=r[c++];i.push(["C",h,u,l,d,f,p]);let m=0;for(;m<a&&o>0;)i.push(["C",f,p,f,p,f,p]),o-=6,m++}return new ae(i)}else return ae.fromPolymorphPoints(t)}static getInterpolator(t,e){return r=>{const s=zo(Number.EPSILON);return s(r,0)?t.clone():s(r,1)?e.clone():ae.fromPolymorphPoints(wg(t.getPolymorphPoints(),e.getPolymorphPoints(),r).map(i=>tt(i,2)))}}}const sm=_x("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function _x(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function ce(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function so(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function Sx(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function Ex(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ys={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class nh{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",ce("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class im{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class io{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=r||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ys);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=ys[s].canvas}}__getStyleState(){const t={},e=Object.keys(ys);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(ys);for(let i=0;i<s.length;i++){const o=ys[s[i]],a=this[s[i]];if(o.apply){if(a instanceof im){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,ce("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof nh)e.setAttribute(o.apply,ce("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,ce("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(sm);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=sm[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ce("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ce("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ce("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(ce("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(ce("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(ce("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ce("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(ce("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(ce("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],g=[h[1],-h[0]],b=function(C){const E=C[0];return C[1]>=0?Math.acos(E):-Math.acos(E)},x=b(v),w=b(g);this.lineTo(p+v[0]*i,m+v[1]*i),this.arc(p,m,i,x,w)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:so(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new nh(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:so(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new nh(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":Sx(this.textAlign),"dominant-baseline":Ex(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(ce("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=so(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ce("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,v;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+r+", "+s+")";if(e instanceof io){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=so(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof io&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new im(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class rh{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new io({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height})),this.enablePath2D=typeof i=="boolean"?i:!1}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D),this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.currentPath2D=this.path2Ds.pop()||new Path2D),this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.enablePath2D&&this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.enablePath2D&&this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}let Nt=class ou{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new Ze;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Uu(),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const r=this._x,s=this._y;(r!==t||s!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-r,dY:e-s}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x!==t&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const r=this._scaleX,s=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/r,dScaleY:this._scaleY/s}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof ae?this.initD:new ae(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new ae(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let r=0,s=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);r=o.x,s=o.y}const i=new qt;i.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),i.rotate(this.degree,t,e),i.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&i.rotate(this.parent.dDegree,r,s),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&i.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,r,s),this.m=i}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new ou(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let r=0,s=0;if(this.parent&&!t){const i=this.parent.combo.getBoundingClientRectCenter(e);r=i.x-this.parent.dX,s=i.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const i=this.getBoundingClientRectCenter(e);r=i.x,s=i.y}else r=this.initCenterX||0,s=this.initCenterY||0;return{x:r,y:s}}isPointInPath(t,e,r){if(t instanceof rh)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInFill({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}isPointInStroke(t,e,r){if(t instanceof rh)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInStroke({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[jt(r)]=s,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[jt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[jt(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const r=t?.friction||1;this.vx*=r,this.vy*=r,this.move(this.vx,this.vy)}animateEaseTo(t,e){const r=e?.easing||.05,s=t.x-this.x,i=t.y-this.y;this.vx=s*r,this.vy=i*r,this.animate(e)}animateSpringTo(t,e){const r=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.x,o=s.y-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const r=e?.springLength||100,s=e?.spring||5e-4,i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}followTo(t,e=3){this.rotateTo(Gt(ge(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=En(pt(this.degree),e);this.vx=r,this.vy=s,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(Gt(ge(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=En(pt(this.degree),e);this.ax=r,this.ay=s,this.animate()}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){const e=t.x-this.x,r=t.y-this.y,s=Math.sqrt(e*e+r*r),{x:i,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:u}=t.getBoundingClientRectCenter(),{x:l,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:m,y:v}=this.getBoundingClientRectCenter();if(s<Math.abs(h-i)+Math.abs(m-l)||s<Math.abs(u-o)+Math.abs(v-d)){const g=Math.atan2(r,e),b={x:0,y:0},x=Ie(-g,e,r),w=Ie(-g,this.vx,this.vy),C=Ie(-g,t.vx,t.vy),E=w.x-C.x;w.x=((this.mass-t.mass)*w.x+2*t.mass*C.x)/(this.mass+t.mass),C.x=E+w.x;const O=Math.abs(w.x)+Math.abs(C.x),U=this.ballRadius+t.ballRadius-Math.abs(b.x-x.x);b.x+=w.x/O*U,x.x+=C.x/O*U;const R=Ie(g,b.x,b.y),j=Ie(g,x.x,x.y);t.moveTo(this.x+j.x,this.y+j.y),this.moveTo(this.x+R.x,this.y+R.y);const H=Ie(g,w.x,w.y),V=Ie(g,C.x,C.y);this.vx=H.x,this.vy=H.y,t.vx=V.x,t.vy=V.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,r=t.wall.x,s=t.wall.y,i=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:u}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>i?this.moveXTo(r-(a+h)):this.x+a+h<r&&this.moveXTo(i-a),this.y+c>o?this.moveYTo(s-(c+u)):this.y+c+u<s&&this.moveYTo(o-c)):(this.x+a+h>i?(this.moveXTo(i-(a+h)),this.vx*=e):this.x+a<r&&(this.moveXTo(r+(a+h)),this.vx*=e),this.y+c+u>o?(this.moveYTo(o-(c+u)),this.vy*=e):this.y+c<s&&(this.moveYTo(s+(c+u)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const r=this.getTotalLength(),s=t*r,i=e*r;return{subPathD:this.transformPathD().getSubPathD(s,i),point:this.getPointAtLength(i)}}strokeDashTween(t=1e3,e){const r=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${r} ${r}`,strokeDashoffset:`${r}`});const s=e?.onUpdate,i=new Qr({frameDuration:t});i.addTween({offset:r},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+tt(o.offset,2)),s?.(o,a)}})),i.play()}static generateRosetta(t,e,r,s,i){if(i==0)throw new Error("no dividing by zero, please");const o=[],a=360/i;for(let c=0;c<i;c+=1){const h=a*c*Math.PI/180,u=t+2*r*Math.cos(h),l=e+2*r*Math.sin(h);o.push(new Kc({x:t,y:e,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),o.push(new Kc({x:u,y:l,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new ou({initD:ae.fromLines(o)})}};class fe{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this.x=t?.x||0,this.y=t?.y||0,this.degree=t?.degree||0,this.scaleX=1,this.scaleY=1,t?.scale!==void 0&&(this.scaleX=t.scale,this.scaleY=t.scale),t?.scaleX!==void 0&&(this.scaleX=t.scaleX),t?.scaleY!==void 0&&(this.scaleY=t.scaleY),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,r=0,s=0,i=0;const o=new rm(t.svg).parse();for(let a=0,c=o.length;a<c;a++){const h=o[a];if(h.type=="viewbox"&&h.width&&h.height){if(e=parseFloat(h.width),r=parseFloat(h.height),t.forceWidth){const p=e/r;s=t.forceWidth,i=s/p}else s=e,i=r;continue}if(h.type!="path"||!Qa(h.path))continue;const u={};for(const p in h)p==="type"||p==="path"||p==="transform"||(u[p]=h[p]);const l=vi(wi(h.path)),d=[];let f=[];for(let p=0,m=l.length;p<m;p++){const v=l[p];f.push(v),v[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const m=new Nt({attrs:u,initD:p});if(h.transform){const g=lm(h.transform).split();m.moveTo(g.x,g.y),m.rotateTo(g.degree),m.scaleTo(g.scaleX,g.scaleY)}this.addShape(m)})}s&&e&&i&&r&&this.comboScale(s/e,i/r,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const r=e.clone();return e.parent&&(r.parent={...e.parent,combo:t}),r}),t}cloneShapeCombo(){return new fe(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,r=!1){r||(this.x+=t,this.y+=e),this.shapes.forEach(s=>{s.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(r=>{r.rotate(t)})}comboScale(t,e,r=!1){r||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(s=>{s.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],r=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);return{x:tt(s,t),y:tt(i,t),width:tt(o-s,t),height:tt(a-i,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:tt(e.x+e.width*.5,t),y:tt(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[jt(r)]=s)}this.shapes.forEach(r=>{r.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[jt(t)]=e,this.shapes.forEach(r=>{r.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[jt(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,r=this.shapes.length;if(e<r)return t.expendTo(this);for(let s=r;s<e;s++){const i=t.shapes[s];this.addShape(new Nt({initD:i.pathD().clone()}),{dX:i.x-this.x,dY:i.y-this.y,dDegree:i.degree-this.degree,dScaleX:i.scaleX/this.scaleX,dScaleY:i.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const r=new Qr({frameDuration:t}),s={},i={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();s[`offset_${a}`]=c,i[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),r.addTween(s,i,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=Fo(c).number;this.shapes[h].setAttr("strokeDashoffset",""+tt(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),r.play();break}}}function Cx(n,t,e=5){const r=zo(e);(!r(n.x,t.current.x)||!r(n.y,t.current.y))&&n.followTo(t.current)}function Tx(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function Px(n,t){const e=[],r=n.length;for(let s=0;s<r;s++){const i=n[s];if(t?.springLength){const o=t?.springLength||100;i.isDragging||n.filter(a=>a.id!==i.id).forEach(a=>{const c=ge(i.x,i.y,a.x,a.y);i.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?s>0&&i.animateSpringTo(n[s-1],t):i.animate(t);if(t?.wall&&i.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=s+1;o<r;o++)t?.enableCollision&&i.checkCollision(n[o]),t?.enableGravityBetweenObjects&&i.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([i.x,i.y,n[o].x,n[o].y,i.getSpringMassAlphaTo(n[o],t)])}return e}function om(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const i=n[s].transformPathD(),o=n[s+1].transformPathD(),a=i.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[s]=ae.getInterpolator(i.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const r=new Nt({initD:""});return s=>{const i=tt(t*s,6),o=Math.min(Math.floor(i),t-1),a=tt(i-o,6);return r.pathD(e[o](a)),r.setAttr(n[o+1].attrs),r}}function Ax(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof fe?(a=o,a.sort()):(a=new fe,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const r=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{r[h]=r[h]||[],r[h][a]=c})});const s=[];r.forEach(o=>{s.push(om(o))});const i=new fe;return s.forEach(o=>{i.addShape(o(0))}),o=>(s.forEach(a=>{a(o)}),i)}function Mx(n,t=6e3,e){const r=n.findIndex(a=>a instanceof fe)>=0?Ax(n):om(n),s=r(0),i=e?.onUpdate,o=new Qr({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{i?.(a,c),r(a.t),e?.shapeOrCombo?.(s,a.t)}})),o.play(),s}class Dx{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new hi(null);resizeSubscription;mpg=er();mouseSubscription;shapes=[];shapeTap$=new hi(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",r=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&wm(this.PARENT_EL),e=="svg"&&(this.SVG_EL=Tn("svg"),Cr(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=Sm("canvas"),Cr(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=Lh(this.PARENT_EL).subscribe(s=>{this.rect.x=s.x,this.rect.y=s.y,this.rect.width=s.width,this.rect.height=s.height,this.SVG_EL&&yn(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(yn(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new rh(this.CANVAS_EL,this.rect.width,this.rect.height,r)),this.size$.next(s)}),this.mouseSubscription=Xm(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=km(this.PARENT_EL).subscribe(s=>{for(const i of this.shapes)if(i.isMouseIn){this.shapeTap$.next(i);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(r=>{r instanceof fe?e.push(...r.shapes):e.push(r)}),this.SVG_EL&&this.shapes.filter(r=>e.findIndex(s=>s.id==r.id)==-1).forEach(r=>{r.el&&(r.el.remove(),delete r.el)}),_g(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:r,y:s}=e.transformOrigin();let i=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);i=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,Cr(this.SVG_EL,e.el),yn(e.el,{id:e.id})):(e.el=a||Za(),Cr(this.SVG_EL,e.el),yn(e.el,{id:e.id})),Mf(e.el)&&yn(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(wu(e.attrs)||yn(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(wu(e.style)||lr(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new qt;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,r,s),a.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&a.rotate(e.parent.dDegree,i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),yn(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(pt(e.degree),r,s),this.ctx.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&this.ctx.rotate(pt(e.parent.dDegree),i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),e.m=this.ctx.currentMatrix,zl(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,c=this.mpg.current.y-this.mpg.start.y;if(a||c){if(e.drag&&e.drag.enable&&e.drag.alongPath){const h=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=h.point.x-e.x,c=h.point.y-e.y}(a||c)&&(e.move(a,c),e.parent?.combo.shapes.forEach(h=>{h.drag?.followSibling&&h!==e&&h.move(a,c)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,r=t?.brushColor||"#000000";let s=!1;const i=fo(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{s=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=r,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(s?this.ctx.lineTo(o.current.x,o.current.y):(s=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{i.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,r=t?.brushDensity||50,s=t?.brushColor||"#000000",i=new Pe(s),o=i.r,a=i.g,c=i.b,h=fo(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(u=>{if(this.ctx){const l=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=l.data;for(let f=0;f<r;f++){const p=Math.random()*Math.PI*2,m=Math.random()*e,v=u.current.x+Math.cos(p)*m|0,g=u.current.y+Math.sin(p)*m|0,b=(v+g*l.width)*4;d[b]=o,d[b+1]=a,d[b+2]=c,d[b+3]=255}this.ctx.putImageData(l)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&Df(this.SVG_EL)}}class tr extends Nt{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new tr({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=Gt(ge(this.x,this.y,t.x,t.y)),r=Sn(this.x,this.y,t.x,t.y);(e!=this.degree||r!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),r!=this.lineLength&&(this.lineLength=r),this.shouldUpdatePathD=!0)}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],r=t.transformPathD().normalizedLines[0];return e.intersection(r)}}class sh extends Nt{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new sh({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,r=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class oo extends Nt{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new oo({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let r=1;r<=e-1;r++)t.push(["l",this.points[r].x-this.points[r-1].x,this.points[r].y-this.points[r-1].y]);t.push(["z"])}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;let i=r,o=s;t.push(["m",i,o]);for(let a=0;a<e-1;a++){const c=(this.points[a].x+this.points[a+1].x)/2,h=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-i,this.points[a].y-o,c-i,h-o]),i=c,o=h}t.push(["q",this.points[e-1].x-i,this.points[e-1].y-o,r-i,s-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let r=1;r<=e-1;r++)t.lineTo(this.points[r].x,this.points[r].y);t.closePath()}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(r,s);for(let i=0;i<e-1;i++){const o=(this.points[i].x+this.points[i+1].x)/2,a=(this.points[i].y+this.points[i+1].y)/2;t.quadraticCurveTo(this.points[i].x,this.points[i].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,r,s)}}isPointInShape(t){const e=this.points.length;let r=!1;const s=2e-10;for(let i=0,o=e-1;i<e;o=i,i++){const a=this.points[i].x,c=this.points[i].y,h=this.points[o].x,u=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&u===t.y||t.y===c&&t.y===u)return!0;if(t.y>=c&&t.y<u||t.y<c&&t.y>=u){const l=(h-a)/(u-c),d=a+l*(t.y-c);if(d===t.x||Math.abs(d-t.x)<s)return!0;d>t.x&&(r=!r)}}return r}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,r,s){const i=[];for(let o=0;o<s;o++){const a=o/s*2*Math.PI,{dx:c,dy:h}=En(a,r);i.push({x:t+c,y:e+h})}return new oo({points:i})}}class ih extends fe{length=100;constructor(t){super(t);const e=new tr({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const r=new tr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(r,{dX:90-Math.random()*40,dDegree:Math.random()*70});const s=new tr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new ih(super.getBaseOptions())}}class Sr extends Nt{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new Sr({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=Tn("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return gr(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y;return{x:r*t.x-e*t.y,y:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}}class oh extends Nt{constructor(t){super(t)}cloneShape(){return new oh({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class In extends Nt{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new In({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=Tn("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,r,s,i,o,a,c){const u=new Wt({x:t,y:e,c1x:r,c1y:s,c2x:i,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new In({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class ah extends Nt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new ah({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class ch extends Nt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new ch({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class hh extends Nt{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new hh({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const r=288+e*144,s=this.r*Math.cos(pt(r)),i=this.r*Math.sin(pt(r));t.push(["l",s,i])}return t}}class uh extends Nt{constructor(t){super(t)}cloneShape(){return new uh({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class lh extends Nt{constructor(t){super(t)}cloneShape(){return new lh({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,30],["a",15,15,0,1,1,0,-30]]}}class fh extends Nt{constructor(t){super({...t,initD:"m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"})}cloneShape(){return new fh({...super.getBaseOptions()})}}class dh extends Nt{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new dh({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGEl(){const t=Tn("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class mh extends fe{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new Nt({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new Nt({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new mh({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class ph extends fe{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new In({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const r=new Sr({drag:{followSibling:!0},ballRadius:2});this.addShape(r);const s=new Sr({drag:{followSibling:!0},ballRadius:2});this.addShape(s,{dX:0+this.width})}cloneShapeCombo(){return new ph({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(pt(t.degree))*this.width,y:t.y+Math.sin(pt(t.degree))*this.width}}}class gh extends fe{options;value$=new Ze;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,r=t?.sliderMax||100,s=t?.sliderStep||1,i=vg(e,r,s),o=i(typeof t?.sliderDefaultValue=="number"?Z(t.sliderDefaultValue,e,r):e);this.value$.next(o);const a=o/(r-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,u=h*.5,l=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new In({rectWidth:c,rectHeight:h,rectBorderRadius:u,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const m=new In({rectWidth:c*a,rectHeight:h,rectBorderRadius:u,attrs:{fill:f},drag:{enable:!1}});this.addShape(m);const v=new Sr({x:c*a,y:u,ballRadius:l,attrs:{fill:f},drag:{enable:!0,alongPath:new ae([["m",0,0],["l",c,0]])}});this.addShape(v),this.subscription=v.transform$.subscribe(({dX:g})=>{console.log(g);const b=(v.x-p.x)/c;m.update({rectWidth:c*b}),this.value$.next(i(b*(r-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new gh({...super.getBaseOptions(),...this.options})}}class bs extends Nt{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,r=t.height||0,s=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const i=Math.min(e/2,r)-this.lineWidth;this.radius=Math.max(0,i-i*Math.sin(pt(s)))}else this.radius=Math.max(0,Math.min(e/2,r/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=r-this.lineWidth-this.radius*Math.sin(pt(s)):this.y=r/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new bs({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=En(pt(this.startDegree),this.radius),{dx:r,dy:s}=En(pt(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,r-t,s-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const r=this.radius-this.radius*Math.cos(Math.PI*this.percent),s=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+r,-s,{0:this.startColor,1:this.endColor})}else{const r=this.radius*Math.sin(2*Math.PI*this.percent),s=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,r,-s,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,pt(this.startDegree),pt(this.percentDegree),!1)}}class yh extends fe{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-105,this.endDegree=t?.endDegree||105):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new bs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new bs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=23,this.half){const i=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new tr({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const c=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(pt(c))*i,dY:this.ringBg.y+Math.sin(pt(c))*i,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new yh({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent})}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}class Er extends Nt{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=Fo(this.getAttr("fontSize"),10).number,r=Fo(this.getAttr("fontWeight"),400).number,s=Er.measureText(this.text,e,r);this.width=s.width,this.height=s.height}cloneShape(){return new Er({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=Tn("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
113
+ `);if(e.length<=1)t.innerHTML=this.text;else{const r=this.getAttr("line-height","1.2em");e.forEach((s,i)=>{if(s.trim()){const o=Tn("tspan");o.setAttribute("x","0"),o.setAttribute("dy",i>0?r:"0"),o.innerHTML=s.trim(),o.style.alignmentBaseline="middle",t.append(o)}})}return t}toSVGPathData(){return[]}toCanvasContext(t){const e=this.text.split(`
114
+ `);if(e.length<=1)t.fillText(this.text,0,0);else{const r=t.measureText(this.text),i=(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?i:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,r=400){const s=document.createElement("span");s.style.visibility="hidden",s.style.margin="0",s.style.padding="0",s.style.inset="0",s.style.whiteSpace="nowrap",s.style.overflow="visible",s.style.fontSize=e+"px",s.style.fontWeight=r.toString(),s.innerText=t,document.body.appendChild(s);const i=s.offsetWidth,o=s.offsetHeight;return document.body.removeChild(s),{width:i,height:o}}static getFixedWidthText(t,e,r=12,s=400,i="..."){let o="";if(!t||e<r)return o;const a=t.split("");let c=i?Er.measureText(i,r,s).width:0;for(let h=0,u=a.length;h<u;h++)if(c+=Er.measureText(a[h],r,s).width,c>e){i&&(o+=i);break}else o+=a[h];return o}}class bh extends fe{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:r,height:s,x:i,y:o,particleCount:a,angle:c,spread:h,startVelocity:u,decay:l,gravity:d,drift:f,ticks:p,colors:m,scalar:v,flat:g}=Object.assign({shapeCreator:()=>new In({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:v0,scalar:1,flat:!1},t||{}),b=(E,O)=>{E.x=r*i,E.y=s*o,E.scaleX=v,E.scaleY=v;const U=m[O%m.length];E.setAttr({fill:U}),E.interactive=!1,E.wobble=Math.random()*10,E.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),E.velocity=u*.5+Math.random()*u,E.angle2D=-x+(.5*w-Math.random()*w),E.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,E.tick=0,E.totalTicks=p,E.decay=l,E.drift=f,E.random=Math.random()+2,E.tiltSin=0,E.tiltCos=0,E.wobbleX=0,E.wobbleY=0,E.gravity=d*3,E.scalar=v,E.flat=g,E.color=new Pe(U)},x=pt(c),w=pt(h);let C=a;for(;C;){const E=e();b(E,C),E.clone=(O=>()=>{const U=e();return b(U,O),U})(C),this.addShape(E),C--}}cloneShapeCombo(){return new bh(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,s=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=Gt(Math.PI/10*t.wobble),t.scaleX=Math.abs(i-r)*.1,t.scaleY=Math.abs(o-s)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const Ox={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},Ix={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},Rn=new zg;let ao="zh-cn";wh(Ix),wh(Ox);function wh(n,t){if(!n)return Rn.get(ao);let e;if(typeof n=="string"){const r=n.toLowerCase();if(Rn.get(r))e=r;else if(t)Rn.set(r,t),e=r;else return Rn.get(ao)}else{const{name:r}=n;Rn.set(r,n),e=r}return e&&(ao=e),Rn.get(e)||Rn.get(ao)}class Rx extends Vo{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];state;constructor(t){if(super(),this.id=Uu(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const e=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",e),this.strokeDashTotalLength=vu(e).reduce((r,s)=>r+s,0)}this.state=Ic(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Xw,this.state.subscribe(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(r=>{const s=r.originMatrix?r.originMatrix.clone():new qt;s.translate(-t.x+r.x,-t.y+r.y),r.originMatrix=s});const e=this.originMatrix?this.originMatrix.clone():new qt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,r){if(r instanceof Ja)return r.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{const i=this.getBoundingClientRect();if(i)return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height}return!1}isPointInStroke(t,e,r){if(r instanceof Ja)return r.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}clone(){return hg(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([r,s])=>[jt(r),s]))):e&&(this.attrs[jt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[jt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[jt(t)]}distance(t){return Sn(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Gt(ge(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:r,dy:s}=En(pt(this.degree),e);this.vx=r,this.vy=s,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:r,dy:s}=En(pt(this.degree),e);this.ax=r,this.ay=s,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=xe(t?.gravity,0);this.vy+=e;const r=xe(t?.friction,1);this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const r=xe(e?.easing,.05),s=t.x-this.cX-this.x,i=t.y-this.cY-this.y;this.vx=s*r,this.vy=i*r,this.run(e)}runSpringTo(t,e){const r=xe(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.cX-this.x,o=s.y-this.cY-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const r=xe(e?.springLength,100),s=xe(e?.spring,1e-4),i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const r=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*r),this.getPointAtLength(e*r)}strokeDashTween(t=1e3,e){const r=this.initPathD(),s=tt(r.getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const i=e?.onUpdate,o=new Qr({frameDuration:t});o.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+tt(a.offset,2)),i?.(a,c)}})),o.play()}}class kx extends Rx{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,r){this.cX=t,this.cY=e,this.cZ=r}rotateX(t){({x:this.y,y:this.z}=Ie(pt(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Ie(pt(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Ie(pt(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return gr(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,r=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+r*r+s*s)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y,s=this.z;return{x:r*t.z-s*t.y,y:s*t.x-e*t.z,z:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const co=kx,ws=2e3,vh=2001,am=[1,0,0,1],cm=[1,0,0,1,0,0],hm=[1,0,0,0,1,0,0,0,1],um=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class xh{value;constructor(t=am){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,r=0,s=1){return this.m11=t,this.m21=e,this.m12=r,this.m22=s,this}identity(){return this.value=Array.from(am),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new xh(this.value)}fromArray(t,e=0){for(let r=0;r<4;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[2],c=r[1],h=r[3],u=s[0],l=s[2],d=s[1],f=s[3];return i[0]=o*u+a*d,i[2]=o*l+a*f,i[1]=c*u+h*d,i[3]=c*l+h*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class ho{value;constructor(t=hm){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,r=0,s=0,i=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=s,u[2]=a,u[3]=e,u[4]=i,u[5]=c,u[6]=r,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(hm),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new ho(this.value)}fromArray(t,e=0){for(let r=0;r<9;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[3],c=r[6],h=r[1],u=r[4],l=r[7],d=r[2],f=r[5],p=r[8],m=s[0],v=s[3],g=s[6],b=s[1],x=s[4],w=s[7],C=s[2],E=s[5],O=s[8];return i[0]=o*m+a*b+c*C,i[3]=o*v+a*x+c*E,i[6]=o*g+a*w+c*O,i[1]=h*m+u*b+l*C,i[4]=h*v+u*x+l*E,i[7]=h*g+u*w+l*O,i[2]=d*m+f*b+p*C,i[5]=d*v+f*x+p*E,i[8]=d*g+f*w+p*O,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-r*i*u+r*a*c+s*i*h-s*o*c}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,d=a*c-u*i,f=h*i-o*c,p=e*l+r*d+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=l*m,t[1]=(s*h-u*r)*m,t[2]=(a*r-s*o)*m,t[3]=d*m,t[4]=(u*e-s*c)*m,t[5]=(s*i-a*e)*m,t[6]=f*m,t[7]=(r*c-h*e)*m,t[8]=(o*e-r*i)*m,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).inverse().transpose()}transposeIntoArray(t){const e=this.value;return 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],this}setUvTransform(t,e,r,s,i,o,a){const c=Math.cos(i),h=Math.sin(i);return this.set(r*c,r*h,-r*(c*o+h*a)+o+t,-s*h,s*c,-s*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Sh.makeScale(t,e)),this}rotate(t){return this.premultiply(Sh.makeRotation(-t)),this}translate(t,e){return this.premultiply(Sh.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class de{value;is3dSpecial=!1;constructor(t=um){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,r=0,s=0,i=0,o=1,a=0,c=0,h=0,u=0,l=1,d=0,f=0,p=0,m=0,v=1){const g=this.value;return g[0]=t,g[4]=e,g[8]=r,g[12]=s,g[1]=i,g[5]=o,g[9]=a,g[13]=c,g[2]=h,g[6]=u,g[10]=l,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=v,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(um),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new de(this.value)}static fromString(t){const e=new de,r=hu("number",t);return r.length===16&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}fromArray(t,e=0){for(let r=0;r<16;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.value;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}copyPosition(t){const e=this.value,r=t.value;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),r.setFromMatrix4Column(this,2),this}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,r=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+r*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+r*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+r*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+r*this.m44}}toMatrix(t){const{scalarX:e,scalarY:r,skewX:s,skewY:i,x:o,y:a}=this.split(),c=[e,i,s,r,o,a];return t?(t.value=c,t):new qt(c)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>tt(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),r=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),s=Gt(Z(Math.asin(-this.m13),-1,1));let i=Gt(Math.atan2(this.m23,this.m33));Math.cos(pt(s))===0&&(i=Gt(Math.atan2(-this.m31,this.m22)));let o=Gt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:r,degreeX:i,degreeY:s,degreeZ:o,skewX:Gt(this.m14),skewY:Gt(this.m24),skewZ:Gt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,r=t.value,s=1/_h.setFromMatrix4Column(t,0).length(),i=1/_h.setFromMatrix4Column(t,1).length(),o=1/_h.setFromMatrix4Column(t,2).length();return e[0]=r[0]*s,e[1]=r[1]*s,e[2]=r[2]*s,e[3]=0,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=0,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,r){const s=this.value;return we.subVectors(t,e),we.lengthSq()===0&&(we.z=1),we.normalize(),kn.crossVectors(r,we),kn.lengthSq()===0&&(Math.abs(r.z)===1?we.x+=1e-4:we.z+=1e-4,we.normalize(),kn.crossVectors(r,we)),kn.normalize(),uo.crossVectors(we,kn),s[0]=kn.x,s[4]=uo.x,s[8]=we.x,s[1]=kn.y,s[5]=uo.y,s[9]=we.y,s[2]=kn.z,s[6]=uo.z,s[10]=we.z,this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[4],c=r[8],h=r[12],u=r[1],l=r[5],d=r[9],f=r[13],p=r[2],m=r[6],v=r[10],g=r[14],b=r[3],x=r[7],w=r[11],C=r[15],E=s[0],O=s[4],U=s[8],R=s[12],j=s[1],H=s[5],V=s[9],lt=s[13],yt=s[2],mt=s[6],ct=s[10],st=s[14],Ct=s[3],$=s[7],z=s[11],A=s[15];return i[0]=o*E+a*j+c*yt+h*Ct,i[4]=o*O+a*H+c*mt+h*$,i[8]=o*U+a*V+c*ct+h*z,i[12]=o*R+a*lt+c*st+h*A,i[1]=u*E+l*j+d*yt+f*Ct,i[5]=u*O+l*H+d*mt+f*$,i[9]=u*U+l*V+d*ct+f*z,i[13]=u*R+l*lt+d*st+f*A,i[2]=p*E+m*j+v*yt+g*Ct,i[6]=p*O+m*H+v*mt+g*$,i[10]=p*U+m*V+v*ct+g*z,i[14]=p*R+m*lt+v*st+g*A,i[3]=b*E+x*j+w*yt+C*Ct,i[7]=b*O+x*H+w*mt+C*$,i[11]=b*U+x*V+w*ct+C*z,i[15]=b*R+x*lt+w*st+C*A,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],r=t[4],s=t[8],i=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],d=t[10],f=t[14],p=t[3],m=t[7],v=t[11],g=t[15];return p*(+i*c*l-s*h*l-i*a*d+r*h*d+s*a*f-r*c*f)+m*(+e*c*f-e*h*d+i*o*d-s*o*f+s*h*u-i*c*u)+v*(+e*h*l-e*a*f-i*o*l+r*o*f+i*a*u-r*h*u)+g*(-s*a*u-e*c*l+e*a*d+s*o*l-r*o*d+r*c*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,r){const s=this.value;return t instanceof Be?(s[12]=t.x,s[13]=t.y,s[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof r=="number"&&(s[12]=t,s[13]=e,s[14]=r),this}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],d=t[10],f=t[11],p=t[12],m=t[13],v=t[14],g=t[15],b=l*v*h-m*d*h+m*c*f-a*v*f-l*c*g+a*d*g,x=p*d*h-u*v*h-p*c*f+o*v*f+u*c*g-o*d*g,w=u*m*h-p*l*h+p*a*f-o*m*f-u*a*g+o*l*g,C=p*l*c-u*m*c-p*a*d+o*m*d+u*a*v-o*l*v,E=e*b+r*x+s*w+i*C;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/E;return t[0]=b*O,t[1]=(m*d*i-l*v*i-m*s*f+r*v*f+l*s*g-r*d*g)*O,t[2]=(a*v*i-m*c*i+m*s*h-r*v*h-a*s*g+r*c*g)*O,t[3]=(l*c*i-a*d*i-l*s*h+r*d*h+a*s*f-r*c*f)*O,t[4]=x*O,t[5]=(u*v*i-p*d*i+p*s*f-e*v*f-u*s*g+e*d*g)*O,t[6]=(p*c*i-o*v*i-p*s*h+e*v*h+o*s*g-e*c*g)*O,t[7]=(o*d*i-u*c*i+u*s*h-e*d*h-o*s*f+e*c*f)*O,t[8]=w*O,t[9]=(p*l*i-u*m*i-p*r*f+e*m*f+u*r*g-e*l*g)*O,t[10]=(o*m*i-p*a*i+p*r*h-e*m*h-o*r*g+e*a*g)*O,t[11]=(u*a*i-o*l*i-u*r*h+e*l*h+o*r*f-e*a*f)*O,t[12]=C*O,t[13]=(u*m*s-p*l*s+p*r*d-e*m*d-u*r*v+e*l*v)*O,t[14]=(p*a*s-o*m*s-p*r*c+e*m*c+o*r*v-e*a*v)*O,t[15]=(o*l*s-u*a*s+u*r*c-e*l*c-o*r*d+e*a*d)*O,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,s))}makeTranslation(t,e,r){return t instanceof Be?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),s=Math.sin(e),i=1-r,o=t.x,a=t.y,c=t.z,h=i*o,u=i*a;return this.set(h*o+r,h*a-s*c,h*c+s*a,0,h*a+s*c,u*a+r,u*c-s*o,0,h*c-s*a,u*c+s*o,i*c*c+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,s,i,o){return this.set(1,r,i,0,t,1,o,0,e,s,1,0,0,0,0,1),this}makePerspective(t,e,r,s,i,o,a=ws){const c=this.value,h=2*i/(e-t),u=2*i/(r-s),l=(e+t)/(e-t),d=(r+s)/(r-s);let f,p;if(a===ws)f=-(o+i)/(o-i),p=-2*o*i/(o-i);else if(a===vh)f=-o/(o-i),p=-o*i/(o-i);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=l,c[12]=0,c[1]=0,c[5]=u,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,r,s,i,o,a=ws){const c=this.value,h=1/(e-t),u=1/(r-s),l=1/(o-i),d=(e+t)*h,f=(r+s)*u;let p,m;if(a===ws)p=(o+i)*l,m=-2*l;else if(a===vh)p=i*l,m=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=m,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,r=0){return this.multiply(new de([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new de([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}scaleVector3(t){const e=this.value,r=t.x,s=t.y,i=t.z;return e[0]*=r,e[4]*=s,e[8]*=i,e[1]*=r,e[5]*=s,e[9]*=i,e[2]*=r,e[6]*=s,e[10]*=i,e[3]*=r,e[7]*=s,e[11]*=i,this}rotateX(t){const e=pt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new de([1,0,0,0,0,r,s,0,0,-s,r,0,0,0,0,1]))}rotateY(t){const e=pt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new de([r,0,-s,0,0,1,0,0,s,0,r,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=pt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new de([r,s,0,0,-s,r,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,r=0){return this.multiply(new de([1,0,0,pt(t),0,1,0,pt(e),0,0,1,pt(r),0,0,0,1]))}perspective(t){return this.multiply(new de([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,r=t.x*this.m12+t.y*this.m22+this.m42,s=t.x*this.m13+t.y*this.m23+this.m43,i=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=r+this.m32,c=s+this.m33,h=i+this.m34;i==0&&(i=1e-4),e/=i,r/=i,s/=i,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-s;if(u==0)return{x:e,y:r,z:s,mass:i};const l=-s/u;return e+=l*(o-e),r+=l*(a-r),{x:e,y:r,z:s,mass:i}}project(t){const e=t.z;let r=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,s=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,i=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return i==0&&(i=1e-4),r/=i,s/=i,i<0&&(r-=this.m41,s-=this.m42,r*=1/i,s*=1/i,r+=this.m41,s+=this.m42),{x:r,y:s,z:e,mass:i}}bounds(t,e,r,s){const i=new co({x:t,y:e}),o=new co({x:t+r,y:e}),a=new co({x:t+r,y:e+s}),c=new co({x:t,y:e+s});({x:i.x,y:i.y,z:i.z,mass:i.mass}=this.project(i)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(i.x,o.x,a.x,c.x),u=Math.min(i.y,o.y,a.y,c.y),l=Math.max(i.x,o.x,a.x,c.x)-h,d=Math.max(i.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:d}}}class qt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=cm){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new qt,r=hu("number",t);return r.length===6&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new de(e)}identity(){return this.value=Array.from(cm),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new qt(this.value)}multiply(t){const e=this.clone(),r=t instanceof qt?t:new qt(t);return this.m11=r.m11*e.m11+r.m12*e.m21+r.m13*e.m31,this.m12=r.m11*e.m12+r.m12*e.m22+r.m13*e.m32,this.m13=r.m11*e.m13+r.m12*e.m23+r.m13*e.m33,this.m21=r.m21*e.m11+r.m22*e.m21+r.m23*e.m31,this.m22=r.m21*e.m12+r.m22*e.m22+r.m23*e.m32,this.m23=r.m21*e.m13+r.m22*e.m23+r.m23*e.m33,this.m31=r.m31*e.m11+r.m32*e.m21+r.m33*e.m31,this.m32=r.m31*e.m12+r.m32*e.m22+r.m33*e.m32,this.m33=r.m31*e.m13+r.m32*e.m23+r.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,r=this.m13,s=this.m21,i=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*i-o*c,l=-h*s+o*a,d=c*s-i*a;let f=t*u+e*l+r*d;return f?(f=1/f,this.m11=u*f,this.m12=(-h*e+r*c)*f,this.m13=(o*e-r*i)*f,this.m21=l*f,this.m22=(h*t-r*a)*f,this.m23=(-o*t+r*s)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(i*t-e*s)*f,this):null}adjugate(){const t=new qt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=Gt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:Gt(Math.atan2(-this.m21,this.m22)),skewY:Gt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],r=this.value[1],s=this.value[2],i=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],u=t.value[2],l=t.value[3],d=t.value[4],f=t.value[5],p=c*l,m=h*u,v=(u*r-e*l)/(m-p),g=(c*r-e*h)/(p-m),b=(u*i-s*l)/(m-p),x=(c*i-s*h)/(p-m),w=(u*(a-f)+l*(d-o))/(m-p),C=(c*(a-f)+h*(d-o))/(p-m),E=[v,g,b,x,w,C];return new qt(E)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>tt(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,r){return this.matrix4.translate(t,e,r),this.matrix4.toMatrix(this),this}translate3dTo(t,e,r){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,r-this.matrix4.m43),this}rotate(t,e=0,r=0){const s=pt(t),i=Math.cos(s),o=Math.sin(s);return this.translate(e,r),this.multiply([i,o,-o,i,0,0]),this.translate(-e,-r),this.toMatrix4(),this}rotateTo(t,e=0,r=0){const{degree:s}=this.split();return this.rotate(t-s,e,r),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,r){return this.matrix4.rotateX(t).rotateY(e).rotateZ(r),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,r){const{degreeX:s,degreeY:i,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-s,e-i,r-o),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.multiply([t,0,0,e,0,0]),this.translate(-r,-s),this.toMatrix4(),this}scaleTo(t,e=t,r=0,s=0){return this.scale(t/this.m11,e/this.m22,r,s)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,r=t){return this.matrix4.scale(t,e,r),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,r=t){const{scalarX:s,scalarY:i,scalarZ:o}=this.matrix4.split();return this.scale3d(t/s,e/i,r/o),this}skew(t,e=t){return this.multiply([Math.cos(pt(e)),Math.sin(pt(e)),-Math.sin(pt(t)),Math.cos(pt(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:r,skewY:s}=this.split();return this.skew(t-r,e-s)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,r){return this}skew3dTo(t,e,r){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const kn=new Be,uo=new Be,we=new Be,_h=new Be,Sh=new ho;new de;function lm(n){const t=new qt;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,s){s.indexOf(",")>=0?s=s.split(/\s*,\s*/):s=s.split(/\s+/);const i=[];for(let o=0,a=s.length;o<a;o++)s[o].trim()&&i.push(parseFloat(""+s[o]));switch(r.toLowerCase()){case"t":case"translate":t.translate(i[0],i[1]);break;case"translatex":t.translateX(i[0]);break;case"translatey":t.translateY(i[0]);break;case"translatez":t.translateZ(i[0]);break;case"translate3d":t.translate3d(i[0],i[1],i[2]);break;case"r":case"rotate":t.rotate(i[0],i[1]??0,i[2]??0);break;case"rotatex":t.rotateX(i[0]);break;case"rotatey":t.rotateY(i[0]);break;case"rotatez":t.rotateZ(i[0]);break;case"rotate3d":t.rotate3d(i[0],i[1],i[2]);break;case"s":case"scale":t.scale(i[0],i[1]??i[0]);break;case"scalex":t.scaleX(i[0]);break;case"scaley":t.scaleY(i[0]);break;case"scalez":t.scaleZ(i[0]);break;case"scale3d":t.scale3d(i[0],i[1],i[2]);break;case"skew":t.skew(i[0],i[1]??0);break;case"skewx":t.skewX(i[0]);break;case"skewy":t.skewY(i[0]);break;case"skewz":t.skewZ(i[0]);break;case"skew3d":t.skew3d(i[0],i[1],i[2]);break;case"m":case"matrix":t.multiply([i[0],i[1],i[2],i[3],i[4],i[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new de(i)),t.matrix4.toMatrix(t);break}return""}),t}function Ie(n,t,e){const r=new qt;return r.rotate(Gt(n)),r.transformPoint({x:t,y:e})}function Eh(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,r=typeof n?.degree=="number"?n?.degree:0,s=typeof n?.scalarX=="number"?n?.scalarX:1,i=typeof n?.scalarY=="number"?n?.scalarY:1,o=pt(r),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*s,c*s,-c*i,a*i,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function Lx(n,t){const e=new Path2D(n),r=new Path2D;return r.addPath(e,Eh(t)),r}const fm={map:new Map,transform:function(n){if(l0)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function Nx(n,t,e){const r=new OffscreenCanvas(n,t),s=r.getContext("2d");if(s)return e(s),r.transferToImageBitmap()}function zx(n,t,e){const r=n.createPattern(fm.transform(t),"no-repeat");if(r){const s=Eh(e);r.setTransform(s),n.fillStyle=r}}const Ch=["","-webkit-","-moz-","-o-","-ms-"];function Th(n,t){const e=t.x||0,r=t.y||0,s=t.z||0;$r(n,"transform",`translate(${e}px, ${r}px) translateZ(${s}px)`)}function Fx(n,t){const e=t?.easingFn||G.Linear.None,r=t?.duration||0,s=t?.delay||0,i=ar(),o=i+r;let a=0,c=0;const h=t.deltaX,u=t.deltaY;function l(){const d=ar();if(d>=o){Th(n,{x:h-a,y:u-c});return}const f=(d-i)/r,p=e(f),m=h*p,v=u*p;Th(n,{x:m-a,y:v-c}),a=m,c=v,js(l)}setTimeout(()=>{l()},s)}const Bx=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function dm(n){return window.URL.createObjectURL(n)}function $x(n){return window.URL.revokeObjectURL(n)}function Ph(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const r=_t(document,"DOMContentLoaded",e),s=_t(window,"load",e),i=setInterval(e,100),o=()=>{clearInterval(i),r?.(),s?.()};return o}function mm(n){return _t(window,"beforeunload",t=>{n(t)})}async function Ux(n,t=6e4){return new Promise((e,r)=>{const s=document.createElement("script");s.type="text/javascript",s.async=!1,s.onload=o=>{clearTimeout(i),e(o),s.onerror=s.onload=null},s.onerror=o=>{clearTimeout(i),r(o)},s.src=n;const i=setTimeout(()=>{r("Timeout!")},t);document.body.appendChild(s)})}function Ah(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function Yx(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((r,s)=>{const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.onload=a=>{clearTimeout(o),r(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(o),s(a)},i.setAttribute("href",n);const o=setTimeout(()=>{s("Timeout!")},e);t.appendChild(i)})}function jx(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const r=()=>e>=t.length?(n(),!0):!1;r()||t.forEach(s=>{s.onload=()=>{e+=1,r()}})})}const pm=new $o({max:1e3});async function gm(n,t=6e4){return new Promise((e,r)=>{const s=typeof n=="string"?n:dm(n),i=pm.get(s);if(i)return e(i);const o=setTimeout(()=>{r("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const c=a.naturalWidth||a.width,h=a.naturalHeight||a.height,u={width:c,height:h,aspectRatio:c/h,element:a,imageData:pf(a)};pm.set(s,u),e(u)},a.onerror=c=>{clearTimeout(o),r(c)},a.src=s})}async function ym(n=ve.text,t=["*"]){const r=(await _a(t))[0],s=await Fr(r,n);return{type:r.type,name:r.name,size:r.size,data:s}}async function Vx(n=["image/*"]){const e=(await _a(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const r=await Fr(e,ve.arraybuffer),s=Ro(r),i=await gm(s);return{type:e.type,name:e.name,size:e.size,data:r,width:i.width,height:i.height,aspectRatio:i.aspectRatio,imageData:i.imageData}}function Gx(){return window.getSelection()?.toString()||""}function Xx(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function Hx(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function Wx(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function qx(n=0,t=0){window.scrollTo(n,t)}function Jx(){let n=Eu,t=Eu;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=mm(()=>{window.history.scrollRestoration="auto"}),t=Ph(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function Kx(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const Zx=n=>n===document.activeElement&&(n.type||n.href);function Mh(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function Qx(n){return n*Mh()}function t_(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):Mh()}const e_=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},n_=n=>n.parentElement,Dh=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:Dh(n.parentElement,t.concat([n]));function r_(n){const t=Dh(n);for(let e=0,r=t.length;e<r;e++)if(/(auto|scroll)/.test(Br(t[e],"overflow")+Br(t[e],"overflow-y")+Br(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const s_=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),i_=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),o_=n=>n.nextElementSibling,a_=n=>n.previousElementSibling,c_=(n,t)=>n.closest(t),h_=n=>n.shadowRoot,vs=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,Oh=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,u_=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,Ih=n=>vs(n)&&n.getAttribute("type")==="checkbox",Rh=n=>vs(n)&&n.getAttribute("type")==="radio",l_=n=>vs(n)&&n.getAttribute("type")==="text",f_=n=>vs(n)&&n.getAttribute("type")==="number";function d_(n,t){if(Oh(n)){const e=n.options;for(let r=0,s=e.length;r<s;r++)e[r].selected=e[r].value==t}}function m_(n,t){if(Rh(n)){const e=document.getElementsByName(n.name);for(let r=0,s=e.length;r<s;r++){const i=e[r];i.checked=i.value==t}}}function p_(n,t){Ih(n)&&(n.checked=t)}function Cr(n,t,e="append"){typeof t=="string"?n[e](_m(t)):n[e](t)}function bm(n,t){if(typeof t=="string"){n.innerHTML=t;const e=Em(n);e!=n&&(n=e)}else Cr(t,"replaceWith")}const wm=function(n){bm(n,"")},g_=(n,t)=>{n.textContent=t},y_=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let r=0;for(;!t&&r<=e.length-1;)"innerText"in e[r]&&(t=e[r].innerText),r++}return t},b_=n=>n.remove();function w_(n,t){Br(n,"display")=="none"&&t===void 0||t===!0?vm(n):xm(n)}function vm(n){lr(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function xm(n){lr(n,"display","none")}function kh(n,t,e="toggle"){const r=t.split(/[,\s]+/);if(n.classList)r.forEach(s=>{const i=s.trim();i!==""&&n.classList[e](i)});else{const s=n.className.split(/ +/);let i=!1;r.forEach(o=>{const a=o.trim();if(a!==""){const c=s.indexOf(a);switch(e){case"add":c===-1&&(s.push(a),i=!0);break;case"remove":c!==-1&&(s.splice(c,1),i=!0);break;case"toggle":c===-1?s.push(a):s.splice(c,1),i=!0;break}}}),i&&jn(n,"class",s.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function v_(n,t){kh(n,t,"add")}function x_(n,t){kh(n,t,"remove")}function __(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function _m(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(r=>{const s=Em(r);s!=r&&e.content.replaceChild(s,r)}),e.content}function Sm(n){return document.createElement.call(document,n)}function S_(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function E_(n){return document.createTextNode.call(document,n)}function Em(n){return n.tagName=="SCRIPT"&&(n=Cm(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Cm(t),t)}),n}function Cm(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let r=0,s=e.length;r<s;r++)t.setAttribute(e[r].name,e[r].value);return t}function C_(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function T_(n){const t=new Proxy(window,{get(e,r,s){if(typeof r=="string"&&["open","location","document"].includes(r))throw new Error(`禁止访问 key: ${r}`);return r==="window"?t:Reflect.get(e,r,s)},set(e,r,s,i){return Reflect.set(e,r,s,i)}});new Function("window",`with(window) { ${n} }`)(t,null)}function P_(n){return n=n.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),n="echo(`"+n+"`);",`(function parse(data){
115
+ let output = "";
116
+ function echo(html){
117
+ output += html;
118
+ }
119
+ ${n}
120
+ return output;
121
+ })`}class xs{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),r=document.createElement("video"),s=document.createElement("source"),i=new MediaSource;i.addEventListener("sourceopen",()=>t(!0)),s.src=URL.createObjectURL(i),s.media="(min-width:10px)",r.append(s),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(r),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{xs.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}var Tm={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
122
+ * http://hammerjs.github.io/
123
+ *
124
+ * Copyright (c) 2016 Jorik Tangelder;
125
+ * Licensed under the MIT license */(function(n){(function(t,e,r,s){var i=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,u=Date.now;function l(S,P,M){return setTimeout(x(S,M),P)}function d(S,P,M){return Array.isArray(S)?(f(S,M[P],M),!0):!1}function f(S,P,M){var I;if(S)if(S.forEach)S.forEach(P,M);else if(S.length!==s)for(I=0;I<S.length;)P.call(M,S[I],I,S),I++;else for(I in S)S.hasOwnProperty(I)&&P.call(M,S[I],I,S)}function p(S,P,M){var I="DEPRECATED METHOD: "+P+`
126
+ `+M+` AT
127
+ `;return function(){var F=new Error("get-stack-trace"),X=F&&F.stack?F.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",gt=t.console&&(t.console.warn||t.console.log);return gt&&gt.call(t.console,I,X),S.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(P){if(P===s||P===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(P),I=1;I<arguments.length;I++){var F=arguments[I];if(F!==s&&F!==null)for(var X in F)F.hasOwnProperty(X)&&(M[X]=F[X])}return M}:m=Object.assign;var v=p(function(P,M,I){for(var F=Object.keys(M),X=0;X<F.length;)(!I||I&&P[F[X]]===s)&&(P[F[X]]=M[F[X]]),X++;return P},"extend","Use `assign`."),g=p(function(P,M){return v(P,M,!0)},"merge","Use `assign`.");function b(S,P,M){var I=P.prototype,F;F=S.prototype=Object.create(I),F.constructor=S,F._super=I,M&&m(F,M)}function x(S,P){return function(){return S.apply(P,arguments)}}function w(S,P){return typeof S==a?S.apply(P&&P[0]||s,P):S}function C(S,P){return S===s?P:S}function E(S,P,M){f(j(P),function(I){S.addEventListener(I,M,!1)})}function O(S,P,M){f(j(P),function(I){S.removeEventListener(I,M,!1)})}function U(S,P){for(;S;){if(S==P)return!0;S=S.parentNode}return!1}function R(S,P){return S.indexOf(P)>-1}function j(S){return S.trim().split(/\s+/g)}function H(S,P,M){if(S.indexOf&&!M)return S.indexOf(P);for(var I=0;I<S.length;){if(M&&S[I][M]==P||!M&&S[I]===P)return I;I++}return-1}function V(S){return Array.prototype.slice.call(S,0)}function lt(S,P,M){for(var I=[],F=[],X=0;X<S.length;){var gt=P?S[X][P]:S[X];H(F,gt)<0&&I.push(S[X]),F[X]=gt,X++}return M&&(P?I=I.sort(function(Kt,he){return Kt[P]>he[P]}):I=I.sort()),I}function yt(S,P){for(var M,I,F=P[0].toUpperCase()+P.slice(1),X=0;X<i.length;){if(M=i[X],I=M?M+F:P,I in S)return I;X++}return s}var mt=1;function ct(){return mt++}function st(S){var P=S.ownerDocument||S;return P.defaultView||P.parentWindow||t}var Ct=/mobile|tablet|ip(ad|hone|od)|android/i,$="ontouchstart"in t,z=yt(t,"PointerEvent")!==s,A=$&&Ct.test(navigator.userAgent),L="touch",W="pen",q="mouse",ft="kinect",bt=25,et=1,It=2,ht=4,Mt=8,ln=1,Ye=2,je=4,Re=8,N=16,Tt=Ye|je,$t=Re|N,Es=Tt|$t,bo=["x","y"],it=["clientX","clientY"];function Jt(S,P){var M=this;this.manager=S,this.callback=P,this.element=S.element,this.target=S.options.inputTarget,this.domHandler=function(I){w(S.options.enable,[S])&&M.handler(I)},this.init()}Jt.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(st(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(st(this.element),this.evWin,this.domHandler)}};function wo(S){var P,M=S.options.inputClass;return M?P=M:z?P=ut:A?P=Co:$?P=Kh:P=_,new P(S,vo)}function vo(S,P,M){var I=M.pointers.length,F=M.changedPointers.length,X=P&et&&I-F===0,gt=P&(ht|Mt)&&I-F===0;M.isFirst=!!X,M.isFinal=!!gt,X&&(S.session={}),M.eventType=P,xo(S,M),S.emit("hammer.input",M),S.recognize(M),S.session.prevInput=M}function xo(S,P){var M=S.session,I=P.pointers,F=I.length;M.firstInput||(M.firstInput=So(P)),F>1&&!M.firstMultiple?M.firstMultiple=So(P):F===1&&(M.firstMultiple=!1);var X=M.firstInput,gt=M.firstMultiple,Xt=gt?gt.center:X.center,Kt=P.center=Cs(I);P.timeStamp=u(),P.deltaTime=P.timeStamp-X.timeStamp,P.angle=Ln(Xt,Kt),P.distance=nr(Xt,Kt),_o(M,P),P.offsetDirection=Ps(P.deltaX,P.deltaY);var he=Ts(P.deltaTime,P.deltaX,P.deltaY);P.overallVelocityX=he.x,P.overallVelocityY=he.y,P.overallVelocity=h(he.x)>h(he.y)?he.x:he.y,P.scale=gt?Ar(gt.pointers,I):1,P.rotation=gt?Pr(gt.pointers,I):0,P.maxPointers=M.prevInput?P.pointers.length>M.prevInput.maxPointers?P.pointers.length:M.prevInput.maxPointers:P.pointers.length,Wh(M,P);var Ge=S.element;U(P.srcEvent.target,Ge)&&(Ge=P.srcEvent.target),P.target=Ge}function _o(S,P){var M=P.center,I=S.offsetDelta||{},F=S.prevDelta||{},X=S.prevInput||{};(P.eventType===et||X.eventType===ht)&&(F=S.prevDelta={x:X.deltaX||0,y:X.deltaY||0},I=S.offsetDelta={x:M.x,y:M.y}),P.deltaX=F.x+(M.x-I.x),P.deltaY=F.y+(M.y-I.y)}function Wh(S,P){var M=S.lastInterval||P,I=P.timeStamp-M.timeStamp,F,X,gt,Xt;if(P.eventType!=Mt&&(I>bt||M.velocity===s)){var Kt=P.deltaX-M.deltaX,he=P.deltaY-M.deltaY,Ge=Ts(I,Kt,he);X=Ge.x,gt=Ge.y,F=h(Ge.x)>h(Ge.y)?Ge.x:Ge.y,Xt=Ps(Kt,he),S.lastInterval=P}else F=M.velocity,X=M.velocityX,gt=M.velocityY,Xt=M.direction;P.velocity=F,P.velocityX=X,P.velocityY=gt,P.direction=Xt}function So(S){for(var P=[],M=0;M<S.pointers.length;)P[M]={clientX:c(S.pointers[M].clientX),clientY:c(S.pointers[M].clientY)},M++;return{timeStamp:u(),pointers:P,center:Cs(P),deltaX:S.deltaX,deltaY:S.deltaY}}function Cs(S){var P=S.length;if(P===1)return{x:c(S[0].clientX),y:c(S[0].clientY)};for(var M=0,I=0,F=0;F<P;)M+=S[F].clientX,I+=S[F].clientY,F++;return{x:c(M/P),y:c(I/P)}}function Ts(S,P,M){return{x:P/S||0,y:M/S||0}}function Ps(S,P){return S===P?ln:h(S)>=h(P)?S<0?Ye:je:P<0?Re:N}function nr(S,P,M){M||(M=bo);var I=P[M[0]]-S[M[0]],F=P[M[1]]-S[M[1]];return Math.sqrt(I*I+F*F)}function Ln(S,P,M){M||(M=bo);var I=P[M[0]]-S[M[0]],F=P[M[1]]-S[M[1]];return Math.atan2(F,I)*180/Math.PI}function Pr(S,P){return Ln(P[1],P[0],it)+Ln(S[1],S[0],it)}function Ar(S,P){return nr(P[0],P[1],it)/nr(S[0],S[1],it)}var As={mousedown:et,mousemove:It,mouseup:ht},Eo="mousedown",rr="mousemove mouseup";function _(){this.evEl=Eo,this.evWin=rr,this.pressed=!1,Jt.apply(this,arguments)}b(_,Jt,{handler:function(P){var M=As[P.type];M&et&&P.button===0&&(this.pressed=!0),M&It&&P.which!==1&&(M=ht),this.pressed&&(M&ht&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[P],changedPointers:[P],pointerType:q,srcEvent:P}))}});var D={pointerdown:et,pointermove:It,pointerup:ht,pointercancel:Mt,pointerout:Mt},B={2:L,3:W,4:q,5:ft},Y="pointerdown",J="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Y="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel");function ut(){this.evEl=Y,this.evWin=J,Jt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(ut,Jt,{handler:function(P){var M=this.store,I=!1,F=P.type.toLowerCase().replace("ms",""),X=D[F],gt=B[P.pointerType]||P.pointerType,Xt=gt==L,Kt=H(M,P.pointerId,"pointerId");X&et&&(P.button===0||Xt)?Kt<0&&(M.push(P),Kt=M.length-1):X&(ht|Mt)&&(I=!0),!(Kt<0)&&(M[Kt]=P,this.callback(this.manager,X,{pointers:M,changedPointers:[P],pointerType:gt,srcEvent:P}),I&&M.splice(Kt,1))}});var at={touchstart:et,touchmove:It,touchend:ht,touchcancel:Mt},St="touchstart",dt="touchstart touchmove touchend touchcancel";function ke(){this.evTarget=St,this.evWin=dt,this.started=!1,Jt.apply(this,arguments)}b(ke,Jt,{handler:function(P){var M=at[P.type];if(M===et&&(this.started=!0),!!this.started){var I=Nn.call(this,P,M);M&(ht|Mt)&&I[0].length-I[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:I[0],changedPointers:I[1],pointerType:L,srcEvent:P})}}});function Nn(S,P){var M=V(S.touches),I=V(S.changedTouches);return P&(ht|Mt)&&(M=lt(M.concat(I),"identifier",!0)),[M,I]}var qh={touchstart:et,touchmove:It,touchend:ht,touchcancel:Mt},Jh="touchstart touchmove touchend touchcancel";function Co(){this.evTarget=Jh,this.targetIds={},Jt.apply(this,arguments)}b(Co,Jt,{handler:function(P){var M=qh[P.type],I=ZE.call(this,P,M);I&&this.callback(this.manager,M,{pointers:I[0],changedPointers:I[1],pointerType:L,srcEvent:P})}});function ZE(S,P){var M=V(S.touches),I=this.targetIds;if(P&(et|It)&&M.length===1)return I[M[0].identifier]=!0,[M,M];var F,X,gt=V(S.changedTouches),Xt=[],Kt=this.target;if(X=M.filter(function(he){return U(he.target,Kt)}),P===et)for(F=0;F<X.length;)I[X[F].identifier]=!0,F++;for(F=0;F<gt.length;)I[gt[F].identifier]&&Xt.push(gt[F]),P&(ht|Mt)&&delete I[gt[F].identifier],F++;if(Xt.length)return[lt(X.concat(Xt),"identifier",!0),Xt]}var QE=2500,_p=25;function Kh(){Jt.apply(this,arguments);var S=x(this.handler,this);this.touch=new Co(this.manager,S),this.mouse=new _(this.manager,S),this.primaryTouch=null,this.lastTouches=[]}b(Kh,Jt,{handler:function(P,M,I){var F=I.pointerType==L,X=I.pointerType==q;if(!(X&&I.sourceCapabilities&&I.sourceCapabilities.firesTouchEvents)){if(F)tC.call(this,M,I);else if(X&&eC.call(this,I))return;this.callback(P,M,I)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function tC(S,P){S&et?(this.primaryTouch=P.changedPointers[0].identifier,Sp.call(this,P)):S&(ht|Mt)&&Sp.call(this,P)}function Sp(S){var P=S.changedPointers[0];if(P.identifier===this.primaryTouch){var M={x:P.clientX,y:P.clientY};this.lastTouches.push(M);var I=this.lastTouches,F=function(){var X=I.indexOf(M);X>-1&&I.splice(X,1)};setTimeout(F,QE)}}function eC(S){for(var P=S.srcEvent.clientX,M=S.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var F=this.lastTouches[I],X=Math.abs(P-F.x),gt=Math.abs(M-F.y);if(X<=_p&&gt<=_p)return!0}return!1}var Ep=yt(o.style,"touchAction"),Cp=Ep!==s,Tp="compute",Pp="auto",Zh="manipulation",sr="none",Ms="pan-x",Ds="pan-y",To=rC();function Qh(S,P){this.manager=S,this.set(P)}Qh.prototype={set:function(S){S==Tp&&(S=this.compute()),Cp&&this.manager.element.style&&To[S]&&(this.manager.element.style[Ep]=S),this.actions=S.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var S=[];return f(this.manager.recognizers,function(P){w(P.options.enable,[P])&&(S=S.concat(P.getTouchAction()))}),nC(S.join(" "))},preventDefaults:function(S){var P=S.srcEvent,M=S.offsetDirection;if(this.manager.session.prevented){P.preventDefault();return}var I=this.actions,F=R(I,sr)&&!To[sr],X=R(I,Ds)&&!To[Ds],gt=R(I,Ms)&&!To[Ms];if(F){var Xt=S.pointers.length===1,Kt=S.distance<2,he=S.deltaTime<250;if(Xt&&Kt&&he)return}if(!(gt&&X)&&(F||X&&M&Tt||gt&&M&$t))return this.preventSrc(P)},preventSrc:function(S){this.manager.session.prevented=!0,S.preventDefault()}};function nC(S){if(R(S,sr))return sr;var P=R(S,Ms),M=R(S,Ds);return P&&M?sr:P||M?P?Ms:Ds:R(S,Zh)?Zh:Pp}function rC(){if(!Cp)return!1;var S={},P=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){S[M]=P?t.CSS.supports("touch-action",M):!0}),S}var Po=1,Te=2,Mr=4,zn=8,fn=zn,Os=16,Ve=32;function dn(S){this.options=m({},this.defaults,S||{}),this.id=ct(),this.manager=null,this.options.enable=C(this.options.enable,!0),this.state=Po,this.simultaneous={},this.requireFail=[]}dn.prototype={defaults:{},set:function(S){return m(this.options,S),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(S){if(d(S,"recognizeWith",this))return this;var P=this.simultaneous;return S=Ao(S,this),P[S.id]||(P[S.id]=S,S.recognizeWith(this)),this},dropRecognizeWith:function(S){return d(S,"dropRecognizeWith",this)?this:(S=Ao(S,this),delete this.simultaneous[S.id],this)},requireFailure:function(S){if(d(S,"requireFailure",this))return this;var P=this.requireFail;return S=Ao(S,this),H(P,S)===-1&&(P.push(S),S.requireFailure(this)),this},dropRequireFailure:function(S){if(d(S,"dropRequireFailure",this))return this;S=Ao(S,this);var P=H(this.requireFail,S);return P>-1&&this.requireFail.splice(P,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(S){return!!this.simultaneous[S.id]},emit:function(S){var P=this,M=this.state;function I(F){P.manager.emit(F,S)}M<zn&&I(P.options.event+Ap(M)),I(P.options.event),S.additionalEvent&&I(S.additionalEvent),M>=zn&&I(P.options.event+Ap(M))},tryEmit:function(S){if(this.canEmit())return this.emit(S);this.state=Ve},canEmit:function(){for(var S=0;S<this.requireFail.length;){if(!(this.requireFail[S].state&(Ve|Po)))return!1;S++}return!0},recognize:function(S){var P=m({},S);if(!w(this.options.enable,[this,P])){this.reset(),this.state=Ve;return}this.state&(fn|Os|Ve)&&(this.state=Po),this.state=this.process(P),this.state&(Te|Mr|zn|Os)&&this.tryEmit(P)},process:function(S){},getTouchAction:function(){},reset:function(){}};function Ap(S){return S&Os?"cancel":S&zn?"end":S&Mr?"move":S&Te?"start":""}function Mp(S){return S==N?"down":S==Re?"up":S==Ye?"left":S==je?"right":""}function Ao(S,P){var M=P.manager;return M?M.get(S):S}function Le(){dn.apply(this,arguments)}b(Le,dn,{defaults:{pointers:1},attrTest:function(S){var P=this.options.pointers;return P===0||S.pointers.length===P},process:function(S){var P=this.state,M=S.eventType,I=P&(Te|Mr),F=this.attrTest(S);return I&&(M&Mt||!F)?P|Os:I||F?M&ht?P|zn:P&Te?P|Mr:Te:Ve}});function Mo(){Le.apply(this,arguments),this.pX=null,this.pY=null}b(Mo,Le,{defaults:{event:"pan",threshold:10,pointers:1,direction:Es},getTouchAction:function(){var S=this.options.direction,P=[];return S&Tt&&P.push(Ds),S&$t&&P.push(Ms),P},directionTest:function(S){var P=this.options,M=!0,I=S.distance,F=S.direction,X=S.deltaX,gt=S.deltaY;return F&P.direction||(P.direction&Tt?(F=X===0?ln:X<0?Ye:je,M=X!=this.pX,I=Math.abs(S.deltaX)):(F=gt===0?ln:gt<0?Re:N,M=gt!=this.pY,I=Math.abs(S.deltaY))),S.direction=F,M&&I>P.threshold&&F&P.direction},attrTest:function(S){return Le.prototype.attrTest.call(this,S)&&(this.state&Te||!(this.state&Te)&&this.directionTest(S))},emit:function(S){this.pX=S.deltaX,this.pY=S.deltaY;var P=Mp(S.direction);P&&(S.additionalEvent=this.options.event+P),this._super.emit.call(this,S)}});function tu(){Le.apply(this,arguments)}b(tu,Le,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[sr]},attrTest:function(S){return this._super.attrTest.call(this,S)&&(Math.abs(S.scale-1)>this.options.threshold||this.state&Te)},emit:function(S){if(S.scale!==1){var P=S.scale<1?"in":"out";S.additionalEvent=this.options.event+P}this._super.emit.call(this,S)}});function eu(){dn.apply(this,arguments),this._timer=null,this._input=null}b(eu,dn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Pp]},process:function(S){var P=this.options,M=S.pointers.length===P.pointers,I=S.distance<P.threshold,F=S.deltaTime>P.time;if(this._input=S,!I||!M||S.eventType&(ht|Mt)&&!F)this.reset();else if(S.eventType&et)this.reset(),this._timer=l(function(){this.state=fn,this.tryEmit()},P.time,this);else if(S.eventType&ht)return fn;return Ve},reset:function(){clearTimeout(this._timer)},emit:function(S){this.state===fn&&(S&&S.eventType&ht?this.manager.emit(this.options.event+"up",S):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function nu(){Le.apply(this,arguments)}b(nu,Le,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[sr]},attrTest:function(S){return this._super.attrTest.call(this,S)&&(Math.abs(S.rotation)>this.options.threshold||this.state&Te)}});function ru(){Le.apply(this,arguments)}b(ru,Le,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Tt|$t,pointers:1},getTouchAction:function(){return Mo.prototype.getTouchAction.call(this)},attrTest:function(S){var P=this.options.direction,M;return P&(Tt|$t)?M=S.overallVelocity:P&Tt?M=S.overallVelocityX:P&$t&&(M=S.overallVelocityY),this._super.attrTest.call(this,S)&&P&S.offsetDirection&&S.distance>this.options.threshold&&S.maxPointers==this.options.pointers&&h(M)>this.options.velocity&&S.eventType&ht},emit:function(S){var P=Mp(S.offsetDirection);P&&this.manager.emit(this.options.event+P,S),this.manager.emit(this.options.event,S)}});function Do(){dn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(Do,dn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Zh]},process:function(S){var P=this.options,M=S.pointers.length===P.pointers,I=S.distance<P.threshold,F=S.deltaTime<P.time;if(this.reset(),S.eventType&et&&this.count===0)return this.failTimeout();if(I&&F&&M){if(S.eventType!=ht)return this.failTimeout();var X=this.pTime?S.timeStamp-this.pTime<P.interval:!0,gt=!this.pCenter||nr(this.pCenter,S.center)<P.posThreshold;this.pTime=S.timeStamp,this.pCenter=S.center,!gt||!X?this.count=1:this.count+=1,this._input=S;var Xt=this.count%P.taps;if(Xt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=fn,this.tryEmit()},P.interval,this),Te):fn}return Ve},failTimeout:function(){return this._timer=l(function(){this.state=Ve},this.options.interval,this),Ve},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==fn&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function mn(S,P){return P=P||{},P.recognizers=C(P.recognizers,mn.defaults.preset),new su(S,P)}mn.VERSION="2.0.7",mn.defaults={domEvents:!1,touchAction:Tp,enable:!0,inputTarget:null,inputClass:null,preset:[[nu,{enable:!1}],[tu,{enable:!1},["rotate"]],[ru,{direction:Tt}],[Mo,{direction:Tt},["swipe"]],[Do],[Do,{event:"doubletap",taps:2},["tap"]],[eu]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var sC=1,Dp=2;function su(S,P){this.options=m({},mn.defaults,P||{}),this.options.inputTarget=this.options.inputTarget||S,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=S,this.input=wo(this),this.touchAction=new Qh(this,this.options.touchAction),Op(this,!0),f(this.options.recognizers,function(M){var I=this.add(new M[0](M[1]));M[2]&&I.recognizeWith(M[2]),M[3]&&I.requireFailure(M[3])},this)}su.prototype={set:function(S){return m(this.options,S),S.touchAction&&this.touchAction.update(),S.inputTarget&&(this.input.destroy(),this.input.target=S.inputTarget,this.input.init()),this},stop:function(S){this.session.stopped=S?Dp:sC},recognize:function(S){var P=this.session;if(!P.stopped){this.touchAction.preventDefaults(S);var M,I=this.recognizers,F=P.curRecognizer;(!F||F&&F.state&fn)&&(F=P.curRecognizer=null);for(var X=0;X<I.length;)M=I[X],P.stopped!==Dp&&(!F||M==F||M.canRecognizeWith(F))?M.recognize(S):M.reset(),!F&&M.state&(Te|Mr|zn)&&(F=P.curRecognizer=M),X++}},get:function(S){if(S instanceof dn)return S;for(var P=this.recognizers,M=0;M<P.length;M++)if(P[M].options.event==S)return P[M];return null},add:function(S){if(d(S,"add",this))return this;var P=this.get(S.options.event);return P&&this.remove(P),this.recognizers.push(S),S.manager=this,this.touchAction.update(),S},remove:function(S){if(d(S,"remove",this))return this;if(S=this.get(S),S){var P=this.recognizers,M=H(P,S);M!==-1&&(P.splice(M,1),this.touchAction.update())}return this},on:function(S,P){if(S!==s&&P!==s){var M=this.handlers;return f(j(S),function(I){M[I]=M[I]||[],M[I].push(P)}),this}},off:function(S,P){if(S!==s){var M=this.handlers;return f(j(S),function(I){P?M[I]&&M[I].splice(H(M[I],P),1):delete M[I]}),this}},emit:function(S,P){this.options.domEvents&&iC(S,P);var M=this.handlers[S]&&this.handlers[S].slice();if(!(!M||!M.length)){P.type=S,P.preventDefault=function(){P.srcEvent.preventDefault()};for(var I=0;I<M.length;)M[I](P),I++}},destroy:function(){this.element&&Op(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Op(S,P){var M=S.element;if(M.style){var I;f(S.options.cssProps,function(F,X){I=yt(M.style,X),P?(S.oldCssProps[I]=M.style[I],M.style[I]=F):M.style[I]=S.oldCssProps[I]||""}),P||(S.oldCssProps={})}}function iC(S,P){var M=e.createEvent("Event");M.initEvent(S,!0,!0),M.gesture=P,P.target.dispatchEvent(M)}m(mn,{INPUT_START:et,INPUT_MOVE:It,INPUT_END:ht,INPUT_CANCEL:Mt,STATE_POSSIBLE:Po,STATE_BEGAN:Te,STATE_CHANGED:Mr,STATE_ENDED:zn,STATE_RECOGNIZED:fn,STATE_CANCELLED:Os,STATE_FAILED:Ve,DIRECTION_NONE:ln,DIRECTION_LEFT:Ye,DIRECTION_RIGHT:je,DIRECTION_UP:Re,DIRECTION_DOWN:N,DIRECTION_HORIZONTAL:Tt,DIRECTION_VERTICAL:$t,DIRECTION_ALL:Es,Manager:su,Input:Jt,TouchAction:Qh,TouchInput:Co,MouseInput:_,PointerEventInput:ut,TouchMouseInput:Kh,SingleTouchInput:ke,Recognizer:dn,AttrRecognizer:Le,Tap:Do,Pan:Mo,Swipe:ru,Pinch:tu,Rotate:nu,Press:eu,on:E,off:O,each:f,merge:g,extend:v,assign:m,inherit:b,bindFn:x,prefixed:yt});var oC=typeof t<"u"?t:typeof self<"u"?self:{};oC.Hammer=mn,typeof s=="function"&&s.amd?s(function(){return mn}):n.exports?n.exports=mn:t[r]=mn})(window,document,"Hammer")})(Tm);var A_=Tm.exports;const Lt=va(A_);async function Pm(n,t){return new Promise(e=>{const r=new ResizeObserver(s=>{const i=n.getBoundingClientRect();t(i),e(()=>{r.unobserve(n)})});r.observe(n)})}function Lh(n=document.documentElement,t){return new Rt(e=>{const r=n.getBoundingClientRect();let s=r.x,i=r.y,o=r.width,a=r.height;e.next(r);const c=new ResizeObserver(h=>{const u=n.getBoundingClientRect();(s!=u.x||i!=u.y||o!=u.width||a!=u.height)&&(s=u.x,i=u.y,o=u.width,a=u.height,e.next(u))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function M_(){return Q(window,"orientationchange"in window?"orientationchange":"resize").pipe(kt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),Xn({width:window.innerWidth,height:window.innerHeight}))}function D_(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function O_(){return!!window.PointerEvent}function I_(n,t){let e=document.createElement(n);t="on"+t;let r=t in e;return r||(e.setAttribute(t,"return;"),r=typeof e[t]=="function"),e=null,r}function Nh(){return{x:0,y:0,isDown:!1}}function er(){const n=Nh(),t=Nh();return{start:n,current:t,setStart:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,r)},setCurrent:(e,r)=>{t.x=e.x,t.y=e.y,t.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1}}}function lo(n=document.documentElement,t=!1){return Q(n,"mousemove",t)}function Am(n=document.documentElement,t=!1){return Q(n,"mousedown",t)}function Mm(n=document.documentElement,t=!1){return Q(n,"mouseup",t)}function R_(n=document.documentElement,t=!1){return Q(n,"mouseover",t)}function k_(n=document.documentElement,t=!1){return Q(n,"mouseout",t)}function L_(n=document.documentElement,t=!1){return Q(n,"mouseenter",t)}function N_(n=document.documentElement,t=!1){return Q(n,"mouseleave",t)}function z_(n=document.documentElement,t=!1){return Q(n,"click",t)}function F_(n=document.documentElement,t=!1){return Q(n,"dblclick",t)}function B_(n=document.documentElement,t=!1){return Q(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function $_(n=document.documentElement,t=!1){return Q(n,"contextmenu",t)}function Dm(n=document.documentElement,t=!1){return Q(n,"touchmove",t)}function Om(n=document.documentElement,t=!1){return Q(n,"touchstart",t)}function Im(n=document.documentElement,t=!1){return Q(n,"touchend",t)}function Rm(n=document.documentElement,t=!1){return Q(n,"touchcancel",t)}function zh(n=document.documentElement,t=!1){return Q(n,"pointermove",t)}function Fh(n=document.documentElement,t=!1){return Q(n,"pointerdown",t)}function Bh(n=document.documentElement,t=!1){return Q(n,"pointerup",t)}function $h(n=document.documentElement,t=!1){return Q(n,"pointercancel",t)}function U_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function Y_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function j_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function V_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function G_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function X_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function H_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function W_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function q_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function J_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function K_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function Z_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function Q_(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("press",e)},e=>{t.off("press",e)})}function tS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function eS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function nS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function rS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function sS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function iS(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function km(n=document.documentElement){const t=new Lt(n);return Ot(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function oS(n=document.documentElement){const t=new Lt(document.documentElement);return Ot(e=>{const r=s=>{!s.target||n==s.target||n.contains(s.target)||e(s)};return t.on("tap",r),r},(e,r)=>{t.off("tap",r)})}function aS(n=document.documentElement,t=!1){return Q(n,"transitionstart",t)}function cS(n=document.documentElement,t=!1){return li(Q(n,"transitionend",t),Q(n,"webkitTransitionEnd",t),Q(n,"oTransitionEnd",t),Q(n,"MSTransitionEnd",t))}function hS(n=document.documentElement,t=!1){return Q(n,"animationstart",t)}function uS(n=document.documentElement,t=!1){return Q(n,"animationend",t)}function Lm(n=document.documentElement,t=!1){return Q(n,"drag",t)}function Nm(n=document.documentElement,t=!1){return Q(n,"dragstart",t)}function zm(n=document.documentElement,t=!1){return Q(n,"dragend",t)}function Fm(n=document.documentElement,t=!1){return Q(n,"drop",t)}function Bm(n=document.documentElement,t=!1){return Q(n,"dragenter",t)}function $m(n=document.documentElement,t=!1){return Q(n,"dragleave",t)}function Um(n=document.documentElement,t=!1){return Q(n,"dragover",t)}function Ym(n=document.documentElement,t=!1){return Q(n,"keydown",t)}function jm(n=document.documentElement,t=!1){return Q(n,"keyup",t)}function lS(n=document.documentElement,t=!1){return Q(n,"keypress",t)}function fS(n,t=!1){return Q(n,"change",t)}function dS(n,t=!1){return Q(n,"submit",t)}function mS(n=10){return Q(window,"scroll",!0).pipe(Ib(n))}function pS(){return Q(document,"visibilitychange",!0).pipe(kt(()=>document.visibilityState==="visible"),wn())}function gS(){return Q(window,"storage",!1)}function yS(){return li(Q(window,"online",!1),Q(window,"offline",!1)).pipe(kt(()=>navigator.onLine),Xn(navigator.onLine),wn(),df({bufferSize:1,refCount:!0}))}function bS(n=document.documentElement,t){const e=t?.createMousePoint||er();return lo(n).pipe(kt(r=>(e.setCurrent(Yt(r,n)),e)))}function Vm(n=document.documentElement,t){const e=t?.createMousePoint||er();return lo(n).pipe(Rb(Am(n).pipe(Hn(r=>{e.setStart(Yt(r,n),!0),t?.start?.(r,e)})),()=>Mm(n).pipe(Hn(r=>{e.setCurrent(Yt(r,n),!1),t?.end?.(r,e)}))),Db(),kt(r=>(e.setCurrent(Yt(r,n),!0),e)))}function Gm(n=document.documentElement,t){const e=t?.createMousePoint||er();return Om(n).pipe(Hn(r=>{const s=r.changedTouches[0];e.setStart(Yt(s,n),!0),t?.start?.(s,e)}),di(()=>Dm(n).pipe(ja(fi(Im(n),Rm(n)).pipe(Hn(r=>{const s=r.changedTouches[0];e.setCurrent(Yt(s,n),!1),t?.end?.(s,e)}))))),kt(r=>{const s=r.changedTouches[0];return e.setCurrent(Yt(s,n),!0),e}))}function fo(n=document.documentElement,t){const e=t?.createMousePoint||er();return Fh(n).pipe(Hn(r=>{e.setStart(Yt(r,n),!0),t?.start?.(r,e)}),di(()=>zh(n).pipe(ja(fi(Bh(n),$h(n)).pipe(Hn(r=>{e.setCurrent(Yt(r,n),!1),t?.end?.(r,e)}))))),kt(r=>(e.setCurrent(Yt(r,n),!0),e)))}function wS(n=document.documentElement,t){return fi(Vm(n,t),Gm(n,t))}function Xm(n=document.documentElement,t){const e=t?.createMousePoint||er();return li(lo(n),Fh(n)).pipe(ff(r=>r instanceof PointerEvent?(e.setStart(Yt(r,n),!0),t?.start?.(r,e),zh(n).pipe(ja(fi(Bh(n),$h(n)).pipe(Hn(s=>{e.setCurrent(Yt(s,n),!1),t?.end?.(s,e)}))))):r instanceof MouseEvent?eb(r):Hl),kt(r=>(e.setCurrent(Yt(r,n),r instanceof PointerEvent),e)))}function vS(n){return new Rt(t=>fo(n,{start:()=>{t.next(0)}}).subscribe(r=>{t.next(r.current.y-r.start.y)}).unsubscribe).pipe(wn())}function xS(n,t){jn(n,"draggable","true");const e=Nm(n,!0).subscribe(i=>{vn(i),mf(i);const o=i.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(i)}),r=Lm(n).subscribe(i=>{vn(i),t?.onDrag?.(i)}),s=zm(n).subscribe(i=>{vn(i),t?.onEnd?.(i)});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe()}}function _S(n,t){const e=Bm(n).subscribe(o=>{vn(o),t?.onEnter?.(o)}),r=Um(n).subscribe(o=>{vn(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),s=$m(n).subscribe(o=>{vn(o),t?.onLeave?.(o)}),i=Fm(n).subscribe(o=>{vn(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe()}}function SS(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function Tr(){const n=document.documentElement||document.body;return{el:n,clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function Hm(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:r}=Tr();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||r}}function ES(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:r}=Tr();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||r}}function Uh(n){return n.getBoundingClientRect()}function CS(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function Yh(n){const{top:t,left:e,width:r,height:s}=n.getBoundingClientRect(),{scrollLeft:i,scrollTop:o}=Tr();return{x:e+i,y:t+o,width:r,height:s}}function TS(n){let t=n,e=0,r=0;for(;t!==null;)e+=t.offsetLeft,r+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:r,width:n.offsetWidth,height:n.offsetHeight}}function PS(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=Tr(),r=e-n;return r<=0?0:t/r*100}function AS(n){const t=Hm(),e=Uh(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function MS(n){if("center"in n){const t=n.center,e=Uh(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function jh(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=Tr();return{x:n.clientX+t,y:n.clientY+e}}function Yt(n,t){const e={x:0,y:0};if(t){const r=jh(n),s=Yh(t);e.x=Z(r.x-s.x,0,s.width),e.y=Z(r.y-s.y,0,s.height)}else{let r=0,s=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const i=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();r=o.left-i.left,s=o.top-i.top}if("offsetX"in n)e.x=n.offsetX+r,e.y=n.offsetY+s;else{const i=jh(n),o=Yh(n.target);e.x=Z(i.x-o.x+r,0,o.width),e.y=Z(i.y-o.y+s,0,o.height)}}return e}function DS(n){let t=0;return n||(n=window.event),n.wheelDelta?(t=n.wheelDelta/120,window.opera&&(t=-t)):n.detail&&(t=-n.detail/3),t}function OS(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const IS={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function RS(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function Wm(n,t){const e=t.ctrl||!1,r=t.shift||!1,s=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&r===n.shiftKey&&s===n.altKey&&t.keys.map(i=>i.toLowerCase()).includes(n.key.toLowerCase())}function qm(n){return Ym(n.target||document||window).pipe(Ua(t=>Wm(t,n)),kt(t=>{t.stopPropagation(),t.preventDefault()}))}function kS(n){return jm(n.target||document||window).pipe(Ua(t=>Wm(t,n)),kt(t=>{t.stopPropagation(),t.preventDefault()}))}function Jm(n={keys:["o"]},t=ve.text){return qm(n).pipe(di(async()=>await ym(t)))}async function LS(n={keys:["o"]},t=ve.text){return rb(Jm(n,t))}function NS(){const n={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:!1,this.setCurrentMousePoint(e,r)},setCurrentMousePoint:(e,r)=>{const s=t.x,i=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-s,t.dy=t.y-i,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof r=="boolean"?r:!1}}}function zS(n=document.documentElement){const t=new Vo,e=new Lt(n);let r=[];const s=NS(),i=s.mousePoint,o=N=>{t.emit("mouseDown",N)},a=N=>{t.emit("mouseUp",N)},c=N=>{i.isDown||s.setCurrentMousePoint(Yt(N,n)),t.emit("mouseMove",N)},h=N=>{t.emit("mouseOver",N)},u=N=>{t.emit("mouseOut",N)},l=N=>{t.emit("mouseEnter",N)},d=N=>{t.emit("mouseLeave",N)},f=N=>{t.emit("mouseClick",N)},p=N=>{t.emit("mouseDoubleClick",N)},m=N=>{t.emit("mouseWheel",N)},v=N=>{t.emit("mouseContextMenu",N)},g=N=>{t.emit("touchStart",N)},b=N=>{t.emit("touchEnd",N)},x=N=>{t.emit("touchCancel",N)},w=N=>{const Tt=N.changedTouches[0];i.isDown||s.setCurrentMousePoint(Yt(Tt,n)),t.emit("touchMove",N)},C=N=>{t.emit("pointerDown",N)},E=N=>{t.emit("pointerUp",N)},O=N=>{t.emit("pointerCancel",N)},U=N=>{t.emit("pointerMove",N)},R=N=>{t.emit("pan",N)},j=N=>{t.emit("panStart",N)},H=N=>{t.emit("panMove",N)},V=N=>{t.emit("panEnd",N)},lt=N=>{t.emit("panCancel",N)},yt=N=>{t.emit("panLeft",N)},mt=N=>{t.emit("panRight",N)},ct=N=>{t.emit("panUp",N)},st=N=>{t.emit("panDown",N)},Ct=N=>{t.emit("pinch",N)},$=N=>{t.emit("pinchin",N)},z=N=>{t.emit("pinchout",N)},A=N=>{t.emit("press",N)},L=N=>{t.emit("rotate",N)},W=N=>{t.emit("swipe",N)},q=N=>{t.emit("swipeLeft",N)},ft=N=>{t.emit("swipeRight",N)},bt=N=>{t.emit("swipeUp",N)},et=N=>{t.emit("swipeDown",N)},It=N=>{t.emit("tap",N)},ht=N=>{!N.target||n==N.target||n.contains(N.target)||t.emit("tapOutSide",N)},Mt=N=>{t.emit("transitionstart",N)},ln=N=>{t.emit("transitionend",N)},Ye=N=>{t.emit("animationstart",N)},je=N=>{t.emit("animationend",N)};let Re={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return Re},mousePoint:i,eb:t,start:async function(){r.push(_t(n,"mousedown",o)),r.push(_t(n,"mouseup",a)),r.push(_t(n,"mousemove",c)),r.push(_t(n,"mouseover",h)),r.push(_t(n,"mouseout",u)),r.push(_t(n,"mouseenter",l)),r.push(_t(n,"mouseleave",d)),r.push(_t(n,"click",f)),r.push(_t(n,"dblclick",p)),r.push(_t(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),r.push(_t(n,"contextmenu",v)),r.push(_t(n,"touchstart",g)),r.push(_t(n,"touchend",b)),r.push(_t(n,"touchcancel",x)),r.push(_t(n,"touchmove",w)),r.push(_t(n,"pointerdown",C)),r.push(_t(n,"pointerup",E)),r.push(_t(n,"pointercancel",O)),r.push(_t(n,"pointermove",U)),e.on("pan",R),e.on("panstart",j),e.on("panmove",H),e.on("panend",V),e.on("pancancel",lt),e.on("panleft",yt),e.on("panright",mt),e.on("panup",ct),e.on("pandown",st),e.on("pinch",Ct),e.on("pinchin",$),e.on("pinchout",z),e.on("press",A),e.on("rotate",L),e.on("swipe",W),e.on("swipeleft",q),e.on("swiperight",ft),e.on("swipeup",bt),e.on("swipedown",et),e.on("tap",It),r.push(_t(document,"pointerdown",ht)),r.push(_t(n,"transitionstart",Mt)),r.push(_t(n,"transitionend",ln)),r.push(_t(n,"animationstart",Ye)),r.push(_t(n,"animationend",je));const N=await Pm(n,Tt=>{Re=Tt,t.emit("resize",Tt)});r.push(N),r.push(Km(this,{start:Tt=>{s.setStartMousePoint(Yt(Tt,n),!0)},move:Tt=>{s.setCurrentMousePoint(Yt(Tt,n))},end:Tt=>{s.setCurrentMousePoint(Yt(Tt,n),!1)}}))},end:()=>{t.removeAllListeners(),r.forEach(N=>N()),r=[],e.off("pan",R),e.off("panstart",j),e.off("panmove",H),e.off("panend",V),e.off("pancancel",lt),e.off("panleft",yt),e.off("panright",mt),e.off("panup",ct),e.off("pandown",st),e.off("pinch",Ct),e.off("pinchin",$),e.off("pinchout",z),e.off("press",A),e.off("rotate",L),e.off("swipe",W),e.off("swipeleft",q),e.off("swiperight",ft),e.off("swipeup",bt),e.off("swipedown",et),e.off("tap",It)}}}function Km(n,t){return Zm(n,t)}function Zm(n,t){const e=n.eb,r=o=>{e.on("pointerMove",i),e.on("pointerUp",s),e.on("pointerCancel",s),t?.start?.(o)},s=o=>{e.off("pointerMove",i),e.off("pointerUp",s),e.off("pointerCancel",s),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("pointerDown",r),()=>e.off("pointerDown",r)}function FS(n,t){const e=n.eb,r=o=>{document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",s,!1),t?.start?.(o)},s=o=>{document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",s,!1),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("mouseDown",r),()=>e.off("mouseDown",r)}function BS(n,t){const e=n.eb,r=o=>{e.on("touchMove",i),e.on("touchEnd",s),e.on("touchCancel",s);const a=o.changedTouches[0];t?.start?.(a)},s=o=>{e.off("touchMove",i),e.off("touchEnd",s),e.off("touchCancel",s);const a=o.changedTouches[0];t?.end?.(a)},i=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",r),()=>e.off("touchStart",r)}function $S(n,t,e){if(typeof t=="string"&&(t=fu(t)),(typeof t=="string"||t===void 0)&&e===void 0){const r=Object.assign({},n.dataset);return Object.keys(r).forEach(s=>{if(r[s]?.startsWith("[")||r[s]?.startsWith("{"))try{r[s]=JSON.parse(r[s]||"")}catch{}}),typeof t=="string"?r[t]:r}else{let r={};typeof t=="object"?r=t:typeof t=="string"&&(r[t]=e),Object.entries(r).forEach(([s,i])=>{i?n.dataset[s]=i instanceof Object?JSON.stringify(i):i:delete n.dataset[s]})}}function US(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function Qm(n,t={attributes:!0,childList:!0,subtree:!0}){return new Rt(e=>{const r=new MutationObserver((s,i)=>{e.next(s)});return r.observe(n,t),()=>{r.disconnect()}})}function YS(n,t){return new Promise(e=>{new MutationObserver((s,i)=>{for(const o of s)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(i.disconnect(),e(!0))})}).observe(n,{childList:!0})})}function tp(n,t={root:null}){return new Rt(e=>{const r=new IntersectionObserver((s,i)=>{if(s.length){const o=s[s.length-1];o&&e.next(o)}},t);return r.observe(n),()=>{r.unobserve(n),r.disconnect()}})}function jS(n,t){const e=t?.threshold??.5;return tp(n,{threshold:e,root:t?.root}).pipe(kt(r=>r.isIntersecting&&r.intersectionRatio>=e),wn())}function Vh(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=oi(r(),t);return a().value},set:a=>{const{set:c}=oi(r(),t),h=c(a);s(h)}}}function VS(){window.sessionStorage.clear()}function ep(){return Qm(document).pipe(kt(()=>location),Xn(location))}function GS(){return ep().pipe(kt(n=>n.href),Xn(location.href),wn())}function XS(){return Q(window,"hashchange").pipe(kt(n=>n.target.location.hash.replace("#","")),Xn(window.location.hash.replace("#","")),wn())}function np(n="current"){return Q(window,"popstate").pipe(kt(t=>t.state||{}),kt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),wn((t,e)=>t[n]===e[n]))}function HS(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:r,set:s}=Vh("fe-route-history"),i=r()||[],{get:o,set:a}=Vh("fe-route-history-index"),c=o();let h=typeof c=="number"?c:i.length-1;function u(g){return i.findIndex(x=>x[t]===g[t])}const l={currentIndex:h};function d(g){g=Z(g,-1,i.length-1),h<0?(l.direction="keep",l.delta=0):(g<h?l.direction="backward":g>h?l.direction="forward":l.direction="keep",l.delta=g-h),l.from=l.to,l.to=i[g]?.[t],h=g,l.currentIndex=h,a(h)}d(h);function f(g){i.push(g),s(i),d(i.length-1)}function p(g,b){const x={...b,[t]:g};window.history.pushState(x,"",g),f(x)}function m(g,b=e){const x=u(g);if(x<0){h>=0&&(i.splice(h+1),s(i)),b?f(g):p(g[t],g);return}x!=h&&d(x)}const v=np().subscribe(g=>{m(g,!0)});return{history:i,route:l,navigate:(g,b)=>{m({...b,[t]:g},e)},go(g){window.history.go(g)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{v.unsubscribe()}}}function rp(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return Q(t,"change").pipe(kt(e=>e.matches),Xn(t.matches),wn())}let sp=!1;function WS(){sp||(sp=!0,kl(`
42
128
  :root {
43
129
  --sat:env(safe-area-inset-top, 0px);
44
130
  --sar:env(safe-area-inset-right, 0px);
@@ -51,16 +137,9 @@ Content-Type: `+f.type+`\r
51
137
  --sab:env(safe-area-inset-bottom, 0px);
52
138
  --sal:env(safe-area-inset-left, 0px);
53
139
  }
54
- `))}Gw();function Vw(){return Po(document.documentElement).pipe(Er(Sr),it(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function jw(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new st(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),n()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(n=>{t.next({longitude:n.coords.longitude,latitude:n.coords.latitude})},n=>{t.error(n)},s)}).catch(n=>{t.error(n)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function wu(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return X(t,"change").pipe(it(e=>e.matches),je(t.matches),Ae())}function sa(s,t){const e=typeof s=="string"?s:s.toString(),n=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return Aa(a)}catch{}},i=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,Ai(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Ss(n(),t);return a().value},set:a=>{const{set:h}=Ss(n(),t),c=h(a);i(c)}}}function qw(){window.sessionStorage.clear()}function bu(){return pu(document).pipe(it(()=>location),je(location))}function Hw(){return bu().pipe(it(s=>s.href),je(location.href),Ae())}function Ww(){return X(window,"hashchange").pipe(it(s=>s.target.location.hash.replace("#","")),je(window.location.hash.replace("#","")),Ae())}function xu(s="current"){return X(window,"popstate").pipe(it(t=>t.state||{}),it(t=>({...t,[s]:t[s]||window.location.pathname+window.location.search+window.location.hash})),Ae((t,e)=>t[s]===e[s]))}function Jw(s={nameInState:"current",alreadyPushState:!0}){const t=s.nameInState,e=typeof s.alreadyPushState=="boolean"?s.alreadyPushState:!0,{get:n,set:i}=sa("fe-route-history"),r=n()||[],{get:o,set:a}=sa("fe-route-history-index"),h=o();let c=typeof h=="number"?h:r.length-1;function l(y){return r.findIndex(b=>b[t]===y[t])}const u={currentIndex:c};function d(y){y=B(y,-1,r.length-1),c<0?(u.direction="keep",u.delta=0):(y<c?u.direction="backward":y>c?u.direction="forward":u.direction="keep",u.delta=y-c),u.from=u.to,u.to=r[y]?.[t],c=y,u.currentIndex=c,a(c)}d(c);function f(y){r.push(y),i(r),d(r.length-1)}function p(y,v){const b={...v,[t]:y};window.history.pushState(b,"",y),f(b)}function g(y,v=e){const b=l(y);if(b<0){c>=0&&(r.splice(c+1),i(r)),v?f(y):p(y[t],y);return}b!=c&&d(b)}const C=xu().subscribe(y=>{g(y,!0)});return{history:r,route:u,navigate:(y,v)=>{g({...v,[t]:y},e)},go(y){window.history.go(y)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{C.unsubscribe()}}}function Zw(s,t,e){if(typeof t=="string"&&(t=Da(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(i=>{if(n[i]?.startsWith("[")||n[i]?.startsWith("{"))try{n[i]=JSON.parse(n[i]||"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),Object.entries(n).forEach(([i,r])=>{r?s.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete s.dataset[i]})}}function Kw(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function vu(s,t){const e=typeof s=="string"?s:s.toString(),n=()=>{try{const a=window.localStorage.getItem(e);if(a)return Aa(a)}catch{}},i=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,Ai(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Ss(n(),t);return a().value},set:a=>{const{set:h}=Ss(n(),t),c=h(a);i(c)}}}function Qw(){window.localStorage.clear()}const{get:Su,set:_u}=vu(Ei("theme")),Cu=new Te,tb=Cu.pipe(je(void 0));function Eu(s){switch(s){case"dark":document.documentElement.classList.add("dark"),Je(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),Je(document.documentElement,"data-theme","light");break}}function Pu(s){return _u(s),Eu(s),Cu.next(s),s}function eb(){return Pu(Su()=="dark"?"light":"dark")}function nb(){return hg([tb,wu("(prefers-color-scheme: dark)")]).pipe(it(([s,t])=>s||(s=Su(),s||(s=t?"dark":"light"),_u(s),Eu(s),s)))}function sb(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function ib(s,t){document.documentElement.style.setProperty(s,t)}function rb(s,t){let e=t?.value||"";if(!e){const r=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();r&&(e=decodeURIComponent(r))}const n=()=>e,i=r=>{if(e=r,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",h=t?.secure==!0?"; secure":"";let c=s+"="+encodeURIComponent(e)+o+a+h;if(t?.days){const l="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();c+=l}document.cookie=c}};return i(e),{get:n,set:i}}function ob(){const s=document.cookie.split("; ");for(let t=0;t<s.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const n=encodeURIComponent(s[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=n+"/";i.length>0;)document.cookie=n+i.join("/"),i.pop();e.shift()}}}function ab(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function hb(s,t=1,e){return new Promise((n,i)=>{let r;const o=window.indexedDB.open(s,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,ab(r,e),n(r)}})}function cb(s,t,e={id:1,name:"xxx"}){return new Promise((n,i)=>{const r=s.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{n(a)},r.onerror=a=>{i(a)}})}const ia=new kn;function ra(s,t){return Mi({url:s,...t})}async function hi(s,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");try{const e=ra(s,t),n=new AbortController;ia.set(e,n);const{responseType:i,onProgress:r,timeout:o}={responseType:"json",timeout:6e4,...t},a=setTimeout(()=>{n.abort()},o);let h=await fetch(new Request(s,{...t,signal:n.signal}));if(ia.delete(e),clearTimeout(a),h.status===200||h.status===0){if(h.status===0&&ws("useFetch: HTTP Status 0 received."),r&&typeof ReadableStream<"u"&&h.body&&h.body.getReader){const c=h.body.getReader(),l=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),u=l?parseInt(l):0,d=u!==0;let f=0;const p=new ReadableStream({start(g){function C(){c.read().then(({done:y,value:v})=>{y?g.close():(f+=v.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:f,total:u})),g.enqueue(v),C())}).catch(y=>{g.error(y)})}C()}});h=new Response(p)}switch(i){case"arraybuffer":return await h.arrayBuffer();case"blob":return await h.blob();case"json":return await h.json();case"text":default:return await h.text()}}else throw new fd(`useFetch for "${h.url}" responded with ${h.status}: ${h.statusText}`,h)}catch(e){throw e.name==="AbortError"?new Error("Request timed out"):e.name==="TimeoutError"?new Error("Request timed out"):e}}function lb(s,t){const e=ia.get(ra(s,t));e&&e.abort()}function ub(s=3,t){return Li(hi,s,t)}function fb(s=6e4){return Ri(hi,s)}function db(s=6e4,t=3,e){return Ri(Li(hi,t,e),s)}const mb={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(s,t)=>{switch(t){case"W":return`${s}周`;default:return`${s}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(s,t)=>{const e=s*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},pb={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:s=>{const t=["th","st","nd","rd"],e=s%100;return`[${s}${t[(e-20)%10]||t[e]||t[0]}]`}},Be=new kn;let ci="zh-cn";oa(pb),oa(mb);function oa(s,t){if(!s)return Be.get(ci);let e;if(typeof s=="string"){const n=s.toLowerCase();if(Be.get(n))e=n;else if(t)Be.set(n,t),e=n;else return Be.get(ci)}else{const{name:n}=s;Be.set(n,s),e=n}return e&&(ci=e),Be.get(e)||Be.get(ci)}let gb=0;function sn(s,t={},e=[],n){return{name:String(++gb),tag:s,props:t,children:e,el:n}}function li(s){return sn(s.tagName,go(s),Array.from(s.children).map(t=>li(t)),s)}function En(s,t=document.documentElement){if(s.el)return s.el;if(s.el=s.tag=="path"?tu():document.createElement(s.tag),s.props)for(const e in s.props){const n=s.props[e];e.startsWith("on")?s.el.addEventListener(e.slice(2).toLowerCase(),n):e==="style"?ss(s.el,s.props[e]):Je(s.el,e,n)}return s.children&&(typeof s.children=="string"?s.el.appendChild(document.createTextNode(s.children)):s.children.forEach(e=>{En(e,s.el)})),t.appendChild(s.el),s.el}function ui(s,t){if(!s.el)return;if(s.tag!==t.tag){(s.el.parentElement||document.body).replaceChild(En(t),s.el);return}const e=t.el=s.el,n=s.props,i=t.props;for(const a in n)a in i||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in i){const h=n[a],c=i[a];if(c!=h)if(a.startsWith("on")){const l=a.slice(2).toLowerCase();e.removeEventListener(l,h),e.addEventListener(l,c)}else if(a==="style"){for(const l in h)l in c||po(e,l);ss(e,c)}else Je(e,a,c)}const r=s.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof r=="string")e.innerHTML="",o.forEach(a=>{En(a,e)});else{const a=Math.min(r.length,o.length);for(let h=0;h<a;h++)ui(r[h],o[h]);o.length>r.length&&o.slice(r.length).forEach(h=>{En(h,e)}),o.length<r.length&&r.slice(o.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class yb{state;el;constructor(t,e){this.state=Hi(t,{deep:!0}),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const n=e;[...n.attributes].forEach(a=>{const h=a.name,c=a.value;if(h==="v-model")if(uo(n)){const l=n;Ee(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else if(lo(n)){const l=n;Ee(()=>{l.checked=Oa(this.getStateValue(c),l.value)}),l.addEventListener("change",u=>{const d=u.target,f=d.value;d.checked?Sf(this.getStateValue(c),f):za(this.getStateValue(c),f)})}else if(co(n)){const l=n;Ee(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",u=>{this.setStateValue(c,u.target.value)})}else{const l=n;Ee(()=>{l.value=this.getStateValue(c)});const u=d=>{this.setStateValue(c,d.target.value)};l.addEventListener("input",u)}else h==="v-text"?Ee(()=>{n.innerText=this.getStateValue(c)}):h==="v-html"&&Ee(()=>{n.innerHTML=this.getStateValue(c)})}),n.childNodes.length>0&&this.compile(n);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,o=r.exec(i);o&&o[1]&&Ee(()=>{e.textContent=i.replace(r,this.getStateValue(o[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(n=>{e=e[n]}),e}setStateValue(t,e){let n=this.state;const i=t.split("."),r=i.length;for(let o=0;o<r-1;o++)n=n[i[o]];n[i[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
55
- let output = "";
56
- function echo(html){
57
- output += html;
58
- }
59
- ${t}
60
- return output;
61
- })`}}function Tu(s,t,e){return new WebSocket(s)}function wb(s){return`${s}eventbus/${Mn(3,"number")}/${Mn(8)}/websocket`}class ae{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=ae.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||Tu,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=ae.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===ae.CONNECTING||this.socket?.readyState===ae.OPEN||(this.state=ae.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{ie(`(${this.url}) onopen`),this.state=ae.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:n,wasClean:i}=t;ie(`(${this.url}) onclose: code(${e}) reason(${n}) wasClean(${i})`),this.state=ae.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),Ya(this.reconnectAttempts++)))},this.socket.onerror=t=>{ie(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(ie(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const n=t.data.substring(1);try{e=JSON.parse(n)}catch(i){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:i.toString(),message:n})]}e.forEach(i=>{const r=JSON.parse(i);if(r.body&&Object.prototype.hasOwnProperty.call(r.body,"requestid")){const o=this.waitings[r.body.requestid];o?o.resolve?.(r.body):ws(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[r.address]){const o=this.listeners[r.address];for(let a=0;a<o.length;a++)r.type==="err"?o[a]({failureCode:r.failureCode,failureType:r.failureType,message:r.message}):o[a](null,r.body)}else this.onunhandled(r)})}else t.data instanceof ArrayBuffer?ws(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&ws(`(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===ae.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,n={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:cn(n,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,n={}){const i=this.listeners[t];if(i){const r=i.indexOf(e);r!=-1&&(i.splice(r,1),i.length===0&&(this._send({type:"unregister",address:t,headers:cn(n,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,n={}){this._send({type:"publish",address:t,headers:cn(n,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,n={},i=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,h)=>{r.resolve=a,this._send({type:"send",address:t,headers:cn(n,this.socketCreatorOptions.headers,!1),body:{requestid:r.requestid,...e}}),setTimeout(()=>{h(`(${this.url}) send(${r.requestid}: ${Xe(e)}) Timeout!`)},i)});return delete this.waitings[r.requestid],o}}function fi(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(s)?t="iOS":/android/i.test(s)?t="Android":/BlackBerry/i.test(s)?t="BlackBerry":/mac/i.test(s)?t="macOS":/win/i.test(s)?t="Windows":/linux/i.test(s)?t="Linux":/bsd/i.test(s)&&(t="BSD"),t.toLowerCase()}function bb(s=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(s)){const e=s.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(s)){const e=s.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(s)){const e=s.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(s)){const e=s.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function di(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(s)||/opera/i.test(s)?t="Opera":/chrome/i.test(s)?t="Chrome":/firefox/i.test(s)?t="Firefox":/safari/i.test(s)?t="Safari":/edge/i.test(s)?t="Edge":/msie|trident/i.test(s)?t="IE":/MicroMessenger/i.test(s)?t="Wechat":/alipay/i.test(s)&&(t="Ali"),t.toLowerCase()}function xb(){const s=navigator.userAgent;let t="Unknown";if(/Chrome/.test(s)){const e=s.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(s)){const e=s.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(s)){const e=s.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(s)){const e=s.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(s)){const e=s.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t}function vb(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Sb(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function _b(){return di()=="safari"}function aa(){return fi()==="ios"}function Au(){return fi()==="macos"}function Cb(){return aa()|Au()}function Mu(){return fi()==="android"}function Eb(){const s=window.navigator.appVersion;if(/Android/.test(s)&&!/Chrome\/\d/.test(s)){const t=s.match(/Safari\/(\d+.\d)/);return t&&typeof t=="object"&&t.length>=2?parseFloat(t[1])<535.19:!0}else return!1}function Pb(){return aa()||Mu()}function Iu(){const s=window.navigator.userAgent,t=s.indexOf("MSIE ");if(t>0)return parseInt(s.substring(t+5,s.indexOf(".",t)),10);if(s.indexOf("Trident/")>0){const i=s.indexOf("rv:");return parseInt(s.substring(i+3,s.indexOf(".",i)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const Tb=Iu()!==-1,Ab=document.documentMode?document.documentMode===9:!1,Mb=document.documentMode?document.documentMode===10:!1,Ib=document.documentMode?document.documentMode===11:!1;function ku(){return di()==="wechat"}function Du(){return di()==="ali"}function kb(){return ku()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Db(){return Du()&&navigator.userAgent.match(/miniprogram/i)}function Lb(s=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const i=function(){t.style.height=window.innerHeight+"px";const r=t.clientWidth;t.dataset.width=r,t.dataset.layout=r>s?"pc":"mobile",t.dataset.rem=n=Math.min(100,Math.round(100*(r/s))),t.style.fontSize=n+"px"};i(),window.rem2px=function(r){return parseFloat(r)*n},window.px2rem=function(r){return parseFloat(r)/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}class Rb extends Io{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=ko(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),ca(this.currentItem.style,this.currentItem,la)}switch(this.processAttrs(e,n),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&ca(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+ha(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(la.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&ca(o,this.currentItem,la),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function ha(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return ha(s,t,i,r)-ha(e,n,i,r)}function ca(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const la=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class Ob{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new os(t),this.remoteVideoUtil=new os(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(n=>{this.localVideoUtil.setSrcObject(n),t(n)}).catch(n=>{this.trace(`navigator.getUserMedia error: ${n}.`),e(n)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),n=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),n.length>0&&this.trace(`Using audio device: ${n[0].label}.`);const i=void 0,r=new RTCPeerConnection(i);this.localPeerConnection=r,this.trace("Created local peer connection object localPeerConnection."),r.addEventListener("icecandidate",this.handleConnection),r.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(i);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(n[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,n=t.candidate;if(e&&n){const i=new RTCIceCandidate(n),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
140
+ `))}WS();function qS(){return Lh(document.documentElement).pipe(za(ka),kt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function JS(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new Rt(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((r,s)=>{navigator.geolocation.getCurrentPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude}),r()},i=>{s(i)})}).then(()=>{e=navigator.geolocation.watchPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude})},r=>{t.error(r)},n)}).catch(r=>{t.error(r)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function ip(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(r=>typeof r!="boolean")}:n(t)}function mo(n){const t=ip(n.tagName,Ca(n),Array.from(n.children).map(e=>mo(e)));return t.el=n,t}function un(n,t=document.documentElement){if(typeof n=="string"){const r=document.createTextNode(n);return t.appendChild(r),r}if(n.el)return n.el;const e=n.tag=="path"?Za():document.createElement(n.tag);if(n.props)for(const[r,s]of Object.entries(n.props))r.startsWith("on")?e.addEventListener(r.slice(2).toLowerCase(),s):r==="style"?$r(e,s):jn(e,r,s);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?un(n.children,e):n.children.forEach(r=>{un(r,e)})),e}function _s(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&_s(e,n.el)}),t.removeChild(n.el))}function po(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const r=n.props.key,s=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(s||r)&&s!==r){e.replaceChild(un(t,e),n.el);return}const i=t.el=n.el,o=n.props,a=t.props;for(const u in o)u in a||(u.startsWith("on")?i.removeEventListener(u.slice(2).toLowerCase(),o[u]):i.removeAttribute(u));for(const u in a){const l=o[u],d=a[u];if(d!=l)if(u.startsWith("on")){const f=u.slice(2).toLowerCase();i.removeEventListener(f,l),i.addEventListener(f,d)}else if(u==="style"){for(const f in l)f in d||Ea(i,f);$r(i,d)}else jn(i,u,d)}const c=n.children||[],h=t.children||[];if(typeof h=="string")i.innerHTML="",un(h,i);else if(typeof c=="string")i.innerHTML="",h.forEach(u=>{un(u,i)});else{const u=Math.min(c.length,h.length);for(let l=0;l<u;l++)po(c[l],h[l],i);h.length>c.length?h.slice(c.length).forEach(l=>{un(l,i)}):h.length<c.length&&c.slice(h.length).forEach(l=>{_s(l,i)})}}function op(n=document.documentElement,t,e){t.el?!e||!e.el?(_s(t,n),un(t,n)):po(e,t,n):(e&&_s(e,n),un(t,n))}const go=new Map;function Gh(n,t=go){let e=t.get(n);return e||(e=mo(n),t.set(n,e),e)}function yo(n,t,e=go){const r=Gh(n,e);r.alternate||(r.alternate=mo(n),or(r.alternate.props,r.props,!0)),t(r.alternate)}function cp(n=go){const t=Array.from(n.entries());for(const[e,r]of t){const s=r.alternate;s&&(po(r,s),r.props=s.props,r.alternate=void 0)}}function Xh(n=go){Jg(()=>cp(n),50)}function KS(){const n=new Map;let t=null;const e=new Set;let r=!1;function s(p){const m=t,v=m.stateIndex;v in m.states||(m.states[v]=p);function g(b){let x;typeof b=="function"?x=b(m.states[v]):x=b,m.states[v]!==x&&(m.states[v]=x,u(m))}return m.stateIndex++,[m.states[v],g]}function i(p){const[m,v]=s({current:p});return m}function o(p,m){const v=t,g=v.effectIndex;v.pendingEffects||(v.pendingEffects=[]),v.pendingEffects.push({effect:p,deps:m,idx:g}),v.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:v,idx:g})=>{const b=p.effects[g];if(!v||!b||!b.deps||v.length!==b.deps.length||v.some((w,C)=>w!==b.deps[C])){b.cleanup?.();const w=m();if(w instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[g]={deps:v?[...v]:void 0,cleanup:w}}}),p.pendingEffects=[])}function c(p){const m=i(p);return m.current=p,h((...v)=>m.current(...v),[])}function h(p,m){const v=t,g=v.callbackIndex,b=v.callbacks[g]||{fn:p,deps:void 0};return(!m||!b.deps||m.length!==b.deps.length||m.some((w,C)=>w!==b.deps[C]))&&(b.fn=p,b.deps=m?[...m]:void 0),v.callbacks[g]=b,v.callbackIndex++,b.fn}function u(p){e.add(p),r||(r=!0,setTimeout(l,0))}function l(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{d(m.component,m.container,m.props)})}r=!1}function d(p,m,v={}){let g=n.get(m);!g||g.component!==p?(g={component:p,props:v,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,g)):g.props=v,t=g,g.stateIndex=0,g.effectIndex=0,g.callbackIndex=0;const b=p(v);return op(m,b,g.vnode),g.vnode=b,g.mounted=!0,t=null,a(g),g}function f(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(f),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:s,useRef:i,useEffect:o,useEffectEvent:c,useCallback:h,render:d,unmount:f,scheduleRender:u}}function hp(){let n;function t(d){n=d,d(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(f=>f())}}const r=new WeakMap;function s(d,f){let p=r.get(d);p||(p=new Map,r.set(d,p));let m=p.get(f);return m||(m=new e,p.set(f,m)),m}function i(d,f,p=o){if(!Array.isArray(d))return;const m=Array.prototype,v=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(g=>{v[g]=function(...b){return["push","unshift","splice"].includes(g)&&(g==="splice"?b.slice(2):b).forEach((w,C)=>{Fn(w)&&(b[C]=p(w)),f.add()}),m[g].apply(this,b),this.slice()}}),Object.setPrototypeOf(d,v),d.forEach((g,b)=>{Fn(g)&&(d[b]=p(g)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const p=s(d,f);let m=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return Fn(m)&&(Array.isArray(m)?i(m,p,o):o(m)),p.add(),m},set(v){m!==v&&(m=v,p.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!Fn(d))return d;const f={get(m,v,g){let b=Reflect.get(m,v,g);const x=s(m,v);if(Fn(b)&&!("isYZProxy"in b)){const w=h(b);Array.isArray(b)&&(w.YZProxyArrayDep=x),b=w}return x.add(),b},set(m,v,g,b){const x=Reflect.get(m,v,b),w=Reflect.set(m,v,g,b);if(v=="YZProxyArrayDep")return w;if(x!==g){let C;Array.isArray(m)?C=m.YZProxyArrayDep:C=s(m,v),C.notify()}return w},deleteProperty(m,v){if(!(v in m))return!1;let b=typeof v=="symbol"?void 0:m[v];Fn(b)&&(b=Array.isArray(b)?[...b]:{...b});const x=Reflect.deleteProperty(m,v);if(x){let w;Array.isArray(m)?w=m.YZProxyArrayDep:w=s(m,v),w.notify()}return x},has(m,v){return v==="isYZProxy"||v in m}};return new Proxy(d,f)}function u(d,f){const p=h(d);return l(p,f),p}function l(d,f){f.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const w=x.name,C=x.value;if(w==="v-model")if(Rh(m)){const E=m;t(()=>{E.checked=He(d,C)==E.value}),E.addEventListener("change",O=>{Lo(d,C,O.target.value)})}else if(Ih(m)){const E=m;t(()=>{E.checked=xu(He(d,C),E.value)}),E.addEventListener("change",O=>{const U=O.target,R=U.value;U.checked?Sg(He(d,C),R):_u(He(d,C),R)})}else if(Oh(m)){const E=m;t(()=>{E.value=He(d,C)}),E.addEventListener("change",O=>{Lo(d,C,O.target.value)})}else{const E=m;t(()=>{E.value=He(d,C)});const O=U=>{Lo(d,C,U.target.value)};E.addEventListener("input",O)}else w==="v-text"?t(()=>{m.innerText=He(d,C)}):w==="v-html"&&t(()=>{m.innerHTML=He(d,C)})}),m.childNodes.length>0&&l(d,m);break;case 3:const v=p.textContent||"",g=/\{\{\s*([^{}\s]+)\s*\}\}/g,b=g.exec(v);b&&b[1]&&t(()=>{p.textContent=v.replace(g,He(d,b[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:u}}const ZS=hp();function up(n,t,e){return new WebSocket(n)}function QS(n){return`${n}eventbus/${Vp(3)}/${lu(8)}/websocket`}class Ue{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=Ue.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||up,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=Ue.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===Ue.CONNECTING||this.socket?.readyState===Ue.OPEN||(this.state=Ue.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{gn(`(${this.url}) onopen`),this.state=Ue.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:r,wasClean:s}=t;gn(`(${this.url}) onclose: code(${e}) reason(${r}) wasClean(${s})`),this.state=Ue.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),Ig(this.reconnectAttempts++)))},this.socket.onerror=t=>{gn(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(gn(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const r=t.data.substring(1);try{e=JSON.parse(r)}catch(s){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:s.toString(),message:r})]}e.forEach(s=>{const i=JSON.parse(s);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const o=this.waitings[i.body.requestid];o?o.resolve?.(i.body):_e(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[i.address]){const o=this.listeners[i.address];for(let a=0;a<o.length;a++)i.type==="err"?o[a]({failureCode:i.failureCode,failureType:i.failureType,message:i.message}):o[a](null,i.body)}else this.onunhandled(i)})}else t.data instanceof ArrayBuffer?_e(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&_e(`(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===Ue.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,r={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:or(r,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,r={}){const s=this.listeners[t];if(s){const i=s.indexOf(e);i!=-1&&(s.splice(i,1),s.length===0&&(this._send({type:"unregister",address:t,headers:or(r,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,r={}){this._send({type:"publish",address:t,headers:or(r,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,r={},s=3e4){this.requestid++;const i=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{i.resolve=a,this._send({type:"send",address:t,headers:or(r,this.socketCreatorOptions.headers,!1),body:{requestid:i.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${i.requestid}: ${Us(e)}) Timeout!`)},s)});return delete this.waitings[i.requestid],o}}function tE(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let r=100;const s=function(){t.style.height=window.innerHeight+"px";const i=t.clientWidth;t.dataset.width=i,t.dataset.layout=i>n?"pc":"mobile",t.dataset.rem=r=Math.min(100,Math.round(100*(i/n))),t.style.fontSize=r+"px"};s(),window.rem2px=function(i){return parseFloat(i)*r},window.px2rem=function(i){return parseFloat(i)/r},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",s,!1)}class eE{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new xs(t),this.remoteVideoUtil=new xs(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(r=>{this.localVideoUtil.setSrcObject(r),t(r)}).catch(r=>{this.trace(`navigator.getUserMedia error: ${r}.`),e(r)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),r=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),r.length>0&&this.trace(`Using audio device: ${r[0].label}.`);const s=void 0,i=new RTCPeerConnection(s);this.localPeerConnection=i,this.trace("Created local peer connection object localPeerConnection."),i.addEventListener("icecandidate",this.handleConnection),i.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(s);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),i.addTrack(e[0],t),i.addTrack(r[0],t),this.trace("localPeerConnection createOffer start."),i.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,r=t.candidate;if(e&&r){const s=new RTCIceCandidate(r),i=this.getOtherPeer(e);i&&(i.addIceCandidate(s).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
62
141
  ${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
63
142
  ${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
64
143
  ${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
65
- ${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class zb{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const Lu=[],Ru={};function ua(s){Lu.push(s)}function Nb(s,t=!1){const e=bd();if(Ru[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{Lu.forEach(r=>r())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:i})),Ru[e]=!0}function Bb(s){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[s],success:function(n){n.checkResult[s]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Fb(s){ua(function(){wx.updateAppMessageShareData(s)})}function Yb(s){ua(function(){wx.updateTimelineShareData(s)})}function Xb(s){wx.chooseImage(s)}function Ub(s){wx.previewImage(s)}function $b(s){wx.uploadImage(s)}function Gb(s){wx.downloadImage(s)}function Vb(s){wx.getLocalImgData(s)}function jb(){wx.startRecord()}function qb(s){wx.stopRecord(s)}function Hb(s){wx.onVoiceRecordEnd(s)}function Wb(s){wx.playVoice(s)}function Jb(s){wx.pauseVoice(s)}function Zb(s){wx.stopVoice(s)}function Kb(s){wx.onVoicePlayEnd(s)}function Qb(s){wx.uploadVoice(s)}function t2(s){wx.downloadVoice(s)}function e2(s){wx.translateVoice(s)}function n2(s){wx.getNetworkType(s)}function s2(s){wx.openLocation(s)}function i2(s){wx.getLocation(s)}function r2(s){wx.scanQRCode(s)}function o2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function a2(s,t,e="snsapi_userinfo",n=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${s}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${n}#wechat_redirect`}function h2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function ls(s,t){let e="未知错误";switch(s.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${s.error}(${e}): ${s.errorMessage}`}function c2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let i="未知错误";switch(n.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function l2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(ls(n))}}),function(n){t?.(n.code)})}function u2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(ls(n))}}),function(n){t?.(n)})}function f2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(ls(n))}}),function(){t?.()})}function d2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(ls(n,"chooseImage"))}}),function(n){t?.(n)})}function m2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(ls(n))}}),function(){t?.()})}class p2{map;constructor(t,e=120.619585,n=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),i)}}const Vt=window.crypto.subtle;async function Ou(s,t=An.SHA256){if(!Vt)throw new Error("Crypto API not supported");const e=await Vt.digest(t,zi(s));return Ha(e)}async function g2(s,t=An.SHA256){return Ou(JSON.stringify(Hf(s)),t)}async function y2(s,t=An.AESGCM){if(!Vt)throw new Error("Crypto API not supported");const e=crypto.getRandomValues(new Uint8Array(12)),n=await Vt.generateKey({name:t,length:256},!1,["encrypt","decrypt"]),i=await Vt.encrypt({name:t,iv:e},n,zi(s));return{algorithm:t,iv:e,key:n,encryptedData:i}}async function w2(s){if(!Vt)throw new Error("Crypto API not supported");const t=await Vt.decrypt({name:s.algorithm,iv:s.iv},s.key,s.encryptedData);return Ha(t)}async function b2(s,t=An.ECDSA,e="SHA-384"){if(!Vt)throw new Error("Crypto API not supported");const{privateKey:n,publicKey:i}=await Vt.generateKey({name:t,namedCurve:"P-384"},!1,["sign","verify"]),r=zi(JSON.stringify(s)),o=await Vt.sign({name:t,hash:{name:e}},n,r);return{algorithm:t,hash:e,publicKey:i,signature:o,encodedData:r}}async function x2(s){if(!Vt)throw new Error("Crypto API not supported");return await Vt.verify({name:s.algorithm,hash:{name:s.hash}},s.publicKey,s.signature,s.encodedData)}class v2{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,n){this.currentPage=n?.currentPage||0,this.itemsPerPage=n?.itemsPerPage||10,this.entriesInterval=n?.entriesInterval||5,this.entriesEdge=n?.entriesEdge||1,this.linkTo=n?.linkTo||"javascript:;",this.prevText=n?.prevText||"上一页",this.nextText=n?.nextText||"下一页",this.ellipseText=n?.ellipseText||"...",this.prevShowAlways=typeof n?.prevShowAlways=="boolean"?n?.prevShowAlways:!0,this.nextShowAlways=typeof n?.nextShowAlways=="boolean"?n?.nextShowAlways:!0,this.callback=n?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),En(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return sn("div",{class:"pagination"},[])}appendVNode(t,e,n){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=n?.text||String(e+1),r=n?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?sn("span",{class:`current ${r}`},i):sn("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:o=>this.selectPage(e,o)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),n=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),n>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,n);for(let o=0;o<r;o++)this.appendVNode(t,o);this.entriesEdge<n&&this.ellipseText&&t.children.push(sn("span",{},this.ellipseText))}for(let r=n;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(sn("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let o=r;o<this.totalPages;o++)this.appendVNode(t,o)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),ui(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const n=this.callback(t);return e&&(n||kr(e)),n}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}class S2{static;store;eb;axios;ds;constructor(t={}){this.static=t.static||{};const e=t.store?.state||{};this.store=oh({reducer:t.store?.reducer||(()=>e),initState:e,enhancer:t.store?.enhancer,immutable:typeof t.store?.immutable=="boolean"?t.store?.immutable:!0}),this.eb=new Cs,this.axios=new $h({baseURL:t.axios?.baseURL,timeout:t.axios?.timeout,headers:t.axios?.headers,responseType:t.axios?.responseType,responseEncoding:t.axios?.responseEncoding,interceptor:t.axios?.interceptor,retry:t.axios?.retry,cache:t.axios?.cache}),this.ds=new yd({concurrency:1})}}class _2{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,n,i,r)=>{const o={type:"js_error",msg:t,file:e,row:n,col:i,stack:r?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const n={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(n)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){oo(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(n=>{const[i,r]=n,a=document.elementsFromPoint(i,r)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const n={type:"whitescreen_error",reason:"检测到白屏!"};this.report(n)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:_f()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}return m.ArrowShape=Go,m.BallShape=_n,m.BezierEasing=Fr,m.BufferAttribute=ye,m.COLOR_NAMES=hs,m.CSSToJSEasing=t0,m.Clock=Ur,m.Color=Yt,m.ColorManagement=Yo,m.CommonKeyCode=dw,m.ConfettiShapeCombo=na,m.Context=S2,m.CrossShape=Jo,m.CurveShape=Uo,m.CustomCanvasContext=Zc,m.CustomCanvasGradient=Js,m.CustomCanvasPattern=Jr,m.DOMParse=Io,m.DOMSVGUtil=We,m.DOMToBlob=fr,m.DOMToString=ur,m.DOMVideo=os,m.DrawContext=Yw,m.Easing=O,m.EllipseShape=Zo,m.FileUpload=mp,m.Float32BufferAttribute=gy,m.FoxShape=Ho,m.HeartShape=Vo,m.HeartVariantShape=jo,m.Int16BufferAttribute=fy,m.Int32BufferAttribute=my,m.Int8BufferAttribute=cy,m.Interpolation=pe,m.Key=mw,m.LineShape=nn,m.LinearSRGBColorSpace=Bo,m.LinearToSRGB=en,m.LinearTransfer=Fo,m.Ls=Be,m.MVVM=yb,m.Matrix=xt,m.Matrix2=eo,m.Matrix3=wn,m.Matrix4=Dt,m.NoColorSpace=cu,m.Pagination=v2,m.PointsShape=ai,m.QRCode=De,m.RabbitShape=Wo,m.RectShape=Ne,m.RingIndicatorShapeCombo=ea,m.RingShape=cs,m.SRGBColorSpace=Qe,m.SRGBToLinear=tn,m.SRGBTransfer=oi,m.SVGParse=Rb,m.SVGParsedPathArgsLength=Kn,m.SegmentShapeCombo=Qo,m.Shape=Q,m.ShapeCombo=Rt,m.ShipShapeCombo=Ko,m.SliderShapeCombo=ta,m.StarShape=qo,m.TWEEN=h0,m.TextShape=Cn,m.Timeline=Gn,m.TreeShapeCombo=$o,m.Tween=Xr,m.Uint16BufferAttribute=dy,m.Uint32BufferAttribute=py,m.Uint8BufferAttribute=ly,m.Uint8ClampedBufferAttribute=uy,m.Vector2=Hn,m.Vector3=Bt,m.Vector4=Hr,m.WebGLCoordinateSystem=Qn,m.WebGLRenderer=zb,m.WebGPUCoordinateSystem=to,m.WebMonitor=_2,m.WebRTCClient=Ob,m.WebSocketClient=ae,m.YZCanvasContext=Zr,m.__color=xe,m.addClass=e1,m.addWatermark=U0,m.addWxJsReadyFnBeforeConfig=ua,m.ajax=xl,m.aliJsChooseImage=d2,m.aliJsGetLocation=u2,m.aliJsOpenLocation=f2,m.aliJsPreviewImage=m2,m.aliJsReady=h2,m.aliJsScan=l2,m.aliJsTradePay=c2,m.angle=Nt,m.animate=by,m.animateShapes=Nw,m.animationEnd$=W1,m.animationStart$=H1,m.atomReadAttribute=Cl,m.atomReadAttributes=go,m.atomReadStyle=l1,m.atomReadStyles=mo,m.atomRemoveAttribute=m1,m.atomRemoveDataset=Kw,m.atomRemoveStyle=po,m.atomWriteAttribute=Je,m.atomWriteStyle=ss,m.base64EncodeOutputStream=Uc,m.bitmapMapper=rl,m.blobToImageData=m0,m.byteArrayOutputStream=jr,m.cancelFetch=lb,m.changeBrightness=Y0,m.changeCheckboxChecked=Jy,m.changeDiaphaneity=X0,m.changeRadioChecked=Wy,m.changeSelected=Hy,m.changeSize=F0,m.checkWxJsApi=Bb,m.clearCookies=ob,m.clearLocalStorage=Qw,m.clearSessionStorage=qw,m.closeLog=kf,m.closest=$y,m.computeImageDisplayRect=l0,m.containsChild=Fy,m.createDefaultMousePoint=yo,m.createElement=gl,m.createElementNS=i1,m.createEvent=Gs,m.createFragment=pl,m.createFromEventPattern=Dg,m.createIndexDB=hb,m.createObjectURL=ol,m.createRunCycleInMaxRate=$g,m.createTextNode=r1,m.createWebSocket=Tu,m.createXMLHttpRequest=bl,m.cssAttrsToCanvasAttrs=El,m.decrypt=w2,m.dispatchClickFromEvent=Yg,m.dispatchEvent=Dr,m.dispatchEventFromEvent=Fg,m.distance=Le,m.domPrefixes=io,m.drag$=Ll,m.dragEnd$=Ol,m.dragEnter$=Nl,m.dragLeave$=Bl,m.dragOver$=Fl,m.dragStart$=Rl,m.drawBitmapInCanvas=wy,m.drawQRCodeToCanvas=q0,m.drop$=zl,m.easeNameToCubicBezier=Yr,m.empty=fl,m.encrypt=y2,m.flipSideToSide=g0,m.flipUpsideDown=y0,m.followMouseShape=Ow,m.getBitmapFromCanvas=yy,m.getBrowserClient=di,m.getBrowserClientVersion=xb,m.getBrowserLanguage=vb,m.getCSSVar=sb,m.getDOMMatrix=so,m.getDirection=W0,m.getDocumentElement=Sn,m.getElementPositionInPage=Co,m.getElementPositionInPage2=aw,m.getElementPositionInViewport=_o,m.getEmSize=Oy,m.getEventCurrentTarget=Mg,m.getFetchId=ra,m.getFileExtension=fp,m.getFileMD5Hash=Wh,m.getFileTypeFromFile=up,m.getFormSubmitData=h1,m.getImageData=Fc,m.getImageDataByAIData=G0,m.getImageMainColor=p0,m.getInnerText=Ky,m.getInternetExplorerVersion=Iu,m.getKeyCode=pw,m.getMIME=dp,m.getMouseButton=fw,m.getMousePositionInElement=dt,m.getMousePositionInPage=Eo,m.getMousePositionInViewport=lw,m.getOperatingSystem=fi,m.getOperatingSystemVersion=bb,m.getPage=rw,m.getRelativeBoundingClientRect=ow,m.getRemSize=ao,m.getRules=d1,m.getScrollWheelDelta=uw,m.getSelectedText=Py,m.getStyle=ns,m.getStyleSheets=_l,m.getTheme$=nb,m.getTimeZone=Sb,m.getVerticalScrollTopPercentInPage=hw,m.getVertxRegisterBaseUrl=wb,m.getViewport=So,m.getVnode=$r,m.getWindow=iw,m.gifImage=$c,m.h=sn,m.hFromEl=li,m.hasClass=s1,m.hideEl=ml,m.html=ul,m.iframePostMessage=o1,m.imageDataToBitmap=u0,m.imageDataToBlob=d0,m.imageDataToDataURL=f0,m.injectStyle=Sl,m.injectWxJsConfig=Nb,m.insert=xn,m.isActiveEl=Ly,m.isAliBrowser=Du,m.isAliMiniProgram=Db,m.isAndroid=Mu,m.isAppleDevice=Cb,m.isBadAndroid=Eb,m.isBrowserSupportFileAPI=hp,m.isElement=xy,m.isIE=Tb,m.isIE10=Mb,m.isIE11=Ib,m.isIE9=Ab,m.isIOS=aa,m.isInViewport=cw,m.isInput=es,m.isInputCheckbox=lo,m.isInputNumber=qy,m.isInputRadio=uo,m.isInputText=jy,m.isMacOS=Au,m.isMobile=Pb,m.isRootEl=Dy,m.isSafari=_b,m.isSelect=co,m.isSupportEvent=y1,m.isSupportPointer=g1,m.isSupportTouch=p1,m.isTextArea=Vy,m.isWxBrowser=ku,m.isWxMiniProgram=kb,m.jpgToPng=O0,m.keyDown$=Yl,m.keyPress$=J1,m.keyUp$=Xl,m.leftRotate=w0,m.length=yn,m.mapTDTJSSDK=p2,m.marginSharpen=R0,m.mosaic=$0,m.mount=En,m.mouseClick$=S1,m.mouseContextMenu$=E1,m.mouseDoubleClick$=_1,m.mouseDown$=Pl,m.mouseEnter$=x1,m.mouseLeave$=v1,m.mouseMove$=ei,m.mouseOut$=b1,m.mouseOver$=w1,m.mouseUp$=Tl,m.mouseWheel$=C1,m.nearestElement=zy,m.nextElementSibling=Xy,m.normalizePoint=H0,m.objectSignature=g2,m.onBeforeUnload=al,m.onDocumentReady=oo,m.openLog=If,m.outputGifBase64=Gc,m.outputQRCodeBase64=j0,m.pan$=P1,m.panCancel$=I1,m.panDown$=R1,m.panEnd$=M1,m.panLeft$=k1,m.panMove$=T1,m.panRight$=D1,m.panStart$=A1,m.panUp$=L1,m.parent=Ny,m.parents=ho,m.parseCSS=ko,m.parseTransformToMatrix=il,m.patch=ui,m.pinch$=O1,m.pinchIn$=z1,m.pinchOut$=N1,m.pngToJpg=z0,m.pointerCancel$=vo,m.pointerDown$=bo,m.pointerMove$=wo,m.pointerUp$=xo,m.polar=Re,m.polymorphTween=Fw,m.press$=B1,m.preventDefault=Me,m.previousElementSibling=Uy,m.querySelectorAllToStringArray=cp,m.radiusClip=B0,m.readFileInBrowser=Nn,m.readStyleFromStyles=c1,m.rectClip=N0,m.rem2px=Ry,m.remove=Qy,m.removeAllEventListeners=kg,m.removeClass=n1,m.requestAnimationFrameCycle=Lr,m.reverseCSSToJSEasing=e0,m.reverseEaseNameToCubicBezier=zc,m.reverseEasing=kc,m.revokeObjectURL=vy,m.rightRotate=b0,m.rotate$=F1,m.rotatePoint=Qt,m.runInSandbox=a1,m.scheduleIdle=Tc,m.scheduleIdleAsap=Ic,m.scheduleVnodeAsap=Gr,m.scheduleVnodeImmediately=c0,m.scrollParent=By,m.scrollTo=Iy,m.selectFileInBrowser=dr,m.setCSSVar=ib,m.setIntervalAccurate=Ug,m.setLogUploadFn=Df,m.setManualScroll=ky,m.setRem=Lb,m.setStyle=vn,m.setTheme=Pu,m.setTimeoutAccurate=Rr,m.setWindowTitle=Ty,m.shadowRoot=Gy,m.sharpen=L0,m.showEl=dl,m.siblings=Yy,m.signEncrypt=b2,m.signature=Ou,m.simulateEventFromTouch=Xg,m.stopPropagation=kr,m.storage$=sw,m.stringToDOM=lp,m.swipe$=Y1,m.swipeDown$=G1,m.swipeLeft$=X1,m.swipeRight$=U1,m.swipeUp$=$1,m.tap$=Dl,m.tapOutSide$=V1,m.targetToAfterDropShape=zw,m.text=Zy,m.toBlackAndWhite=S0,m.toBlue=P0,m.toBlueAndGreen=M0,m.toBlueAndGrey=D0,m.toDegree=yt,m.toGreen=E0,m.toGreenAndGrey=k0,m.toGrey=x0,m.toGrey2=v0,m.toOpposite=_0,m.toRadian=j,m.toRed=C0,m.toRedAndBlue=A0,m.toRedAndGreen=T0,m.toRedAndGrey=I0,m.toggleClass=fo,m.toggleElDisplay=t1,m.toggleTheme=eb,m.touchCancel$=kl,m.touchEnd$=Il,m.touchMove$=Al,m.touchStart$=Ml,m.transform=ro,m.transformPath2D=hy,m.transitionEnd$=q1,m.transitionStart$=j1,m.updateVnode=Hs,m.useAttribute=we,m.useClickA=ti,m.useClipboard=My,m.useCompatableDownMovePoint$=K1,m.useCookie=rb,m.useCoords$=jw,m.useDataset=Zw,m.useDocumentVisible$=nw,m.useDraggable=tw,m.useDrop=ew,m.useElementEventBus=xw,m.useEvent$=X,m.useEventListener=W,m.useFeRoute=Jw,m.useFetch=hi,m.useFetchCache=fb,m.useFetchRetry=ub,m.useFetchRetryCache=db,m.useHashChange$=Ww,m.useHotKeyDown$=ql,m.useHotKeyFile=yw,m.useHotKeyFile$=Hl,m.useHotKeyUp$=gw,m.useIntersection$=gu,m.useLoadImage=cl,m.useLoadLink=_y,m.useLoadScript=Sy,m.useLocalStorage=vu,m.useLocale=oa,m.useLocation$=bu,m.useMatchMedia$=wu,m.useMouseAndPointerDownMovePoint$=Gl,m.useMouseDownMovePoint$=Ul,m.useMouseMovePoint$=Z1,m.useMousePoint=Ze,m.useMutation$=pu,m.useParentEventListener=Ig,m.usePointerDownMovePoint$=ni,m.usePopStateChange$=xu,m.usePressDownMove=Jl,m.usePressDownMoveWithMouse=vw,m.usePressDownMoveWithPointer=Zl,m.usePressDownMoveWithTouch=Sw,m.usePull$=Q1,m.useResize=Wl,m.useResize$=Po,m.useSafeArea$=Vw,m.useScroll$=Vl,m.useSelectFile=ll,m.useSelectFileImage=Ey,m.useSessionStorage=sa,m.useTouchDownMovePoint$=$l,m.useUrlChange$=Hw,m.useVisible$=$w,m.useVisibleSimple$=Uw,m.useWindowResize$=ww,m.verifyDecrypt=x2,m.vibrate=Ay,m.waitElementAddedInDOM=Xw,m.waitForStyleSheetsLoaded=Cy,m.writeToIndexDB=cb,m.wxJsChooseImage=Xb,m.wxJsDownloadImage=Gb,m.wxJsDownloadVoice=t2,m.wxJsGetLocalImgData=Vb,m.wxJsGetLocation=i2,m.wxJsGetNetworkType=n2,m.wxJsLogin=a2,m.wxJsOnVoicePlayEnd=Kb,m.wxJsOnVoiceRecordEnd=Hb,m.wxJsOpenLocation=s2,m.wxJsPauseVoice=Jb,m.wxJsPay=o2,m.wxJsPlayVoice=Wb,m.wxJsPreviewImage=Ub,m.wxJsScanQRCode=r2,m.wxJsStartRecord=jb,m.wxJsStopRecord=qb,m.wxJsStopVoice=Zb,m.wxJsTranslateVoice=e2,m.wxJsUpdateAppMessageShareData=Fb,m.wxJsUpdateTimelineShareData=Yb,m.wxJsUploadImage=$b,m.wxJsUploadVoice=Qb,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),m}({});
144
+ ${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const r=this.getPeerName(t);this.trace(`${r} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const r=document.createElement("div");r.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(r)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class nE{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const lp=[],fp={};function Hh(n){lp.push(n)}function rE(n,t=!1){const e=S0();if(fp[e])return;wx.error(i=>{console.log(i.errMsg||JSON.stringify(i))}),wx.ready(()=>{lp.forEach(i=>i())});const r=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],s=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:r,openTagList:s})),fp[e]=!0}function sE(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(r){r.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function iE(n){Hh(function(){wx.updateAppMessageShareData(n)})}function oE(n){Hh(function(){wx.updateTimelineShareData(n)})}function aE(n){wx.chooseImage(n)}function cE(n){wx.previewImage(n)}function hE(n){wx.uploadImage(n)}function uE(n){wx.downloadImage(n)}function lE(n){wx.getLocalImgData(n)}function fE(){wx.startRecord()}function dE(n){wx.stopRecord(n)}function mE(n){wx.onVoiceRecordEnd(n)}function pE(n){wx.playVoice(n)}function gE(n){wx.pauseVoice(n)}function yE(n){wx.stopVoice(n)}function bE(n){wx.onVoicePlayEnd(n)}function wE(n){wx.uploadVoice(n)}function vE(n){wx.downloadVoice(n)}function xE(n){wx.translateVoice(n)}function _E(n){wx.getNetworkType(n)}function SE(n){wx.openLocation(n)}function EE(n){wx.getLocation(n)}function CE(n){wx.scanQRCode(n)}function TE(n,t,e){function r(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(s){s.err_msg=="get_brand_wcpay_request:ok"?t():e(s.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",r,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",r),document.attachEvent("onWeixinJSBridgeReady",r)):r()}function PE(n,t,e="snsapi_userinfo",r=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${r}#wechat_redirect`}function AE(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function Ss(n,t){let e="未知错误";switch(n.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${n.error}(${e}): ${n.errorMessage}`}function ME(n,t,e){ap.tradePay(Object.assign(n,{}),function(r){let s="未知错误";switch(r.resultCode){case 9e3:return s="订单支付成功",t?.(s);case 8e3:s="正在处理中";break;case 4e3:s="订单支付失败";break;case 6001:s="用户中途取消";break;case 6002:s="网络连接出错";break;case 99:s="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(s)})}function DE(n,t,e){ap.scan(Object.assign(n,{fail:r=>{e?.(Ss(r))}}),function(r){t?.(r.code)})}function OE(n,t,e){ap.getLocation(Object.assign(n,{fail:r=>{e?.(Ss(r))}}),function(r){t?.(r)})}function IE(n,t,e){ap.openLocation(Object.assign(n,{fail:r=>{e?.(Ss(r))}}),function(){t?.()})}function RE(n,t,e){ap.chooseImage(Object.assign(n,{fail:r=>{e?.(Ss(r,"chooseImage"))}}),function(r){t?.(r)})}function kE(n,t,e){ap.previewImage(Object.assign(n,{fail:r=>{e?.(Ss(r))}}),function(){t?.()})}class LE{map;constructor(t,e=120.619585,r=31.299379,s=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,r),s)}}class NE{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,r,s,i)=>{const o={type:"js_error",msg:t,file:e,row:r,col:s,stack:i?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const r={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(r)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){Ph(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(r=>{const[s,i]=r,a=document.elementsFromPoint(s,i)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const r={type:"whitescreen_error",reason:"检测到白屏!"};this.report(r)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:Eg()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function dp(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function mp(){const e=(await(await fetch(`/index.html?t=${Date.now()}`,{cache:"no-store"})).text()).match(/<meta\s+name=["']app-version["']\s+content=["']([^"']+)["']/);return e?e[1]:null}function pp(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function zE(){try{const n=dp(),t=await mp();n&&t&&n!==t&&pp()}catch(n){console.error("版本检测失败:",n)}}function FE(n){const t=n?.message||n?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function BE(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function gp(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=oi(r(),t);return a().value},set:a=>{const{set:c}=oi(r(),t),h=c(a);s(h)}}}function $E(){window.localStorage.clear()}function UE(n,t){let e=t?.value||"";if(!e){const i=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();i&&(e=decodeURIComponent(i))}const r=()=>e,s=i=>{if(e=i,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",c=t?.secure==!0?"; secure":"";let h=n+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const u="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=u}document.cookie=h}};return s(e),{get:r,set:s}}function YE(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const r=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=r+"/";s.length>0;)document.cookie=r+s.join("/"),s.pop();e.shift()}}}function jE(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function VE(n,t=1,e){return new Promise((r,s)=>{let i;const o=window.indexedDB.open(n,t);o.onerror=()=>{s("无法使用IndexDB!")},o.onsuccess=a=>{i=a.target.result,jE(i,e),r(i)}})}function GE(n,t,e={id:1,name:"xxx"}){return new Promise((r,s)=>{const i=n.transaction([t],"readwrite");i.objectStore(t).add(e),i.oncomplete=a=>{r(a)},i.onerror=a=>{s(a)}})}const XE=["dark","light"],{get:yp,set:bp}=gp("theme"),wp=new Ze,HE=wp.pipe(Xn(void 0));function vp(n){switch(n){case"dark":document.documentElement.classList.add("dark"),jn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),jn(document.documentElement,"data-theme","light");break}}function xp(n){return bp(n),vp(n),wp.next(n),n}function WE(){return xp(yp()=="dark"?"light":"dark")}function qE(){return mb([HE,rp("(prefers-color-scheme: dark)")]).pipe(kt(([n,t])=>n||(n=yp(),n||(n=t?"dark":"light",bp(n)),vp(n),n)))}function nt(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function JE(n,t){document.documentElement.style.setProperty(n,t)}function KE(n){return{backgroundCommon:nt("--yz-background-common","#ffffff"),backgroundBorderCommon:nt("--yz-background-border-common","#e6e6e6"),panelCommon:nt("--yz-panel-common","#f5f5f5"),panelBorderCommon:nt("--yz-panel-border-common","#b3b3b3"),gapCommon:nt("--yz-gap-common","#cccccc"),placeholderCommon:nt("--yz-placeholder-common","#8f8f8f"),fontCommon:nt("--yz-font-common","#333333"),fontSecondaryCommon:nt("--yz-font-secondary-common","#666666"),fontTertiaryCommon:nt("--yz-font-tertiary-common","#999999"),backgroundReverse:nt("--yz-background-reverse","#ffffff"),backgroundBorderReverse:nt("--yz-background-border-reverse","#e6e6e6"),panelReverse:nt("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:nt("--yz-panel-border-reverse","#b3b3b3"),gapReverse:nt("--yz-gap-reverse","#cccccc"),placeholderReverse:nt("--yz-placeholder-reverse","#8f8f8f"),fontReverse:nt("--yz-font-reverse","#333333"),fontSecondaryReverse:nt("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:nt("--yz-font-tertiary-reverse","#999999"),blueCommon:nt("--yz-xg-blue","#5a82f0"),bluePanelCommon:nt("--yz-xg-blue-panel","#e6f0ff"),bluePanelBorderCommon:nt("--yz-xg-blue-panel-border","#a0b4f0"),blueGradientCommon:nt("--yz-xg-blue-gradient","#66b3ff"),redCommon:nt("--yz-xg-red","#fa503c"),redPanelCommon:nt("--yz-xg-red-panel","#fff5f5"),redPanelBorderCommon:nt("--yz-xg-red-panel-border","#fac8c8"),redGradientCommon:nt("--yz-xg-red-gradient","#fa8c78"),greenCommon:nt("--yz-xg-green","#00be5a"),greenGradientCommon:nt("--yz-xg-green-gradient","#00e678"),yellowCommon:nt("--yz-xg-yellow","#fa8c00"),yellowGradientCommon:nt("--yz-xg-yellow-gradient","#ffb400"),newenergyCommon:nt("--yz-xg-newenergy","#64c896"),newenergyPanelCommon:nt("--yz-xg-newenergy-panel","#ebfaf2"),primaryPattern:nt(`--yz-pattern-${n}-primary`,"#5a82f0"),secondaryPattern:nt(`--yz-pattern-${n}-secondary`,"#e6f0ff"),gradientPattern:nt(`--yz-pattern-${n}-gradient`,"#66b3ff"),backgroundPattern:nt(`--yz-pattern-${n}-background`,"#ffffff"),backgroundBorderPattern:nt(`--yz-pattern-${n}-background-border`,"#e6e6e6"),panelPattern:nt(`--yz-pattern-${n}-panel`,"#f5f5f5"),panelBorderPattern:nt(`--yz-pattern-${n}-panel-border`,"#b3b3b3"),gapPattern:nt(`--yz-pattern-${n}-gap`,"#cccccc"),placeholderPattern:nt(`--yz-pattern-${n}-placeholder`,"#8f8f8f"),fontPattern:nt(`--yz-pattern-${n}-font`,"#333333"),fontSecondaryPattern:nt(`--yz-pattern-${n}-font-secondary`,"#666666"),fontTertiaryPattern:nt(`--yz-pattern-${n}-font-tertiary`,"#999999")}}return y.ArrowShape=oh,y.BallShape=Sr,y.BezierEasing=nc,y.CSSToJSEasing=ev,y.Clock=ic,y.CommonKeyCode=IS,y.ConfettiShapeCombo=bh,y.CrossShape=fh,y.CurveShape=sh,y.CustomCanvasContext=Tf,y.CustomCanvasGradient=yi,y.CustomCanvasPattern=qa,y.DOMParse=Qd,y.DOMVideo=xs,y.DrawContext=Dx,y.Easing=G,y.EllipseShape=dh,y.FileUpload=m1,y.FoxShape=uh,y.HeartShape=ah,y.HeartVariantShape=ch,y.Interpolation=en,y.LineShape=tr,y.Ls=Rn,y.Matrix=qt,y.Matrix2=xh,y.Matrix3=ho,y.Matrix4=de,y.PointsShape=oo,y.QRCode=_n,y.RabbitShape=lh,y.RectShape=In,y.RingIndicatorShapeCombo=yh,y.RingShape=bs,y.SVGParse=rm,y.SVGParsedPathArgsLength=Jr,y.SVGPathDataToD=tc,y.SegmentShapeCombo=ph,y.Shape=Nt,y.ShapeCombo=fe,y.ShipShapeCombo=mh,y.SliderShapeCombo=gh,y.StarShape=hh,y.THEME=XE,y.TWEEN=hv,y.TextShape=Er,y.Timeline=Qr,y.TreeShapeCombo=ih,y.Tween=sc,y.Vector2=pi,y.Vector3=Be,y.Vector4=Ha,y.WebGLCoordinateSystem=ws,y.WebGLRenderer=nE,y.WebGPUCoordinateSystem=vh,y.WebMonitor=NE,y.WebRTCClient=eE,y.WebSocketClient=Ue,y.YZCanvasContext=Ja,y.a2c=bi,y.a2c2=Af,y.absolutizeSVGPath=vi,y.addClass=v_,y.addWatermark=Cw,y.addWxJsReadyFnBeforeConfig=Hh,y.ajax=Il,y.aliJsChooseImage=RE,y.aliJsGetLocation=OE,y.aliJsOpenLocation=IE,y.aliJsPreviewImage=kE,y.aliJsReady=AE,y.aliJsScan=DE,y.aliJsTradePay=ME,y.angle=ge,y.animate=Fx,y.animateShapes=Px,y.animationEnd$=uS,y.animationStart$=hS,y.applyMiddleware=N2,y.atomReadAttribute=Nl,y.atomReadAttributes=Ca,y.atomReadStyle=y1,y.atomReadStyles=Sa,y.atomRemoveAttribute=x1,y.atomRemoveDataset=US,y.atomRemoveStyle=Ea,y.atomWriteAttribute=jn,y.atomWriteStyle=$r,y.attribute=yn,y.base64EncodeOutputStream=bf,y.bitmapMapper=fm,y.blobToImageData=Kb,y.byteArrayOutputStream=Xa,y.catmullRom2bezier=jw,y.changeBrightness=Sw,y.changeCheckboxChecked=p_,y.changeDiaphaneity=Ew,y.changeRadioChecked=m_,y.changeSelected=d_,y.changeSize=_w,y.checkVersion=zE,y.checkWxJsApi=sE,y.clearCookies=YE,y.clearLocalStorage=$E,y.clearSessionStorage=VS,y.clickA=Ah,y.clipboard=Wx,y.closeLog=Au,y.closest=c_,y.combineEpics=F2,y.combineReducers=L2,y.compatableDownMovePoint$=wS,y.compileTemplate=P_,y.computeImageDisplayRect=Hb,y.containsChild=s_,y.coords$=JS,y.createCookie=UE,y.createDefaultMousePoint=Nh,y.createDraggable=xS,y.createDrop=_S,y.createElement=Sm,y.createElementEventBus=zS,y.createElementNS=S_,y.createEpicMiddleware=z2,y.createEvent=mi,y.createEventListener=_t,y.createEventListener$=Q,y.createFeRoute=HS,y.createFragment=_m,y.createFromEventPattern$=zb,y.createIndexDB=VE,y.createLocalStorage=gp,y.createMiniReact=KS,y.createMiniVue=hp,y.createMousePoint=er,y.createObjectURL=dm,y.createOnlineStatus$=yS,y.createParentEventListener=Lb,y.createReactAppStoreContext=J2,y.createReduxStore=Pd,y.createSVGElement=Tn,y.createSessionStorage=Vh,y.createStorage$=gS,y.createSvgPath=Za,y.createTextNode=E_,y.createThunkMiddleware=$2,y.createVueAppStoreContext=yx,y.createWebSocket=up,y.createXMLHttpRequest=Ol,y.cssAttrsToCanvasAttrs=zl,y.dataset=$S,y.dispatchClickFromEvent=Gb,y.dispatchEvent=Va,y.dispatchEventFromEvent=Vb,y.distance=Sn,y.documentVisible$=pS,y.domPrefixes=Ch,y.domToBlob=Al,y.domToString=xa,y.downloadFromSVGElement=Df,y.downloadFromSVGString=$w,y.drag$=Lm,y.dragEnd$=zm,y.dragEnter$=Bm,y.dragLeave$=$m,y.dragOver$=Um,y.dragStart$=Nm,y.drawBitmapInCanvas=zx,y.drawQRCodeToCanvas=Dw,y.drop$=Fm,y.easeNameToCubicBezier=rc,y.elValueChange$=fS,y.empty=wm,y.exceptionLoggerMiddleware=Y2,y.executeTimeLoggerMiddleware=j2,y.fetchLatestVersionFromHtml=mp,y.flipSideToSide=Qb,y.flipUpsideDown=tw,y.followMouseShape=Cx,y.formSubmit$=dS,y.getBitmapFromCanvas=Nx,y.getCSSVar=nt,y.getCurrentVersion=dp,y.getDOMMatrix=Eh,y.getDirection=Iw,y.getDocumentElement=Tr,y.getElementPositionInPage=Yh,y.getElementPositionInPage2=TS,y.getElementPositionInViewport=Uh,y.getEmSize=t_,y.getEventCurrentTarget=kb,y.getFileMD5Hash=Dl,y.getFileMimeFromFileInBrowser=d1,y.getFormSubmitData=p1,y.getImageData=pf,y.getImageDataByAIData=Pw,y.getImageMainColor=Zb,y.getInnerText=y_,y.getKeyCode=RS,y.getMouseButton=OS,y.getMousePositionInElement=Yt,y.getMousePositionInPage=jh,y.getMousePositionInViewport=MS,y.getPage=ES,y.getRelativeBoundingClientRect=CS,y.getRemSize=Mh,y.getRules=v1,y.getSVGRawStringFromElement=Uw,y.getScrollWheelDelta=DS,y.getSelectedText=Gx,y.getStyle=Br,y.getStyleSheets=Ll,y.getTheme$=qE,y.getThemeColors=KE,y.getVNode=Gh,y.getVerticalScrollTopPercentInPage=PS,y.getVertxRegisterBaseUrl=QS,y.getViewport=Hm,y.getWindow=SS,y.gifImage=wf,y.h=ip,y.hFromEl=mo,y.handleChunkLoadError=BE,y.hasClass=__,y.hashChange$=XS,y.hideEl=xm,y.hotKeyDown$=qm,y.hotKeyFile=LS,y.hotKeyFile$=Jm,y.hotKeyUp$=kS,y.html=bm,y.iframePostMessage=C_,y.imageDataToBitmap=Wb,y.imageDataToBlob=Jb,y.imageDataToDataURL=qb,y.injectStyle=kl,y.injectWxJsConfig=rE,y.insert=Cr,y.intersection$=tp,y.isActiveEl=Zx,y.isChunkLoadError=FE,y.isElement=Bx,y.isInViewport=AS,y.isInput=vs,y.isInputCheckbox=Ih,y.isInputNumber=f_,y.isInputRadio=Rh,y.isInputText=l_,y.isRootEl=Kx,y.isSVGElementPath=Mf,y.isSVGPath=Qa,y.isSelect=Oh,y.isSupportEvent=I_,y.isSupportPointer=O_,y.isSupportTouch=D_,y.isTextArea=u_,y.jpgToPng=bw,y.keyDown$=Ym,y.keyPress$=lS,y.keyUp$=jm,y.l2c=Wn,y.leftRotate=ew,y.length=gr,y.loadImage=gm,y.loadLink=Yx,y.loadScript=Ux,y.location$=ep,y.longhandSVGPath=Gw,y.mapTDTJSSDK=LE,y.marginSharpen=yw,y.matchMedia$=rp,y.miniVue=ZS,y.mosaic=Tw,y.mountVNode=un,y.mouseAndPointerDownMovePoint$=Xm,y.mouseClick$=z_,y.mouseContextMenu$=$_,y.mouseDoubleClick$=F_,y.mouseDown$=Am,y.mouseDownMovePoint$=Vm,y.mouseEnter$=L_,y.mouseLeave$=N_,y.mouseMove$=lo,y.mouseMovePoint$=bS,y.mouseOut$=k_,y.mouseOver$=R_,y.mouseUp$=Mm,y.mouseWheel$=B_,y.mutation$=Qm,y.nearestElement=e_,y.nextElementSibling=o_,y.normalizePoint=Ow,y.normalizeSVGPath=ec,y.ofType=B2,y.onBeforeUnload=mm,y.onDocumentReady=Ph,y.openLog=Ug,y.operationParser=V2,y.outputGifBase64=vf,y.outputQRCodeBase64=Mw,y.pan$=U_,y.panCancel$=G_,y.panDown$=q_,y.panEnd$=V_,y.panLeft$=X_,y.panMove$=Y_,y.panRight$=H_,y.panStart$=j_,y.panUp$=W_,y.parent=n_,y.parents=Dh,y.parseCSS=nm,y.parseSVGPath=wi,y.parseTransformToMatrix=lm,y.patchVNode=po,y.pinch$=J_,y.pinchIn$=K_,y.pinchOut$=Z_,y.pngToJpg=ww,y.pointerCancel$=$h,y.pointerDown$=Fh,y.pointerDownMovePoint$=fo,y.pointerMove$=zh,y.pointerUp$=Bh,y.polar=En,y.polymorphTween=Mx,y.popStateChange$=np,y.press$=Q_,y.pressDownMove=Km,y.pressDownMoveWithMouse=FS,y.pressDownMoveWithPointer=Zm,y.pressDownMoveWithTouch=BS,y.preventDefault=vn,y.previousElementSibling=a_,y.pull$=vS,y.q2c=qr,y.querySelectorAllToStringArray=l1,y.radiusClip=xw,y.rawState=Ic,y.readFileInBrowser=Fr,y.readStyleFromStyles=g1,y.rectClip=vw,y.relativeSVGPath=Yw,y.rem2px=Qx,y.remove=b_,y.removeAllEventListeners=Nb,y.removeClass=x_,y.renderVNode=op,y.resize=Pm,y.resize$=Lh,y.reverseCSSToJSEasing=nv,y.reverseEaseNameToCubicBezier=Nf,y.reverseEasing=Of,y.revokeObjectURL=$x,y.rightRotate=nw,y.rotate$=tS,y.rotatePoint=Ie,y.runInSandbox=T_,y.rxState=k2,y.safeArea$=qS,y.scheduleVNodeAsap=Xh,y.scheduleVNodeImmediately=cp,y.scroll$=mS,y.scrollParent=r_,y.scrollTo=qx,y.selectFile=ym,y.selectFileImage=Vx,y.selectFileInBrowser=_a,y.setCSSVar=JE,y.setLogUploadFn=Yg,y.setManualScroll=Jx,y.setRem=tE,y.setStyle=lr,y.setTheme=xp,y.setWindowTitle=Xx,y.shadowRoot=h_,y.sharpen=gw,y.showEl=vm,y.showUpdateDialog=pp,y.siblings=i_,y.simulateEventFromTouch=Xb,y.stateLoggerMiddleware=U2,y.stopPropagation=mf,y.stringToDom=f1,y.swipe$=eS,y.swipeDown$=iS,y.swipeLeft$=nS,y.swipeRight$=rS,y.swipeUp$=sS,y.tap$=km,y.tapOutSide$=oS,y.targetToAfterDropShape=Tx,y.text=g_,y.toBlackAndWhite=iw,y.toBlue=hw,y.toBlueAndGreen=fw,y.toBlueAndGrey=pw,y.toDegree=Gt,y.toGreen=cw,y.toGreenAndGrey=mw,y.toGrey=rw,y.toGrey2=sw,y.toOpposite=ow,y.toRadian=pt,y.toRed=aw,y.toRedAndBlue=lw,y.toRedAndGreen=uw,y.toRedAndGrey=dw,y.toggleClass=kh,y.toggleElDisplay=w_,y.toggleTheme=WE,y.touchCancel$=Rm,y.touchDownMovePoint$=Gm,y.touchEnd$=Im,y.touchMove$=Dm,y.touchStart$=Om,y.transform=Th,y.transformPath2D=Lx,y.transitionEnd$=cS,y.transitionStart$=aS,y.unmountVNode=_s,y.updateVNode=yo,y.urlChange$=GS,y.useDimensions=gx,y.useImmer=mx,y.useImmerReducer=px,y.useLocale=wh,y.useReactControllableState=K2,y.useReactState=I2,y.useVueControllableState=bx,y.useVueState=R2,y.useWindowResize$=M_,y.vibrate=Hx,y.visible$=jS,y.waitElementAddedInDOM=YS,y.waitForStyleSheetsLoaded=jx,y.writeToIndexDB=GE,y.wxJsChooseImage=aE,y.wxJsDownloadImage=uE,y.wxJsDownloadVoice=vE,y.wxJsGetLocalImgData=lE,y.wxJsGetLocation=EE,y.wxJsGetNetworkType=_E,y.wxJsLogin=PE,y.wxJsOnVoicePlayEnd=bE,y.wxJsOnVoiceRecordEnd=mE,y.wxJsOpenLocation=SE,y.wxJsPauseVoice=gE,y.wxJsPay=TE,y.wxJsPlayVoice=pE,y.wxJsPreviewImage=cE,y.wxJsScanQRCode=CE,y.wxJsStartRecord=fE,y.wxJsStopRecord=dE,y.wxJsStopVoice=yE,y.wxJsTranslateVoice=xE,y.wxJsUpdateAppMessageShareData=iE,y.wxJsUpdateTimelineShareData=oE,y.wxJsUploadImage=hE,y.wxJsUploadVoice=wE,y.zvhToLSVGPath=Vw,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y}({});
66
145
  //# sourceMappingURL=zyzgroup_core_web.iife.js.map